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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2011-11-08 10:30:02 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2011-11-08 10:30:02 +0400
commit80e398e7b2cfbdf0192b11734cb02b378b423d65 (patch)
tree69bda0498a17f6a3ad5acb47465e1eef8a5e1faa /release
parent72cfdfec3083cbb756ff07c860293be9ca25f8b4 (diff)
parentf086201518b85f6dd2ae60ae37dc14f1d1406c01 (diff)
Merged changes in the trunk up to revision 41638.
Conflicts resolved: doc/python_api/sphinx_doc_gen.py source/blender/blenkernel/BKE_main.h source/blender/blenkernel/intern/library.c source/blender/blenloader/intern/readfile.c source/blender/blenloader/intern/writefile.c source/blender/editors/include/UI_resources.h source/blender/editors/interface/resources.c source/blender/makesdna/DNA_ID.h source/blender/makesdna/intern/makesdna.c source/blender/makesrna/intern/rna_internal.h source/blender/makesrna/intern/rna_main.c source/blender/makesrna/intern/rna_main_api.c source/blender/makesrna/intern/rna_scene.c
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/bpy/__init__.py2
-rw-r--r--release/scripts/modules/bpy/ops.py4
-rw-r--r--release/scripts/modules/bpy_extras/keyconfig_utils.py4
-rw-r--r--release/scripts/modules/bpyml_ui.py6
-rw-r--r--release/scripts/presets/camera/APS-C_DSLR.py4
-rw-r--r--release/scripts/presets/camera/Blender.py4
-rw-r--r--release/scripts/presets/camera/Canon_1100D.py4
-rw-r--r--release/scripts/presets/camera/Canon_1D.py4
-rw-r--r--release/scripts/presets/camera/Canon_1DS.py4
-rw-r--r--release/scripts/presets/camera/Canon_500D.py4
-rw-r--r--release/scripts/presets/camera/Canon_550D.py4
-rw-r--r--release/scripts/presets/camera/Canon_5D.py4
-rw-r--r--release/scripts/presets/camera/Canon_600D.py4
-rw-r--r--release/scripts/presets/camera/Canon_60D.py4
-rw-r--r--release/scripts/presets/camera/Canon_7D.py4
-rw-r--r--release/scripts/presets/camera/Nikon_D300S.py4
-rw-r--r--release/scripts/presets/camera/Nikon_D3100.py4
-rw-r--r--release/scripts/presets/camera/Nikon_D35.py4
-rw-r--r--release/scripts/presets/camera/Nikon_D5000.py4
-rw-r--r--release/scripts/presets/camera/Nikon_D5100.py4
-rw-r--r--release/scripts/presets/camera/Nikon_D7000.py4
-rw-r--r--release/scripts/presets/camera/Nikon_D90.py4
-rw-r--r--release/scripts/presets/camera/Red_Epic.py4
-rw-r--r--release/scripts/presets/camera/Red_One_2K.py4
-rw-r--r--release/scripts/presets/camera/Red_One_3K.py4
-rw-r--r--release/scripts/presets/camera/Red_One_4K.py4
-rw-r--r--release/scripts/presets/camera/full_frame_35mm_film.py4
-rw-r--r--release/scripts/presets/camera/micro_four_thirds.py4
-rw-r--r--release/scripts/presets/camera/super_16_film.py4
-rw-r--r--release/scripts/presets/camera/super_35_film.py4
-rw-r--r--release/scripts/presets/tracking_camera/Blender.py10
-rw-r--r--release/scripts/presets/tracking_camera/Canon_1100D.py10
-rw-r--r--release/scripts/presets/tracking_camera/Canon_1D.py10
-rw-r--r--release/scripts/presets/tracking_camera/Canon_1DS.py10
-rw-r--r--release/scripts/presets/tracking_camera/Canon_500D.py10
-rw-r--r--release/scripts/presets/tracking_camera/Canon_550D.py10
-rw-r--r--release/scripts/presets/tracking_camera/Canon_5D.py10
-rw-r--r--release/scripts/presets/tracking_camera/Canon_600D.py10
-rw-r--r--release/scripts/presets/tracking_camera/Canon_60D.py10
-rw-r--r--release/scripts/presets/tracking_camera/Canon_7D.py10
-rw-r--r--release/scripts/presets/tracking_camera/Nikon_D300S.py10
-rw-r--r--release/scripts/presets/tracking_camera/Nikon_D3100.py10
-rw-r--r--release/scripts/presets/tracking_camera/Nikon_D35.py10
-rw-r--r--release/scripts/presets/tracking_camera/Nikon_D5000.py10
-rw-r--r--release/scripts/presets/tracking_camera/Nikon_D5100.py10
-rw-r--r--release/scripts/presets/tracking_camera/Nikon_D7000.py10
-rw-r--r--release/scripts/presets/tracking_camera/Nikon_D90.py10
-rw-r--r--release/scripts/presets/tracking_camera/Red_Epic.py10
-rw-r--r--release/scripts/presets/tracking_camera/Red_One_2K.py10
-rw-r--r--release/scripts/presets/tracking_camera/Red_One_3K.py10
-rw-r--r--release/scripts/presets/tracking_camera/Red_One_4K.py10
-rw-r--r--release/scripts/presets/tracking_track_color/default.py5
-rw-r--r--release/scripts/presets/tracking_track_color/far_plane.py5
-rw-r--r--release/scripts/presets/tracking_track_color/near_plane.py5
-rw-r--r--release/scripts/startup/bl_operators/__init__.py1
-rw-r--r--release/scripts/startup/bl_operators/clip.py319
-rw-r--r--release/scripts/startup/bl_operators/image.py2
-rw-r--r--release/scripts/startup/bl_operators/object_quick_effects.py3
-rw-r--r--release/scripts/startup/bl_operators/presets.py60
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_smart_project.py18
-rw-r--r--release/scripts/startup/bl_operators/wm.py4
-rw-r--r--release/scripts/startup/bl_ui/__init__.py1
-rw-r--r--release/scripts/startup/bl_ui/properties_data_camera.py67
-rw-r--r--release/scripts/startup/bl_ui/properties_data_lamp.py4
-rw-r--r--release/scripts/startup/bl_ui/properties_game.py7
-rw-r--r--release/scripts/startup/bl_ui/properties_material.py6
-rw-r--r--release/scripts/startup/bl_ui/properties_object.py24
-rw-r--r--release/scripts/startup/bl_ui/properties_object_constraint.py20
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_cloth.py4
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_fluid.py4
-rw-r--r--release/scripts/startup/bl_ui/properties_render.py4
-rw-r--r--release/scripts/startup/bl_ui/properties_scene.py1
-rw-r--r--release/scripts/startup/bl_ui/properties_world.py2
-rw-r--r--release/scripts/startup/bl_ui/space_clip.py885
-rw-r--r--release/scripts/startup/bl_ui/space_dopesheet.py14
-rw-r--r--release/scripts/startup/bl_ui/space_filebrowser.py2
-rw-r--r--release/scripts/startup/bl_ui/space_graph.py12
-rw-r--r--release/scripts/startup/bl_ui/space_image.py14
-rw-r--r--release/scripts/startup/bl_ui/space_nla.py12
-rw-r--r--release/scripts/startup/bl_ui/space_node.py15
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py14
-rw-r--r--release/scripts/startup/bl_ui/space_time.py45
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py8
-rw-r--r--release/scripts/startup/bl_ui/space_userpref_keymap.py8
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py77
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py194
86 files changed, 1938 insertions, 258 deletions
diff --git a/release/scripts/modules/bpy/__init__.py b/release/scripts/modules/bpy/__init__.py
index 5fe5cfd7cf4..75572a6294e 100644
--- a/release/scripts/modules/bpy/__init__.py
+++ b/release/scripts/modules/bpy/__init__.py
@@ -54,6 +54,8 @@ def main():
# fake module to allow:
# from bpy.types import Panel
+ sys.modules["bpy.app"] = app
+ sys.modules["bpy.app.handlers"] = app.handlers
sys.modules["bpy.types"] = types
#~ if "-d" in sys.argv: # Enable this to measure start up speed
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/camera/APS-C_DSLR.py b/release/scripts/presets/camera/APS-C_DSLR.py
new file mode 100644
index 00000000000..829e03cc5cf
--- /dev/null
+++ b/release/scripts/presets/camera/APS-C_DSLR.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 22.3
+bpy.context.object.data.sensor_height = 14.9
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/Blender.py b/release/scripts/presets/camera/Blender.py
new file mode 100644
index 00000000000..9fa4ab752e3
--- /dev/null
+++ b/release/scripts/presets/camera/Blender.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 32
+bpy.context.object.data.sensor_height = 18
+bpy.context.object.data.sensor_fit = 'AUTO'
diff --git a/release/scripts/presets/camera/Canon_1100D.py b/release/scripts/presets/camera/Canon_1100D.py
new file mode 100644
index 00000000000..54f2cf75b54
--- /dev/null
+++ b/release/scripts/presets/camera/Canon_1100D.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 22.2
+bpy.context.object.data.sensor_height = 14.7
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/Canon_1D.py b/release/scripts/presets/camera/Canon_1D.py
new file mode 100644
index 00000000000..0bb0e910377
--- /dev/null
+++ b/release/scripts/presets/camera/Canon_1D.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 27.9
+bpy.context.object.data.sensor_height = 18.6
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/Canon_1DS.py b/release/scripts/presets/camera/Canon_1DS.py
new file mode 100644
index 00000000000..158a6235f32
--- /dev/null
+++ b/release/scripts/presets/camera/Canon_1DS.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 36.0
+bpy.context.object.data.sensor_height = 24.0
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/Canon_500D.py b/release/scripts/presets/camera/Canon_500D.py
new file mode 100644
index 00000000000..829e03cc5cf
--- /dev/null
+++ b/release/scripts/presets/camera/Canon_500D.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 22.3
+bpy.context.object.data.sensor_height = 14.9
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/Canon_550D.py b/release/scripts/presets/camera/Canon_550D.py
new file mode 100644
index 00000000000..829e03cc5cf
--- /dev/null
+++ b/release/scripts/presets/camera/Canon_550D.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 22.3
+bpy.context.object.data.sensor_height = 14.9
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/Canon_5D.py b/release/scripts/presets/camera/Canon_5D.py
new file mode 100644
index 00000000000..158a6235f32
--- /dev/null
+++ b/release/scripts/presets/camera/Canon_5D.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 36.0
+bpy.context.object.data.sensor_height = 24.0
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/Canon_600D.py b/release/scripts/presets/camera/Canon_600D.py
new file mode 100644
index 00000000000..829e03cc5cf
--- /dev/null
+++ b/release/scripts/presets/camera/Canon_600D.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 22.3
+bpy.context.object.data.sensor_height = 14.9
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/Canon_60D.py b/release/scripts/presets/camera/Canon_60D.py
new file mode 100644
index 00000000000..829e03cc5cf
--- /dev/null
+++ b/release/scripts/presets/camera/Canon_60D.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 22.3
+bpy.context.object.data.sensor_height = 14.9
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/Canon_7D.py b/release/scripts/presets/camera/Canon_7D.py
new file mode 100644
index 00000000000..829e03cc5cf
--- /dev/null
+++ b/release/scripts/presets/camera/Canon_7D.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 22.3
+bpy.context.object.data.sensor_height = 14.9
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/Nikon_D300S.py b/release/scripts/presets/camera/Nikon_D300S.py
new file mode 100644
index 00000000000..a0505bf9b9c
--- /dev/null
+++ b/release/scripts/presets/camera/Nikon_D300S.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 23.6
+bpy.context.object.data.sensor_height = 15.8
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/Nikon_D3100.py b/release/scripts/presets/camera/Nikon_D3100.py
new file mode 100644
index 00000000000..238d9c22d12
--- /dev/null
+++ b/release/scripts/presets/camera/Nikon_D3100.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 23.1
+bpy.context.object.data.sensor_height = 15.4
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/Nikon_D35.py b/release/scripts/presets/camera/Nikon_D35.py
new file mode 100644
index 00000000000..e6dc62dc100
--- /dev/null
+++ b/release/scripts/presets/camera/Nikon_D35.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 36.0
+bpy.context.object.data.sensor_height = 23.9
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/Nikon_D5000.py b/release/scripts/presets/camera/Nikon_D5000.py
new file mode 100644
index 00000000000..a0505bf9b9c
--- /dev/null
+++ b/release/scripts/presets/camera/Nikon_D5000.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 23.6
+bpy.context.object.data.sensor_height = 15.8
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/Nikon_D5100.py b/release/scripts/presets/camera/Nikon_D5100.py
new file mode 100644
index 00000000000..1d819cce65b
--- /dev/null
+++ b/release/scripts/presets/camera/Nikon_D5100.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 23.6
+bpy.context.object.data.sensor_height = 15.6
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/Nikon_D7000.py b/release/scripts/presets/camera/Nikon_D7000.py
new file mode 100644
index 00000000000..1d819cce65b
--- /dev/null
+++ b/release/scripts/presets/camera/Nikon_D7000.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 23.6
+bpy.context.object.data.sensor_height = 15.6
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/Nikon_D90.py b/release/scripts/presets/camera/Nikon_D90.py
new file mode 100644
index 00000000000..a0505bf9b9c
--- /dev/null
+++ b/release/scripts/presets/camera/Nikon_D90.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 23.6
+bpy.context.object.data.sensor_height = 15.8
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/Red_Epic.py b/release/scripts/presets/camera/Red_Epic.py
new file mode 100644
index 00000000000..14f4abaee90
--- /dev/null
+++ b/release/scripts/presets/camera/Red_Epic.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 30.0
+bpy.context.object.data.sensor_height = 15.0
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/Red_One_2K.py b/release/scripts/presets/camera/Red_One_2K.py
new file mode 100644
index 00000000000..ef2708f75b2
--- /dev/null
+++ b/release/scripts/presets/camera/Red_One_2K.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 11.1
+bpy.context.object.data.sensor_height = 6.24
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/Red_One_3K.py b/release/scripts/presets/camera/Red_One_3K.py
new file mode 100644
index 00000000000..5ddff2746eb
--- /dev/null
+++ b/release/scripts/presets/camera/Red_One_3K.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 16.65
+bpy.context.object.data.sensor_height = 9.36
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/Red_One_4K.py b/release/scripts/presets/camera/Red_One_4K.py
new file mode 100644
index 00000000000..8ab9b38cbd5
--- /dev/null
+++ b/release/scripts/presets/camera/Red_One_4K.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 22.2
+bpy.context.object.data.sensor_height = 12.6
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/full_frame_35mm_film.py b/release/scripts/presets/camera/full_frame_35mm_film.py
new file mode 100644
index 00000000000..d3e141ba4d9
--- /dev/null
+++ b/release/scripts/presets/camera/full_frame_35mm_film.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 36
+bpy.context.object.data.sensor_height = 24
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/micro_four_thirds.py b/release/scripts/presets/camera/micro_four_thirds.py
new file mode 100644
index 00000000000..36fb0aac391
--- /dev/null
+++ b/release/scripts/presets/camera/micro_four_thirds.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 17.3
+bpy.context.object.data.sensor_height = 13.0
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/super_16_film.py b/release/scripts/presets/camera/super_16_film.py
new file mode 100644
index 00000000000..1e42953bf05
--- /dev/null
+++ b/release/scripts/presets/camera/super_16_film.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 12.52
+bpy.context.object.data.sensor_height = 7.41
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/presets/camera/super_35_film.py b/release/scripts/presets/camera/super_35_film.py
new file mode 100644
index 00000000000..65ccb0f216c
--- /dev/null
+++ b/release/scripts/presets/camera/super_35_film.py
@@ -0,0 +1,4 @@
+import bpy
+bpy.context.object.data.sensor_width = 24.89
+bpy.context.object.data.sensor_height = 18.66
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
diff --git a/release/scripts/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 c1af1e8ab5e..8fb264eb411 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",
"freestyle",
"image",
diff --git a/release/scripts/startup/bl_operators/clip.py b/release/scripts/startup/bl_operators/clip.py
new file mode 100644
index 00000000000..55592621112
--- /dev/null
+++ b/release/scripts/startup/bl_operators/clip.py
@@ -0,0 +1,319 @@
+# ##### 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
+import os
+import shutil
+from bpy.types import Operator
+from bpy_extras.io_utils import unpack_list
+
+
+class CLIP_OT_track_to_empty(Operator):
+ """Create an Empty object which will be copying movement of active track"""
+
+ bl_idname = "clip.track_to_empty"
+ bl_label = "2D Track to Empty"
+ bl_options = {'UNDO', 'REGISTER'}
+
+ @classmethod
+ def poll(cls, context):
+ if context.space_data.type != 'CLIP_EDITOR':
+ return False
+
+ sc = context.space_data
+ clip = sc.clip
+
+ return clip and clip.tracking.tracks.active
+
+ def execute(self, context):
+ sc = context.space_data
+ clip = sc.clip
+ track = clip.tracking.tracks.active
+ constraint = None
+ ob = None
+
+ ob = bpy.data.objects.new(name=track.name, object_data=None)
+ ob.select = True
+ bpy.context.scene.objects.link(ob)
+ bpy.context.scene.objects.active = ob
+
+ for con in ob.constraints:
+ if con.type == 'FOLLOW_TRACK':
+ constraint = con
+ break
+
+ if constraint is None:
+ constraint = ob.constraints.new(type='FOLLOW_TRACK')
+
+ constraint.clip = sc.clip
+ constraint.track = track.name
+ constraint.reference = 'TRACK'
+
+ return {'FINISHED'}
+
+
+class CLIP_OT_bundles_to_mesh(Operator):
+ """Create vertex cloud using coordinates of bundles"""
+
+ bl_idname = "clip.bundles_to_mesh"
+ bl_label = "Bundles to Mesh"
+ bl_options = {'UNDO', 'REGISTER'}
+
+ @classmethod
+ def poll(cls, context):
+ if context.space_data.type != 'CLIP_EDITOR':
+ return False
+
+ sc = context.space_data
+ clip = sc.clip
+
+ return clip
+
+ def execute(self, context):
+ sc = context.space_data
+ clip = sc.clip
+
+ new_verts = []
+
+ mesh = bpy.data.meshes.new(name="Bundles")
+ for track in clip.tracking.tracks:
+ if track.has_bundle:
+ new_verts.append(track.bundle)
+
+ if new_verts:
+ mesh.vertices.add(len(new_verts))
+ mesh.vertices.foreach_set("co", unpack_list(new_verts))
+
+ ob = bpy.data.objects.new(name="Bundles", object_data=mesh)
+
+ bpy.context.scene.objects.link(ob)
+
+ return {'FINISHED'}
+
+
+class CLIP_OT_delete_proxy(Operator):
+ """Delete movie clip proxy files from the hard drive"""
+
+ bl_idname = "clip.delete_proxy"
+ bl_label = "Delete Proxy"
+ bl_options = {'UNDO', 'REGISTER'}
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+
+ return sc.clip
+
+ def invoke(self, context, event):
+ wm = context.window_manager
+
+ return wm.invoke_confirm(self, event)
+
+ def _rmproxy(self, abspath):
+ if not os.path.exists(abspath):
+ return
+
+ if os.path.isdir(abspath):
+ shutil.rmtree(abspath)
+ else:
+ os.remove(abspath)
+
+ def execute(self, context):
+ sc = context.space_data
+ clip = sc.clip
+ if clip.use_proxy_custom_directory:
+ proxydir = clip.proxy.directory
+ else:
+ clipdir = os.path.dirname(clip.filepath)
+ proxydir = os.path.join(clipdir, 'BL_proxy')
+
+ clipfile = os.path.basename(clip.filepath)
+ proxy = os.path.join(proxydir, clipfile)
+ absproxy = bpy.path.abspath(proxy)
+
+ # proxy_<quality>[_undostorted]
+ for x in (25, 50, 75, 100):
+ d = os.path.join(absproxy, 'proxy_' + str(x))
+
+ self._rmproxy(d)
+ self._rmproxy(d + '_undistorted')
+ self._rmproxy(os.path.join(absproxy, 'proxy_' + str(x) + '.avi'))
+
+ tc = ('free_run.blen_tc',
+ 'interp_free_run.blen_tc',
+ 'record_run.blen_tc')
+
+ for x in tc:
+ self._rmproxy(os.path.join(absproxy, x))
+
+ # remove proxy per-clip directory
+ try:
+ os.rmdir(absproxy)
+ except OSError:
+ pass
+
+ # remove [custom] proxy directory if empty
+ try:
+ absdir = bpy.path.abspath(proxydir)
+ os.rmdir(absdir)
+ except OSError:
+ pass
+
+ return {'FINISHED'}
+
+
+class CLIP_OT_set_viewport_background(Operator):
+ """Set current movie clip as a camera background in 3D viewport"""
+
+ bl_idname = "clip.set_viewport_background"
+ bl_label = "Set as Background"
+ bl_options = {'UNDO', 'REGISTER'}
+
+ @classmethod
+ def poll(cls, context):
+ if context.space_data.type != 'CLIP_EDITOR':
+ return False
+
+ sc = context.space_data
+
+ return sc.clip
+
+ def _set_background(self, space_v3d, clip, user):
+ bgpic = None
+
+ for x in space_v3d.background_images:
+ if x.source == 'MOVIE':
+ bgpic = x
+ break
+
+ if not bgpic:
+ bgpic = space_v3d.background_images.add()
+
+ bgpic.source = 'MOVIE'
+ bgpic.clip = clip
+ bgpic.clip_user.proxy_render_size = user.proxy_render_size
+ bgpic.clip_user.use_render_undistorted = user.use_render_undistorted
+ bgpic.use_camera_clip = False
+ bgpic.view_axis = 'CAMERA'
+
+ space_v3d.show_background_images = True
+
+ def execute(self, context):
+ sc = context.space_data
+ clip = sc.clip
+
+ for area in context.window.screen.areas:
+ if area.type == 'VIEW_3D':
+ for space in area.spaces:
+ if space.type == 'VIEW_3D':
+ self._set_background(space, clip, sc.clip_user)
+
+ return {'FINISHED'}
+
+
+class CLIP_OT_constraint_to_fcurve(Operator):
+ """Create F-Curves for object which will copy object's movement caused by this constraint"""
+
+ bl_idname = "clip.constraint_to_fcurve"
+ bl_label = "Constraint to F-Curve"
+ bl_options = {'UNDO', 'REGISTER'}
+
+ def _bake_object(self, scene, ob):
+ con = None
+ clip = None
+ sfra = None
+ efra = None
+ frame_current = scene.frame_current
+ matrices = []
+
+ # Find constraint which would eb converting
+ # TODO: several camera solvers and track followers would fail,
+ # but can't think about eal workflow where it'll be useful
+ for x in ob.constraints:
+ if x.type in ('CAMERA_SOLVER', 'FOLLOW_TRACK'):
+ con = x
+
+ if not con:
+ return
+
+ if con.type == 'FOLLOW_TRACK' and con.reference == 'BUNDLE':
+ mat = ob.matrix_world.copy()
+ ob.constraints.remove(con)
+ ob.matrix_world = mat
+
+ return
+
+ # Get clip used for parenting
+ if con.use_active_clip:
+ clip = scene.active_clip
+ else:
+ clip = con.clip
+
+ if not clip:
+ return
+
+ # Find start and end frames
+ for track in clip.tracking.tracks:
+ if sfra is None:
+ sfra = track.markers[0].frame
+ else:
+ sfra = min(sfra, track.markers[0].frame)
+
+ if efra is None:
+ efra = track.markers[-1].frame
+ else:
+ efra = max(efra, track.markers[-1].frame)
+
+ if sfra is None or efra is None:
+ return
+
+ # Store object matrices
+ for x in range(sfra, efra + 1):
+ scene.frame_set(x)
+ matrices.append(ob.matrix_world.copy())
+
+ ob.animation_data_create()
+
+ # Apply matrices on object and insert keyframes
+ i = 0
+ for x in range(sfra, efra + 1):
+ scene.frame_set(x)
+ ob.matrix_world = matrices[i]
+
+ ob.keyframe_insert("location")
+
+ if ob.rotation_mode == 'QUATERNION':
+ ob.keyframe_insert("rotation_quaternion")
+ else:
+ ob.keyframe_insert("rotation_euler")
+
+ i += 1
+
+ ob.constraints.remove(con)
+
+ scene.frame_set(frame_current)
+
+ def execute(self, context):
+ scene = context.scene
+
+ for ob in scene.objects:
+ if ob.select:
+ self._bake_object(scene, ob)
+
+ return {'FINISHED'}
diff --git a/release/scripts/startup/bl_operators/image.py b/release/scripts/startup/bl_operators/image.py
index 790c22d57d0..8c12a6442f7 100644
--- a/release/scripts/startup/bl_operators/image.py
+++ b/release/scripts/startup/bl_operators/image.py
@@ -192,6 +192,8 @@ class ProjectEdit(Operator):
image_new.file_format = 'PNG'
image_new.save()
+ filepath_final = bpy.path.abspath(filepath_final)
+
try:
bpy.ops.image.external_edit(filepath=filepath_final)
except RuntimeError as re:
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 2e42105fbf0..ac19bab4c66 100644
--- a/release/scripts/startup/bl_operators/presets.py
+++ b/release/scripts/startup/bl_operators/presets.py
@@ -195,6 +195,25 @@ class AddPresetRender(AddPresetBase, Operator):
preset_subdir = "render"
+class AddPresetCamera(AddPresetBase, Operator):
+ '''Add a Camera Preset'''
+ bl_idname = "camera.preset_add"
+ bl_label = "Add Camera Preset"
+ preset_menu = "CAMERA_MT_presets"
+
+ preset_defines = [
+ "cam = bpy.context.object.data"
+ ]
+
+ preset_values = [
+ "cam.sensor_width",
+ "cam.sensor_height",
+ "cam.sensor_fit"
+ ]
+
+ preset_subdir = "camera"
+
+
class AddPresetSSS(AddPresetBase, Operator):
'''Add a Subsurface Scattering Preset'''
bl_idname = "material.sss_preset_add"
@@ -300,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_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 0c9f1c33abb..aa661b76512 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -1371,9 +1371,9 @@ class WM_OT_keyitem_add(Operator):
km = context.keymap
if km.is_modal:
- km.keymap_items.new_modal("", 'A', 'PRESS') #~ kmi
+ km.keymap_items.new_modal("", 'A', 'PRESS')
else:
- km.keymap_items.new("none", 'A', 'PRESS') #~ kmi
+ km.keymap_items.new("none", 'A', 'PRESS')
# clear filter and expand keymap so we can see the newly added item
if context.space_data.filter_text != "":
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 5255af40951..1a0fb0ef4ac 100644
--- a/release/scripts/startup/bl_ui/properties_data_camera.py
+++ b/release/scripts/startup/bl_ui/properties_data_camera.py
@@ -33,6 +33,14 @@ class CameraButtonsPanel():
return context.camera and (engine in cls.COMPAT_ENGINES)
+class CAMERA_MT_presets(bpy.types.Menu):
+ bl_label = "Camera Presets"
+ preset_subdir = "camera"
+ preset_operator = "script.execute_preset"
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
+ draw = bpy.types.Menu.draw_preset
+
+
class DATA_PT_context_camera(CameraButtonsPanel, Panel):
bl_label = ""
bl_options = {'HIDE_HEADER'}
@@ -54,7 +62,7 @@ class DATA_PT_context_camera(CameraButtonsPanel, Panel):
split.separator()
-class DATA_PT_camera(CameraButtonsPanel, Panel):
+class DATA_PT_lens(CameraButtonsPanel, Panel):
bl_label = "Lens"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -69,12 +77,12 @@ class DATA_PT_camera(CameraButtonsPanel, Panel):
col = split.column()
if cam.type == 'PERSP':
+ row = col.row()
if cam.lens_unit == 'MILLIMETERS':
- col.prop(cam, "lens")
+ row.prop(cam, "lens")
elif cam.lens_unit == 'DEGREES':
- col.prop(cam, "angle")
- col = split.column()
- col.prop(cam, "lens_unit", text="")
+ row.prop(cam, "angle")
+ row.prop(cam, "lens_unit", text="")
elif cam.type == 'ORTHO':
col.prop(cam, "ortho_scale")
@@ -100,15 +108,54 @@ class DATA_PT_camera(CameraButtonsPanel, Panel):
col.prop(cam, "clip_start", text="Start")
col.prop(cam, "clip_end", text="End")
- layout.label(text="Depth of Field:")
+
+class DATA_PT_camera(CameraButtonsPanel, Panel):
+ bl_label = "Camera"
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
+
+ def draw(self, context):
+ layout = self.layout
+
+ cam = context.camera
+
+ row = layout.row(align=True)
+
+ row.menu("CAMERA_MT_presets", text=bpy.types.CAMERA_MT_presets.bl_label)
+ row.operator("camera.preset_add", text="", icon='ZOOMIN')
+ row.operator("camera.preset_add", text="", icon='ZOOMOUT').remove_active = True
+
+ layout.label(text="Sensor:")
+
+ split = layout.split()
+
+ col = split.column(align=True)
+ if cam.sensor_fit == 'AUTO':
+ col.prop(cam, "sensor_width", text="Size")
+ else:
+ col.prop(cam, "sensor_width", text="Width")
+ col.prop(cam, "sensor_height", text="Height")
+
+ col = split.column(align=True)
+ col.prop(cam, "sensor_fit", text="")
+
+
+class DATA_PT_camera_dof(CameraButtonsPanel, Panel):
+ bl_label = "Depth of Field"
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
+
+ def draw(self, context):
+ layout = self.layout
+
+ cam = context.camera
+
+ layout.label(text="Focus:")
split = layout.split()
split.prop(cam, "dof_object", text="")
col = split.column()
- if cam.dof_object is not None:
- col.enabled = False
+ col.active = cam.dof_object is None
col.prop(cam, "dof_distance", text="Distance")
@@ -127,10 +174,12 @@ class DATA_PT_camera_display(CameraButtonsPanel, Panel):
col.prop(cam, "show_limits", text="Limits")
col.prop(cam, "show_mist", text="Mist")
col.prop(cam, "show_title_safe", text="Title Safe")
+ col.prop(cam, "show_sensor", text="Sensor")
col.prop(cam, "show_name", text="Name")
- col.prop_menu_enum(cam, "show_guide")
col = split.column()
+ col.prop_menu_enum(cam, "show_guide")
+ col.separator()
col.prop(cam, "draw_size", text="Size")
col.separator()
col.prop(cam, "show_passepartout", text="Passepartout")
diff --git a/release/scripts/startup/bl_ui/properties_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 0779debb102..36b8129ad8a 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -257,10 +257,8 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
layout.prop(ob, "dupli_group", text="Group")
-# XXX: the following options are all quite buggy, ancient hacks that should be dropped
-
-class OBJECT_PT_animation(ObjectButtonsPanel, Panel):
- bl_label = "Animation Hacks"
+class OBJECT_PT_relations_extras(ObjectButtonsPanel, Panel):
+ bl_label = "Relations Extras"
bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
@@ -271,22 +269,16 @@ class OBJECT_PT_animation(ObjectButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Time Offset:")
- col.prop(ob, "use_time_offset_edit", text="Edit")
- row = col.row()
- row.prop(ob, "use_time_offset_parent", text="Parent")
- row.active = (ob.parent is not None)
- row = col.row()
- row.prop(ob, "use_slow_parent")
- row.active = (ob.parent is not None)
- col.prop(ob, "time_offset", text="Offset")
-
- # XXX: these are still used for a few curve-related tracking features
- col = split.column()
col.label(text="Tracking Axes:")
col.prop(ob, "track_axis", text="Axis")
col.prop(ob, "up_axis", text="Up Axis")
+ col = split.column()
+ col.prop(ob, "use_slow_parent")
+ row = col.row()
+ row.active = ((ob.parent is not None) and (ob.use_slow_parent))
+ row.prop(ob, "slow_parent_offset", text="Offset")
+
from bl_ui.properties_animviz import (
MotionPathButtonsPanel,
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 ce7433112d2..71f207f6e5a 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -669,8 +669,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/properties_world.py b/release/scripts/startup/bl_ui/properties_world.py
index 71ee03296a0..23f35d6d1e9 100644
--- a/release/scripts/startup/bl_ui/properties_world.py
+++ b/release/scripts/startup/bl_ui/properties_world.py
@@ -227,7 +227,7 @@ class WORLD_PT_mist(WorldButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.prop(world.mist_settings, "intensity", slider=True)
+ col.prop(world.mist_settings, "intensity")
col.prop(world.mist_settings, "start")
col = split.column()
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
new file mode 100644
index 00000000000..3148c0dd51a
--- /dev/null
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -0,0 +1,885 @@
+# ##### 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 bpy.types import Panel, Header, Menu
+
+
+class CLIP_HT_header(Header):
+ bl_space_type = 'CLIP_EDITOR'
+
+ def draw(self, context):
+ layout = self.layout
+
+ sc = context.space_data
+ clip = sc.clip
+
+ row = layout.row(align=True)
+ row.template_header()
+
+ if context.area.show_menus:
+ sub = row.row(align=True)
+ sub.menu("CLIP_MT_view")
+
+ if clip:
+ sub.menu("CLIP_MT_select")
+
+ sub.menu("CLIP_MT_clip")
+
+ if clip:
+ sub.menu("CLIP_MT_track")
+ sub.menu("CLIP_MT_reconstruction")
+
+ if clip:
+ layout.prop(sc, "mode", text="")
+ layout.prop(sc, "view", text="", expand=True)
+
+ if sc.view == 'GRAPH':
+ row = layout.row(align=True)
+
+ if sc.show_filters:
+ row.prop(sc, "show_filters", icon='DISCLOSURE_TRI_DOWN', text="Filters")
+ row.prop(sc, "show_graph_frames", icon='SEQUENCE', text="")
+ row.prop(sc, "show_graph_tracks", icon='ANIM', text="")
+ else:
+ row.prop(sc, "show_filters", icon='DISCLOSURE_TRI_RIGHT', text="Filters")
+
+ row = layout.row()
+ row.template_ID(sc, "clip", open='clip.open')
+
+ if clip:
+ r = clip.tracking.reconstruction
+
+ if r.is_valid:
+ layout.label(text="Average solve error: %.4f" %
+ (r.average_error))
+
+ layout.template_running_jobs()
+
+
+class CLIP_PT_tools_marker(Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'TOOLS'
+ bl_label = "Marker"
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+ clip = sc.clip
+
+ return clip and sc.mode == 'TRACKING'
+
+ def draw(self, context):
+ layout = self.layout
+
+ col = layout.column(align=True)
+ col.operator("clip.add_marker_move")
+ col.operator("clip.detect_features")
+ col.operator("clip.delete_track")
+
+
+class CLIP_PT_tools_tracking(Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'TOOLS'
+ bl_label = "Track"
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+ clip = sc.clip
+
+ return clip and sc.mode == 'TRACKING'
+
+ def draw(self, context):
+ layout = self.layout
+ clip = context.space_data.clip
+ settings = clip.tracking.settings
+
+ row = layout.row(align=True)
+
+ props = row.operator("clip.track_markers", text="", icon='FRAME_PREV')
+ props.backwards = True
+ props = row.operator("clip.track_markers", text="",
+ icon='PLAY_REVERSE')
+ props.backwards = True
+ props.sequence = True
+ props = row.operator("clip.track_markers", text="", icon='PLAY')
+ props.sequence = True
+ row.operator("clip.track_markers", text="", icon='FRAME_NEXT')
+
+ col = layout.column(align=True)
+ props = col.operator("clip.clear_track_path", text="Clear After")
+ props.action = 'REMAINED'
+
+ props = col.operator("clip.clear_track_path", text="Clear Before")
+ props.action = 'UPTO'
+
+ props = col.operator("clip.clear_track_path", text="Clear Track Path")
+ props.action = 'ALL'
+
+ layout.operator("clip.join_tracks")
+
+
+class CLIP_PT_tools_solving(Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'TOOLS'
+ bl_label = "Solving"
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+ clip = sc.clip
+
+ return clip and sc.mode == 'TRACKING'
+
+ def draw(self, context):
+ layout = self.layout
+ clip = context.space_data.clip
+ settings = clip.tracking.settings
+
+ col = layout.column(align=True)
+ col.operator("clip.solve_camera")
+ col.operator("clip.clear_solution")
+
+ col = layout.column(align=True)
+ col.prop(settings, "keyframe_a")
+ col.prop(settings, "keyframe_b")
+
+
+class CLIP_PT_tools_cleanup(Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'TOOLS'
+ bl_label = "Clean up"
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+ clip = sc.clip
+
+ return clip and sc.mode == 'TRACKING'
+
+ def draw(self, context):
+ layout = self.layout
+ clip = context.space_data.clip
+ settings = clip.tracking.settings
+
+ layout.operator("clip.clean_tracks")
+
+ layout.prop(settings, 'clean_frames', text="Frames")
+ layout.prop(settings, 'clean_error', text="Error")
+ layout.prop(settings, 'clean_action', text="")
+
+
+class CLIP_PT_tools_geometry(Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'TOOLS'
+ bl_label = "Geometry"
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+ clip = sc.clip
+
+ return clip and sc.mode == 'RECONSTRUCTION'
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("clip.bundles_to_mesh")
+ layout.operator("clip.track_to_empty")
+
+
+class CLIP_PT_tools_orientation(Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'TOOLS'
+ bl_label = "Orientation"
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+ clip = sc.clip
+
+ return clip and sc.mode == 'RECONSTRUCTION'
+
+ def draw(self, context):
+ sc = context.space_data
+ layout = self.layout
+ settings = sc.clip.tracking.settings
+
+ col = layout.column(align=True)
+ col.label(text="Scene Orientation:")
+ col.operator("clip.set_floor")
+ col.operator("clip.set_origin")
+
+ row = col.row()
+ row.operator("clip.set_axis", text="Set X Axis").axis = 'X'
+ row.operator("clip.set_axis", text="Set Y Axis").axis = 'Y'
+
+ layout.separator()
+
+ col = layout.column()
+ col.operator("clip.set_scale")
+ col.prop(settings, "distance")
+
+
+class CLIP_PT_tools_grease_pencil(Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'TOOLS'
+ bl_label = "Grease Pencil"
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+ clip = sc.clip
+
+ return clip and sc.mode == 'DISTORTION'
+
+ def draw(self, context):
+ layout = self.layout
+
+ col = layout.column(align=True)
+
+ row = col.row(align=True)
+ row.operator("gpencil.draw", text="Draw").mode = 'DRAW'
+ row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT'
+
+ row = col.row(align=True)
+ row.operator("gpencil.draw", text="Poly").mode = 'DRAW_POLY'
+ row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
+
+ row = col.row()
+ row.prop(context.tool_settings, "use_grease_pencil_sessions")
+
+
+class CLIP_PT_track(Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'UI'
+ bl_label = "Track"
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+ clip = sc.clip
+
+ return sc.mode == 'TRACKING' and clip
+
+ def draw(self, context):
+ layout = self.layout
+ sc = context.space_data
+ clip = context.space_data.clip
+ act_track = clip.tracking.tracks.active
+
+ if not act_track:
+ layout.active = False
+ layout.label(text="No active track")
+ return
+
+ row = layout.row()
+ row.prop(act_track, "name", text="")
+
+ sub = row.row(align=True)
+
+ sub.template_marker(sc, "clip", sc.clip_user, act_track, True)
+
+ icon = 'LOCKED' if act_track.lock else 'UNLOCKED'
+ sub.prop(act_track, "lock", text="", icon=icon)
+
+ layout.template_track(sc, "scopes")
+
+ row = layout.row(align=True)
+ row.prop(act_track, "use_red_channel", text="R", toggle=True)
+ row.prop(act_track, "use_green_channel", text="G", toggle=True)
+ row.prop(act_track, "use_blue_channel", text="B", toggle=True)
+
+ layout.separator()
+
+ row = layout.row(align=True)
+ label = bpy.types.CLIP_MT_track_color_presets.bl_label
+ row.menu('CLIP_MT_track_color_presets', text=label)
+ row.menu('CLIP_MT_track_color_specials', text="", icon='DOWNARROW_HLT')
+ row.operator("clip.track_color_preset_add", text="", icon='ZOOMIN')
+ props = row.operator("clip.track_color_preset_add",
+ text="", icon='ZOOMOUT')
+ props.remove_active = True
+
+ row = layout.row()
+ row.prop(act_track, "use_custom_color")
+ if act_track.use_custom_color:
+ row.prop(act_track, "color", text="")
+
+ if act_track.has_bundle:
+ label_text = "Average Error: %.4f" % (act_track.average_error)
+ layout.label(text=label_text)
+
+
+class CLIP_PT_tracking_camera(Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'UI'
+ bl_label = "Camera Data"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+
+ return sc.mode in ['TRACKING', 'DISTORTION'] and sc.clip
+
+ def draw(self, context):
+ layout = self.layout
+
+ sc = context.space_data
+ clip = sc.clip
+
+ row = layout.row(align=True)
+ label = bpy.types.CLIP_MT_camera_presets.bl_label
+ row.menu('CLIP_MT_camera_presets', text=label)
+ row.operator("clip.camera_preset_add", text="", icon='ZOOMIN')
+ props = row.operator("clip.camera_preset_add", text="", icon='ZOOMOUT')
+ props.remove_active = True
+
+ row = layout.row(align=True)
+ sub = row.split(percentage=0.65)
+ if clip.tracking.camera.units == 'MILLIMETERS':
+ sub.prop(clip.tracking.camera, "focal_length")
+ else:
+ sub.prop(clip.tracking.camera, "focal_length_pixels")
+ sub.prop(clip.tracking.camera, "units", text="")
+
+ col = layout.column(align=True)
+ col.label(text="Sensor:")
+ col.prop(clip.tracking.camera, "sensor_width", text="Width")
+ col.prop(clip.tracking.camera, "pixel_aspect")
+
+ col = layout.column()
+ col.label(text="Principal Point")
+ row = col.row()
+ row.prop(clip.tracking.camera, "principal", text="")
+ col.operator("clip.set_center_principal", text="Center")
+
+ col = layout.column(align=True)
+ col.label(text="Undistortion:")
+ col.prop(clip.tracking.camera, "k1")
+ col.prop(clip.tracking.camera, "k2")
+ col.prop(clip.tracking.camera, "k3")
+
+
+class CLIP_PT_display(Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'UI'
+ bl_label = "Display"
+
+ def draw(self, context):
+ layout = self.layout
+ sc = context.space_data
+
+ col = layout.column(align=True)
+
+ col.prop(sc, "show_marker_pattern", text="Pattern")
+ col.prop(sc, "show_marker_search", text="Search")
+ col.prop(sc, "show_pyramid_levels", text="Pyramid")
+
+ col.prop(sc, "show_track_path", text="Track Path")
+ row = col.row()
+ row.active = sc.show_track_path
+ row.prop(sc, "path_length", text="Length")
+
+ col.prop(sc, "show_disabled", "Disabled Tracks")
+ col.prop(sc, "show_bundles", text="Bundles")
+
+ col.prop(sc, "show_names", text="Track Names")
+ col.prop(sc, "show_tiny_markers", text="Tiny Markers")
+
+ col.prop(sc, "show_grease_pencil", text="Grease Pencil")
+ col.prop(sc, "use_mute_footage", text="Mute")
+
+ if sc.mode == 'DISTORTION':
+ col.prop(sc, "show_grid", text="Grid")
+ col.prop(sc, "use_manual_calibration")
+ elif sc.mode == 'RECONSTRUCTION':
+ col.prop(sc, "show_stable", text="Stable")
+
+ col.prop(sc, "lock_selection")
+
+ clip = sc.clip
+ if clip:
+ col.label(text="Display Aspect:")
+ col.prop(clip, "display_aspect", text="")
+
+
+class CLIP_PT_track_settings(Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'UI'
+ bl_label = "Tracking Settings"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+
+ return sc.mode == 'TRACKING' and sc.clip
+
+ def draw(self, context):
+ layout = self.layout
+ clip = context.space_data.clip
+ settings = clip.tracking.settings
+
+ active = clip.tracking.tracks.active
+ if active:
+ layout.prop(active, "tracker")
+ if active.tracker == 'KLT':
+ layout.prop(active, "pyramid_levels")
+ elif active.tracker == 'SAD':
+ layout.prop(active, "correlation_min")
+
+ layout.prop(settings, "frames_adjust")
+ layout.prop(settings, "speed")
+ layout.prop(settings, "frames_limit")
+ layout.prop(settings, "margin")
+
+
+class CLIP_PT_stabilization(Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'UI'
+ bl_label = "2D Stabilization"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+
+ return sc.mode == 'RECONSTRUCTION' and sc.clip
+
+ def draw_header(self, context):
+ sc = context.space_data
+ tracking = sc.clip.tracking
+ stab = tracking.stabilization
+
+ self.layout.prop(stab, "use_2d_stabilization", text="")
+
+ def draw(self, context):
+ layout = self.layout
+ sc = context.space_data
+ tracking = sc.clip.tracking
+ stab = tracking.stabilization
+
+ layout.active = stab.use_2d_stabilization
+
+ row = layout.row()
+ row.template_list(stab, "tracks", stab, "active_track_index", rows=3)
+
+ sub = row.column(align=True)
+
+ sub.operator("clip.stabilize_2d_add", icon='ZOOMIN', text="")
+ sub.operator("clip.stabilize_2d_remove", icon='ZOOMOUT', text="")
+
+ sub.menu('CLIP_MT_stabilize_2d_specials', text="",
+ icon='DOWNARROW_HLT')
+
+ layout.prop(stab, "influence_location")
+
+ layout.separator()
+
+ layout.prop(stab, "use_autoscale")
+ col = layout.column()
+ col.active = stab.use_autoscale
+ col.prop(stab, "scale_max")
+ col.prop(stab, "influence_scale")
+
+ layout.separator()
+
+ layout.label(text="Rotation:")
+
+ row = layout.row(align=True)
+ row.prop_search(stab, "rotation_track", tracking, "tracks", text="")
+ row.operator("clip.stabilize_2d_set_rotation", text="", icon='ZOOMIN')
+
+ row = layout.row()
+ row.active = stab.rotation_track is not None
+ row.prop(stab, "influence_rotation")
+
+
+class CLIP_PT_marker(Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'UI'
+ bl_label = "Marker"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+ clip = sc.clip
+
+ return sc.mode == 'TRACKING' and clip
+
+ def draw(self, context):
+ layout = self.layout
+ sc = context.space_data
+ clip = context.space_data.clip
+ act_track = clip.tracking.tracks.active
+
+ if act_track:
+ layout.template_marker(sc, "clip", sc.clip_user, act_track, False)
+ else:
+ layout.active = False
+ layout.label(text="No active track")
+
+
+class CLIP_PT_proxy(Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'UI'
+ bl_label = "Proxy / Timecode"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+
+ return sc.clip
+
+ def draw_header(self, context):
+ sc = context.space_data
+
+ self.layout.prop(sc.clip, "use_proxy", text="")
+
+ def draw(self, context):
+ layout = self.layout
+ sc = context.space_data
+ clip = sc.clip
+
+ layout.active = clip.use_proxy
+
+ layout.label(text="Build Sizes:")
+
+ row = layout.row()
+ row.prop(clip.proxy, "build_25")
+ row.prop(clip.proxy, "build_50")
+
+ row = layout.row()
+ row.prop(clip.proxy, "build_75")
+ row.prop(clip.proxy, "build_100")
+
+ layout.prop(clip.proxy, "build_undistorted")
+
+ layout.prop(clip.proxy, "quality")
+
+ layout.prop(clip, 'use_proxy_custom_directory')
+ if clip.use_proxy_custom_directory:
+ layout.prop(clip.proxy, "directory")
+
+ layout.operator("clip.rebuild_proxy", text="Rebuild Proxy")
+
+ if clip.source == 'MOVIE':
+ col = layout.column()
+
+ col.label(text="Use timecode index:")
+ col.prop(clip.proxy, "timecode", text="")
+
+ col = layout.column()
+ col.label(text="Proxy render size:")
+
+ col.prop(sc.clip_user, "proxy_render_size", text="")
+ col.prop(sc.clip_user, "use_render_undistorted")
+
+
+class CLIP_PT_footage(Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'UI'
+ bl_label = "Footage Settings"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+
+ return sc.clip
+
+ def draw(self, context):
+ layout = self.layout
+
+ sc = context.space_data
+ clip = sc.clip
+
+ if clip:
+ layout.template_movieclip(sc, "clip", compact=True)
+ else:
+ layout.operator("clip.open", icon='FILESEL')
+
+
+class CLIP_PT_tools_clip(Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'TOOLS'
+ bl_label = "Clip"
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+
+ return sc.clip
+
+ def draw(self, context):
+ layout = self.layout
+ clip = context.space_data.clip
+
+ layout.operator("clip.set_viewport_background")
+
+
+class CLIP_MT_view(Menu):
+ bl_label = "View"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("clip.properties", icon='MENU_PANEL')
+ layout.operator("clip.tools", icon='MENU_PANEL')
+ layout.separator()
+
+ layout.operator("clip.view_selected")
+ layout.operator("clip.view_all")
+
+ layout.separator()
+ layout.operator("clip.view_zoom_in")
+ layout.operator("clip.view_zoom_out")
+
+ layout.separator()
+
+ ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1))
+
+ for a, b in ratios:
+ text = "Zoom %d:%d" % (a, b)
+ layout.operator("clip.view_zoom_ratio", text=text).ratio = a / b
+
+ layout.separator()
+ layout.operator("screen.area_dupli")
+ layout.operator("screen.screen_full_area")
+
+
+class CLIP_MT_clip(Menu):
+ bl_label = "Clip"
+
+ def draw(self, context):
+ layout = self.layout
+
+ sc = context.space_data
+ clip = sc.clip
+
+ layout.operator("clip.open")
+
+ if clip:
+ layout.operator("clip.reload")
+ layout.menu("CLIP_MT_proxy")
+
+
+class CLIP_MT_proxy(Menu):
+ bl_label = "Proxy"
+
+ def draw(self, context):
+ layout = self.layout
+
+ sc = context.space_data
+ clip = sc.clip
+
+ layout.operator("clip.rebuild_proxy")
+ layout.operator("clip.delete_proxy")
+
+
+class CLIP_MT_track(Menu):
+ bl_label = "Track"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("clip.clear_solution")
+ layout.operator("clip.solve_camera")
+
+ layout.separator()
+ props = layout.operator("clip.clear_track_path", text="Clear After")
+ props.action = 'REMAINED'
+
+ props = layout.operator("clip.clear_track_path", text="Clear Before")
+ props.action = 'UPTO'
+
+ props = layout.operator("clip.clear_track_path", text="Clear Track Path")
+ props.action = 'ALL'
+
+ layout.separator()
+ layout.operator("clip.join_tracks")
+
+ layout.separator()
+ layout.operator("clip.clean_tracks")
+
+ layout.separator()
+ props = layout.operator("clip.track_markers",
+ text="Track Frame Backwards")
+ props.backwards = True
+
+ props = layout.operator("clip.track_markers", text="Track Backwards")
+ props.backwards = True
+ props.sequence = True
+
+ props = layout.operator("clip.track_markers", text="Track Forwards")
+ props.sequence = True
+ layout.operator("clip.track_markers", text="Track Frame Forwards")
+
+ layout.separator()
+ layout.operator("clip.delete_track")
+ layout.operator("clip.delete_marker")
+
+ layout.separator()
+ layout.operator("clip.add_marker_move")
+
+ layout.separator()
+ layout.menu("CLIP_MT_track_visibility")
+ layout.menu("CLIP_MT_track_transform")
+
+
+class CLIP_MT_reconstruction(Menu):
+ bl_label = "Reconstruction"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("clip.set_origin")
+ layout.operator("clip.set_floor")
+
+ layout.operator("clip.set_axis", text="Set X Asix").axis = "X"
+ layout.operator("clip.set_axis", text="Set Y Asix").axis = "Y"
+
+ layout.operator("clip.set_scale")
+
+ layout.separator()
+
+ layout.operator("clip.track_to_empty")
+ layout.operator("clip.bundles_to_mesh")
+
+
+class CLIP_MT_track_visibility(Menu):
+ bl_label = "Show/Hide"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("clip.hide_tracks_clear", text="Show Hidden")
+ layout.operator("clip.hide_tracks", text="Hide Selected")
+
+ props = layout.operator("clip.hide_tracks", text="Hide Unselected")
+ props.unselected = True
+
+
+class CLIP_MT_track_transform(Menu):
+ bl_label = "Transform"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("transform.translate")
+ layout.operator("transform.resize")
+
+
+class CLIP_MT_select(Menu):
+ bl_label = "Select"
+
+ def draw(self, context):
+ layout = self.layout
+
+ sc = context.space_data
+
+ layout.operator("clip.select_border")
+ layout.operator("clip.select_circle")
+
+ layout.separator()
+
+ layout.operator("clip.select_all", text="Select/Deselect all")
+ layout.operator("clip.select_all", text="Inverse").action = 'INVERT'
+
+ layout.menu("CLIP_MT_select_grouped")
+
+
+class CLIP_MT_select_grouped(Menu):
+ bl_label = "Select Grouped"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator_enum("clip.select_grouped", "group")
+
+
+class CLIP_MT_tracking_specials(Menu):
+ bl_label = "Specials"
+
+ @classmethod
+ def poll(cls, context):
+ return context.space_data.clip
+
+ def draw(self, context):
+ layout = self.layout
+
+ props = layout.operator("clip.disable_markers", text="Enable Markers")
+ props.action = 'ENABLE'
+
+ props = layout.operator("clip.disable_markers", text="Disable markers")
+ props.action = 'DISABLE'
+
+ layout.separator()
+ layout.operator("clip.set_origin")
+
+ layout.separator()
+ layout.operator("clip.hide_tracks")
+ layout.operator("clip.hide_tracks_clear", text="Show Tracks")
+
+ layout.separator()
+ props = layout.operator("clip.lock_tracks", text="Lock Tracks")
+ props.action = 'LOCK'
+
+ props = layout.operator("clip.lock_tracks", text="Unlock Tracks")
+ props.action = 'UNLOCK'
+
+
+class CLIP_MT_camera_presets(Menu):
+ bl_label = "Camera Presets"
+ preset_subdir = "tracking_camera"
+ preset_operator = "script.execute_preset"
+ draw = bpy.types.Menu.draw_preset
+
+
+class CLIP_MT_track_color_presets(Menu):
+ bl_label = "Color Presets"
+ preset_subdir = "tracking_track_color"
+ preset_operator = "script.execute_preset"
+ draw = bpy.types.Menu.draw_preset
+
+
+class CLIP_MT_track_color_specials(Menu):
+ bl_label = "Track Color Specials"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator('clip.track_copy_color', icon='COPY_ID')
+
+
+class CLIP_MT_stabilize_2d_specials(Menu):
+ bl_label = "Track Color Specials"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator('clip.stabilize_2d_select')
+
+if __name__ == "__main__": # only for live edit.
+ bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index 90dcc99e6d7..106bbd85717 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -213,18 +213,10 @@ class DOPESHEET_MT_marker(Menu):
def draw(self, context):
layout = self.layout
- st = context.space_data
-
- #layout.operator_context = 'EXEC_REGION_WIN'
-
- layout.operator("marker.add", "Add Marker")
- layout.operator("marker.duplicate", text="Duplicate Marker")
- layout.operator("marker.delete", text="Delete Marker")
+ from .space_time import marker_menu_generic
+ marker_menu_generic(layout)
- layout.separator()
-
- layout.operator("marker.rename", text="Rename Marker")
- layout.operator("marker.move", text="Grab/Move Marker")
+ st = context.space_data
if st.mode in {'ACTION', 'SHAPEKEY'} and st.action:
layout.separator()
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_graph.py b/release/scripts/startup/bl_ui/space_graph.py
index d4b8c415a7f..b57d421dfaf 100644
--- a/release/scripts/startup/bl_ui/space_graph.py
+++ b/release/scripts/startup/bl_ui/space_graph.py
@@ -144,16 +144,8 @@ class GRAPH_MT_marker(Menu):
def draw(self, context):
layout = self.layout
- #layout.operator_context = 'EXEC_REGION_WIN'
-
- layout.operator("marker.add", "Add Marker")
- layout.operator("marker.duplicate", text="Duplicate Marker")
- layout.operator("marker.delete", text="Delete Marker")
-
- layout.separator()
-
- layout.operator("marker.rename", text="Rename Marker")
- layout.operator("marker.move", text="Grab/Move Marker")
+ from .space_time import marker_menu_generic
+ marker_menu_generic(layout)
# TODO: pose markers for action edit mode only?
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_nla.py b/release/scripts/startup/bl_ui/space_nla.py
index ffead81c507..c878c20c8a7 100644
--- a/release/scripts/startup/bl_ui/space_nla.py
+++ b/release/scripts/startup/bl_ui/space_nla.py
@@ -104,16 +104,8 @@ class NLA_MT_marker(Menu):
def draw(self, context):
layout = self.layout
- #layout.operator_context = 'EXEC_REGION_WIN'
-
- layout.operator("marker.add", "Add Marker")
- layout.operator("marker.duplicate", text="Duplicate Marker")
- layout.operator("marker.delete", text="Delete Marker")
-
- layout.separator()
-
- layout.operator("marker.rename", text="Rename Marker")
- layout.operator("marker.move", text="Grab/Move Marker")
+ from .space_time import marker_menu_generic
+ marker_menu_generic(layout)
class NLA_MT_edit(Menu):
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index 708017ba749..69766b54e97 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -27,6 +27,7 @@ class NODE_HT_header(Header):
def draw(self, context):
layout = self.layout
+ scene = context.scene
snode = context.space_data
snode_id = snode.id
id_from = snode.id_from
@@ -42,11 +43,15 @@ class NODE_HT_header(Header):
layout.prop(snode, "tree_type", text="", expand=True)
- if snode.tree_type == 'MATERIAL':
- if id_from:
- layout.template_ID(id_from, "active_material", new="material.new")
- if snode_id:
- layout.prop(snode_id, "use_nodes")
+ if snode.tree_type == 'SHADER':
+ if scene.render.use_shading_nodes:
+ layout.prop(snode, "shader_type", text="", expand=True)
+
+ if not scene.render.use_shading_nodes or snode.shader_type == 'OBJECT':
+ if id_from:
+ layout.template_ID(id_from, "active_material", new="material.new")
+ if snode_id:
+ layout.prop(snode_id, "use_nodes")
elif snode.tree_type == 'TEXTURE':
layout.prop(snode, "texture_type", text="", expand=True)
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 2e957effccd..a4dcf64b679 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -158,18 +158,8 @@ class SEQUENCER_MT_marker(Menu):
def draw(self, context):
layout = self.layout
- #layout.operator_context = 'EXEC_REGION_WIN'
-
- layout.operator("marker.add", "Add Marker")
- layout.operator("marker.duplicate", text="Duplicate Marker")
- layout.operator("marker.delete", text="Delete Marker")
-
- layout.separator()
-
- layout.operator("marker.rename", text="Rename Marker")
- layout.operator("marker.move", text="Grab/Move Marker")
-
- #layout.operator("sequencer.sound_strip_add", text="Transform Markers") # toggle, will be rna - (sseq->flag & SEQ_MARKER_TRANS)
+ from .space_time import marker_menu_generic
+ marker_menu_generic(layout)
class SEQUENCER_MT_change(Menu):
diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py
index db009fe43c2..5209e8be597 100644
--- a/release/scripts/startup/bl_ui/space_time.py
+++ b/release/scripts/startup/bl_ui/space_time.py
@@ -36,6 +36,7 @@ class TIME_HT_header(Header):
if context.area.show_menus:
row.menu("TIME_MT_view")
+ row.menu("TIME_MT_marker")
row.menu("TIME_MT_frame")
row.menu("TIME_MT_playback")
@@ -91,6 +92,15 @@ class TIME_HT_header(Header):
row.operator("anim.keyframe_delete", text="", icon='KEY_DEHLT')
+class TIME_MT_marker(bpy.types.Menu):
+ bl_label = "Marker"
+
+ def draw(self, context):
+ layout = self.layout
+
+ marker_menu_generic(layout)
+
+
class TIME_MT_view(Menu):
bl_label = "View"
@@ -142,17 +152,6 @@ class TIME_MT_frame(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("marker.add", text="Add Marker")
- layout.operator("marker.duplicate", text="Duplicate Marker")
- layout.operator("marker.delete", text="Delete Marker")
-
- layout.separator()
-
- layout.operator("marker.rename", text="Rename Marker")
- layout.operator("marker.move", text="Grab/Move Marker")
-
- layout.separator()
-
layout.operator("time.start_frame_set")
layout.operator("time.end_frame_set")
@@ -178,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()
@@ -197,5 +197,28 @@ class TIME_MT_autokey(Menu):
layout.prop_enum(tools, "auto_keying_mode", 'ADD_REPLACE_KEYS')
layout.prop_enum(tools, "auto_keying_mode", 'REPLACE_KEYS')
+
+def marker_menu_generic(layout):
+
+ #layout.operator_context = 'EXEC_REGION_WIN'
+
+ layout.column()
+ layout.operator("marker.add", "Add Marker")
+ layout.operator("marker.duplicate", text="Duplicate Marker")
+
+ if(len(bpy.data.scenes) > 10):
+ layout.operator_context = 'INVOKE_DEFAULT'
+ layout.operator("marker.make_links_scene", text="Duplicate Marker to Scene...", icon='OUTLINER_OB_EMPTY')
+ else:
+ layout.operator_menu_enum("marker.make_links_scene", "scene", text="Duplicate Marker to Scene...")
+
+ layout.operator("marker.delete", text="Delete Marker")
+
+ layout.separator()
+
+ layout.operator("marker.rename", text="Rename Marker")
+ layout.operator("marker.move", text="Grab/Move Marker")
+
+
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)
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 c0a2e671ab5..e5eccb4d940 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -976,10 +976,8 @@ class VIEW3D_MT_make_links(Menu):
if(len(bpy.data.scenes) > 10):
layout.operator_context = 'INVOKE_DEFAULT'
layout.operator("object.make_links_scene", text="Objects to Scene...", icon='OUTLINER_OB_EMPTY')
- layout.operator("object.make_links_scene", text="Markers to Scene...", icon='OUTLINER_OB_EMPTY')
else:
layout.operator_menu_enum("object.make_links_scene", "scene", text="Objects to Scene...")
- layout.operator_menu_enum("marker.make_links_scene", "scene", text="Markers to Scene...")
layout.operator_enum("object.make_links_data", "type") # inline
@@ -1086,6 +1084,7 @@ class VIEW3D_MT_paint_weight(Menu):
layout.operator("object.vertex_group_normalize_all", text="Normalize All")
layout.operator("object.vertex_group_normalize", text="Normalize")
+ layout.operator("object.vertex_group_mirror", text="Mirror")
layout.operator("object.vertex_group_invert", text="Invert")
layout.operator("object.vertex_group_clean", text="Clean")
layout.operator("object.vertex_group_levels", text="Levels")
@@ -1537,7 +1536,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"),
@@ -2074,7 +2073,22 @@ class VIEW3D_PT_view3d_properties(Panel):
subcol.label(text="Local Camera:")
subcol.prop(view, "camera", text="")
- layout.column().prop(view, "cursor_location")
+
+class VIEW3D_PT_view3d_cursor(Panel):
+ bl_space_type = 'VIEW_3D'
+ bl_region_type = 'UI'
+ bl_label = "3D Cursor"
+
+ @classmethod
+ def poll(cls, context):
+ view = context.space_data
+ return (view)
+
+ def draw(self, context):
+ layout = self.layout
+
+ view = context.space_data
+ layout.column().prop(view, "cursor_location", text="Location")
class VIEW3D_PT_view3d_name(Panel):
@@ -2152,10 +2166,21 @@ class VIEW3D_PT_view3d_display(Panel):
subsub.active = scene.unit_settings.system == 'NONE'
subsub.prop(view, "grid_subdivisions", text="Subdivisions")
- col = layout.column()
- col.label(text="Shading:")
- col.prop(gs, "material_mode", text="")
- col.prop(view, "show_textured_solid")
+ if not scene.render.use_shading_nodes:
+ col = layout.column()
+ col.label(text="Shading:")
+ col.prop(gs, "material_mode", text="")
+ col.prop(view, "show_textured_solid")
+
+ 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()
@@ -2266,8 +2291,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
@@ -2276,10 +2303,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 a78992d4a07..5bcdbc1efe8 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -173,24 +173,30 @@ class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel):
bl_context = "mesh_edit"
bl_label = "Mesh Options"
+ @classmethod
+ def poll(cls, context):
+ return context.active_object
+
def draw(self, context):
layout = self.layout
ob = context.active_object
- if ob:
- mesh = ob.data
- col = layout.column(align=True)
- col.prop(mesh, "use_mirror_x")
- sub = col.column()
- sub.active = ob.data.use_mirror_x
- sub.prop(mesh, "use_mirror_topology")
+ tool_settings = context.tool_settings
+ mesh = ob.data
- ts = context.tool_settings
+ col = layout.column(align=True)
+ col.active = tool_settings.proportional_edit == 'DISABLED'
+ col.prop(mesh, "use_mirror_x")
- col.label("Edge Select Mode")
- col.prop(ts, "edge_path_mode", text="")
- col.prop(context.tool_settings, "edge_path_live_unwrap")
+ row = col.row()
+ row.active = ob.data.use_mirror_x
+ row.prop(mesh, "use_mirror_topology")
+
+ col = layout.column(align=True)
+ col.label("Edge Select Mode:")
+ col.prop(tool_settings, "edge_path_mode", text="")
+ col.prop(tool_settings, "edge_path_live_unwrap")
# ********** default tools for editmode_curve ****************
@@ -209,7 +215,7 @@ class VIEW3D_PT_tools_curveedit(View3DPanel, Panel):
col.operator("transform.resize", text="Scale")
col = layout.column(align=True)
- col.operator("transform.transform", text="Tilt").mode = 'TILT'
+ col.operator("transform.tilt", text="Tilt")
col.operator("transform.transform", text="Shrink/Fatten").mode = 'CURVE_SHRINKFATTEN'
col = layout.column(align=True)
@@ -481,12 +487,9 @@ class VIEW3D_PT_tools_brush(PaintPanel, Panel):
col.template_ID_preview(settings, "brush", new="brush.add", rows=3, cols=8)
# Particle Mode #
-
- # XXX This needs a check if psys is editable.
if context.particle_edit_object:
tool = settings.tool
- # XXX Select Particle System
layout.column().prop(settings, "tool", expand=True)
if tool != 'NONE':
@@ -711,19 +714,14 @@ class VIEW3D_PT_tools_brush_texture(PaintPanel, Panel):
if context.sculpt_object:
#XXX duplicated from properties_texture.py
- col.separator()
-
col.label(text="Brush Mapping:")
- row = col.row(align=True)
- row.prop(tex_slot, "map_mode", expand=True)
+ col.row().prop(tex_slot, "map_mode", expand=True)
col.separator()
col = layout.column()
col.active = tex_slot.map_mode in {'FIXED'}
col.label(text="Angle:")
-
- col = layout.column()
if not brush.use_anchor and brush.sculpt_tool not in {'GRAB', 'SNAKE_HOOK', 'THUMB', 'ROTATE'} and tex_slot.map_mode in {'FIXED'}:
col.prop(brush, "texture_angle_source_random", text="")
else:
@@ -740,47 +738,33 @@ class VIEW3D_PT_tools_brush_texture(PaintPanel, Panel):
#col.prop(brush, "use_rake", toggle=True, icon='PARTICLEMODE', text="")
col = layout.column()
- col.prop(tex_slot, "angle", text="")
col.active = tex_slot.map_mode in {'FIXED', 'TILED'}
+ col.prop(tex_slot, "angle", text="")
#col = layout.column()
#col.prop(brush, "use_random_rotation")
#col.active = (not brush.use_rake) and (not brush.use_anchor) and (brush.sculpt_tool not in {'GRAB', 'SNAKE_HOOK', 'THUMB', 'ROTATE'}) and tex_slot.map_mode in {'FIXED'}
split = layout.split()
+ split.prop(tex_slot, "offset")
+ split.prop(tex_slot, "scale")
- col = split.column()
- col.prop(tex_slot, "offset")
-
- col = split.column()
-
- col.prop(tex_slot, "scale")
-
- col = layout.column()
-
- row = col.row(align=True)
- row.label(text="Sample Bias:")
- row = col.row(align=True)
- row.prop(brush, "texture_sample_bias", slider=True, text="")
-
- row = col.row(align=True)
- row.label(text="Overlay:")
- row.active = tex_slot.map_mode in {'FIXED', 'TILED'}
-
- row = col.row(align=True)
+ col = layout.column(align=True)
+ col.label(text="Sample Bias:")
+ col.prop(brush, "texture_sample_bias", slider=True, text="")
- col = row.column()
+ col = layout.column(align=True)
+ col.active = tex_slot.map_mode in {'FIXED', 'TILED'}
+ col.label(text="Overlay:")
+ row = col.row()
if brush.use_texture_overlay:
- col.prop(brush, "use_texture_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
+ row.prop(brush, "use_texture_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
else:
- col.prop(brush, "use_texture_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
-
- col.active = tex_slot.map_mode in {'FIXED', 'TILED'}
-
- col = row.column()
- col.prop(brush, "texture_overlay_alpha", text="Alpha")
- col.active = tex_slot.map_mode in {'FIXED', 'TILED'} and brush.use_texture_overlay
+ row.prop(brush, "use_texture_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
+ sub = row.row()
+ sub.active = tex_slot.map_mode in {'FIXED', 'TILED'} and brush.use_texture_overlay
+ sub.prop(brush, "texture_overlay_alpha", text="Alpha")
class VIEW3D_PT_tools_brush_tool(PaintPanel, Panel):
@@ -844,13 +828,11 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel, Panel):
if brush.use_anchor:
col.separator()
- row = col.row()
- row.prop(brush, "use_edge_to_edge", "Edge To Edge")
+ col.prop(brush, "use_edge_to_edge", "Edge To Edge")
if brush.use_airbrush:
col.separator()
- row = col.row()
- row.prop(brush, "rate", text="Rate", slider=True)
+ col.prop(brush, "rate", text="Rate", slider=True)
if brush.use_space:
col.separator()
@@ -876,8 +858,7 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel, Panel):
row.prop(brush, "use_pressure_jitter", toggle=True, text="")
else:
- row = col.row()
- row.prop(brush, "use_airbrush")
+ col.prop(brush, "use_airbrush")
row = col.row()
row.active = brush.use_airbrush and (not brush.use_space) and (not brush.use_anchor)
@@ -886,8 +867,7 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel, Panel):
col.separator()
if not image_paint:
- row = col.row()
- row.prop(brush, "use_smooth_stroke")
+ col.prop(brush, "use_smooth_stroke")
col = layout.column()
col.active = brush.use_smooth_stroke
@@ -898,9 +878,7 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel, Panel):
col = layout.column()
col.active = (not brush.use_anchor) and (brush.sculpt_tool not in {'GRAB', 'THUMB', 'ROTATE', 'SNAKE_HOOK'})
-
- row = col.row()
- row.prop(brush, "use_space")
+ col.prop(brush, "use_space")
row = col.row()
row.active = brush.use_space
@@ -934,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):
@@ -985,18 +963,14 @@ class VIEW3D_PT_sculpt_symmetry(PaintPanel, Panel):
sculpt = context.tool_settings.sculpt
- split = layout.split()
-
- col = split.column()
+ col = layout.column(align=True)
col.label(text="Mirror:")
- col.prop(sculpt, "use_symmetry_x", text="X")
- col.prop(sculpt, "use_symmetry_y", text="Y")
- col.prop(sculpt, "use_symmetry_z", text="Z")
-
- split.prop(sculpt, "radial_symmetry", text="Radial")
-
- layout.separator()
+ row = col.row()
+ row.prop(sculpt, "use_symmetry_x", text="X", toggle=True)
+ row.prop(sculpt, "use_symmetry_y", text="Y", toggle=True)
+ row.prop(sculpt, "use_symmetry_z", text="Z", toggle=True)
+ layout.column().prop(sculpt, "radial_symmetry", text="Radial")
layout.prop(sculpt, "use_symmetry_feather", text="Feather")
@@ -1034,14 +1008,10 @@ class VIEW3D_PT_tools_brush_appearance(PaintPanel, Panel):
else:
col.prop(brush, "cursor_color_add", text="Color")
- col = layout.column()
- col.label(text="Icon:")
-
- row = col.row(align=True)
- row.prop(brush, "use_custom_icon")
+ col = layout.column(align=True)
+ col.prop(brush, "use_custom_icon")
if brush.use_custom_icon:
- row = col.row(align=True)
- row.prop(brush, "icon_filepath", text="")
+ col.prop(brush, "icon_filepath", text="")
# ********** default tools for weight-paint ****************
@@ -1059,6 +1029,7 @@ class VIEW3D_PT_tools_weightpaint(View3DPanel, Panel):
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_mirror", text="Mirror")
col.operator("object.vertex_group_invert", text="Invert")
col.operator("object.vertex_group_clean", text="Clean")
col.operator("object.vertex_group_levels", text="Levels")
@@ -1155,53 +1126,46 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel, Panel):
use_projection = ipaint.use_projection
col = layout.column()
- sub = col.column()
- sub.active = use_projection
- sub.prop(ipaint, "use_occlude")
- sub.prop(ipaint, "use_backface_culling")
+ col.active = use_projection
+ col.prop(ipaint, "use_occlude")
+ col.prop(ipaint, "use_backface_culling")
- split = layout.split()
+ row = layout.row()
+ row.active = (use_projection)
+ row.prop(ipaint, "use_normal_falloff")
- col = split.column()
- col.active = (use_projection)
- col.prop(ipaint, "use_normal_falloff")
+ sub = row.row()
+ sub.active = (ipaint.use_normal_falloff)
+ sub.prop(ipaint, "normal_angle", text="")
- col = split.column()
- col.active = (ipaint.use_normal_falloff and use_projection)
- col.prop(ipaint, "normal_angle", text="")
+ split = layout.split()
- col = layout.column(align=False)
- row = col.row()
- row.active = (use_projection)
- row.prop(ipaint, "use_stencil_layer", text="Stencil")
+ split.active = (use_projection)
+ split.prop(ipaint, "use_stencil_layer", text="Stencil")
- row2 = row.row(align=False)
- row2.active = (use_projection and ipaint.use_stencil_layer)
- row2.menu("VIEW3D_MT_tools_projectpaint_stencil", text=mesh.uv_texture_stencil.name)
- row2.prop(ipaint, "invert_stencil", text="", icon='IMAGE_ALPHA')
+ row = split.row()
+ row.active = (ipaint.use_stencil_layer)
+ row.menu("VIEW3D_MT_tools_projectpaint_stencil", text=mesh.uv_texture_stencil.name)
+ row.prop(ipaint, "invert_stencil", text="", icon='IMAGE_ALPHA')
- col = layout.column()
- sub = col.column()
- row = sub.row()
+ row = layout.row()
row.active = (settings.brush.image_tool == 'CLONE')
-
row.prop(ipaint, "use_clone_layer", text="Layer")
row.menu("VIEW3D_MT_tools_projectpaint_clone", text=mesh.uv_texture_clone.name)
- sub = col.column()
- sub.prop(ipaint, "seam_bleed")
+ layout.prop(ipaint, "seam_bleed")
+
+ col = layout.column()
+ col.label(text="External Editing:")
- col.label(text="External Editing")
row = col.split(align=True, percentage=0.55)
row.operator("image.project_edit", text="Quick Edit")
row.operator("image.project_apply", text="Apply")
- row = col.row(align=True)
- row.prop(ipaint, "screen_grab_size", text="")
- sub = col.column()
- sub.operator("paint.project_image", text="Apply Camera Image")
+ col.row().prop(ipaint, "screen_grab_size", text="")
- sub.operator("image.save_dirty", text="Save All Edited")
+ col.operator("paint.project_image", text="Apply Camera Image")
+ col.operator("image.save_dirty", text="Save All Edited")
class VIEW3D_PT_imagepaint_options(PaintPanel):