Of course, opportunity to have a better documentation is more than welcome.
that allow us to track things and add them in our changelogs.
okay... (everything here is for the Python doc page for GeDialog, unless specified differently)
The first one would be a line that I believe to be erroneous but maybe there's a secret functionality behind it that I don't get: Both
GeDialog.AddRadioTexthave the note Used with radio groups created with AddRadioGroup(). However, there is no way to connect these controls with a radio group. Radio groups only accept
AddChildcannot refer another control as subid. (id can be a
C4DGadgetbut subid can not.) The calls AddRadioButton/Text do not allow to specify a radio group as parent. So, unless there is an undocumented trick, this note may be wrong.
(To use RadioButton and RadioText, I handle the clicks myself in the Command method, and deselect the complementary controls.)
The screenshot under
AddColorFieldbelongs actually to
Not an error, but it would be nice to mention under
DLG_CANCELare not just the flags for type, but also serve as IDs for the buttons that can be evaluated in the Command method. I think it's unusual to have bitset flags at the same time as result integers (even in C4D: the
GEMB_xxxvalues as boole-combineable flags, but separate
GEMB_R_xxxconstants as results) so it bears mentioning.
GeDialog.AddSlidertells us Adds a slider with an editable number field to the layout. which is apparently copied from
AddSliderdoes not have a number field.
GeDialog.AddChildren- what's supposed to be in the
BaseContainerbc? I originally assumed you could use it like this:
self.AddRadioGroup(ID_RADIO_MAIN, flags = c4d.BFH_LEFT, columns = 1) r1 = self.AddRadioText(id=ID_RADIO_4, flags=c4d.BFH_SCALEFIT, name="A radio text") r2 = self.AddRadioText(id=ID_RADIO_5, flags=c4d.BFH_SCALEFIT, name="Radio text 2") r3 = self.AddRadioText(id=ID_RADIO_6, flags=c4d.BFH_SCALEFIT, name="RT3") bc = c4d.BaseContainer() bc.SetData(ID_RADIO_4, r1) bc.SetData(ID_RADIO_5, r2) bc.SetData(ID_RADIO_6, r3) self.AddChildren(ID_RADIO_MAIN, bc)
SetData raises an error. As a
BaseContainer is a C++ structure and r1 is a Python data, I come to doubt that would even be possible, so perhaps
AddChildren is limited to ID / string combinations, which actually do work:
self.AddRadioGroup(ID_RADIO_MAIN, flags = c4d.BFH_LEFT, columns = 1) bc = c4d.BaseContainer() bc.SetData(ID_RADIO_4, "Text1") bc.SetData(ID_RADIO_5, "Text2") bc.SetData(ID_RADIO_6, "Text3") self.AddChildren(ID_RADIO_MAIN, bc)
May be useful to document that explicitly. The C++ page for the same command also says nothing on the subject.
GeDialog.GroupBeginWhat is the difference between BFV_GRIDGROUP_EQUALCOLS - Each column has the same width and BFV_CMD_EQUALCOLUMNS Columns have equal width ? I couldn't get the second one to work. Deprecated?
Okay, that's what I noticed while working through the GeDialog page. I skipped a lot so there may be other open issues.