Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-11-17 15:32:39 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-17 15:32:39 +0300
commit376d129dc6372c4d09ca9194f40323f5fbf1624a (patch)
treeb780bbc62956dfccad32f5212f05b901d6d0c381 /release
parent673ed8b50d68fc493e7cbbfdf5fa9ebd97a44866 (diff)
bugfix [#24671] Operators called from Python Leak Memory
This problem is caused by returning Modal from a non-modal operator.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/ui/space_view3d.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py
index e44b4220829..8c85c389c0d 100644
--- a/release/scripts/ui/space_view3d.py
+++ b/release/scripts/ui/space_view3d.py
@@ -1439,13 +1439,16 @@ class VIEW3D_OT_edit_mesh_extrude_individual_move(bpy.types.Operator):
totvert = mesh.total_vert_sel
if select_mode[2] and totface == 1:
- return bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN', TRANSFORM_OT_translate={"constraint_orientation": 'NORMAL', "constraint_axis": (False, False, True)})
+ bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN', TRANSFORM_OT_translate={"constraint_orientation": 'NORMAL', "constraint_axis": (False, False, True)})
elif select_mode[2] and totface > 1:
- return bpy.ops.mesh.extrude_faces_move('INVOKE_REGION_WIN')
+ bpy.ops.mesh.extrude_faces_move('INVOKE_REGION_WIN')
elif select_mode[1] and totedge >= 1:
- return bpy.ops.mesh.extrude_edges_move('INVOKE_REGION_WIN')
+ bpy.ops.mesh.extrude_edges_move('INVOKE_REGION_WIN')
else:
- return bpy.ops.mesh.extrude_vertices_move('INVOKE_REGION_WIN')
+ bpy.ops.mesh.extrude_vertices_move('INVOKE_REGION_WIN')
+
+ # ignore return from operators above because they are 'RUNNING_MODAL', and cause this one not to be freed. [#24671]
+ return {'FINISHED'}
def invoke(self, context, event):
return self.execute(context)
@@ -1464,11 +1467,14 @@ class VIEW3D_OT_edit_mesh_extrude_move(bpy.types.Operator):
totvert = mesh.total_vert_sel
if totface >= 1:
- return bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN', TRANSFORM_OT_translate={"constraint_orientation": 'NORMAL', "constraint_axis": (False, False, True)})
+ bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN', TRANSFORM_OT_translate={"constraint_orientation": 'NORMAL', "constraint_axis": (False, False, True)})
elif totedge == 1:
- return bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN', TRANSFORM_OT_translate={"constraint_orientation": 'NORMAL', "constraint_axis": (True, True, False)})
+ bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN', TRANSFORM_OT_translate={"constraint_orientation": 'NORMAL', "constraint_axis": (True, True, False)})
else:
- return bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN')
+ bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN')
+
+ # ignore return from operators above because they are 'RUNNING_MODAL', and cause this one not to be freed. [#24671]
+ return {'FINISHED'}
def invoke(self, context, event):
return self.execute(context)