![]() |
Python Autocomplete for Eclipse or Notepad++ |
Post Reply
|
| Author | |
mboeni
Member
Joined: 2012 Jun 18 Online Status: Offline Posts: 14 |
Post Options
Quote Reply
Topic: Python Autocomplete for Eclipse or Notepad++Posted: 2012 Jun 19 at 11:08am |
|
Hi thre
Just wondered how to enable autocompletion for the C4D libs in Eclipse or Notepad++. Does anyone know how to do this? Best, michael
|
|
![]() |
|
NiklasR
Member
Joined: 2010 Dec 13 Location: Germany Online Status: Offline Posts: 1340 |
Post Options
Quote Reply
Posted: 2012 Jun 20 at 8:19am |
|
Well, In the options, I guess? Notepad++ does not have something like IntelliSense (Visual Studio). Pressing Ctrl+Enter will pop out a little window with possible matches for the word you're writing at the moment, but not from the current context, but all words in the current file.
If you mean auto-completion like Visual Studio (which is also available in Eclipse) for Py4D: there is yet no possibility to get auto-completion for the C4D API. -Nik |
|
![]() |
|
charlesrowland
Member
Joined: 2012 Jun 13 Location: United States Online Status: Offline Posts: 5 |
Post Options
Quote Reply
Posted: 2012 Jun 20 at 8:43am |
|
Actually, there is a way to get autocomplete for C4D in eclipse. This guide will show you how to set up eclipse for use with Cinema 4D
http://www.smart-page.net/blog/2011/05/09/advanced-python-plugin-coding-for-cinema-4d/
it can be a little touchy at times, but it works. There are no images in the guide above, read it carefully. if you have trouble hit me up and i can help you out. Charles
|
|
![]() |
|
mboeni
Member
Joined: 2012 Jun 18 Online Status: Offline Posts: 14 |
Post Options
Quote Reply
Posted: 2012 Jun 20 at 9:52am |
|
Hi Charles
Thanks for the link! I already know that one and have actually used it to setup my kit (and I followed it to the letter). My impression is that I only get global constants and such but not the command / function hierarchy. Also, it does not seem to work at all times, e.g. for simple scripts it does not work at all, for intantiated objects it does partially. The guide mentioned does not cover autocomplete in general, just some constants (i mean the file that resides in "site-packages" and is generated by the script offered). It's quite tedious to code this way - i just wondered whether you guys have solved this already ;) Cheers,
Michael |
|
![]() |
|
charlesrowland
Member
Joined: 2012 Jun 13 Location: United States Online Status: Offline Posts: 5 |
Post Options
Quote Reply
Posted: 2012 Jun 20 at 1:23pm |
|
yeah, its not the best solution i know. unfortunately, its all i know of. Ill keep looking for a better solution for this, cause im sure it pisses off a lot of people. TO TWITTER!
>^_^<
|
|
![]() |
|
NiklasR
Member
Joined: 2010 Dec 13 Location: Germany Online Status: Offline Posts: 1340 |
Post Options
Quote Reply
Posted: 2012 Jun 21 at 7:10am |
|
Ah I didn't know there's a fake-module, but it only contains the constants, so it's not really useful.. ^^
If you want to contribute to the Py4D Community, you could write a complete one. ![]() Cheers, Nik |
|
![]() |
|
mboeni
Member
Joined: 2012 Jun 18 Online Status: Offline Posts: 14 |
Post Options
Quote Reply
Posted: 2012 Jun 21 at 8:29am |
|
Hi Nik
Well actually I think I will ;) Hopefully with a little help from Maxon... What is used more by you guys - Eclipse or Notepad++ (or something else)? Cheers, Michael
|
|
![]() |
|
charlesrowland
Member
Joined: 2012 Jun 13 Location: United States Online Status: Offline Posts: 5 |
Post Options
Quote Reply
Posted: 2012 Jun 21 at 9:35am |
|
i use ecplise for this. its the only editor ive used that seems to not 100% completely destroy white space when i need to copy/paste something back into the c4d script manager. Im sure there are others that dont, but after setting it up for the use of the c4d constant, ive just always used it. id use whatever had a full module though hahaha
|
|
![]() |
|
NiklasR
Member
Joined: 2010 Dec 13 Location: Germany Online Status: Offline Posts: 1340 |
Post Options
Quote Reply
Posted: 2012 Jun 21 at 10:10am |
|
Doing this is a very huge task. If I had the time, or someone that at least gives me a little fee for it, I'd do it..
However, I know enough about the Py4D API that I don't actually need intelligent code-completion. I'm using Notepad++. However, I'm not quite if Notepad++ actually has support for intelligent code-completion, and if it has, it does not support by loading a Python-module.. @charlesrowland: That's maybe because Eclipse uses spaces natively, and any other editor you tried did use tabs? Cinema 4D's script-manager uses spaces natively.. Cheers, -Nik Edited by NiklasR - 2012 Jun 21 at 10:13am |
|
![]() |
|
mboeni
Member
Joined: 2012 Jun 18 Online Status: Offline Posts: 14 |
Post Options
Quote Reply
Posted: 2012 Jun 21 at 10:54am |
|
Hi guys
I use Eclipse too and will probably go with that first. Of course, I would use a flexible format to parse it into other schemes for other apps. @Nik: Yes; i assume this will be a daunting task. I'll do some research and see what a feasible approach would be. As I dont see anybody paying me for this - I'll have to do it in my spare time ;) Notepad++ has code completion (you have to turn it on specifically) and an XML Schema that allows even for "tooltips" and hints on function parameters. Check out the files in the folder "...\Program Files (x86)\Notepad++\plugins\APIs" and you will see what's possible. I recommend looking at the "php.xml" file Cheers, Michael
Edited by mboeni - 2012 Jun 21 at 10:55am |
|
![]() |
|
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |