Python C4D Basics - Deformers? [SOLVED]

On 21/07/2015 at 06:05, xxxxxxxx wrote:

I'm experimenting with python and c4d for the last few days, it's incredibly fun. However, I beleive I'm missing out some of the necessary basics so I can't progress more. I also can't find any solid for pre-made examples to learn by looking at and understanding others' code. The only website I've been digging so far was the official py SDK from Maxon and at the moment it does not help me understand some of my main problems with the python pipeline in C4D.

My question is about "deformers" in general. How to create them in cinema4D using python?
Let me share my experience so far:
I've been using mograph python effector in point and polygon mode to crete deformers, and it works to some extent where I only edit/modify existing clones/points/polygones but something like a bevel efector where new polygons are created, is not seem possible with the python mograph effector (if possible, please let me know how!).
The python tag works every frame but does not create nondestructive results such as the c4d deformers (again, something like bend, explode or bevel) - therefore it's not the best option for an effector-like use.
Executing a script works only when executed, so it's definitely not the best option for creating a deformer.
Python generator is good for generating stuff from scratch but again not the best thing tou use for deformer use.

So at this point I'm out of options. I believe this should be doable, SDK gives access to a lot of things, I just can't see the bridge between the python effector and polygons/points of the object it's effecting, so I can't make polygon/point level manipulation to the object (in terms of creating new polygons or points) which makes it impossible to create a bevel-like effector/deformer.

I hope my question/problem is clear! Looking for answers/ideas.

On 21/07/2015 at 10:44, xxxxxxxx wrote:

Hello, example is being in pyapi sdk - > PYTHONSDK\help\examples\plugins\Py-SpherifyModifier\
if will need pythonic mograph - > PYTHONSDK\help\examples\scenes\ + several effectors

PYTHONSDK archives >>

On 21/07/2015 at 10:56, xxxxxxxx wrote:

Thank you very much -
I came across those examples however didn't understand how that Py-SpherifyMidifier works (couldn't make it work). Any help is appreciated.
Thank you

On 21/07/2015 at 11:13, xxxxxxxx wrote:

Originally posted by xxxxxxxx

Thank you very much -
I came across those examples however didn't understand how that Py-SpherifyMidifier works (couldn't make it work). Any help is appreciated.
Thank you

All works, I put Py-SpherifyModifier dir to user-dir's plug-ins dir or root' plug-ins dir

Open pyp in any text editor and learn modules, class and functions in sdk docs

On 21/07/2015 at 13:45, xxxxxxxx wrote:

Oh! Let me check!

On 22/07/2015 at 04:01, xxxxxxxx wrote:


to make the process of understanding the Py-SphereModifier example a bit easier, here are some links to the documentation, that might be of interest.
First off, it's good to know the general Plugin Structure.
Effectors are ObjectData plugins with the OBJECT_MODIFIER flag set.
Working with ObjectData plugins, it's good to take note of the important threading information.

I hope, this helps a bit.

On 22/07/2015 at 04:04, xxxxxxxx wrote:

Thank you very much, I will dig all that info now. Definitely helps!