0

Connecting source Node to RVFoldergroup Node

Hi, I am looking for a way in python to create a folder structure using RVFoldergroup with a number of source nodes inside. 

Ex:

I create a folder like this:

folder = commands.newNode('RVFolderGroup', 'Folder')

and I would like put this source 'sourceGroup000000_source' inside the folder

Not sure how to achieve this. Can someone help me out...

Thanks, Felix

1 条评论

  • 0
    Avatar
    (Michael) Kessler

    Hi Felix,

     

    You can get the source into the group by setting the SourceGroup as an input to the FolderGroup.

     

    For instance, you can do this:

     

    # First turn our sources into SourceGroup nodes.
    sourceGroups = [commands.nodeGroup(i) for i in sources]

    # Next, set the FolderGroup node to have all the SourceGroup nodes as inputs.
    commands.setNodeInputs(folder, sourceGroups)

    That should set you up to have sources in the folder.

    -Kessler

请先登录再写评论。