0

Controlling nodes in stack

Hi

I'm looking for commands controlling stacks but haven't been able to find it.

Create new stackgroup, adding removing clips from a stack, moving items up and down. Setting wipe percentage.

Are any of those available?

As a test I tried:

rv.commands.setViewNode("defaultStack")
for node in rv.commands.nodesInGroup("defaultStack"):
    rv.commands.deleteNode(node)

But it crashes RV everytime (4.2.0)

Thank you!

 

2 条评论

  • 0
    Avatar
    Jon Morley

    Hi,

    To control the stack membership and order you need only change the inputs to the RVStack node. You can accomplish this through commands.nodeConnections and commands.setNodeInputs. Here is a simple example of how you would alphabetize the nodes in a stack.

    (inputs, outputs) = commands.nodeConnections("defaultStack")
    inputs.sort()
    commands.setNodeInputs("defaultStack", inputs)

    In order to set the wipes you will need to set the stencil.visibleBox values for the input entry in the stack node you are wiping in. I am attaching (linked below) a session file that shows a very simple wipe between two movieprocs. Here are the values of the defaultStack source group transform node:

    defaultStack_t_sourceGroup000000 : RVTransform2D (1)
    {
        transform
        {
            int flip = 0
            int flop = 0
            float rotate = 0
            float[2] translate = [ [ 0 0 ] ]
            float[2] scale = [ [ 1 1 ] ]
            int active = 1
        }

        stencil
        {
            float visibleBox = [ 0.200284168 0.761363804 0.0871212035 0.778409123 ]
        }

        tag
        {
            string wipe = "defaultStack_t_sourceGroup000000"
            string wipe_name = "sourceGroup000000"
        }
    }

    From this you can see how you could use commands.setFloatProperty to set the visibleBox to the locations you want. I would suggest saving session files and looking at the text content to see how the wipes work in the graph.

    Please let me know if you have further questions.

    Thanks,
    Jon

  • 0
    Avatar
    Johan

    Many thanks Jon

    That cleared up my questions

请先登录再写评论。