Page 2 of 2
Re: Export / Translate ocs - camera file to fbx or maya camera
Posted: Sun Aug 21, 2011 6:27 am
by Refracty
No problem, I really appreciate any help from you Face.
Thank you.
Re: Export / Translate ocs - camera file to fbx or maya camera
Posted: Sun Aug 21, 2011 6:42 am
by Tugpsx
i know this is maya specific, but i wonder if it can be applied to other exporters/importers would be interested in a Carrara/ Daz Studio version. Will check if I can intigrate this into the exporter script I currently use since camera info is not used with obj exports.
Re: Export / Translate ocs - camera file to fbx or maya camera
Posted: Sun Aug 21, 2011 3:42 pm
by tchoa
@Refracty: in my last post, to be more explicit, I would say that the simplest way to overcome the fileDialog2 restriction (to maya 2011+) in the current script... is to enter the path in the 'OCS File' field in the user interface. Do not know if it's with '/' or '\' on osx/linux... Then you just have to click the Reload button to parse the file and have 'Cameras' menu refreshed accordly.
Anyway I will put an update that should work correctly for older versions of maya.
@Tugpsx: feel free to pick some code inspiration in the script since it is ascii 'C like'. It's not a general method to parse the xml in the ocs, but this could be done in python i.e. for general purpose.
F
Re: Export / Translate ocs - camera file to fbx or maya camera
Posted: Sun Aug 21, 2011 3:52 pm
by tchoa
Script updated (same link):
OCScameras.mel
Not tested. The 'Load' button should work with maya version < 2011.
Let me know if it does not work.
F
Re: Export / Translate ocs - camera file to fbx or maya camera
Posted: Sun Aug 21, 2011 6:19 pm
by Refracty
Thanks to you tchoa for your fast response.
I just tried it.
The only problem is that I get an error when I try to load an .ocs
It sais: // Error: Object not found: OCScameras|OptionMenu. //
Any ideas how this could be fixed?
Thank you.
Cheers
Refracty
Re: Export / Translate ocs - camera file to fbx or maya camera
Posted: Sun Aug 21, 2011 10:46 pm
by tchoa
The cause was a bug in maya 2012 related to the parenting of the menuItem to the optionMenuGrp OCScameras (and renamed to OCScameras|OptionMenu to find the parent).
Anyway this fix doesn't seems to work with older versions of maya or isn't needed (don't know that because I only have the 2 last versions of maya). So I changed to a simple optionMenu.
Updated version:
OCScameras.mel
Wish it's compatible now.
F
Re: Export / Translate ocs - camera file to fbx or maya camera
Posted: Mon Aug 22, 2011 5:43 am
by Tugpsx
Thanks

Re: Export / Translate ocs - camera file to fbx or maya camera
Posted: Mon Aug 22, 2011 6:24 am
by Refracty
tchoa,
this is great. It working perfect now with Maya7. I don't like to repeat myself but you are brilliant.
Kudos to you.
Thank you.
Refracty