Can you get range offset (-ro) working with RVPUSH?

Hey, I have a simple code where I query ShotGrid for paths to shot versions and open them in RV using Python, here’s a snippet:

# offset value for edit reference
            offset = int((sg_shot['sg_handles']))
            # print offset

            # using rvpush.exe to create an RV session
            rvpushpath = r"C:\Program Files\Shotgun\RV-7.2.6\bin\rvpush.exe"
  [rvpushpath, 'merge', version_path])
            # Needed for RV to establish a session or else duplicate sessions will be created
  [rvpushpath, 'merge', edit_path, '-ro', offset])
  [rvpushpath, 'merge', prev_path])

So while RV opens the paths provided in the same RV session, additional arguments such as the ‘-ro’ doesn’t work…
RV error
Am I doing this wrong? Please Help!

try putting your -ro in source brackets with your edit_path.

On the commandline it would look like:

rvpush.exe merge [ edit_path -ro offset ]

So put your [ and ] as strings surrounding the source and range offset args.

Something like this:[rvpushpath, 'merge', '[', edit_path, '-ro', offset, ']'])


Yup, that did it!

Thank you so much!!

1 Like