HI Marcuss,

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 

So, similar to any other action *publish* can be implemented through 
command line. By saying that, *be* looks for its config for publish action 
and invoke the publish tool using the current environment. 
so it would be something similar as, 

  $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.


So, by doing this it could be possible to plug any external publish tool to 
do publish through command line.



On Friday, 3 July 2015 12:28:00 UTC+5:30, Marcus Ottosson wrote:
>
> 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 osimport sysimport argparseimport 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
>
> ​
> ​
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/6c0ff069-f727-41ba-99de-452a97ed2996%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to