2.5:
authorThomas Dinges <blender@dingto.org>
Mon, 11 May 2009 17:34:31 +0000 (17:34 +0000)
committerThomas Dinges <blender@dingto.org>
Mon, 11 May 2009 17:34:31 +0000 (17:34 +0000)
* Added empty buttons
* Added missing empty notifiers

release/ui/buttons_data_empty.py [new file with mode: 0644]
source/blender/makesrna/intern/rna_object.c

diff --git a/release/ui/buttons_data_empty.py b/release/ui/buttons_data_empty.py
new file mode 100644 (file)
index 0000000..2360178
--- /dev/null
@@ -0,0 +1,28 @@
+
+import bpy
+
+class DataButtonsPanel(bpy.types.Panel):
+       __space_type__ = "BUTTONS_WINDOW"
+       __region_type__ = "WINDOW"
+       __context__ = "data"
+       
+       def poll(self, context):
+               ob = context.active_object
+               return (ob and ob.type == 'EMPTY')
+       
+class DATA_PT_empty(DataButtonsPanel):
+       __idname__ = "DATA_PT_empty"
+       __label__ = "Empty"
+
+       def draw(self, context):
+               ob = context.active_object
+               layout = self.layout
+
+               if not ob:
+                       return
+                       
+               layout.column()
+               layout.itemR(ob, "empty_draw_type")
+               layout.itemR(ob, "empty_draw_size")
+               
+bpy.types.register(DATA_PT_empty)
\ No newline at end of file
index 6a14fec4656dfc3af512ed505a706c77a46cd63d..cbc80e68b4adcacc6907bb7b46fa70509684ba86 100644 (file)
@@ -680,11 +680,13 @@ static StructRNA *rna_def_object(BlenderRNA *brna)
        RNA_def_property_enum_sdna(prop, NULL, "empty_drawtype");
        RNA_def_property_enum_items(prop, empty_drawtype_items);
        RNA_def_property_ui_text(prop, "Empty Draw Type", "Viewport display style for empties.");
+       RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
 
        prop= RNA_def_property(srna, "empty_draw_size", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "empty_drawsize");
        RNA_def_property_range(prop, 0.01, 10.0);
        RNA_def_property_ui_text(prop, "Empty Draw Size", "Size of of display for empties in the viewport.");
+       RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
 
        /* render */