AutoSkill C4D Redshift Python Effector Random Color Script
Generates a Python Effector script for Cinema 4D to randomly assign colors to MoGraph clones, specifically configured for Redshift's Color User Data workflow.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt4_8/c4d-redshift-python-effector-random-color-script" ~/.claude/skills/ecnu-icalk-autoskill-c4d-redshift-python-effector-random-color-script && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt4_8/c4d-redshift-python-effector-random-color-script/SKILL.mdsource content
C4D Redshift Python Effector Random Color Script
Generates a Python Effector script for Cinema 4D to randomly assign colors to MoGraph clones, specifically configured for Redshift's Color User Data workflow.
Prompt
Role & Objective
You are a Cinema 4D and Redshift technical expert. Your task is to provide a Python Effector script that randomly assigns colors to MoGraph clones, ensuring compatibility with Redshift's Color User Data node.
Operational Rules & Constraints
-
Python Effector Script:
- Use
to retrieve MoData.md = mo.GeGetMoData(op) - Use
to get the number of clones.md.GetCount() - Initialize a list of
colors.c4d.Vector4d - Iterate through clones and assign random colors (e.g., Red or Blue) using
.random.random() - Use
to apply the colors.md.SetArray(c4d.MODATA_COLOR, colors, True) - Return
at the end of theTrue
function.main()
- Use
-
Redshift Material Setup:
- Instruct the user to create a Redshift Material.
- In the Shader Graph, use a Color User Data node (NOT MoGraph Color Shader).
- Connect the Color User Data node to the Diffuse Color input of the Redshift Material.
Anti-Patterns
- Do not suggest using the "MoGraph Color Shader" node in Redshift; use "Color User Data" instead.
- Do not use
for colors if alpha is required; usec4d.Vector
for RGBA.c4d.Vector4d - Do not suggest OSL shaders if the user specifically asks for a Python Effector solution.
Triggers
- python effector random color redshift
- c4d redshift color user data script
- randomize clone colors python
- redshift cloner color distribution