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).
Dear developers,
I would like to change the appearance of a group with these nice border styles after the user interacted with the interface. (inserting a filepath)
self.GroupBorderNoTitle(c4d.BORDER_NONE) # filepath fine self.GroupBorderNoTitle(c4d.BORDER_ACTIVE_4) # orange filepath empty self.GroupBorderNoTitle(c4d.BORDER_ACTIVE_3) # red filepath does not exist
I have a def Command(self, id, msg): section which checks the inputs but I cannot "change" the interface cosmetically in this section - still self.SetString(1103, str(self.folder)) works as intended ...
def Command(self, id, msg):
self.SetString(1103, str(self.folder))
how would this be feasible for changing elements where no dedicated "SET" is available.
thank you for your time. mogh
Hello mogh.
I usually come over such tasks by having a helper routine that does the layout (re-)building. In that routine, I can freely decide the gadget's appearance based on certain conditions. After rebuilding, the "old" gadgets have to be removed and replaced by the new ones and the only thing that's left is the refreshing of the dialog. Note that this only works for dynamic gadgets/groups.
Thanks @mp5gosu
you pointed me in the right direction I have some working code for now, even though I fear that I don't know what I am doing with all these classes
this script example helped me a little bit even though its pretty rough
https://github.com/PluginCafe/cinema4d_py_sdk_extended/blob/master/scripts/03_application_development/gui/dialog/customgui_quicktab_r19.py
kind regards mogh
Hi @mogh,
thank you for reaching out to us and thank you @mp5gosu for providing help. I think the most meaningful thing I can say is that GeDialog is pretty forgiving and not as strict as the sum of its methods might imply; at least that was my insight to be gained when I encountered the class first. Since you said you consider this to be still rough, here are some tips that might be helpful.
GeDialog
All following method references are members of GeDialog.
LoadDialogResource
CreateLayout
LayoutFlushGroup
RemoveElement
If anything remains unclear, please do not hesitate to ask.
Cheers, Ferdinand