Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Initialize a SplineCustomGui (resource-based)

    Scheduled Pinned Locked Moved PYTHON Development
    2 Posts 0 Posters 247 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • First post
          Last post