RV OCIO Applying Looks to Views Issue

Problem: Views in RV’s OCIO interface don’t change the image when selected - only manually changing looks has an effect.

Root Cause: My RV’s Python OCIO setup overrides the standard OCIO view behavior, preventing views from automatically applying their associated looks.

Approaches Attempted:

Modified RVDisplayPipelineGroup to read view looks - Attempted to extract looks from view definition and apply via ocio_display.looks property ✗ (property not supported by RV)

Moved look application to RVLookPipelineGroup - Tried to read current view and apply its looks in the look pipeline stage ✗ (always uses default view, not current selection)

Simplified Python setup to use RV defaults - Removed overrides for RVLookPipelineGroup and RVDisplayPipelineGroup to let RV handle OCIO natively ✗ (views still don’t work)

Current Status: RV views remain non-functional. Only manual look switching works. My Python OCIO setup appears to override RV’s built-in view system.

If you have tips or a solution its appreciated (Here a link to a minimal test setup on github )

looks:
  - !<Look>
    name: cdl_look
    process_space: scene_linear
    transform: !<GroupTransform>
      children:
        - !<FileTransform> {src: "${CDL_FILE_PATH}", cccid: 0, interpolation: linear}

  - !<Look>
    name: show_look
    process_space: scene_linear
    transform: !<GroupTransform>
      children:
        - !<FileTransform> {src: "${CDL_FILE_PATH}", cccid: 0, interpolation: linear}
        - !<FileTransform> {src: "bright.cdl", cccid: 0, interpolation: linear}

displays:
  ACES:     
    - !<View> {name: Raw, colorspace: Utility - Raw}

    # This view applies ONLY the sidecar CDL look.
    - !<View> {name: Raw + CDL, colorspace: Utility - Raw, looks: "+cdl_look"}
    - !<View> {name: Raw + CDL + Show, colorspace: Utility - Raw, looks: "+show_look"}
nodeType = commands.nodeType(node)
if (nodeType == "RVLinearizePipelineGroup"):
    result = [
        {"nodeType": "OCIOFile",
         "context" : context,
         "properties" : {
             "ocio.function"            : "color",
             "ocio.inColorSpace"        : DEFAULT_INPUT_SPACE,
             "ocio_color.outColorSpace" : SCENE_LINEAR_SPACE}},
        {"nodeType" : "RVLensWarp", "context" : {}, "properties" : {}}]
  
elif (nodeType == "RVLookPipelineGroup"):
    # Let the view handle applying looks instead of hardcoding them here
    result = [
        {"nodeType"   : "OCIOLook",
         "context"    : context,
         "properties" : {
             "ocio.function"     : "look",
             "ocio.inColorSpace" : DEFAULT_INPUT_SPACE,
             # "ocio_look.look"    : "show_look"  # Commented out - let views handle this
             }}
        ]
  
elif (nodeType == "RVDisplayPipelineGroup"):
    display = config.getDefaultDisplay()
    result = [
        {
            "nodeType": "OCIODisplay",
             "context": context,
             "properties": {
                 "ocio.function"        : "display",
                 "ocio.inColorSpace"    : SCENE_LINEAR_SPACE,
                 "ocio_display.view"    : config.getDefaultView(display),
                 "ocio_display.display" : display }}]
1 Like

I’m not sure if this is what you are looking for, but first, in your example we don’t see the line where you define your variable for ${CDL_FILE_PATH}, so I’m not sure why this does not work.
The way I finally got this to work was to pass all the necessary information from python to ocio through environment variables. It’s the easiest way.
I also have OCIO handle everything, so I get a Look submenu in my ocio menu, with 2 entries: No CDL, and Shot Lut.

From nuke/rv python, you set your OCIO env variables:

os.environ["CDL"] = r"//path/to/cdl"
os.environ["CCCID"] = "0"
os.environ["shot"]=r"//path/to/shot"
etc.

Then in config.ocio, you can call those through $CDL, $shot, etc:

  looks:
  #No CDL
  - !<Look>
    name: no CDL
    process_space: default

#CDL look per shot
  - !<Look>
    name: Shot LUT
    process_space: compositing_log
    transform: !<FileTransform>{src: $CDL, cccid: $CCCID, direction: forward}

In OCIO.conf, you can also specify base fallback values for your variables, to use in case those are not available.

environment:
  CDL: Empty_CDL.ccc
  CCCID: 0
  SHOT: TEST_0001
  SHOW: MYSHOW
  etc.

Then in your RV python script:

    elif (nodeType == "RVLookPipelineGroup"):
        result = [
            {"nodeType"   : "OCIOLook",
             "context"    : context,
             "properties" : {
                 "ocio.function"     : "look",
                 "ocio.inColorSpace" : OCIO.ROLE_SCENE_LINEAR,
                 "ocio_look.look"    : "Shot LUT"}}]

Hope this helps.

Cheers

sergei.