Thread: plugins help
View Single Post
  #4  
Old 08-11-2006, 03:18 PM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
The data field is used to pass floats back to Vizard. You can add plugins to scripts and call get() on them to access the values in the plugin's data field.

custom = viz.add('customnode.dlc')
print custom.get()

custom.get() will return a list of floats. The lenght of this list is defined by the dataSize field that you set in the InitCustomNode function. Sensor plugins use this to pass data to Vizard. See the sensor plugin sample for an example of how you can fill the plugin's data field with values that can be accessed in Vizard.

When you call command() on a plugin in Vizard, the CommandCustomNode function of the plugin is called with the arguments you passed it in Vizard. Check out the test*.py scripts in the root directory of the plugin SDK to see some examples of how command() is used.
__________________
Paul Elliott
WorldViz LLC
Reply With Quote