diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-08 06:57:28 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-08 06:57:28 +0400 |
commit | cb890a49fbd653c71d2fe639265a1a562136113f (patch) | |
tree | 10ddd1f7198c85408f83794fe560caa9512e2a2e /release | |
parent | aea95c78606a99b0fa9c4c29c9e922e4a03f2a69 (diff) | |
parent | f086201518b85f6dd2ae60ae37dc14f1d1406c01 (diff) |
svn merge ^/trunk/blender -r41602:41638 .
Diffstat (limited to 'release')
50 files changed, 399 insertions, 60 deletions
diff --git a/release/datafiles/blender_icons.png b/release/datafiles/blender_icons.png Binary files differindex a68a1f8394c..c309ad11da2 100644 --- a/release/datafiles/blender_icons.png +++ b/release/datafiles/blender_icons.png diff --git a/release/scripts/modules/bpy/ops.py b/release/scripts/modules/bpy/ops.py index 382a47cb4e6..d01b706cc37 100644 --- a/release/scripts/modules/bpy/ops.py +++ b/release/scripts/modules/bpy/ops.py @@ -208,7 +208,7 @@ class BPyOpsSubModOp(object): return "# %s\n%s" % (descr, as_string) def __str__(self): # used for print(...) - return "<function bpy.ops.%s.%s at 0x%x'>" % \ - (self.module, self.func, id(self)) + return ("<function bpy.ops.%s.%s at 0x%x'>" % + (self.module, self.func, id(self))) ops_fake_module = BPyOps() diff --git a/release/scripts/modules/bpy_extras/keyconfig_utils.py b/release/scripts/modules/bpy_extras/keyconfig_utils.py index 6eb19c0ff05..fab6886b314 100644 --- a/release/scripts/modules/bpy_extras/keyconfig_utils.py +++ b/release/scripts/modules/bpy_extras/keyconfig_utils.py @@ -92,6 +92,10 @@ KM_HIERARCHY = [ ('Script', 'SCRIPTS_WINDOW', 'WINDOW', []), ('Text', 'TEXT_EDITOR', 'WINDOW', []), ('Console', 'CONSOLE', 'WINDOW', []), + ('Clip', 'CLIP_EDITOR', 'WINDOW', [ + ('Clip Editor', 'CLIP_EDITOR', 'WINDOW', []), + ('Clip Graph Editor', 'CLIP_EDITOR', 'WINDOW', []), + ]), ('View3D Gesture Circle', 'EMPTY', 'WINDOW', []), ('Gesture Border', 'EMPTY', 'WINDOW', []), diff --git a/release/scripts/modules/bpyml_ui.py b/release/scripts/modules/bpyml_ui.py index f4b6de23dbb..4828b3649d3 100644 --- a/release/scripts/modules/bpyml_ui.py +++ b/release/scripts/modules/bpyml_ui.py @@ -25,9 +25,11 @@ from bpyml import TAG, ARGS, CHILDREN _uilayout_rna = _bpy.types.UILayout.bl_rna -_uilayout_tags = ["ui"] + \ - _uilayout_rna.properties.keys() + \ +_uilayout_tags = ( + ["ui"] + + _uilayout_rna.properties.keys() + _uilayout_rna.functions.keys() + ) # these need to be imported directly # >>> from bpyml_ui.locals import * diff --git a/release/scripts/presets/tracking_camera/Blender.py b/release/scripts/presets/tracking_camera/Blender.py new file mode 100644 index 00000000000..507cedac4fc --- /dev/null +++ b/release/scripts/presets/tracking_camera/Blender.py @@ -0,0 +1,10 @@ +import bpy +camera = bpy.context.edit_movieclip.tracking.camera + +camera.sensor_width = 32.0 +camera.units = 'MILLIMETERS' +camera.focal_length = 35.0 +camera.pixel_aspect = 1 +camera.k1 = 0.0 +camera.k2 = 0.0 +camera.k3 = 0.0 diff --git a/release/scripts/presets/tracking_camera/Canon_1100D.py b/release/scripts/presets/tracking_camera/Canon_1100D.py new file mode 100644 index 00000000000..7ea78412f40 --- /dev/null +++ b/release/scripts/presets/tracking_camera/Canon_1100D.py @@ -0,0 +1,10 @@ +import bpy +camera = bpy.context.edit_movieclip.tracking.camera + +camera.sensor_width = 22.2 +camera.units = 'MILLIMETERS' +camera.focal_length = 24.0 +camera.pixel_aspect = 1 +camera.k1 = 0.0 +camera.k2 = 0.0 +camera.k3 = 0.0 diff --git a/release/scripts/presets/tracking_camera/Canon_1D.py b/release/scripts/presets/tracking_camera/Canon_1D.py new file mode 100644 index 00000000000..89590d3cc19 --- /dev/null +++ b/release/scripts/presets/tracking_camera/Canon_1D.py @@ -0,0 +1,10 @@ +import bpy +camera = bpy.context.edit_movieclip.tracking.camera + +camera.sensor_width = 27.9 +camera.units = 'MILLIMETERS' +camera.focal_length = 24.0 +camera.pixel_aspect = 1 +camera.k1 = 0.0 +camera.k2 = 0.0 +camera.k3 = 0.0 diff --git a/release/scripts/presets/tracking_camera/Canon_1DS.py b/release/scripts/presets/tracking_camera/Canon_1DS.py new file mode 100644 index 00000000000..7d9b6c8b390 --- /dev/null +++ b/release/scripts/presets/tracking_camera/Canon_1DS.py @@ -0,0 +1,10 @@ +import bpy +camera = bpy.context.edit_movieclip.tracking.camera + +camera.sensor_width = 36.0 +camera.units = 'MILLIMETERS' +camera.focal_length = 24.0 +camera.pixel_aspect = 1 +camera.k1 = 0.0 +camera.k2 = 0.0 +camera.k3 = 0.0 diff --git a/release/scripts/presets/tracking_camera/Canon_500D.py b/release/scripts/presets/tracking_camera/Canon_500D.py new file mode 100644 index 00000000000..3dd66c5b609 --- /dev/null +++ b/release/scripts/presets/tracking_camera/Canon_500D.py @@ -0,0 +1,10 @@ +import bpy +camera = bpy.context.edit_movieclip.tracking.camera + +camera.sensor_width = 22.3 +camera.units = 'MILLIMETERS' +camera.focal_length = 24.0 +camera.pixel_aspect = 1 +camera.k1 = 0.0 +camera.k2 = 0.0 +camera.k3 = 0.0 diff --git a/release/scripts/presets/tracking_camera/Canon_550D.py b/release/scripts/presets/tracking_camera/Canon_550D.py new file mode 100644 index 00000000000..3dd66c5b609 --- /dev/null +++ b/release/scripts/presets/tracking_camera/Canon_550D.py @@ -0,0 +1,10 @@ +import bpy +camera = bpy.context.edit_movieclip.tracking.camera + +camera.sensor_width = 22.3 +camera.units = 'MILLIMETERS' +camera.focal_length = 24.0 +camera.pixel_aspect = 1 +camera.k1 = 0.0 +camera.k2 = 0.0 +camera.k3 = 0.0 diff --git a/release/scripts/presets/tracking_camera/Canon_5D.py b/release/scripts/presets/tracking_camera/Canon_5D.py new file mode 100644 index 00000000000..7d9b6c8b390 --- /dev/null +++ b/release/scripts/presets/tracking_camera/Canon_5D.py @@ -0,0 +1,10 @@ +import bpy +camera = bpy.context.edit_movieclip.tracking.camera + +camera.sensor_width = 36.0 +camera.units = 'MILLIMETERS' +camera.focal_length = 24.0 +camera.pixel_aspect = 1 +camera.k1 = 0.0 +camera.k2 = 0.0 +camera.k3 = 0.0 diff --git a/release/scripts/presets/tracking_camera/Canon_600D.py b/release/scripts/presets/tracking_camera/Canon_600D.py new file mode 100644 index 00000000000..3dd66c5b609 --- /dev/null +++ b/release/scripts/presets/tracking_camera/Canon_600D.py @@ -0,0 +1,10 @@ +import bpy +camera = bpy.context.edit_movieclip.tracking.camera + +camera.sensor_width = 22.3 +camera.units = 'MILLIMETERS' +camera.focal_length = 24.0 +camera.pixel_aspect = 1 +camera.k1 = 0.0 +camera.k2 = 0.0 +camera.k3 = 0.0 diff --git a/release/scripts/presets/tracking_camera/Canon_60D.py b/release/scripts/presets/tracking_camera/Canon_60D.py new file mode 100644 index 00000000000..3dd66c5b609 --- /dev/null +++ b/release/scripts/presets/tracking_camera/Canon_60D.py @@ -0,0 +1,10 @@ +import bpy +camera = bpy.context.edit_movieclip.tracking.camera + +camera.sensor_width = 22.3 +camera.units = 'MILLIMETERS' +camera.focal_length = 24.0 +camera.pixel_aspect = 1 +camera.k1 = 0.0 +camera.k2 = 0.0 +camera.k3 = 0.0 diff --git a/release/scripts/presets/tracking_camera/Canon_7D.py b/release/scripts/presets/tracking_camera/Canon_7D.py new file mode 100644 index 00000000000..3dd66c5b609 --- /dev/null +++ b/release/scripts/presets/tracking_camera/Canon_7D.py @@ -0,0 +1,10 @@ +import bpy +camera = bpy.context.edit_movieclip.tracking.camera + +camera.sensor_width = 22.3 +camera.units = 'MILLIMETERS' +camera.focal_length = 24.0 +camera.pixel_aspect = 1 +camera.k1 = 0.0 +camera.k2 = 0.0 +camera.k3 = 0.0 diff --git a/release/scripts/presets/tracking_camera/Nikon_D300S.py b/release/scripts/presets/tracking_camera/Nikon_D300S.py new file mode 100644 index 00000000000..8db89189cd7 --- /dev/null +++ b/release/scripts/presets/tracking_camera/Nikon_D300S.py @@ -0,0 +1,10 @@ +import bpy +camera = bpy.context.edit_movieclip.tracking.camera + +camera.sensor_width = 23.6 +camera.units = 'MILLIMETERS' +camera.focal_length = 24.0 +camera.pixel_aspect = 1 +camera.k1 = 0.0 +camera.k2 = 0.0 +camera.k3 = 0.0 diff --git a/release/scripts/presets/tracking_camera/Nikon_D3100.py b/release/scripts/presets/tracking_camera/Nikon_D3100.py new file mode 100644 index 00000000000..a112dd22dd2 --- /dev/null +++ b/release/scripts/presets/tracking_camera/Nikon_D3100.py @@ -0,0 +1,10 @@ +import bpy +camera = bpy.context.edit_movieclip.tracking.camera + +camera.sensor_width = 23.1 +camera.units = 'MILLIMETERS' +camera.focal_length = 24.0 +camera.pixel_aspect = 1 +camera.k1 = 0.0 +camera.k2 = 0.0 +camera.k3 = 0.0 diff --git a/release/scripts/presets/tracking_camera/Nikon_D35.py b/release/scripts/presets/tracking_camera/Nikon_D35.py new file mode 100644 index 00000000000..7d9b6c8b390 --- /dev/null +++ b/release/scripts/presets/tracking_camera/Nikon_D35.py @@ -0,0 +1,10 @@ +import bpy +camera = bpy.context.edit_movieclip.tracking.camera + +camera.sensor_width = 36.0 +camera.units = 'MILLIMETERS' +camera.focal_length = 24.0 +camera.pixel_aspect = 1 +camera.k1 = 0.0 +camera.k2 = 0.0 +camera.k3 = 0.0 diff --git a/release/scripts/presets/tracking_camera/Nikon_D5000.py b/release/scripts/presets/tracking_camera/Nikon_D5000.py new file mode 100644 index 00000000000..8db89189cd7 --- /dev/null +++ b/release/scripts/presets/tracking_camera/Nikon_D5000.py @@ -0,0 +1,10 @@ +import bpy +camera = bpy.context.edit_movieclip.tracking.camera + +camera.sensor_width = 23.6 +camera.units = 'MILLIMETERS' +camera.focal_length = 24.0 +camera.pixel_aspect = 1 +camera.k1 = 0.0 +camera.k2 = 0.0 +camera.k3 = 0.0 diff --git a/release/scripts/presets/tracking_camera/Nikon_D5100.py b/release/scripts/presets/tracking_camera/Nikon_D5100.py new file mode 100644 index 00000000000..8db89189cd7 --- /dev/null +++ b/release/scripts/presets/tracking_camera/Nikon_D5100.py @@ -0,0 +1,10 @@ +import bpy +camera = bpy.context.edit_movieclip.tracking.camera + +camera.sensor_width = 23.6 +camera.units = 'MILLIMETERS' +camera.focal_length = 24.0 +camera.pixel_aspect = 1 +camera.k1 = 0.0 +camera.k2 = 0.0 +camera.k3 = 0.0 diff --git a/release/scripts/presets/tracking_camera/Nikon_D7000.py b/release/scripts/presets/tracking_camera/Nikon_D7000.py new file mode 100644 index 00000000000..8db89189cd7 --- /dev/null +++ b/release/scripts/presets/tracking_camera/Nikon_D7000.py @@ -0,0 +1,10 @@ +import bpy +camera = bpy.context.edit_movieclip.tracking.camera + +camera.sensor_width = 23.6 +camera.units = 'MILLIMETERS' +camera.focal_length = 24.0 +camera.pixel_aspect = 1 +camera.k1 = 0.0 +camera.k2 = 0.0 +camera.k3 = 0.0 diff --git a/release/scripts/presets/tracking_camera/Nikon_D90.py b/release/scripts/presets/tracking_camera/Nikon_D90.py new file mode 100644 index 00000000000..8db89189cd7 --- /dev/null +++ b/release/scripts/presets/tracking_camera/Nikon_D90.py @@ -0,0 +1,10 @@ +import bpy +camera = bpy.context.edit_movieclip.tracking.camera + +camera.sensor_width = 23.6 +camera.units = 'MILLIMETERS' +camera.focal_length = 24.0 +camera.pixel_aspect = 1 +camera.k1 = 0.0 +camera.k2 = 0.0 +camera.k3 = 0.0 diff --git a/release/scripts/presets/tracking_camera/Red_Epic.py b/release/scripts/presets/tracking_camera/Red_Epic.py new file mode 100644 index 00000000000..913b507d296 --- /dev/null +++ b/release/scripts/presets/tracking_camera/Red_Epic.py @@ -0,0 +1,10 @@ +import bpy +camera = bpy.context.edit_movieclip.tracking.camera + +camera.sensor_width = 30.0 +camera.units = 'MILLIMETERS' +camera.focal_length = 24.0 +camera.pixel_aspect = 1 +camera.k1 = 0.0 +camera.k2 = 0.0 +camera.k3 = 0.0 diff --git a/release/scripts/presets/tracking_camera/Red_One_2K.py b/release/scripts/presets/tracking_camera/Red_One_2K.py new file mode 100644 index 00000000000..0a52b377959 --- /dev/null +++ b/release/scripts/presets/tracking_camera/Red_One_2K.py @@ -0,0 +1,10 @@ +import bpy +camera = bpy.context.edit_movieclip.tracking.camera + +camera.sensor_width = 11.1 +camera.units = 'MILLIMETERS' +camera.focal_length = 24.0 +camera.pixel_aspect = 1 +camera.k1 = 0.0 +camera.k2 = 0.0 +camera.k3 = 0.0 diff --git a/release/scripts/presets/tracking_camera/Red_One_3K.py b/release/scripts/presets/tracking_camera/Red_One_3K.py new file mode 100644 index 00000000000..88c232bb944 --- /dev/null +++ b/release/scripts/presets/tracking_camera/Red_One_3K.py @@ -0,0 +1,10 @@ +import bpy +camera = bpy.context.edit_movieclip.tracking.camera + +camera.sensor_width = 16.65 +camera.units = 'MILLIMETERS' +camera.focal_length = 24.0 +camera.pixel_aspect = 1 +camera.k1 = 0.0 +camera.k2 = 0.0 +camera.k3 = 0.0 diff --git a/release/scripts/presets/tracking_camera/Red_One_4K.py b/release/scripts/presets/tracking_camera/Red_One_4K.py new file mode 100644 index 00000000000..7ea78412f40 --- /dev/null +++ b/release/scripts/presets/tracking_camera/Red_One_4K.py @@ -0,0 +1,10 @@ +import bpy +camera = bpy.context.edit_movieclip.tracking.camera + +camera.sensor_width = 22.2 +camera.units = 'MILLIMETERS' +camera.focal_length = 24.0 +camera.pixel_aspect = 1 +camera.k1 = 0.0 +camera.k2 = 0.0 +camera.k3 = 0.0 diff --git a/release/scripts/presets/tracking_track_color/default.py b/release/scripts/presets/tracking_track_color/default.py new file mode 100644 index 00000000000..3213d6e0c83 --- /dev/null +++ b/release/scripts/presets/tracking_track_color/default.py @@ -0,0 +1,5 @@ +import bpy +track = bpy.context.edit_movieclip.tracking.tracks.active + +track.color = (0.0, 0.0, 0.0) +track.use_custom_color = False diff --git a/release/scripts/presets/tracking_track_color/far_plane.py b/release/scripts/presets/tracking_track_color/far_plane.py new file mode 100644 index 00000000000..579d5562642 --- /dev/null +++ b/release/scripts/presets/tracking_track_color/far_plane.py @@ -0,0 +1,5 @@ +import bpy +track = bpy.context.edit_movieclip.tracking.tracks.active + +track.color = (0.0, 0.0, 1.0) +track.use_custom_color = True diff --git a/release/scripts/presets/tracking_track_color/near_plane.py b/release/scripts/presets/tracking_track_color/near_plane.py new file mode 100644 index 00000000000..790429ce7a1 --- /dev/null +++ b/release/scripts/presets/tracking_track_color/near_plane.py @@ -0,0 +1,5 @@ +import bpy +track = bpy.context.edit_movieclip.tracking.tracks.active + +track.color = (0.0, 1.0, 0.0) +track.use_custom_color = True diff --git a/release/scripts/startup/bl_operators/__init__.py b/release/scripts/startup/bl_operators/__init__.py index c0e83cee9d6..06b4429d25c 100644 --- a/release/scripts/startup/bl_operators/__init__.py +++ b/release/scripts/startup/bl_operators/__init__.py @@ -25,6 +25,7 @@ if "bpy" in locals(): _modules = ( "add_mesh_torus", "anim", + "clip", "console", "image", "mesh", diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py index 490ee230220..a062ac6f4c5 100644 --- a/release/scripts/startup/bl_operators/object_quick_effects.py +++ b/release/scripts/startup/bl_operators/object_quick_effects.py @@ -105,8 +105,7 @@ class QuickFur(Operator): psys.settings.child_type = 'INTERPOLATED' obj.data.materials.append(mat) - obj.particle_systems[-1].settings.material = \ - len(obj.data.materials) + psys.settings.material = len(obj.data.materials) return {'FINISHED'} diff --git a/release/scripts/startup/bl_operators/presets.py b/release/scripts/startup/bl_operators/presets.py index 21ac128f177..ac19bab4c66 100644 --- a/release/scripts/startup/bl_operators/presets.py +++ b/release/scripts/startup/bl_operators/presets.py @@ -319,6 +319,47 @@ class AddPresetInteraction(AddPresetBase, Operator): preset_subdir = "interaction" +class AddPresetTrackingCamera(AddPresetBase, Operator): + '''Add a Tracking Camera Intrinsics Preset''' + bl_idname = "clip.camera_preset_add" + bl_label = "Add Camera Preset" + preset_menu = "CLIP_MT_camera_presets" + + preset_defines = [ + "camera = bpy.context.edit_movieclip.tracking.camera" + ] + + preset_values = [ + "camera.sensor_width", + "camera.units", + "camera.focal_length", + "camera.pixel_aspect", + "camera.k1", + "camera.k2", + "camera.k3" + ] + + preset_subdir = "tracking_camera" + + +class AddPresetTrackingTrackColor(AddPresetBase, Operator): + '''Add a Clip Track Color Preset''' + bl_idname = "clip.track_color_preset_add" + bl_label = "Add Track Color Preset" + preset_menu = "CLIP_MT_track_color_presets" + + preset_defines = [ + "track = bpy.context.edit_movieclip.tracking.tracks" + ] + + preset_values = [ + "track.color", + "track.use_custom_color" + ] + + preset_subdir = "tracking_track_color" + + class AddPresetKeyconfig(AddPresetBase, Operator): '''Add a Keyconfig Preset''' bl_idname = "wm.keyconfig_preset_add" diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py index 66d0d72efc1..17e353ff238 100644 --- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py +++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py @@ -212,8 +212,11 @@ def islandIntersectUvIsland(source, target, SourceOffset): # Edge intersect test for ed in edgeLoopsSource: for seg in edgeLoopsTarget: - i = geometry.intersect_line_line_2d(\ - seg[0], seg[1], SourceOffset+ed[0], SourceOffset+ed[1]) + i = geometry.intersect_line_line_2d(seg[0], + seg[1], + SourceOffset+ed[0], + SourceOffset+ed[1], + ) if i: return 1 # LINE INTERSECTION @@ -773,15 +776,16 @@ def main_consts(): global ROTMAT_2D_POS_45D global RotMatStepRotation - ROTMAT_2D_POS_90D = Matrix.Rotation( radians(90.0), 2) - ROTMAT_2D_POS_45D = Matrix.Rotation( radians(45.0), 2) + ROTMAT_2D_POS_90D = Matrix.Rotation(radians(90.0), 2) + ROTMAT_2D_POS_45D = Matrix.Rotation(radians(45.0), 2) RotMatStepRotation = [] rot_angle = 22.5 #45.0/2 while rot_angle > 0.1: - RotMatStepRotation.append([\ - Matrix.Rotation( radians(rot_angle), 2),\ - Matrix.Rotation( radians(-rot_angle), 2)]) + RotMatStepRotation.append([ + Matrix.Rotation(radians(+rot_angle), 2), + Matrix.Rotation(radians(-rot_angle), 2), + ]) rot_angle = rot_angle/2.0 diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py index 682341cbf2f..48aefa93a5c 100644 --- a/release/scripts/startup/bl_ui/__init__.py +++ b/release/scripts/startup/bl_ui/__init__.py @@ -52,6 +52,7 @@ _modules = ( "properties_scene", "properties_texture", "properties_world", + "space_clip", "space_console", "space_dopesheet", "space_filebrowser", diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py index 0abbf281754..1a0fb0ef4ac 100644 --- a/release/scripts/startup/bl_ui/properties_data_camera.py +++ b/release/scripts/startup/bl_ui/properties_data_camera.py @@ -108,6 +108,7 @@ class DATA_PT_lens(CameraButtonsPanel, Panel): col.prop(cam, "clip_start", text="Start") col.prop(cam, "clip_end", text="End") + class DATA_PT_camera(CameraButtonsPanel, Panel): bl_label = "Camera" COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} @@ -120,8 +121,8 @@ class DATA_PT_camera(CameraButtonsPanel, Panel): 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 + row.operator("camera.preset_add", text="", icon='ZOOMIN') + row.operator("camera.preset_add", text="", icon='ZOOMOUT').remove_active = True layout.label(text="Sensor:") @@ -137,6 +138,7 @@ class DATA_PT_camera(CameraButtonsPanel, Panel): 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'} @@ -156,6 +158,7 @@ class DATA_PT_camera_dof(CameraButtonsPanel, Panel): 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'} diff --git a/release/scripts/startup/bl_ui/properties_data_lamp.py b/release/scripts/startup/bl_ui/properties_data_lamp.py index 4ff180f74fb..974924be46c 100644 --- a/release/scripts/startup/bl_ui/properties_data_lamp.py +++ b/release/scripts/startup/bl_ui/properties_data_lamp.py @@ -134,8 +134,8 @@ class DATA_PT_sunsky(DataButtonsPanel, Panel): row = layout.row(align=True) row.prop(lamp, "use_sky") row.menu("LAMP_MT_sunsky_presets", text=bpy.types.LAMP_MT_sunsky_presets.bl_label) - row.operator("lamp.sunsky_preset_add", text="", icon="ZOOMIN") - row.operator("lamp.sunsky_preset_add", text="", icon="ZOOMOUT").remove_active = True + row.operator("lamp.sunsky_preset_add", text="", icon='ZOOMIN') + row.operator("lamp.sunsky_preset_add", text="", icon='ZOOMOUT').remove_active = True row = layout.row() row.active = lamp.use_sky or lamp.use_atmosphere diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py index 0d104571e4b..ba9bb4a624d 100644 --- a/release/scripts/startup/bl_ui/properties_game.py +++ b/release/scripts/startup/bl_ui/properties_game.py @@ -315,11 +315,9 @@ class RENDER_PT_game_stereo(RenderButtonsPanel, Panel): split = layout.split() - if dome_type == 'FISHEYE' or \ - dome_type == 'TRUNCATED_REAR' or \ - dome_type == 'TRUNCATED_FRONT': - + if dome_type in {'FISHEYE', 'TRUNCATED_REAR', 'TRUNCATED_FRONT'}: col = split.column() + col.prop(gs, "dome_buffer_resolution", text="Resolution", slider=True) col.prop(gs, "dome_angle", slider=True) @@ -336,6 +334,7 @@ class RENDER_PT_game_stereo(RenderButtonsPanel, Panel): else: # cube map col = split.column() + col.prop(gs, "dome_buffer_resolution", text="Resolution", slider=True) col = split.column() diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py index 62cb735fda9..f5a95016baa 100644 --- a/release/scripts/startup/bl_ui/properties_material.py +++ b/release/scripts/startup/bl_ui/properties_material.py @@ -124,7 +124,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel, Panel): split.template_ID(ob, "active_material", new="material.new") row = split.row() if mat: - row.prop(mat, "use_nodes", icon="NODETREE", text="") + row.prop(mat, "use_nodes", icon='NODETREE', text="") if slot: row.prop(slot, "link", text="") @@ -501,8 +501,8 @@ class MATERIAL_PT_sss(MaterialButtonsPanel, Panel): row = layout.row().split() sub = row.row(align=True).split(percentage=0.75) sub.menu("MATERIAL_MT_sss_presets", text=bpy.types.MATERIAL_MT_sss_presets.bl_label) - sub.operator("material.sss_preset_add", text="", icon="ZOOMIN") - sub.operator("material.sss_preset_add", text="", icon="ZOOMOUT").remove_active = True + sub.operator("material.sss_preset_add", text="", icon='ZOOMIN') + sub.operator("material.sss_preset_add", text="", icon='ZOOMOUT').remove_active = True split = layout.split() diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py index a359d58b59e..36b8129ad8a 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -267,12 +267,12 @@ class OBJECT_PT_relations_extras(ObjectButtonsPanel, Panel): ob = context.object split = layout.split() - + 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() diff --git a/release/scripts/startup/bl_ui/properties_object_constraint.py b/release/scripts/startup/bl_ui/properties_object_constraint.py index dc19f58ca35..c493124c5bb 100644 --- a/release/scripts/startup/bl_ui/properties_object_constraint.py +++ b/release/scripts/startup/bl_ui/properties_object_constraint.py @@ -753,6 +753,26 @@ class ConstraintButtonsPanel(): col = layout.column() col.prop(con, "rotation_range", text="Pivot When") + def FOLLOW_TRACK(self, context, layout, con): + layout.prop(con, "use_active_clip") + + if not con.use_active_clip: + layout.prop(con, "clip") + + layout.prop(con, "track") + + layout.row().prop(con, "reference", expand=True) + + layout.operator("clip.constraint_to_fcurve") + + def CAMERA_SOLVER(self, context, layout, con): + layout.prop(con, "use_active_clip") + + if not con.use_active_clip: + layout.prop(con, "clip") + + layout.operator("clip.constraint_to_fcurve") + def SCRIPT(self, context, layout, con): layout.label("Blender 2.5 has no py-constraints") diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py index c66a0563754..afb3c000980 100644 --- a/release/scripts/startup/bl_ui/properties_physics_cloth.py +++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py @@ -73,8 +73,8 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel): col.label(text="Presets:") sub = col.row(align=True) sub.menu("CLOTH_MT_presets", text=bpy.types.CLOTH_MT_presets.bl_label) - sub.operator("cloth.preset_add", text="", icon="ZOOMIN") - sub.operator("cloth.preset_add", text="", icon="ZOOMOUT").remove_active = True + sub.operator("cloth.preset_add", text="", icon='ZOOMIN') + sub.operator("cloth.preset_add", text="", icon='ZOOMOUT').remove_active = True col.label(text="Quality:") col.prop(cloth, "quality", text="Steps", slider=True) diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index efb760c0b43..ce65350e69b 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -206,7 +206,7 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel): col = split.column() if scene.use_gravity: - col.label(text="Use Scene Gravity", icon="SCENE_DATA") + col.label(text="Use Scene Gravity", icon='SCENE_DATA') sub = col.column() sub.enabled = False sub.prop(fluid, "gravity", text="") @@ -215,7 +215,7 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel): col.prop(fluid, "gravity", text="") if scene.unit_settings.system != 'NONE': - col.label(text="Use Scene Size Units", icon="SCENE_DATA") + col.label(text="Use Scene Size Units", icon='SCENE_DATA') sub = col.column() sub.enabled = False sub.prop(fluid, "simulation_scale", text="Metres") diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index 815f0a77570..145ae292e11 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -186,8 +186,8 @@ class RENDER_PT_dimensions(RenderButtonsPanel, Panel): row = layout.row(align=True) row.menu("RENDER_MT_presets", text=bpy.types.RENDER_MT_presets.bl_label) - row.operator("render.preset_add", text="", icon="ZOOMIN") - row.operator("render.preset_add", text="", icon="ZOOMOUT").remove_active = True + row.operator("render.preset_add", text="", icon='ZOOMIN') + row.operator("render.preset_add", text="", icon='ZOOMOUT').remove_active = True split = layout.split() diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index d3859a78bea..86880b9ddec 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -42,6 +42,7 @@ class SCENE_PT_scene(SceneButtonsPanel, Panel): layout.prop(scene, "camera") layout.prop(scene, "background_set", text="Background") + layout.prop(scene, "active_clip", text="Active Clip") class SCENE_PT_audio(SceneButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py index cf0d10c5844..435b968f243 100644 --- a/release/scripts/startup/bl_ui/space_filebrowser.py +++ b/release/scripts/startup/bl_ui/space_filebrowser.py @@ -62,7 +62,7 @@ class FILEBROWSER_HT_header(Header): row.prop(params, "use_filter_folder", text="") if params.filter_glob: - #if st.operator and hasattr(st.operator, "filter_glob"): + #if st.active_operator and hasattr(st.active_operator, "filter_glob"): # row.prop(params, "filter_glob", text="") row.label(params.filter_glob) else: diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 50db989a2e2..170ba3ccd0e 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -61,7 +61,7 @@ class IMAGE_MT_view(Menu): layout.separator() - ratios = [[1, 8], [1, 4], [1, 2], [1, 1], [2, 1], [4, 1], [8, 1]] + ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1)) for a, b in ratios: layout.operator("image.view_zoom_ratio", text="Zoom" + " %d:%d" % (a, b)).ratio = a / b @@ -746,12 +746,12 @@ class IMAGE_PT_paint_curve(BrushButtonsPanel, Panel): layout.template_curve_mapping(brush, "curve") row = layout.row(align=True) - row.operator("brush.curve_preset", icon="SMOOTHCURVE", text="").shape = 'SMOOTH' - row.operator("brush.curve_preset", icon="SPHERECURVE", text="").shape = 'ROUND' - row.operator("brush.curve_preset", icon="ROOTCURVE", text="").shape = 'ROOT' - row.operator("brush.curve_preset", icon="SHARPCURVE", text="").shape = 'SHARP' - row.operator("brush.curve_preset", icon="LINCURVE", text="").shape = 'LINE' - row.operator("brush.curve_preset", icon="NOCURVE", text="").shape = 'MAX' + row.operator("brush.curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH' + row.operator("brush.curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND' + row.operator("brush.curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT' + row.operator("brush.curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP' + row.operator("brush.curve_preset", icon='LINCURVE', text="").shape = 'LINE' + row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX' if __name__ == "__main__": # only for live edit. bpy.utils.register_module(__name__) diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py index 6f8e6a574ec..5209e8be597 100644 --- a/release/scripts/startup/bl_ui/space_time.py +++ b/release/scripts/startup/bl_ui/space_time.py @@ -177,6 +177,7 @@ class TIME_MT_playback(Menu): layout.prop(screen, "use_play_image_editors") layout.prop(screen, "use_play_sequence_editors") layout.prop(screen, "use_play_node_editors") + layout.prop(screen, "use_play_clip_editors") layout.separator() diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index c6c4a8f3335..a2ede26ecc6 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -967,10 +967,10 @@ class USERPREF_PT_addons(Panel): continue # check if addon should be visible with current filters - if (filter == "All") or \ - (filter == info["category"]) or \ - (filter == "Enabled" and is_enabled) or \ - (filter == "Disabled" and not is_enabled): + if ((filter == "All") or + (filter == info["category"]) or + (filter == "Enabled" and is_enabled) or + (filter == "Disabled" and not is_enabled)): if search and search not in info["name"].lower(): if info["author"]: diff --git a/release/scripts/startup/bl_ui/space_userpref_keymap.py b/release/scripts/startup/bl_ui/space_userpref_keymap.py index 5e5ce462da9..d738e806320 100644 --- a/release/scripts/startup/bl_ui/space_userpref_keymap.py +++ b/release/scripts/startup/bl_ui/space_userpref_keymap.py @@ -223,7 +223,7 @@ class InputKeyMapPanel: col = layout.column() row = col.row() - row.label(text=km.name, icon="DOT") + row.label(text=km.name, icon='DOT') row.label() row.label() @@ -265,13 +265,13 @@ class InputKeyMapPanel: if not text: text = "Blender (default)" row.menu("USERPREF_MT_keyconfigs", text=text) - row.operator("wm.keyconfig_preset_add", text="", icon="ZOOMIN") - row.operator("wm.keyconfig_preset_add", text="", icon="ZOOMOUT").remove_active = True + row.operator("wm.keyconfig_preset_add", text="", icon='ZOOMIN') + row.operator("wm.keyconfig_preset_add", text="", icon='ZOOMOUT').remove_active = True #~ layout.context_pointer_set("keyconfig", wm.keyconfigs.active) #~ row.operator("wm.keyconfig_remove", text="", icon='X') - row.prop(context.space_data, "filter_text", icon="VIEWZOOM") + row.prop(context.space_data, "filter_text", icon='VIEWZOOM') col.separator() diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index b626a5dcb55..0631ccf2f70 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -1537,7 +1537,7 @@ class VIEW3D_MT_edit_mesh_select_mode(Menu): class VIEW3D_MT_edit_mesh_extrude(Menu): bl_label = "Extrude" - _extrude_funcs = { \ + _extrude_funcs = { "VERT": lambda layout: layout.operator("mesh.extrude_vertices_move", text="Vertices Only"), "EDGE": lambda layout: layout.operator("mesh.extrude_edges_move", text="Edges Only"), "FACE": lambda layout: layout.operator("mesh.extrude_faces_move", text="Individual Faces"), @@ -2169,6 +2169,16 @@ class VIEW3D_PT_view3d_display(Panel): layout.separator() + layout.prop(view, "show_reconstruction") + if view.show_reconstruction: + layout.label(text="Bundle type:") + layout.prop(view, "bundle_draw_type", text="") + layout.prop(view, "bundle_draw_size") + layout.prop(view, "show_bundle_name") + layout.prop(view, "show_camera_path") + + layout.separator() + region = view.region_quadview layout.operator("screen.region_quadview", text="Toggle Quad View") @@ -2274,8 +2284,10 @@ class VIEW3D_PT_background_image(Panel): box = layout.box() row = box.row(align=True) row.prop(bg, "show_expanded", text="", emboss=False) - if bg.image: + if bg.source == 'IMAGE' and bg.image: row.prop(bg.image, "name", text="", emboss=False) + if bg.source == 'MOVIE' and bg.clip: + row.prop(bg.clip, "name", text="", emboss=False) else: row.label(text="Not Set") row.operator("view3d.background_image_remove", text="", emboss=False, icon='X').index = i @@ -2284,10 +2296,36 @@ class VIEW3D_PT_background_image(Panel): if bg.show_expanded: row = box.row() - row.template_ID(bg, "image", open="image.open") - if (bg.image): - box.template_image(bg, "image", bg.image_user, compact=True) + row.prop(bg, "source", expand=True) + + hasbg = False + if bg.source == 'IMAGE': + row = box.row() + row.template_ID(bg, "image", open="image.open") + if (bg.image): + box.template_image(bg, "image", bg.image_user, compact=True) + hasbg = True + + elif bg.source == 'MOVIE': + has_clip = False + box.prop(bg, 'use_camera_clip') + + column = box.column() + column.active = not bg.use_camera_clip + column.template_ID(bg, "clip", open="clip.open") + + if bg.clip: + column.template_movieclip(bg, "clip", compact=True) + + if bg.use_camera_clip or bg.clip: + hasbg = True + + column = box.column() + column.active = hasbg + column.prop(bg.clip_user, "proxy_render_size", text="") + column.prop(bg.clip_user, "use_render_undistorted") + if hasbg: box.prop(bg, "opacity", slider=True) if bg.view_axis != 'CAMERA': box.prop(bg, "size") diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 332577a7902..5bcdbc1efe8 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -172,7 +172,7 @@ 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 @@ -912,12 +912,12 @@ class VIEW3D_PT_tools_brush_curve(PaintPanel, Panel): layout.template_curve_mapping(brush, "curve", brush=True) row = layout.row(align=True) - row.operator("brush.curve_preset", icon="SMOOTHCURVE", text="").shape = 'SMOOTH' - row.operator("brush.curve_preset", icon="SPHERECURVE", text="").shape = 'ROUND' - row.operator("brush.curve_preset", icon="ROOTCURVE", text="").shape = 'ROOT' - row.operator("brush.curve_preset", icon="SHARPCURVE", text="").shape = 'SHARP' - row.operator("brush.curve_preset", icon="LINCURVE", text="").shape = 'LINE' - row.operator("brush.curve_preset", icon="NOCURVE", text="").shape = 'MAX' + row.operator("brush.curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH' + row.operator("brush.curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND' + row.operator("brush.curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT' + row.operator("brush.curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP' + row.operator("brush.curve_preset", icon='LINCURVE', text="").shape = 'LINE' + row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX' class VIEW3D_PT_sculpt_options(PaintPanel, Panel): |