WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-11-2006, 12:45 PM
paulpars paulpars is offline
Member
 
Join Date: May 2006
Location: Kingston, Ontario
Posts: 14
plugins help

Does anyone know a bit about how the plugins work (i'm using the custom node plugin) so that they could answer a few questions about them? Thanks.
Reply With Quote
  #2  
Old 08-11-2006, 01:46 PM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
If I don't know the answer, then I'll find it. What do ya need to know?
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
  #3  
Old 08-11-2006, 02:14 PM
paulpars paulpars is offline
Member
 
Join Date: May 2006
Location: Kingston, Ontario
Posts: 14
in the main.cxx file there is an option to change the size of the data field to any value in order to put values into the data field. I don't understand how this works or how to store data so it can be retrieved from vizard. Also, in the notes it says you can perform a command on the plugin by calling custom.command(0,’’,0,0,0,0). Would you be able to explain how this works?
Reply With Quote
  #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
Reply


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 05:09 PM.


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