THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/04/2012 at 11:19, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R13.051
Platform: Windows ;
Language(s) : C++ ;
---------
I have no idea what's going on here, but every time I try and get the TP_MasterSystem of a scene, Cinema crashes straight away. This is my code and it's basically taken from the doc as is:
TP_MasterSystem* TPPartioData::GetTpMasterSystem(BaseDocument* doc)
{
if (!doc) {
GePrint("No TP Master found");
return NULL;
}
BaseSceneHook* hook = doc->FindSceneHook(ID_THINKINGPARTICLES);
if(!hook || hook->GetType() != ID_THINKINGPARTICLES)
{
GePrint("No TP Master found");
return NULL;
}
TP_MasterSystem *tp = (TP_MasterSystem* )(hook); // this is ok
tp->NumParticles(); // here it crashes with _any_ tp->.... related call
GePrint("I made it here"); // sadly, not so
return static_cast<TP_MasterSystem*>(hook);
}
I'm compiling with VS2008 for 64bit.