UI: Add Icons for Edge/Vertex Crease and others
Edge and Vertex marks such as Crease, Bevel Weight, Seam, Sharp, have specific use cases and colors assigned to them that users get familiar with over time. It can be hard to remember which color belong to what, this PR tries to address this by introducing colored icons that follow the theme setting for that edge mark/flag. See PR for details and screenshots. Pull Request: https://projects.blender.org/blender/blender/pulls/144075
This commit is contained in:
committed by
Pablo Vazquez
parent
28e59d3e36
commit
840310f607
1
release/datafiles/icons_svg/edge_bevel.svg
Normal file
1
release/datafiles/icons_svg/edge_bevel.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg height="1600" viewBox="0 0 1500 1600" width="1500" xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"><sodipodi:namedview pagecolor="#303030" showgrid="true"><inkscape:grid id="grid5" units="px" spacingx="100" spacingy="100" color="#4772b3" opacity="0.2" visible="true" /></sodipodi:namedview><g enable-background="new" transform="matrix(0 -100 -100 0 19302.143 4198.242)"><g id="blender_bevel_weight" fill="#fff"><path d="m27.486328 183.01367c-.276131.00003-.499972.22387-.5.5v2c.000028.27613.223869.49997.5.5h9c.276131-.00003.499972-.22387.5-.5v-2c-.000028-.27613-.223869-.49997-.5-.5z" fill-rule="evenodd"/></g><g id="blender_text" fill="#fff"><path d="m31.478516 179.02148c-.1326.00003-.259761.0527-.353516.14649l-1.992188 1.99219c-.490839.47125.235779 1.19787.707032.70703l1.845703-1.84571h8.292969v8.29297l-2.707032 2.70703h-8.292968l.0072-4.00727-1-.002-.0072 4.50727c-.0011.27689.223106.50192.5.50195h9c.132599-.00002.259759-.0527.353515-.14648l3-3c.09377-.0938.14646-.22092.146485-.35352v-9c-.000028-.27613-.223869-.49997-.5-.5z" opacity=".6"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
1
release/datafiles/icons_svg/edge_crease.svg
Normal file
1
release/datafiles/icons_svg/edge_crease.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg height="1600" viewBox="0 0 1500 1600" width="1500" xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"><sodipodi:namedview pagecolor="#303030" showgrid="true"><inkscape:grid id="grid5" units="px" spacingx="100" spacingy="100" color="#4772b3" opacity="0.2" visible="true" /></sodipodi:namedview><g enable-background="new" transform="matrix(0 -100 -100 0 19302.143 4198.242)"><g id="blender_mesh_crease" fill="#fff"><path d="m27.486328 183.01367c-.276131.00003-.499972.22387-.5.5v2c.000028.27613.223869.49997.5.5h9c.276131-.00003.499972-.22387.5-.5v-2c-.000028-.27613-.223869-.49997-.5-.5z" fill-rule="evenodd"/></g><g id="blender_text" fill="#fff"><path d="m31.478516 179.02148c-.1326.00003-.259761.0527-.353516.14649l-1.992188 1.99219c-.490839.47125.235779 1.19787.707032.70703l1.845703-1.84571h8.292969v8.29297l-2.707032 2.70703h-8.292968l.0072-4.00727-1-.002-.0072 4.50727c-.0011.27689.223106.50192.5.50195h9c.132599-.00002.259759-.0527.353515-.14648l3-3c.09377-.0938.14646-.22092.146485-.35352v-9c-.000028-.27613-.223869-.49997-.5-.5z" opacity=".6"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
1
release/datafiles/icons_svg/edge_seam.svg
Normal file
1
release/datafiles/icons_svg/edge_seam.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg height="1600" viewBox="0 0 1500 1600" width="1500" xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"><sodipodi:namedview pagecolor="#303030" showgrid="true"><inkscape:grid id="grid5" units="px" spacingx="100" spacingy="100" color="#4772b3" opacity="0.2" visible="true" /></sodipodi:namedview><g enable-background="new" transform="matrix(0 -100 -100 0 19302.143 4198.242)"><g id="blender_edge_seam" fill="#fff"><path d="m27.486328 183.01367c-.276131.00003-.499972.22387-.5.5v2c.000028.27613.223869.49997.5.5h9c.276131-.00003.499972-.22387.5-.5v-2c-.000028-.27613-.223869-.49997-.5-.5z" fill-rule="evenodd"/></g><g id="blender_text" fill="#fff"><path d="m31.478516 179.02148c-.1326.00003-.259761.0527-.353516.14649l-1.992188 1.99219c-.490839.47125.235779 1.19787.707032.70703l1.845703-1.84571h8.292969v8.29297l-2.707032 2.70703h-8.292968l.0072-4.00727-1-.002-.0072 4.50727c-.0011.27689.223106.50192.5.50195h9c.132599-.00002.259759-.0527.353515-.14648l3-3c.09377-.0938.14646-.22092.146485-.35352v-9c-.000028-.27613-.223869-.49997-.5-.5z" opacity=".6"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
1
release/datafiles/icons_svg/edge_sharp.svg
Normal file
1
release/datafiles/icons_svg/edge_sharp.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg height="1600" viewBox="0 0 1500 1600" width="1500" xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"><sodipodi:namedview pagecolor="#303030" showgrid="true"><inkscape:grid id="grid5" units="px" spacingx="100" spacingy="100" color="#4772b3" opacity="0.2" visible="true" /></sodipodi:namedview><g enable-background="new" transform="matrix(0 -100 -100 0 19302.143 4198.242)"><g id="blender_edge_sharp" fill="#fff"><path d="m27.486328 183.01367c-.276131.00003-.499972.22387-.5.5v2c.000028.27613.223869.49997.5.5h9c.276131-.00003.499972-.22387.5-.5v-2c-.000028-.27613-.223869-.49997-.5-.5z" fill-rule="evenodd"/></g><g id="blender_text" fill="#fff"><path id="blender_text" d="m31.478516 179.02148c-.1326.00003-.259761.0527-.353516.14649l-1.992188 1.99219c-.490839.47125.235779 1.19787.707032.70703l1.845703-1.84571h8.292969v8.29297l-2.707032 2.70703h-8.292968l.0072-4.00727-1-.002-.0072 4.50727c-.0011.27689.223106.50192.5.50195h9c.132599-.00002.259759-.0527.353515-.14648l3-3c.09377-.0938.14646-.22092.146485-.35352v-9c-.000028-.27613-.223869-.49997-.5-.5z" opacity=".6"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
1
release/datafiles/icons_svg/vertex_crease.svg
Normal file
1
release/datafiles/icons_svg/vertex_crease.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg height="1500" viewBox="0 0 1600 1500" width="1600" xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"><sodipodi:namedview pagecolor="#303030" showgrid="true"><inkscape:grid id="grid5" units="px" spacingx="100" spacingy="100" color="#4772b3" opacity="0.2" visible="true" /></sodipodi:namedview><g enable-background="new" transform="matrix(100 0 0 100 -498.9259 -17801.362)"><g id="blender_text" fill="#fff"><path d="m10.486328 179.01367c-.1326.00003-.259761.0527-.353516.14649l-1.9941401 1.99414c-.4908663.47125.2357781 1.1979.7070312.70703l1.8476559-1.84766h8.292969v8.29297l-2.707031 2.70703h-8.2910158l.00461-3.00655-1-.002-.00656 3.5085c.0000276.27613.2238691.49997.5.5h8.9999998c.132599-.00002.259759-.0527.353516-.14648l3-3c.09377-.0938.14646-.22092.146484-.35352v-9c-.000028-.27613-.223869-.49997-.5-.5z" opacity=".6"/></g><g id="blender_mesh_crease" fill="#fff"><path d="m6.4921875 183.00781c-.2761309.00003-.4999724.22387-.5.5v3c.0000276.27613.2238691.49997.5.5h3c.2761309-.00003.4999724-.22387.5-.5v-3c-.0000276-.27613-.2238691-.49997-.5-.5z" fill-rule="evenodd"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -460,7 +460,7 @@ class IMAGE_MT_uvs(Menu):
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("uv.mark_seam").clear = False
|
||||
layout.operator("uv.mark_seam", icon="ICON_EDGE_SEAM").clear = False
|
||||
layout.operator("uv.mark_seam", text="Clear Seam").clear = True
|
||||
layout.operator("uv.seams_from_islands")
|
||||
|
||||
|
||||
@@ -1440,7 +1440,7 @@ class VIEW3D_MT_uv_map(Menu):
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("mesh.mark_seam").clear = False
|
||||
layout.operator("mesh.mark_seam", icon="EDGE_SEAM").clear = False
|
||||
layout.operator("mesh.mark_seam", text="Clear Seam").clear = True
|
||||
|
||||
layout.separator()
|
||||
@@ -4566,7 +4566,7 @@ class VIEW3D_MT_edit_mesh_context_menu(Menu):
|
||||
|
||||
col.separator()
|
||||
|
||||
col.operator("transform.vert_crease")
|
||||
col.operator("transform.vert_crease", icon="VERTEX_CREASE")
|
||||
|
||||
col.separator()
|
||||
|
||||
@@ -4618,17 +4618,17 @@ class VIEW3D_MT_edit_mesh_context_menu(Menu):
|
||||
col.separator()
|
||||
|
||||
# Edge Flags
|
||||
col.operator("transform.edge_crease")
|
||||
col.operator("transform.edge_bevelweight")
|
||||
col.operator("transform.edge_bevelweight", icon='EDGE_BEVEL')
|
||||
col.operator("transform.edge_crease", icon='EDGE_CREASE')
|
||||
|
||||
col.separator()
|
||||
|
||||
col.operator("mesh.mark_seam").clear = False
|
||||
col.operator("mesh.mark_seam", icon="EDGE_SEAM").clear = False
|
||||
col.operator("mesh.mark_seam", text="Clear Seam").clear = True
|
||||
|
||||
col.separator()
|
||||
|
||||
col.operator("mesh.mark_sharp")
|
||||
col.operator("mesh.mark_sharp", icon="EDGE_SHARP").clear = False
|
||||
col.operator("mesh.mark_sharp", text="Clear Sharp").clear = True
|
||||
col.operator("mesh.set_sharpness_by_angle")
|
||||
|
||||
@@ -4774,7 +4774,7 @@ class VIEW3D_MT_edit_mesh_vertices(Menu):
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("transform.vert_crease")
|
||||
layout.operator("transform.vert_crease", icon="VERTEX_CREASE")
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -4828,17 +4828,17 @@ class VIEW3D_MT_edit_mesh_edges(Menu):
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("transform.edge_crease")
|
||||
layout.operator("transform.edge_bevelweight")
|
||||
layout.operator("transform.edge_bevelweight", icon="EDGE_BEVEL")
|
||||
layout.operator("transform.edge_crease", icon="EDGE_CREASE")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("mesh.mark_seam").clear = False
|
||||
layout.operator("mesh.mark_seam", icon="EDGE_SEAM").clear = False
|
||||
layout.operator("mesh.mark_seam", text="Clear Seam").clear = True
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("mesh.mark_sharp")
|
||||
layout.operator("mesh.mark_sharp", icon="EDGE_SHARP")
|
||||
layout.operator("mesh.mark_sharp", text="Clear Sharp").clear = True
|
||||
|
||||
layout.operator("mesh.mark_sharp", text="Mark Sharp from Vertices").use_verts = True
|
||||
@@ -7187,7 +7187,7 @@ class VIEW3D_PT_overlay_edit_mesh(Panel):
|
||||
bl_space_type = 'VIEW_3D'
|
||||
bl_region_type = 'HEADER'
|
||||
bl_label = "Mesh Edit Mode"
|
||||
bl_ui_units_x = 12
|
||||
bl_ui_units_x = 14
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
@@ -7207,6 +7207,19 @@ class VIEW3D_PT_overlay_edit_mesh(Panel):
|
||||
col = layout.column()
|
||||
col.active = display_all
|
||||
|
||||
row = col.row(align=True)
|
||||
row.prop(overlay, "show_edge_bevel_weight", text="Bevel", icon="EDGE_BEVEL", toggle=True)
|
||||
row.prop(overlay, "show_edge_crease", text="Crease", icon="EDGE_CREASE", toggle=True)
|
||||
row.prop(overlay, "show_edge_seams", text="Seam", icon="EDGE_SEAM", toggle=True)
|
||||
row.prop(
|
||||
overlay,
|
||||
"show_edge_sharp",
|
||||
text="Sharp",
|
||||
icon="EDGE_SHARP",
|
||||
text_ctxt=i18n_contexts.plural,
|
||||
toggle=True)
|
||||
|
||||
col.separator()
|
||||
split = col.split()
|
||||
|
||||
sub = split.column()
|
||||
@@ -7215,13 +7228,6 @@ class VIEW3D_PT_overlay_edit_mesh(Panel):
|
||||
sub.active = is_any_solid_shading
|
||||
sub.prop(overlay, "show_face_center", text="Center")
|
||||
|
||||
row = col.row(align=True)
|
||||
row.prop(overlay, "show_edge_crease", text="Creases", toggle=True)
|
||||
row.prop(overlay, "show_edge_sharp", text="Sharp", text_ctxt=i18n_contexts.plural, toggle=True)
|
||||
row.prop(overlay, "show_edge_bevel_weight", text="Bevel", toggle=True)
|
||||
row.prop(overlay, "show_edge_seams", text="Seams", toggle=True)
|
||||
|
||||
col.separator()
|
||||
col.prop(overlay, "show_extra_indices", text="Indices")
|
||||
|
||||
|
||||
|
||||
@@ -317,6 +317,10 @@ if(WITH_BLENDER)
|
||||
driver_transform
|
||||
duplicate
|
||||
edgesel
|
||||
edge_bevel
|
||||
edge_crease
|
||||
edge_seam
|
||||
edge_sharp
|
||||
editmode_hlt
|
||||
empty_arrows
|
||||
empty_axis
|
||||
@@ -901,6 +905,7 @@ if(WITH_BLENDER)
|
||||
uv_sync_select
|
||||
uv_vertexsel
|
||||
vertexsel
|
||||
vertex_crease
|
||||
view3d
|
||||
viewzoom
|
||||
view_camera
|
||||
|
||||
@@ -630,6 +630,10 @@ DEF_ICON(SOLO_ON)
|
||||
DEF_ICON(CENTER_ONLY)
|
||||
DEF_ICON(CURSOR)
|
||||
DEF_ICON(EDGESEL)
|
||||
DEF_ICON_COLOR(EDGE_BEVEL)
|
||||
DEF_ICON_COLOR(EDGE_CREASE)
|
||||
DEF_ICON_COLOR(EDGE_SEAM)
|
||||
DEF_ICON_COLOR(EDGE_SHARP)
|
||||
DEF_ICON(FACE_CORNER)
|
||||
DEF_ICON(FACESEL)
|
||||
DEF_ICON(INVERSESQUARECURVE)
|
||||
@@ -653,6 +657,7 @@ DEF_ICON(SHARPCURVE)
|
||||
DEF_ICON(SMOOTHCURVE)
|
||||
DEF_ICON(SPHERECURVE)
|
||||
DEF_ICON(VERTEXSEL)
|
||||
DEF_ICON_COLOR(VERTEX_CREASE)
|
||||
|
||||
/* SNAPPING */
|
||||
DEF_ICON(SNAP_EDGE)
|
||||
|
||||
@@ -1548,6 +1548,10 @@ static void svg_replace_color_attributes(std::string &svg,
|
||||
{"blender_tool_transform", tool_transform},
|
||||
{"blender_tool_white", tool_white},
|
||||
{"blender_tool_red", tool_red},
|
||||
{"blender_bevel_weight", nullptr, TH_EDGE_BEVEL},
|
||||
{"blender_mesh_crease", nullptr, TH_EDGE_CREASE},
|
||||
{"blender_edge_seam", nullptr, TH_EDGE_SEAM},
|
||||
{"blender_edge_sharp", nullptr, TH_EDGE_SHARP},
|
||||
};
|
||||
|
||||
for (const ColorItem &item : items) {
|
||||
|
||||
@@ -405,17 +405,17 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
|
||||
case TH_EDGE_MODE_SELECT:
|
||||
cp = ts->edge_mode_select;
|
||||
break;
|
||||
case TH_EDGE_SEAM:
|
||||
cp = ts->edge_seam;
|
||||
break;
|
||||
case TH_EDGE_SHARP:
|
||||
cp = ts->edge_sharp;
|
||||
case TH_EDGE_BEVEL:
|
||||
cp = btheme->space_view3d.edge_bevel;
|
||||
break;
|
||||
case TH_EDGE_CREASE:
|
||||
cp = ts->edge_crease;
|
||||
cp = btheme->space_view3d.edge_crease;
|
||||
break;
|
||||
case TH_EDGE_BEVEL:
|
||||
cp = ts->edge_bevel;
|
||||
case TH_EDGE_SEAM:
|
||||
cp = btheme->space_view3d.edge_seam;
|
||||
break;
|
||||
case TH_EDGE_SHARP:
|
||||
cp = btheme->space_view3d.edge_sharp;
|
||||
break;
|
||||
case TH_EDITMESH_ACTIVE:
|
||||
cp = ts->editmesh_active;
|
||||
|
||||
@@ -2424,23 +2424,23 @@ static void rna_def_userdef_theme_spaces_edge(StructRNA *srna)
|
||||
prop = RNA_def_property(srna, "edge_seam", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_array(prop, 3);
|
||||
RNA_def_property_ui_text(prop, "Edge Seam", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_gpu_update");
|
||||
|
||||
prop = RNA_def_property(srna, "edge_sharp", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_array(prop, 3);
|
||||
RNA_def_property_ui_text(prop, "Edge Sharp", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_gpu_update");
|
||||
|
||||
prop = RNA_def_property(srna, "edge_crease", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_array(prop, 3);
|
||||
RNA_def_property_ui_text(prop, "Edge Crease", "");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_WINDOWMANAGER);
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_gpu_update");
|
||||
|
||||
prop = RNA_def_property(srna, "edge_bevel", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_array(prop, 3);
|
||||
RNA_def_property_ui_text(prop, "Edge Bevel", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_gpu_update");
|
||||
|
||||
prop = RNA_def_property(srna, "edge_facesel", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_array(prop, 3);
|
||||
|
||||
Reference in New Issue
Block a user