global proc stupidMayaGlobals(){//Getting Selectionstring $sel[] = `ls -sl`;//Declaring outside loop so I can access it laterstring $objects[];//Cycle through selection for ($object in $sel){ //Get shape node of current string $shapes[] = `listRelatives -shapes -path $object`; //Get parents of shape node $objects =…
string $objects[] = `listRelatives -allParents $shapeNode`;if (size($objects)>1){ //Do whatever you want with the parent or instances. Parent is $objects[0]} Hope that helps. I'll try and see if I can get it incorporated in my FBX Exporter.
A very good idea! Would that still work for objects moved from the origin and had 'Freeze Transformations' applied? Or does it work on World-space values rather than object-space?
Hi all, Sorry to create another thread on .fbx exporting, but I thought I'd pose you a query: I have my environment blocked out in Maya and plan to export it into UDK as an .fbx file. Now I know that I'll have to go through and manually delete and replace all of my instanced objects, (-_-) but I was wondering if anyone…
Thanks to the both of you! I'll have a bash at using it when I'm back home next week :D Edit: Hmm, I wonder if there is a way to make the script ignore objects that are instanced?
i just made a mel script that does a batch export of my objects, and moves them to 0 0 0 before export and puts them back after. pretty simple thing to make.
prolly possible, i will look into how sometime in the next day or 2. that is prolly easier in max since it;s easier to tell a instance from a object, but i should be able to check for rednundent shape data, and not export those ones.