-
Notifications
You must be signed in to change notification settings - Fork 9
Areas
Dealga McArdle edited this page Jun 30, 2016
·
1 revision
stub:
This finds the largest open editor, splits it, then sets the editor type to for instance.. NODE_EDITOR.
import bpy
def get_largest_area():
window_reference = None
surface_area = 0
ctx = None
for window in bpy.context.window_manager.windows:
for area in window.screen.areas:
w, h = area.width, area.height
surface = w * h
if surface > surface_area:
surface_area = surface
window_reference = area
override = bpy.context.copy()
override['area'] = area
return window_reference, surface_area, override
area, size, ctx = get_largest_area()
bpy.ops.screen.area_split(ctx, direction='HORIZONTAL',factor=0.5)
bpy.ops.wm.context_set_string(ctx, data_path="area.type", value="NODE_EDITOR")
Introduction
Objects / Mesh / BMesh
- Empty - null object
- Mesh
- Bmesh
- bmesh.ops - primitives
- bmesh.ops - mesh opsπ§
- Curves (2d, 3d)
- Text (Font Objects)
- Duplication (instancing)
- Metaballs
Time and Motion
- scripted keyframesπ
- Event Handlersπ
- Drivers
Miscellaneous bpy.data.*
Order / Organization
- Groupingπ
- Parentingπ
- Layers
- UI / Layoutπ
Miscellaneous
- Mathutilsπ
- Modifiersπ
- Particle Systemsπ
- vertex colorsπ
- Textures UV DPI
- Propertiesπ§
- Operators (and callbacks)π§
- bgl / blfπ
- Grease Pencil
- Themes
- Areas
Add-ons
- introductionπ
- import / exportπ
- Text Editorπ
- Custom Nodesπ