DRW: use object color from instancer

Otherwise it's impossible to set the color of instanced library objects.

Follows convention of instancer controlling draw options.
This commit is contained in:
Campbell Barton 2019-03-12 12:28:01 +11:00
parent 6b39dc7672
commit 022ad41670
Notes: blender-bot 2023-02-14 02:56:02 +01:00
Referenced by issue #73802, Instance Object is overriding Object Colors
Referenced by issue #63830, Instanced objects get their viewport display color ignored (by design)
2 changed files with 2 additions and 1 deletions

View File

@ -257,7 +257,7 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel):
col.active = is_dupli
col.prop(obj, "display_type", text="Display As")
if is_geometry or is_empty_image or is_gpencil:
if is_geometry or is_dupli or is_empty_image or is_gpencil:
# Only useful with object having faces/materials...
col = flow.column()
col.prop(obj, "color")

View File

@ -149,6 +149,7 @@ bool deg_objects_dupli_iterator_next(BLI_Iterator *iter)
temp_dupli_object->base_flag = dupli_parent->base_flag | BASE_FROM_DUPLI;
temp_dupli_object->base_local_view_bits = dupli_parent->base_local_view_bits;
temp_dupli_object->dt = dupli_parent->dt;
copy_v4_v4(temp_dupli_object->color, dupli_parent->color);
/* Duplicated elements shouldn't care whether their original collection is visible or not. */
temp_dupli_object->base_flag |= BASE_VISIBLE;