WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 08-10-2006, 10:35 AM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
I like the workflow of your second alternative, defining the positions of the control points in the modeling software. You could create a naming convention for the child objects in Blender, get their positions with the <VizNode>.getChild() fucntion in a loop and automaticly generate the paths.

Code:
CP_COUNT = 50
CONTROLPOINT_PREFEX = 'control_point'

controlPointList = []
def generateControlPoints():
	for cpNumber in range( CP_COUNT ):
		pointNode = bigMap.getChild( CONTROLPOINT_PREFEX + str( cpNumber ) )
		if pointNode != None:
			cp = viz.addControlPoint()
			cp.translate( pointNode.getPosition() )
			cp.rotatequat( pointNode.getQuat() )
			controlPointList.append( cp )
		else:
			print 'Missing control point node: ' + CONTROLPOINT_PREFEX + str( cpNumber )

Does anyone else have a solution to this common task?
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
 


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


All times are GMT -7. The time now is 09:23 PM.


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