* register operators like other classes

* operators now return sets (converted into flags)
* can't remove bpy_operator_wrap.c since macro's still use the custom register funcs
This commit is contained in:
2009-12-24 19:50:43 +00:00
parent 4dd3e6c360
commit bbe13e7823
41 changed files with 274 additions and 227 deletions

View File

@@ -79,10 +79,10 @@ def execute(context):
try:
line = sc.history[-1].line
except:
return ('CANCELLED',)
return {'CANCELLED'}
if sc.console_type != 'PYTHON':
return ('CANCELLED',)
return {'CANCELLED'}
console, stdout, stderr = get_console(hash(context.region))
@@ -136,7 +136,7 @@ def execute(context):
if output_err:
add_scrollback(output_err, 'ERROR')
return ('FINISHED',)
return {'FINISHED'}
def autocomplete(context):
@@ -150,10 +150,10 @@ def autocomplete(context):
line = current_line.line
if not console:
return ('CANCELLED',)
return {'CANCELLED'}
if sc.console_type != 'PYTHON':
return ('CANCELLED',)
return {'CANCELLED'}
# This function isnt aware of the text editor or being an operator
# just does the autocomp then copy its results back
@@ -172,7 +172,7 @@ def autocomplete(context):
context.area.tag_redraw()
return ('FINISHED',)
return {'FINISHED'}
def banner(context):
@@ -195,4 +195,4 @@ def banner(context):
console = get_console(hash(context.region))[0]
console.locals["C"] = bpy.context
return ('FINISHED',)
return {'FINISHED'}