Re: Review: Inital pass at searchpath impl
Malcolm Humphreys <malcolmh...@...>
It might have to wait a few weeks, I'm in Hong Kong right now and I'm going to be MIA in asia for a bit.
But yes a chat would be good when we are both free.
They are a common mechanism for setting up initial state for a lot of apps. This being similar is a nice entry point for integration with existing systems.
But I agree the env vars should only be used to setup the initial state.
Even if it is possible to change this state with setenv()'s I would discourage this use with a better interface for changing state during execution, similar to what you have suggested.
Most places have some form of setshot system which bootstraps the env for a shot, not just for color but things like the required toolchain for that artist session doing task A (I'm guessing you have something similar at SPI).
I can guarantee that I would need to write something that grabbed env's and setup an initial state through which ever interface we settle on. I would prefer that this ocio env wrapper type code was internal rather than each shop doing it slightly differently.
Being able to setup/enfoce the initial state like this is important for multiple dept / group workflows. Who are most likely using diffrent toolchains but require to start with the same consistent viewing env between them.
In this style of setup each person gets pushed the currently approved viewing env for that session and are not concerned with modification of it.
Neither do I, that would be a bit clumsy for that specific problem.
I think a mixture of the two ideas could work well (see below).
I was thinking the same kind of thing, but with the possibility of these grabbing their initial value from the env (if it exists).
I'm also thinking it might be better to be explicit with globals eg. config->addglobal(name) these would end up as a list in the yaml profile. Only the $globals in this list would be expanded and also the only ones initialized from the env. (This does resolve my niggles with the current expand code which has the potential to be a bit slow, if used in many)
These globals could be set/get dynamically at run-time ie config->getglobal(), config->setglobal(). I would prefer to call these globals over variables as it suggests their scope.
Right now I only see a direct use for globals with string parameters and would only want to add support for other types if we had a strong need for them.
As an example this would be nearly a complete list of globals I could see a use for ($JOB, $SCENE, $SEQ, $SHOT, $TASK, $USERGROUP, $BALLANCE_GRADE, $CREATIVE_GRADE, $EDIT_GRADE). I'm sure these have slightly different names per shop but represent the same concepts.
I definitely would like some form of dynamic parameters/variables, but these should be something different to globals.
With the prospect of multiple image sequences / clips with transforms, configs and or grades. For these case are you proposing that we setup a single config and then store some kind of ocio processor relationship per clip?
It would be great to flesh this out as it would be good for client apps not to need to manage the details of this per clip state storage if this is the way we are thinking of going.