WorldViz User Forum  

Go Back   WorldViz User Forum > Plug-in development

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1  
Old 03-18-2010, 10:41 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Yes, you can manually reallocate the data field. Just make sure that you set the dataSize member to the new size.

However, in your case I would suggest directly creating Python objects within your modifier plugin. For example, if you wanted to make some raw byte data available to your script, you could do the following:
Code:
PyObject *imageData = PyString_FromStringAndSize(buffer,bufferLen);

//Add python object to __main__ module
PyModule_AddObject(PyImport_AddModule("__main__"),"myImageData",imageData);
After this code is executed, there will be an myImageData variable available in the __main__ scope of your script.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a Vizard Sensor Plugin farshizzo Plug-in development 25 08-01-2019 12:24 AM
Could not find plugin to load objects... halley Vizard 1 05-30-2006 11:01 AM


All times are GMT -7. The time now is 05:38 PM.


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