The node state is there, it’s just empty when you first create it. You may need to deactivate/reactivate the session to get the Trees view to notice and lay out the new node, which will then set its initial position.
But if you don’t care about the node position, go ahead and set whatever state you want when you create it. It’ll be preserved.
Thanks, yeah I’m looking for the fresh node position after creation. Can you give me an example of Session deactivation? I’m not finding a specific method to desactivate or even update Tree.
Ive been trying a few things here but still the fresh node state wont update with the position info. For example I tried to activate another session in the project and activate the session that I created the node again and it wont update.
n1 = Node(“com.digitalfilmtools.ofx.silhouette.sfx_copy”)
p = activeProject()
fx.activate(p.sessions) # the other project session
fx.activate(p.sessions) # the session that was active on node creation
Sorry for the delay on the reply. I can query the position state of an existing node and set a new position, BUT the position will only update on the “tree view” if I drag the node with the mouse (it instantly goes to the new position visually), so yeah there’s something funky on the “tree view” update.
Magno - the Trees window will notice the new node position if you set the position inside an undo block. In fact, if you want the UI to notice any changes to the object model (such as adding the new node, or adding pipes to it), you’ll need to do it inside an undo block.
You can still make changes like this outside of an undo block, but you should only do that when you are manipulating the model during some kind of render script or something outside of the UI environment.