On 15/04/2018 at 14:52, xxxxxxxx wrote:
I've added the 'c4d.gui.GradientCustomGui' to a dialog, but it only displays the gradient portion, not all the controls ('Interpolation', 'Pos', and 'Intensity') pictured here in the SDK:
Why not?
On 15/04/2018 at 14:52, xxxxxxxx wrote:
I've added the 'c4d.gui.GradientCustomGui' to a dialog, but it only displays the gradient portion, not all the controls ('Interpolation', 'Pos', and 'Intensity') pictured here in the SDK:
Why not?
On 16/04/2018 at 03:24, xxxxxxxx wrote:
Hi terrachild,
Actually, you have to unfold the menu of the GradientCustomGUI.
def CreateLayout(self) :
bc = c4d.BaseContainer()
bc.SetInt32(c4d.CUSTOMGUI_LAYOUTMODE,c4d.LAYOUTMODE_MAXIMIZED)
self.myGradGizmo = self.AddCustomGui(10001, c4d.CUSTOMGUI_GRADIENT, "", c4d.BFH_SCALEFIT|c4d.BFV_CENTER, 0, 0, bc)
return True
Hope it makes sense.
Cheers,
Maxime
On 16/04/2018 at 11:24, xxxxxxxx wrote:
Maxime,
Thanks a lot. I couldn't find that info.
To get it to look like the pic, you also have to add this:
bc.SetInt32(c4d.GRADIENTPROPERTY_NOEDITCOLOR, True)
Although, to be completely accurate, adding this also includes the 'Load Preset' and 'Save Preset' buttons.
I think someone should add this example to the docs here:
https://developers.maxon.net/docs/Cinema4DPythonSDK/html/modules/c4d.gui/BaseCustomGui/GradientCustomGui/index.html
Cheers,
Chris