On 09/09/2017 at 04:26, xxxxxxxx wrote:
fairly new to python and new to python for c4d.
My main question is, if there is anyway to assign a material to just a specific clone in a cloner or even multiple clones. I am basically able to access the array and change the matrix position data etc, I am even able to change the display color of an individual clone.
But what about assinging a material.
Ideally is there anyway to return a clone in a cloner as an object in python.
I am guessing it's not possible and we are limited to the options in mograph module? mainly adjusting array type parameters.
On 11/09/2017 at 02:39, xxxxxxxx wrote:
welcome to the Plugin Café forums
I'm afraid it is not possible to assign a material to single clones.
I assume you are talking about the MoGraph Cloner, right?
One way to achieve something similar could be to just use the MoGraph Multi Shader.
Another way could be to use "Current State to Object" (SendModelingCommand() with MCOMMAND_CURRENTSTATETOOBJECT) to get a polygon object representation of all clones, but then of course losing the parametric cloner...
Or you could access the cache of the cloner to get hold of the polygon representation of the clone you need, get a clone of this (don't use the object in cache directly!). Of course then you would want to hide that clone in the cloner via MoData, MODATA_FLAGS, MOGENFLAG_CLONE_ON.
On 11/09/2017 at 07:32, xxxxxxxx wrote:
Thank you for the response.
Your final option was indeed the only thing I could figure. and have it still all be parametric. But it does get a little wonky i assume, with hiding the original clones in the viewport, replacing it with "real" polygon objects but hiding those as well in the object manager.
The Mograph shader will work. but the idea was to create something where the user could simply just pick a clone and assign it a material that one had already made. I think the mograph shader all is basically inside one material.
But I guess the reason I asked was merely just to confirm that there isn't a simple c4d python function that would do this. And I guess that's hereby confirmed. So thnx