[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35527] trunk/blender: RNA API Rename
Campbell Barton
ideasman42 at gmail.com
Mon Mar 14 02:37:19 CET 2011
Revision: 35527
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35527
Author: campbellbarton
Date: 2011-03-14 01:37:18 +0000 (Mon, 14 Mar 2011)
Log Message:
-----------
RNA API Rename
'create' was used as prefix and suffix, change dupli list functions to use as suffix, this matches obj.animation_data_create() & obj.animation_data_clear().
obj.create_dupli_list() --> obj.dupli_list_create()
obj.free_dupli_list() --> obj.dupli_list_clear()
Don't use 'create' for object to mesh function since other uses of this are for createing data which stays attached, instead use mathutils style naming convention.
obj.create_mesh() --> obj.to_mesh()
Modified Paths:
--------------
trunk/blender/release/scripts/modules/io_utils.py
trunk/blender/source/blender/makesrna/intern/rna_object_api.c
Modified: trunk/blender/release/scripts/modules/io_utils.py
===================================================================
--- trunk/blender/release/scripts/modules/io_utils.py 2011-03-14 01:00:41 UTC (rev 35526)
+++ trunk/blender/release/scripts/modules/io_utils.py 2011-03-14 01:37:18 UTC (rev 35527)
@@ -91,14 +91,14 @@
return False, None
if ob.dupli_type != 'NONE':
- ob.create_dupli_list(scene)
+ ob.dupli_list_create(scene)
return True, [(dob.object, dob.matrix) for dob in ob.dupli_list]
else:
return False, [(ob, ob.matrix_world)]
def free_derived_objects(ob):
- ob.free_dupli_list()
+ ob.dupli_list_clear()
def unpack_list(list_of_tuples):
Modified: trunk/blender/source/blender/makesrna/intern/rna_object_api.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_object_api.c 2011-03-14 01:00:41 UTC (rev 35526)
+++ trunk/blender/source/blender/makesrna/intern/rna_object_api.c 2011-03-14 01:37:18 UTC (rev 35527)
@@ -77,7 +77,7 @@
/* copied from Mesh_getFromObject and adapted to RNA interface */
/* settings: 0 - preview, 1 - render */
-static Mesh *rna_Object_create_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;
@@ -435,7 +435,7 @@
};
/* mesh */
- func= RNA_def_function(srna, "create_mesh", "rna_Object_create_mesh");
+ func= RNA_def_function(srna, "to_mesh", "rna_Object_to_mesh");
RNA_def_function_ui_description(func, "Create a Mesh datablock with modifiers applied.");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm= RNA_def_pointer(func, "scene", "Scene", "", "Scene within which to evaluate modifiers.");
@@ -448,13 +448,13 @@
RNA_def_function_return(func, parm);
/* duplis */
- func= RNA_def_function(srna, "create_dupli_list", "rna_Object_create_duplilist");
+ func= RNA_def_function(srna, "dupli_list_create", "rna_Object_create_duplilist");
RNA_def_function_ui_description(func, "Create a list of dupli objects for this object, needs to be freed manually with free_dupli_list to restore the objects real matrix and layers.");
parm= RNA_def_pointer(func, "scene", "Scene", "", "Scene within which to evaluate duplis.");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- func= RNA_def_function(srna, "free_dupli_list", "rna_Object_free_duplilist");
+ func= RNA_def_function(srna, "dupli_list_clear", "rna_Object_free_duplilist");
RNA_def_function_ui_description(func, "Free the list of dupli objects.");
/* Armature */
More information about the Bf-blender-cvs
mailing list