WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 4 votes, 4.00 average. Display Modes
  #1  
Old 11-05-2010, 08:25 AM
nige777 nige777 is offline
Member
 
Join Date: Nov 2007
Location: UK
Posts: 78
Question GEODE Names

Ok so I'm getting myself al tied in knots here

I'm trying to extract the GEODE name (as assigned in max) from all the nodes in an IVE file and reassign them them back to the objects so I can access them through viz.pick(1) like this:
Code:
#Fill components list with model child nodes and then sort it
components = model.getNodeNames()
#components.sort
print components #DEBUG 

#Traverse through scene graph children one by one and assign Node Names to respective child nodes
for a in range(len(components)):
	if components[a] == "__VIZARD_NODE__": #Ignore root node
		break
	else:
		model.getChild(components[a]) == components[a]
Firstly I get a load of warnings like this:
Code:

** ERROR: Could not find child with name 'Ceiling Tile 600 x 600'
** ERROR: Could not find child with name 'Concrete - Cast In Situ'
** ERROR: Could not find child with name 'Concrete - Cast-in-Place Concrete'
(which I presume is because Vizard is trying to find child nodes which are in fact materials??)

Secondly all I get returned from the pick routine is the lowest transform on the Node, which in most cases is the material. I've poured over the forum and the help manual but after two days trying to sort this I've only succeeded in tying myself up in knots


Confusingly (for me!) this technique worked with an OBJ file from sketchup but the files I need to work with are Revit files I'm bringing in through Max (as fbx to IVE) -

Could someone please help me out of my friday night hole and suggest a way of achieving this - Thanks
Reply With Quote
  #2  
Old 11-07-2010, 10:14 AM
nige777 nige777 is offline
Member
 
Join Date: Nov 2007
Location: UK
Posts: 78
By the way 3d files are chosen by the user at runtime which is why I'm struggling to get a handle on the geode name


I've a feeling this is probably a lot simpler than I'm imagining it to be (these things quite often are )
Reply With Quote
  #3  
Old 11-07-2010, 03:49 PM
nige777 nige777 is offline
Member
 
Join Date: Nov 2007
Location: UK
Posts: 78
Talking Solved

Just in case someone else has a mental blockage over this (like me ) and just to close the thread,

I solved this by creating a dictionary that mapped the node id to the geode name, then its a simple matter of indexing to retrieve the GEODE name -

Code:
#Fill components list with model child nodes and then sort it
components = model.getNodeNames()
components.sort

#Traverse through scene graph children one by one and create dictionary map
for a in range(len(components)):
	if components[a] == "__VIZARD_NODE__": #finish loop at root node
		break
		
	elif components[a][-5:] == "GEODE":
		k = model.getChild(components[a])
		dict[k] = [components[a]]    #Create dictionary
		continue
The second condition statement checks the node name refers to geometry before creating a dictionary entry

Last edited by nige777; 11-07-2010 at 03:51 PM.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
retrieve Object names Geoffrey Vizard 11 12-11-2009 04:26 AM
Documentating function names aaThomas Vizard 5 05-15-2007 09:50 AM
changing the texture of an avatars shirt/body bailenson Vizard 19 05-04-2006 10:00 AM


All times are GMT -7. The time now is 04:13 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC