Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_data_camera.py
| Show All 23 Lines | |||||
| class CameraButtonsPanel: | class CameraButtonsPanel: | ||||
| bl_space_type = 'PROPERTIES' | bl_space_type = 'PROPERTIES' | ||||
| bl_region_type = 'WINDOW' | bl_region_type = 'WINDOW' | ||||
| bl_context = "data" | bl_context = "data" | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| engine = context.scene.render.engine | engine = context.engine | ||||
| return context.camera and (engine in cls.COMPAT_ENGINES) | return context.camera and (engine in cls.COMPAT_ENGINES) | ||||
| class CAMERA_MT_presets(Menu): | class CAMERA_MT_presets(Menu): | ||||
| bl_label = "Camera Presets" | bl_label = "Camera Presets" | ||||
| preset_subdir = "camera" | preset_subdir = "camera" | ||||
| preset_operator = "script.execute_preset" | preset_operator = "script.execute_preset" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} | ||||
| ▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| elif cam.lens_unit == 'FOV': | elif cam.lens_unit == 'FOV': | ||||
| row.prop(cam, "angle") | row.prop(cam, "angle") | ||||
| row.prop(cam, "lens_unit", text="") | row.prop(cam, "lens_unit", text="") | ||||
| elif cam.type == 'ORTHO': | elif cam.type == 'ORTHO': | ||||
| col.prop(cam, "ortho_scale") | col.prop(cam, "ortho_scale") | ||||
| elif cam.type == 'PANO': | elif cam.type == 'PANO': | ||||
| engine = context.scene.render.engine | engine = context.engine | ||||
| if engine == 'CYCLES': | if engine == 'CYCLES': | ||||
| ccam = cam.cycles | ccam = cam.cycles | ||||
| col.prop(ccam, "panorama_type", text="Type") | col.prop(ccam, "panorama_type", text="Type") | ||||
| if ccam.panorama_type == 'FISHEYE_EQUIDISTANT': | if ccam.panorama_type == 'FISHEYE_EQUIDISTANT': | ||||
| col.prop(ccam, "fisheye_fov") | col.prop(ccam, "fisheye_fov") | ||||
| elif ccam.panorama_type == 'FISHEYE_EQUISOLID': | elif ccam.panorama_type == 'FISHEYE_EQUISOLID': | ||||
| row = layout.row() | row = layout.row() | ||||
| row.prop(ccam, "fisheye_lens", text="Lens") | row.prop(ccam, "fisheye_lens", text="Lens") | ||||
| ▲ Show 20 Lines • Show All 121 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| col = split.column() | col = split.column() | ||||
| col.label(text="Focus:") | col.label(text="Focus:") | ||||
| col.prop(cam, "dof_object", text="") | col.prop(cam, "dof_object", text="") | ||||
| sub = col.column() | sub = col.column() | ||||
| sub.active = (cam.dof_object is None) | sub.active = (cam.dof_object is None) | ||||
| sub.prop(cam, "dof_distance", text="Distance") | sub.prop(cam, "dof_distance", text="Distance") | ||||
| if context.scene.render.engine == 'BLENDER_EEVEE': | if context.engine == 'BLENDER_EEVEE': | ||||
| col = split.column(align=True) | col = split.column(align=True) | ||||
| col.label("Aperture:") | col.label("Aperture:") | ||||
| engine = context.scene.render.engine | engine = context.engine | ||||
| sub = col.column(align=True) | sub = col.column(align=True) | ||||
| sub.prop(dof_options, "fstop") | sub.prop(dof_options, "fstop") | ||||
| sub.prop(dof_options, "blades") | sub.prop(dof_options, "blades") | ||||
| sub.prop(dof_options, "rotation") | sub.prop(dof_options, "rotation") | ||||
| sub.prop(dof_options, "ratio") | sub.prop(dof_options, "ratio") | ||||
| else: | else: | ||||
| hq_support = dof_options.is_hq_supported | hq_support = dof_options.is_hq_supported | ||||
| col = split.column(align=True) | col = split.column(align=True) | ||||
| ▲ Show 20 Lines • Show All 106 Lines • Show Last 20 Lines | |||||