-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deeper hierarchy in templates and paths #308
Comments
Visually it's possible to have a deeper hierarchy by hooking it up with a I'm not sure if the forward slash is supported in the asset's name, but if it is then even the folders created on disk would allow to "contain" assets. The only problem there would be what if you create an asset called That's also one of the reason to "prefix" the parent in the asset's name. But the other reason is: that asset names in the database have to be unique, so for example So on disk the above example ends up being:
Yet in the pipeline it would visualize as:
Does that make any sense? |
That on its own makes sense and is a nice feature I guess, but certainly not very intuitive. I've tried tweaking the project manager to use I understand the sentiment to keep it flat on the disk, however, with a long-term project (52 episode tv show...) we're talking well over 5000 shots in one folder. Artist might be able to get past that if everything is connected via avalon (which is a noble target, but we can't count on that), but production would go crazy, I included. Preventing the Unique asset names should certainly be enforced, but I don't share the opinion that prefixing them automatically is the way to go. It creates confusion where you think you're creating asset I see that every objects It would be good to differentiate between assets and 'folders' in the database of course but that should be trivial, by simply creating a new object type. |
Thanks @mkolar, arbitrary directory depth is supported in the design of Avalon, it just hasn't been implemented yet. The The The "pipeline parent", a.k.a. "object model" is then reflected onto a filesystem in whatever way makes the most sense for that filesystem via the path templates; but could also be drawn differently in a browser, on a web page or a diagram etc. The object model is important when you program towards the pipeline, as you can make assumptions without taking into consideration a hierarchy meant to simplify visual browsing in e.g. Windows Explorer. E.g. the parent of any Asset is always the project, and the parent of any Version is always the Subset etc. It remains fixed regardless of the visual hierarchy such that your tools will work across any hierarchy. So, finally, to work around the issues you are having at the moment, you could either try treating |
I'd keep an open mind as to what qualifies as a hack. :) Think about this, is a hierarchy drawn in Windows Explorer any different from the "visual hierarchy" drawn in the project manager? What makes them different? To my mind, these are both equal "hacks" in the sense that they visualise an otherwise flat series of numbers in a datastore; one a file system, the other a MongoDB database. We can use that to reap the benefits of visualisation, without getting bogged down by thinking hierarchically in our tools. Best of both worlds! |
All right then :), I think I'm getting your approach here. Extra data members that hold this information, should be straightforward and clear.
That's exactly what I'd imagine. It looks like the formatting is happening ad-hoc in multiple places as a direct string.format(). Was there a reason not to use something more robust like lucidity or pather? Just out of interest. Anyways I'll dig through the code to see how many things would be influenced by this and try to add @BigRoy are you currently using the |
Those are relevant when going the other way; from getting data out of a path. When putting data into a path, I don't know if there is any advantage to those. In Avalon, the path shouldn't have to be used as a container of data; all relevant data is accessed via the database. If you find yourself needing to get data out of a path, then that's a bug. |
Perspective perspective. :) I don't know if |
Definitely using the visualParent for hierarchy. I'm not parsing underscores or anything or splitting on strings, always going from this "explicit" data in the database. And I'm using the So:
The shot010 would be "unique asset name": s01e01_shot010 yet readable and labeled as just |
So I got it working quite well now. I'll clean it up a bit a push so we can discuss the approach. I've just added one When I create all the parent directories as assets and link them via It does introduce one strange inconsistency, which doesn't affect anything functionally, but should probably be addressed We have Wouldn't it make sense to unify these and either make them all just metadata, or make silos assets too? |
Isn't |
Shouldn't be any technical reason for visualParent to require the parent it's pointing at to exist, but it'd make sense for it to do so. I think this is merely how the GUI is implemented, and doesn't put constraints on the system itself. @BigRoy? |
Sure. Functionally of the system isn't an issue at all as you said. I'm only mentioning it for consistency reasons. I'll refer to this hierarchy below.
True but I just realized, that some changes would have to be made to how e.g. the loader creates the visual hierarchy. Right now it takes 'sh010', finds its If 'sq01' doesn't exist as an asset in the db, it won't find its further parents. This could, of course, be remedied, by simply storing the full hierarchy in the asset data as a list of parents. |
Actually. It must exist. The visualParent is an
Theoretically it could work, but I think this is the exact distinction we made at the beginning. The "silo" is never worked on, it's just the parent holder. The "ep101" instead, could have tasks.
Actually, what does this do? This |
Aha. didn't know about that decision, that clears it up somewhat. I personally don't mind that, but it should be documented somewhere eventually.
I'm doing this now: templates
code that formats the path
So for forming the path I only need the My path formatting uses the hierarchy data from asset['data'], while your loader uses the So there is a disconnect now between what is needed to build a visual hierarchy in the loader ( |
Actually, I've given this some more thought. In my head it makes sense to drop the required default The only thing I'm currently not sure about is how we can transition away from it, without breaking backwards compatibility. Our projects use silo, that's fine. But somehow we should be able to "work" on them in the future as tools allow the changes of removing "silo" as a thing of its own. In practice it can really just be a parent asset of anything else. I'd be good to really get to the ground of this discussion on why or why not to ditch it - maybe an issue of its own. But last time tinkering about this I started feeling more and more confident that removing |
Yeah, agreed. The direction I see this going is for {
"name": "sh2010",
"tags": ["seq03", "ep12"],
"icon": "boat"
} And then used in a path template (or not). {root}/{project}/{tags}/{asset}/work/{task}/{user}/{app} Where maybe tags = "/".join(tags)
# Or rather..
tags = os.sep.join(tags) This way you get both the reusable metadata per asset, that you could use to sort, search or filter with - like finding all shots for For backwards compatibility, we could do what we did for Pyblish, where Bottom line is that this should enable an arbitrary hierarchy depth, whilst preserving the simplicity of the current object model, where there only are Project, Asset, Subset, Version and Representation to worry about for pipeline tools. The rest being pure cosmetics. Thoughts? |
Don't think Aside from that, the only remaining issue is the asset's name - it must be unique. So |
This is somewhat of an independent issue to this one about hierarchy, but in short you can do this (already, locally, and independent of Avalon): With Mongo, you can make this assertion at a low-level, via the Unique Index functionality. Currently, assets are stored in what is effectively a list, their names are stored as members of a dictionary. But you can make that name forcibly unique by making it a "unique index". That way, Mongo should prevent two names from ever being the same by throwing an error. |
Ah sure, my question was not regarding forcing uniqueness and ensuring an artist does not create the same asset name twice. It's just that the artist might make So:
The shot names clash and are not allowed - they are not unique, even though they are unique in their hierarchy. Or am I missing your point? |
Ah I see what you mean. I would use tags only as a cosmetic addition and
pick a name that is unique on its own. For example, one of those can be
called `s01e01sh010` and the other `s01e02sh010` and then give them tags to
help with visual sorting and directory layout, and maybe a label to reduce
visual clutter in loader and launcher, like `sh010` for one of them.
In practice, I would probably establish somewhat of a convention on names
that are a little easier on the eyes and to remember. Like `kr0250` or
`pr1500`, where the initial two characters are the name of a sequence such
like "Kongo Returns" and "Prologue". The first two numbers could be the
episode or what not and the latter a shot. That's the convention used at
Framestore per film and I still remember several letter number
combinations. :)
Point is, silo is just cosmetics and so is tags. They can help you visually
organise things but shouldn't affect pipeline functionality. Sticking to
that should enable an arbitrary directory depth for example, whilst still
being compatible with tools built for projects with a shallow layout.
…On Sat, 24 Mar 2018 16:28 Roy Nieterau, ***@***.***> wrote:
Ah sure, my question was not regarding forcing uniqueness and ensuring an
artist does not create the same asset name twice. It's just that the artist
might make sh2010 in episode one, and do the same in episode two. The
second cannot be named sh2010 because it's the same as the other.
So:
s01e01/sh010
s01e02/sh010
The shot names clash and are not allowed - they are not unique, even
though they are unique in their hierarchy. Or am I missing your point?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#308 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACDZPqocfgC35VMvnavC8jUO58gURm5qks5thnQ7gaJpZM4RvEhl>
.
|
I applaud where this is heading! I agree that In terms of asset names. I'd restrain from putting any restriction on these apart from having to be unique. The system simply shouldn't allow you to make a second |
@mkolar did you ever get around to taking another look at this? |
Long time sleeper topic :). We've gotten around to this recently and did a test implementation in our fork of avalon-core. We found that silo was actually present as a requirement in many places so removing it isn't trivial at all. Instead as a intermediate step we opted for adding option to have silo exists in the db as any other asset as we needed to allow tasks to be created on it. This asset is identical to all others, with the only difference being that it's For the hierarchy we're using exactly what was proposed here however we've named the data member here are the PRs in our fork to have a look at. removing of silo is somewhat dependent on allow hierarchy in the system. https://github.com/pypeclub/avalon-core/pull/12/files |
Closing this as it's been implemented, quite some time ago :) |
…d_subset_manager Harmony - add SubsetManager to menu
Issue
Currently it's doesn't seem possible to create more complex hierarchies using avalon than the one in the default config https://getavalon.github.io/2.0/reference/#project-configuration-api
A deeper hierarchy is often needed, especially for bigger projects like features and episodic TV.
{root}/{project}/{silo}/{asset}/work/{task}/{app}
with simple episodes this could still work, having each episode as a silo
{root}/{project}/episodes/{silo}/{asset}/work/{task}/{app}
But there are also more complicated scenarios:
now to get to those shots in a template it might even be hard to specify the member names
{root}/{Folder1}/{Folder2}/{Folder3}/{shot}/work/{task}
Proposal
The system we use outside avalon right now is to save anything above
shot/asset
to a member calledhierarchy
. Our templates then look like this{root}/{hierarchy}/{shot}/work/{task}
wherehierarchy = "development/teaser/shots
In term of avalon this path member could always contain
silo
and could prepend any other visual parents or categories. It would allow creating completely arbitrary folder structures.This whole thing stems from the fact, that we're technically unable to convert our ftrack project structures to avalon, because it's lacking the granularity we need.
The text was updated successfully, but these errors were encountered: