Vizard 3 sensor plugin
I'm trying to port a Vizard 4 (sensor + extension) plugin I wrote to also work with Vizard 3.
So far I got all the basic sensor stuff working, but in vizard 4 I got access to some custom python functions for the tracker. I would also like to port these to the vizard 3 plugin but I can't figure out how to add the functionality. The sensor example code only uses the Command() function to recieve communication. The PythonPluging example does add some new python callable functions but I can't combine the two. Is there somewhere an example on how I could do all this? |
Are you referring to customizing the extension interface within the C++ plugin using the Python_SetExtensionCode function? If so, you can still customize the interface in Vizard 3.0. Instead of using Python_SetExtensionCode, you need to use PyRun_SimpleString. You also need to add the following to the end of the code string:
Code:
"viz.upgradeExtension('myextension.dle',MyExtension)\n" Code:
char *code = "class MyExtension(viz.VizExtension):\n" |
What is the correct way of returning values in de command function, Vizard 4 had a nice .set() method. I can't seem to find something similar in the vizard 3 example codes.
I did see you could extend the float data array but I would also like to be able to return some strings with certain tracker error messages. |
All times are GMT -7. The time now is 05:29 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC