New to blender. Here's my dilemma. I am dynamically animating a protein network using a python-script using user-provided text-files. The animation is done using key-framing for each object's actions (see below - self.frame_number and self.disjointed_frame allow the class in question to remember what frame the animation is on)
def add_progressive_location_keyframe(self, frame_step): bpy.context.scene.frame_end += frame_step bpy.context.object.keyframe_insert(data_path="location", frame=self.frame_number) self.frame_number += frame_step self.disjointed_frame += frame_step
So far, animating reactions that merely involve the transloation of one protein from one location to another have worked fine. However, some reactions involve two proteins forming a complex, a new protein. In this case, I have to dynamically delete the two reactants in a certain key-frame and in that same frame create the product. However, I cannot add a key-frame to an object I have deleted and I am unable to add a key-frame to an object that doesn't yet exist. This results in the two reactants being deleted and the product being formed in frame 0 (the first one).
My question: How can I add key-frames to these objects in order to dynamically delete and create them in certain frames? Is there a work around I am unfamiliar with? Your help is much appreciated.