All Projects → nrosenstein-c4d → c4d-prototype-converter

nrosenstein-c4d / c4d-prototype-converter

Licence: MIT license
A Cinema 4D plugin to convert plugin prototypes to actual Python plugins.

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to c4d-prototype-converter

HOT4D
hot4D plugins
Stars: ✭ 31 (+72.22%)
Mutual labels:  cinema4d
Mi Flower mate plugin
A plugin for Domoticz, the open source home automation software, which allows it to easily connect to Xiaomi Mi Flower Mate devices
Stars: ✭ 13 (-27.78%)
Mutual labels:  python-plugin
c4d-nr-toolbox
Collection of previously commercial plugins and prototypes.
Stars: ✭ 16 (-11.11%)
Mutual labels:  cinema4d-plugin

Cinema 4D Prototype Converter

This plugin aids you in converting your Cinema 4D Python plugin prototype to a plugin.

Script Converter

This tool converts a Cinema 4D Python Script to a CommandData plugin. Scripts you convert with this tool should have a main() function.

Features

  • The main() function will be automatically converted to a CommandData.Execute() method

Prototype Converter

This tool converts a Cinema 4D Python Generator or Expression Tag to a ObjectData or TagData plugin.

Features

  • Converts UserData to description resource files

  • Converts main() and message() functions in your Python code to the respective plugin member method (GetVirtualObjects(), Execute(), Message())

  • Replaces uses of op[c4d.ID_USERDATA,X] with the automatically generated resource symbols

FAQ

How to install the Plugin?

Downloading the source code from GitHub is not sufficient as it will not include Git submodules. Check the [Releases][] page to find the latest downloadable release or use a Git client to clone the repository recursively into your Cinema 4D plugins directory.

Where to find the Plugin in Cinema 4D?

After you have installed the plugin, you can find it in the Cinema 4D Script menu.

How does the code refactoring work?

We use the lib2to3 module from the Python standard library to parse and transform your code so that it (somewhat) matches the way it needs to be for Python plugins and to adjust the indentation.

Ideas for the Future

  • Report possible errors during conversion (eg. referencing the variables doc or op in global functions without previously declaring them)

Acknowledgements

This project is sponsored by Maxon US and was created for Cineversity.com's CV-Toolbox.

Changes

v1.2.0

  • Update third-party libraries (nr.c4d, nr.types, six)
  • Make Script Converter and Prototype Convert commands visible in Commander (Shift+C)
  • Fix #48 – DEFAULT property with UNIT PERCENT does NOT need to be multiplied by 100
  • Fix #49 – "Animatable" user data parameter - error when OFF

v1.1.0

  • Initial public release

Copyright © 2018 Niklas Rosenstein

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].