0
$\begingroup$

I'm trying to autom the applying of several objects armature transformation. Nevertheless, I cannot achieve it with the code below. On tests, it seems that the problem lies in the last but one line.

import bpy

context = bpy.context
scene = context.scene

objs = bpy.data.objects

for obj in objs:
         if obj != None:
           obj.select = True
           bpy.context.scene.objects.active = obj
           bpy.ops.object.transform_apply(apply_as='DATA', modifier="Armature") #this line is throwing error
           obj.select = False      

Thanks for helping!

$\endgroup$

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.