How to use sg_path_frames properly in RV?

I’m trying to figure out how to correctly configure sg_path_to_frames. I found the official documentation on it to be sparse and examples to be very specific.

I tried setting the sg_path_to_frames field the absolute path of a local image (in RV) but I see this error in the RV console.

My goal is to view several images related to a version using some format like
/absolute_path/image.#.jpg
and have the images be
/absolute_path/image.1.jpg
/absolute_path/image.2.jpg
or something similar

You also need to set the sg_first_frame, sg_last_frame and frame_range field info on the version.

@Ricardo_Musch , even with those set, it seems to give the same error. Fields and error message shown in screenshot

This might be because the Multiple Media Representation is broken.
In the Release Notes of 2022.3.1 they claimed to have fixed the bugs, but it still doesn’t work properly.

The Technical Team opened a Ticket for this issue, so they are working on that.

1 Like

Would there be any possible workaround to this? i.e. downgrading versions? Using a different kind of media? linking to a sequence instead?

The feature was introduced in 2022.3.0. With anything before that you should be good until it’s fixed.

@Missy_of_Science thanks.
What is the proper way to use a wildcard path with sg_path_to_frames (i.e. /full_path/image.#.png) ? I don’t see any official documentation on that.
I.e. how to have the path point to more than one image in a directory, or image files matching the same “pattern” ?

You can use as many # as you have numbers in the version.
Your example would resolve to image.1.png, image.2.png, image.3.png etc

or use the %0Xd version, where the X is the number you need. The 0 fills the front of the string, so %04d would be image.0001.png, image.1001.png (image.####.png is the same)
%4d on the other hand would be image.1.png but also image.1001.png, because it doesn’t fill anything.

For some reason my example didn’t work with existing files. Is this documented officially anywhere? Also is this OS specific?

sg_path_to_frames-screenshot-2

I.e. “…/couch/image.1.png” works with
First frame 1
Last frame 1
and frame range 1-1

I.e. “…/couch/image.#.png” works with
First frame 1
Last frame 2
and frame range 1-2

Doesn’t display the frames and give the error “WARNING: Version 77813 has no local media”

Have you tried %01d or %1d?
I have no idea, whether this is os specific or not.

Unlike some other softwares, in RV’s world a single # means padding 4 :wink:

From rv -help

Image Sequence Numbering

  Frames 1 to 100 no padding:     image.1-100@.jpg
  Frames 1 to 100 padding 4:      image.1-100#.jpg -or- image.1-100@@@@.jpg
  Frames 1 to 100 padding 5:      image.1-100@@@@@.jpg
  Frames -100 to -200 padding 4:  image.-100--200#jpg
  printf style padding 4:         image.%04d.jpg
  printf style w/range:           image.%04d.jpg 1-100
  printf no padding w/range:      image.%d.jpg 1-100
  Complicated no pad 1 to 100:    image_887f1-100@_982.tif
  Stereo pair (left,right):       image.#.%V.tif
  Stereo pair (L,R):              image.#.%v.tif
  All Frames, padding 4:          image.#.jpg
  All Frames in Sequence:         image.*.jpg
  All Frames in Directory:        /path/to/directory
  All Frames in current dir:      .

I’d recommend always using the printf notation as it is the less ambiguous one.

2 Likes

Using %04d works in my case but using a whole path is more preferable. At this time setting sg_path_to_frames to a path crashes and doesn’t allow opening the version. If I set the path again to the specific image in the same directory (from Shotgrid in browser) and open it in RV it works again.

What might be steps to debug the issue when setting it to the full path ?

What do you mean by “setting it to a full path crashes”?

Image 1, when using /path/couch/image.%03d.png, works loading both images matching that pattern in the directory (image.001.png, image.002.png)

Image 2 when using /path/couch/, displays no image, no version info

Uhm,

yes RV needs a path to frames in a notation it supports to display it as a sequence.

/path/couch/image.%03d.png will work, /path/couch/ won’t work.

This was really helpful. I was curious why, when I had path_to_frames, as well as start frame, end frame and frame range populated, I wasn’t seeing the frames option in RV. The trick was the wild cards; when i changed something_cool_v001.#####.exr to something_cool_v001.%05d.exr, I got frames. Woot! Yey me! Go team Awesome…with no small amount of help from reading these forum posts. Thanks all.