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:
-rw-r--r--intern/cycles/blender/blender_object.cpp7
-rw-r--r--source/blender/makesrna/intern/rna_object.c9
2 files changed, 13 insertions, 3 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp
index caf5b0a99b1..608cb33eadd 100644
--- a/intern/cycles/blender/blender_object.cpp
+++ b/intern/cycles/blender/blender_object.cpp
@@ -228,7 +228,12 @@ void BlenderSync::sync_objects(BL::SpaceView3D b_v3d)
for(b_ob->dupli_list.begin(b_dup); b_dup != b_ob->dupli_list.end(); ++b_dup) {
Transform tfm = get_transform(b_dup->matrix());
- sync_object(*b_ob, b_index, b_dup->object(), tfm, ob_layer);
+ BL::Object b_dup_ob = b_dup->object();
+ bool dup_hide = (b_v3d)? b_dup_ob.hide(): b_dup_ob.hide_render();
+
+ if(!(b_dup->hide() || dup_hide))
+ sync_object(*b_ob, b_index, b_dup_ob, tfm, ob_layer);
+
b_index++;
}
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index f9bb0b36a3f..3ec01e56ab3 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -2447,15 +2447,20 @@ static void rna_def_dupli_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "matrix_original", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "omat");
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
- RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE|PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object Matrix", "The original matrix of this object before it was duplicated");
prop= RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "mat");
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
- RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE|PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object Duplicate Matrix", "Object duplicate transformation matrix");
+ prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "no_draw", 0);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE|PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Hide", "Don't show dupli object in viewport or render");
+
/* TODO: DupliObject has more properties that can be wrapped */
}