bugfix [#23641] enable/disable switch of "Limit" Constraints are inverting
This commit is contained in:
@@ -957,6 +957,11 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
|
||||
show_upbut= ((prev_proxylock == 0) && (con->prev));
|
||||
show_downbut= (con->next) ? 1 : 0;
|
||||
|
||||
/* enabled */
|
||||
uiBlockSetEmboss(block, UI_EMBOSSN);
|
||||
uiItemR(row, &ptr, "mute", 0, "", (con->flag & CONSTRAINT_OFF) ? ICON_MUTE_IPO_ON : ICON_MUTE_IPO_OFF);
|
||||
uiBlockSetEmboss(block, UI_EMBOSS);
|
||||
|
||||
uiLayoutSetOperatorContext(row, WM_OP_INVOKE_DEFAULT);
|
||||
|
||||
/* up/down */
|
||||
@@ -970,9 +975,6 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
|
||||
uiBlockEndAlign(block);
|
||||
}
|
||||
|
||||
/* enabled */
|
||||
uiItemR(row, &ptr, "mute", 0, "", 0);
|
||||
|
||||
/* Close 'button' - emboss calls here disable drawing of 'button' behind X */
|
||||
uiBlockSetEmboss(block, UI_EMBOSSN);
|
||||
uiItemO(row, "", ICON_X, "CONSTRAINT_OT_delete");
|
||||
|
||||
@@ -1941,8 +1941,8 @@ void RNA_def_constraint(BlenderRNA *brna)
|
||||
|
||||
/* flags */
|
||||
prop= RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_OFF);
|
||||
RNA_def_property_ui_text(prop, "Enabled", "Enable/Disable Constraint");
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_OFF);
|
||||
RNA_def_property_ui_text(prop, "Disable", "Enable/Disable Constraint");
|
||||
|
||||
prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_EXPAND);
|
||||
|
||||
Reference in New Issue
Block a user