Console Space Type
authorCampbell Barton <ideasman42@gmail.com>
Thu, 16 Jul 2009 00:50:27 +0000 (00:50 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 16 Jul 2009 00:50:27 +0000 (00:50 +0000)
commit2f74b5a2605d3bb83f6c7500f9d3899296bfbb59
treec1b951cd060da50afce59791dbbd123347d18a46
parentce431c5c6e17877846812bab2d6bf9f8dc40fd48
Console Space Type
* interactive console python console.
* display reports and filter types. defaults to operator display so you can see the python commands for tools as you use them,
  eventually it should be possible to select commands and make macto/tools from them.

Example use of autocomp.  b<tab>, bpy.<tab>, bpy.<tab>, bpy.data.<tab> etc.

basic instructions are printed when opening the console.

Details...
* Console exec and autocomp are done with operators written in python.
* added CTX_wm_reports() to get the global report list.
* The window manager had a report ListBase but reports have their own struct, switched to allocate and assign when initializing the WM since the type is not available in DNA.
* changed report types flags for easier display filtering.
* added report type RPT_OPERATOR
* logging operators also adds a python-syntax report into CTX_wm_reports() so they can be displayed in the console as well as calling a notifier for console to redraw.
* RnaAPI context.area.tag_redraw() to redraw the current area from a python operator.

Todo...
* better interactions with the console, scrolling, copy/paste.
* the text displayed doesnt load back.
* colors need to be themed.
* scroll limit needs to be a user pref.
* only tested with cmake and scons.
29 files changed:
release/ui/space_console.py [new file with mode: 0644]
release/ui/space_text.py
source/blender/blenkernel/BKE_context.h
source/blender/blenkernel/BKE_report.h
source/blender/blenkernel/intern/context.c
source/blender/blenkernel/intern/report.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/SConscript
source/blender/editors/include/ED_space_api.h
source/blender/editors/screen/area.c
source/blender/editors/space_api/spacetypes.c
source/blender/editors/space_console/SConscript [new file with mode: 0644]
source/blender/editors/space_console/console_draw.c [new file with mode: 0644]
source/blender/editors/space_console/console_intern.h [new file with mode: 0644]
source/blender/editors/space_console/console_ops.c [new file with mode: 0644]
source/blender/editors/space_console/space_console.c [new file with mode: 0644]
source/blender/makesdna/DNA_space_types.h
source/blender/makesdna/DNA_windowmanager_types.h
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/rna_screen.c
source/blender/makesrna/intern/rna_space.c
source/blender/python/intern/bpy_ui.c
source/blender/windowmanager/WM_types.h
source/blender/windowmanager/intern/wm.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/wm.h