Fix #29848: cycles not respecting dupli group visible layers, also exposed
DupliObject.hide property in API now.
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 */
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user