]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
Button for default viewing direction 66/3966/1
authorReino Ruusu <reino.ruusu@semantum.fi>
Thu, 5 Mar 2020 09:18:44 +0000 (11:18 +0200)
committerReino Ruusu <reino.ruusu@semantum.fi>
Thu, 5 Mar 2020 09:18:44 +0000 (11:18 +0200)
gitlab #98

Change-Id: I896a1a0a2d5647cbd0563d7a7c4e47180f00cda1

org.simantics.plant3d/icons/xyz-axis.png [new file with mode: 0644]
org.simantics.plant3d/icons/xyz-axis.svg [new file with mode: 0644]
org.simantics.plant3d/plugin.xml

diff --git a/org.simantics.plant3d/icons/xyz-axis.png b/org.simantics.plant3d/icons/xyz-axis.png
new file mode 100644 (file)
index 0000000..a3c0cc4
Binary files /dev/null and b/org.simantics.plant3d/icons/xyz-axis.png differ
diff --git a/org.simantics.plant3d/icons/xyz-axis.svg b/org.simantics.plant3d/icons/xyz-axis.svg
new file mode 100644 (file)
index 0000000..3186887
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="744.09448819"
+   height="1052.3622047"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
+   sodipodi:docname="xyz-axis.svg"
+   inkscape:export-filename="D:\dev\icons\x-axis.png"
+   inkscape:export-xdpi="14.4"
+   inkscape:export-ydpi="14.4"
+   version="1.1">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="7.7183778"
+     inkscape:cx="88.686886"
+     inkscape:cy="45.973103"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showguides="true"
+     inkscape:guide-bbox="true"
+     inkscape:window-width="2028"
+     inkscape:window-height="1275"
+     inkscape:window-x="-24"
+     inkscape:window-y="0"
+     showgrid="false"
+     inkscape:window-maximized="0" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <rect
+       style="fill:#00fd00;fill-opacity:0;stroke:none;stroke-width:16;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect1958"
+       width="100"
+       height="100"
+       x="0"
+       y="952.36218"
+       inkscape:export-xdpi="14.92"
+       inkscape:export-ydpi="14.92" />
+    <text
+       xml:space="preserve"
+       style="font-style:normal;font-weight:normal;font-size:7.24458122px;line-height:0%;font-family:'Bitstream Vera Sans';fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.60371512px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       x="3.1468039"
+       y="1009.0647"
+       id="text2846"
+       inkscape:export-xdpi="14.92"
+       inkscape:export-ydpi="14.92"><tspan
+         sodipodi:role="line"
+         id="tspan2848"
+         x="3.1468039"
+         y="1009.0647"
+         style="font-size:48.08296204px;line-height:1.25;stroke-width:0.60371512px">XYZ</tspan></text>
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:8;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 89.651844,1031.0133 L 4.4186832,1031.0133 M 77.083149,1048.3832 L 94.286422,1031.1799 L 77.551265,1014.4447"
+       id="path2850"
+       sodipodi:nodetypes="cc"
+       inkscape:export-xdpi="14.92"
+       inkscape:export-ydpi="14.92" />
+  </g>
+</svg>
index 75426d136edc6700df7e7f21f066e3d5614e9893..e935e5e9cb6154772766f6b2ed00b5332c9d839b 100644 (file)
             toolbarId="org.simantics.plant3d.toolbar"
             type="toggle">
       </command>
+            <command
+                  commandId="org.simantics.g3d.viewdir"
+                  image="icons/xyz-axis.png"
+                  name="Default View"
+                  toolbarId="org.simantics.plant3d.toolbar"
+                  type="push">
+               <parameter
+                     name="org.simantics.g3d.viewDirection"
+                     value="-0.57735026918962576450914878050196,-0.57735026918962576450914878050196,0.57735026918962576450914878050196">
+               </parameter>
+            </command>
       <command
             commandId="org.simantics.g3d.viewdir"
             image="platform:/plugin/org.simantics.plant3d/icons/x-axis.png"