ggarra13/mrv2

Query the current session filename via Python

Closed this issue · 3 comments

BigRoy commented

Looking at the the File menu entries MRV2 keeps a reference to what the 'current session file' is, because it supports doing a "save" without "save as".

image

This works fine, when use File > Save it updates the session file.

How do I now query this from Python? I don't see any currentSession() or currentPath() in the mrv2.cmd module.

Any idea?


Aside of querying it from Python - I'm also not sure where I could see in the UI what my current session filename would be aside of seeing the name logged on saving. Would be nice if the Window title would e.g. also show the session filename?

E.g. adding after this:

image
Ignore the random odd otio filename

Something like this could be added at the end of the current texts or to the start, whichever makes more sense.

| session: file.mrv2s

And have it display nothing there if the file of course has no session file linked yet.

BigRoy commented

It seems the Python binding is missing the equivalent to current_session and maybe even set_current_session?

I added it. I still need to have the session name appear as soon as you save it. Now it appears when you load or change an image.

Fixed in HEAD.