diff options
author | Thomas Dinges <blender@dingto.org> | 2009-05-11 21:34:31 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2009-05-11 21:34:31 +0400 |
commit | f487a96302f211219b1cf172b18a8203988c83f4 (patch) | |
tree | 82e2c7b6f50091686f53176dd8b62679c5bf4fd6 | |
parent | 69fca66a81420c154f90807d60c81aff0cd53fa6 (diff) |
2.5:
* Added empty buttons
* Added missing empty notifiers
-rw-r--r-- | release/ui/buttons_data_empty.py | 28 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 2 |
2 files changed, 30 insertions, 0 deletions
diff --git a/release/ui/buttons_data_empty.py b/release/ui/buttons_data_empty.py new file mode 100644 index 00000000000..2360178fdc7 --- /dev/null +++ b/release/ui/buttons_data_empty.py @@ -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 diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 6a14fec4656..cbc80e68b4a 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -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 */ |