Skip to content

Instantly share code, notes, and snippets.

@mottosso
Last active October 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mottosso/023372f071372b1fc0e5 to your computer and use it in GitHub Desktop.
Save mottosso/023372f071372b1fc0e5 to your computer and use it in GitHub Desktop.
Asset Map 0.6 - Packages

Asset Map

  • v0.6

The conceptual overview of content in Magenta along with it's manifestation as a directory tree.

Version 0.6 is about "user directories".

Previous

Motivation

Previously, development files were divided by user - e.g. /marcus/maya and /roy/fusion. The problem was that roles are typically much more diverse than a single artist typically working on just animation, or just lighting and so forth, which makes a user's personal directory complex and wide.

Another problem was that artists typically share work amongst each other, meaning lots of content would be travelling between the private directories.

To solve this, development files are divided by task, like in 0.2. The difference being that the division is made within the /work directory, not above it. Which means publishing remains unaffected.

work/
  animation/
  rigging/
  lighting/
  ...

Changes from 0.5

  • No more "free for all"
    Previously divided by user, development files are now divided by task. The task is not reflected in the /publish hierarchy. Best of both worlds! Humans do what humans do, and computers do what computers do.

  • No more layoutPkg
    Animation is now published from both layout and animation.

  • Many looks
    Before, one look were published per scene. Now multiple looks are published from the same scene as one or more Subsets.

Node Description
A transformation; i.e. input A turns into output B
Transformation from -> to
Instance, the inverse of a file. May have one or more representations
A representation, such as a .jpeg file or .exr sequence
Updated individually
A comment
Artist
Item
Subset
Family
Package
Versioned package

Unchanged.

image

Instance

The inverse of a file.

When a file has been opened/imported into an application, the result is the "instance" of that file.

Item

A directory with /work and /publish directories.

Work and Publish represents private and public files respectively. The private files are worked on in isolation by an individual artist who then "publishes" to the equivalent /public directory where other artist then may fetch it.

Package

The package is a group of subset versions.

  • Artists use packages directly
  • Artists publish packages in-directly
  • A new version of a package is created for each published Subset, such as ben01
  • Packages are only relevant within the /film directory

For example the animator imports a layoutPkg to start animating. He produces a animPkg to be used by lighters who produce a lightPkg to be used by compositors who produce compPkg used by grading and editing.

Motivation

The package compensates for the lack of association between subsets, such as ben01 and table01, where each subset is versioned independently. A package wraps one or more of these versions.

ben01                              animPkg
 v001                     /------->  v001
 v002                    |
 v003 -------------------|
table01                  |
 v001 -------------------/
 v002

Subset

A "subset" is part of an Item.

A subset consists of one or more Pyblish "instances".

Motivation

Sometimes, part of an Item needs to update independently of one another.

For example, in a shot with two characters only one has changed and needs publishing. Another example, a shot where only one render layer has changed and needs publishing.

Instead of publishing the entire Item, needlessly consuming time, space and cpu cycles, a subset may be published and versioned individually.

The name "subset" reflect that it is not the whole Item, but only part of it.

"""Source code to represent a directory tree as JSON"""
import os
import json
def hierarchy_to_dict(path):
if os.path.isfile(path):
return ""
d = {n: hierarchy_to_dict(os.path.join(path, n)) for n in os.listdir(path)}
return d
d = hierarchy_to_dict(r'C:\Users\marcus\Dropbox\projects\MagentaHierarchy0.5')
print(json.dumps(d, indent=2, sort_keys=True))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment