Hi,
I’ve been prototyping a new sort of tool in the past week and would like to hear your take on it.
https://github.com/mottosso/be/wiki
It’s available for both Windows, Linux and OSX and is a method of running software in context with a project without having to specify paths, and looks like this.
$ be in spiderman shot01 animation --enter
$ maya
Launching Maya, for Animation in Spiderman, Shot 01..
It works by associating an item in your pipeline - asset, shot, level etc. - with a format string, the typical Python function you get with strings, "my name is {}".format("Marcus"). The format string defines a directory structure, by mapping the arguments given, in the above case spiderman, shot01 and animation to various parts of your design.
shot: {cwd}/{0}/shots/{1}/{2}
Software aliases are defined on a per-project basis in a similar fashion to how templates are defined; a per-project yaml file with one or more aliases pointing either directly or indirectly to the software it relates to, such as
alias:
- maya: start "" "c:/program files/autodesk/maya2016/bin/maya.exe"
The alias is then available upon entering a project.
In addition, I’m also experimenting the the concept of “presets”. A method of encapsulating a full project configuration in a GitHub repository and registering it with another GitHub repository acting as a central database of shared configurations, such that you can build, share and later use curated configurations by others.
$ be new film-project
The above would then start by looking locally, for any existing presets you’ve defined or downloaded earlier, and otherwise start looking through the database. I’ve mocked up a web application visualising the currently available ones here.
And there’s instructions for making your own, and registering them for others to enjoy here.
Presets then contain either just the configuration, or can include starter-content, like basic models, rigs, shaders, sound, music, you name it. The idea is for anyone who downloads your preset to get going quickly with a configuration of their choice; such as a preset for “animated-ad” or “action-game” etc.
Have a look and let me know what you think, there’s some thoughts about the future in the issues section, in particular about entering a running project. Being an early alpha/prototype, there is lots of room to grow and for feedback, but templates are quite well-defined and versioned so you can start designing a new project today, or encapsulating the one you use at your company.
Best,
Marcus
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/1a43a0af-226e-4d85-8f53-66c64751220d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOA41fYfq5%2BN4HuJ8ahxmFws-LqKs1fKj-H5KkEsa%3D%2B%2BSA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Thanks Roy, for getting a conversation started. :)
Great stuff, thanks for sharing.
You are very welcome, Eduardo!
I wonder if be could be combined/integrated with rez to provide the full suite that is similar to what we have internally?
I actually just got together with a studio the other day who is using rez to discuss how be could potentially supersede their in-house tools and we came to a similar conclusion. I got to have a little closer look at what rez actually solved for them and it seems from first glance that a separation can be made clear enough for be and rez to work together.
be does project environment, and a little bit of application environmentFor example, the dependency resolution handled by rez and ecosystem isn’t something be will do, in the same sense that building and jumping between directories isn’t something rez does.
In this case, be would provide available software, and rez would resolve their dependencies and set up their environment.
In regards to application environment, there seems to be two schools of thought. One, which is what rez does, is to (1) build an environment fit for each software into the current process - for example, you might want maya, nuke and houdini. Once built, each application is available to you and you launch the one you intend to work with next.
The other method is wrappers, which is what I originally had in mind for be before learning about the former. In this case, an environment is (2) built according to a project, user and task - more or less everything except an application. The application environment is then built by the wrapper, which is typically a shell script setting up an environment prior to launching the application.
The top-most benefits I’ve found about each is that (1) puts you in a shell environment identical to the one an application will have once launched whereas (2) eliminates the risk of conflicting environment variables, such as not being able to build an environment for both Maya and Houdini due to both making use of LD_LIBRARY_PATH. Though I can see the perceived value of (1), I can’t quite figure out a practical use case for it, whereas conflicts are very real and difficult to work around. Any input here would be most helpful.
Maybe be could have a plugin that could allow it to make references to rez packages, and allow you to be into a context that resolves a set of rez dependencies, and then you end up with full environment and package management?
I’ll try and experiment with this next week, spontaneously I considered having rez trigger on an “enter” script.
$ be in myproject myasset mytask
Building rez environment..
But then the question is, which applications do you build for?
You could pass extras to the be command.
$ be in myproject myasset mytask --apps maya,nuke,houdini14.5
Building rez environment..
Or maybe you could defer.
$ be in myproject myasset mytask
$ be apps maya,nuke,houdini14.5
Building rez environment..
In which case maybe rez could be used as-is, without any particular integration?
$ be in myproject myasset mytask
$ rez maya,nuke,houdini14.5
Building rez environment..
The latter seems perhaps the most flexible, doesn’t incur any development/maintenance costs on part of be and also doesn’t eliminate existing be application environment support nor the use of wrappers.
Would something like that suffice?
The top-most benefits I’ve found about each is that (1) puts you in a shell environment identical to the one an application will have once launched whereas (2) eliminates the risk of conflicting environment variables, such as not being able to build an environment for both Maya and Houdini due to both making use of
LD_LIBRARY_PATH. Though I can see the perceived value of (1), I can’t quite figure out a practical use case for it, whereas conflicts are very real and difficult to work around. Any input here would be most helpful.
Maybe be could have a plugin that could allow it to make references to rez packages, and allow you to be into a context that resolves a set of rez dependencies, and then you end up with full environment and package management?
I’ll try and experiment with this next week, spontaneously I considered having
reztrigger on an “enter” script.$ be in myproject myasset mytask Building rez environment..But then the question is, which applications do you build for?
You could pass extras to the
becommand.$ be in myproject myasset mytask --apps maya,nuke,houdini14.5 Building rez environment..Or maybe you could defer.
$ be in myproject myasset mytask $ be apps maya,nuke,houdini14.5 Building rez environment..
In which case maybe rez could be used as-is, without any particular integration?
$ be in myproject myasset mytask $ rez maya,nuke,houdini14.5 Building rez environment..The latter seems perhaps the most flexible, doesn’t incur any development/maintenance costs on part of
beand also doesn’t eliminate existingbeapplication environment support nor the use of wrappers.Would something like that suffice?
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAGir9OAunGD8Vythjw7P_ixDT74CFsAVug%3DW2B4A-vAw%40mail.gmail.com.
Thanks Justin. That all makes sense to me.
I wanted to show some exciting progress!
Gists means you can make a project configuration and host it as a GitHub gist. It can also be registered with the be database and be given a shortname.
The really cool thing is that tab completion now works and maintains a live connection to the templates you design, which means you can browse projects, and all existing assets and shots and levels and whatnot in your project by hitting TAB.

Let me know what you think!
And it would be great if you can perform any particular action with an app in that environment, such as
$be in spiderman myshot mytask
$be --app maya --action render
$be --app maya --action publish
Hey Liju!
That’s great to hear, I’ve heard many others telling me this too. It would seem as though it’s scratching a common itch.
About your suggestion to run applications via be, this is what wrappers are for, or Rez. Because an application can sometimes require such a heavily specialised environment - with dependencies towards other applications for example - beyond just knowing about show-specific metadata, it’s better suited for a dedicated utility.
In the simplest sense, you can get what you ask through be with a slightly alternative syntax.
$ be in spiderman myshot mytask
$ maya --action render
In which case maya is either exposed to your PATH or generated on the fly with be. maya is in this case relative your project, and could either be a bespoke wrapper script, or something that solves a Maya environment using Rez.
For example, a maya wrapper could look something like this.
import os
import sys
import argparse
import subprocess
parser = argparse.ArgumentParser()
parser.add_argument("--action")
args = parser.parse_args()
if args.action == "render":
os.environ["PATH"] = "/path/to/vray-plugin"
if args.action == "animation":
os.environ["PYTHONPATH"] = "/path/to/animation-shelf"
sys.exit(subprocess.call("/path/to/maya"))
$be —app maya —action publish
Hm, not quite sure what to make of this action. What does it mean for Maya to launch given the action “publish”?
@all, would it be possible to post a short shippet of the general layout of the directory structure you are familiar with from work? I’m looking to stress-test be to see whether there are necessary directory structures it may have trouble handling.
For example, something like this would be great.
projects
├── spiderman
│ ├── assets
│ │ ├── peter
│ │ ├── mjay
│ │ │ ├── model
│ │ │ └── rig
│ │ └── harry
│ └── film
│ ├── seq01
│ ├── seq02
│ │ └── 1000
│ └── seq03
└── hulk
Hm, not quite sure what to make of this action. What does it mean for
Maya to launch given the action “publish”?
$be —app maya —action publish
< maya file to publish > can be easily generated through Rez or any packaging tool through the current environment,
eg:
/jobs/< job_name >/users/< my_name >/workspace/< seq >/< shot >/< task >/maya/my_maya_file.mb
< my_name >, < seq >, < shot >, < task > are already made available.
But what exactly would become published?For example, if I work on animation for shot 5000 of The Avengers, and I save my scene as `my_scene.mb`, alongside other files named equally poor but differently, would publishing this shot mean to publish the..A) ..latest modified one?B) ..the one with the highest number (if any; possibly version number)?C) ..all files?
It seems to me that publishing would require at least one more level of specificity, which in this case would be the actual file. One more if also specifying what portion of a file to publish, such as Mesh A, but not Mesh B.