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
- 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
Copyright © 2018 Niklas Rosenstein