How to get SG entity data using shotgun_fields.mu

I’m trying to get our shot_lut entity from the playing Version to configure the ocio context.
I’m stuck! I can’t seem to get the shotgun_fields.mu module working at all.
Can anyone point to a tutorial that describes how I might get this working?

I’ve set the preferences to load SG Integrations.
I’ve copied the shotgun_fields_config_standard.mu file to our custom RV path /mu folder.

The logs report this file as being found :
INFO: loaded shotgun config module ‘shotgun_fields_config_standard’ (Z:/studio/rv/dev/Mu/shotgun_fields_config_standard.mu)
INFO: using shotgun server ‘https://vinefx.shotgunstudio.com

I’ve set my SG config to “standard”.

The docs suggest I should see “INFO: Loaded “shotgun_info_mode”” but this isn’t being displayed… so I think that might be where it’s going wrong. No errors to point me in the right direction though.

/edit
Interestingly, if I launch RV with the following command, the shotgun_fields_config_standard.mu is being loaded correctly(I can see the debug being printed)… but if I launch the same version from the SG website, it isn’t.

rv.exe “rvlink:// -play -l -eval ‘shotgun.sessionFromVersionIDs(int {41055});’”

Stranger still, even though the fields are being found, the source.track.info stringproperties don’t appear to be being set, so even if I could adapt the shotgun_fields_config_custom to return the cdl path, I wouldn’t be able to retrieve it from the RVSource node.

Any ideas?
Thanks
Patrick

2 Likes

Hi Patrick, let’s work through this!

The Shotgun Fields are only available through the Mu-based shotgun integration (called Shotgun Integration and Screening Room). The following suggests to me that you probably have the Shotgun Review package enabled on your Shotgun site:

If you want to utilize Screening Room/Shotgun Integration (such as you sessionFromVersionID is doing), you want to disable Shotgun Review on your site. Note that this is a global change and will change the links that are generated for everyone on your site.

The responsible site preference should look like this to disable Shotgun Review (in favor of Shotgun Integration/Screening Room):

Once you do that, a similar link will be generated for your Play in RV.

As far as the fields for the track.info on each source, they aren’t created immediately. They are created asynchronously slightly after the source is created. If you are trying to access them on source-group-complete, it will be too soon for the API query to have filled out the data. Instead, watch for graph-state-change where tracking.info is in the event.contents().

@jacobg was recently doing similar work over here and shared his function to achieve something similar.
RV Screening Room read version data - #9 by jacobg

2 Likes

Thank Michael,
Given you need to disable SG Review to be able to benefit from the Version info, are people reverting back to Screening room? Is SG review EOL?
Thanks for the link.
I think my key problem was having SG review enabled, thus preventing the .tracking.info data being available. I’ll check with my client to see if disabling SG Review will be possible with them.
Thanks again!

1 Like

While Screening Room is our current suggested integration over SG Review, you can still get at the data for a version (as it is still stored on the version). It is however, not configurable as to which fields are obtained by something like the fields_config.

For instance, check out the sg_review.version_id on the source node to obtain the version_id. At that point you should be able to query for your associated data on your Shotgun site. It requires an extra query through the Shotgun API, but it is still possible.

1 Like

Hi Michael,
Sorry to dredge this thread back from the dead.
I switched to Screeningroom, but I’m still not getting any tracking.info, even in a graph-state-change event.

Here’s my output if I print every graph-state-change context.contents()…

opt/RV/bin/rv.bin
Version 7.6.0, built on Dec 12 2019 at 03:52:27 (HEAD=02e1726). (L)
Copyright (c) 2019 Autodesk, Inc. All rights reserved.
rv_ocio_setup() dev.
Loading shotgun_fields_config_standard...
INFO: loaded shotgun config module 'shotgun_fields_config_standard' (/blah/studio/rv/dev/Mu/shotgun_fields_config_standard.mu)
INFO: using shotgun server 'https://blahfx.shotgunstudio.com'
INFO: Read image info from ./4448x3096/to_101_002_010_template_output_v006.1009.exr
event.contents() : sourceGroup000000_tolinPipeline_0.color.sRGB2linear
event.contents() : sourceGroup000000_tolinPipeline_0.color.logtype
event.contents() : sourceGroup000000_tolinPipeline_0.color.Rec709ToLinear
event.contents() : sourceGroup000000_tolinPipeline_0.color.fileGamma
event.contents() : displayGroup0_colorPipeline_0.color.sRGB
. data_from_media : {'shot_path': u'/blah/jobs/the_the/shots/ep1/to_101_002/to_101_002_010', 'LUT': u'/blah/jobs/the_the/config/colour/ocio/luts/show_lut.cube', 'EPISODE': u'ep1', 'SEQUENCE': u'to_101_002', 'CDL': u'/blah/jobs/the_the/shots/ep1/to_101_002/to_101_002_010/_config/colour/to_101_002_010.cc', 'ocio_path': u'/blah/jobs/the_the/config/colour/ocio/linux2_config.ocio', 'PROJECT_PATH': u'/blah/jobs/the_the', 'SHOT': u'to_101_002_010'}
event.contents() : sourceGroup000000_tolinPipeline.pipeline.nodes
event.contents() : sourceGroup000000_tolinPipeline_0.ocio.function
event.contents() : sourceGroup000000_tolinPipeline_0.ocio.inColorSpace
event.contents() : sourceGroup000000_tolinPipeline_0.ocio_color.outColorSpace
event.contents() : sourceGroup000000_tolinPipeline_0.ocio_context.EPISODE
event.contents() : sourceGroup000000_tolinPipeline_0.ocio_context.SEQUENCE
event.contents() : sourceGroup000000_tolinPipeline_0.ocio_context.CDL
event.contents() : sourceGroup000000_tolinPipeline_0.ocio_context.PROJECT_PATH
event.contents() : sourceGroup000000_tolinPipeline_0.ocio_context.LUT
event.contents() : sourceGroup000000_tolinPipeline_0.ocio_context.SHOT
event.contents() : displayGroup0_colorPipeline.pipeline.nodes
event.contents() : displayGroup0_colorPipeline_0.ocio.function
event.contents() : displayGroup0_colorPipeline_0.ocio_display.view
event.contents() : displayGroup0_colorPipeline_0.ocio.inColorSpace
event.contents() : displayGroup0_colorPipeline_0.ocio_display.display
event.contents() : sourceGroup000000_source.media.movie
event.contents() : sourceGroup000000_source.group.volume

I also tried the function you referenced from jacobg, but as there are no tracking.info events it’s not doing anything useful.

I’m still stumped.Where can I go from here?

1 Like

Interestingly, I DO get the data if I launch RV from the SG Website.
Is there any way to launch RV from cmd such that the sg data is present as it is when launched from the website?

1 Like

Is there any way to get the SG data in a more usable format? The key-value pairs are presented as underscore seperated strings!
eg, here’s our lut entity.

‘lut’: ‘attachment_id_184273|attachment_type_local_storage|display_name_the_project/shots/ep2/to_0102_001/to_0102_001_020/plates/102_001_020_BG/support_files/Block3_the_project_AWG_v5d_D65_N_to_Rec709_24_V1.cube|icon_url_/images/filetypes/filetype_icon_misc.png|icon_class_filetype_icon_misc|local_storage_id_1|file_path_the_project/shots/ep2/to_0102_001/to_0102_001_020/plates/102_001_020_BG/support_files/Block3_the_project_AWG_v5d_D65_N_to_Rec709_24_V1.cube|attachment_uuid_08029f38-9a97-11ea-813b-0242ac120003|type_Attachment|id_184273’,

I can obviously do some very specific string splitting, but it would be nice to start off with something more useable… any suggestions?

1 Like

bounce!
Still curious if there’s a better way to get the local_path showing in RV shift-I info panel?