On 28/09/2017 at 03:27, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R17
Platform: Windows ;
Language(s) : C++ ;
---------
Hello.
I have a render engine in which I scan the hierarchy and for each object, I pass the object as geometry in the engine. To do that, I get each object's cache and if it is not a control object, I handle it appropriately.
For some reason though, the cache of a primitive sphere is always a control object.
I use the following code to test it in VideoPostData::Execute(BaseVideoPost* node, VideoPostStruct* vps) method (checks have been removed).
BaseObject* first_object = vps->doc->GetFirstObject();
BaseObject* cached = first_object->GetCache();
if (cached->GetBit(BIT_CONTROLOBJECT)) {
//code
}
The primitive sphere's cache is always a control object. This happens only for spheres and only when I use the vps->doc. Any other primitive I have tried is retrieved correctly.
What's the problem with vps->doc ?
Thank you for your time !