Forum

#1 2017-03-16 11:21:50

ChienLoutre
Member

Move Nodes in RenderGraph (Python)

Hi !

I was wondering how to reorganise nodes i create in the RenderGraph in Python. They just overlap each other and it's not very readable for users... I can use 'Position' for Frames, but i do not know how to place my nodes.

If someone has any idea ?

Thanks smile


Maurin, MoPA student

Offline

 

#2 2017-03-16 15:56:54

bonovasitch
Member

Re: Move Nodes in RenderGraph (Python)

you can do something like this,

Code:

from guerilla import pynode, Modifier
with Modifier() as mod:
    surface_node = pynode('RenderGraph|Surface')
    surface_node.NodePos.set([-482, -126])

Offline

 

#3 2017-03-16 16:34:19

ChienLoutre
Member

Re: Move Nodes in RenderGraph (Python)

That was that simple ! Haha !

I did not found that NodePos, must have missed it roll

Works like a charm, thanks !


Maurin, MoPA student

Offline

 

#4 2017-03-16 17:58:07

bonovasitch
Member

Re: Move Nodes in RenderGraph (Python)

Ya, I don't think it's documented.  I opened a .gproject in a text editor and saw that nodes had the NodePos parameter.

Offline

 

#5 2017-04-25 21:29:58

xiaoshibo
Member

Re: Move Nodes in RenderGraph (Python)

Hi

I learned that NodePos is an attribute of vector2 type

you can use Modifier class 's connect method to link Your_Node.NodePos to a vertor2 type Node.Plug to do what ever you want.


Lighting Artist

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB