Does not have any effect for current registerable types (Operator, Menu, Panel, etc.), since none of those actually have a base struct, but will be required for future types with an actual hierarchy (custom nodes).
Added four new functions as shortcuts to creating GHashes that use the
standard ptr/str/int/pair hash and compare functions.
GHash *BLI_ghash_ptr_new(const char *info);
GHash *BLI_ghash_str_new(const char *info);
GHash *BLI_ghash_int_new(const char *info);
GHash *BLI_ghash_pair_new(const char *info);
Replaced almost all occurrences of BLI_ghash_new() with one of the
above functions.
undo.
The way this got updated from the context is a bit unreliable, and for handlers
the update couldn't happen because there is no context passed in. Now it's
updated from setup_app_data, which is where the change actually happens. I left
in the other updates to be sure but they should not be needed anymore.
- memset(..., -1) is used incorrectly even though it worked: MOD_solidify.c - thanks Halley from IRC for noticing this. use fill_vn_i() instead.
- quiet warnings in editmesh_slide.c
- cleanup comments in bmesh and some other minor comment additions.
--debug
--debug-ffmpeg
--debug-python
--debug-events
--debug-wm
This makes debug output easier to read - event debug prints would flood output too much before.
For convenience:
--debug-all turns all debug flags on (works as --debug did before).
also removed some redundant whitespace in debug prints and prefix some prints with __func__ to give some context.
fix for collection functions not showing up in __dir__,
eg, console autocomplete didnt show up bpy.data.libraries.load
also fix refcounting leak with returning attributes from collections.
Wrap customdata, so far you can access the data layers in a pythonic way but not manipulate the customdata yet.
provides dictionary like access to customdata layers, eg:
texpoly = bm.faces.tex["UVMap"]
print(bm.verts.shape.keys()) # un-intended pun, keys() works on all layers.
print("MyInt" in bm.edges.int) # __contains__
layer = bm.faces.get("CheckForLayer")
Python operator subclasses and operator types each get their own SRNA, causing double ups for bpy.types.__dir__()
From the operator type - these share names.
* ot->ext.srna
* ot->srna
Note that this conflict is still there, this only disables 'ot->ext.srna' from being included in dir(bpy.types).
This script was defining an operator within the panels draw function, while its possible to support this its really asking for trouble.
the fix is to raise an error when this happens.
also fix crash passing non classes to register_class/unregister_class
if 2 pyrna structs used the same pointer they could incorrectly compare as true, this caused an error in theme saving because an item could match its parent and stop writing (to prevent recursive writing of same data).
eg:
context.user_preferences.themes[0].user_interface.wcol_regular == context.user_preferences.themes[0].user_interface