Implement duplicator viewport/render visibility options

This allows a duplicator (as known as dupli parent) to be in a visible
collection so its duplicated objects are visible, however while being
invisible for the final render.

An object that is a particle emitter is also considered a duplicator.

Many thanks for the reviewers for the extense feedback.

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D2966
This commit is contained in:
Dalai Felinto
2017-12-21 13:29:14 -02:00
parent 103dd66057
commit b89f2276e5
21 changed files with 215 additions and 69 deletions

View File

@@ -278,6 +278,13 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel):
col.label(text="Object Color:")
col.prop(obj, "color", text="")
col = layout.column()
col.active = bool(is_dupli or obj.particle_systems)
col.label(text="Duplicator Visibility:")
row = col.row(align=True)
row.prop(obj, "show_duplicator_for_viewport", text="Viewport")
row.prop(obj, "show_duplicator_for_render", text="Render")
class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
bl_label = "Duplication"