Add icon for incremental grid snapping
authorJulian Eisel <eiseljulian@gmail.com>
Sat, 5 Sep 2015 21:02:54 +0000 (23:02 +0200)
committerJulian Eisel <eiseljulian@gmail.com>
Sat, 5 Sep 2015 21:36:52 +0000 (23:36 +0200)
As decided in D910, we use a new icon for incremental grid snapping and use its old one for absolute grid snapping.

This also touches the library_data_broken icon .dat files, seems some changes on its .svg entry landed in upstream without updating the other icon files (already noticed this when committing icon for auto-offset, but removed it from commit - leaving it in now to avoid further confusion)

Icon by @plyczkowski (made a tiny edit as it looked a bit blurry in 16x16). Thx!

release/datafiles/blender_icons.svg
release/datafiles/blender_icons16/icon16_library_data_broken.dat
release/datafiles/blender_icons16/icon16_snap_grid.dat [new file with mode: 0644]
release/datafiles/blender_icons16/icon16_snap_increment.dat
release/datafiles/blender_icons32/icon32_library_data_broken.dat
release/datafiles/blender_icons32/icon32_snap_grid.dat [new file with mode: 0644]
release/datafiles/blender_icons32/icon32_snap_increment.dat
source/blender/editors/include/UI_icons.h
source/blender/makesrna/intern/rna_scene.c

index 94784a7378200e436d1fd69797f3d7e21c15043d..1923b93577aa165f401ca42f515c7b6c62747c50 100644 (file)
          offset="1"
          id="stop16000-1" />
     </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient16023"
+       id="radialGradient16031"
+       cx="139"
+       cy="137.5"
+       fx="139"
+       fy="137.5"
+       r="7"
+       gradientTransform="matrix(1.9285714,0,0,0.5,-129.07143,68.75)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient16023">
+      <stop
+         style="stop-color:#d8d8d8;stop-opacity:1"
+         offset="0"
+         id="stop16025" />
+      <stop
+         style="stop-color:#9a9a9a;stop-opacity:1"
+         offset="1"
+         id="stop16027" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient16023"
+       id="radialGradient14148"
+       cx="139"
+       cy="137.5"
+       fx="139"
+       fy="137.5"
+       r="7"
+       gradientTransform="matrix(1.9285714,0,0,0.5,-129.07143,68.75)"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient16023"
+       id="radialGradient14156"
+       cx="139"
+       cy="137.5"
+       fx="139"
+       fy="137.5"
+       r="7"
+       gradientTransform="matrix(1.9285714,0,0,0.5,-129.07143,68.75)"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient16023"
+       id="radialGradient14164"
+       cx="139"
+       cy="137.5"
+       fx="139"
+       fy="137.5"
+       r="7"
+       gradientTransform="matrix(1.9285714,0,0,0.5,-129.07143,68.75)"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient16023"
+       id="radialGradient14172"
+       cx="139"
+       cy="137.5"
+       fx="139"
+       fy="137.5"
+       r="7"
+       gradientTransform="matrix(1.9285714,0,0,0.5,-129.07143,68.75)"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient16023"
+       id="radialGradient14180"
+       cx="139"
+       cy="137.5"
+       fx="139"
+       fy="137.5"
+       r="7"
+       gradientTransform="matrix(1.9285714,0,0,0.5,-129.07143,68.75)"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient15984"
+       id="radialGradient15990"
+       cx="139"
+       cy="137.5"
+       fx="139"
+       fy="137.5"
+       r="1"
+       gradientTransform="matrix(14.5,0,0,5.5,-1876.5,-618.75)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient15984">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0"
+         id="stop15986" />
+      <stop
+         style="stop-color:#a8cafb;stop-opacity:1"
+         offset="1"
+         id="stop15988" />
+    </linearGradient>
+    <radialGradient
+       r="7"
+       fy="137.5"
+       fx="139"
+       cy="137.5"
+       cx="139"
+       gradientTransform="matrix(1.9285714,0,0,0.5,-129.07143,68.75)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient14206"
+       xlink:href="#linearGradient16023"
+       inkscape:collect="always" />
+    <radialGradient
+       r="7"
+       fy="137.5"
+       fx="139"
+       cy="137.5"
+       cx="139"
+       gradientTransform="matrix(1.9285714,0,0,0.5,-129.07143,68.75)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient14208"
+       xlink:href="#linearGradient16023"
+       inkscape:collect="always" />
+    <radialGradient
+       r="7"
+       fy="137.5"
+       fx="139"
+       cy="137.5"
+       cx="139"
+       gradientTransform="matrix(1.9285714,0,0,0.5,-129.07143,68.75)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient14210"
+       xlink:href="#linearGradient16023"
+       inkscape:collect="always" />
+    <radialGradient
+       r="7"
+       fy="137.5"
+       fx="139"
+       cy="137.5"
+       cx="139"
+       gradientTransform="matrix(1.9285714,0,0,0.5,-129.07143,68.75)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient14212"
+       xlink:href="#linearGradient16023"
+       inkscape:collect="always" />
+    <radialGradient
+       r="7"
+       fy="137.5"
+       fx="139"
+       cy="137.5"
+       cx="139"
+       gradientTransform="matrix(1.9285714,0,0,0.5,-129.07143,68.75)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient14214"
+       xlink:href="#linearGradient16023"
+       inkscape:collect="always" />
+    <radialGradient
+       r="1"
+       fy="137.5"
+       fx="139"
+       cy="137.5"
+       cx="139"
+       gradientTransform="matrix(14.5,0,0,5.5,-1876.5,-618.75)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient14216"
+       xlink:href="#linearGradient15984"
+       inkscape:collect="always" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient16023"
+       id="radialGradient16945"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.9285714,0,0,0.5,-129.59176,68.75)"
+       cx="139"
+       cy="137.5"
+       fx="139"
+       fy="137.5"
+       r="7" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient16023"
+       id="radialGradient16947"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.9285714,0,0,0.5,-128.51641,68.75)"
+       cx="139"
+       cy="137.5"
+       fx="139"
+       fy="137.5"
+       r="7" />
   </defs>
   <sodipodi:namedview
      id="base"
              style="opacity:0.51799999;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
              d="m 316.57643,242.95337 c 0,0.33872 -0.26469,0.6133 -0.5912,0.6133 -0.32651,0 -0.5912,-0.27458 -0.5912,-0.6133 0,-0.33872 0.26469,-0.6133 0.5912,-0.6133 0.32651,0 0.5912,0.27458 0.5912,0.6133 z" />
         </g>
+        <g
+           transform="translate(189.00803,-79.37555)"
+           style="display:inline;enable-background:new"
+           id="g14119">
+          <g
+             id="g16949">
+            <rect
+               style="color:#000000;fill:#272727;fill-opacity:1;stroke:none;stroke-width:1.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
+               id="rect15992"
+               width="2"
+               height="7"
+               x="134.47968"
+               y="134"
+               ry="1" />
+            <rect
+               style="color:#000000;fill:#272727;fill-opacity:1;stroke:none;stroke-width:1.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
+               id="rect15994"
+               width="2"
+               height="7"
+               x="141.55502"
+               y="134"
+               ry="1" />
+            <rect
+               ry="1"
+               y="136"
+               x="131.25"
+               height="3"
+               width="15.5"
+               id="rect15926"
+               style="color:#000000;fill:#272727;fill-opacity:1;stroke:none;stroke-width:1.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
+            <rect
+               ry="1"
+               y="132.25"
+               x="131.25"
+               height="10.5"
+               width="2.5"
+               id="rect15930"
+               style="color:#000000;fill:#272727;fill-opacity:1;stroke:none;stroke-width:1.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
+            <rect
+               ry="1"
+               y="132.25"
+               x="144.25"
+               height="10.5"
+               width="2.5"
+               id="rect15938"
+               style="color:#000000;fill:#272727;fill-opacity:1;stroke:none;stroke-width:1.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
+            <g
+               id="g16016-6"
+               style="fill:url(#radialGradient16031);fill-opacity:1">
+              <rect
+                 style="color:#000000;fill:url(#radialGradient14206);fill-opacity:1;stroke:none;stroke-width:1.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
+                 id="rect15946"
+                 width="1"
+                 height="9"
+                 x="132"
+                 y="133"
+                 ry="0.5" />
+              <rect
+                 style="color:#000000;fill:url(#radialGradient14208);fill-opacity:1;stroke:none;stroke-width:1.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
+                 id="rect15946-7"
+                 width="1"
+                 height="9"
+                 x="145"
+                 y="133"
+                 ry="0.5" />
+              <rect
+                 ry="0.5"
+                 y="137"
+                 x="132"
+                 height="1"
+                 width="14"
+                 id="rect15972"
+                 style="color:#000000;fill:url(#radialGradient14210);fill-opacity:1;stroke:none;stroke-width:1.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
+              <rect
+                 ry="1"
+                 y="135"
+                 x="134.97968"
+                 height="5"
+                 width="1"
+                 id="rect15996"
+                 style="color:#000000;fill:url(#radialGradient16945);fill-opacity:1;stroke:none;stroke-width:1.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
+              <rect
+                 ry="1"
+                 y="135"
+                 x="142.05502"
+                 height="5"
+                 width="1"
+                 id="rect15998"
+                 style="color:#000000;fill:url(#radialGradient16947);fill-opacity:1;stroke:none;stroke-width:1.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
+            </g>
+            <rect
+               style="opacity:0.51499999;color:#000000;fill:#0065ff;fill-opacity:1;stroke:none;stroke-width:1.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
+               id="rect15974"
+               width="4"
+               height="11"
+               x="137"
+               y="132"
+               ry="1" />
+            <rect
+               ry="1"
+               y="133"
+               x="138"
+               height="9"
+               width="2"
+               id="rect15944"
+               style="color:#000000;fill:url(#radialGradient14216);fill-opacity:1;stroke:none;stroke-width:1.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
+          </g>
+        </g>
       </g>
     </g>
   </g>
index e0ede6bc0198632cdd6eaa0fa5c4c408d2012536..613fac48c21359aa07f9acd41f0cb8a32b335d51 100644 (file)
Binary files a/release/datafiles/blender_icons16/icon16_library_data_broken.dat and b/release/datafiles/blender_icons16/icon16_library_data_broken.dat differ
diff --git a/release/datafiles/blender_icons16/icon16_snap_grid.dat b/release/datafiles/blender_icons16/icon16_snap_grid.dat
new file mode 100644 (file)
index 0000000..4def9b8
Binary files /dev/null and b/release/datafiles/blender_icons16/icon16_snap_grid.dat differ
index 4def9b8df2ecb1b55f84fb7cdfc2608947538e97..5216afb6d720bbde60e1b35797ef34fffd2b0800 100644 (file)
Binary files a/release/datafiles/blender_icons16/icon16_snap_increment.dat and b/release/datafiles/blender_icons16/icon16_snap_increment.dat differ
index e1ec782d5f4f367b3974ee7273b09038cffed71e..89702a9ff9e44d5b78cb79771e28e0eef92c547b 100644 (file)
Binary files a/release/datafiles/blender_icons32/icon32_library_data_broken.dat and b/release/datafiles/blender_icons32/icon32_library_data_broken.dat differ
diff --git a/release/datafiles/blender_icons32/icon32_snap_grid.dat b/release/datafiles/blender_icons32/icon32_snap_grid.dat
new file mode 100644 (file)
index 0000000..cc4c0ef
Binary files /dev/null and b/release/datafiles/blender_icons32/icon32_snap_grid.dat differ
index cc4c0efe3c4b6ea37af7f865fcb51b414ea3e242..eb88877e3ad1682bc78d63faf600758f01120ec4 100644 (file)
Binary files a/release/datafiles/blender_icons32/icon32_snap_increment.dat and b/release/datafiles/blender_icons32/icon32_snap_increment.dat differ
index 32f45b222aa1169bf485c5551bc821baa1685417..e6421b0de41d3fa6e5d8a99633d96f3dee0ee33e 100644 (file)
@@ -702,14 +702,12 @@ DEF_ICON(MANIPUL)
 DEF_ICON(SNAP_OFF)
 DEF_ICON(SNAP_ON)
 DEF_ICON(SNAP_NORMAL)
-DEF_ICON(SNAP_INCREMENT)
+DEF_ICON(SNAP_GRID)
 DEF_ICON(SNAP_VERTEX)
 DEF_ICON(SNAP_EDGE)
 DEF_ICON(SNAP_FACE)
 DEF_ICON(SNAP_VOLUME)
-#ifndef DEF_ICON_BLANK_SKIP
-       DEF_ICON(BLANK220)
-#endif
+DEF_ICON(SNAP_INCREMENT)
 DEF_ICON(STICKY_UVS_LOC)
 DEF_ICON(STICKY_UVS_DISABLE)
 DEF_ICON(STICKY_UVS_VERT)
index 22e6741b5f63ff2ec4740e2856508678177ce75c..845fed15c4df8fc70e9aeae2d0c5c26712b3797c 100644 (file)
@@ -156,7 +156,7 @@ EnumPropertyItem mesh_select_mode_items[] = {
 };
 
 EnumPropertyItem snap_element_items[] = {
-       {SCE_SNAP_MODE_INCREMENT, "INCREMENT", ICON_ALIGN, "Increment", "Snap to increments of grid"},
+       {SCE_SNAP_MODE_INCREMENT, "INCREMENT", ICON_SNAP_INCREMENT, "Increment", "Snap to increments of grid"},
        {SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices"},
        {SCE_SNAP_MODE_EDGE, "EDGE", ICON_SNAP_EDGE, "Edge", "Snap to edges"},
        {SCE_SNAP_MODE_FACE, "FACE", ICON_SNAP_FACE, "Face", "Snap to faces"},
@@ -165,7 +165,7 @@ EnumPropertyItem snap_element_items[] = {
 };
 
 EnumPropertyItem snap_node_element_items[] = {
-       {SCE_SNAP_MODE_GRID, "GRID", ICON_SNAP_INCREMENT, "Grid", "Snap to grid"},
+       {SCE_SNAP_MODE_GRID, "GRID", ICON_SNAP_GRID, "Grid", "Snap to grid"},
        {SCE_SNAP_MODE_NODE_X, "NODE_X", ICON_SNAP_EDGE, "Node X", "Snap to left/right node border"},
        {SCE_SNAP_MODE_NODE_Y, "NODE_Y", ICON_SNAP_EDGE, "Node Y", "Snap to top/bottom node border"},
        {SCE_SNAP_MODE_NODE_XY, "NODE_XY", ICON_SNAP_EDGE, "Node X / Y", "Snap to any node border"},
@@ -2219,7 +2219,7 @@ static void rna_def_tool_settings(BlenderRNA  *brna)
        RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_ABS_GRID);
        RNA_def_property_ui_text(prop, "Absolute Grid Snap",
                                 "Absolute grid alignment while translating (based on the pivot center)");
-       RNA_def_property_ui_icon(prop, ICON_SNAP_INCREMENT, 0);
+       RNA_def_property_ui_icon(prop, ICON_SNAP_GRID, 0);
        RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
 
        prop = RNA_def_property(srna, "snap_element", PROP_ENUM, PROP_NONE);