- remove some warnings
- fix typos
- cmake allow in-source build (when WITH_IN_SOURCE_BUILD is defined)
- cmake, use an explicit list of rna files (don't glob)
was no longer wrapped by python as a vector. now fixed size float arrays
with PROP_NONE subtype are wrapped as vectors since its convenient to
have x/y access.
this is useful for the register() class method which is called before the class gets structRNA assigned.
eg:
class MyClass(bpy.types.PropertyGroup):
@classmethod
def register(cls):
cls.name = StringProperty() # assigned but registration is delayed.
move calls to the classes register/unregister function into register_class() / unregister_class() and add docs.
also other minor changes:
- remove face sorting keybinding, was Ctrl+Alt+F, this is quite and obscure feature and face order normally doesn't matter, so access from Face menu is enough.
- add commented out call to mesh.validate() in addon template since its useful to correct incomplete meshes during development.
creating RNA within draw functions can free existing RNA, crashing blender when this is already used in the UI.
disallowing this so it raises a python exception.
This was being used to dynamically generate addon categories so for now they are hard coded and we need proper enum-functions for python to do this.
fix for crash when iterating over a collection which allocates the collection and frees on when finished.
The ability for BPy_StructRNA to hold a reference to other PyObject's was added to support this.
Previously the api just converted the collection to a list and got the iterator from the list to return.
This has the advantage that it uses minimal memory on large collections where before it would make an array.
Though the main reason for this change is to support a bugfix for collections which free memory when they are done, this currently crashes the python api since once the list is built, the data is freed which is used by the list items in some cases (dynamic enums for eg).
Second method for not having python crash blender on invalid access (ifdef'd out ATM, so no functional change).
This uses a weakref list per ID, and invalidates all members of that list when the ID is freed.
the list is not stores in the ID pointer but using a hash table since storing python in DNA data is not acceptable.
This is more correct then the previous method but shows down execution of scripts significantly since its always adding and removing from lists when data is created and freed.
This uses pythons GC so its no overhead during runtime but makes removing ID's slower.
Commented definition 'USE_PYRNA_INVALIDATE_GC' for now, so no functional change.