Featured post

new redirect for blender.org bpy docs.

http://www.blender.org/api/blender_python_api_current/ As of 10/11 november 2015 we can now link to the current api docs and not be worr...

Showing posts with label regions. Show all posts
Showing posts with label regions. Show all posts

July 10, 2011

Areas

if this is a short post, come back later. or next week. when i have more to write about it.
>>> for area in bpy.context.window.screen.areas: print(area.type)
...
INFO
PROPERTIES
OUTLINER
VIEW_3D
TEXT_EDITOR
CONSOLE

>>> bpy.context.window.screen.areas[3].regions[2].type
'TOOL_PROPS'
it is possible to query regions in that area (header, toolshelves..etc)
>>>bpy.context.area.regions[0].type
...'Header'


# good
bpy.context.area.type = 'GRAPH_EDITOR'

# bad, will crash blender until fixed
bpy.context = 'GRAPH_EDITOR'