Review: symlinks in ocio profiles / lut paths are handled correctly

Jeremy Selan <jeremy...@...>

Symlinks in ocio profiles / lut paths are now handled correctly.
Previously, there was incorrect handling of lut paths:

If we had a pair of symlinks
/tmp/ocio/nuke-default/config.ocio -> /my/config/dir/config.ocio
/tmp/ocio/nuke-default/luts/srgb.spi1d -> /my/luts/dir/srgb.spi1d

OCIO would complain that (after appending "luts" to the resolved
config path), "The specified file reference 'srgb.spi1d' could not be
located. The following attempts were made:

This updates the behavior of OCIO, so the 'luts' path is specified
relative to the initial path of the config, not the resolved symlink
path. The resource path code is also updated to support relative
directories using the './' and '../' operators, which was previously
not allowed. The user may also leave resource_path blank, which
specifies a relative path of the same directory the .ocio file is

-- Jeremy

---------- Forwarded message ----------
From: Jeremy Selan <jeremy...@...>
Date: Wed, Jun 8, 2011 at 11:14 AM
Subject: Issue: Incorrect behavior for search_path with symlinks
To: OpenColorIO Developers <ocio...@...>

I would like to draw people's attention to this issue:

The current behavior of OCIO with regards to symlink resolution and
the luts search path is counter to reasonable expectation.  I will be
addressing this next week.  If anyone has any comments or concerns
please direct the discussion to the github issue webpage.


-- Jeremy