diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-06 14:38:44 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-06 14:38:44 +0400 |
commit | e936c78251de5bafa99439803ab4fd2caa4df3b2 (patch) | |
tree | 51ccdc2efbab74903cb7b428619726832c3b1ab4 /release | |
parent | 735ab2b22d865570a4585e7088e66a45030ddf2d (diff) | |
parent | b18e661ffcd39b97ac0c8295d778a1cb31339ed8 (diff) |
svn merge ^/trunk/blender -r41503:41575
Diffstat (limited to 'release')
31 files changed, 224 insertions, 42 deletions
diff --git a/release/scripts/presets/camera/APS-C_DSLR.py b/release/scripts/presets/camera/APS-C_DSLR.py new file mode 100644 index 00000000000..829e03cc5cf --- /dev/null +++ b/release/scripts/presets/camera/APS-C_DSLR.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 22.3 +bpy.context.object.data.sensor_height = 14.9 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/Blender.py b/release/scripts/presets/camera/Blender.py new file mode 100644 index 00000000000..9fa4ab752e3 --- /dev/null +++ b/release/scripts/presets/camera/Blender.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 32 +bpy.context.object.data.sensor_height = 18 +bpy.context.object.data.sensor_fit = 'AUTO' diff --git a/release/scripts/presets/camera/Canon_1100D.py b/release/scripts/presets/camera/Canon_1100D.py new file mode 100644 index 00000000000..54f2cf75b54 --- /dev/null +++ b/release/scripts/presets/camera/Canon_1100D.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 22.2 +bpy.context.object.data.sensor_height = 14.7 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/Canon_1D.py b/release/scripts/presets/camera/Canon_1D.py new file mode 100644 index 00000000000..0bb0e910377 --- /dev/null +++ b/release/scripts/presets/camera/Canon_1D.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 27.9 +bpy.context.object.data.sensor_height = 18.6 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/Canon_1DS.py b/release/scripts/presets/camera/Canon_1DS.py new file mode 100644 index 00000000000..158a6235f32 --- /dev/null +++ b/release/scripts/presets/camera/Canon_1DS.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 36.0 +bpy.context.object.data.sensor_height = 24.0 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/Canon_500D.py b/release/scripts/presets/camera/Canon_500D.py new file mode 100644 index 00000000000..829e03cc5cf --- /dev/null +++ b/release/scripts/presets/camera/Canon_500D.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 22.3 +bpy.context.object.data.sensor_height = 14.9 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/Canon_550D.py b/release/scripts/presets/camera/Canon_550D.py new file mode 100644 index 00000000000..829e03cc5cf --- /dev/null +++ b/release/scripts/presets/camera/Canon_550D.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 22.3 +bpy.context.object.data.sensor_height = 14.9 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/Canon_5D.py b/release/scripts/presets/camera/Canon_5D.py new file mode 100644 index 00000000000..158a6235f32 --- /dev/null +++ b/release/scripts/presets/camera/Canon_5D.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 36.0 +bpy.context.object.data.sensor_height = 24.0 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/Canon_600D.py b/release/scripts/presets/camera/Canon_600D.py new file mode 100644 index 00000000000..829e03cc5cf --- /dev/null +++ b/release/scripts/presets/camera/Canon_600D.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 22.3 +bpy.context.object.data.sensor_height = 14.9 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/Canon_60D.py b/release/scripts/presets/camera/Canon_60D.py new file mode 100644 index 00000000000..829e03cc5cf --- /dev/null +++ b/release/scripts/presets/camera/Canon_60D.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 22.3 +bpy.context.object.data.sensor_height = 14.9 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/Canon_7D.py b/release/scripts/presets/camera/Canon_7D.py new file mode 100644 index 00000000000..829e03cc5cf --- /dev/null +++ b/release/scripts/presets/camera/Canon_7D.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 22.3 +bpy.context.object.data.sensor_height = 14.9 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/Nikon_D300S.py b/release/scripts/presets/camera/Nikon_D300S.py new file mode 100644 index 00000000000..a0505bf9b9c --- /dev/null +++ b/release/scripts/presets/camera/Nikon_D300S.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 23.6 +bpy.context.object.data.sensor_height = 15.8 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/Nikon_D3100.py b/release/scripts/presets/camera/Nikon_D3100.py new file mode 100644 index 00000000000..238d9c22d12 --- /dev/null +++ b/release/scripts/presets/camera/Nikon_D3100.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 23.1 +bpy.context.object.data.sensor_height = 15.4 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/Nikon_D35.py b/release/scripts/presets/camera/Nikon_D35.py new file mode 100644 index 00000000000..e6dc62dc100 --- /dev/null +++ b/release/scripts/presets/camera/Nikon_D35.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 36.0 +bpy.context.object.data.sensor_height = 23.9 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/Nikon_D5000.py b/release/scripts/presets/camera/Nikon_D5000.py new file mode 100644 index 00000000000..a0505bf9b9c --- /dev/null +++ b/release/scripts/presets/camera/Nikon_D5000.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 23.6 +bpy.context.object.data.sensor_height = 15.8 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/Nikon_D5100.py b/release/scripts/presets/camera/Nikon_D5100.py new file mode 100644 index 00000000000..1d819cce65b --- /dev/null +++ b/release/scripts/presets/camera/Nikon_D5100.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 23.6 +bpy.context.object.data.sensor_height = 15.6 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/Nikon_D7000.py b/release/scripts/presets/camera/Nikon_D7000.py new file mode 100644 index 00000000000..1d819cce65b --- /dev/null +++ b/release/scripts/presets/camera/Nikon_D7000.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 23.6 +bpy.context.object.data.sensor_height = 15.6 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/Nikon_D90.py b/release/scripts/presets/camera/Nikon_D90.py new file mode 100644 index 00000000000..a0505bf9b9c --- /dev/null +++ b/release/scripts/presets/camera/Nikon_D90.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 23.6 +bpy.context.object.data.sensor_height = 15.8 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/Red_Epic.py b/release/scripts/presets/camera/Red_Epic.py new file mode 100644 index 00000000000..14f4abaee90 --- /dev/null +++ b/release/scripts/presets/camera/Red_Epic.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 30.0 +bpy.context.object.data.sensor_height = 15.0 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/Red_One_2K.py b/release/scripts/presets/camera/Red_One_2K.py new file mode 100644 index 00000000000..ef2708f75b2 --- /dev/null +++ b/release/scripts/presets/camera/Red_One_2K.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 11.1 +bpy.context.object.data.sensor_height = 6.24 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/Red_One_3K.py b/release/scripts/presets/camera/Red_One_3K.py new file mode 100644 index 00000000000..5ddff2746eb --- /dev/null +++ b/release/scripts/presets/camera/Red_One_3K.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 16.65 +bpy.context.object.data.sensor_height = 9.36 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/Red_One_4K.py b/release/scripts/presets/camera/Red_One_4K.py new file mode 100644 index 00000000000..8ab9b38cbd5 --- /dev/null +++ b/release/scripts/presets/camera/Red_One_4K.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 22.2 +bpy.context.object.data.sensor_height = 12.6 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/full_frame_35mm_film.py b/release/scripts/presets/camera/full_frame_35mm_film.py new file mode 100644 index 00000000000..d3e141ba4d9 --- /dev/null +++ b/release/scripts/presets/camera/full_frame_35mm_film.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 36 +bpy.context.object.data.sensor_height = 24 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/micro_four_thirds.py b/release/scripts/presets/camera/micro_four_thirds.py new file mode 100644 index 00000000000..36fb0aac391 --- /dev/null +++ b/release/scripts/presets/camera/micro_four_thirds.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 17.3 +bpy.context.object.data.sensor_height = 13.0 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/super_16_film.py b/release/scripts/presets/camera/super_16_film.py new file mode 100644 index 00000000000..1e42953bf05 --- /dev/null +++ b/release/scripts/presets/camera/super_16_film.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 12.52 +bpy.context.object.data.sensor_height = 7.41 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/presets/camera/super_35_film.py b/release/scripts/presets/camera/super_35_film.py new file mode 100644 index 00000000000..65ccb0f216c --- /dev/null +++ b/release/scripts/presets/camera/super_35_film.py @@ -0,0 +1,4 @@ +import bpy +bpy.context.object.data.sensor_width = 24.89 +bpy.context.object.data.sensor_height = 18.66 +bpy.context.object.data.sensor_fit = 'HORIZONTAL' diff --git a/release/scripts/startup/bl_operators/presets.py b/release/scripts/startup/bl_operators/presets.py index 2e42105fbf0..21ac128f177 100644 --- a/release/scripts/startup/bl_operators/presets.py +++ b/release/scripts/startup/bl_operators/presets.py @@ -195,6 +195,25 @@ class AddPresetRender(AddPresetBase, Operator): preset_subdir = "render" +class AddPresetCamera(AddPresetBase, Operator): + '''Add a Camera Preset''' + bl_idname = "camera.preset_add" + bl_label = "Add Camera Preset" + preset_menu = "CAMERA_MT_presets" + + preset_defines = [ + "cam = bpy.context.object.data" + ] + + preset_values = [ + "cam.sensor_width", + "cam.sensor_height", + "cam.sensor_fit" + ] + + preset_subdir = "camera" + + class AddPresetSSS(AddPresetBase, Operator): '''Add a Subsurface Scattering Preset''' bl_idname = "material.sss_preset_add" diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py index 5255af40951..0abbf281754 100644 --- a/release/scripts/startup/bl_ui/properties_data_camera.py +++ b/release/scripts/startup/bl_ui/properties_data_camera.py @@ -33,6 +33,14 @@ class CameraButtonsPanel(): return context.camera and (engine in cls.COMPAT_ENGINES) +class CAMERA_MT_presets(bpy.types.Menu): + bl_label = "Camera Presets" + preset_subdir = "camera" + preset_operator = "script.execute_preset" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + draw = bpy.types.Menu.draw_preset + + class DATA_PT_context_camera(CameraButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} @@ -54,7 +62,7 @@ class DATA_PT_context_camera(CameraButtonsPanel, Panel): split.separator() -class DATA_PT_camera(CameraButtonsPanel, Panel): +class DATA_PT_lens(CameraButtonsPanel, Panel): bl_label = "Lens" COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} @@ -69,12 +77,12 @@ class DATA_PT_camera(CameraButtonsPanel, Panel): col = split.column() if cam.type == 'PERSP': + row = col.row() if cam.lens_unit == 'MILLIMETERS': - col.prop(cam, "lens") + row.prop(cam, "lens") elif cam.lens_unit == 'DEGREES': - col.prop(cam, "angle") - col = split.column() - col.prop(cam, "lens_unit", text="") + row.prop(cam, "angle") + row.prop(cam, "lens_unit", text="") elif cam.type == 'ORTHO': col.prop(cam, "ortho_scale") @@ -100,18 +108,54 @@ class DATA_PT_camera(CameraButtonsPanel, Panel): col.prop(cam, "clip_start", text="Start") col.prop(cam, "clip_end", text="End") - layout.label(text="Depth of Field:") +class DATA_PT_camera(CameraButtonsPanel, Panel): + bl_label = "Camera" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + + def draw(self, context): + layout = self.layout + + cam = context.camera + + row = layout.row(align=True) + + row.menu("CAMERA_MT_presets", text=bpy.types.CAMERA_MT_presets.bl_label) + row.operator("camera.preset_add", text="", icon="ZOOMIN") + row.operator("camera.preset_add", text="", icon="ZOOMOUT").remove_active = True + + layout.label(text="Sensor:") + + split = layout.split() + + col = split.column(align=True) + if cam.sensor_fit == 'AUTO': + col.prop(cam, "sensor_width", text="Size") + else: + col.prop(cam, "sensor_width", text="Width") + col.prop(cam, "sensor_height", text="Height") + + col = split.column(align=True) + col.prop(cam, "sensor_fit", text="") + +class DATA_PT_camera_dof(CameraButtonsPanel, Panel): + bl_label = "Depth of Field" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + + def draw(self, context): + layout = self.layout + + cam = context.camera + + layout.label(text="Focus:") split = layout.split() split.prop(cam, "dof_object", text="") col = split.column() - if cam.dof_object is not None: - col.enabled = False + col.active = cam.dof_object is None col.prop(cam, "dof_distance", text="Distance") - class DATA_PT_camera_display(CameraButtonsPanel, Panel): bl_label = "Display" COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} @@ -127,10 +171,12 @@ class DATA_PT_camera_display(CameraButtonsPanel, Panel): col.prop(cam, "show_limits", text="Limits") col.prop(cam, "show_mist", text="Mist") col.prop(cam, "show_title_safe", text="Title Safe") + col.prop(cam, "show_sensor", text="Sensor") col.prop(cam, "show_name", text="Name") - col.prop_menu_enum(cam, "show_guide") col = split.column() + col.prop_menu_enum(cam, "show_guide") + col.separator() col.prop(cam, "draw_size", text="Size") col.separator() col.prop(cam, "show_passepartout", text="Passepartout") diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py index 0779debb102..a359d58b59e 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -257,10 +257,8 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, Panel): layout.prop(ob, "dupli_group", text="Group") -# XXX: the following options are all quite buggy, ancient hacks that should be dropped - -class OBJECT_PT_animation(ObjectButtonsPanel, Panel): - bl_label = "Animation Hacks" +class OBJECT_PT_relations_extras(ObjectButtonsPanel, Panel): + bl_label = "Relations Extras" bl_options = {'DEFAULT_CLOSED'} def draw(self, context): @@ -269,23 +267,17 @@ class OBJECT_PT_animation(ObjectButtonsPanel, Panel): ob = context.object split = layout.split() - - col = split.column() - col.label(text="Time Offset:") - col.prop(ob, "use_time_offset_edit", text="Edit") - row = col.row() - row.prop(ob, "use_time_offset_parent", text="Parent") - row.active = (ob.parent is not None) - row = col.row() - row.prop(ob, "use_slow_parent") - row.active = (ob.parent is not None) - col.prop(ob, "time_offset", text="Offset") - - # XXX: these are still used for a few curve-related tracking features + col = split.column() col.label(text="Tracking Axes:") col.prop(ob, "track_axis", text="Axis") col.prop(ob, "up_axis", text="Up Axis") + + col = split.column() + col.prop(ob, "use_slow_parent") + row = col.row() + row.active = ((ob.parent is not None) and (ob.use_slow_parent)) + row.prop(ob, "slow_parent_offset", text="Offset") from bl_ui.properties_animviz import ( diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 8b69c287048..b626a5dcb55 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2068,7 +2068,22 @@ class VIEW3D_PT_view3d_properties(Panel): subcol.label(text="Local Camera:") subcol.prop(view, "camera", text="") - layout.column().prop(view, "cursor_location") + +class VIEW3D_PT_view3d_cursor(Panel): + bl_space_type = 'VIEW_3D' + bl_region_type = 'UI' + bl_label = "3D Cursor" + + @classmethod + def poll(cls, context): + view = context.space_data + return (view) + + def draw(self, context): + layout = self.layout + + view = context.space_data + layout.column().prop(view, "cursor_location", text="Location") class VIEW3D_PT_view3d_name(Panel): diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 591191321ee..332577a7902 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -172,25 +172,31 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, Panel): class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel): bl_context = "mesh_edit" bl_label = "Mesh Options" + + @classmethod + def poll(cls, context): + return context.active_object def draw(self, context): layout = self.layout ob = context.active_object - if ob: - mesh = ob.data - col = layout.column(align=True) - col.prop(mesh, "use_mirror_x") - sub = col.column() - sub.active = ob.data.use_mirror_x - sub.prop(mesh, "use_mirror_topology") + tool_settings = context.tool_settings + mesh = ob.data - ts = context.tool_settings + col = layout.column(align=True) + col.active = tool_settings.proportional_edit == 'DISABLED' + col.prop(mesh, "use_mirror_x") - col.label("Edge Select Mode") - col.prop(ts, "edge_path_mode", text="") - col.prop(context.tool_settings, "edge_path_live_unwrap") + row = col.row() + row.active = ob.data.use_mirror_x + row.prop(mesh, "use_mirror_topology") + + col = layout.column(align=True) + col.label("Edge Select Mode:") + col.prop(tool_settings, "edge_path_mode", text="") + col.prop(tool_settings, "edge_path_live_unwrap") # ********** default tools for editmode_curve **************** @@ -1133,7 +1139,7 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel, Panel): sub.prop(ipaint, "normal_angle", text="") split = layout.split() - + split.active = (use_projection) split.prop(ipaint, "use_stencil_layer", text="Stencil") @@ -1148,10 +1154,10 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel, Panel): row.menu("VIEW3D_MT_tools_projectpaint_clone", text=mesh.uv_texture_clone.name) layout.prop(ipaint, "seam_bleed") - + col = layout.column() col.label(text="External Editing:") - + row = col.split(align=True, percentage=0.55) row.operator("image.project_edit", text="Quick Edit") row.operator("image.project_apply", text="Apply") |