Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Genrich <daniel.genrich@gmx.net>2010-05-02 17:48:32 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2010-05-02 17:48:32 +0400
commit35689475c894a47057103c74396e610d9b1cc4ca (patch)
tree2f03ddaa882a08b3a25b79dac531751950142cf6 /source/blender/makesrna/intern/rna_object.c
parent4fd2bb044d0ba6e62fdcda769c8f1fef44bb5ba8 (diff)
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
Diffstat (limited to 'source/blender/makesrna/intern/rna_object.c')
-rw-r--r--source/blender/makesrna/intern/rna_object.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 2ffab298628..7a253ce8544 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -1846,6 +1846,10 @@ static void rna_def_object(BlenderRNA *brna)
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");