* 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:
@@ -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'}
|
||||
|
||||
Reference in New Issue
Block a user