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.
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 = target.location new_obj.location = target.location new_obj.location = target.location 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