How do check the box labeled "Lock Camera to View" using Python?
There is a "lock_camera" property, but I don't know how to navigate to the object that has it to set it.
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.
Sign up to join this communityThis code checks the "Lock Camera to View" box:
for area in bpy.context.screen.areas:
if area.type == 'VIEW_3D':
for space in area.spaces:
if space.type == 'VIEW_3D':
space.lock_camera = True
area.spaces.active
to get the space assoc. with the area.
$\endgroup$
Apr 27, 2018 at 7:45