View Single Post
int_ua's Avatar
Posts: 676 | Thanked: 1,067 times | Joined on Jul 2010 @ Kyiv, Ukraine
#9
First working code that controls one boolean value of 3d view with python (for Blender 2.54):

Code:
import bpy

def test():
    areas = bpy.context.screen.areas
    for area in areas:
        if area.type == 'VIEW_3D':
            area.active_space.show_floor=not(area.active_space.show_floor)
test()
using two links:
http://www.blender.org/documentation...aceView3D.html
http://blenderartists.org/forum/showthread.php?t=193207

Update: rotating camera (not view yet but object named so):
Code:
area.active_space.camera.rotation_euler.rotate(0.2,'X')

Last edited by int_ua; 2010-09-13 at 19:08.