[Durian-svn] [1147] Wow! Under the guidance of the wise Nathan Vegdahl, Colin has made modifications to the camera rig!

colin durian-svn at blender.org
Sat Feb 27 19:39:49 CET 2010


Revision: 1147
          https://blenderinstitute.dyndns.org/durian-svn/?do=log&project=durian&path=/&rev=1147
Author:   colin
Date:     2010-02-27 19:39:49 +0100 (Sat, 27 Feb 2010)
Log Message:
-----------
Wow!  Under the guidance of the wise Nathan Vegdahl, Colin has made modifications to the camera rig!

Modified Paths:
--------------
    pro/scripts/ui/add_tripod_camera.py

Modified: pro/scripts/ui/add_tripod_camera.py
===================================================================
--- pro/scripts/ui/add_tripod_camera.py	2010-02-26 19:15:08 UTC (rev 1146)
+++ pro/scripts/ui/add_tripod_camera.py	2010-02-27 18:39:49 UTC (rev 1147)
@@ -34,35 +34,44 @@
 
     def execute(self, context):
         scale = 0.2 # over-all scale of the camera setup
-    
+        layers = [a==9 for a in range(0,20)]
+
+        # Deselect objects
+        for obj in context.scene.objects:
+            obj.selected = False        
+
         # Create camera object
         viewer = bpy.data.objects.new(name="viewer", object_data=bpy.data.cameras.new(name="viewer"))
         context.scene.objects.link(viewer)
-        viewer.layers = context.scene.visible_layers
+        viewer.layers = layers
         
         # Create camera empty
         camera = bpy.data.objects.new(name="camera", object_data=None)
         context.scene.objects.link(camera)
-        camera.layers = context.scene.visible_layers
+        camera.layers = layers
         
         # Create tripod empty
         tripod = bpy.data.objects.new(name="tripod", object_data=None)
         context.scene.objects.link(tripod)
-        tripod.layers = context.scene.visible_layers
+        tripod.layers = layers
+        tripod.selected = True
+        context.scene.objects.active = tripod
+
         
         # Create target empty
         target = bpy.data.objects.new(name="camera_target", object_data=None)
         context.scene.objects.link(target)
-        target.layers = context.scene.visible_layers
-        
-        
+        target.layers = layers
+
+
         # Parenting
         viewer.parent = camera
         camera.parent = tripod
         target.parent = tripod
         
         
-        # Transforms
+        # Transforms  # Deselect objects
+        
         camera.rotation_mode = 'ZXY'
         tripod.rotation_mode = 'QUATERNION'
         viewer.rotation_euler[1] = math.pi
@@ -83,6 +92,7 @@
         viewer.data.show_passepartout = True
         viewer.data.show_limits = False
         viewer.data.draw_size = 0.5 * scale
+        viewer.data.clip_end = 1000
         camera.empty_draw_type = 'CUBE'
         camera.empty_draw_size = 0.5 * scale
         tripod.empty_draw_type = 'CIRCLE'
@@ -188,4 +198,3 @@
 
 if __name__ == "__main__":
     register()
-



More information about the Durian-svn mailing list