Date
1 - 4 of 4
Regular Expression LUT matching
nhatpho...@...
Hi! In a scenario where the LUT name consists of some known variables and an arbitrary string I would like to use something like regular expressions to match the LUT file. For example, ./001/0001/fromJeremy_cin_srgb.cube ./001/0002/fromEditorial_cin_srgb.cube it would be useful to write in the config file: ${SEQ}_${SHOT}/([A-Za-z]*_cin_srgb.cube) I don't know if that's possible, but it would be handy though. Thanks, Nhat |
|
Jeremy Selan <jeremy...@...>
Interesting idea. Not currently possible, very do-able. What if multiple luts match the specified pattern? Which would be selected? Or would this be an error? What are your thoughts on full regex vs just fnmatch? (fnmatch would get you wildcards and seq match). FNMATCH * matches everything
? matches any single character [seq] matches any character in seq [!seq] matches any character not in seq
The only challenge is that we'd have to make sure it works on windows too (I've never tried regex or posix fnmatch on win). -- Jeremy On Wed, Aug 28, 2013 at 11:36 PM, <nhatpho...@...> wrote:
|
|
Malcolm Humphreys <malcolmh...@...>
Is there a specific use case for this, it just feels dangerous.. Could we not just support ordered multiple luts? Eg. "/foobar/blah.lut:/cheese/foo.csp".
toggle quoted message
Show quoted text
Jeremy Selan <jere...@...> wrote: Interesting idea. Not currently possible, very do-able. What if multiple luts match the specified pattern? Which would be selected? Or would this be an error? What are your thoughts on full regex vs just fnmatch? (fnmatch would get you wildcards and seq match). FNMATCH * matches everything
? matches any single character [seq] matches any character in seq [!seq] matches any character not in seq
The only challenge is that we'd have to make sure it works on windows too (I've never tried regex or posix fnmatch on win). -- Jeremy On Wed, Aug 28, 2013 at 11:36 PM, <nhatpho...@...> wrote:
-- You received this message because you are subscribed to the Google Groups "OpenColorIO Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to ocio-dev+u...@.... For more options, visit https://groups.google.com/groups/opt_out. |
|
nhatpho...@...
It should pick the latest filename of all matches in alphabetical/numerical order so that in case we have ./001/0001/fromJeremy_v001_cin_ ./001/0001/fromJeremy_v002_cin_ ./001/0002/fromEditorial_v001_cin_ it would default to the latest version of each shot. Now looking into FNMatch I think it's even more suitable than regex because it's simple and keeps the config easy to maintain. Am Donnerstag, 29. August 2013 10:24:34 UTC-7 schrieb Jeremy Selan:
|
|