diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-05-21 19:34:09 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-05-21 19:34:09 +0400 |
commit | 94902dac977cfc089e9740782a19c6ab370cdc03 (patch) | |
tree | bf715f3e99859913a741dd37e3338a6f5cfe7eb6 /release | |
parent | 65143c50e0cbbd111c5fa01f54d0177d1a50704f (diff) |
2.5 UI: Modifier Template
* template_modifier creates the modifier box, and returns a layout
to put the buttons in.
* Only the armature modifier is now done with python code, all other
modifiers use C code. To convert a modifier to python, remove the
corresponding C code and create a function in DATA_PT_modifiers.
* Some modifiers still require some RNA work to get it working well,
especially to make pointers editable. Mostly that is a matter of
defining an own _set callback and put some of the modifier C code
into it.
* Still various buttons that don't work, like for hooks or mesh
deform binding.
* Fix for crashing decimate modifier (still disabled).
* Removed UI_BUT_NO_HILITE, HMENU.
* Make uiLayoutBox work with align.
Diffstat (limited to 'release')
-rw-r--r-- | release/ui/buttons_data_modifier.py | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/release/ui/buttons_data_modifier.py b/release/ui/buttons_data_modifier.py index a28a978080d..4020c71759d 100644 --- a/release/ui/buttons_data_modifier.py +++ b/release/ui/buttons_data_modifier.py @@ -21,26 +21,16 @@ class DATA_PT_modifiers(DataButtonsPanel): if not ob: return - layout.row() - layout.item_menu_enumO("OBJECT_OT_modifier_add", "type") + row = layout.row() + row.item_menu_enumO("OBJECT_OT_modifier_add", "type") + row.itemL(); for md in ob.modifiers: - sub = layout.box() - - row = sub.row() - row.itemR(md, "expanded", text="") - row.itemR(md, "name", text="") - - row.itemR(md, "render", text="") - row.itemR(md, "realtime", text="") - row.itemR(md, "editmode", text="") - row.itemR(md, "on_cage", text="") + box = layout.template_modifier(context, md) if md.expanded: - sub.itemS() - - if (md.type == 'ARMATURE'): - self.armature(sub, md) + if md.type == 'ARMATURE': + self.armature(box, md) def armature(self, layout, md): layout.itemR(md, "object") @@ -51,9 +41,7 @@ class DATA_PT_modifiers(DataButtonsPanel): flow.itemR(md, "use_vertex_groups") flow.itemR(md, "use_bone_envelopes") flow.itemR(md, "quaternion") - flow.itemR(md, "b_bone_rest") flow.itemR(md, "multi_modifier") bpy.types.register(DATA_PT_modifiers) - |