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:
authorCampbell Barton <ideasman42@gmail.com>2011-10-20 12:12:39 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-20 12:12:39 +0400
commit1555d4b1a8ff43414b6ab5e87097d53f86c86a00 (patch)
treef2d80597081038c99f90bcd3d558719f02ad403b /source/blender
parent9969ebffa60d37762bf20b67b3cf1fd6430ff9fa (diff)
fix [#28902] Rendering and visibility icons in modifier panel move between clicks
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/interface/interface_templates.c32
1 files changed, 21 insertions, 11 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 4dcdeab2169..77a25307651 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -759,18 +759,28 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, Modif
if (mti->flags & eModifierTypeFlag_SupportsEditmode)
uiItemR(row, &ptr, "show_in_editmode", 0, "", ICON_NONE);
}
- if ((ob->type==OB_MESH) && modifier_couldBeCage(scene, md) && (index <= lastCageIndex))
- {
- /* -- convert to rna ? */
- but = uiDefIconButBitI(block, TOG, eModifierMode_OnCage, 0, ICON_MESH_DATA, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0,
- UI_translate_do_tooltip(N_("Apply modifier to editing cage during Editmode")));
- if (index < cageIndex)
- uiButSetFlag(but, UI_BUT_DISABLED);
- uiButSetFunc(but, modifiers_setOnCage, ob, md);
- }
- /* tesselation point for curve-typed objects */
- if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
+ if (ob->type==OB_MESH) {
+ if (modifier_couldBeCage(scene, md) && (index <= lastCageIndex))
+ {
+ /* -- convert to rna ? */
+ but = uiDefIconButBitI(block, TOG, eModifierMode_OnCage, 0, ICON_MESH_DATA, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0,
+ UI_translate_do_tooltip(N_("Apply modifier to editing cage during Editmode")));
+ if (index < cageIndex)
+ uiButSetFlag(but, UI_BUT_DISABLED);
+ uiButSetFunc(but, modifiers_setOnCage, ob, md);
+ }
+ else {
+ uiBlockEndAlign(block);
+
+ /* place holder button */
+ uiBlockSetEmboss(block, UI_EMBOSSN);
+ but= uiDefIconBut(block, BUT, 0, ICON_NONE, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, NULL);
+ uiButSetFlag(but, UI_BUT_DISABLED);
+ uiBlockSetEmboss(block, UI_EMBOSS);
+ }
+ } /* tesselation point for curve-typed objects */
+ else if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
/* some modifiers could work with pre-tesselated curves only */
if (ELEM3(md->type, eModifierType_Hook, eModifierType_Softbody, eModifierType_MeshDeform)) {
/* add disabled pre-tesselated button, so users could have