added RFE526 - 90 degrees view rotation commands

+ added viewRotateLeft() and viewRotateRight() py methods to View3D
+ added ViewRotateLeft and ViewRotateRight FreeCAD commands
+ added them in View->Standard Views and Context->Standard Views menus
This commit is contained in:
Yorik van Havre 2012-01-13 13:33:35 -02:00
parent 745e59a6bd
commit 54fa2f64ca
8 changed files with 586 additions and 2 deletions

View File

@ -1054,6 +1054,54 @@ void StdCmdViewAxo::activated(int iMsg)
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewAxometric()");
}
//===========================================================================
// Std_ViewRotateLeft
//===========================================================================
DEF_3DV_CMD(StdCmdViewRotateLeft);
StdCmdViewRotateLeft::StdCmdViewRotateLeft()
: Command("Std_ViewRotateLeft")
{
sGroup = QT_TR_NOOP("Standard-View");
sMenuText = QT_TR_NOOP("Rotate Left");
sToolTipText = QT_TR_NOOP("Rotate the view by 90° counter-clockwise");
sWhatsThis = "Std_ViewXX";
sStatusTip = QT_TR_NOOP("Rotate the view by 90° counter-clockwise");
sPixmap = "view-rotate-left";
//sAccel = "Shift Left";
eType = Alter3DView;
}
void StdCmdViewRotateLeft::activated(int iMsg)
{
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewRotateLeft()");
}
//===========================================================================
// Std_ViewRotateRight
//===========================================================================
DEF_3DV_CMD(StdCmdViewRotateRight);
StdCmdViewRotateRight::StdCmdViewRotateRight()
: Command("Std_ViewRotateRight")
{
sGroup = QT_TR_NOOP("Standard-View");
sMenuText = QT_TR_NOOP("Rotate Right");
sToolTipText = QT_TR_NOOP("Rotate the view by 90° clockwise");
sWhatsThis = "Std_ViewXX";
sStatusTip = QT_TR_NOOP("Rotate the view by 90° clockwise");
sPixmap = "view-rotate-right";
//sAccel = "Shift Right";
eType = Alter3DView;
}
void StdCmdViewRotateRight::activated(int iMsg)
{
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewRotateRight()");
}
//===========================================================================
// Std_ViewFitAll
//===========================================================================
@ -2030,6 +2078,8 @@ void CreateViewStdCommands(void)
rcCmdMgr.addCommand(new StdCmdViewAxo());
rcCmdMgr.addCommand(new StdCmdViewFitAll());
rcCmdMgr.addCommand(new StdCmdViewFitSelection());
rcCmdMgr.addCommand(new StdCmdViewRotateLeft());
rcCmdMgr.addCommand(new StdCmdViewRotateRight());
rcCmdMgr.addCommand(new StdCmdViewExample1());
rcCmdMgr.addCommand(new StdCmdViewExample2());

View File

@ -86,6 +86,8 @@ EXTRA_DIST = \
view-zoom-in.svg \
view-zoom-out.svg \
view-zoom-selection.svg \
view-rotate-left.svg \
view-rotate-right.svg \
Tree_Annotation.svg \
Tree_Dimension.svg \
Tree_Python.svg \

View File

@ -68,6 +68,8 @@
<file>view-zoom-fit.svg</file>
<file>view-zoom-in.svg</file>
<file>view-zoom-out.svg</file>
<file>view-rotate-left.svg</file>
<file>view-rotate-right.svg</file>
<file>view-measurement.svg</file>
<file>view-zoom-selection.svg</file>
<file>Tree_Annotation.svg</file>

View File

@ -0,0 +1,230 @@
<?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:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64px"
height="64px"
id="svg6248"
sodipodi:version="0.32"
inkscape:version="0.48.1 r9760"
sodipodi:docname="view-rotate-left.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<defs
id="defs6250">
<linearGradient
id="linearGradient3253">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253"
id="radialGradient3270"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9781457,0.0053484,-0.00460223,0.8416912,-69.025653,-0.11788499)"
cx="10.328116"
cy="25.129232"
fx="10.328116"
fy="25.129232"
r="27.986705" />
<linearGradient
inkscape:collect="always"
id="linearGradient6816">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop6818" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop6820" />
</linearGradient>
<linearGradient
id="linearGradient6781">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop6783" />
<stop
style="stop-color:#3465a4;stop-opacity:0;"
offset="1"
id="stop6785" />
</linearGradient>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 32 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="64 : 32 : 1"
inkscape:persp3d-origin="32 : 21.333333 : 1"
id="perspective6256" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6816"
id="radialGradient6822"
cx="33.369828"
cy="51.929391"
fx="33.369828"
fy="51.929391"
r="25.198714"
gradientTransform="matrix(1.1581633,0,0,0.6558985,-7.29237,16.126077)"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3393"
id="linearGradient3399"
x1="1669.7314"
y1="1726.0585"
x2="2067.1702"
y2="1726.0585"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9135837,0,0,0.9135837,138.63723,130.60625)" />
<linearGradient
id="linearGradient3393">
<stop
style="stop-color:#003ddd;stop-opacity:1;"
offset="0"
id="stop3395" />
<stop
style="stop-color:#639ef0;stop-opacity:1;"
offset="1"
id="stop3397" />
</linearGradient>
<linearGradient
y2="1726.0585"
x2="2067.1702"
y1="1726.0585"
x1="1669.7314"
gradientTransform="matrix(0.9135837,0,0,0.9135837,138.63723,130.60625)"
gradientUnits="userSpaceOnUse"
id="linearGradient3270"
xlink:href="#linearGradient3393"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253"
id="radialGradient3293"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9781457,0.0053484,-0.00460223,0.8416912,-69.025653,-0.11788499)"
cx="10.328116"
cy="25.129232"
fx="10.328116"
fy="25.129232"
r="27.986705" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253-6"
id="radialGradient3270-0"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.2166851,1.0433407,-0.52714011,0.61472119,-73.012055,-80.803852)"
cx="83.590195"
cy="32.60199"
fx="83.590195"
fy="32.60199"
r="27.986706" />
<linearGradient
id="linearGradient3253-6">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255-8" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257-7" />
</linearGradient>
<radialGradient
r="27.986706"
fy="25.129232"
fx="10.328116"
cy="25.129232"
cx="10.328116"
gradientTransform="matrix(0.9781457,0.0053484,-0.00460223,0.8416912,-2.1599239,-18.716253)"
gradientUnits="userSpaceOnUse"
id="radialGradient3337"
xlink:href="#linearGradient3253-6"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253-6-5"
id="radialGradient3270-0-1"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.2166851,1.0433407,-0.52714011,0.61472119,-73.012055,-80.803852)"
cx="83.590195"
cy="32.60199"
fx="83.590195"
fy="32.60199"
r="27.986706" />
<linearGradient
id="linearGradient3253-6-5">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255-8-4" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257-7-9" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.5"
inkscape:cx="19.843715"
inkscape:cy="32.297511"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1278"
inkscape:window-height="723"
inkscape:window-x="2"
inkscape:window-y="54"
inkscape:window-maximized="0" />
<metadata
id="metadata6253">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
style="opacity:0.525;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.07951307;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 56.76028,22.360887 C 49.477414,12.499951 36.263904,9.6341851 25.68422,15.000413 L 20.182888,7.5516576 8.328905,34.770245 37.830019,31.445717 32.042903,23.610013 c 5.788375,-2.083823 12.481522,-0.255822 16.325436,4.948805 4.694273,6.356002 3.34635,15.319498 -3.009652,20.013771 -5.510536,4.069847 -12.976826,3.600229 -17.925875,-0.739333 l -8.512862,6.287237 c 8.478061,8.931514 22.496324,10.370637 32.654528,2.868221 10.996126,-8.121271 13.307072,-23.6317 5.185802,-34.627827 z"
id="path3295-2"
inkscape:connector-curvature="0" />
<path
style="color:#000000;fill:url(#radialGradient3270-0);fill-opacity:1;fill-rule:nonzero;stroke:#004c5b;stroke-width:2.07951306999999996;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 51.959599,18.041333 C 44.676733,8.1803975 31.463223,5.3146312 20.883539,10.680859 L 15.382207,3.2321037 3.5282239,30.45069 33.029338,27.126162 27.242222,19.290459 c 5.788375,-2.083823 12.481522,-0.255822 16.325436,4.948804 4.694273,6.356002 3.34635,15.319498 -3.009652,20.013771 -5.510536,4.069847 -12.976826,3.600229 -17.925875,-0.739333 l -8.512862,6.287237 c 8.478061,8.931514 22.496324,10.370637 32.654528,2.868221 10.996126,-8.121271 13.307072,-23.6317 5.185802,-34.627826 z"
id="path3295"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

@ -0,0 +1,242 @@
<?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:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64px"
height="64px"
id="svg6248"
sodipodi:version="0.32"
inkscape:version="0.48.1 r9760"
sodipodi:docname="view-rotate-right.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<defs
id="defs6250">
<linearGradient
id="linearGradient3253">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient6816">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop6818" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop6820" />
</linearGradient>
<linearGradient
id="linearGradient6781">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop6783" />
<stop
style="stop-color:#3465a4;stop-opacity:0;"
offset="1"
id="stop6785" />
</linearGradient>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 32 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="64 : 32 : 1"
inkscape:persp3d-origin="32 : 21.333333 : 1"
id="perspective6256" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6816"
id="radialGradient6822"
cx="33.369828"
cy="51.929391"
fx="33.369828"
fy="51.929391"
r="25.198714"
gradientTransform="matrix(1.1581633,0,0,0.6558985,-7.29237,16.126077)"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3393"
id="linearGradient3399"
x1="1669.7314"
y1="1726.0585"
x2="2067.1702"
y2="1726.0585"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9135837,0,0,0.9135837,138.63723,130.60625)" />
<linearGradient
id="linearGradient3393">
<stop
style="stop-color:#003ddd;stop-opacity:1;"
offset="0"
id="stop3395" />
<stop
style="stop-color:#639ef0;stop-opacity:1;"
offset="1"
id="stop3397" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253-6"
id="radialGradient3270-0"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.5248767,0.58857909,0.29159851,-0.75546618,-132.2862,-41.872415)"
cx="96.579445"
cy="-3.6412485"
fx="96.579445"
fy="-3.6412485"
r="27.986706" />
<linearGradient
id="linearGradient3253-6">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255-8" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257-7" />
</linearGradient>
<radialGradient
r="27.986706"
fy="25.129232"
fx="10.328116"
cy="25.129232"
cx="10.328116"
gradientTransform="matrix(0.9781457,0.0053484,-0.00460223,0.8416912,-2.1599239,-18.716253)"
gradientUnits="userSpaceOnUse"
id="radialGradient3337"
xlink:href="#linearGradient3253-6"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253-6-5"
id="radialGradient3270-0-1"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.2166851,1.0433407,-0.52714011,0.61472119,-73.012055,-80.803852)"
cx="83.590195"
cy="32.60199"
fx="83.590195"
fy="32.60199"
r="27.986706" />
<linearGradient
id="linearGradient3253-6-5">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255-8-4" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257-7-9" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253-6-6"
id="radialGradient3270-0-6"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.2166851,1.0433407,-0.52714011,0.61472119,-145.06148,-79.720497)"
cx="83.590195"
cy="32.60199"
fx="83.590195"
fy="32.60199"
r="27.986706" />
<linearGradient
id="linearGradient3253-6-6">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255-8-2" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257-7-1" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253-6-3"
id="radialGradient3270-0-4"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.5248767,0.58857909,0.29159851,-0.75546618,-132.2862,-41.872415)"
cx="96.579445"
cy="-3.6412485"
fx="96.579445"
fy="-3.6412485"
r="27.986706" />
<linearGradient
id="linearGradient3253-6-3">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255-8-9" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257-7-7" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="7.7781746"
inkscape:cx="28.910249"
inkscape:cy="33.443764"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1278"
inkscape:window-height="723"
inkscape:window-x="2"
inkscape:window-y="54"
inkscape:window-maximized="0" />
<metadata
id="metadata6253">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
style="opacity:0.525;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.07951307;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 13.300273,22.764586 C 20.58314,12.903651 33.79665,10.037884 44.376334,15.404112 L 49.877666,7.9553569 61.731649,35.173943 32.230535,31.849415 38.017651,24.013712 c -5.788375,-2.083823 -12.481522,-0.255822 -16.325436,4.948804 -4.694274,6.356002 -3.34635,15.319498 3.009652,20.013771 5.510536,4.069847 12.976826,3.600229 17.925875,-0.739333 l 8.512862,6.287237 C 42.662543,63.455705 28.64428,64.894828 18.486076,57.392412 7.4899493,49.271141 5.1790034,33.760712 13.300273,22.764586 z"
id="path3295-2"
inkscape:connector-curvature="0" />
<path
style="color:#000000;fill:url(#radialGradient3270-0);fill-opacity:1;fill-rule:nonzero;stroke:#004c5b;stroke-width:2.07951306999999996;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 8.3783278,18.041333 C 15.661194,8.1803975 28.874704,5.3146312 39.454388,10.680859 L 44.95572,3.2321037 56.809703,30.45069 27.308589,27.126162 33.095705,19.290459 c -5.788375,-2.083823 -12.481522,-0.255822 -16.325436,4.948804 -4.694273,6.356002 -3.34635,15.319498 3.009652,20.013771 5.510536,4.069847 12.976826,3.600229 17.925875,-0.739333 l 8.512862,6.287237 C 37.740597,58.732452 23.722334,60.171575 13.56413,52.669159 2.5680038,44.547888 0.25705785,29.037459 8.3783278,18.041333 z"
id="path3295"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

@ -76,6 +76,8 @@ void View3DInventorPy::init_type()
add_varargs_method("viewRight",&View3DInventorPy::viewRight,"viewRight()");
add_varargs_method("viewTop",&View3DInventorPy::viewTop,"viewTop()");
add_varargs_method("viewAxometric",&View3DInventorPy::viewAxometric,"viewAxometric()");
add_varargs_method("viewRotateLeft",&View3DInventorPy::viewRotateLeft,"viewRotateLeft()");
add_varargs_method("viewRotateRight",&View3DInventorPy::viewRotateRight,"viewRotateRight()");
add_varargs_method("viewPosition",&View3DInventorPy::viewPosition,"viewPosition()");
add_varargs_method("startAnimating",&View3DInventorPy::startAnimating,"startAnimating()");
add_varargs_method("stopAnimating",&View3DInventorPy::stopAnimating,"stopAnimating()");
@ -407,6 +409,58 @@ Py::Object View3DInventorPy::viewAxometric(const Py::Tuple& args)
return Py::None();
}
Py::Object View3DInventorPy::viewRotateLeft(const Py::Tuple& args)
{
if (!PyArg_ParseTuple(args.ptr(), ""))
throw Py::Exception();
try {
SoCamera* cam = _view->getViewer()->getCamera();
SbRotation rot = cam->orientation.getValue();
SbVec3f vdir(0, 0, -1);
rot.multVec(vdir, vdir);
SbRotation nrot(vdir, M_PI/2);
cam->orientation.setValue(rot*nrot);
}
catch (const Base::Exception& e) {
throw Py::Exception(e.what());
}
catch (const std::exception& e) {
throw Py::Exception(e.what());
}
catch(...) {
throw Py::Exception("Unknown C++ exception");
}
return Py::None();
}
Py::Object View3DInventorPy::viewRotateRight(const Py::Tuple& args)
{
if (!PyArg_ParseTuple(args.ptr(), ""))
throw Py::Exception();
try {
SoCamera* cam = _view->getViewer()->getCamera();
SbRotation rot = cam->orientation.getValue();
SbVec3f vdir(0, 0, -1);
rot.multVec(vdir, vdir);
SbRotation nrot(vdir, -M_PI/2);
cam->orientation.setValue(rot*nrot);
}
catch (const Base::Exception& e) {
throw Py::Exception(e.what());
}
catch (const std::exception& e) {
throw Py::Exception(e.what());
}
catch(...) {
throw Py::Exception("Unknown C++ exception");
}
return Py::None();
}
Py::Object View3DInventorPy::setCameraOrientation(const Py::Tuple& args)
{
PyObject* o;

View File

@ -55,6 +55,8 @@ public:
Py::Object viewTop(const Py::Tuple&);
Py::Object viewAxometric(const Py::Tuple&);
Py::Object viewPosition(const Py::Tuple&);
Py::Object viewRotateLeft(const Py::Tuple&);
Py::Object viewRotateRight(const Py::Tuple&);
Py::Object startAnimating(const Py::Tuple&);
Py::Object stopAnimating(const Py::Tuple&);
Py::Object setAnimationEnabled(const Py::Tuple&);

View File

@ -395,7 +395,8 @@ void StdWorkbench::setupContextMenu(const char* recipient, MenuItem* item) const
StdViews->setCommand( "Standard views" );
*StdViews << "Std_ViewAxo" << "Separator" << "Std_ViewFront" << "Std_ViewTop" << "Std_ViewRight"
<< "Std_ViewRear" << "Std_ViewBottom" << "Std_ViewLeft";
<< "Std_ViewRear" << "Std_ViewBottom" << "Std_ViewLeft"
<< "Separator" << "Std_ViewRotateLeft" << "Std_ViewRotateRight";
*item << "Std_ViewFitAll" << "Std_ViewFitSelection" << StdViews
<< "Separator" << "Std_ViewDockUndockFullscreen";
@ -447,7 +448,8 @@ MenuItem* StdWorkbench::setupMenuBar() const
*stdviews << "Std_ViewFitAll" << "Std_ViewFitSelection" << "Std_ViewAxo"
<< "Separator" << "Std_ViewFront" << "Std_ViewRight"
<< "Std_ViewTop" << "Separator" << "Std_ViewRear"
<< "Std_ViewLeft" << "Std_ViewBottom";
<< "Std_ViewLeft" << "Std_ViewBottom"
<< "Separator" << "Std_ViewRotateLeft" << "Std_ViewRotateRight";
// stereo
MenuItem* view3d = new MenuItem;