I wanna apply the rotation of an object, each time a certian case is true. The problem is, this has to work while an animation renders. So bevore it render the frame x, it checks if the case is true and if it is, then it applys the rotation of the object. I use this in my Rubik's cube rig. The apply_transfrom
doesn't work in this case.
Here is the testing .blend: https://www.dropbox.com/s/hz8nxx87b3wucx4/untitled.blend?dl=0
Open the .blend, run the two script, and press F12. The goal is that the rotation is applied on all cubes.
Update: I found the solution myself. I use this script here: Apply mesh transformations to primitive_uv_sphere_add()