- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
in the previous version of Verge3D (which were MaxPlus-based) we extensively used raw pointers to nodes, textures etc obtained using Wrapper.GetUnwrappedPtr() method. This allowed us passing these pointers to python modules written in C++. In C++ we did simple type casting to restore link to the original object:
INode *node = (INode *)nodePtr;
This is nor longer the case with maxscript-based pymxs. It comes with refs.getAddr(node) method which according to the documentation should give us pointer to maxscript Value (or MAXWrapper) instance but this code:
INode* node = ((Value*)nodePtr)->to_node();
// or
INode* node = ((MAXWrapper*)nodePtr)->to_node();
does not work crashing the plugin.
It looks like refs.getAddr() is pointing to something else... Is there some other method to get raw pointer to INode (or Texmap etc) using maxscript/pymxs ?
Thanks!
Solved! Go to Solution.