Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_operators/object.py
| Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | extend: BoolProperty( | ||||
| description="Extend the selection", | description="Extend the selection", | ||||
| default=False | default=False | ||||
| ) | ) | ||||
| def execute(self, context): | def execute(self, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| view_layer = context.view_layer | view_layer = context.view_layer | ||||
| view = context.space_data | view = context.space_data | ||||
| if view.type == 'VIEW_3D' and not view.lock_camera_and_layers: | if view.type == 'VIEW_3D' and view.use_local_camera: | ||||
| camera = view.camera | camera = view.camera | ||||
| else: | else: | ||||
| camera = scene.camera | camera = scene.camera | ||||
| if camera is None: | if camera is None: | ||||
| self.report({'WARNING'}, "No camera found") | self.report({'WARNING'}, "No camera found") | ||||
| elif camera.name not in scene.objects: | elif camera.name not in scene.objects: | ||||
| self.report({'WARNING'}, "Active camera is not in this scene") | self.report({'WARNING'}, "Active camera is not in this scene") | ||||
| ▲ Show 20 Lines • Show All 870 Lines • Show Last 20 Lines | |||||