THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/03/2010 at 13:45, xxxxxxxx wrote:
Cinema 4D Version: r11
Language(s) : C++ ;
i have a real strange issue here and i have no clue what is causing it. i cannot convert my pluginobject into a polygon object . it remains the plugin object.
what could be responsible for this??
On 24/03/2010 at 13:56, xxxxxxxx wrote:
this happens when you return NULL.
On 24/03/2010 at 14:09, xxxxxxxx wrote:
hm, but i only return NULL if the plugin doesnt have the correct settings applied (for example if there is no child object)
the object returns something other than NULL, since otherwise i wouldnt see the result in the editor??
On 24/03/2010 at 14:25, xxxxxxxx wrote:
No, this only tells you that you see it in the editor. This doesn´t have to necessarily mean it correctly returns something on conversion where the caches are probably recalculated to get a purely fresh representation of its state. Therefore it may be possible that something happens which makes your object retun NULL. I don´t see any other chance why you wouldn´t be able to convert your object otherwise. As soon as you return something it can be converted. That is my educated guess.
You can easily find out by starting a debug session to find out the real culprit though.
On 24/03/2010 at 14:49, xxxxxxxx wrote:
thank you.. it seems that it had something to do with the DependenceList.
it works now, and as a positiv sideeffect some other issues went away, too
On 27/04/2010 at 11:23, xxxxxxxx wrote:
hi again, i have a similar issue again. i cannot convert the plugin object if one of the linked objects is above the plugin object in the object-manager.. but i dont have an idea why this is so. anyone knows a solution?
a brutal method would be to move the linked object below the plugin object via script. but i think thats only the last way i'd go..
thanks for any input
On 27/04/2010 at 11:32, xxxxxxxx wrote:
I assume you do something like this?
BaseObject *YourPlugin::GetVirtualObjects(PluginObject *op, HierarchyHelp *hh)
BaseObject *ret = NULL; //This is where your objects go...
Bool dirty = op->CheckCache(hh) || op->IsDirty(DIRTY_DATA);
if (!dirty) return op->GetCache(hh);
BaseContainer *data = op->GetDataInstance();
On 27/04/2010 at 11:47, xxxxxxxx wrote:
more or less, yes.. but somehow this is related. i tried out to place those lines at the beginning and at least the converting works. the dependenceList doesnt work anymore, but maybe i can solve this now.