Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2009-11-22 16:44:09 +0300
committerMatt Ebb <matt@mke3.net>2009-11-22 16:44:09 +0300
commit8be7b757e3a467e464f59d2de42ccac85d2cc47d (patch)
tree5760eacb5db3bf1c025680e96cd8379c2249177a /source/blender/editors/interface/interface_templates.c
parent8fdaa263c0a2e9e85a86aa9ef5159b1554bc9aab (diff)
* New option on modifiers that don't change topology: Apply as Shape
Rather than applying the modifier to the object data, it will create a new shape with the deformed vertices in there. Only mesh at the moment, other object types on the todo.
Diffstat (limited to 'source/blender/editors/interface/interface_templates.c')
-rw-r--r--source/blender/editors/interface/interface_templates.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index dbf5eb1d0ea..c263729f4fe 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -656,7 +656,7 @@ static uiLayout *draw_modifier(uiLayout *layout, Object *ob, ModifierData *md, i
uiLayout *box;
box= uiLayoutBox(column);
- row= uiLayoutRow(box, 1);
+ row= uiLayoutRow(box, 0);
if(!isVirtual && (md->type!=eModifierType_Collision) && (md->type!=eModifierType_Surface)) {
/* only here obdata, the rest of modifiers is ob level */
@@ -669,8 +669,12 @@ static uiLayout *draw_modifier(uiLayout *layout, Object *ob, ModifierData *md, i
if(ELEM3(psys->part->ren_as, PART_DRAW_PATH, PART_DRAW_GR, PART_DRAW_OB) && psys->pathcache)
uiItemO(row, "Convert", 0, "OBJECT_OT_modifier_convert");
}
- else
- uiItemO(row, "Apply", 0, "OBJECT_OT_modifier_apply");
+ else
+ uiItemEnumO(row, "Apply", 0, "OBJECT_OT_modifier_apply", "apply_as", MODIFIER_APPLY_DATA);
+
+ if (modifier_sameTopology(md))
+ uiItemEnumO(row, "Apply as Shape", 0, "OBJECT_OT_modifier_apply", "apply_as", MODIFIER_APPLY_SHAPE);
+
uiBlockClearButLock(block);
uiBlockSetButLock(block, ob && ob->id.lib, ERROR_LIBDATA_MESSAGE);