Notifications
Clear all

[Closed] Is there a way to create or delete an object?

Script can animate an object,like its position or color etc…,but how can an object be animated,like creation or deletion,
I mean,for example:using script create an object at 10 frames and delete it at 50 frame,and the animation not only show in the viewport but also render the result.
I try use script controller,but seem impossible.

Thanks for any help ,or show me a way to climb.

6 Replies

things don’t work this way for render (there is a post that explains why… i don’t want to repeat it)
there are some possible workarounds:
#1 use visibility controller
#2 scale objects to Zero
#3 use particles (they can born and die)

it’s first that occurs to me

Thank you very much,DenisT.
If you’re not busy,would you please give me a web_link of the post.For some reason I scare to say,google can’t use here where I live, but I want to learn it deeply.
Thanks again.

it will be easier to explain it again.

the renderer before starts rendering creates the render instance objects (nodes, meshes, controllers, materials, etc. ). after this moment nothing can be added and be used by render. the renderer just doesn’t know about these changes. also nothing can be deleted because renderer holds a pointer for every render object and more likely will just crash. that’s why you can’t create new, change objects instances, and delete objects during rendering. if adding objects probably safe but useless, the changing or deleting might crash the render.

does it clear enough?

Pflow has a limitation that can’t creat or delete an object INSIDE the pflow script,and OUTSIDE also has this limitation that is not mentioned in script reference,so I thought no limitation except pflow,tried times and failed .

Thanks DenisT :D.

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

you don’t need to delete an object. you have to associate a particle with an object instance (using DisplayParticles object) and control born and death of this particle. it’s no need real object creation and deleting

Yes! DenisT,I will remember this you teach me.

Thank you very much!