View Full Version : Question grouping from Arrays

05 May 2011, 04:36 PM
Hello! I'm actually at work right now and not at my computer, so I don't have the entire code to paste, but I think the question is simple enough. I'm working on a script that will batch import .obj files and place them according to data in a CSV file. I've got all of that working fairly well for one set of data which consists of single .obj files to import, group, and move.

The trick is extending this to some other data that exports a bit differently - there are multiple .obj files involved in the overall item, and grouping them up to move is proving tricky. Essentially what is happening is (In psuedocode from memory, I'll update it once I am at home with the actual code):

import(WMOObject) #noprompt
for i in selection do (append WMOArray i)
import(WMOObjectModels) #noprompt
for i in selection do (append WMOArray i)
WMOGroup = group WMOArray

All contained in a loop that iterates what the WMO Object and models are. The problem is that when it comes time to place them, only the objectmodels get placed. The code is something like

ungroup WMOGroup
ObjToPlace = selection

Then I apply the position, rotation, etc, and regroup it.

However only the items in the second imported file are moved.

When I check the array, everything is in the array, but only the stuff from WMOObjectModels is being moved. It's frustrating me.

Am I creating the group properly? Or is it possible that another aspect of my code (I'll post it once I get home) is messing with it?

CGTalk Moderation
05 May 2011, 04:36 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.