PDA

View Full Version : Exporting Groups only


loran
02-22-2006, 01:26 PM
I wish to export several groups to .w3d but no isolated objects.
My script works fine but it export group and export group objects too.
Do you know any way to restrict to groups only?
button go "exporter tout! "
on go pressed do
(
outputPath = getSavePath "Save to:"


for obj in objects do
(
max unhide all

select obj
max hide inv --hide unselected obj
objName = obj.name
exportfile (outputPath + "\\" + objName + ".w3d") #noprompt
)
)

j-man
02-22-2006, 03:47 PM
Hello,

I don't exactly understand your question, but this short script will make an array containing arrays of the members of groups, for example if you have two groups in your scene, the first array will contain all of the members of the first group, and the second array the members of the second group.

test it and see!


grps=#()
for h in helpers do if (isgrouphead h)==true then append grps h.children


You can then iterate through the arrays held within grps and export them as different files.


loran
02-22-2006, 03:56 PM
thx !
but I got it from a friend
button go "exporter tout! "
on go pressed do
(
outputPath = getSavePath "Save to:"

--for obj in objects do

for obj in objects do
(
if isGroupHead obj then
(
max unhide all

select obj
max hide inv --hide unselected obj
objName = obj.name
exportfile (outputPath + "\\" + objName + ".w3d") #noprompt
)
)

CGTalk Moderation
02-22-2006, 03:57 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.