Tag Plugin Attribut - UI element refresh



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 12/03/2011 at 07:28, xxxxxxxx wrote:

    Hi guys,

    another day another problem. I'm trying to change the state of a simple checkbox from within my tag plugin. The checkbox has the ID 10000, so this is what I do.

    bc = tag.GetData()
    print bc.GetBool(10000) # this correctly comes back True or False
    bc.SetBool(10000,True)
    -> this does internally change the value, but does not update the UI, so next frame the setting if forgotten!

    I tried all of these to no avail:
    op.Message(c4d.MSG_UPDATE)
    tag.Message(c4d.MSG_UPDATE)
    c4d.EventAdd(c4d.EVENT_NOEXPRESSION)

    Nothing does it.

    Updating user data from a regular Python tag works fine, it's only once I have it running as a Tag plugin that it does not work any more.

    Any ideas anyone?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 12/03/2011 at 08:09, xxxxxxxx wrote:

    Well, what about setting the Container back to your tag ?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 12/03/2011 at 10:24, xxxxxxxx wrote:

    Doh! Overlooking the obvious again, aren't I.... thanks mate, that was exactly it :)



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 12/03/2011 at 11:16, xxxxxxxx wrote:

    tag.GetData() returns a new copy of the settings container, use GetDataInstance() instead to get the internal container.


Log in to reply