Hi I'm trying to import a camera move from Nuke as a .chan file into Maya. Most searches lead here, highend3d and the "ImportExportChan.mel" script. I've placed the .mel into Maya's Scripts Folder, tried executing script both in the command line / Enter (//Error : Cannot find procedure "Impo..Chan",but have other scripts in that folder that work) & loading in the Scripts Editor / Enter, I goto File / Import Options check the File type and there's no .chan option. Has any body successfully imported a .chan file into Maya, if you could let me know exactly how that'd be ace.
Dont multi post
try executing the script in the script editor
Apologies Joojaa still new to this posting environment.
Hey gmask, yeah I've tried in the Script Editor / Load Script select mel tab at bottom make sure the script is highlighted and hit enter. But nothing seems to be working. In the Import Options these no option for .chan file.
I haven't had a chance to look at the script but I doubt the option to import it is going to show up in the import menu. More than likely once you execute the script there's probably a proc you need to run and that will either open an interface or a prompt to select the file. Are there any instructions in the scripts header?
That's what I was anticipating as well, but didn't think that I'd have to run another procedure for the interface to show. The header notes don't supply any instructions for the "ImportExportChan.mel"script. I have had a response from VFXTalk stating that a line of code needs to be changed in the script, they are asking their Maya Artist. Thank you for your advice.
Well probably you just need to source the script. Not all users make use aof a inpoint that has the name of the mel file. hence the error since really the FACT that the filename si simething doesnt mean the proc is.
Well whoever worte thsi script didnt know how to deploy scripts in maya!
to use it do this:
source ImportExportChan;
Then you nee to call on of the procs in the file eitrher:
importCamChan
importObjChan
exportCamChan
exportObjChan
or so on...
depending on what you wanted to do
Anyway if you cant read how the script is composed then maybe the script wasn't intended for your use level? And thus could have a lot for other issues because it doent do the stuff nicely for your purpose.
Theres a alternative too:
http://www.highend3d.com/maya/downloads/me...keCamExport.mel
Just put the file into your folder and run source NukeCamExport
Again its a bit of bad scripting practice but 99% of maya users dont actually know how to deploy scripts, whereas they do know how to write them
Hey Joojaa,
It's all quite simple after your explanation, and having actually read the script the global proc's are clearly stated, as you've pointed out for me. The importCamChan is the proc I need, as our Lead Compositor is a Nuke Artist and has created camera moves within Nuke. As one of the CG assistants I'm trying to get the two (Nuke to Maya) synced.
Thank you for the link NukeCamExport that's brilliant, but our dilemma is Importing a .chan file into Maya. I have tried the importCamChan : selected a camera / typed the proc importCamChan / enter, no luck arrrrrrgh. Meeting with the CGI Team today hopefully we'll pull a rabbit out of the hat, or get a .chan file into Maya hurray.
Again thank you for your concise descriptive response, as I'm still fully trying to understand the various ways of deploying .mel scripts into Maya.
QUOTE(celestialfo @ 04/21/09, 11:05 AM) [snapback]306377[/snapback]
/ typed the proc importCamChan / enter,
Nono, leave the proc out its just used when you declare it! Try typing
importCamChan / enter
QUOTE
as I'm still fully trying to understand the various ways of deploying .mel scripts into Maya.
Theres basically 3 ways
- One mel file, that has in point in other words the mel file contains a procedure that is EXACTLY the same as the file name implies ie. a file containing global proc fooBar(...,...) is in a file named fooBar.mel
- The file is just simply sourced. This si a not very good way of doing things but it works. Its often seen done because this is how the mel gets developed still not practically elegant, yet usefull. (a variant of this wich is TOTALLY unacceptable is a just plain functionless code thats menat to be put in shelves... no good)
- The file contains install /use instructions somewhere, follow them. Mainly because user might have a module several files or some more complex scheme. Or might want to add the data into persistence using a line in userSetup.mel etc.
Possibly installer. On that note installers aren't easier they are just as had if the deployment is badly executed, so in sense worse. Because there's so few peopel that can do a deployment with instructions it would self evident, that making a installer is out of the question. After all using a isntaller properly requires you to be able to tell the computer the same thing you just failed to tell the users in plain english (worse you need to do it 3 times once for each platform maya runs on). So if they cant write install instructions to mel file then how am i expected to trust them with unlimited access to my computer and screw things up EVEN better.
No other ways are available. even if these would seem like easy to follow 1/2 of script submitters fail on this point. In practice i need to review all scripts i install line by line before use or install.
Hey Joojaa,
It worked hurray! Now that I understand what source means (highlight) the particular area of the script and that instead of loading into the Script Editor I needed to Source Script (which was exactly what you told me), had to type in importCamChan(1,1) which the author of the script emailed me, then it was Happy Days! There's still some tidying to do.
Once again thank you for your help in the world of MEL.
@JOOJAA. WHERE DO I FINDÂ
ImportObjChan
ExportObjChan ?