Open antirotor opened 4 years ago
Now I see what did you mean, I misunderstood the issue, and yes this may be one of anatomy's methods. I expect that nested resolution may be modifiable. In presets or Anatomy itself?
Maybe as part of the anatomy. Something like search_path_fragment
🤔
# default.yaml
search_part_fragment : "1:2"
work:
folder: "{root[work]}/baz/{project[name]}/{hierarchy}/{asset}/work/{task}"
now in python:
>>> search_path = "[{}]{}".format(anatomy.root_environments().keys()[0], anatomy.get_search_fragment())
>>> print(search_path)
[PYPE_WORK_ROOT]baz/SomeProject
@antirotor I'm not sure this is actually still required. Haven't hear anything related to it for a long time. What do you think?
@antirotor I'm not sure this is actually still required. Haven't hear anything related to it for a long time. What do you think?
I think it is still valid, related to arnold standins. But I am not sure if anyone is using it with this feature. Without it you can't basically use dynamically Texture Search Path in Arnold Standin...
Use of search paths
Sometimes it is needed to specify search path - basically root where is something searched recursively. One good example is Arnold in Maya:
You can specify path used to resolve other paths for textures, etc. So:
is used to resolve texture relative path
foo/bar/baz.tx
->/some/path/foo/bar/baz.tx
To make it more complicated, we need to specify search path using environment variables, so that path can be resolved correctly on linux, windows or macos.
So lets have a root like:
This will generate
PYPE_ROOT_WORK
environment variable set correctly on each platform.Now lets assume we use templates like this:
(notice the baz part there)
If we then set Arnold search path like this:
it will be to wide, resulting is search
//foo/bar/work
and relative paths with baz and project name inside likebaz/SomeProject/path/to/texture.tx
. That doesn't seem to be right and might be extremelly slow on places with lots of projects (or directory hierarchies).We could hardcode project like
[PYPE_ROOT_WORK]/SomeProject
but this will not work with used template.We could use part of resolved path from template ad add it like:
and then we could use
resolution_root
like:that makes more sense but
resolutio_root
or more precisely its index should be user specified. But question is where? It could even be made by more parts of path, like:[cuID:OP-1040]