sipi 0 Posted February 20 Hey everyone, Can I get somehow the position of the current look view when I'm in `no cam` mode in the viewport? Share this post Link to post Share on other sites
anim 1,209 Posted February 21 you can do something like this for example: import toolutils as tu view = tu.sceneViewer().curViewport() view_xform = view.viewTransform() view_position = view_xform.extractTranslates() 2 Share this post Link to post Share on other sites
sipi 0 Posted February 21 10 hours ago, anim said: you can do something like this for example: import toolutils as tu view = tu.sceneViewer().curViewport() view_xform = view.viewTransform() view_position = view_xform.extractTranslates() It is really nice, thank you!!! But now I'm facing another problem. My main goal is that these values update a vec3 parameter on the interface of an asset, and I actually managed to do this by pushing a button (using your script in a callback script), but I realized I don't want to always push that button. So I wonder, is it possible to update these values automatically for example on every change of the viewport, or somehow? Share this post Link to post Share on other sites
ftaswin 17 Posted February 22 __import__("toolutils").sceneViewer().curViewport().viewTransform().extractTranslates().x() __import__("toolutils").sceneViewer().curViewport().viewTransform().extractTranslates().y() __import__("toolutils").sceneViewer().curViewport().viewTransform().extractTranslates().z() Map them in vector3 parm respectively (x,y,z). It will update automatically Share this post Link to post Share on other sites
sipi 0 Posted February 22 5 hours ago, ftaswin said: __import__("toolutils").sceneViewer().curViewport().viewTransform().extractTranslates().x() __import__("toolutils").sceneViewer().curViewport().viewTransform().extractTranslates().y() __import__("toolutils").sceneViewer().curViewport().viewTransform().extractTranslates().z() Map them in vector3 parm respectively (x,y,z). It will update automatically Well, I tried to use this code in a parameter as python expression, but it only updates if I select or deselect the node. What am I doing wrong? Share this post Link to post Share on other sites