On 17/12/2017 at 21:01, xxxxxxxx wrote:
Hello Plugincafe!
I'm want to create OBJECT_GENERATOR plugin which generates an object with InExcludeData which will contain arbitrary elements created also by OBJECT_GENERATOR.
In this example, I'm creating Cloner object with a cube as its child and also random effector that I want to insert into effectors list.
1. import c4d
2.
3. def main() :
4. cloner = c4d.BaseObject(1018544) #Cloner Generator
5. cube = c4d.BaseObject(c4d.Ocube) #Primitive Cube
6. cube.InsertUnder(cloner)
7. randomEffector = c4d.BaseObject(1018643) #Random Effector
8.
9. inexclude = c4d.InExcludeData()
10. inexclude.InsertObject(randomEffector,1)
11. cloner[c4d.ID_MG_MOTIONGENERATOR_EFFECTORLIST] = inexclude
12.
13. return cloner
Seems like I can place there only existing objects from active document.
I wonder if it's possible to generate a virtual document that will contain desired objects and place them into InExcludeData?
Or maybe there is another way.