|03 March 2009||#1|
Join Date: Mar 2006
printing text with " "
In my script I want to print the render.exe path into a .bat file.
At the moment the script line looks like this:
print ("Render -r mi -binary 0 -cam " + $camera + " " + $selectedScenes[$i] + "\r");
This works fine and prints the correct text into my file however I need to print the full path of the Render executable. In order for it to render it needs to look like this at the start:
However when I try and insert this into the script. eg
print (""C:\Program Files\Autodesk\Maya2008\bin\Render.exe" -r mi -binary 0 -cam " + $camera + " " + $selectedScenes[$i] + "\r");
I get a syntax error. It doesn't seem to like the two "" at the start.
How can i fix this.
|03 March 2009||#2|
Maya Plug-ins Developer
Join Date: Feb 2007
If you want to use double quotes inside a string you have to escape it, like you did with the \r.
print( "\"quote\"" ) will output "quote".
Freelance | Consulting | Development | Autodesk Authorized Developer
Boole | Stitch | Konstrukt | SmartDuplicate | Wire | Contours | MultiTool
|03 March 2009||#5|
Join Date: Sep 2003
Thread automatically closed
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
|Thread Closed share thread|