[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45698] trunk/blender/release/scripts/ startup/bl_operators/uvcalc_lightmap.py: Partial revert of rev45691: allow lightmap undo and add comment why redo was disabled

Sergey Sharybin sergey.vfx at gmail.com
Mon Apr 16 16:27:22 CEST 2012


Revision: 45698
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45698
Author:   nazgul
Date:     2012-04-16 14:27:22 +0000 (Mon, 16 Apr 2012)
Log Message:
-----------
Partial revert of rev45691: allow lightmap undo and add comment why redo was disabled

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45691

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_operators/uvcalc_lightmap.py

Modified: trunk/blender/release/scripts/startup/bl_operators/uvcalc_lightmap.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/uvcalc_lightmap.py	2012-04-16 13:53:30 UTC (rev 45697)
+++ trunk/blender/release/scripts/startup/bl_operators/uvcalc_lightmap.py	2012-04-16 14:27:22 UTC (rev 45698)
@@ -550,6 +550,16 @@
     bl_idname = "uv.lightmap_pack"
     bl_label = "Lightmap Pack"
 
+    # Disable REGISTER flag for now because this operator might create new
+    # images. This leads to non-proper operator redo because current undo
+    # stack is local for edit mode and can not remove images created by this
+    # oprtator.
+    # Proper solution would be to make undo stack aware of such things,
+    # but for now just disable redo. Keep undo here so unwanted changes to uv
+    # coords might be undone.
+    # This fixes infinite image creation reported there [#30968] (sergey)
+    bl_options = {'UNDO'}
+
     PREF_CONTEXT = bpy.props.EnumProperty(
             name="Selection",
             items=(('SEL_FACES', "Selected Faces", "Space all UVs evently"),




More information about the Bf-blender-cvs mailing list