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

    sublime text 2 with python

    Scheduled Pinned Locked Moved PYTHON Development
    7 Posts 0 Posters 606 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

      On 30/09/2016 at 10:27, xxxxxxxx wrote:

      hello , 
      I have started to learn plugins development , and thought of using sublime text 2 as my code editor , I have tested it and it is great , it give you auto- complete for python methods , functions ...etc and even if I typed something , the next time I try to type it , it show up in the guess list , and this is super helpful , 
      what I want to know .
      Now to the main question , is it possible to add c4d modules to "sublime text"dictionary ?
      and just a side question , when I create python file the extension is .py , should I change it manually to .pyp ? 
      thanks ,

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

        On 30/09/2016 at 12:51, xxxxxxxx wrote:

        Heya,

        I'm not sure you can add c4d's definitions in any meaningful way, but yeah, when you're saving a python file for a plugin, manually append the .pyp extension that C4D expects for plugins.  Note that you can have Sublime display .pyp files with Python highlighting by default by going (on Sublime 3, not sure about 2) to Preferences->Settings - Syntax Specific (when you have Python set as the current Syntax, which will automatically open Python.sublime-settings) and adding

        "extensions":
        	[
        		"pyp"
        	]
        

        between the main {}'s.

        (Don't forget to close and re-open Sublime when you change that settings file, if you haven't already 🙂 )

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

          On 01/10/2016 at 03:14, xxxxxxxx wrote:

          thanks for reply 🙂 
          I didn't know about sublime 3 (that's explain why I don't have any updates to sublime text 2 :D)

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

            On 04/10/2016 at 07:27, xxxxxxxx wrote:

            While I have no idea on the auto-completion question, never tried it, I just want to add how to make Sublime Text 2 highlight Python in Cinema 4D Python plugin files (.pyp) :
            Simply open such a file in Sublime Text and then menu "View" -> "Syntax" -> "Open all with current extension as...", select Python there and done.

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

              On 04/10/2016 at 09:02, xxxxxxxx wrote:

              Oh, nice, how did I never notice that 😪

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

                On 04/10/2016 at 09:05, xxxxxxxx wrote:

                To be honest, until today I always edited the config files manually. Just as I wanted to describe how to do this in this thread, I discovered the menu option... I mean, it's the topmost one, it's not that easy to see. 😉

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

                  On 04/10/2016 at 09:39, xxxxxxxx wrote:

                  thanks guys of the help , 
                  never mind the auto-complete , sublime is intelligent , so it remembers variable name ..etc 
                  P.S. I have just noticed that Xcode have a python editor (with highlight ..etc ) similar to sublime .

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