Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-09-13 10:39:17 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-13 10:39:17 +0400
commitb310a76a1b8964fd776620f8444c1c1a7a308a8e (patch)
treedcf2b80af79403c2b5fb81c85e337f4adc3eba2f /release
parentc58fb76f1a043124debf2a71e6c56f2a478a0dde (diff)
parent047e8224b14aa7836db3b067824258e49e8602db (diff)
svn merge -r39558:39800 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'release')
-rw-r--r--release/datafiles/blenderbuttonsbin210335 -> 215334 bytes
-rw-r--r--release/scripts/modules/bpy_extras/image_utils.py2
-rw-r--r--release/scripts/modules/bpy_extras/io_utils.py4
-rw-r--r--release/scripts/modules/bpy_extras/mesh_utils.py10
-rw-r--r--release/scripts/modules/bpy_extras/object_utils.py12
-rw-r--r--release/scripts/modules/bpy_extras/view3d_utils.py18
-rw-r--r--release/scripts/modules/bpy_types.py14
-rw-r--r--release/scripts/modules/console_python.py2
-rw-r--r--release/scripts/presets/ffmpeg/DV.py1
-rw-r--r--release/scripts/presets/ffmpeg/DVD.py1
-rw-r--r--release/scripts/presets/ffmpeg/SVCD.py1
-rw-r--r--release/scripts/presets/ffmpeg/VCD.py1
-rw-r--r--release/scripts/startup/bl_operators/add_mesh_torus.py66
-rw-r--r--release/scripts/startup/bl_operators/mesh.py10
-rw-r--r--release/scripts/startup/bl_operators/nla.py71
-rw-r--r--release/scripts/startup/bl_operators/object.py54
-rw-r--r--release/scripts/startup/bl_operators/object_align.py55
-rw-r--r--release/scripts/startup/bl_operators/object_quick_effects.py111
-rw-r--r--release/scripts/startup/bl_operators/object_randomize_transform.py9
-rw-r--r--release/scripts/startup/bl_operators/sequencer.py8
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_lightmap.py1
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_smart_project.py27
-rw-r--r--release/scripts/startup/bl_operators/vertexpaint_dirt.py34
-rw-r--r--release/scripts/startup/bl_operators/wm.py66
-rw-r--r--release/scripts/startup/bl_ui/__init__.py6
-rw-r--r--release/scripts/startup/bl_ui/properties_data_armature.py26
-rw-r--r--release/scripts/startup/bl_ui/properties_data_camera.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_data_mesh.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_data_speaker.py125
-rw-r--r--release/scripts/startup/bl_ui/properties_game.py16
-rw-r--r--release/scripts/startup/bl_ui/properties_object_constraint.py9
-rw-r--r--release/scripts/startup/bl_ui/properties_particle.py8
-rw-r--r--release/scripts/startup/bl_ui/properties_render.py10
-rw-r--r--release/scripts/startup/bl_ui/properties_scene.py28
-rw-r--r--release/scripts/startup/bl_ui/properties_texture.py12
-rw-r--r--release/scripts/startup/bl_ui/space_console.py8
-rw-r--r--release/scripts/startup/bl_ui/space_dopesheet.py77
-rw-r--r--release/scripts/startup/bl_ui/space_graph.py4
-rw-r--r--release/scripts/startup/bl_ui/space_image.py18
-rw-r--r--release/scripts/startup/bl_ui/space_info.py11
-rw-r--r--release/scripts/startup/bl_ui/space_nla.py5
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py33
-rw-r--r--release/scripts/startup/bl_ui/space_text.py2
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py46
-rw-r--r--release/scripts/startup/bl_ui/space_userpref_keymap.py70
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py18
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py2
-rw-r--r--release/scripts/startup/keyingsets_builtins.py33
-rw-r--r--release/scripts/templates/addon_add_object.py10
-rw-r--r--release/scripts/templates/operator_export.py28
-rw-r--r--release/scripts/templates/operator_mesh_add.py41
-rw-r--r--release/scripts/templates/operator_modal_view3d.py5
-rw-r--r--release/scripts/templates/operator_simple.py2
53 files changed, 842 insertions, 393 deletions
diff --git a/release/datafiles/blenderbuttons b/release/datafiles/blenderbuttons
index 9872e53585e..4c064182a8c 100644
--- a/release/datafiles/blenderbuttons
+++ b/release/datafiles/blenderbuttons
Binary files differ
diff --git a/release/scripts/modules/bpy_extras/image_utils.py b/release/scripts/modules/bpy_extras/image_utils.py
index eab75c3bd16..02959fae534 100644
--- a/release/scripts/modules/bpy_extras/image_utils.py
+++ b/release/scripts/modules/bpy_extras/image_utils.py
@@ -58,7 +58,7 @@ def load_image(imagepath,
For formats blender can read, simply return the path that is given.
:type convert_callback: function
:return: an image or None
- :rtype: :class:`Image`
+ :rtype: :class:`bpy.types.Image`
"""
import os
import bpy
diff --git a/release/scripts/modules/bpy_extras/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py
index 6271c1f77b5..3f6a3682e7c 100644
--- a/release/scripts/modules/bpy_extras/io_utils.py
+++ b/release/scripts/modules/bpy_extras/io_utils.py
@@ -252,10 +252,10 @@ def axis_conversion(from_forward='Y', from_up='Z', to_forward='Y', to_up='Z'):
def axis_conversion_ensure(operator, forward_attr, up_attr):
"""
Function to ensure an operator has valid axis conversion settings, intended
- to be used from :class:`Operator.check`.
+ to be used from :class:`bpy.types.Operator.check`.
:arg operator: the operator to access axis attributes from.
- :type operator: :class:`Operator`
+ :type operator: :class:`bpy.types.Operator`
:arg forward_attr: attribute storing the forward axis
:type forward_attr: string
:arg up_attr: attribute storing the up axis
diff --git a/release/scripts/modules/bpy_extras/mesh_utils.py b/release/scripts/modules/bpy_extras/mesh_utils.py
index c965169ff04..7bc6dae3cc6 100644
--- a/release/scripts/modules/bpy_extras/mesh_utils.py
+++ b/release/scripts/modules/bpy_extras/mesh_utils.py
@@ -35,7 +35,7 @@ def mesh_linked_faces(mesh):
other mesh elements within 1 mesh datablock.
:arg mesh: the mesh used to group with.
- :type mesh: :class:`Mesh`
+ :type mesh: :class:`bpy.types.Mesh`
:return: lists of lists containing faces.
:rtype: list
"""
@@ -125,9 +125,9 @@ def edge_loops_from_faces(mesh, faces=None, seams=()):
[[(0, 1), (4, 8), (3, 8)], ...]
:arg mesh: the mesh used to get edge loops from.
- :type mesh: :class:`Mesh`
+ :type mesh: :class:`bpy.types.Mesh`
:arg faces: optional face list to only use some of the meshes faces.
- :type faces: :class:`MeshFaces`, sequence or or NoneType
+ :type faces: :class:`bpy.types.MeshFaces`, sequence or or NoneType
:return: return a list of edge vertex index lists.
:rtype: list
"""
@@ -426,7 +426,7 @@ def ngon_tesselate(from_data, indices, fix_loops=True):
# See if its flipped the wrong way.
flip = None
for fi in fill:
- if flip != None:
+ if flip is not None:
break
for i, vi in enumerate(fi):
if vi == 0 and fi[i - 1] == 1:
@@ -450,7 +450,7 @@ def face_random_points(num_points, faces):
:arg num_points: the number of random points to generate on each face.
:type int:
:arg faces: list of the faces to generate points on.
- :type faces: :class:`MeshFaces`, sequence
+ :type faces: :class:`bpy.types.MeshFaces`, sequence
:return: list of random points over all faces.
:rtype: list
"""
diff --git a/release/scripts/modules/bpy_extras/object_utils.py b/release/scripts/modules/bpy_extras/object_utils.py
index 790f5ba48cb..3081e6f172e 100644
--- a/release/scripts/modules/bpy_extras/object_utils.py
+++ b/release/scripts/modules/bpy_extras/object_utils.py
@@ -33,11 +33,11 @@ def add_object_align_init(context, operator):
Return a matrix using the operator settings and view context.
:arg context: The context to use.
- :type context: :class:`Context`
+ :type context: :class:`bpy.types.Context`
:arg operator: The operator, checked for location and rotation properties.
- :type operator: :class:`Operator`
+ :type operator: :class:`bpy.types.Operator`
:return: the matrix from the context and settings.
- :rtype: :class:`Matrix`
+ :rtype: :class:`mathutils.Matrix`
"""
from mathutils import Matrix, Vector, Euler
@@ -92,13 +92,13 @@ def object_data_add(context, obdata, operator=None):
location, rotation and layer.
:arg context: The context to use.
- :type context: :class:`Context`
+ :type context: :class:`bpy.types.Context`
:arg obdata: the data used for the new object.
:type obdata: valid object data type or None.
:arg operator: The operator, checked for location and rotation properties.
- :type operator: :class:`Operator`
+ :type operator: :class:`bpy.types.Operator`
:return: the newly created object in the scene.
- :rtype: :class:`ObjectBase`
+ :rtype: :class:`bpy.types.ObjectBase`
"""
scene = context.scene
diff --git a/release/scripts/modules/bpy_extras/view3d_utils.py b/release/scripts/modules/bpy_extras/view3d_utils.py
index 26325633a05..c18a74bbb09 100644
--- a/release/scripts/modules/bpy_extras/view3d_utils.py
+++ b/release/scripts/modules/bpy_extras/view3d_utils.py
@@ -31,14 +31,14 @@ def region_2d_to_vector_3d(region, rv3d, coord):
coordinate.
:arg region: region of the 3D viewport, typically bpy.context.region.
- :type region: :class:`Region`
+ :type region: :class:`bpy.types.Region`
:arg rv3d: 3D region data, typically bpy.context.space_data.region_3d.
- :type rv3d: :class:`RegionView3D`
+ :type rv3d: :class:`bpy.types.RegionView3D`
:arg coord: 2d coordinates relative to the region:
(event.mouse_region_x, event.mouse_region_y) for example.
:type coord: 2d vector
:return: normalized 3d vector.
- :rtype: :class:`Vector`
+ :rtype: :class:`mathutils.Vector`
"""
from mathutils import Vector
@@ -65,9 +65,9 @@ def region_2d_to_location_3d(region, rv3d, coord, depth_location):
*depth_location*.
:arg region: region of the 3D viewport, typically bpy.context.region.
- :type region: :class:`Region`
+ :type region: :class:`bpy.types.Region`
:arg rv3d: 3D region data, typically bpy.context.space_data.region_3d.
- :type rv3d: :class:`RegionView3D`
+ :type rv3d: :class:`bpy.types.RegionView3D`
:arg coord: 2d coordinates relative to the region;
(event.mouse_region_x, event.mouse_region_y) for example.
:type coord: 2d vector
@@ -75,7 +75,7 @@ def region_2d_to_location_3d(region, rv3d, coord, depth_location):
there is no defined depth with a 2d region input.
:type depth_location: 3d vector
:return: normalized 3d vector.
- :rtype: :class:`Vector`
+ :rtype: :class:`mathutils.Vector`
"""
from mathutils import Vector
from mathutils.geometry import intersect_point_line
@@ -114,13 +114,13 @@ def location_3d_to_region_2d(region, rv3d, coord):
Return the *region* relative 2d location of a 3d position.
:arg region: region of the 3D viewport, typically bpy.context.region.
- :type region: :class:`Region`
+ :type region: :class:`bpy.types.Region`
:arg rv3d: 3D region data, typically bpy.context.space_data.region_3d.
- :type rv3d: :class:`RegionView3D`
+ :type rv3d: :class:`bpy.types.RegionView3D`
:arg coord: 3d worldspace location.
:type coord: 3d vector
:return: 2d location
- :rtype: :class:`Vector`
+ :rtype: :class:`mathutils.Vector`
"""
from mathutils import Vector
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index 8766c873dd8..101416f4943 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -57,7 +57,7 @@ class Library(bpy_types.ID):
"curves", "grease_pencil", "groups", "images", \
"lamps", "lattices", "materials", "metaballs", \
"meshes", "node_groups", "objects", "scenes", \
- "sounds", "textures", "texts", "fonts", "worlds"
+ "sounds", "speakers", "textures", "texts", "fonts", "worlds"
return tuple(id_block for attr in attr_links for id_block in getattr(bpy.data, attr) if id_block.library == self)
@@ -287,7 +287,7 @@ class EditBone(StructRNA, _GenericBone, metaclass=StructMetaPropGroup):
Transform the the bones head, tail, roll and envalope (when the matrix has a scale component).
:arg matrix: 3x3 or 4x4 transformation matrix.
- :type matrix: :class:`Matrix`
+ :type matrix: :class:`mathutils.Matrix`
:arg scale: Scale the bone envalope by the matrix.
:type scale: bool
:arg roll: Correct the roll to point in the same relative direction to the head and tail.
@@ -411,6 +411,16 @@ class Text(bpy_types.ID):
TypeMap = {}
+class Sound(bpy_types.ID):
+ __slots__ = ()
+
+ @property
+ def factory(self):
+ """The aud.Factory object of the sound."""
+ import aud
+ return aud._sound_from_pointer(self.as_pointer())
+
+
class RNAMeta(type):
def __new__(cls, name, bases, classdict, **args):
result = type.__new__(cls, name, bases, classdict)
diff --git a/release/scripts/modules/console_python.py b/release/scripts/modules/console_python.py
index 455eabe377b..425ea210104 100644
--- a/release/scripts/modules/console_python.py
+++ b/release/scripts/modules/console_python.py
@@ -179,7 +179,7 @@ def execute(context):
# special exception. its possible the command loaded a new user interface
if hash(sc) != hash(context.space_data):
- return
+ return {'FINISHED'}
bpy.ops.console.scrollback_append(text=sc.prompt + line, type='INPUT')
diff --git a/release/scripts/presets/ffmpeg/DV.py b/release/scripts/presets/ffmpeg/DV.py
index 46d2a0a4a2f..926fb241747 100644
--- a/release/scripts/presets/ffmpeg/DV.py
+++ b/release/scripts/presets/ffmpeg/DV.py
@@ -11,3 +11,4 @@ else:
bpy.context.scene.render.ffmpeg_audio_mixrate = 48000
bpy.context.scene.render.ffmpeg_audio_codec = "PCM"
+bpy.context.scene.render.ffmpeg_audio_channels = 2
diff --git a/release/scripts/presets/ffmpeg/DVD.py b/release/scripts/presets/ffmpeg/DVD.py
index e18ec9f817b..196b5d68406 100644
--- a/release/scripts/presets/ffmpeg/DVD.py
+++ b/release/scripts/presets/ffmpeg/DVD.py
@@ -21,3 +21,4 @@ bpy.context.scene.render.ffmpeg_muxrate = 10080000
bpy.context.scene.render.ffmpeg_audio_codec = "AC3"
bpy.context.scene.render.ffmpeg_audio_bitrate = 448
bpy.context.scene.render.ffmpeg_audio_mixrate = 48000
+bpy.context.scene.render.ffmpeg_audio_channels = 6
diff --git a/release/scripts/presets/ffmpeg/SVCD.py b/release/scripts/presets/ffmpeg/SVCD.py
index c71a3851af0..e4459ab5c5c 100644
--- a/release/scripts/presets/ffmpeg/SVCD.py
+++ b/release/scripts/presets/ffmpeg/SVCD.py
@@ -21,3 +21,4 @@ bpy.context.scene.render.ffmpeg_muxrate = 0
bpy.context.scene.render.ffmpeg_audio_bitrate = 224
bpy.context.scene.render.ffmpeg_audio_mixrate = 44100
bpy.context.scene.render.ffmpeg_audio_codec = "MP2"
+bpy.context.scene.render.ffmpeg_audio_channels = 2
diff --git a/release/scripts/presets/ffmpeg/VCD.py b/release/scripts/presets/ffmpeg/VCD.py
index faf27efe9e6..c2b73e682a2 100644
--- a/release/scripts/presets/ffmpeg/VCD.py
+++ b/release/scripts/presets/ffmpeg/VCD.py
@@ -21,3 +21,4 @@ bpy.context.scene.render.ffmpeg_muxrate = 2352 * 75 * 8
bpy.context.scene.render.ffmpeg_audio_bitrate = 224
bpy.context.scene.render.ffmpeg_audio_mixrate = 44100
bpy.context.scene.render.ffmpeg_audio_codec = "MP2"
+bpy.context.scene.render.ffmpeg_audio_channels = 2
diff --git a/release/scripts/startup/bl_operators/add_mesh_torus.py b/release/scripts/startup/bl_operators/add_mesh_torus.py
index 1c4518c4feb..056b3478c2b 100644
--- a/release/scripts/startup/bl_operators/add_mesh_torus.py
+++ b/release/scripts/startup/bl_operators/add_mesh_torus.py
@@ -88,36 +88,62 @@ class AddTorus(Operator):
bl_label = "Add Torus"
bl_options = {'REGISTER', 'UNDO'}
- major_radius = FloatProperty(name="Major Radius",
+ major_radius = FloatProperty(
+ name="Major Radius",
description=("Radius from the origin to the "
"center of the cross sections"),
- default=1.0, min=0.01, max=100.0)
- minor_radius = FloatProperty(name="Minor Radius",
+ min=0.01, max=100.0,
+ default=1.0,
+ )
+ minor_radius = FloatProperty(
+ name="Minor Radius",
description="Radius of the torus' cross section",
- default=0.25, min=0.01, max=100.0)
- major_segments = IntProperty(name="Major Segments",
+ min=0.01, max=100.0,
+ default=0.25,
+ )
+ major_segments = IntProperty(
+ name="Major Segments",
description="Number of segments for the main ring of the torus",
- default=48, min=3, max=256)
- minor_segments = IntProperty(name="Minor Segments",
+ min=3, max=256,
+ default=48,
+ )
+ minor_segments = IntProperty(
+ name="Minor Segments",
description="Number of segments for the minor ring of the torus",
- default=12, min=3, max=256)
- use_abso = BoolProperty(name="Use Int+Ext Controls",
+ min=3, max=256,
+ default=12,
+ )
+ use_abso = BoolProperty(
+ name="Use Int+Ext Controls",
description="Use the Int / Ext controls for torus dimensions",
- default=False)
- abso_major_rad = FloatProperty(name="Exterior Radius",
+ default=False,
+ )
+ abso_major_rad = FloatProperty(
+ name="Exterior Radius",
description="Total Exterior Radius of the torus",
- default=1.0, min=0.01, max=100.0)
- abso_minor_rad = FloatProperty(name="Inside Radius",
+ min=0.01, max=100.0,
+ default=1.0,
+ )
+ abso_minor_rad = FloatProperty(
+ name="Inside Radius",
description="Total Interior Radius of the torus",
- default=0.5, min=0.01, max=100.0)
+ min=0.01, max=100.0,
+ default=0.5,
+ )
# generic transform props
- view_align = BoolProperty(name="Align to View",
- default=False)
- location = FloatVectorProperty(name="Location",
- subtype='TRANSLATION')
- rotation = FloatVectorProperty(name="Rotation",
- subtype='EULER')
+ view_align = BoolProperty(
+ name="Align to View",
+ default=False,
+ )
+ location = FloatVectorProperty(
+ name="Location",
+ subtype='TRANSLATION',
+ )
+ rotation = FloatVectorProperty(
+ name="Rotation",
+ subtype='EULER',
+ )
def execute(self, context):
diff --git a/release/scripts/startup/bl_operators/mesh.py b/release/scripts/startup/bl_operators/mesh.py
index 4114381f3dc..5f6583754e9 100644
--- a/release/scripts/startup/bl_operators/mesh.py
+++ b/release/scripts/startup/bl_operators/mesh.py
@@ -74,11 +74,11 @@ class MeshMirrorUV(Operator):
bl_label = "Copy Mirrored UV coords"
bl_options = {'REGISTER', 'UNDO'}
- direction = EnumProperty(items=(
- ('POSITIVE', "Positive", ""),
- ('NEGATIVE', "Negative", "")),
- name="Axis Direction",
- description="")
+ direction = EnumProperty(
+ name="Axis Direction",
+ items=(('POSITIVE', "Positive", ""),
+ ('NEGATIVE', "Negative", "")),
+ )
@classmethod
def poll(cls, context):
diff --git a/release/scripts/startup/bl_operators/nla.py b/release/scripts/startup/bl_operators/nla.py
index 44ed846e530..c764f7d62f1 100644
--- a/release/scripts/startup/bl_operators/nla.py
+++ b/release/scripts/startup/bl_operators/nla.py
@@ -84,7 +84,7 @@ def bake(frame_start,
do_pose=True,
do_object=True,
do_constraint_clear=False,
- ):
+ action=None):
scene = bpy.context.scene
obj = bpy.context.object
@@ -121,7 +121,8 @@ def bake(frame_start,
# incase animation data hassnt been created
atd = obj.animation_data_create()
- action = bpy.data.actions.new("Action")
+ if action is None:
+ action = bpy.data.actions.new("Action")
atd.action = action
if do_pose:
@@ -198,19 +199,32 @@ class BakeAction(Operator):
bl_label = "Bake Action"
bl_options = {'REGISTER', 'UNDO'}
- frame_start = IntProperty(name="Start Frame",
+ frame_start = IntProperty(
+ name="Start Frame",
description="Start frame for baking",
- default=1, min=1, max=300000)
- frame_end = IntProperty(name="End Frame",
+ min=0, max=300000,
+ default=1,
+ )
+ frame_end = IntProperty(
+ name="End Frame",
description="End frame for baking",
- default=250, min=1, max=300000)
- step = IntProperty(name="Frame Step",
+ min=1, max=300000,
+ default=250,
+ )
+ step = IntProperty(
+ name="Frame Step",
description="Frame Step",
- default=1, min=1, max=120)
- only_selected = BoolProperty(name="Only Selected",
- default=True)
- clear_consraints = BoolProperty(name="Clear Constraints",
- default=False)
+ min=1, max=120,
+ default=1,
+ )
+ only_selected = BoolProperty(
+ name="Only Selected",
+ default=True,
+ )
+ clear_consraints = BoolProperty(
+ name="Clear Constraints",
+ default=False,
+ )
bake_types = EnumProperty(
name="Bake Data",
options={'ENUM_FLAG'},
@@ -254,3 +268,36 @@ class BakeAction(Operator):
def invoke(self, context, event):
wm = context.window_manager
return wm.invoke_props_dialog(self)
+
+
+class ClearUselessActions(Operator):
+ '''Mark actions with no F-Curves for deletion after save+reload of file preserving "action libraries"'''
+ bl_idname = "anim.clear_useless_actions"
+ bl_label = "Clear Useless Actions"
+ bl_options = {'REGISTER', 'UNDO'}
+
+ only_unused = BoolProperty(name="Only Unused",
+ description="Only unused (Fake User only) actions get considered",
+ default=True)
+
+ @classmethod
+ def poll(cls, context):
+ return len(bpy.data.actions) != 0
+
+ def execute(self, context):
+ removed = 0
+
+ for action in bpy.data.actions:
+ # if only user is "fake" user...
+ if ((self.only_unused is False) or
+ (action.use_fake_user and action.users == 1)):
+
+ # if it has F-Curves, then it's a "action library" (i.e. walk, wave, jump, etc.)
+ # and should be left alone as that's what fake users are for!
+ if not action.fcurves:
+ # mark action for deletion
+ action.user_clear()
+ removed += 1
+
+ self.report({'INFO'}, "Removed %d empty and/or fake-user only Actions" % (removed))
+ return {'FINISHED'}
diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py
index 79f57990f37..6c9f27afaa5 100644
--- a/release/scripts/startup/bl_operators/object.py
+++ b/release/scripts/startup/bl_operators/object.py
@@ -195,8 +195,12 @@ class SubdivisionSet(Operator):
bl_label = "Subdivision Set"
bl_options = {'REGISTER', 'UNDO'}
- level = IntProperty(name="Level",
- default=1, min=-100, max=100, soft_min=-6, soft_max=6)
+ level = IntProperty(
+ name="Level",
+ min=-100, max=100,
+ soft_min=-6, soft_max=6,
+ default=1,
+ )
relative = BoolProperty(
name="Relative",
@@ -681,3 +685,49 @@ class ClearAllRestrictRender(Operator):
for obj in context.scene.objects:
obj.hide_render = False
return {'FINISHED'}
+
+
+class TransformsToDeltasAnim(Operator):
+ '''Convert object animation for normal transforms to delta transforms'''
+ bl_idname = "object.anim_transforms_to_deltas"
+ bl_label = "Animated Transforms to Deltas"
+ bl_options = {'REGISTER', 'UNDO'}
+
+ @classmethod
+ def poll(cls, context):
+ obs = context.selected_editable_objects
+ return (obs is not None)
+
+ def execute(self, context):
+ for obj in context.selected_editable_objects:
+ # get animation data
+ adt = obj.animation_data
+ if (adt is None) or (adt.action is None):
+ self.report({'WARNING'},
+ "No animation data to convert on object: %r" %
+ obj.name)
+ continue
+
+ # if F-Curve uses standard transform path
+ # just append "delta_" to this path
+ for fcu in adt.action.fcurves:
+ if fcu.data_path == "location":
+ fcu.data_path = "delta_location"
+ obj.location.zero()
+ elif fcu.data_path == "rotation_euler":
+ fcu.data_path = "delta_rotation_euler"
+ obj.rotation_euler.zero()
+ elif fcu.data_path == "rotation_quaternion":
+ fcu.data_path = "delta_rotation_quaternion"
+ obj.rotation_quaternion.identity()
+ # XXX: currently not implemented
+ # elif fcu.data_path == "rotation_axis_angle":
+ # fcu.data_path = "delta_rotation_axis_angle"
+ elif fcu.data_path == "scale":
+ fcu.data_path = "delta_scale"
+ obj.scale = 1.0, 1.0, 1.0
+
+ # hack: force animsys flush by changing frame, so that deltas get run
+ context.scene.frame_set(context.scene.frame_current)
+
+ return {'FINISHED'}
diff --git a/release/scripts/startup/bl_operators/object_align.py b/release/scripts/startup/bl_operators/object_align.py
index d4a3d826f2f..50e9bfb5b98 100644
--- a/release/scripts/startup/bl_operators/object_align.py
+++ b/release/scripts/startup/bl_operators/object_align.py
@@ -351,33 +351,34 @@ class AlignObjects(Operator):
description=("Enables high quality calculation of the "
"bounding box for perfect results on complex "
"shape meshes with rotation/scale (Slow)"),
- default=True)
-
- align_mode = EnumProperty(items=(
- ('OPT_1', "Negative Sides", ""),
- ('OPT_2', "Centers", ""),
- ('OPT_3', "Positive Sides", "")),
- name="Align Mode:",
- description="",
- default='OPT_2')
-
- relative_to = EnumProperty(items=(
- ('OPT_1', "Scene Origin", ""),
- ('OPT_2', "3D Cursor", ""),
- ('OPT_3', "Selection", ""),
- ('OPT_4', "Active", "")),
- name="Relative To:",
- description="",
- default='OPT_4')
-
- align_axis = EnumProperty(items=(
- ('X', "X", ""),
- ('Y', "Y", ""),
- ('Z', "Z", ""),
- ),
- name="Align",
- description="Align to axis",
- options={'ENUM_FLAG'})
+ default=True,
+ )
+ align_mode = EnumProperty(
+ name="Align Mode:",
+ items=(('OPT_1', "Negative Sides", ""),
+ ('OPT_2', "Centers", ""),
+ ('OPT_3', "Positive Sides", ""),
+ ),
+ default='OPT_2',
+ )
+ relative_to = EnumProperty(
+ name="Relative To:",
+ items=(('OPT_1', "Scene Origin", ""),
+ ('OPT_2', "3D Cursor", ""),
+ ('OPT_3', "Selection", ""),
+ ('OPT_4', "Active", ""),
+ ),
+ default='OPT_4',
+ )
+ align_axis = EnumProperty(
+ name="Align",
+ description="Align to axis",
+ items=(('X', "X", ""),
+ ('Y', "Y", ""),
+ ('Z', "Z", ""),
+ ),
+ options={'ENUM_FLAG'},
+ )
@classmethod
def poll(cls, context):
diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py
index cd206da3a8e..48b547980d4 100644
--- a/release/scripts/startup/bl_operators/object_quick_effects.py
+++ b/release/scripts/startup/bl_operators/object_quick_effects.py
@@ -51,19 +51,25 @@ class QuickFur(Operator):
bl_label = "Quick Fur"
bl_options = {'REGISTER', 'UNDO'}
- density = EnumProperty(items=(
- ('LIGHT', "Light", ""),
- ('MEDIUM', "Medium", ""),
- ('HEAVY', "Heavy", "")),
- name="Fur Density",
- description="",
- default='MEDIUM')
-
- view_percentage = IntProperty(name="View %",
- default=10, min=1, max=100, soft_min=1, soft_max=100)
-
- length = FloatProperty(name="Length",
- default=0.1, min=0.001, max=100, soft_min=0.01, soft_max=10)
+ density = EnumProperty(
+ name="Fur Density",
+ items=(('LIGHT', "Light", ""),
+ ('MEDIUM', "Medium", ""),
+ ('HEAVY', "Heavy", "")),
+ default='MEDIUM',
+ )
+ view_percentage = IntProperty(
+ name="View %",
+ min=1, max=100,
+ soft_min=1, soft_max=100,
+ default=10,
+ )
+ length = FloatProperty(
+ name="Length",
+ min=0.001, max=100,
+ soft_min=0.01, soft_max=10,
+ default=0.1,
+ )
def execute(self, context):
fake_context = bpy.context.copy()
@@ -110,31 +116,50 @@ class QuickExplode(Operator):
bl_label = "Quick Explode"
bl_options = {'REGISTER', 'UNDO'}
- style = EnumProperty(items=(
- ('EXPLODE', "Explode", ""),
- ('BLEND', "Blend", "")),
- name="Explode Style",
- description="",
- default='EXPLODE')
-
- amount = IntProperty(name="Amount of pieces",
- default=100, min=2, max=10000, soft_min=2, soft_max=10000)
-
- frame_duration = IntProperty(name="Duration",
- default=50, min=1, max=300000, soft_min=1, soft_max=10000)
-
- frame_start = IntProperty(name="Start Frame",
- default=1, min=1, max=300000, soft_min=1, soft_max=10000)
+ style = EnumProperty(
+ name="Explode Style",
+ items=(('EXPLODE', "Explode", ""),
+ ('BLEND', "Blend", "")),
+ default='EXPLODE',
+ )
+ amount = IntProperty(
+ name="Amount of pieces",
+ min=2, max=10000,
+ soft_min=2, soft_max=10000,
+ default=100,
+ )
+ frame_duration = IntProperty(
+ name="Duration",
+ min=1, max=300000,
+ soft_min=1, soft_max=10000,
+ default=50,
+ )
- frame_end = IntProperty(name="End Frame",
- default=10, min=1, max=300000, soft_min=1, soft_max=10000)
+ frame_start = IntProperty(
+ name="Start Frame",
+ min=1, max=300000,
+ soft_min=1, soft_max=10000,
+ default=1,
+ )
+ frame_end = IntProperty(
+ name="End Frame",
+ min=1, max=300000,
+ soft_min=1, soft_max=10000,
+ default=10,
+ )
- velocity = FloatProperty(name="Outwards Velocity",
- default=1, min=0, max=300000, soft_min=0, soft_max=10)
+ velocity = FloatProperty(
+ name="Outwards Velocity",
+ min=0, max=300000,
+ soft_min=0, soft_max=10,
+ default=1,
+ )
- fade = BoolProperty(name="Fade",
- description="Fade the pieces over time.",
- default=True)
+ fade = BoolProperty(
+ name="Fade",
+ description="Fade the pieces over time.",
+ default=True,
+ )
def execute(self, context):
fake_context = bpy.context.copy()
@@ -272,12 +297,11 @@ class QuickSmoke(Operator):
bl_options = {'REGISTER', 'UNDO'}
style = EnumProperty(
+ name="Smoke Style",
items=(('STREAM', "Stream", ""),
('PUFF', "Puff", ""),
('FIRE', "Fire", ""),
),
- name="Smoke Style",
- description="",
default='STREAM',
)
@@ -390,19 +414,16 @@ class QuickFluid(Operator):
bl_options = {'REGISTER', 'UNDO'}
style = EnumProperty(
+ name="Fluid Style",
items=(('INFLOW', "Inflow", ""),
- ('BASIC', "Basic", ""),
- ),
- name="Fluid Style",
- description="",
- default='BASIC',
- )
+ ('BASIC', "Basic", "")),
+ default='BASIC',
+ )
initial_velocity = FloatVectorProperty(
name="Initial Velocity",
description="Initial velocity of the fluid",
+ min=-100.0, max=100.0,
default=(0.0, 0.0, 0.0),
- min=-100.0,
- max=100.0,
subtype='VELOCITY',
)
show_flows = BoolProperty(
diff --git a/release/scripts/startup/bl_operators/object_randomize_transform.py b/release/scripts/startup/bl_operators/object_randomize_transform.py
index f65e3d27d83..7aea18487f3 100644
--- a/release/scripts/startup/bl_operators/object_randomize_transform.py
+++ b/release/scripts/startup/bl_operators/object_randomize_transform.py
@@ -145,9 +145,12 @@ class RandomizeLocRotSize(Operator):
default=False,
)
- '''scale_min = FloatProperty(name="Minimun Scale Factor",
- description="Lowest scale percentage possible",
- default=0.15, min=-1.0, max=1.0, precision=3)'''
+ '''scale_min = FloatProperty(
+ name="Minimun Scale Factor",
+ description="Lowest scale percentage possible",
+ min=-1.0, max=1.0, precision=3,
+ default=0.15,
+ )'''
scale = FloatVectorProperty(
name="Scale",
diff --git a/release/scripts/startup/bl_operators/sequencer.py b/release/scripts/startup/bl_operators/sequencer.py
index d2f85c8d7c7..856e182279a 100644
--- a/release/scripts/startup/bl_operators/sequencer.py
+++ b/release/scripts/startup/bl_operators/sequencer.py
@@ -82,8 +82,12 @@ class SequencerCutMulticam(Operator):
bl_label = "Cut multicam"
bl_options = {'REGISTER', 'UNDO'}
- camera = IntProperty(name="Camera",
- default=1, min=1, max=32, soft_min=1, soft_max=32)
+ camera = IntProperty(
+ name="Camera",
+ min=1, max=32,
+ soft_min=1, soft_max=32,
+ default=1,
+ )
@classmethod
def poll(cls, context):
diff --git a/release/scripts/startup/bl_operators/uvcalc_lightmap.py b/release/scripts/startup/bl_operators/uvcalc_lightmap.py
index 6b1c6e1be98..060fe400045 100644
--- a/release/scripts/startup/bl_operators/uvcalc_lightmap.py
+++ b/release/scripts/startup/bl_operators/uvcalc_lightmap.py
@@ -552,7 +552,6 @@ class LightMapPack(Operator):
PREF_CONTEXT = bpy.props.EnumProperty(
name="Selection",
- description="",
items=(("SEL_FACES", "Selected Faces", "Space all UVs evently"),
("ALL_FACES", "All Faces", "Average space UVs edge length of each loop"),
("ALL_OBJECTS", "Selected Mesh Object", "Average space UVs edge length of each loop")
diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
index 8afd6c104e0..23838588f43 100644
--- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py
+++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
@@ -178,7 +178,7 @@ def pointInEdges(pt, edges):
intersectCount = 0
for ed in edges:
xi, yi = lineIntersection2D(x1,y1, x2,y2, ed[0][0], ed[0][1], ed[1][0], ed[1][1])
- if xi != None: # Is there an intersection.
+ if xi is not None: # Is there an intersection.
intersectCount+=1
return intersectCount % 2
@@ -1110,21 +1110,28 @@ class SmartProject(Operator):
bl_label = "Smart UV Project"
bl_options = {'REGISTER', 'UNDO'}
- angle_limit = FloatProperty(name="Angle Limit",
+ angle_limit = FloatProperty(
+ name="Angle Limit",
description="lower for more projection groups, higher for less distortion",
- default=66.0, min=1.0, max=89.0)
-
- island_margin = FloatProperty(name="Island Margin",
+ min=1.0, max=89.0,
+ default=66.0,
+ )
+ island_margin = FloatProperty(
+ name="Island Margin",
description="Margin to reduce bleed from adjacent islands",
- default=0.0, min=0.0, max=1.0)
-
- user_area_weight = FloatProperty(name="Area Weight",
+ min=0.0, max=1.0,
+ default=0.0,
+ )
+ user_area_weight = FloatProperty(
+ name="Area Weight",
description="Weight projections vector by faces with larger areas",
- default=0.0, min=0.0, max=1.0)
+ min=0.0, max=1.0,
+ default=0.0,
+ )
@classmethod
def poll(cls, context):
- return context.active_object != None
+ return context.active_object is not None
def execute(self, context):
main(context,
diff --git a/release/scripts/startup/bl_operators/vertexpaint_dirt.py b/release/scripts/startup/bl_operators/vertexpaint_dirt.py
index facde82f812..4c78adb7161 100644
--- a/release/scripts/startup/bl_operators/vertexpaint_dirt.py
+++ b/release/scripts/startup/bl_operators/vertexpaint_dirt.py
@@ -151,11 +151,35 @@ class VertexPaintDirt(Operator):
bl_label = "Dirty Vertex Colors"
bl_options = {'REGISTER', 'UNDO'}
- blur_strength = FloatProperty(name="Blur Strength", description="Blur strength per iteration", default=1.0, min=0.01, max=1.0)
- blur_iterations = IntProperty(name="Blur Iterations", description="Number times to blur the colors. (higher blurs more)", default=1, min=0, max=40)
- clean_angle = FloatProperty(name="Highlight Angle", description="Less then 90 limits the angle used in the tonal range", default=180.0, min=0.0, max=180.0)
- dirt_angle = FloatProperty(name="Dirt Angle", description="Less then 90 limits the angle used in the tonal range", default=0.0, min=0.0, max=180.0)
- dirt_only = BoolProperty(name="Dirt Only", description="Dont calculate cleans for convex areas", default=False)
+ blur_strength = FloatProperty(
+ name="Blur Strength",
+ description="Blur strength per iteration",
+ min=0.01, max=1.0,
+ default=1.0,
+ )
+ blur_iterations = IntProperty(
+ name="Blur Iterations",
+ description="Number times to blur the colors. (higher blurs more)",
+ min=0, max=40,
+ default=1,
+ )
+ clean_angle = FloatProperty(
+ name="Highlight Angle",
+ description="Less then 90 limits the angle used in the tonal range",
+ min=0.0, max=180.0,
+ default=180.0,
+ )
+ dirt_angle = FloatProperty(
+ name="Dirt Angle",
+ description="Less then 90 limits the angle used in the tonal range",
+ min=0.0, max=180.0,
+ default=0.0,
+ )
+ dirt_only = BoolProperty(
+ name="Dirt Only",
+ description="Dont calculate cleans for convex areas",
+ default=False,
+ )
def execute(self, context):
import time
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 885d8cf2aed..aa09a088c4f 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -557,14 +557,12 @@ class WM_OT_context_set_id(Operator):
doc_id = StringProperty(
name="Doc ID",
- description="",
maxlen=1024,
options={'HIDDEN'},
)
doc_new = StringProperty(
name="Edit Description",
- description="",
maxlen=1024,
)
@@ -740,7 +738,6 @@ class WM_OT_url_open(Operator):
def execute(self, context):
import webbrowser
- _webbrowser_bug_fix()
webbrowser.open(self.url)
return {'FINISHED'}
@@ -832,7 +829,6 @@ class WM_OT_doc_view(Operator):
return {'PASS_THROUGH'}
import webbrowser
- _webbrowser_bug_fix()
webbrowser.open(url)
return {'FINISHED'}
@@ -1183,65 +1179,3 @@ class WM_OT_copy_prev_settings(Operator):
return {'FINISHED'}
return {'CANCELLED'}
-
-
-def _webbrowser_bug_fix():
- # test for X11
- import os
-
- if os.environ.get("DISPLAY"):
-
- # BSD licenced code copied from python, temp fix for bug
- # http://bugs.python.org/issue11432, XXX == added code
- def _invoke(self, args, remote, autoraise):
- # XXX, added imports
- import io
- import subprocess
- import time
-
- raise_opt = []
- if remote and self.raise_opts:
- # use autoraise argument only for remote invocation
- autoraise = int(autoraise)
- opt = self.raise_opts[autoraise]
- if opt:
- raise_opt = [opt]
-
- cmdline = [self.name] + raise_opt + args
-
- if remote or self.background:
- inout = io.open(os.devnull, "r+")
- else:
- # for TTY browsers, we need stdin/out
- inout = None
- # if possible, put browser in separate process group, so
- # keyboard interrupts don't affect browser as well as Python
- setsid = getattr(os, 'setsid', None)
- if not setsid:
- setsid = getattr(os, 'setpgrp', None)
-
- p = subprocess.Popen(cmdline, close_fds=True, # XXX, stdin=inout,
- stdout=(self.redirect_stdout and inout or None),
- stderr=inout, preexec_fn=setsid)
- if remote:
- # wait five secons. If the subprocess is not finished, the
- # remote invocation has (hopefully) started a new instance.
- time.sleep(1)
- rc = p.poll()
- if rc is None:
- time.sleep(4)
- rc = p.poll()
- if rc is None:
- return True
- # if remote call failed, open() will try direct invocation
- return not rc
- elif self.background:
- if p.poll() is None:
- return True
- else:
- return False
- else:
- return not p.wait()
-
- import webbrowser
- webbrowser.UnixBrowser._invoke = _invoke
diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py
index bf63c6071b9..778571632b2 100644
--- a/release/scripts/startup/bl_ui/__init__.py
+++ b/release/scripts/startup/bl_ui/__init__.py
@@ -36,6 +36,7 @@ _modules = (
"properties_data_mesh",
"properties_data_metaball",
"properties_data_modifier",
+ "properties_data_speaker",
"properties_game",
"properties_material",
"properties_object_constraint",
@@ -102,7 +103,10 @@ def register():
items.extend([(cat, cat, "") for cat in sorted(items_unique)])
return items
- WindowManager.addon_search = StringProperty(name="Search", description="Search within the selected filter")
+ WindowManager.addon_search = StringProperty(
+ name="Search",
+ description="Search within the selected filter",
+ )
WindowManager.addon_filter = EnumProperty(
items=addon_filter_items,
name="Category",
diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py
index 94c40d11141..e17064178b8 100644
--- a/release/scripts/startup/bl_ui/properties_data_armature.py
+++ b/release/scripts/startup/bl_ui/properties_data_armature.py
@@ -18,7 +18,7 @@
# <pep8 compliant>
import bpy
-from bpy.types import Panel
+from bpy.types import Panel, Menu
from rna_prop_ui import PropertyPanel
@@ -71,6 +71,8 @@ class DATA_PT_skeleton(ArmatureButtonsPanel, Panel):
flow.prop(arm, "use_deform_envelopes", text="Envelopes")
flow.prop(arm, "use_deform_preserve_volume", text="Quaternion")
+ if context.scene.render.engine == "BLENDER_GAME":
+ layout.row().prop(arm, "vert_deformer", expand=True)
class DATA_PT_display(ArmatureButtonsPanel, Panel):
bl_label = "Display"
@@ -97,6 +99,15 @@ class DATA_PT_display(ArmatureButtonsPanel, Panel):
col.prop(arm, "use_deform_delay", text="Delay Refresh")
+class DATA_PT_bone_group_specials(Menu):
+ bl_label = "Bone Group Specials"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("pose.group_sort", icon='SORTALPHA')
+
+
class DATA_PT_bone_groups(ArmatureButtonsPanel, Panel):
bl_label = "Bone Groups"
@@ -109,16 +120,25 @@ class DATA_PT_bone_groups(ArmatureButtonsPanel, Panel):
ob = context.object
pose = ob.pose
+ group = pose.bone_groups.active
row = layout.row()
- row.template_list(pose, "bone_groups", pose.bone_groups, "active_index", rows=2)
+
+ rows = 2
+ if group:
+ rows = 5
+ row.template_list(pose, "bone_groups", pose.bone_groups, "active_index", rows=rows)
col = row.column(align=True)
col.active = (ob.proxy is None)
col.operator("pose.group_add", icon='ZOOMIN', text="")
col.operator("pose.group_remove", icon='ZOOMOUT', text="")
+ col.menu("DATA_PT_bone_group_specials", icon='DOWNARROW_HLT', text="")
+ if group:
+ col.separator()
+ col.operator("pose.group_move", icon='TRIA_UP', text="").direction = 'UP'
+ col.operator("pose.group_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
- group = pose.bone_groups.active
if group:
col = layout.column()
col.active = (ob.proxy is None)
diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py
index f484d7b59e1..5255af40951 100644
--- a/release/scripts/startup/bl_ui/properties_data_camera.py
+++ b/release/scripts/startup/bl_ui/properties_data_camera.py
@@ -107,7 +107,7 @@ class DATA_PT_camera(CameraButtonsPanel, Panel):
col = split.column()
- if cam.dof_object != None:
+ if cam.dof_object is not None:
col.enabled = False
col.prop(cam, "dof_distance", text="Distance")
diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py
index d824ec3d589..7503959480b 100644
--- a/release/scripts/startup/bl_ui/properties_data_mesh.py
+++ b/release/scripts/startup/bl_ui/properties_data_mesh.py
@@ -73,7 +73,7 @@ class DATA_PT_context_mesh(MeshButtonsPanel, Panel):
ob = context.object
mesh = context.mesh
space = context.space_data
- layout.prop(context.scene.tool_settings, "mesh_select_mode", index=0, text="Vertex")
+
if ob:
layout.template_ID(ob, "data")
elif mesh:
diff --git a/release/scripts/startup/bl_ui/properties_data_speaker.py b/release/scripts/startup/bl_ui/properties_data_speaker.py
new file mode 100644
index 00000000000..657c0fe652a
--- /dev/null
+++ b/release/scripts/startup/bl_ui/properties_data_speaker.py
@@ -0,0 +1,125 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8 compliant>
+import bpy
+from rna_prop_ui import PropertyPanel
+
+
+class DataButtonsPanel():
+ bl_space_type = 'PROPERTIES'
+ bl_region_type = 'WINDOW'
+ bl_context = "data"
+
+ @classmethod
+ def poll(cls, context):
+ engine = context.scene.render.engine
+ return context.speaker and (engine in cls.COMPAT_ENGINES)
+
+
+class DATA_PT_context_speaker(DataButtonsPanel, bpy.types.Panel):
+ bl_label = ""
+ bl_options = {'HIDE_HEADER'}
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
+
+ def draw(self, context):
+ layout = self.layout
+
+ ob = context.object
+ speaker = context.speaker
+ space = context.space_data
+
+ split = layout.split(percentage=0.65)
+
+ if ob:
+ split.template_ID(ob, "data")
+ elif speaker:
+ split.template_ID(space, "pin_id")
+
+
+class DATA_PT_speaker(DataButtonsPanel, bpy.types.Panel):
+ bl_label = "Sound"
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
+
+ def draw(self, context):
+ layout = self.layout
+
+ speaker = context.speaker
+
+ split = layout.split(percentage=0.75)
+
+ split.template_ID(speaker, "sound", open="sound.open_mono")
+ split.prop(speaker, "muted")
+
+ row = layout.row()
+ row.prop(speaker, "volume")
+ row.prop(speaker, "pitch")
+
+
+class DATA_PT_distance(DataButtonsPanel, bpy.types.Panel):
+ bl_label = "Distance"
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
+
+ def draw(self, context):
+ layout = self.layout
+
+ speaker = context.speaker
+
+ split = layout.split()
+
+ col = split.column()
+ col.label("Volume:")
+ col.prop(speaker, "volume_min", text="Minimum")
+ col.prop(speaker, "volume_max", text="Maximum")
+ col.prop(speaker, "attenuation")
+
+ col = split.column()
+ col.label("Distance:")
+ col.prop(speaker, "distance_max", text="Maximum")
+ col.prop(speaker, "distance_reference", text="Reference")
+
+
+class DATA_PT_cone(DataButtonsPanel, bpy.types.Panel):
+ bl_label = "Cone"
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
+
+ def draw(self, context):
+ layout = self.layout
+
+ speaker = context.speaker
+
+ split = layout.split()
+ col = split.column()
+
+ col.label("Angle:")
+ col.prop(speaker, "cone_angle_outer", text="Outer")
+ col.prop(speaker, "cone_angle_inner", text="Inner")
+
+ col = split.column()
+
+ col.label("Volume:")
+ col.prop(speaker, "cone_volume_outer", text="Outer")
+
+
+class DATA_PT_custom_props_speaker(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
+ _context_path = "object.data"
+ _property_type = bpy.types.Speaker
+
+if __name__ == "__main__": # only for live edit.
+ bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py
index f8be32e6c07..e3c576e7093 100644
--- a/release/scripts/startup/bl_ui/properties_game.py
+++ b/release/scripts/startup/bl_ui/properties_game.py
@@ -343,6 +343,7 @@ class RENDER_PT_game_performance(RenderButtonsPanel, Panel):
row = layout.row()
row.prop(gs, "use_frame_rate")
row.prop(gs, "use_display_lists")
+ row.prop(gs, "restrict_animation_updates")
class RENDER_PT_game_display(RenderButtonsPanel, Panel):
@@ -361,21 +362,6 @@ class RENDER_PT_game_display(RenderButtonsPanel, Panel):
flow.prop(gs, "show_mouse", text="Mouse Cursor")
-class RENDER_PT_game_sound(RenderButtonsPanel, Panel):
- bl_label = "Sound"
- COMPAT_ENGINES = {'BLENDER_GAME'}
-
- def draw(self, context):
- layout = self.layout
-
- scene = context.scene
-
- layout.prop(scene, "audio_distance_model")
-
- layout.prop(scene, "audio_doppler_speed", text="Speed")
- layout.prop(scene, "audio_doppler_factor")
-
-
class WorldButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
diff --git a/release/scripts/startup/bl_ui/properties_object_constraint.py b/release/scripts/startup/bl_ui/properties_object_constraint.py
index 867abe4dd5d..05fac2026a0 100644
--- a/release/scripts/startup/bl_ui/properties_object_constraint.py
+++ b/release/scripts/startup/bl_ui/properties_object_constraint.py
@@ -235,7 +235,6 @@ class ConstraintButtonsPanel():
row.label()
def LIMIT_ROTATION(self, context, layout, con):
-
split = layout.split()
col = split.column(align=True)
@@ -259,9 +258,7 @@ class ConstraintButtonsPanel():
sub.prop(con, "min_z", text="Min")
sub.prop(con, "max_z", text="Max")
- row = layout.row()
- row.prop(con, "use_transform_limit")
- row.label()
+ layout.prop(con, "use_transform_limit")
row = layout.row()
row.label(text="Convert:")
@@ -477,6 +474,10 @@ class ConstraintButtonsPanel():
row.label(text="Clamp Region:")
row.prop(con, "limit_mode", text="")
+ row = layout.row()
+ row.prop(con, "use_transform_limit")
+ row.label()
+
def STRETCH_TO(self, context, layout, con):
self.target_template(layout, con)
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
index 03243d1153b..6f58f060504 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -156,7 +156,7 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
if part:
split = layout.split(percentage=0.65)
if part.type == 'HAIR':
- if psys != None and psys.is_edited:
+ if psys is not None and psys.is_edited:
split.operator("particle.edited_clear", text="Free Edit")
else:
row = split.row()
@@ -166,12 +166,12 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
row = split.row()
row.enabled = particle_panel_enabled(context, psys)
row.prop(part, "hair_step")
- if psys != None and psys.is_edited:
+ if psys is not None and psys.is_edited:
if psys.is_global_hair:
layout.operator("particle.connect_hair")
else:
layout.operator("particle.disconnect_hair")
- elif psys != None and part.type == 'REACTOR':
+ elif psys is not None and part.type == 'REACTOR':
split.enabled = particle_panel_enabled(context, psys)
split.prop(psys, "reactor_target_object")
split.prop(psys, "reactor_target_particle_system", text="Particle System")
@@ -654,7 +654,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel):
if settings is None:
return False
- if psys != None and psys.point_cache.use_external:
+ if psys is not None and psys.point_cache.use_external:
return False
return settings.physics_type == 'BOIDS' and engine in cls.COMPAT_ENGINES
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index fb14372ebea..395cfc6934e 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -592,13 +592,9 @@ class RENDER_PT_encoding(RenderButtonsPanel, Panel):
if rd.ffmpeg_format not in {'MP3'}:
layout.prop(rd, "ffmpeg_audio_codec", text="Audio Codec")
- split = layout.split()
-
- col = split.column()
- col.prop(rd, "ffmpeg_audio_bitrate")
- col.prop(rd, "ffmpeg_audio_mixrate")
-
- split.prop(rd, "ffmpeg_audio_volume", slider=True)
+ row = layout.row()
+ row.prop(rd, "ffmpeg_audio_bitrate")
+ row.prop(rd, "ffmpeg_audio_volume", slider=True)
class RENDER_PT_bake(RenderButtonsPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py
index 6e96e1228e7..66f967bb6e1 100644
--- a/release/scripts/startup/bl_ui/properties_scene.py
+++ b/release/scripts/startup/bl_ui/properties_scene.py
@@ -44,6 +44,34 @@ class SCENE_PT_scene(SceneButtonsPanel, Panel):
layout.prop(scene, "background_set", text="Background")
+class SCENE_PT_audio(SceneButtonsPanel, Panel):
+ bl_label = "Audio"
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
+
+ def draw(self, context):
+ layout = self.layout
+ scene = context.scene
+ rd = context.scene.render
+
+ layout.prop(scene, "audio_volume")
+ layout.operator("sound.bake_animation")
+
+ split = layout.split()
+
+ col = split.column()
+ col.label("Listener:")
+ col.prop(scene, "audio_distance_model", text="")
+ col.prop(scene, "audio_doppler_speed", text="Speed")
+ col.prop(scene, "audio_doppler_factor", text="Doppler")
+
+ col = split.column()
+ col.label("Format:")
+ col.prop(rd, "ffmpeg_audio_channels", text="")
+ col.prop(rd, "ffmpeg_audio_mixrate", text="Rate")
+
+ layout.operator("sound.mixdown")
+
+
class SCENE_PT_unit(SceneButtonsPanel, Panel):
bl_label = "Units"
COMPAT_ENGINES = {'BLENDER_RENDER'}
diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py
index ead65b92c3f..34f5a948ee7 100644
--- a/release/scripts/startup/bl_ui/properties_texture.py
+++ b/release/scripts/startup/bl_ui/properties_texture.py
@@ -415,6 +415,10 @@ class TEXTURE_PT_image_sampling(TextureTypePanel, Panel):
row.active = tex.use_normal_map
row.prop(slot, "normal_map_space", text="")
+ row = col.row()
+ row.active = not tex.use_normal_map
+ row.prop(tex, "use_derivative_map")
+
col.prop(tex, "use_mipmap")
row = col.row()
row.active = tex.use_mipmap
@@ -1025,12 +1029,14 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
# only show bump settings if activated but not for normalmap images
row = layout.row()
- row.active = (tex.use_map_normal or tex.use_map_warp) and not (tex.texture.type == 'IMAGE' and tex.texture.use_normal_map)
- row.prop(tex, "bump_method", text="Method")
+ sub = row.row()
+ sub.active = (tex.use_map_normal or tex.use_map_warp) and not (tex.texture.type == 'IMAGE' and (tex.texture.use_normal_map or tex.texture.use_derivative_map))
+ sub.prop(tex, "bump_method", text="Method")
+ # the space setting is supported for: derivmaps + bumpmaps (DEFAULT,BEST_QUALITY), not for normalmaps
sub = row.row()
- sub.active = tex.bump_method in {'BUMP_DEFAULT', 'BUMP_BEST_QUALITY'}
+ sub.active = (tex.use_map_normal or tex.use_map_warp) and not (tex.texture.type == 'IMAGE' and tex.texture.use_normal_map) and ((tex.bump_method in {'BUMP_DEFAULT', 'BUMP_BEST_QUALITY'}) or (tex.texture.type == 'IMAGE' and tex.texture.use_derivative_map))
sub.prop(tex, "bump_objectspace", text="Space")
diff --git a/release/scripts/startup/bl_ui/space_console.py b/release/scripts/startup/bl_ui/space_console.py
index d457a66def8..cbbefa01a3c 100644
--- a/release/scripts/startup/bl_ui/space_console.py
+++ b/release/scripts/startup/bl_ui/space_console.py
@@ -41,7 +41,7 @@ class CONSOLE_MT_console(Menu):
def draw(self, context):
layout = self.layout
-
+
layout.operator("console.clear")
layout.operator("console.copy")
layout.operator("console.paste")
@@ -141,7 +141,11 @@ class ConsoleLanguage(Operator):
'''Set the current language for this console'''
bl_idname = "console.language"
bl_label = "Console Language"
- language = StringProperty(name="Language", maxlen=32, default="")
+
+ language = StringProperty(
+ name="Language",
+ maxlen=32,
+ )
def execute(self, context):
sc = context.space_data
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index dfbd7b3ae14..90dcc99e6d7 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -34,41 +34,10 @@ def dopesheet_filter(layout, context, genericFiltersOnly=False):
row.prop(dopesheet, "show_only_selected", text="")
row.prop(dopesheet, "show_hidden", text="")
- if not genericFiltersOnly:
- row = layout.row(align=True)
- row.prop(dopesheet, "show_transforms", text="")
-
- if is_nla:
- row.prop(dopesheet, "show_missing_nla", text="")
-
- row = layout.row(align=True)
- row.prop(dopesheet, "show_scenes", text="")
- row.prop(dopesheet, "show_worlds", text="")
- row.prop(dopesheet, "show_nodes", text="")
-
- if bpy.data.meshes:
- row.prop(dopesheet, "show_meshes", text="")
- if bpy.data.shape_keys:
- row.prop(dopesheet, "show_shapekeys", text="")
- if bpy.data.materials:
- row.prop(dopesheet, "show_materials", text="")
- if bpy.data.lamps:
- row.prop(dopesheet, "show_lamps", text="")
- if bpy.data.textures:
- row.prop(dopesheet, "show_textures", text="")
- if bpy.data.cameras:
- row.prop(dopesheet, "show_cameras", text="")
- if bpy.data.curves:
- row.prop(dopesheet, "show_curves", text="")
- if bpy.data.metaballs:
- row.prop(dopesheet, "show_metaballs", text="")
- if bpy.data.lattices:
- row.prop(dopesheet, "show_lattices", text="")
- if bpy.data.armatures:
- row.prop(dopesheet, "show_armatures", text="")
- if bpy.data.particles:
- row.prop(dopesheet, "show_particles", text="")
+ if is_nla:
+ row.prop(dopesheet, "show_missing_nla", text="")
+ if not genericFiltersOnly:
if bpy.data.groups:
row = layout.row(align=True)
row.prop(dopesheet, "show_only_group_objects", text="")
@@ -81,6 +50,42 @@ def dopesheet_filter(layout, context, genericFiltersOnly=False):
if dopesheet.show_only_matching_fcurves:
row.prop(dopesheet, "filter_fcurve_name", text="")
+ if not genericFiltersOnly:
+ row = layout.row(align=True)
+ row.prop(dopesheet, "show_datablock_filters", text="Filters")
+
+ if dopesheet.show_datablock_filters:
+ row.prop(dopesheet, "show_scenes", text="")
+ row.prop(dopesheet, "show_worlds", text="")
+ row.prop(dopesheet, "show_nodes", text="")
+
+ row.prop(dopesheet, "show_transforms", text="")
+
+ if bpy.data.meshes:
+ row.prop(dopesheet, "show_meshes", text="")
+ if bpy.data.shape_keys:
+ row.prop(dopesheet, "show_shapekeys", text="")
+ if bpy.data.materials:
+ row.prop(dopesheet, "show_materials", text="")
+ if bpy.data.lamps:
+ row.prop(dopesheet, "show_lamps", text="")
+ if bpy.data.textures:
+ row.prop(dopesheet, "show_textures", text="")
+ if bpy.data.cameras:
+ row.prop(dopesheet, "show_cameras", text="")
+ if bpy.data.curves:
+ row.prop(dopesheet, "show_curves", text="")
+ if bpy.data.metaballs:
+ row.prop(dopesheet, "show_metaballs", text="")
+ if bpy.data.lattices:
+ row.prop(dopesheet, "show_lattices", text="")
+ if bpy.data.armatures:
+ row.prop(dopesheet, "show_armatures", text="")
+ if bpy.data.particles:
+ row.prop(dopesheet, "show_particles", text="")
+ if bpy.data.speakers:
+ row.prop(dopesheet, "show_speakers", text="")
+
#######################################
# DopeSheet Editor - General/Standard UI
@@ -101,7 +106,7 @@ class DOPESHEET_HT_header(Header):
row.menu("DOPESHEET_MT_select")
row.menu("DOPESHEET_MT_marker")
- if st.mode == 'DOPESHEET' or (st.mode == 'ACTION' and st.action != None):
+ if st.mode == 'DOPESHEET' or (st.mode == 'ACTION' and st.action is not None):
row.menu("DOPESHEET_MT_channel")
elif st.mode == 'GPENCIL':
row.menu("DOPESHEET_MT_gpencil_channel")
@@ -277,7 +282,7 @@ class DOPESHEET_MT_key(Menu):
layout.operator("action.keyframe_insert")
layout.separator()
- layout.operator("action.duplicate")
+ layout.operator("action.duplicate_move")
layout.operator("action.delete")
layout.separator()
diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py
index c379ea95ea2..d4b8c415a7f 100644
--- a/release/scripts/startup/bl_ui/space_graph.py
+++ b/release/scripts/startup/bl_ui/space_graph.py
@@ -78,7 +78,7 @@ class GRAPH_MT_view(Menu):
layout.prop(st, "use_auto_merge_keyframes")
layout.separator()
- layout.prop(st, "use_fancy_drawing")
+ layout.prop(st, "use_beauty_drawing")
layout.separator()
if st.show_handles:
@@ -206,7 +206,7 @@ class GRAPH_MT_key(Menu):
layout.operator("graph.sound_bake")
layout.separator()
- layout.operator("graph.duplicate")
+ layout.operator("graph.duplicate_move")
layout.operator("graph.delete")
layout.separator()
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index 2042fa1729d..97b5d8457e0 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -452,7 +452,7 @@ class IMAGE_PT_game_properties(Panel):
split = layout.split()
col = split.column()
-
+
col.prop(ima, "use_animation")
sub = col.column(align=True)
sub.active = ima.use_animation
@@ -507,7 +507,7 @@ class IMAGE_PT_view_waveform(Panel):
layout = self.layout
sima = context.space_data
-
+
layout.template_waveform(sima, "scopes")
row = layout.split(percentage=0.75)
row.prop(sima.scopes, "waveform_alpha")
@@ -544,9 +544,9 @@ class IMAGE_PT_sample_line(Panel):
def draw(self, context):
layout = self.layout
-
+
sima = context.space_data
-
+
layout.operator("image.sample_line")
layout.template_histogram(sima, "sample_histogram")
layout.prop(sima.sample_histogram, "mode")
@@ -564,9 +564,9 @@ class IMAGE_PT_scope_sample(Panel):
def draw(self, context):
layout = self.layout
-
+
sima = context.space_data
-
+
row = layout.row()
row.prop(sima.scopes, "use_full_resolution")
sub = row.row()
@@ -613,14 +613,14 @@ class IMAGE_PT_view_properties(Panel):
col = layout.column()
col.label("Cursor Location:")
col.row().prop(uvedit, "cursor_location", text="")
-
+
col.separator()
-
+
col.label(text="UVs:")
col.row().prop(uvedit, "edge_draw_type", expand=True)
split = layout.split()
-
+
col = split.column()
col.prop(uvedit, "show_faces")
col.prop(uvedit, "show_smooth_edges", text="Smooth")
diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py
index 38c1e24f27e..7f5a5f231cf 100644
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@ -194,7 +194,7 @@ class INFO_MT_mesh_add(Menu):
def draw(self, context):
layout = self.layout
-
+
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("mesh.primitive_plane_add", icon='MESH_PLANE', text="Plane")
layout.operator("mesh.primitive_cube_add", icon='MESH_CUBE', text="Cube")
@@ -215,7 +215,7 @@ class INFO_MT_curve_add(Menu):
def draw(self, context):
layout = self.layout
-
+
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("curve.primitive_bezier_curve_add", icon='CURVE_BEZCURVE', text="Bezier")
layout.operator("curve.primitive_bezier_circle_add", icon='CURVE_BEZCIRCLE', text="Circle")
@@ -246,7 +246,7 @@ class INFO_MT_surface_add(Menu):
def draw(self, context):
layout = self.layout
-
+
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("surface.primitive_nurbs_surface_curve_add", icon='SURFACE_NCURVE', text="NURBS Curve")
layout.operator("surface.primitive_nurbs_surface_circle_add", icon='SURFACE_NCIRCLE', text="NURBS Circle")
@@ -262,7 +262,7 @@ class INFO_MT_armature_add(Menu):
def draw(self, context):
layout = self.layout
-
+
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("object.armature_add", text="Single Bone", icon='BONE_DATA')
@@ -292,6 +292,9 @@ class INFO_MT_add(Menu):
layout.operator("object.add", text="Empty", icon='OUTLINER_OB_EMPTY').type = 'EMPTY'
layout.separator()
+ layout.operator("object.speaker_add", text="Speaker", icon='OUTLINER_OB_SPEAKER')
+ layout.separator()
+
layout.operator("object.camera_add", text="Camera", icon='OUTLINER_OB_CAMERA')
layout.operator_context = 'EXEC_SCREEN'
layout.operator_menu_enum("object.lamp_add", "type", text="Lamp", icon='OUTLINER_OB_LAMP')
diff --git a/release/scripts/startup/bl_ui/space_nla.py b/release/scripts/startup/bl_ui/space_nla.py
index c69af2c9a60..ffead81c507 100644
--- a/release/scripts/startup/bl_ui/space_nla.py
+++ b/release/scripts/startup/bl_ui/space_nla.py
@@ -71,6 +71,10 @@ class NLA_MT_view(Menu):
layout.operator("anim.previewrange_clear")
layout.separator()
+ layout.operator("nla.view_all")
+ layout.operator("nla.view_selected")
+
+ layout.separator()
layout.operator("screen.area_dupli")
layout.operator("screen.screen_full_area")
@@ -162,6 +166,7 @@ class NLA_MT_add(Menu):
layout.operator("nla.actionclip_add")
layout.operator("nla.transition_add")
+ layout.operator("nla.soundclip_add")
layout.separator()
layout.operator("nla.meta_add")
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 84cc365425e..36f606da635 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -60,6 +60,7 @@ class SEQUENCER_HT_header(Header):
layout.separator()
layout.operator("sequencer.refresh_all")
+ layout.template_running_jobs()
elif st.view_type == 'SEQUENCER_PREVIEW':
layout.separator()
layout.operator("sequencer.refresh_all")
@@ -112,7 +113,11 @@ class SEQUENCER_MT_view(Menu):
layout.operator("sequencer.view_selected")
- layout.prop(st, "show_frames")
+ if st.show_frames:
+ layout.operator("anim.time_toggle", text="Show Seconds")
+ else:
+ layout.operator("anim.time_toggle", text="Show Frames")
+
layout.prop(st, "show_frame_indicator")
if st.display_mode == 'IMAGE':
layout.prop(st, "show_safe_margin")
@@ -241,6 +246,7 @@ class SEQUENCER_MT_strip(Menu):
layout.operator("sequencer.images_separate")
layout.operator("sequencer.offset_clear")
layout.operator("sequencer.deinterlace_selected_movies")
+ layout.operator("sequencer.rebuild_proxy")
layout.separator()
layout.operator("sequencer.duplicate")
@@ -578,6 +584,7 @@ class SEQUENCER_PT_input(SequencerButtonsPanel, Panel):
col = split.column()
col.prop(strip, "filepath", text="")
col.prop(strip, "mpeg_preseek", text="MPEG Preseek")
+ col.prop(strip, "streamindex", text="Stream Index")
# TODO, sound???
# end drawing filename
@@ -640,8 +647,10 @@ class SEQUENCER_PT_sound(SequencerButtonsPanel, Panel):
row.prop(strip.sound, "use_memory_cache")
+ layout.prop(strip, "waveform")
layout.prop(strip, "volume")
- layout.prop(strip, "attenuation")
+ layout.prop(strip, "pitch")
+ layout.prop(strip, "pan")
col = layout.column(align=True)
col.label(text="Trim Duration:")
@@ -746,7 +755,7 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel, Panel):
class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel):
- bl_label = "Proxy"
+ bl_label = "Proxy / Timecode"
@classmethod
def poll(cls, context):
@@ -772,12 +781,28 @@ class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel):
flow = layout.column_flow()
flow.prop(strip, "use_proxy_custom_directory")
flow.prop(strip, "use_proxy_custom_file")
- if strip.proxy: # TODO - need to add this somehow
+ if strip.proxy:
if strip.use_proxy_custom_directory and not strip.use_proxy_custom_file:
flow.prop(strip.proxy, "directory")
if strip.use_proxy_custom_file:
flow.prop(strip.proxy, "filepath")
+ row = layout.row()
+ row.prop(strip.proxy, "build_25")
+ row.prop(strip.proxy, "build_50")
+ row.prop(strip.proxy, "build_75")
+ row.prop(strip.proxy, "build_100")
+
+ col = layout.column()
+ col.label(text="Build JPEG quality")
+ col.prop(strip.proxy, "quality")
+
+ if strip.type == "MOVIE":
+ col = layout.column()
+ col.label(text="Use timecode index:")
+
+ col.prop(strip.proxy, "timecode")
+
class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel):
bl_label = "Scene Preview/Render"
diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py
index 300211a26bf..12e07c19ca1 100644
--- a/release/scripts/startup/bl_ui/space_text.py
+++ b/release/scripts/startup/bl_ui/space_text.py
@@ -172,7 +172,9 @@ class TEXT_MT_text(Menu):
st = context.space_data
text = st.text
+ layout.operator_context = 'EXEC_AREA'
layout.operator("text.new")
+ layout.operator_context = 'INVOKE_AREA'
layout.operator("text.open")
if text:
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 148338368fe..13edc3471d2 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -1106,7 +1106,10 @@ class WM_OT_addon_disable(Operator):
bl_idname = "wm.addon_disable"
bl_label = "Disable Add-On"
- module = StringProperty(name="Module", description="Module name of the addon to disable")
+ module = StringProperty(
+ name="Module",
+ description="Module name of the addon to disable",
+ )
def execute(self, context):
addon_utils.disable(self.module)
@@ -1118,16 +1121,35 @@ class WM_OT_addon_install(Operator):
bl_idname = "wm.addon_install"
bl_label = "Install Add-On..."
- overwrite = BoolProperty(name="Overwrite", description="Remove existing addons with the same ID", default=True)
+ overwrite = BoolProperty(
+ name="Overwrite",
+ description="Remove existing addons with the same ID",
+ default=True,
+ )
target = EnumProperty(
name="Target Path",
items=(('DEFAULT', "Default", ""),
- ('PREFS', "User Prefs", "")))
+ ('PREFS', "User Prefs", "")),
+ )
- filepath = StringProperty(name="File Path", description="File path to write file to")
- filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
- filter_python = BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
- filter_glob = StringProperty(default="*.py;*.zip", options={'HIDDEN'})
+ filepath = StringProperty(
+ name="File Path",
+ description="File path to write file to",
+ )
+ filter_folder = BoolProperty(
+ name="Filter folders",
+ default=True,
+ options={'HIDDEN'},
+ )
+ filter_python = BoolProperty(
+ name="Filter python",
+ default=True,
+ options={'HIDDEN'},
+ )
+ filter_glob = StringProperty(
+ default="*.py;*.zip",
+ options={'HIDDEN'},
+ )
@staticmethod
def _module_remove(path_addons, module):
@@ -1264,7 +1286,10 @@ class WM_OT_addon_remove(Operator):
bl_idname = "wm.addon_remove"
bl_label = "Remove Add-On"
- module = StringProperty(name="Module", description="Module name of the addon to remove")
+ module = StringProperty(
+ name="Module",
+ description="Module name of the addon to remove",
+ )
@staticmethod
def path_from_addon(module):
@@ -1312,7 +1337,10 @@ class WM_OT_addon_expand(Operator):
bl_idname = "wm.addon_expand"
bl_label = ""
- module = StringProperty(name="Module", description="Module name of the addon to expand")
+ module = StringProperty(
+ name="Module",
+ description="Module name of the addon to expand",
+ )
def execute(self, context):
module_name = self.module
diff --git a/release/scripts/startup/bl_ui/space_userpref_keymap.py b/release/scripts/startup/bl_ui/space_userpref_keymap.py
index 6a81ff5830e..9ed1591cbf3 100644
--- a/release/scripts/startup/bl_ui/space_userpref_keymap.py
+++ b/release/scripts/startup/bl_ui/space_userpref_keymap.py
@@ -533,12 +533,31 @@ class WM_OT_keyconfig_import(Operator):
bl_idname = "wm.keyconfig_import"
bl_label = "Import Key Configuration..."
- filepath = StringProperty(name="File Path", description="Filepath to write file to", default="keymap.py")
- filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
- filter_text = BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'})
- filter_python = BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
-
- keep_original = BoolProperty(name="Keep original", description="Keep original file after copying to configuration folder", default=True)
+ filepath = StringProperty(
+ name="File Path",
+ description="Filepath to write file to",
+ default="keymap.py",
+ )
+ filter_folder = BoolProperty(
+ name="Filter folders",
+ default=True,
+ options={'HIDDEN'},
+ )
+ filter_text = BoolProperty(
+ name="Filter text",
+ default=True,
+ options={'HIDDEN'},
+ )
+ filter_python = BoolProperty(
+ name="Filter python",
+ default=True,
+ options={'HIDDEN'},
+ )
+ keep_original = BoolProperty(
+ name="Keep original",
+ description="Keep original file after copying to configuration folder",
+ default=True,
+ )
def execute(self, context):
from os.path import basename
@@ -580,10 +599,26 @@ class WM_OT_keyconfig_export(Operator):
bl_idname = "wm.keyconfig_export"
bl_label = "Export Key Configuration..."
- filepath = StringProperty(name="File Path", description="Filepath to write file to", default="keymap.py")
- filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
- filter_text = BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'})
- filter_python = BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
+ filepath = StringProperty(
+ name="File Path",
+ description="Filepath to write file to",
+ default="keymap.py",
+ )
+ filter_folder = BoolProperty(
+ name="Filter folders",
+ default=True,
+ options={'HIDDEN'},
+ )
+ filter_text = BoolProperty(
+ name="Filter text",
+ default=True,
+ options={'HIDDEN'},
+ )
+ filter_python = BoolProperty(
+ name="Filter python",
+ default=True,
+ options={'HIDDEN'},
+ )
def execute(self, context):
if not self.filepath:
@@ -673,7 +708,10 @@ class WM_OT_keymap_restore(Operator):
bl_idname = "wm.keymap_restore"
bl_label = "Restore Key Map(s)"
- all = BoolProperty(name="All Keymaps", description="Restore all keymaps to default")
+ all = BoolProperty(
+ name="All Keymaps",
+ description="Restore all keymaps to default",
+ )
def execute(self, context):
wm = context.window_manager
@@ -693,7 +731,10 @@ class WM_OT_keyitem_restore(Operator):
bl_idname = "wm.keyitem_restore"
bl_label = "Restore Key Map Item"
- item_id = IntProperty(name="Item Identifier", description="Identifier of the item to remove")
+ item_id = IntProperty(
+ name="Item Identifier",
+ description="Identifier of the item to remove",
+ )
@classmethod
def poll(cls, context):
@@ -737,7 +778,10 @@ class WM_OT_keyitem_remove(Operator):
bl_idname = "wm.keyitem_remove"
bl_label = "Remove Key Map Item"
- item_id = IntProperty(name="Item Identifier", description="Identifier of the item to remove")
+ item_id = IntProperty(
+ name="Item Identifier",
+ description="Identifier of the item to remove",
+ )
@classmethod
def poll(cls, context):
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 1ae934732ed..c9817cdf905 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -180,6 +180,10 @@ class VIEW3D_MT_transform(Menu):
layout.operator("object.randomize_transform")
layout.operator("object.align")
+ layout.separator()
+
+ layout.operator("object.anim_transforms_to_deltas")
+
class VIEW3D_MT_mirror(Menu):
bl_label = "Mirror"
@@ -1261,11 +1265,15 @@ class VIEW3D_MT_pose_transform(Menu):
layout.operator("pose.transforms_clear", text="All")
+ layout.separator()
+
layout.operator("pose.loc_clear", text="Location")
layout.operator("pose.rot_clear", text="Rotation")
layout.operator("pose.scale_clear", text="Scale")
- layout.label(text="Origin")
+ layout.separator()
+
+ layout.operator("pose.user_transforms_clear", text="Reset unkeyed")
class VIEW3D_MT_pose_slide(Menu):
@@ -2075,9 +2083,11 @@ class VIEW3D_PT_view3d_properties(Panel):
col.prop(view, "lens")
col.label(text="Lock to Object:")
col.prop(view, "lock_object", text="")
- if view.lock_object and view.lock_object.type == 'ARMATURE':
- col.prop_search(view, "lock_bone", view.lock_object.data, "bones", text="")
- elif not view.lock_object:
+ lock_object = view.lock_object
+ if lock_object:
+ if lock_object.type == 'ARMATURE':
+ col.prop_search(view, "lock_bone", lock_object.data, "edit_bones" if lock_object.mode == 'EDIT' else "bones", text="")
+ else:
col.prop(view, "lock_cursor", text="Lock to Cursor")
col = layout.column()
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index cc1e9b0c204..23d896abdbb 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1051,7 +1051,7 @@ class VIEW3D_PT_tools_weightpaint(View3DPanel, Panel):
ob = context.active_object
col = layout.column()
- col.active = ob.vertex_groups.active != None
+ col.active = ob.vertex_groups.active is not None
col.operator("object.vertex_group_normalize_all", text="Normalize All")
col.operator("object.vertex_group_normalize", text="Normalize")
col.operator("object.vertex_group_invert", text="Invert")
diff --git a/release/scripts/startup/keyingsets_builtins.py b/release/scripts/startup/keyingsets_builtins.py
index dcc1afed74b..6b12c95e072 100644
--- a/release/scripts/startup/keyingsets_builtins.py
+++ b/release/scripts/startup/keyingsets_builtins.py
@@ -32,13 +32,14 @@ in lost (i.e. unkeyed) animation.
import bpy
import keyingsets_utils
+from bpy.types import KeyingSetInfo
###############################
# Built-In KeyingSets
# Location
-class BUILTIN_KSI_Location(bpy.types.KeyingSetInfo):
+class BUILTIN_KSI_Location(KeyingSetInfo):
bl_label = "Location"
# poll - use predefined callback for selected bones/objects
@@ -52,7 +53,7 @@ class BUILTIN_KSI_Location(bpy.types.KeyingSetInfo):
# Rotation
-class BUILTIN_KSI_Rotation(bpy.types.KeyingSetInfo):
+class BUILTIN_KSI_Rotation(KeyingSetInfo):
bl_label = "Rotation"
# poll - use predefined callback for selected bones/objects
@@ -66,7 +67,7 @@ class BUILTIN_KSI_Rotation(bpy.types.KeyingSetInfo):
# Scale
-class BUILTIN_KSI_Scaling(bpy.types.KeyingSetInfo):
+class BUILTIN_KSI_Scaling(KeyingSetInfo):
bl_label = "Scaling"
# poll - use predefined callback for selected bones/objects
@@ -82,7 +83,7 @@ class BUILTIN_KSI_Scaling(bpy.types.KeyingSetInfo):
# LocRot
-class BUILTIN_KSI_LocRot(bpy.types.KeyingSetInfo):
+class BUILTIN_KSI_LocRot(KeyingSetInfo):
bl_label = "LocRot"
# poll - use predefined callback for selected bones/objects
@@ -100,7 +101,7 @@ class BUILTIN_KSI_LocRot(bpy.types.KeyingSetInfo):
# LocScale
-class BUILTIN_KSI_LocScale(bpy.types.KeyingSetInfo):
+class BUILTIN_KSI_LocScale(KeyingSetInfo):
bl_label = "LocScale"
# poll - use predefined callback for selected bones/objects
@@ -118,7 +119,7 @@ class BUILTIN_KSI_LocScale(bpy.types.KeyingSetInfo):
# LocRotScale
-class BUILTIN_KSI_LocRotScale(bpy.types.KeyingSetInfo):
+class BUILTIN_KSI_LocRotScale(KeyingSetInfo):
bl_label = "LocRotScale"
# poll - use predefined callback for selected bones/objects
@@ -138,7 +139,7 @@ class BUILTIN_KSI_LocRotScale(bpy.types.KeyingSetInfo):
# RotScale
-class BUILTIN_KSI_RotScale(bpy.types.KeyingSetInfo):
+class BUILTIN_KSI_RotScale(KeyingSetInfo):
bl_label = "RotScale"
# poll - use predefined callback for selected bones/objects
@@ -158,7 +159,7 @@ class BUILTIN_KSI_RotScale(bpy.types.KeyingSetInfo):
# Location
-class BUILTIN_KSI_VisualLoc(bpy.types.KeyingSetInfo):
+class BUILTIN_KSI_VisualLoc(KeyingSetInfo):
bl_label = "Visual Location"
bl_options = {'INSERTKEY_VISUAL'}
@@ -174,7 +175,7 @@ class BUILTIN_KSI_VisualLoc(bpy.types.KeyingSetInfo):
# Rotation
-class BUILTIN_KSI_VisualRot(bpy.types.KeyingSetInfo):
+class BUILTIN_KSI_VisualRot(KeyingSetInfo):
bl_label = "Visual Rotation"
bl_options = {'INSERTKEY_VISUAL'}
@@ -190,7 +191,7 @@ class BUILTIN_KSI_VisualRot(bpy.types.KeyingSetInfo):
# VisualLocRot
-class BUILTIN_KSI_VisualLocRot(bpy.types.KeyingSetInfo):
+class BUILTIN_KSI_VisualLocRot(KeyingSetInfo):
bl_label = "Visual LocRot"
bl_options = {'INSERTKEY_VISUAL'}
@@ -212,7 +213,7 @@ class BUILTIN_KSI_VisualLocRot(bpy.types.KeyingSetInfo):
# Available
-class BUILTIN_KSI_Available(bpy.types.KeyingSetInfo):
+class BUILTIN_KSI_Available(KeyingSetInfo):
bl_label = "Available"
# poll - selected objects or selected object with animation data
@@ -234,7 +235,7 @@ class BUILTIN_KSI_Available(bpy.types.KeyingSetInfo):
# All properties that are likely to get animated in a character rig
-class BUILTIN_KSI_WholeCharacter(bpy.types.KeyingSetInfo):
+class BUILTIN_KSI_WholeCharacter(KeyingSetInfo):
bl_label = "Whole Character"
# these prefixes should be avoided, as they are not really bones
@@ -265,7 +266,7 @@ class BUILTIN_KSI_WholeCharacter(bpy.types.KeyingSetInfo):
# loc, rot, scale - only include unlocked ones
ksi.doLoc(ks, bone)
- if bone.rotation_mode in ('QUATERNION', 'AXIS_ANGLE'):
+ if bone.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
ksi.doRot4d(ks, bone)
else:
ksi.doRot3d(ks, bone)
@@ -365,7 +366,7 @@ class BUILTIN_KSI_WholeCharacter(bpy.types.KeyingSetInfo):
# Delta Location
-class BUILTIN_KSI_DeltaLocation(bpy.types.KeyingSetInfo):
+class BUILTIN_KSI_DeltaLocation(KeyingSetInfo):
bl_label = "Delta Location"
# poll - selected objects only (and only if active object in object mode)
@@ -390,7 +391,7 @@ class BUILTIN_KSI_DeltaLocation(bpy.types.KeyingSetInfo):
# Delta Rotation
-class BUILTIN_KSI_DeltaRotation(bpy.types.KeyingSetInfo):
+class BUILTIN_KSI_DeltaRotation(KeyingSetInfo):
bl_label = "Delta Rotation"
# poll - selected objects only (and only if active object in object mode)
@@ -423,7 +424,7 @@ class BUILTIN_KSI_DeltaRotation(bpy.types.KeyingSetInfo):
# Delta Scale
-class BUILTIN_KSI_DeltaScale(bpy.types.KeyingSetInfo):
+class BUILTIN_KSI_DeltaScale(KeyingSetInfo):
bl_label = "Delta Scale"
# poll - selected objects only (and only if active object in object mode)
diff --git a/release/scripts/templates/addon_add_object.py b/release/scripts/templates/addon_add_object.py
index 98517fd97a0..833ac600995 100644
--- a/release/scripts/templates/addon_add_object.py
+++ b/release/scripts/templates/addon_add_object.py
@@ -45,10 +45,12 @@ class OBJECT_OT_add_object(bpy.types.Operator, AddObjectHelper):
bl_description = "Create a new Mesh Object"
bl_options = {'REGISTER', 'UNDO'}
- scale = FloatVectorProperty(name='scale',
- default=(1.0, 1.0, 1.0),
- subtype='TRANSLATION',
- description='scaling')
+ scale = FloatVectorProperty(
+ name='scale',
+ default=(1.0, 1.0, 1.0),
+ subtype='TRANSLATION',
+ description='scaling',
+ )
def execute(self, context):
diff --git a/release/scripts/templates/operator_export.py b/release/scripts/templates/operator_export.py
index 4cf943a53b7..b1d53e6ee0c 100644
--- a/release/scripts/templates/operator_export.py
+++ b/release/scripts/templates/operator_export.py
@@ -24,22 +24,30 @@ class ExportSomeData(bpy.types.Operator, ExportHelper):
# ExportHelper mixin class uses this
filename_ext = ".txt"
- filter_glob = StringProperty(default="*.txt", options={'HIDDEN'})
+ filter_glob = StringProperty(
+ default="*.txt",
+ options={'HIDDEN'},
+ )
# List of operator properties, the attributes will be assigned
# to the class instance from the operator settings before calling.
- use_setting = BoolProperty(name="Example Boolean", description="Example Tooltip", default=True)
-
- type = EnumProperty(items=(('OPT_A', "First Option", "Description one"),
- ('OPT_B', "Second Option", "Description two."),
- ),
- name="Example Enum",
- description="Choose between two items",
- default='OPT_A')
+ use_setting = BoolProperty(
+ name="Example Boolean",
+ description="Example Tooltip",
+ default=True,
+ )
+
+ type = EnumProperty(
+ name="Example Enum",
+ description="Choose between two items",
+ items=(('OPT_A', "First Option", "Description one"),
+ ('OPT_B', "Second Option", "Description two.")),
+ default='OPT_A',
+ )
@classmethod
def poll(cls, context):
- return context.active_object != None
+ return context.active_object is not None
def execute(self, context):
return write_some_data(context, self.filepath, self.use_setting)
diff --git a/release/scripts/templates/operator_mesh_add.py b/release/scripts/templates/operator_mesh_add.py
index 10d23a6712d..d89b7e82f77 100644
--- a/release/scripts/templates/operator_mesh_add.py
+++ b/release/scripts/templates/operator_mesh_add.py
@@ -43,25 +43,38 @@ class AddBox(bpy.types.Operator):
bl_label = "Add Box"
bl_options = {'REGISTER', 'UNDO'}
- width = FloatProperty(name="Width",
+ width = FloatProperty(
+ name="Width",
description="Box Width",
- default=1.0, min=0.01, max=100.0)
-
- height = FloatProperty(name="Height",
+ min=0.01, max=100.0,
+ default=1.0,
+ )
+ height = FloatProperty(
+ name="Height",
description="Box Height",
- default=1.0, min=0.01, max=100.0)
-
- depth = FloatProperty(name="Depth",
+ min=0.01, max=100.0,
+ default=1.0,
+ )
+ depth = FloatProperty(
+ name="Depth",
description="Box Depth",
- default=1.0, min=0.01, max=100.0)
+ min=0.01, max=100.0,
+ default=1.0,
+ )
# generic transform props
- view_align = BoolProperty(name="Align to View",
- default=False)
- location = FloatVectorProperty(name="Location",
- subtype='TRANSLATION')
- rotation = FloatVectorProperty(name="Rotation",
- subtype='EULER')
+ view_align = BoolProperty(
+ name="Align to View",
+ default=False,
+ )
+ location = FloatVectorProperty(
+ name="Location",
+ subtype='TRANSLATION',
+ )
+ rotation = FloatVectorProperty(
+ name="Rotation",
+ subtype='EULER',
+ )
def execute(self, context):
diff --git a/release/scripts/templates/operator_modal_view3d.py b/release/scripts/templates/operator_modal_view3d.py
index 925449835ca..263bf72f129 100644
--- a/release/scripts/templates/operator_modal_view3d.py
+++ b/release/scripts/templates/operator_modal_view3d.py
@@ -8,7 +8,10 @@ class ViewOperator(bpy.types.Operator):
bl_idname = "view3d.modal_operator"
bl_label = "Simple View Operator"
- offset = FloatVectorProperty(name="Offset", size=3)
+ offset = FloatVectorProperty(
+ name="Offset",
+ size=3,
+ )
def execute(self, context):
v3d = context.space_data
diff --git a/release/scripts/templates/operator_simple.py b/release/scripts/templates/operator_simple.py
index 8348c7a95b1..05d9afc0ad1 100644
--- a/release/scripts/templates/operator_simple.py
+++ b/release/scripts/templates/operator_simple.py
@@ -13,7 +13,7 @@ class SimpleOperator(bpy.types.Operator):
@classmethod
def poll(cls, context):
- return context.active_object != None
+ return context.active_object is not None
def execute(self, context):
main(context)