Initialize a SplineCustomGui (resource-based)
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/05/2012 at 09:30, xxxxxxxx wrote:
I have a customer working on a Mac while I'm using Windows 7. The SplineCustomGui is initialized automatically on Windows, which doesn't seem to be the case on Mac. Using FindCustomGui() does return None on Mac , but the SplineCustomGui on Windows.
class FlightsDialog(c4d.gui.GeDialog) : def InitValues(self) : spl = self.FindCustomGui(res.SPL_DATA_ALTITUDE)
But there's still one problem on windows: The CustomGui is only redrawn when resizing the dialog, so when the dialog opens, the SplineGui looks kind'a awkward because it's range is not set correctly. Is there a way to redraw a CustomGui ?
Thanks in advance!
Niklas -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/05/2012 at 08:16, xxxxxxxx wrote:
Ok, I found a workaround:
- Pack the CustomGui into it's own group
- Use GeDialog.FindCustomGui() to catch it
- If the method returned None, call GeDialog.LayoutFlushGroup() and
GeDialog.AddCustomGui() to create a new custom-gui.
Works, but seems to be a little-bit dirty to me. Also, I don't see a possibility to make the
SplineCustomGui "Open" (that adds additional parameters below it, done in ResEdit by
enabling the "Open" Checkmark).
Second, the SplineCustomGui created either through ResEdit or through Python are not shown
when clicking "Show in seperate Window...". The window appears, but it does not contain the
spline.Cheers,
Niklas