Is there a Python command that will allow me to set the camera clip end for viewing my objects in Blender (via scripting)? According to http://www.blender.org/api/blender_python_api_2_69_release/bpy.context.html the "bpy.context.space_data" variable is read-only.
bpy.context.space_data is read-only, but it's properties are not.
For the active scene camera
This gets the
clip_end value for the active camera from the current scene, assuming there is one. If the current scene doesn't have an active camera, then
None and this will raise an
For the viewport:
for a in bpy.context.screen.areas: if a.type == 'VIEW_3D': for s in a.spaces: if s.type == 'VIEW_3D': s.clip_end = <your value>
This iterates through all areas in the current screen until it finds a 3D view, then iterates through all spaces in the 3D view until it finds a 3D view space, which is the object containing the