[Closed] problem with group names
Hi guys!
I need some help…I hope its not too messy. Am not a programmer so maybe its just a silly thing but i cant find the correct way to do this:
(
$.position=[0,0,0]
resetxform $;
macros.run “Modifier Stack” “Convert_to_Poly”
exportfile (maxFilePath + “…/granny/” + $.name +”.gr2″) selectedOnly:true using:Granny_Exporter
macros.run “Modifier Stack” “Convert_to_mesh”
exportfile (maxFilePath + $.name +”.fbx”) selectedOnly:true
max undo
max undo
max undo
max undo
)
This is an script i have done to make the export proccess more handly but it only works with meshes, not with groups… I dont know how to do to get the group name.
Any of you knows how to achieve this?
Thanks for your attention and help mates!
**I update it beacuase am not able to get another thing either…
How could I do to
exportfile (maxFilePath + "../granny/[U][B](folder with the name of the object/group)[/B][/U]/" + $.name+".gr2")
Thanks!
A friend has give me the answer, if anyone needs it:
grou = “”
FOR obj in selection WHERE isGroupHead obj DO grou = obj.name
if grou == “” then
(
grou = $.name
)
grou
destination = “D:\destination_folder\”
makedir (destination+ grou) all:true
$.position=[0,0,0]
resetxform $;
macros.run “Modifier Stack” “Convert_to_mesh”
exportfile (destination+ grou + “\” + grou +”.gr2″) selectedOnly:true using:Granny_Exporter
macros.run “Modifier Stack” “Convert_to_mesh”
exportfile (maxFilePath + grou +”.fbx”) selectedOnly:true
max undo
max undo
max undo
max undo