Selected Tag: pipeline

2 posts

Modify File References before they are loaded

When working on multiple projects you might want to use assets from other projects. Very often a file referencing pipeline makes this difficult though as Maya stores file references with absolute paths when you are not using Maya projects. To avoid this you can hijack the Referencing procedure with a callback.

The callback triggers any function you define. In the function you have access to the file path of the reference to do some checks and you can cancel the loading of the reference or manipulate the path to your liking. Create a function somewhere in your pipeline. Your function needs 3 parameters: parameter 1 is the return code (a boolean to approve or cancel the reference load operation) parameter 2 is the file object which holds the path and file information parameter 3 is client data which you can pass in to your function from the callback

[…]

Creating a perforce client with command line

Creating a p4 workspace through command line is not that fast forward and the documentation about it is rather confusing. You want to set the Root Directory, some settings and the proper mapping. Here is how you set it up in your pipeline. First, create a client workspace manually and configure it as you want including the default mapping you want. This workspace is not to be used by a user but will be used as a template to inherit the mapping and some settings. Name it properly and make sure not to delete it. In my case I called it “templateWorkspace“ Now to the real magic – the command:

[rootFolder] = client root folder [templateWorkspace] – an existing workspace with proper settings and mappings [nameOfNewWorkspace] – name of the new workspace you want to create   Hope this helps some of you guys Please follow and like: