i am working with an alembic file which contains points and movement information. for project reasons, i need the movement information in keyframes, so i am writing myself a script that grabs for a given frame the transformation and stores it in a separate object and inserts a keyframe.
problem is, the movement of the point is not represented in the transform window.
so my solution for that problem is the "Visual Transform" action, as shown manually below
though, when i try to perform the action target.visual_transform_apply(), i get the error message AttributeError: 'Object' object has no attribute 'visual_transform_apply'
why does it work doing it by hand, and it doesn't when performing it with code?
here is a reduced code snippet of my problem.
target = bpy.context.active_object
bpy.ops.mesh.primitive_plane_add()
new_obj = bpy.context.active_object
target.visual_transform_apply()
new_obj.location[0] = target.location[0]
new_obj.location[1] = target.location[1]
new_obj.location[2] = target.location[2]
new_obj.keyframe_insert(data_path = "location", frame = 1)
my alembic testfile, i hope a filehoster link is fine https://rapidgator.net/file/d4d4f04912c8fb24a0f716276fa11ca9/Export_01a.abc.html