[Bf-extensions-cvs] [80562a80] master: Fix calls to object.transform_ apply due to API changes

Jacques Lucke noreply at git.blender.org
Mon Jan 21 14:37:06 CET 2019


Commit: 80562a80306ae9abc5eaa7cd24ab70b09213a213
Author: Jacques Lucke
Date:   Mon Jan 21 14:35:46 2019 +0100
Branches: master
https://developer.blender.org/rBA80562a80306ae9abc5eaa7cd24ab70b09213a213

Fix calls to object.transform_ apply due to API changes

The parameter defaults were changed in rB0c829e8240eebd7ce4ed9d61f8682c0d6bf534f4

===================================================================

M	add_curve_extra_objects/add_surface_plane_cone.py
M	add_mesh_extra_objects/mesh_discombobulator.py
M	io_anim_bvh/import_bvh.py
M	io_import_images_as_planes.py

===================================================================

diff --git a/add_curve_extra_objects/add_surface_plane_cone.py b/add_curve_extra_objects/add_surface_plane_cone.py
index 4f34f654..94889f5b 100644
--- a/add_curve_extra_objects/add_surface_plane_cone.py
+++ b/add_curve_extra_objects/add_surface_plane_cone.py
@@ -330,7 +330,7 @@ class MakeSurfacePlane(Operator, MakeSurfaceHelpers):
         bpy.ops.object.mode_set(mode='OBJECT')
         bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY', center='MEDIAN')
         # transform scale
-        bpy.ops.object.transform_apply(scale=True)
+        bpy.ops.object.transform_apply(location=False,rotation=False,scale=True)
 
         # bring object to 3d cursor
         bpy.ops.object.mode_set(mode='OBJECT')
diff --git a/add_mesh_extra_objects/mesh_discombobulator.py b/add_mesh_extra_objects/mesh_discombobulator.py
index f168e32b..4fcbf593 100644
--- a/add_mesh_extra_objects/mesh_discombobulator.py
+++ b/add_mesh_extra_objects/mesh_discombobulator.py
@@ -339,7 +339,7 @@ def doodads(object1, mesh1, dmin, dmax):
             # First we have to apply scaling and rotation to the mesh
             bpy.ops.object.select_pattern(pattern=bpy.context.scene.discomb.DISC_doodads[type_dood], extend=False)
             bpy.context.scene.objects.active = bpy.data.objects[bpy.context.scene.discomb.DISC_doodads[type_dood]]
-            bpy.ops.object.transform_apply(rotation=True, scale=True)
+            bpy.ops.object.transform_apply(location=False, rotation=True, scale=True)
 
             for polygon in bpy.data.objects[bpy.context.scene.discomb.DISC_doodads[type_dood]].data.polygons:
                 polygons_add.append(polygon.vertices)
diff --git a/io_anim_bvh/import_bvh.py b/io_anim_bvh/import_bvh.py
index f609ca6c..f06a1d87 100644
--- a/io_anim_bvh/import_bvh.py
+++ b/io_anim_bvh/import_bvh.py
@@ -650,7 +650,7 @@ def bvh_node_dict2armature(
 
     # finally apply matrix
     arm_ob.matrix_world = global_matrix
-    bpy.ops.object.transform_apply(rotation=True)
+    bpy.ops.object.transform_apply(location=False, rotation=True, scale=False)
 
     return arm_ob
 
diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py
index 5cc15311..fb8cbc1e 100644
--- a/io_import_images_as_planes.py
+++ b/io_import_images_as_planes.py
@@ -1046,7 +1046,7 @@ class IMPORT_IMAGE_OT_to_plane(Operator, AddObjectHelper):
             bpy.ops.object.mode_set(mode='OBJECT')
         plane.dimensions = width, height, 0.0
         plane.data.name = plane.name = name
-        bpy.ops.object.transform_apply(scale=True)
+        bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)
 
         # If sizing for camera, also insert into the camera's field of view
         if self.size_mode == 'CAMERA':



More information about the Bf-extensions-cvs mailing list