* Shuffled some code around, and renamed some functions used for getting context info
- Split UI-buttons into a separate file from stroke-drawing code
- Removed some obsolete code (i.e. old paint code that used to be in _edit, but which has been moved to _paint).
* Made drawing in 3D-View default to using the active object as the owner of the Grease Pencil data. For now, the drawing code will therefore only show the GP data for the active object only. More work to come on this.
* Fixed freeing code for Objects/Scenes with GP data.
Also ported some name changes from the materials UI script to RNA to keep these consistent. Animation editors always show the RNA name after all, so it's good to keep the names similar.
* Wrapped Grease Pencil datatypes in RNA.
* Hooked up Grease Pencil access in RNA (i.e. via Main, ID, and Scene)
TODO:
Updates to properties are currently lacking property-update calls, since there's no good notifier for this.
* Changed the hotkey to simply be:
Hold DKEY, click+drag using Left-Mouse (draw) or Right-Mouse (erase). How to get tablet erasers to work (via keymaps) is on todo...
You can simply hold DKEY until you've finished drawing, thanks to the nice way that keymaps can support standard-key modifiers now.
* Eraser works now too.
* Realtime updates now work again
* Fixed problems with clicks to start drawing resulting in a stroke being ended.
* Changed the hotkeys to Ctrl-Alt-Shift-LMB (draw) and Ctrl-Alt-Shift-RMB (erase). Still very temporary stuff, will probably change these a few more times as I experiment with new approaches.
This commit is the start of the new Grease Pencil implementation. I've just ported the old code to make it work with operators, and to store its data in Grease-Pencil datablocks.
However, this is currently still really buggy, with only the barebones of the drawing/creation tools restored (no UI panels, no options). To use (not recommended), use D+S+move_mouse (and click when finished) for now. There are some rather serious event handling errors going on here...
* Fix for plane material preview render. Now, light cache aborts if there isn't enough volume, and falls back on non-cached single scattering. It still doesn't make much sense to render a plane as a volume, but for now in the preview it will shade the region in between the plane and the checker background.
Also, made the Outliner's horizontal scrollbar work better for keymaps view. It's still using an approximation of the width, but at least you can scroll now.
Note that With libsndfile also need libflac and libogg here (Linux), right
now I just add this two librarys to the NAN_SNDFILELIBS, but maybe
it's better split this ? (NAN_FLAC/NAN_OGG)
Example code: http://www.pasteall.org/7332/c.
New API functions: http://www.pasteall.org/7330/c.
Maximum number of dimensions is currently limited to 3, but can be increased arbitrarily if needed.
What this means for ID property access:
* MeshFace.verts - dynamic array, size 3 or 4 depending on MFace.v4
* MeshTextureFace.uv - dynamic, 2-dimensional array, size depends on MFace.v4
* Object.matrix - 2-dimensional array
What this means for functions:
* more intuitive API possibility, for example:
Mesh.add_vertices([(x, y, z), (x, y, z), ...])
Mesh.add_faces([(1, 2, 3), (4, 5, 6), ...])
Python part is not complete yet, e.g. it is possible to:
MeshFace.verts = (1, 2, 3) # even if Mesh.verts is (1, 2, 3, 4) and vice-versa
MeshTextureFace.uv = [(0.0, 0.0)] * 4 # only if a corresponding MFace is a quad
but the following won't work:
MeshTextureFace.uv[3] = (0.0, 0.0) # setting uv[3] modifies MTFace.uv[1][0] instead of MTFace.uv[3]
I hoped for it to resolve the bug of loading sounds with relative paths didn't work, but Main.name isn't set before the sounds are loaded, so the bug resists!
Someone who is into file loading should please fix this!
Instead use __contains__, eg.
if key in gameOb: ...
Mathutils returns from PyMath.cpp were incorrectly using wrapped Mathutils types. Wrapped types should only be used with a callback now.