Introduction to Maya - Modeling Fundamentals Vol 1
This course will look at the fundamentals of modeling in Maya with an emphasis on creating good topology. We'll look at what makes a good model in Maya and why objects are modeled in the way they are.
# 1 09-12-2013 , 10:34 AM
Registered User
Join Date: Dec 2013
Posts: 1

Replacing referenced file part way through script

Hi all,

I'm trying to put together a script which has several steps in it, and mid way through I want to have a referenced file (which is already in the scene) be replaced with a different file that the user specifies.

I think I want to be able to have an "open dialogue box come" up when the user first executes the script, so that they can specify the file they want to reference in. Then at the relevant point in the script have it replace the reference with their selection.

I read on another thread that this bit of script below can replace a referenced file with another one(in this case replacing a cube with a sphere):

file -loadReference "cubeRN" -type "mayaAscii" -options "v=0" "C:/desktop/sphere.ma";


But is there any way to have the script example above somehow link to a file that the user already specified though a dialogue box, instead of the actual line of code pointing to the specific file?

Please can anyone help with something like this?

Thanks.

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads