Bitmap Button
-
Seems like I figured it out but I'll keep investigating.
-
I tried this way and it kinda works. but let's assume that I want to scale the sphere object from my object generator plugin. It works only if I'm updating the render settings or reloading python plugins. Is it possible to update it according to the DIRTY FLAGS of the object generator plugin?
let me know if I'm doing something wrong.
-
Hello,
you could set DIRTYFLAGS_DESCRIPTION after an interaction with the
TEST_SLIDER
parameter (e.g. inSetDParameter
or afterMSG_DESCRIPTION_POSTSETPARAMETER
). That should update the description.best wishes,
Sebastian -
SetDParameter
seems to be easier but seems like I'm doing something wrong. Can you provide a code snippet, how to do this properly? -
I'm probably doing something wrong.
def SetDParameter(self, node, id, t_data, flags) : if id[0].id == c4d.TEST_SLIDER: node.SetDirty(c4d.DIRTYFLAGS_DESCRIPTION)
-
Hello,
it seems to work better if you change the dirty status of the bitmap. Something like this:
def GetDParameter(self, node, id, flags): if id[0].id == c4d.THE_BITMAP_BUTTON: data = c4d.BitmapButtonStruct(node, id, self.bmp.GetDirty()) return (True, data, flags | c4d.DESCFLAGS_GET_PARAM_GET) return True def SetDParameter(self, node, id, t_data, flags): if id[0].id == c4d.THE_OTHER_PARAMETER: self.bmp.SetDirty() node.SetDirty(c4d.DIRTYFLAGS_DATA) return False
best wishes,
Sebastian -
This post is deleted! -
This post is deleted! -
This post is deleted! -
btw, is it possible to prevent the description from constant updates during manipulating the slider and set the DIRTYFLAGS when the slider is already set to the desired value?
Seems like C4D's material preview is capable of detecting time intervals between manipulations and if the interval is not high enough, no update takes place. Should I import pythons datetime or maybe it is possible to accomplish this task directly from c4d's module? -
This goes off topic so I'll make a new post.
The main issue is already solved, thanks to Sebastian!