Execute duplicate commands in a new RV session launched via the py-exec command

Hi RV team,
I’m currently working on making it available to load media via the -pyeval option in the RV command.(In the rvpush command, py-exec corresponds to this.)

However, I noticed one thing during this process.
When opening a new session(Ctrl+N) in an RV instance launched via -pyeval(py-exec), the command executed via -pyeval(py-exec) runs again.

For example, if you open a new session in an RV instance launched with the command below, the media will load the same in the new session.
rvpush py-exec “from rv import commands; commands.addSourceVerbose(['path/to/media.mov])”
Simply put, even if you run rvpush py-exec “print(‘hello world’)”, you can verify that this print statement executes when you open a new RV session.

Is this one of the known bugs? I was wondering if there’s a way to avoid or bypass it.

1 Like