class-lib derived from ObjectData...ok?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/02/2004 at 01:43, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.207
Platform: Windows ;
Language(s) : C++ ;---------
quiet the same theme as in the other 2 threads...just did put it here to have an own subject for it
I use a class library, C4DLibrary. The class I provide with this Library I derive from ObjectData. Do I have to write member functions pointers for _every_ function ObjectData provides? At the moment I dont do anything, no pointers, and it still works. Of course I would have to make pointers for own functions I want to call, or even for virtual functions of ObjectData I want to overwrite...but how with the other ones? Cinema dont seem to have a problem to find all the functions of ObjectData it calls at the moment....is that just an accidentally effect, or can I trust in it to be reliable? -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/02/2004 at 18:15, xxxxxxxx wrote:
This all depends on where the functions are accessed, i.e. if your library is accessed from another plugin module (another .cdl/.xdl file). I believe that C4D will always call the functions in the module where it's registered. Generally I think that if it works it works and otherwise it crashes immediately, but it's hard to tell without having looked at the whole source.
Since you seem to be pretty capable at low level stuff you might want to have a look in the c4d_objectplugin.h/cpp files to see how C4D deals with your ObjectData internally. It just fills out a structure and there are some defaults for non-required functions.