[Bf-blender-cvs] [c75a25e9e16] blender2.8: Fix issues with hide/restrict icons after recent changes.
Brecht Van Lommel
noreply at git.blender.org
Fri Nov 2 15:22:22 CET 2018
Commit: c75a25e9e16692dde2efe902aba2b4a834eec8fe
Author: Brecht Van Lommel
Date: Fri Nov 2 13:05:05 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBc75a25e9e16692dde2efe902aba2b4a834eec8fe
Fix issues with hide/restrict icons after recent changes.
Set the names to match the original order again, to avoid breaking addons and
various places in the code that relied on them.
===================================================================
M source/blender/editors/include/UI_icons.h
M source/blender/editors/interface/interface_templates.c
M source/blender/editors/space_clip/clip_buttons.c
M source/blender/editors/space_outliner/outliner_draw.c
M source/blender/makesrna/intern/rna_action.c
M source/blender/makesrna/intern/rna_collection.c
M source/blender/makesrna/intern/rna_gpencil.c
M source/blender/makesrna/intern/rna_gpencil_modifier.c
M source/blender/makesrna/intern/rna_key.c
M source/blender/makesrna/intern/rna_mask.c
M source/blender/makesrna/intern/rna_material.c
M source/blender/makesrna/intern/rna_modifier.c
M source/blender/makesrna/intern/rna_object.c
M source/blender/makesrna/intern/rna_sequencer.c
M source/blender/makesrna/intern/rna_shader_fx.c
===================================================================
diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h
index 34ce9bd1fbe..9d82e074415 100644
--- a/source/blender/editors/include/UI_icons.h
+++ b/source/blender/editors/include/UI_icons.h
@@ -321,12 +321,12 @@ DEF_ICON_OBJECT(OUTLINER_OB_IMAGE)
DEF_ICON_BLANK(321)
DEF_ICON(RESTRICT_COLOR_OFF)
DEF_ICON(RESTRICT_COLOR_ON)
-DEF_ICON(HIDE_OFF)
DEF_ICON(HIDE_ON)
-DEF_ICON(RESTRICT_SELECT_OFF)
+DEF_ICON(HIDE_OFF)
DEF_ICON(RESTRICT_SELECT_ON)
-DEF_ICON(RESTRICT_RENDER_OFF)
+DEF_ICON(RESTRICT_SELECT_OFF)
DEF_ICON(RESTRICT_RENDER_ON)
+DEF_ICON(RESTRICT_RENDER_OFF)
DEF_ICON_BLANK(330)
/* OUTLINER */
@@ -353,8 +353,8 @@ DEF_ICON(MODIFIER_OFF)
DEF_ICON(MODIFIER_ON)
DEF_ICON(ONIONSKIN_OFF)
DEF_ICON(ONIONSKIN_ON)
-DEF_ICON(RESTRICT_VIEW_OFF)
DEF_ICON(RESTRICT_VIEW_ON)
+DEF_ICON(RESTRICT_VIEW_OFF)
DEF_ICON_BLANK(353)
/* PRIMITIVES */
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index f936c2e7b14..0826ba3c5cd 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -2044,7 +2044,7 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
/* enabled */
UI_block_emboss_set(block, UI_EMBOSS_NONE);
uiItemR(row, &ptr, "mute", 0, "",
- (con->flag & CONSTRAINT_OFF) ? ICON_RESTRICT_VIEW_ON : ICON_RESTRICT_VIEW_OFF);
+ (con->flag & CONSTRAINT_OFF) ? ICON_HIDE_ON : ICON_HIDE_OFF);
UI_block_emboss_set(block, UI_EMBOSS);
uiLayoutSetOperatorContext(row, WM_OP_INVOKE_DEFAULT);
diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c
index 6953b7cfb71..a106ab5c465 100644
--- a/source/blender/editors/space_clip/clip_buttons.c
+++ b/source/blender/editors/space_clip/clip_buttons.c
@@ -390,6 +390,7 @@ void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, P
bt = uiDefIconButBitI(block, UI_BTYPE_TOGGLE_N, MARKER_DISABLED, 0, ICON_HIDE_OFF, 0, 0, UI_UNIT_X, UI_UNIT_Y,
&cb->marker_flag, 0, 0, 1, 0, tip);
UI_but_funcN_set(bt, marker_update_cb, cb, NULL);
+ UI_but_drawflag_enable(bt, UI_BUT_ICON_REVERSE);
}
else {
int width, height, step, digits;
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index 19af0371373..9c9e2facec8 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -508,7 +508,7 @@ static void outliner_draw_restrictbuts(
ViewLayer *layer = te->directdata;
bt = uiDefIconButBitS(
- block, UI_BTYPE_ICON_TOGGLE_N, VIEW_LAYER_RENDER, 0, ICON_RESTRICT_RENDER_ON,
+ block, UI_BTYPE_ICON_TOGGLE_N, VIEW_LAYER_RENDER, 0, ICON_RESTRICT_RENDER_OFF,
(int)(ar->v2d.cur.xmax - OL_TOG_RESTRICT_RENDERX), te->ys, UI_UNIT_X,
UI_UNIT_Y, &layer->flag, 0, 0, 0, 0, TIP_("Use view layer for rendering"));
UI_but_func_set(bt, restrictbutton_r_lay_cb, tselem->id, NULL);
@@ -521,7 +521,7 @@ static void outliner_draw_restrictbuts(
if (base) {
bt = uiDefIconButBitS(
- block, UI_BTYPE_ICON_TOGGLE, BASE_HIDDEN, 0, ICON_HIDE_ON,
+ block, UI_BTYPE_ICON_TOGGLE, BASE_HIDDEN, 0, ICON_HIDE_OFF,
(int)(ar->v2d.cur.xmax - OL_TOG_HIDEX), te->ys, UI_UNIT_X,
UI_UNIT_Y, &base->flag, 0, 0, 0, 0,
TIP_("Hide object in viewport (Ctrl to isolate)"));
@@ -573,7 +573,7 @@ static void outliner_draw_restrictbuts(
Object *ob = (Object *)tselem->id;
bt = uiDefIconButBitI(
- block, UI_BTYPE_ICON_TOGGLE, BONE_HIDDEN_P, 0, ICON_HIDE_ON,
+ block, UI_BTYPE_ICON_TOGGLE, BONE_HIDDEN_P, 0, ICON_HIDE_OFF,
(int)(ar->v2d.cur.xmax - OL_TOG_RESTRICT_VIEWX), te->ys, UI_UNIT_X,
UI_UNIT_Y, &(bone->flag), 0, 0, 0, 0,
TIP_("Restrict/Allow visibility in the 3D View"));
@@ -582,7 +582,7 @@ static void outliner_draw_restrictbuts(
UI_but_drawflag_enable(bt, UI_BUT_ICON_REVERSE);
bt = uiDefIconButBitI(
- block, UI_BTYPE_ICON_TOGGLE, BONE_UNSELECTABLE, 0, ICON_RESTRICT_SELECT_ON,
+ block, UI_BTYPE_ICON_TOGGLE, BONE_UNSELECTABLE, 0, ICON_RESTRICT_SELECT_OFF,
(int)(ar->v2d.cur.xmax - OL_TOG_RESTRICT_SELECTX), te->ys, UI_UNIT_X,
UI_UNIT_Y, &(bone->flag), 0, 0, 0, 0,
TIP_("Restrict/Allow selection in the 3D View"));
@@ -594,7 +594,7 @@ static void outliner_draw_restrictbuts(
EditBone *ebone = (EditBone *)te->directdata;
bt = uiDefIconButBitI(
- block, UI_BTYPE_ICON_TOGGLE, BONE_HIDDEN_A, 0, ICON_RESTRICT_VIEW_ON,
+ block, UI_BTYPE_ICON_TOGGLE, BONE_HIDDEN_A, 0, ICON_RESTRICT_VIEW_OFF,
(int)(ar->v2d.cur.xmax - OL_TOG_RESTRICT_VIEWX), te->ys, UI_UNIT_X,
UI_UNIT_Y, &(ebone->flag), 0, 0, 0, 0,
TIP_("Restrict/Allow visibility in the 3D View"));
@@ -603,7 +603,7 @@ static void outliner_draw_restrictbuts(
UI_but_drawflag_enable(bt, UI_BUT_ICON_REVERSE);
bt = uiDefIconButBitI(
- block, UI_BTYPE_ICON_TOGGLE, BONE_UNSELECTABLE, 0, ICON_RESTRICT_SELECT_ON,
+ block, UI_BTYPE_ICON_TOGGLE, BONE_UNSELECTABLE, 0, ICON_RESTRICT_SELECT_OFF,
(int)(ar->v2d.cur.xmax - OL_TOG_RESTRICT_SELECTX), te->ys, UI_UNIT_X,
UI_UNIT_Y, &(ebone->flag), 0, 0, 0, 0,
TIP_("Restrict/Allow selection in the 3D View"));
@@ -615,7 +615,7 @@ static void outliner_draw_restrictbuts(
bGPDlayer *gpl = (bGPDlayer *)te->directdata;
bt = uiDefIconButBitS(
- block, UI_BTYPE_ICON_TOGGLE, GP_LAYER_HIDE, 0, ICON_HIDE_ON,
+ block, UI_BTYPE_ICON_TOGGLE, GP_LAYER_HIDE, 0, ICON_HIDE_OFF,
(int)(ar->v2d.cur.xmax - OL_TOG_RESTRICT_VIEWX), te->ys, UI_UNIT_X,
UI_UNIT_Y, &gpl->flag, 0, 0, 0, 0,
TIP_("Restrict/Allow visibility in the 3D View"));
@@ -642,7 +642,7 @@ static void outliner_draw_restrictbuts(
{
if (lc && (lc->runtime_flag & LAYER_COLLECTION_HAS_ENABLED_OBJECTS)) {
bt = uiDefIconButBitS(
- block, UI_BTYPE_ICON_TOGGLE_N, LAYER_COLLECTION_HAS_VISIBLE_OBJECTS, 0, ICON_HIDE_ON,
+ block, UI_BTYPE_ICON_TOGGLE_N, LAYER_COLLECTION_HAS_VISIBLE_OBJECTS, 0, ICON_HIDE_OFF,
(int)(ar->v2d.cur.xmax - OL_TOG_HIDEX), te->ys, UI_UNIT_X,
UI_UNIT_Y, &lc->runtime_flag, 0, 0, 0, 0,
TIP_("Hide collection in viewport (Ctrl to isolate)"));
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index f3d3327da78..8728f0634da 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -301,7 +301,7 @@ static void rna_def_dopesheet(BlenderRNA *brna)
prop = RNA_def_property(srna, "show_only_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_ONLYSEL);
RNA_def_property_ui_text(prop, "Only Selected", "Only include channels relating to selected objects and data");
- RNA_def_property_ui_icon(prop, ICON_RESTRICT_SELECT_ON, 0);
+ RNA_def_property_ui_icon(prop, ICON_RESTRICT_SELECT_OFF, 0);
RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
prop = RNA_def_property(srna, "show_hidden", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_collection.c b/source/blender/makesrna/intern/rna_collection.c
index e828c1320e5..57084d1b187 100644
--- a/source/blender/makesrna/intern/rna_collection.c
+++ b/source/blender/makesrna/intern/rna_collection.c
@@ -359,21 +359,21 @@ void RNA_def_collections(BlenderRNA *brna)
prop = RNA_def_property(srna, "hide_select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", COLLECTION_RESTRICT_SELECT);
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC);
- RNA_def_property_ui_icon(prop, ICON_RESTRICT_SELECT_ON, -1);
+ RNA_def_property_ui_icon(prop, ICON_RESTRICT_SELECT_OFF, -1);
RNA_def_property_ui_text(prop, "Disable Select", "Disable collection for viewport selection");
RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_Collection_flag_update");
prop = RNA_def_property(srna, "hide_viewport", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", COLLECTION_RESTRICT_VIEW);
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC);
- RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_ON, -1);
+ RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, -1);
RNA_def_property_ui_text(prop, "Disable Viewport", "Disable collection in viewport");
RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_Collection_flag_update");
prop = RNA_def_property(srna, "hide_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", COLLECTION_RESTRICT_RENDER);
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC);
- RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_ON, -1);
+ RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, -1);
RNA_def_property_ui_text(prop, "Disable Render", "Disable collection in renders");
RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_Collection_flag_update");
}
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 72ce5e86cf8..470694352f9 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -1144,7 +1144,7 @@ static void rna_def_gpencil_layer(BlenderRNA *brna)
/* Flags */
prop = RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_HIDE);
- RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_ON, -1);
+ RNA_def_property_ui_icon(prop, ICON_HIDE_OFF, -1);
RNA_def_property_ui_text(prop, "Hide", "Set layer Visibility");
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
diff --git a/sou
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list