SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.


SM Forums / Maya Questions / Programming / Replacing referenced file part way through script

Programming MEL Scripts, Expressions & Programming Related Topics

Join the conversation. Reply to post
 
Thread Tools
09-12-2013, 10:34 AM   #1
Iotrez
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.
  Reply with quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Reading File... HELP ME PLEASE roryfollansbee Challenge Forum 1 16-04-2016 09:00 AM
File to receive light onto file/ramp [layer shader] marquism Maya Basics & Newbie Lounge 0 10-04-2016 08:21 PM
Urgent help needed Lee Perkins Maya Technical Issues 5 14-10-2011 01:36 PM
file attributes doesn't work Maya 6.0 hosehed Board Questions & Suggestions 0 27-04-2005 02:27 PM
Poly textures, one file or many? contrast Maya Basics & Newbie Lounge 3 21-04-2003 06:04 AM