using boolean modifiers and shape keys in animation what i am trying to do is an animation exactly like the shown above, which is captured from youtube. for the sake of simplicity let's talk about the far left split cube.

so as little as i know i thought so far the only way to do it, preferably in python, is to successively add and apply a boolean modifier in difference operation with object set to the sphere, after that adding a shape key to allow me to keyframe the cube's mesh shape, meanwhile changing sphere's location in this direction in small increments, and repeat. to put it clear all of that successively in each iteration of a for loop.

so here is the problem, applying a modifier for a shape keyed object is not even supported in blender. moreover i intend to use this in a far more complex animation, and i am not sure will that be reliable, or will it freeze when i execute that script?

so i wonder what is the best way to do it, and how is it made in this video?
I think this would probably be a lot easier if you made a dummy object used as subtraction for the Boolean Operation.

Just model a pill-like cylinder object ending in a spherical cap, possibly starting from a UV sphere, then use that in the Boolean operation.



You can then hide it, make it unrenderable, possibly even parented to the real sphere, and use it instead as the Boolean operand, and it should easily simulate the desired effect.