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

    Creating a Python Script box

    Cinema 4D SDK
    python
    3
    3
    387
    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.
    • ?
      A Former User
      last edited by A Former User

      Hello,
      I'd like to create a Script box with Python syntax & c4d symbol highlighting for my plugin similar to the one found in the Python & Visual Selector tags. Is this possible? I didn't see it listed in c4d.gui. If it isn't possible, how could I offer the user a way to add their own code? Thank you!

      876f60f2-36fa-409e-bdcb-bf89ec6b9f6a-image.png

      1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand
        last edited by

        Hi,

        I am not quite sure what you mean by symbol highlighting. Do you mean syntax highlighting? That is achieved by a MULTILINEEDIT with the SYNTAXCOLOR flag. But this will only give you an edit box with nice highlighting, any evaluation would have to be done by yourself. How this could be done, I have shown here in a slightly different context.

        Cheers,
        zipit

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 0
        • ManuelM
          Manuel
          last edited by

          hi,

          except what @zipit said, there's nothing outof the box that you can use in our API to do it.
          You have to come with your own solution.

          Remotion have create such a tool few years ago:
          https://bitbucket.org/remotion/code-editor-gui-for-c4d/downloads/

          I would say that it's not really hard to do, it's just long and during the path you are walking to build such a tool, you could find some walls that you didn't expect ^^'

          I would start using the function GetDParameter, check the content and change the color of some words accordingly.

          Cheers,
          Manuel

          MAXON SDK Specialist

          MAXON Registered Developer

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