[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28533] trunk/blender/source/blender/ makesrna/intern/rna_object.c: Add read-only property to check if any duplis are used.

Daniel Genrich daniel.genrich at gmx.net
Sun May 2 15:48:32 CEST 2010


Revision: 28533
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28533
Author:   genscher
Date:     2010-05-02 15:48:32 +0200 (Sun, 02 May 2010)

Log Message:
-----------
Add read-only property to check if any duplis are used. Without this, ob.create_dupli_list(scene) crashes when no duplis are on the object. We cannot use  duply_type !='NONE' because for non rna dupli types like dupli_particles, it fails. And some dupli types, we don't want to have in rna

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_object.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_object.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_object.c	2010-05-02 04:40:44 UTC (rev 28532)
+++ trunk/blender/source/blender/makesrna/intern/rna_object.c	2010-05-02 13:48:32 UTC (rev 28533)
@@ -1846,6 +1846,10 @@
 	RNA_def_property_struct_type(prop, "DupliObject");
 	RNA_def_property_ui_text(prop, "Dupli list", "Object duplis");
 
+	prop= RNA_def_property(srna, "duplis_used", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLI);
+	RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
 	/* time offset */
 	prop= RNA_def_property(srna, "time_offset", PROP_FLOAT, PROP_NONE|PROP_UNIT_TIME);
 	RNA_def_property_float_sdna(prop, NULL, "sf");





More information about the Bf-blender-cvs mailing list