W special menu for changing orthographic camera lens scale was missing
authorDaniel Salazar <zanqdo@gmail.com>
Fri, 24 Jun 2011 03:41:07 +0000 (03:41 +0000)
committerDaniel Salazar <zanqdo@gmail.com>
Fri, 24 Jun 2011 03:41:07 +0000 (03:41 +0000)
btw continues grab doesn't work with this modal ops.. whats up?

release/scripts/startup/bl_ui/space_view3d.py

index efea8d31834f8de30d2d0f86ed7dd3df91e86c09..aead20f76e37c508a0a0212aa1e2c32d5f252f93 100644 (file)
@@ -774,10 +774,16 @@ class VIEW3D_MT_object_specials(bpy.types.Menu):
         if obj.type == 'CAMERA':
             layout.operator_context = 'INVOKE_REGION_WIN'
 
-            props = layout.operator("wm.context_modal_mouse", text="Camera Lens Angle")
-            props.data_path_iter = "selected_editable_objects"
-            props.data_path_item = "data.lens"
-            props.input_scale = 0.1
+            if obj.data.type == 'PERSP':
+                props = layout.operator("wm.context_modal_mouse", text="Camera Lens Angle")
+                props.data_path_iter = "selected_editable_objects"
+                props.data_path_item = "data.lens"
+                props.input_scale = 0.1
+            else:
+                props = layout.operator("wm.context_modal_mouse", text="Camera Lens Scale")
+                props.data_path_iter = "selected_editable_objects"
+                props.data_path_item = "data.ortho_scale"
+                props.input_scale = 0.01
 
             if not obj.data.dof_object:
                 #layout.label(text="Test Has DOF obj");