nrosenstein-c4d / c4d-prototype-converter

A Cinema 4D plugin to convert plugin prototypes to actual Python plugins.
MIT License
26 stars 4 forks source link
cinema4d cinema4d-plugin python-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. > > ![](https://i.imgur.com/lgRnazt.png)
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

Acknowledgements

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

Changes

v1.2.0

v1.1.0


Copyright © 2018 Niklas Rosenstein