PDA

View Full Version : fprint a fileImport command?


indestructibleman
08-25-2006, 08:06 PM
i'm making a script that will read a scene and write a mel script that will rebuild that scene, referencing other scripts and files.

i need to put in a fileImport command. however, to my knowledge a fileImport command must have quote marks in it to work.

to use fprint to print a command, i have to put that command in quotes. the quotes in the fprint command interfere with the quotes in the fileImport command.

any suggestions for getting around this?

if (`objExists sc_allCTRL`) fprint $fileId "file -import -type "mayaBinary" -options "v=0" -pr "scenes/colorwrap009nochar.mb";";

JBarrett
08-25-2006, 11:20 PM
You need to escape each quote with a backslash, like so:
if (`objExists sc_allCTRL`) fprint $fileId "file -import -type \"mayaBinary\" -options \"v=0\" -pr \"scenes/colorwrap009nochar.mb\";";

indestructibleman
08-25-2006, 11:36 PM
that's the trick.

thank you.

CGTalk Moderation
08-25-2006, 11:36 PM
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.