Skip to content

xpPython

With the xpPython modifier, you can arrange for Python code to be executed when a particle is within the modifier’s field of effect.

You have access to the particle data, which enables you to change the data in any way you like.


Untitled

xpPython Object tab menu.

Checking this box enables the xpPython modifier.

Set at Independent by default.

You can change this to Action-Controlled.

In this mode, particles will be affected if they come into the field of effect of the modifier.

When in the Action-Controlled Mode setting, the modifier will only act on a particle when told to do so by an action.

Enabled, by default, click to make the modifier invisible in the editor.

This is where you enter the Python script to be carried out.

A simple default script is provided.

xpPython_Console_v01.png

A list of classes and functions within them (in Cinema 4D) that can be used to modify particles.

This button opens the Cinema 4D script editor, which provides a better coding environment for writing your scripts.

When you finish with the editor, simply close it and the Script field in the modifier will be updated automatically.

xpPython_Console_v02.png

In this scene, each particle’s color is set to the vector (1,0,0), which is red. The particles that enter xpPython’s Linear field now turn from blue to red.

xpPython_Console_Set Color_v01.png

The corresponding code, which has been used.

xpPython_Radius_v02.png

Here, a change has also been added to each particle’s radius, from 5cm to 2cm.

xpPython_Console_Set Radius_v01.png

The corresponding code, which has been used.


To specify the group, drag and drop the desired Group object into this field.

This setting is useful if you want to ensure that the spawned particles are, or are not, affected by xpPython.


You can use the Fields options to control where xpPython operates.


Copyright © 2026 INSYDIUM LTD. All rights reserved.