Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/02/2003 at 03:28, xxxxxxxx wrote:
User Information: Cinema 4D Version: 8.012 Platform: Windows ; Language(s) : C++ ;
--------- Hi, isn't it possible to change data of a display tag?
tag = BaseTag::Alloc(Tdisplay); if (tag) { op->InsertTag(tag, NULL); cData = tag->GetDataInstance(); cData->SetBool(DISPLAYTAG_AFFECT_DISPLAYMODE, TRUE); cData->SetLong(DISPLAYTAG_DISPLAYMODE, DISPLAYTAG_DISPLAYMODE_WIREFRAME); }
This code will insert the tag, but container data is not affected!? To verify the ID values, I tried this:
BaseTag *tag = op->GetTag(Tdisplay); if (tag) { BaseContainer *cData = tag->GetDataInstance(); LONG i; GePrint("Searching ID..."); for (i=1000; i<100000; i++) { if (cData->GetLong(i) == DISPLAYTAG_DISPLAYMODE_WIREFRAME) GePrint("ID:" + LongToString(i)); } }
Nothing. I can change any value using the gui of the tag without any effect in the container data. What's wrong? Analogous to Tphong and SetPhong(...), I looked for a method like "SetDisplay(...)"; without any success. Klaus Heyne
On 27/02/2003 at 06:03, xxxxxxxx wrote:
please search this forum with a corresponding value. There was already a thread that solved this problem.
On 28/02/2003 at 10:12, xxxxxxxx wrote:
Thanks for the hint. But the thread you mean, handles with coffee and didn't solve the problem. So, again a code snippet from the execute function of a plugin tag, assigned to the object, that also has the display tag:
BaseTag *dTag = op->GetTag(Tdisplay); if (dTag) { BaseContainer *dData = dTag->GetDataInstance(); dData->SetBool(DISPLAYTAG_AFFECT_DISPLAYMODE, TRUE); dData->SetLong(DISPLAYTAG_DISPLAYMODE, DISPLAYTAG_DISPLAYMODE_WIREFRAME); dTag->Message(MSG_UPDATE); }
The debugger does not show the name of the display tag!? Should it? Is there something wrong with GetDataInstance? Klaus Heyne
On 28/02/2003 at 10:21, xxxxxxxx wrote:
Hi, sorry. My fault. Should have looked bette. HAven´t noticed you are working with C++. Yes, GetDataInstance is sometimes not possible (don´t ask my why. There must be a reason but I don´t know it). Use GetData to get the BaseContainer and use SetData after changing properties. This will work for the Display Tag (had the same problem some time ago). Best Samir