[Bf-blender-cvs] [35833662] master: Show the "Maximum Draw Type" for empties and cameras in case they work as duplicators.

Lukas Tönne noreply at git.blender.org
Tue May 13 09:01:46 CEST 2014


Commit: 35833662660caf2949bb69de764934d7c03dc901
Author: Lukas Tönne
Date:   Tue May 13 08:52:51 2014 +0200
https://developer.blender.org/rB35833662660caf2949bb69de764934d7c03dc901

Show the "Maximum Draw Type" for empties and cameras in case they work
as duplicators.

This property was always hidden in the UI for empties and cameras. It
doesn't make sense for the objects themselves (they are wires-only), but
also gets inherited by duplis. Now show it greyed out if not used, but
make it available for duplicators.

===================================================================

M	release/scripts/startup/bl_ui/properties_object.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index 3ff9ab9..6b7e7b4 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -206,6 +206,7 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel):
         obj = context.object
         obj_type = obj.type
         is_geometry = (obj_type in {'MESH', 'CURVE', 'SURFACE', 'META', 'FONT'})
+        is_wire = (obj_type in {'CAMERA', 'EMPTY'})
         is_empty_image = (obj_type == 'EMPTY' and obj.empty_draw_type == 'IMAGE')
         is_dupli = (obj.dupli_type != 'NONE')
 
@@ -237,9 +238,13 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel):
         split = layout.split()
 
         col = split.column()
-        if obj_type not in {'CAMERA', 'EMPTY'}:
+        if is_wire:
+            # wire objects only use the max. draw type for duplis
+            col.active = is_dupli
+            col.label(text="Maximum Dupli Draw Type:")
+        else:
             col.label(text="Maximum Draw Type:")
-            col.prop(obj, "draw_type", text="")
+        col.prop(obj, "draw_type", text="")
 
         col = split.column()
         if is_geometry or is_empty_image:




More information about the Bf-blender-cvs mailing list