BGE: Add icons to collision shapes.
authorThomas Szepe <HG1_public@gmx.net>
Sun, 11 Oct 2015 12:32:20 +0000 (14:32 +0200)
committerThomas Szepe <HG1_public@gmx.net>
Sun, 11 Oct 2015 12:32:20 +0000 (14:32 +0200)
This patch adds icons to the physic collision shapes.
Adding a new capsule shape 'mesh_capsule' icon which represent the shape better then the metaballs icon.
And replace the metaballs icon for the Blender collision shape.

{F206628}

Reviewers: moguri, sybren, agoose77, lordloki, mont29, panzergame, campbellbarton

Reviewed By: lordloki, panzergame, campbellbarton

Projects: #game_engine, #game_ui, #user_interface

Differential Revision: https://developer.blender.org/D1403

release/datafiles/blender_icons.svg
release/datafiles/blender_icons16/icon16_mesh_capsule.dat [new file with mode: 0644]
release/datafiles/blender_icons32/icon32_mesh_capsule.dat [new file with mode: 0644]
source/blender/editors/include/UI_icons.h
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_rigidbody.c

index 1923b93577aa165f401ca42f515c7b6c62747c50..40b974661fac4ec3d9f4c1b22ea75a7ee79ada47 100644 (file)
        fx="139"
        fy="137.5"
        r="7" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1610"
+       id="linearGradient31208"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-41,98)"
+       x1="-170.25"
+       y1="65.5"
+       x2="-181.375"
+       y2="65.5" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient319"
+       id="linearGradient31210"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2857143,0,0,0.787037,-92.714287,177.80092)"
+       x1="-101"
+       y1="-16"
+       x2="-93.75"
+       y2="-16.264704" />
   </defs>
   <sodipodi:namedview
      id="base"
         </g>
       </g>
     </g>
+    <g
+       style="display:inline;enable-background:new"
+       id="ICON_MESH_CAPSULE"
+       transform="matrix(0.86967262,0,0,0.81949894,414.30767,262.03112)">
+      <rect
+         y="155"
+         x="-228"
+         height="16"
+         width="16"
+         id="rect41297-1"
+         style="display:inline;overflow:visible;visibility:visible;opacity:0;fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;enable-background:accumulate" />
+      <path
+         sodipodi:nodetypes="cccsccc"
+         id="path41299-4"
+         d="m -220,154.54901 c -3.036,0 -5.49999,3.07099 -5.49999,4.45099 l -1e-5,9 c 0,1.38 2.46399,4.41118 5.49999,4.41118 3.036,0 5.5,-3.03118 5.5,-4.41118 l 1e-5,-9 c 0,-1.38 -2.464,-4.45099 -5.5,-4.45099 z"
+         style="display:inline;overflow:visible;visibility:visible;fill:url(#linearGradient31208);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;enable-background:accumulate"
+         inkscape:connector-curvature="0" />
+      <path
+         style="display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:7.40000248;stroke-opacity:1;marker:none;enable-background:accumulate"
+         d="m -220,154.19066 c -3.49999,0 -5.36123,3.42934 -5.36123,4.80934 l -1e-5,8.5 c 0,2 2.32523,5.30934 5.36123,5.30934 3.036,0 5.36125,-3.30934 5.36125,-5.30934 l 0,-8.5 c 0,-1.38 -1.86123,-4.80934 -5.36124,-4.80934 z"
+         id="path41305-2"
+         sodipodi:nodetypes="cccsccc"
+         inkscape:connector-curvature="0" />
+      <path
+         style="display:inline;overflow:visible;visibility:visible;fill:none;stroke:url(#linearGradient31210);stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:7.40000248;stroke-opacity:1;marker:none;enable-background:accumulate"
+         d="m -224.5,160.5 0,6.5 c 0,0.9838 0.60816,4.76952 4.46531,4.76952 3.85714,0 4.53469,-3.78572 4.53469,-4.76952 l 0,-6.5 c 0,0 0.43828,-5.18967 -4.47408,-5.25396 C -224.88644,155.18174 -224.5,160.5 -224.5,160.5 Z"
+         id="path41307-2"
+         sodipodi:nodetypes="ccsccsc"
+         inkscape:connector-curvature="0" />
+    </g>
   </g>
   <g
      inkscape:groupmode="layer"
diff --git a/release/datafiles/blender_icons16/icon16_mesh_capsule.dat b/release/datafiles/blender_icons16/icon16_mesh_capsule.dat
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/release/datafiles/blender_icons32/icon32_mesh_capsule.dat b/release/datafiles/blender_icons32/icon32_mesh_capsule.dat
new file mode 100644 (file)
index 0000000..e69de29
index e6421b0de41d3fa6e5d8a99633d96f3dee0ee33e..286235e95eb21f6723ecd6ef278760fdc33bc691 100644 (file)
@@ -374,8 +374,8 @@ DEF_ICON(MESH_MONKEY)
 DEF_ICON(MESH_CYLINDER)
 DEF_ICON(MESH_TORUS)
 DEF_ICON(MESH_CONE)
+DEF_ICON(MESH_CAPSULE)
 #ifndef DEF_ICON_BLANK_SKIP
-       DEF_ICON(BLANK610)
        DEF_ICON(BLANK611)
 #endif
 DEF_ICON(LAMP_POINT)
index 54f1798b10cd9a23b4685bb5ee1a63e80e2ddf9e..e2d3db2335e29ce802d3070a67a16d156caa285e 100644 (file)
@@ -107,13 +107,13 @@ static EnumPropertyItem dupli_items[] = {
 #endif
 
 static EnumPropertyItem collision_bounds_items[] = {
-       {OB_BOUND_BOX, "BOX", 0, "Box", ""},
-       {OB_BOUND_SPHERE, "SPHERE", 0, "Sphere", ""},
-       {OB_BOUND_CYLINDER, "CYLINDER", 0, "Cylinder", ""},
-       {OB_BOUND_CONE, "CONE", 0, "Cone", ""},
-       {OB_BOUND_CONVEX_HULL, "CONVEX_HULL", 0, "Convex Hull", ""},
-       {OB_BOUND_TRIANGLE_MESH, "TRIANGLE_MESH", 0, "Triangle Mesh", ""},
-       {OB_BOUND_CAPSULE, "CAPSULE", 0, "Capsule", ""},
+       {OB_BOUND_BOX, "BOX", ICON_MESH_CUBE, "Box", ""},
+       {OB_BOUND_SPHERE, "SPHERE", ICON_MESH_UVSPHERE, "Sphere", ""},
+       {OB_BOUND_CYLINDER, "CYLINDER", ICON_MESH_CYLINDER, "Cylinder", ""},
+       {OB_BOUND_CONE, "CONE", ICON_MESH_CONE, "Cone", ""},
+       {OB_BOUND_CONVEX_HULL, "CONVEX_HULL", ICON_MESH_ICOSPHERE, "Convex Hull", ""},
+       {OB_BOUND_TRIANGLE_MESH, "TRIANGLE_MESH", ICON_MESH_MONKEY, "Triangle Mesh", ""},
+       {OB_BOUND_CAPSULE, "CAPSULE", ICON_MESH_CAPSULE, "Capsule", ""},
        /*{OB_DYN_MESH, "DYNAMIC_MESH", 0, "Dynamic Mesh", ""}, */
        {0, NULL, 0, NULL, NULL}
 };
index 58a12f6264462d1713d9cf5c819fad7f3c669f4f..395cb7c443d308695bf6bcb7ffea6044ec03674c 100644 (file)
@@ -53,7 +53,7 @@ EnumPropertyItem rigidbody_object_type_items[] = {
 EnumPropertyItem rigidbody_object_shape_items[] = {
        {RB_SHAPE_BOX, "BOX", ICON_MESH_CUBE, "Box", "Box-like shapes (i.e. cubes), including planes (i.e. ground planes)"},
        {RB_SHAPE_SPHERE, "SPHERE", ICON_MESH_UVSPHERE, "Sphere", ""},
-       {RB_SHAPE_CAPSULE, "CAPSULE", ICON_OUTLINER_OB_META, "Capsule", ""},
+       {RB_SHAPE_CAPSULE, "CAPSULE", ICON_MESH_CAPSULE, "Capsule", ""},
        {RB_SHAPE_CYLINDER, "CYLINDER", ICON_MESH_CYLINDER, "Cylinder", ""},
        {RB_SHAPE_CONE, "CONE", ICON_MESH_CONE, "Cone", ""},
        {RB_SHAPE_CONVEXH, "CONVEX_HULL", ICON_MESH_ICOSPHERE, "Convex Hull",