Blender Git Commit Log

Git Commits -> Revision 2f74b5a

Revision 2f74b5a by Campbell Barton (master)
July 16, 2009, 00:50 (GMT)
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.

Commit Details:

Full Hash: 2f74b5a2605d3bb83f6c7500f9d3899296bfbb59
SVN Revision: 21611
Parent Commit: ce431c5
Lines Changed: +1924, -389

6 Added Paths:

/release/ui/space_console.py (+417, -0) (View)
/source/blender/editors/space_console/console_draw.c (+214, -0) (View)
/source/blender/editors/space_console/console_intern.h (+75, -0) (View)
/source/blender/editors/space_console/console_ops.c (+570, -0) (View)
/source/blender/editors/space_console/SConscript (+13, -0) (View)
/source/blender/editors/space_console/space_console.c (+336, -0) (View)

23 Modified Paths:

/release/ui/space_text.py (+0, -373) (Diff)
/source/blender/blenkernel/BKE_context.h (+2, -0) (Diff)
/source/blender/blenkernel/BKE_report.h (+14, -7) (Diff)
/source/blender/blenkernel/intern/context.c (+12, -0) (Diff)
/source/blender/blenkernel/intern/report.c (+1, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+15, -1) (Diff)
/source/blender/blenloader/intern/writefile.c (+3, -0) (Diff)
/source/blender/editors/include/ED_space_api.h (+1, -0) (Diff)
/source/blender/editors/SConscript (+1, -0) (Diff)
/source/blender/editors/screen/area.c (+1, -0) (Diff)
/source/blender/editors/space_api/spacetypes.c (+1, -0) (Diff)
/source/blender/makesdna/DNA_space_types.h (+57, -1) (Diff)
/source/blender/makesdna/DNA_windowmanager_types.h (+1, -1) (Diff)
/source/blender/makesrna/intern/rna_screen.c (+11, -0) (Diff)
/source/blender/makesrna/intern/rna_space.c (+134, -0) (Diff)
/source/blender/makesrna/RNA_access.h (+1, -0) (Diff)
/source/blender/python/intern/bpy_ui.c (+1, -0) (Diff)
/source/blender/windowmanager/intern/wm.c (+12, -1) (Diff)
/source/blender/windowmanager/intern/wm_event_system.c (+3, -3) (Diff)
/source/blender/windowmanager/intern/wm_init_exit.c (+21, -0) (Diff)
/source/blender/windowmanager/intern/wm_operators.c (+1, -1) (Diff)
/source/blender/windowmanager/wm.h (+1, -1) (Diff)
/source/blender/windowmanager/WM_types.h (+5, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021