Transfering Tag Attributes
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/08/2011 at 17:58, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 12
Platform: Windows ; Mac ;
Language(s) : C++ ;---------
So I have a tool plugin that when a certain feature is enabled, it adds a tag to the active object. I would like my tool to then display the attributes of the added tag as a tab in the attributes of the tool. Is this possible? If so, how would I go about doing this?Thanks,
Shawn
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/08/2011 at 18:29, xxxxxxxx wrote:
If the attributes will be auxilliary to your tool, then you will need to use GetDDescription() to duplicate the tag attributes (this is what I do in InterPoser Pro to show my hidden tags as dial sliders on the IPP Figure tag). If you can, you might be better served having the same attributes in your tool (resource) that are set to the attribute values of the tag when it is available (or selected). You may still need to implement GetDDescription() so that you can at least hide the elements when no tag is associated with the tool.
There might be some trick where you can duplicate or point to the tag's BaseContainer and have it displayed in the attributes manager when the tool is selected - sort of like how objects now show the tag attributes as a tab for the object. No idea if this ability is exposed in the SDK. Hopefully someone can elucidate more on that?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/08/2011 at 18:31, xxxxxxxx wrote:
How do you hide your tags? That would be more ideal in my situation. I would rather the user never know that a tag is being used.
Thanks,
Shawn
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/08/2011 at 05:32, xxxxxxxx wrote:
To have a plugin tag hidden in the Object Manager, omit (do not use) TAG_VISIBLE in the RegisterTagPlugin() method. Note that this is a permanent condition and cannot be changed while Cinema 4D is running.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/08/2011 at 19:31, xxxxxxxx wrote:
Okay I am able to add the tag, hide the tag, and can change the parameters of the tag through parameters on the tool. However, even though the tag's parameters change, the tag itself does not update and therefore the tag does not update the object that it is on.
I have tried, tag->Message(MSG_UPDATE), tag->Message(MSG_CHANGE), I've tried to do this to the object, and I have tried to send EventAdd(), also specialEventAdd()
Nothing seems to work. Is there a way to update the tag to reflect the parameter changes?
Thanks,
Shawn
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/08/2011 at 21:53, xxxxxxxx wrote:
You should do it within TagData.Message(). Note that I had to toggle the Deform Mode to get my plugin generator object to actually update. You may need to do something similar.
// NodeData.Message //*---------------------------------------------------------------------------* Bool GreeblerTag::Message(GeListNode* node, LONG type, void* data) //*---------------------------------------------------------------------------* { if (!node) return FALSE; if (type == MSG_DESCRIPTION_VALIDATE) { // Force an update of the Greebler object on Greebler tag changes BaseObject* gop = GetGreeblerObj(static_cast<BaseTag*>(node)->GetObject()); if (gop && gop->GetDeformMode()) { gop->SetDirty(DIRTYFLAGS_CACHE); gop->SetDeformMode(FALSE); gop->SetDeformMode(TRUE); EventAdd(EVENT_FORCEREDRAW); } return TRUE; } return SUPER::Message(node,type,data); }
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/08/2011 at 05:42, xxxxxxxx wrote:
You may need to call tag->SetDirty(DIRTYFLAGS_DATA) because apparently MSG_CHANGE will not do anything in the tag itself, e.g. the dirty state doesn't change.
This is currently a rather anoying problem with Cinema's internal workings.
I think I will add a note to the SDK docs about this.
cheers,
Matthias