How can I get source name?


“play in RV” from ShotGrid,

directly playing a .mov file from the network drive

I would like to get the source name marked in red Use python in Rv.

If you check out plugins/Mu/HUD.mu you’ll see that the “Source” attribute there is the ui name.

You can either go to the ui.name property on the top-level group, or just use the extra_commands.uiName(src) function to get it given the source.

1 Like

Be aware that you can have multiple sources at the current frame.

Have you tried rv.commands.sourcesAtFrame?

Example

To @geffrak’s point, the info HUD will show what source is topmost below the cursor; so doing rv.commands.sourcesAtFrame(rv.commands.frame()) will get you all the sources; it is usually good to protect this call against 0, 1, and many to behave as expected.

If you want the same behavior as the HUD (specifically a source under a cursor) you can dig into HUD more about how it does that, as it is uncompiled (and hell, if it wasn’t, thanks to the RV team and others, it is OpenSource now!)

Thanks to you, it was resolved easily.
Thank you~~^^

1 Like