C4D脚本自动接口完成脚本 Python Cinema 4D API auto completion (fake package) 

2015-06-14 00:33 发布 | 作品版权归原作者所有,仅供参考学习,禁止商业使用!

插件脚本 /[脚本预设]
481 0 0
C4D脚本自动接口完成脚本 Python Cinema 4D API auto completion (fake package)
C4D脚本自动接口完成脚本 Python Cinema 4D API auto completion (fake package) - C4D之家 - head_auto1.3dzbnz2mmuckks8c8o8wgg4ws.an7j656m54w0wckooogc4kgw8.th.png
  1. The combination of Eclipse and PyDev makes an excellent development environment for coding Cinema 4D python plugins.
  2. Sadly, there was this one – major – feature of PyDev I just couldn’t get to work… completions.

  3. And that was a shame, because this is probably the most awesome feature of PyDev and speeds things up a lot.

  4. Now it’s finally usable! (well… mostly)




  5. Why?
  6. And there was this other issue… since your interpreter and PyDev know nothing of the Cinema 4D API, PyDev marks every import and call as error.

  7. Before long, you don’t even bother looking at the ‘Problems’-tab anymore – there’s just errors everywhere!




  8. If that feature was working, it would greatly reduce the number of plugin-reloads or Cinema 4D restarts as one would be able to catch many typos, syntax errors and alike before actually executing the code.


  9. How?
  10. After some failed tries, I finally managed to pull most of what I needed from the API via introspection:
  11. attributes, classes, methods…

  12. What I didn’t manage to extract are method arguments – sorry, it just can’t be done that way…


  13. But still this is way better than nothing or what I had initially hoped for – I ended up with a neat little fake ‘c4d’ package including all sub modules.

  14. I moved it to the ‘/Libs/site-packages/’ folder of my external interpreter (DONT! try that with the Cinema 4D interpreter – just install a second), fired up Eclipse… opened a fairly complex plugin project… and bäm! no errors – working auto completion – happiness!




  15. Oh and the best part? This should work with any other python IDE that do not rely on predefined completion libraries.


  16. Where?
  17. So I updated the Advanced Python plugin coding for Cinema 4D post (that will help you to setup your Eclipse+PyDev developing environment – if you don’t already use one, just head over) accordingly and uploaded the package…



  18. -> You can grab the fake package here! <-


  19. But hear me out first!
  20. There is some disclaimer stuff that I would really like you to read before you use it:


  21. These are FAKE! modules – they may N E V E R go out into the wild – please make really sure you don’t accidently ship them with your plugin etc.
  22. Everything is extracted from the Cinema 4D R14.025 Python API – if you use any other build, you might/will see inconsistencies. I would supply the script to extract them but it’s not that simple, a good deal of manual labour went into this…
  23. This is slapped together with a lot of tape, voodoo, coffee and good intentions – I am sure there are a lot of areas where I messed up, so A L W A Y S (sry 4 caps lock) make sure you use the documentation.
  24. N E V E R rely on the docstings of these modules.
复制代码


点击下载图标
下载等级
C8D
登录后下载

插件脚本
软件性质:  
适用版本: C4D R15 - C4D R16 - C4D R17 - C4D R18 - C4D R19 - C4D R20 - C4D R21 - C4D S22 - C4D R23 - C4D S24 - C4D R25 - C4D S26 - C4D 2023 - C4D 2024 - C4D 2025
软件版本: Version: unknown
系统平台: Win MAC 
软件语言: 英文 
插件来源: https://www.c4d.cn/c4dsoft.html
百套精美Kitbash3D模型专题合集下载
时尚卡通办公室人物C4D立体图标工程下载Cinema 4D Fashion Cartoon Office Character 3D Icon Project Download
C4D科技新闻片头电视栏目频道包装动画工程下载Cinema 4D Technology News Headline TV Program Channel Packaging Animation Project Download
关闭

C4D精选推荐 上一条 /10 下一条

智能
客服
快速回复 返回顶部 返回列表