![]() |
|
|
|
#1
|
|||
|
|||
|
Have you tried the following?
Code:
model.getChild('Node-2').getChild('Geode-1')
|
|
#2
|
|||
|
|||
|
Thanks for the reply..
Yeah, actually I tried that.. This returns a seemingly random instance of the Geode-1, which is not the Geode-1 I want.. I always look at the World Position of the Geode to distinguish them. I can read the correct coordinates from the Vizard Inspector. |
|
#3
|
|||
|
|||
|
I'm not sure I understand what you mean by a "random instance". Is it a valid instance? Is the position of the instance different every time you run the script?
My guess is that both "Geode-1" nodes refer to the same instance. This means it will have multiple parents, and multiple global positions. So you are most likely getting the global position from the first parent ("Node-1"). In this case, the solution would be to insert a node below "Node-2", ensuring the path to the desired instance of "Geode-1". Try the following code: Code:
geode = model.insertGroupBelow('Node-2')
|
|
#4
|
|||
|
|||
|
Wow, thanks a lot.. That seems to be the solving line..
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multiple Geodes? | shivanangel | Vizard | 2 | 05-06-2010 08:01 PM |