diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-10-22 21:34:16 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-10-22 21:34:16 +0400 |
commit | 8a2c30ac57ff5739a6ccbbdcbaa3f63c1438588b (patch) | |
tree | 664ed17dbefb01325f1cf0d8300a779950f50ee8 /source/blender/makesrna/intern/rna_object_api.c | |
parent | 3285d47842657161b2206ccb2b29f34ef51eab99 (diff) |
RNA C++ API improvements
Added support of such features, as:
- Ability to call RNA functions using C++ classes
For example RenderEngine.tag_update
- Property setters (for scalars and arrays)
Used Qt/jQuery-like getters/setters style, meaning Class.prop() is a getter,
Class.prop(value) is a setter.
Still to come:
Collection functions are not currently registering inside a property
Meaning BlendData.meshes wouldn't be a subclass of BlendDataMeshes result
you'll need to explicitly create BlendDataMeshes for now instead of doing
BlendData.meshes.remove()
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index 3204dc8e6bc..b8d8f0fb190 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -74,7 +74,7 @@ /* copied from Mesh_getFromObject and adapted to RNA interface */ /* settings: 0 - preview, 1 - render */ -Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_modifiers, int settings) +static Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_modifiers, int settings) { Mesh *tmpmesh; Curve *tmpcu = NULL, *copycu; @@ -340,7 +340,7 @@ static void dupli_render_particle_set(Scene *scene, Object *ob, int level, int e dupli_render_particle_set(scene, go->ob, level + 1, enable); } /* When no longer needed, duplilist should be freed with Object.free_duplilist */ -void rna_Object_create_duplilist(Object *ob, ReportList *reports, Scene *sce, int settings) +static void rna_Object_create_duplilist(Object *ob, ReportList *reports, Scene *sce, int settings) { int for_render = settings == eModifierMode_Render; @@ -364,7 +364,7 @@ void rna_Object_create_duplilist(Object *ob, ReportList *reports, Scene *sce, in /* ob->duplilist should now be freed with Object.free_duplilist */ } -void rna_Object_free_duplilist(Object *ob) +static void rna_Object_free_duplilist(Object *ob) { if (ob->duplilist) { free_object_duplilist(ob->duplilist); @@ -522,12 +522,12 @@ static void rna_ObjectBase_layers_from_view(Base *base, View3D *v3d) base->lay = base->object->lay = v3d->lay; } -int rna_Object_is_modified(Object *ob, Scene *scene, int settings) +static int rna_Object_is_modified(Object *ob, Scene *scene, int settings) { return BKE_object_is_modified(scene, ob) & settings; } -int rna_Object_is_deform_modified(Object *ob, Scene *scene, int settings) +static int rna_Object_is_deform_modified(Object *ob, Scene *scene, int settings) { return BKE_object_is_deform_modified(scene, ob) & settings; } |