- copyObj.scale=obj.scale
- bpy.ops.object.transform_apply(scale=True)
- copyObj.rotation_euler=obj.rotation_euler
- bpy.ops.object.transform_apply(rotation=True)
- copyObj.location=obj.location
- bpy.ops.object.transform_apply(location=True)
+ try:
+ # svn 36722
+ copyObj.scale=obj.scale
+ bpy.ops.object.transform_apply(scale=True)
+ copyObj.rotation_euler=obj.rotation_euler
+ bpy.ops.object.transform_apply(rotation=True)
+ copyObj.location=obj.location
+ bpy.ops.object.transform_apply(location=True)
+ except AttributeError as e:
+ # 2.57b
+ copyObj.scale=obj.scale
+ bpy.ops.object.scale_apply()
+ copyObj.rotation_euler=obj.rotation_euler
+ bpy.ops.object.rotation_apply()
+ copyObj.location=obj.location
+ bpy.ops.object.location_apply()
+