import bpy
for window in bpy.context.window_manager.windows:
screen = window.screen
for area in screen.areas:
if area.type == 'VIEW_3D':
override = {'window': window, 'screen': screen, 'area': area}
bpy.ops.screen.screen_full_area(override)
break
I'm learning blender python with its documentation. The code is one of the example code from the tutorial. What I don't understand is, the variable screen
doesn't belong to iterable module called bpy.context.window_manager.windows
. If everything comes together, shouldn't this be bpy.context.window_manager.windows.window.screen
because variable window
is a part of the module?
>>> bpy.context.window_manager.windows.
as_bytes(
data
find(
foreach_get(
foreach_set(
get(
id_data
items(
keys(
path_from_id(
rna_type(
update(
values(
See, there's no module called window
. All I can see in the console panel is bunch of built-in functions.
for area in screen.areas:
if area.type == 'VIEW_3D':
override = {'window': window, 'screen': screen, 'area': area}
bpy.ops.screen.screen_full_area(override)
break
This one is same. I can't find screen.areas
in area
module. screen.areas
is iterable and loop is ongoing so it should say ...screen.areas.area.type
yet there's nothing in it. (even bpy.ops.screen
has no area.type
.)
What is going on in this code? How can I see visually where the modules are located in my console tab?
window = windows[0]
notwindows.window
This is the case for all collections. Also a member of a collection is not necessarily a module. eg a list calledints = [1, 2, 3]
can be iteratedfor i in ints:
there is no expectation that can useints.i
. $\endgroup$