System Information
Windows 7, 64bit
Blender Version
Broken: 2.70.4 (1e39046)
Short description of error
Operators which invoke popups and have no 'UNDO' in bl_options crash Blender when edits are made to the properties shown in the popup.
A runtime error is raised if no options are set at all during an invocation, so should a missing 'UNDO' throw an error if invoke_*popup() functions are called in invoke().
Exact steps for others to reproduce the error
Based on a (as simple as possible) attached .blend file with minimum amount of steps
Test script:
import bpy
def main(context):
for ob in context.scene.objects:
print(ob)
class SimpleOperator(bpy.types.Operator):
"""Tooltip"""
bl_idname = "object.simple_operator"
bl_label = "Simple Object Operator"
bl_options = {'REGISTER'} # no 'UNDO' !
my_string = bpy.props.StringProperty("My String")
@classmethod
def poll(cls, context):
return context.active_object is not None
def invoke(self, context, event):
return context.window_manager.invoke_props_popup(self, event)
def execute(self, context):
main(context)
return {'FINISHED'}
def register():
bpy.utils.register_class(SimpleOperator)
def unregister():
bpy.utils.unregister_class(SimpleOperator)
if __name__ == "__main__":
register()
# test call
bpy.ops.object.simple_operator('INVOKE_DEFAULT')