Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/11/2002 at 09:08, xxxxxxxx wrote:
User Information: Cinema 4D Version: 8.012 Platform: Windows ; Mac ; Mac OSX ; Language(s) : C++ ;
--------- I can include the c4d_particles.h and assumed I could make the following call: (*TPOS->MSYS->NumParticles)(); The compiler tells me that 'term does not evaluate to a function'. Any ideas? How do I call the functions within the 'TP_MasterSystem' structure? darf - bhodiNUT
On 09/11/2002 at 17:24, xxxxxxxx wrote:
does anyone know how to do this?
On 10/11/2002 at 06:52, xxxxxxxx wrote:
Quote: Originally posted by mdme sadie on 09 November 2002 > > * * * > > does anyone know how to do this? > > * * * Sorry, but your posts don't accelerate the support process. (In fact they just slowed it down since I had to reply to this.) Further one-liners will be deleted. /The stern moderator...
On 10/11/2002 at 06:57, xxxxxxxx wrote:
Quote: Originally posted by darf on 08 November 2002 > > * * * > > I can include the c4d_particles.h and assumed I could make the following call: > > (*TPOS->MSYS->NumParticles)(); > > The compiler tells me that 'term does not evaluate to a function'. Any ideas? > > How do I call the functions within the 'TP_MasterSystem' structure? Who ever said member function pointers were nice? (They're a good candidate for worst C++ syntax.) However, you're not supposed to be using these structures. Look further down at TP_MasterSystem. There you have a real class with real functions. (If you really want to know the syntax, have a look at the TpCall macro.) You can probably get your TP_MasterSystem with "FindSceneHook(doc, ID_THINKINGPARTICLES)". (I'm not 100% sure about the ID part.)
On 13/11/2002 at 08:38, xxxxxxxx wrote:
Quote: Originally posted by Mikael Sterner on 10 November 2002 > > * * * > > You can probably get your TP_MasterSystem with "FindSceneHook(doc, ID_THINKINGPARTICLES)". (I'm not 100% sure about the ID part.) > > * * *
Tried this. There is a valid pointer received but I am not sure where to go to retrieve the actual data that would contain the TP_MasterSystem. GetData retrieves a BaseContainer with a couple of items ( LONGs ) that are not of importance in this case ( I don't believe they are anyway ). I also tried GetCustomData but that did not seem to turn up a valid pointer. Any ideas? Did I mention your help has been invaluable!? Thank you! darf - bhodiNUT
On 13/11/2002 at 09:10, xxxxxxxx wrote:
Quote: Originally posted by darf on 13 November 2002 > > * * * > > Tried this. There is a valid pointer received but I am not sure where to go to retrieve the actual data that would contain the TP_MasterSystem. GetData retrieves a BaseContainer with a couple of items ( LONGs ) that are not of importance in this case ( I don't believe they are anyway ). I also tried GetCustomData but that did not seem to turn up a valid pointer. > > Any ideas? Uhm, what you get *is* the master system. However, it seems to assume that the global TPOS variable has been initialized. So you'll have to help it with a CheckLib:
PluginSceneHook* hook = doc->FindSceneHook(ID_THINKINGPARTICLES); if (!hook || hook->GetType() != ID_THINKINGPARTICLES) return FALSE; if (!CheckLib( ID_THINKINGPARTICLES, LIBOFFSET(C4DLibrary_TPOS, MSYS), reinterpret_cast<C4DLibrary**>(&TPOS))) return FALSE; TP_MasterSystem* tpms = static_cast<TP_MasterSystem*>(hook); for (LONG pid = 0; pid < tpms->NumParticles(); ++pid) { GePrint(" pid: " + LongToString(pid) + " age: " + RealToString(tpms->Age(pid).Get())); }
> Did I mention your help has been invaluable!? Thank you! You're welcome!