BGE: Add icons to collision shapes.

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
This commit is contained in:
Thomas Szepe 2015-10-11 14:32:20 +02:00
parent 2247ebe16e
commit cdb8bf0c96
6 changed files with 59 additions and 9 deletions

View File

@ -30937,6 +30937,26 @@
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"
@ -91924,6 +91944,36 @@
</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"

Before

Width:  |  Height:  |  Size: 4.4 MiB

After

Width:  |  Height:  |  Size: 4.4 MiB

View 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)

View 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}
};

View 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",