Hi,
I'm using a python sop to copy some nodes to a subnet. But every time the python sop is evaluated, the ‘view’ jumps to that other view, showing the newly created nodes.
Thing is that if the network is correct, this prevents me from diving into certain nodes that contain the py sop, as the node is re-cooked and therefore I'm ported automatically to the new nodes.
Is there a way to prevent this?
Python: Creating nodes without the view 'jumping' to an other context?
3728 5 0- deadalvs
- Member
- 196 posts
- Joined: Aug. 2011
- Offline
- BabaJ
- Member
- 2042 posts
- Joined: Sept. 2015
- Offline
- goldfarb
- Staff
- 3456 posts
- Joined: July 2005
- Offline
it sounds like once the node(s) are created they are being set to ‘current’ which makes the view jump.
see
https://www.sidefx.com/docs/houdini15.5/hom/hou/Node [sidefx.com]
down in the Selection section
see
https://www.sidefx.com/docs/houdini15.5/hom/hou/Node [sidefx.com]
down in the Selection section
- Enivob
- Member
- 2565 posts
- Joined: June 2008
- Offline
- deadalvs
- Member
- 196 posts
- Joined: Aug. 2011
- Offline
- Andr
- Member
- 900 posts
- Joined: Feb. 2016
- Offline
Hi, I had the same problem and just found out that u can just write node.setPicked(1) just after you create a node.
“node” would be the node you want stay with.
Example:
cheers
“node” would be the node you want stay with.
Example:
myNode = hou.pwd() obj = hou.node("/obj/") obj.createNode("cam" , "myNewCam") myNode.setPicked(1) #let's go back to myNode level
cheers
-
- Quick Links