Get info about TOP Out

Hello,

How do I get the same information from the TOP Out node as I would from a MovieFileIn node? I’m aware I can use CHOP Info node for that. But setting the operator of CHOP info to Out node does not give me the same results as setting the operator to TOP MovieFileIn. I am certain that the out node will have MovieFileIn as an input.

I would like to get this information from python. What I have currently:

info_op.par.op = op('movieFileInOperator')

What I would like:

info_op.par.op = op('baseOperator')

The ‘baseOperator’ has an “Out” node. And this “Out” node is connected to movieFileIn.

One thing to keep in mind here is inheritance. A moviefile in TOP has all of the members of the TOP class:

derivative.ca/wiki099/index. … =TOP_Class

Along with it’s own members:

derivative.ca/wiki099/index. … nTOP_Class

An out TOP has all of the members of the TOP class:

derivative.ca/wiki099/index. … =TOP_Class

but none of its own:

derivative.ca/wiki099/index. … tTOP_Class

I only mention this as it’s not clear if you’re after members or parameters. You can also access the parameters of a given op with the .par method. For example:

op('moviefilein1').par.file

Would return the current file path in the moviefile in op. If that’s what you’re after you’ll need to target the moviefileout TOP rather than the out TOP - as that information isn’t passed between operators.

If we look at just the case of the width member for an out TOP, we might access this via python a few different ways. You could put the entire path in the op method:

op('base1/out1').width

or you could use the less frequently seen op().op() approach:

op('base1').op('out1').width

Both of these are syntactically correct. I tend to use the first style type when I know the exact location of an Op and it isn’t nested too deeply. If, however I’m using a parent shortcut or a global op shortcut, the second method is sometimes easier to write in complex networks.
base_members.tox (694 Bytes)

Thank you,

But think of a situation where there are 4-5 MovieFileIn TOPs. I don’t know, which one of them will end up in the Out node. Isn’t it then possible to access the MovieFileIn through the Out node? Only the inherited members?

The point is that I later need to send the MovieFileIn (gone through Out node) to the Info CHOP with its own private member variables.

Hmmm. I don’t think I follow exactly what you’re describing.

You have a bank of 4-5 moviefile in TOPs, but don’t know which one is playing. Is that correct? Are you routed through a switch TOP?

You could trace back to the source with the connectors class, but that will leave you with some pretty messy python - I’ve used this a ton, but wouldn’t recommend futzing with this unless there isn’t another way:
derivative.ca/wiki099/index … ctor_Class

I guess a better question information do you need about the currently playing movie? What information does your system know before hand? That is, if you’re routed through a switch, do you know which index in the switch you’re using, if you’re using select TOPs are you setting the path with Python. What’s the process that’s determining video selection?

Alright, I will explain the situation.

I have a websocket part, which receives input. I will parse the input in Python and would like to select one of the 4 videos (MovieFileIn) to end up in the TOP Select panel. Everything works fine if the 4 videos are located on the same level with the Select TOP. This is illustrated below:

[url]https://drive.google.com/open?id=0B0gogWMq7zHXQ01vMVNDNmtwUUU[/url]

What I do is that I set the top parameter in Select to be equal to one of the 4 video operators. Something like:
op(‘select_panel’).par.op = oneOfTheMovieOperators

However, I would like to do quite a bit of editing before sending the video to the select panel. So, this is why instead of having 4 video panels, like on the picture above, I have 4 base panels. Like this:

[url]https://drive.google.com/open?id=0B0gogWMq7zHXcHR0dkYzY1FkMkU[/url]

As you can see, these panels have an Out operator set. The inside of each base panel is similar to this:

[url]https://drive.google.com/open?id=0B0gogWMq7zHXRWVpS08xbEFHMUk[/url]

The “naerupall_comp” operator contains video editing and also has an Out operator, which is then connected to the base’s Out operator. The resulting video that ends in “Out” is what I am interested in. I want this edited video to reach the TOP Select, which I discussed above. However, instead I receive a warning “Bad path videoBasePanelNameHere in parameter TOP”. And this is because it is the Base that is connected to the select, not the Out operator of the Base.

When using Switch instead of select, it seems to work. The video is correctly shown in the Switch operator (have to change the python code to work with switch instead of select*. However, I would still like to use the CHOP Info operator on the resulting Movie, which is seen in the Out operator.

Does this kind of example get to the heart of what you’re up to?

There’s a post process pipeline that you need to resolve a path from, and you’d also like to resolve a path to the original movie file in OP.
base_post_and_original.tox (2.46 KB)

Yes, excellent!

The TOP Null operator correctly connects to the TOP Select operator.

However it still isn’t possible to get the same results with the CHOP Info. The following pictures will illustrate what I mean.

MovieFileIn connected to CHOP Info will have much more information in the Scope parameter:

[url]https://drive.google.com/open?id=0B0gogWMq7zHXSTZwWlRrcm5wOEU[/url]

Compared to the info received from Null or Out, which has input of MovieFileIn:

[url]https://drive.google.com/open?id=0B0gogWMq7zHXOW90LVRqTGpYNk0[/url]

How could I get the same amount of Scope options from the Info CHOP connected to Out or Null? Or perhaps a select or switch?

You can’t get the same scope out of a Null or Out TOP sadly. The information about the movie file that’s playing needs to be extracted from the source moviefilein TOP.

Thank you for the naswer, raganmd. You’ve been very helpful!