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
path: root/source
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2010-05-07 08:52:10 +0400
committerMatt Ebb <matt@mke3.net>2010-05-07 08:52:10 +0400
commit6bc28e97c102e7dce88c0fbe2379e3c7c4f14b4c (patch)
tree575fb7b55d27fdc9b4ebff1eade968d19b52d8bd /source
parent9084df418d1bbd1fd3cf8f1bf118cbef4d50a4c7 (diff)
Fix [#22271] N panel Lock icons not changing when pressed
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c14
-rw-r--r--source/blender/makesrna/intern/rna_object.c4
2 files changed, 11 insertions, 7 deletions
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index d159dc487a7..c75b785aa11 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -746,7 +746,7 @@ static void v3d_transform_butsR(uiLayout *layout, PointerRNA *ptr)
uiItemR(colsub, ptr, "location", 0, "Location", 0);
colsub = uiLayoutColumn(split, 1);
uiItemL(colsub, "", 0);
- uiItemR(colsub, ptr, "lock_location", UI_ITEM_R_TOGGLE+UI_ITEM_R_ICON_ONLY, "", ICON_LOCKED);
+ uiItemR(colsub, ptr, "lock_location", UI_ITEM_R_TOGGLE+UI_ITEM_R_ICON_ONLY, "", 0);
split = uiLayoutSplit(layout, 0.8, 0);
@@ -757,10 +757,10 @@ static void v3d_transform_butsR(uiLayout *layout, PointerRNA *ptr)
colsub = uiLayoutColumn(split, 1);
uiItemR(colsub, ptr, "lock_rotations_4d", UI_ITEM_R_TOGGLE, "4L", 0);
if (RNA_boolean_get(ptr, "lock_rotations_4d"))
- uiItemR(colsub, ptr, "lock_rotation_w", UI_ITEM_R_TOGGLE+UI_ITEM_R_ICON_ONLY, "", ICON_LOCKED);
+ uiItemR(colsub, ptr, "lock_rotation_w", UI_ITEM_R_TOGGLE+UI_ITEM_R_ICON_ONLY, "", 0);
else
uiItemL(colsub, "", 0);
- uiItemR(colsub, ptr, "lock_rotation", UI_ITEM_R_TOGGLE+UI_ITEM_R_ICON_ONLY, "", ICON_LOCKED);
+ uiItemR(colsub, ptr, "lock_rotation", UI_ITEM_R_TOGGLE+UI_ITEM_R_ICON_ONLY, "", 0);
break;
case ROT_MODE_AXISANGLE: /* axis angle */
colsub = uiLayoutColumn(split, 1);
@@ -768,17 +768,17 @@ static void v3d_transform_butsR(uiLayout *layout, PointerRNA *ptr)
colsub = uiLayoutColumn(split, 1);
uiItemR(colsub, ptr, "lock_rotations_4d", UI_ITEM_R_TOGGLE, "4L", 0);
if (RNA_boolean_get(ptr, "lock_rotations_4d"))
- uiItemR(colsub, ptr, "lock_rotation_w", UI_ITEM_R_TOGGLE+UI_ITEM_R_ICON_ONLY, "", ICON_LOCKED);
+ uiItemR(colsub, ptr, "lock_rotation_w", UI_ITEM_R_TOGGLE+UI_ITEM_R_ICON_ONLY, "", 0);
else
uiItemL(colsub, "", 0);
- uiItemR(colsub, ptr, "lock_rotation", UI_ITEM_R_TOGGLE+UI_ITEM_R_ICON_ONLY, "", ICON_LOCKED);
+ uiItemR(colsub, ptr, "lock_rotation", UI_ITEM_R_TOGGLE+UI_ITEM_R_ICON_ONLY, "", 0);
break;
default: /* euler rotations */
colsub = uiLayoutColumn(split, 1);
uiItemR(colsub, ptr, "rotation_euler", 0, "Rotation", 0);
colsub = uiLayoutColumn(split, 1);
uiItemL(colsub, "", 0);
- uiItemR(colsub, ptr, "lock_rotation", UI_ITEM_R_TOGGLE+UI_ITEM_R_ICON_ONLY, "", ICON_LOCKED);
+ uiItemR(colsub, ptr, "lock_rotation", UI_ITEM_R_TOGGLE+UI_ITEM_R_ICON_ONLY, "", 0);
break;
}
uiItemR(layout, ptr, "rotation_mode", 0, "", 0);
@@ -788,7 +788,7 @@ static void v3d_transform_butsR(uiLayout *layout, PointerRNA *ptr)
uiItemR(colsub, ptr, "scale", 0, "Scale", 0);
colsub = uiLayoutColumn(split, 1);
uiItemL(colsub, "", 0);
- uiItemR(colsub, ptr, "lock_scale", UI_ITEM_R_TOGGLE+UI_ITEM_R_ICON_ONLY, "", ICON_LOCKED);
+ uiItemR(colsub, ptr, "lock_scale", UI_ITEM_R_TOGGLE+UI_ITEM_R_ICON_ONLY, "", 0);
if (ptr->type == &RNA_Object) {
Object *ob = ptr->data;
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index c16110b4c0a..9972fa01a34 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -1651,17 +1651,20 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_LOCX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Location", "Lock editing of location in the interface");
+ RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1);
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Rotation", "Lock editing of rotation in the interface");
+ RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1);
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
// XXX this is sub-optimal - it really should be included above, but due to technical reasons we can't do this!
prop= RNA_def_property(srna, "lock_rotation_w", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTW);
+ RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1);
RNA_def_property_ui_text(prop, "Lock Rotation (4D Angle)", "Lock editing of 'angle' component of four-component rotations in the interface");
// XXX this needs a better name
prop= RNA_def_property(srna, "lock_rotations_4d", PROP_BOOLEAN, PROP_NONE);
@@ -1672,6 +1675,7 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_SCALEX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Scale", "Lock editing of scale in the interface");
+ RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1);
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
/* matrix */