THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/08/2005 at 19:36, xxxxxxxx wrote:
Cinema 4D Version: 8.503
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
What exactly does this mean?
And the reason that I ask involves the real question. I am trying to find a way to directly link one PluginTag's description into another's (which gathers them) so that the data being operated on is of the former (somewhat like a GV with Xpresso). Or, barring that, some way to get the selected Dynamic Description items and perform an operation on them.
The one problem with AM Descriptions is that whenever something is done, the only response you get is a MSG_DESCRIPTION_CHECKUPDATE and/or MSG_DESCRIPTION_VALIDATE message which contain no identification to the AM 'gadget' that was altered. If there is another way to get this identification, I'd assuredly be pleased to know. I don't even know how to determine if a Description is selected (highlighted) in the AM or not.
On 15/08/2005 at 04:13, xxxxxxxx wrote:
Ahhhhh!! So, this is how it's done. GetDParameter() is useless and these two are misnamed. SetDParameter() actually returns the description item altered in the AM. Here's some code for posterity (and posteriors) :
Bool IPPObject::SetDParameter(GeListNode* node, const DescID& id, const GeData& t_data, LONG& flags)
if (!(baseDoc = node->GetDocument())) return FALSE;
if (!(orig = ((BaseObject* )node)->GetDown())) return FALSE;
if (!(bc = ((BaseObject* )node)->GetDataInstance())) return FALSE;
if (!(desc && node->GetDescription(desc,0))) return FALSE;
if (!(bc = desc->GetParameterI(id, NULL))) return FALSE;
if (!(pt = GetIPPTag(baseDoc, orig, orig->GetDown(), bc->GetString(DESC_NAME)))) return FALSE;
bc = pt->GetDataInstance();
lbits = (ULONG)bc->GetLong(IPP_BITS);
// Show Polygon Selection in Editor
if (t_data.GetLong()) lbits |= PBASE_BITS_VISIBLE;
// Hide Polygon Selection in Editor
else lbits &= ~PBASE_BITS_VISIBLE;
return SUPER::SetDParameter(node, id, t_data, flags);
This gets the plugin tag that matches DESC_NAME and it's stored link to a PolygonSelection tag when a DTYPE_BOOL is clicked. When unchecked the polygons are 'hidden', when checked they are 'visible'. I plan to update all of my plugin objects to do this instead of relying upon the MSG_DESCRIPTION_CHECKUPDATE and MSG_DESCRIPTION_VALIDATE messages.