![]() |
|
|
|
#1
|
|||
|
|||
|
I'm trying to pull the information from MotionStar into Vizard with the Ascension plug-in. I'm running a for-loop to grab the sensors and assign to a sphere, then trying another for-loop to grab the bones and link to the avatar to a sensor. Here is a my code
import vizconfig import vizshape import time viz.go() female = viz.add('vcc_female.cfg') ascension = viz.add('ascension.dle') sensors = ascension.addMotionStar('10.32.16.31') # Array of color to assign to sensors colors = [viz.RED,viz.BLUE,viz.YELLOW,viz.GREEN,viz.PURPLE,v iz.GRAY,viz.WHITE,viz.ORANGE,viz.YELLOW,viz.GRAY] bones = ['Bip01 Head','Bip01 Spine1', 'Bip01 L Forearm', 'Bip01 R Forearm', 'Bip01 L Hand', 'Bip01 R Hand','Bip01 L Thigh', 'Bip01 R Thigh','Bip01 L Foot','Bip01 R Foot'] # Loop to grab each sensor from MotionStar for s in sensors: # i=sensors.getBirdNumber() # print i model = vizshape.addSphere(0.05, color=colors[s.getBirdNumber()]) # model = vizshape.addSphere(0.05) viz.link(s,model) # print s.getBirdNumber() #for s in sensors: prints for b in bones: head = female.getBone(b) viz.link(s,head) import vizcam vizcam.PivotNavigate(center=[0,1,0],distance=1) PLEASE HELP!! |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Vizard 4 Beta Testing | farshizzo | Announcements | 0 | 02-01-2011 11:46 AM |
| Vizard 4 Beta Testing | farshizzo | Vizard | 0 | 02-01-2011 11:46 AM |
| Vizard tech tip: Using the Python Imaging Library (PIL) | Jeff | Vizard | 0 | 03-23-2009 12:13 PM |
| Can Vizard export data in XML format | ginaty | Vizard | 3 | 02-26-2009 03:54 PM |
| Export from 3Ds Max to Vizard | pattie | Vizard | 5 | 08-26-2006 12:20 PM |