Can you set Transform handles (and options) through python script

   1516   1   2
User Avatar
Member
517 posts
Joined: 12月 2013
Offline
Hi there,

I was trying to write a script to select an object then activate a specific transform handle/mode (Rotation, set to local), but I can't seem to find a way to access the transform handles through scripting.
Can someone point me in the right direction there?

Thanks!
Pete
User Avatar
Member
63 posts
Joined: 8月 2013
Offline
Hi Pete,

…I just found out a way to do something similar today, and yest still managed to forget how I came across the right python code to use…Sorry for the lack of clarity, therefore, but here it is:

import stateutils

stateutils.findSceneViewer()

“stateutils.findSceneViewer()” is a SceneViewer object (https://www.sidefx.com/docs/houdini/hom/hou/SceneViewer.html), hopefully (I only tried it in single-view mode; don't know if it fails when multiple viewports are open). From there all the (supported?) tool states can be invoked…For example:

stateutils.findSceneViewer().enterTranslateToolState()

…should activate the move tool…

The code runs in the python console, as works as a callback script in a spare button parameter, too…
  • Quick Links