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:
Diffstat (limited to 'release')
-rwxr-xr-xrelease/datafiles/clkernelstoh.py70
-rw-r--r--release/scripts/modules/bpy/utils.py3
-rw-r--r--release/scripts/modules/bpy_extras/keyconfig_utils.py1
-rw-r--r--release/scripts/startup/bl_ui/properties_data_bone.py33
-rw-r--r--release/scripts/startup/bl_ui/properties_object.py31
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_cloth.py18
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py27
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_fluid.py15
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_smoke.py14
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_softbody.py24
-rw-r--r--release/scripts/startup/bl_ui/space_clip.py404
-rw-r--r--release/scripts/startup/bl_ui/space_console.py8
-rw-r--r--release/scripts/startup/bl_ui/space_image.py10
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py43
14 files changed, 558 insertions, 143 deletions
diff --git a/release/datafiles/clkernelstoh.py b/release/datafiles/clkernelstoh.py
new file mode 100755
index 00000000000..8fb5d4e6bae
--- /dev/null
+++ b/release/datafiles/clkernelstoh.py
@@ -0,0 +1,70 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# ***** 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.
+#
+# The Original Code is Copyright (C) 2012 Blender Foundation.
+# All rights reserved.
+#
+# Contributor(s): Jeroen Bakker
+#
+# ***** END GPL LICENCE BLOCK *****
+
+# <pep8 compliant>
+
+import sys
+import os
+
+if len(sys.argv) < 2:
+ sys.stdout.write("Usage: clkernelstoh <cl_file>\n")
+ sys.exit(1)
+
+filename = sys.argv[1]
+
+try:
+ fpin = open(filename, "r")
+except:
+ sys.stdout.write("Unable to open input %s\n" % sys.argv[1])
+ sys.exit(1)
+
+if filename[0:2] == "." + os.sep:
+ filename = filename[2:]
+
+cname = filename + ".h"
+sys.stdout.write("Making H file <%s>\n" % cname)
+
+filename = filename.split("/")[-1].split("\\")[-1]
+filename = filename.replace(".", "_")
+
+try:
+ fpout = open(cname, "w")
+except:
+ sys.stdout.write("Unable to open output %s\n" % cname)
+ sys.exit(1)
+
+fpout.write("/* clkernelstoh output of file <%s> */\n\n" % filename)
+fpout.write("const char * clkernelstoh_%s = " % filename)
+
+lines = fpin.readlines()
+for line in lines:
+ fpout.write("\"")
+ fpout.write(line.rstrip())
+ fpout.write("\\n\" \\\n")
+fpout.write("\"\\0\";\n")
+
+fpin.close()
+fpout.close()
diff --git a/release/scripts/modules/bpy/utils.py b/release/scripts/modules/bpy/utils.py
index 2e6d1bf8fbc..4e8179775d5 100644
--- a/release/scripts/modules/bpy/utils.py
+++ b/release/scripts/modules/bpy/utils.py
@@ -345,8 +345,7 @@ def preset_paths(subdir):
dirs.append(directory)
# Find addons preset paths
- import addon_utils
- for path in addon_utils.paths():
+ for path in _addon_utils.paths():
directory = _os.path.join(path, "presets", subdir)
if _os.path.isdir(directory):
dirs.append(directory)
diff --git a/release/scripts/modules/bpy_extras/keyconfig_utils.py b/release/scripts/modules/bpy_extras/keyconfig_utils.py
index e652b8461b2..f8b0abd03ea 100644
--- a/release/scripts/modules/bpy_extras/keyconfig_utils.py
+++ b/release/scripts/modules/bpy_extras/keyconfig_utils.py
@@ -95,6 +95,7 @@ KM_HIERARCHY = [
('Clip', 'CLIP_EDITOR', 'WINDOW', [
('Clip Editor', 'CLIP_EDITOR', 'WINDOW', []),
('Clip Graph Editor', 'CLIP_EDITOR', 'WINDOW', []),
+ ('Mask Editing', 'EMPTY', 'WINDOW', []), # image (reverse order, UVEdit before Image
]),
('View3D Gesture Circle', 'EMPTY', 'WINDOW', []),
diff --git a/release/scripts/startup/bl_ui/properties_data_bone.py b/release/scripts/startup/bl_ui/properties_data_bone.py
index 11524cf9c03..0f09893647a 100644
--- a/release/scripts/startup/bl_ui/properties_data_bone.py
+++ b/release/scripts/startup/bl_ui/properties_data_bone.py
@@ -119,21 +119,28 @@ class BONE_PT_transform_locks(BoneButtonsPanel, Panel):
bone = context.bone
pchan = ob.pose.bones[bone.name]
- row = layout.row()
- col = row.column()
- col.prop(pchan, "lock_location")
- col.active = not (bone.parent and bone.use_connect)
+ split = layout.split(percentage=0.1)
+
+ col = split.column(align=True)
+ col.label(text="")
+ col.label(text="X:")
+ col.label(text="Y:")
+ col.label(text="Z:")
+
+ col = split.row()
+ sub = col.row()
+ sub.active = not (bone.parent and bone.use_connect)
+ sub.column().prop(pchan, "lock_location", text="Location")
+ col.column().prop(pchan, "lock_rotation", text="Rotation")
+ col.column().prop(pchan, "lock_scale", text="Scale")
- col = row.column()
if pchan.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
- col.prop(pchan, "lock_rotations_4d", text="Lock Rotation")
- if pchan.lock_rotations_4d:
- col.prop(pchan, "lock_rotation_w", text="W")
- col.prop(pchan, "lock_rotation", text="")
- else:
- col.prop(pchan, "lock_rotation", text="Rotation")
-
- row.column().prop(pchan, "lock_scale")
+ row = layout.row()
+ row.prop(pchan, "lock_rotations_4d", text="Lock Rotation")
+
+ sub = row.row()
+ sub.active = pchan.lock_rotations_4d
+ sub.prop(pchan, "lock_rotation_w", text="W")
class BONE_PT_relations(BoneButtonsPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index 4f3ca26725c..87c62e2791f 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -104,21 +104,26 @@ class OBJECT_PT_transform_locks(ObjectButtonsPanel, Panel):
ob = context.object
- row = layout.row()
-
- col = row.column()
- col.prop(ob, "lock_location", text="Location")
+ split = layout.split(percentage=0.1)
+
+ col = split.column(align=True)
+ col.label(text="")
+ col.label(text="X:")
+ col.label(text="Y:")
+ col.label(text="Z:")
+
+ col = split.row()
+ col.column().prop(ob, "lock_location", text="Location")
+ col.column().prop(ob, "lock_rotation", text="Rotation")
+ col.column().prop(ob, "lock_scale", text="Scale")
- col = row.column()
if ob.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
- col.prop(ob, "lock_rotations_4d", text="Rotation")
- if ob.lock_rotations_4d:
- col.prop(ob, "lock_rotation_w", text="W")
- col.prop(ob, "lock_rotation", text="")
- else:
- col.prop(ob, "lock_rotation", text="Rotation")
-
- row.column().prop(ob, "lock_scale", text="Scale")
+ row = layout.row()
+ row.prop(ob, "lock_rotations_4d", text="Lock Rotation")
+
+ sub = row.row()
+ sub.active = ob.lock_rotations_4d
+ sub.prop(ob, "lock_rotation_w", text="W")
class OBJECT_PT_relations(ObjectButtonsPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py
index e313112d61a..33b977b5f04 100644
--- a/release/scripts/startup/bl_ui/properties_physics_cloth.py
+++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py
@@ -117,10 +117,6 @@ class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel):
bl_label = "Cloth Cache"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- return context.cloth
-
def draw(self, context):
md = context.cloth
point_cache_ui(self, context, md.point_cache, cloth_panel_enabled(md), 'CLOTH')
@@ -130,10 +126,6 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel):
bl_label = "Cloth Collision"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- return context.cloth
-
def draw_header(self, context):
cloth = context.cloth.collision_settings
@@ -145,6 +137,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel):
cloth = context.cloth.collision_settings
md = context.cloth
+ ob = context.object
layout.active = cloth.use_collision and cloth_panel_enabled(md)
@@ -163,6 +156,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel):
sub.active = cloth.use_self_collision
sub.prop(cloth, "self_collision_quality", slider=True, text="Quality")
sub.prop(cloth, "self_distance_min", slider=True, text="Distance")
+ sub.prop_search(cloth, "vertex_group_self_collisions", ob, "vertex_groups", text="")
layout.prop(cloth, "group")
@@ -171,10 +165,6 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel):
bl_label = "Cloth Stiffness Scaling"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- return context.cloth
-
def draw_header(self, context):
cloth = context.cloth.settings
@@ -207,10 +197,6 @@ class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, Panel):
bl_label = "Cloth Field Weights"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- return (context.cloth)
-
def draw(self, context):
cloth = context.cloth.settings
effector_weights_ui(self, context, cloth.effector_weights)
diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
index 04696c793a6..db0794d8a8a 100644
--- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
+++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
@@ -120,7 +120,8 @@ class PHYSICS_PT_dp_advanced_canvas(PhysicButtonsPanel, Panel):
@classmethod
def poll(cls, context):
md = context.dynamic_paint
- return md and md.ui_type == 'CANVAS' and md.canvas_settings and md.canvas_settings.canvas_surfaces.active
+ rd = context.scene.render
+ return md and md.ui_type == 'CANVAS' and md.canvas_settings and md.canvas_settings.canvas_surfaces.active and (not rd.use_game_engine)
def draw(self, context):
layout = self.layout
@@ -194,10 +195,13 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel):
@classmethod
def poll(cls, context):
md = context.dynamic_paint
+ rd = context.scene.render
if not (md and md.ui_type == 'CANVAS' and md.canvas_settings):
return 0
surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active
- return surface and not (surface.surface_format == 'VERTEX' and (surface.surface_type in {'DISPLACE', 'WAVE'}))
+ return (surface and
+ (not (surface.surface_format == 'VERTEX' and (surface.surface_type in {'DISPLACE', 'WAVE'}))) and
+ (not rd.use_game_engine))
def draw(self, context):
layout = self.layout
@@ -284,10 +288,11 @@ class PHYSICS_PT_dp_canvas_initial_color(PhysicButtonsPanel, Panel):
@classmethod
def poll(cls, context):
md = context.dynamic_paint
+ rd = context.scene.render
if not (md and md.ui_type == 'CANVAS' and md.canvas_settings):
return 0
surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active
- return (surface and surface.surface_type == 'PAINT')
+ return (surface and surface.surface_type == 'PAINT') and (not rd.use_game_engine)
def draw(self, context):
layout = self.layout
@@ -318,10 +323,11 @@ class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel):
@classmethod
def poll(cls, context):
md = context.dynamic_paint
+ rd = context.scene.render
if not (md and md.ui_type == 'CANVAS' and md.canvas_settings):
return False
surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active
- return (surface and surface.surface_type == 'PAINT')
+ return (surface and surface.surface_type == 'PAINT') and (not rd.use_game_engine)
def draw(self, context):
layout = self.layout
@@ -366,11 +372,13 @@ class PHYSICS_PT_dp_cache(PhysicButtonsPanel, Panel):
@classmethod
def poll(cls, context):
md = context.dynamic_paint
+ rd = context.scene.render
return (md and
md.ui_type == 'CANVAS' and
md.canvas_settings and
md.canvas_settings.canvas_surfaces.active and
- md.canvas_settings.canvas_surfaces.active.is_cache_user)
+ md.canvas_settings.canvas_surfaces.active.is_cache_user and
+ (not rd.use_game_engine))
def draw(self, context):
surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active
@@ -385,7 +393,8 @@ class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel):
@classmethod
def poll(cls, context):
md = context.dynamic_paint
- return md and md.ui_type == 'BRUSH' and md.brush_settings
+ rd = context.scene.render
+ return md and md.ui_type == 'BRUSH' and md.brush_settings and (not rd.use_game_engine)
def draw(self, context):
layout = self.layout
@@ -437,7 +446,8 @@ class PHYSICS_PT_dp_brush_velocity(PhysicButtonsPanel, Panel):
@classmethod
def poll(cls, context):
md = context.dynamic_paint
- return md and md.ui_type == 'BRUSH' and md.brush_settings
+ rd = context.scene.render
+ return md and md.ui_type == 'BRUSH' and md.brush_settings and (not rd.use_game_engine)
def draw(self, context):
layout = self.layout
@@ -472,7 +482,8 @@ class PHYSICS_PT_dp_brush_wave(PhysicButtonsPanel, Panel):
@classmethod
def poll(cls, context):
md = context.dynamic_paint
- return md and md.ui_type == 'BRUSH' and md.brush_settings
+ rd = context.scene.render
+ return md and md.ui_type == 'BRUSH' and md.brush_settings and (not rd.use_game_engine)
def draw(self, context):
layout = self.layout
diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py
index beb525bbd07..751f3e18acc 100644
--- a/release/scripts/startup/bl_ui/properties_physics_fluid.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py
@@ -192,13 +192,14 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel):
- bl_label = "Domain World"
+ bl_label = "Fluid World"
bl_options = {'DEFAULT_CLOSED'}
@classmethod
def poll(cls, context):
md = context.fluid
- return md and md.settings and (md.settings.type == 'DOMAIN')
+ rd = context.scene.render
+ return md and md.settings and (md.settings.type == 'DOMAIN') and (not rd.use_game_engine)
def draw(self, context):
layout = self.layout
@@ -244,13 +245,14 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel):
class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, Panel):
- bl_label = "Domain Boundary"
+ bl_label = "Fluid Boundary"
bl_options = {'DEFAULT_CLOSED'}
@classmethod
def poll(cls, context):
md = context.fluid
- return md and md.settings and (md.settings.type == 'DOMAIN')
+ rd = context.scene.render
+ return md and md.settings and (md.settings.type == 'DOMAIN') and (not rd.use_game_engine)
def draw(self, context):
layout = self.layout
@@ -273,13 +275,14 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, Panel):
class PHYSICS_PT_domain_particles(PhysicButtonsPanel, Panel):
- bl_label = "Domain Particles"
+ bl_label = "Fluid Particles"
bl_options = {'DEFAULT_CLOSED'}
@classmethod
def poll(cls, context):
md = context.fluid
- return md and md.settings and (md.settings.type == 'DOMAIN')
+ rd = context.scene.render
+ return md and md.settings and (md.settings.type == 'DOMAIN') and (not rd.use_game_engine)
def draw(self, context):
layout = self.layout
diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py
index 012aefebb6e..1b333f1e505 100644
--- a/release/scripts/startup/bl_ui/properties_physics_smoke.py
+++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py
@@ -117,7 +117,8 @@ class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, Panel):
@classmethod
def poll(cls, context):
md = context.smoke
- return md and (md.smoke_type == 'DOMAIN')
+ rd = context.scene.render
+ return md and (md.smoke_type == 'DOMAIN') and (not rd.use_game_engine)
def draw(self, context):
layout = self.layout
@@ -145,7 +146,8 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, Panel):
@classmethod
def poll(cls, context):
md = context.smoke
- return md and (md.smoke_type == 'DOMAIN')
+ rd = context.scene.render
+ return md and (md.smoke_type == 'DOMAIN') and (not rd.use_game_engine)
def draw_header(self, context):
md = context.smoke.domain_settings
@@ -182,7 +184,8 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel):
@classmethod
def poll(cls, context):
md = context.smoke
- return md and (md.smoke_type == 'DOMAIN')
+ rd = context.scene.render
+ return md and (md.smoke_type == 'DOMAIN') and (not rd.use_game_engine)
def draw(self, context):
layout = self.layout
@@ -202,8 +205,9 @@ class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, Panel):
@classmethod
def poll(cls, context):
- smoke = context.smoke
- return (smoke and smoke.smoke_type == 'DOMAIN')
+ md = context.smoke
+ rd = context.scene.render
+ return md and (md.smoke_type == 'DOMAIN') and (not rd.use_game_engine)
def draw(self, context):
domain = context.smoke.domain_settings
diff --git a/release/scripts/startup/bl_ui/properties_physics_softbody.py b/release/scripts/startup/bl_ui/properties_physics_softbody.py
index ea4180c891f..b043c1f9b68 100644
--- a/release/scripts/startup/bl_ui/properties_physics_softbody.py
+++ b/release/scripts/startup/bl_ui/properties_physics_softbody.py
@@ -72,10 +72,6 @@ class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, Panel):
bl_label = "Soft Body Cache"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- return context.soft_body
-
def draw(self, context):
md = context.soft_body
point_cache_ui(self, context, md.point_cache, softbody_panel_enabled(md), 'SOFTBODY')
@@ -85,10 +81,6 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, Panel):
bl_label = "Soft Body Goal"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- return context.soft_body
-
def draw_header(self, context):
softbody = context.soft_body.settings
@@ -128,10 +120,6 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, Panel):
bl_label = "Soft Body Edges"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- return context.soft_body
-
def draw_header(self, context):
softbody = context.soft_body.settings
@@ -181,10 +169,6 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel):
bl_label = "Soft Body Self Collision"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- return context.soft_body
-
def draw_header(self, context):
softbody = context.soft_body.settings
@@ -213,10 +197,6 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, Panel):
bl_label = "Soft Body Solver"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- return context.soft_body
-
def draw(self, context):
layout = self.layout
@@ -249,10 +229,6 @@ class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel, Panel):
bl_label = "Soft Body Field Weights"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- return (context.soft_body)
-
def draw(self, context):
md = context.soft_body
softbody = md.settings
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index 4ab23359fd8..1cef4624a04 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -25,7 +25,7 @@ from bpy.types import Panel, Header, Menu
class CLIP_HT_header(Header):
bl_space_type = 'CLIP_EDITOR'
- def draw(self, context):
+ def _draw_tracking(self, context):
layout = self.layout
sc = context.space_data
@@ -41,23 +41,37 @@ class CLIP_HT_header(Header):
if sc.view == 'CLIP':
if clip:
sub.menu("CLIP_MT_select")
+ sub.menu("CLIP_MT_clip")
+ sub.menu("CLIP_MT_track")
+ sub.menu("CLIP_MT_reconstruction")
+ else:
+ sub.menu("CLIP_MT_clip")
- sub.menu("CLIP_MT_clip")
-
- sub.menu("CLIP_MT_track")
- sub.menu("CLIP_MT_reconstruction")
-
- layout.prop(sc, "view", text="", expand=True)
+ row = layout.row()
+ row.template_ID(sc, "clip", open='clip.open')
if clip:
+ tracking = clip.tracking
+ active_object = tracking.objects.active
+
if sc.view == 'CLIP':
layout.prop(sc, "mode", text="")
- if sc.view == 'GRAPH':
+ layout.prop(sc, "view", text="", expand=True)
+ layout.prop(sc, "pivot_point", text="", icon_only=True)
+
+ r = active_object.reconstruction
+
+ if r.is_valid and sc.view == 'CLIP':
+ layout.label(text="Average solve error: %.4f" %
+ (r.average_error))
+ elif sc.view == 'GRAPH':
+ layout.prop(sc, "view", text="", expand=True)
+
row = layout.row(align=True)
if sc.show_filters:
row.prop(sc, "show_filters", icon='DISCLOSURE_TRI_DOWN',
- text="Filters")
+ text="Filters")
sub = row.column()
sub.active = clip.tracking.reconstruction.is_valid
@@ -66,28 +80,63 @@ class CLIP_HT_header(Header):
row.prop(sc, "show_graph_tracks", icon='ANIM', text="")
else:
row.prop(sc, "show_filters", icon='DISCLOSURE_TRI_RIGHT',
- text="Filters")
+ text="Filters")
+ elif sc.view == 'DOPESHEET':
+ layout.prop(sc, "view", text="", expand=True)
+
+ layout.label(text="Sort by:")
+ layout.prop(sc, "dopesheet_sort_method", text="")
+ layout.prop(sc, "invert_dopesheet_sort", text="Invert")
+ else:
+ layout.prop(sc, "view", text="", expand=True)
+
+ def _draw_masking(self, context):
+ layout = self.layout
+
+ toolsettings = context.tool_settings
+ 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")
+ sub.menu("CLIP_MT_mask")
+ else:
+ sub.menu("CLIP_MT_clip")
row = layout.row()
row.template_ID(sc, "clip", open='clip.open')
- if clip:
- tracking = clip.tracking
- active = tracking.objects.active
+ layout.prop(sc, "mode", text="")
- if active and not active.is_camera:
- r = active.reconstruction
- else:
- r = tracking.reconstruction
+ row = layout.row()
+ row.template_ID(sc, "mask", new="mask.new")
- if r.is_valid and sc.view == 'CLIP':
- layout.label(text="Average solve error: %.4f" %
- (r.average_error))
+ layout.prop(sc, "pivot_point", text="", icon_only=True)
- if sc.view == 'DOPESHEET':
- layout.label(text="Sort by:")
- layout.prop(sc, "dopesheet_sort_method", text="")
- layout.prop(sc, "invert_dopesheet_sort", text="Invert")
+ row = layout.row(align=True)
+ row.prop(toolsettings, "use_proportional_edit_mask",
+ text="", icon_only=True)
+ if toolsettings.use_proportional_edit_mask:
+ row.prop(toolsettings, "proportional_edit_falloff",
+ text="", icon_only=True)
+
+ def draw(self, context):
+ layout = self.layout
+
+ sc = context.space_data
+
+ if sc.mode in {'TRACKING', 'RECONSTRUCTION', 'DISTORTION'}:
+ self._draw_tracking(context)
+ else:
+ self._draw_masking(context)
layout.template_running_jobs()
@@ -102,34 +151,34 @@ class CLIP_PT_clip_view_panel:
return clip and sc.view == 'CLIP'
-class CLIP_PT_tracking_panel:
+class CLIP_PT_mask_view_panel:
@classmethod
def poll(cls, context):
sc = context.space_data
clip = sc.clip
- return clip and sc.mode == 'TRACKING' and sc.view == 'CLIP'
+ return clip and sc.view == 'CLIP' and sc.mode == 'MASKEDIT'
-class CLIP_PT_reconstruction_panel:
+class CLIP_PT_tracking_panel:
@classmethod
def poll(cls, context):
sc = context.space_data
clip = sc.clip
- return clip and sc.mode == 'RECONSTRUCTION' and sc.view == 'CLIP'
+ return clip and sc.mode == 'TRACKING' and sc.view == 'CLIP'
-class CLIP_PT_distortion_panel:
+class CLIP_PT_reconstruction_panel:
@classmethod
def poll(cls, context):
sc = context.space_data
clip = sc.clip
- return clip and sc.mode == 'DISTORTION' and sc.view == 'CLIP'
+ return clip and sc.mode == 'RECONSTRUCTION' and sc.view == 'CLIP'
class CLIP_PT_tools_marker(CLIP_PT_tracking_panel, Panel):
@@ -181,10 +230,9 @@ class CLIP_PT_tools_marker(CLIP_PT_tracking_panel, Panel):
sub.prop(settings, "default_search_size")
col.label(text="Tracker:")
- col.prop(settings, "default_tracker", text="")
-
- if settings.default_tracker == 'KLT':
- col.prop(settings, "default_pyramid_levels")
+ col.prop(settings, "default_motion_model")
+ col.prop(settings, "default_use_brute")
+ col.prop(settings, "default_use_normalization")
col.prop(settings, "default_correlation_min")
col.separator()
@@ -261,7 +309,8 @@ class CLIP_PT_tools_solve(CLIP_PT_tracking_panel, Panel):
col.prop(settings, "keyframe_b")
col = layout.column(align=True)
- col.active = tracking_object.is_camera and not settings.use_tripod_solver
+ col.active = (tracking_object.is_camera and
+ not settings.use_tripod_solver)
col.label(text="Refine:")
col.prop(settings, "refine_intrinsics", text="")
@@ -359,11 +408,54 @@ class CLIP_PT_tools_object(CLIP_PT_reconstruction_panel, Panel):
col.prop(settings, "object_distance")
-class CLIP_PT_tools_grease_pencil(CLIP_PT_distortion_panel, Panel):
+class CLIP_PT_tools_mask(CLIP_PT_mask_view_panel, Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'TOOLS'
+ bl_label = "Mask Tools"
+
+ def draw(self, context):
+ layout = self.layout
+
+ col = layout.column(align=True)
+ col.label(text="Transform:")
+ col.operator("transform.translate")
+ col.operator("transform.rotate")
+ col.operator("transform.resize", text="Scale")
+ props = col.operator("transform.transform", text="Shrink/Fatten")
+ props.mode = 'MASK_SHRINKFATTEN'
+
+ col = layout.column(align=True)
+ col.label(text="Spline:")
+ col.operator("mask.delete")
+ col.operator("mask.cyclic_toggle")
+ col.operator("mask.switch_direction")
+
+ col = layout.column(align=True)
+ col.label(text="Parenting:")
+ col.operator("mask.parent_set")
+ col.operator("mask.parent_clear")
+
+
+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
+
+ if not clip:
+ return False
+
+ if sc.mode == 'DISTORTION':
+ return sc.view == 'CLIP'
+ elif sc.mode == 'MASKEDIT':
+ return True
+
+ return False
+
def draw(self, context):
layout = self.layout
@@ -482,10 +574,9 @@ class CLIP_PT_track_settings(CLIP_PT_tracking_panel, Panel):
active = clip.tracking.tracks.active
if active:
- col.prop(active, "tracker")
-
- if active.tracker == 'KLT':
- col.prop(active, "pyramid_levels")
+ col.prop(active, "motion_model")
+ col.prop(active, "use_brute")
+ col.prop(active, "use_normalization")
col.prop(active, "correlation_min")
col.separator()
@@ -550,6 +641,121 @@ class CLIP_PT_tracking_camera(Panel):
col.prop(clip.tracking.camera, "k3")
+class CLIP_PT_mask_layers(Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'UI'
+ bl_label = "Mask Layers"
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+
+ return sc.mask and sc.mode == 'MASKEDIT'
+
+ def draw(self, context):
+ layout = self.layout
+
+ sc = context.space_data
+ mask = sc.mask
+
+ row = layout.row()
+ row.template_list(mask, "layers",
+ mask, "active_layer_index", rows=3)
+
+ sub = row.column(align=True)
+
+ sub.operator("mask.layer_new", icon='ZOOMIN', text="")
+ sub.operator("mask.layer_remove", icon='ZOOMOUT', text="")
+
+ active = mask.layers.active
+ if active:
+ layout.prop(active, "name")
+
+ # blending
+ row = layout.row(align=True)
+ row.prop(active, "alpha")
+ row.prop(active, "invert", text="", icon='IMAGE_ALPHA')
+
+ layout.prop(active, "blend")
+
+
+class CLIP_PT_active_mask_spline(Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'UI'
+ bl_label = "Active Spline"
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+ mask = sc.mask
+
+ if mask and sc.mode == 'MASKEDIT':
+ return mask.layers.active and mask.layers.active.splines.active
+
+ return False
+
+ def draw(self, context):
+ layout = self.layout
+
+ sc = context.space_data
+ mask = sc.mask
+ spline = mask.layers.active.splines.active
+
+ col = layout.column()
+ col.prop(spline, "weight_interpolation")
+ col.prop(spline, "use_cyclic")
+
+
+class CLIP_PT_active_mask_point(Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'UI'
+ bl_label = "Active Point"
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+ mask = sc.mask
+
+ if mask and sc.mode == 'MASKEDIT':
+ return mask.layers.active and mask.layers.active.splines.active_point
+
+ return False
+
+ def draw(self, context):
+ layout = self.layout
+
+ sc = context.space_data
+ mask = sc.mask
+ point = mask.layers.active.splines.active_point
+ parent = point.parent
+
+ col = layout.column()
+ col.prop(point, "handle_type")
+
+ col = layout.column()
+ # Currently only parenting yo movie clip is allowed, so do not
+ # ver-oplicate things for now and use single template_ID
+ #col.template_any_ID(parent, "id", "id_type", text="")
+
+ col.label("Parent:")
+ col.prop(parent, "id", text="")
+
+ if parent.id_type == 'MOVIECLIP' and parent.id:
+ clip = parent.id
+ tracking = clip.tracking
+
+ col.prop_search(parent, "parent", tracking,
+ "objects", icon='OBJECT_DATA', text="Object:")
+
+ if parent.parent in tracking.objects:
+ object = tracking.objects[parent.parent]
+ col.prop_search(parent, "sub_parent", object,
+ "tracks", icon='ANIM_DATA', text="Track:")
+ else:
+ col.prop_search(parent, "sub_parent", tracking,
+ "tracks", icon='ANIM_DATA', text="Track:")
+
+
class CLIP_PT_display(CLIP_PT_clip_view_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
@@ -594,12 +800,41 @@ class CLIP_PT_display(CLIP_PT_clip_view_panel, Panel):
row = col.row()
row.prop(clip, "display_aspect", text="")
+ if sc.mode == 'MASKEDIT':
+ col = layout.column()
+ col.prop(sc, "mask_draw_type", text="")
+ col.prop(sc, "show_mask_smooth")
+
+
+# TODO, move into its own file
+class CLIP_PT_mask(CLIP_PT_mask_view_panel, Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'UI'
+ bl_label = "Mask Settings"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw(self, context):
+ layout = self.layout
+
+ sc = context.space_data
+ mask = sc.mask
+
+ col = layout.column(align=True)
+ col.prop(mask, "frame_start")
+ col.prop(mask, "frame_end")
+
class CLIP_PT_marker_display(CLIP_PT_clip_view_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_label = "Marker Display"
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+
+ return sc.mode != 'MASKEDIT'
+
def draw(self, context):
layout = self.layout
sc = context.space_data
@@ -757,10 +992,9 @@ class CLIP_PT_footage(CLIP_PT_clip_view_panel, Panel):
sc = context.space_data
clip = sc.clip
- if clip:
- layout.template_movieclip(sc, "clip", compact=True)
- else:
- layout.operator("clip.open", icon='FILESEL')
+ col = layout.column()
+ col.template_movieclip(sc, "clip", compact=True)
+ col.prop(clip, "start_frame")
class CLIP_PT_tools_clip(CLIP_PT_clip_view_panel, Panel):
@@ -942,16 +1176,26 @@ class CLIP_MT_select(Menu):
def draw(self, context):
layout = self.layout
+ sc = context.space_data
- layout.operator("clip.select_border")
- layout.operator("clip.select_circle")
+ if sc.mode == 'MASKEDIT':
+ layout.operator("mask.select_border")
+ layout.operator("mask.select_circle")
- layout.separator()
+ layout.separator()
- layout.operator("clip.select_all").action = 'TOGGLE'
- layout.operator("clip.select_all", text="Inverse").action = 'INVERT'
+ layout.operator("mask.select_all").action = 'TOGGLE'
+ layout.operator("mask.select_all", text="Inverse").action = 'INVERT'
+ else:
+ layout.operator("clip.select_border")
+ layout.operator("clip.select_circle")
- layout.menu("CLIP_MT_select_grouped")
+ layout.separator()
+
+ layout.operator("clip.select_all").action = 'TOGGLE'
+ layout.operator("clip.select_all", text="Inverse").action = 'INVERT'
+
+ layout.menu("CLIP_MT_select_grouped")
class CLIP_MT_select_grouped(Menu):
@@ -995,6 +1239,66 @@ class CLIP_MT_tracking_specials(Menu):
props.action = 'UNLOCK'
+class CLIP_MT_mask(Menu):
+ bl_label = "Mask"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("mask.delete")
+
+ layout.separator()
+ layout.operator("mask.cyclic_toggle")
+ layout.operator("mask.switch_direction")
+ layout.operator("mask.feather_weight_clear") # TODO, better place?
+
+ layout.separator()
+ layout.operator("mask.parent_clear")
+ layout.operator("mask.parent_set")
+
+ layout.separator()
+ layout.menu("CLIP_MT_mask_visibility")
+ layout.menu("CLIP_MT_mask_transform")
+ layout.menu("CLIP_MT_mask_animation")
+
+
+class CLIP_MT_mask_visibility(Menu):
+ bl_label = "Show/Hide"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("mask.hide_view_clear", text="Show Hidden")
+ layout.operator("mask.hide_view_set", text="Hide Selected")
+
+ props = layout.operator("mask.hide_view_set", text="Hide Unselected")
+ props.unselected = True
+
+
+class CLIP_MT_mask_transform(Menu):
+ bl_label = "Transform"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("transform.translate")
+ layout.operator("transform.rotate")
+ layout.operator("transform.resize")
+ props = layout.operator("transform.transform", text="Shrink/Fatten")
+ props.mode = 'MASK_SHRINKFATTEN'
+
+
+class CLIP_MT_mask_animation(Menu):
+ bl_label = "Animation"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("mask.shape_key_clear")
+ layout.operator("mask.shape_key_insert")
+ layout.operator("mask.shape_key_feather_reset")
+
+
class CLIP_MT_camera_presets(Menu):
"""Predefined tracking camera intrinsics"""
bl_label = "Camera Presets"
diff --git a/release/scripts/startup/bl_ui/space_console.py b/release/scripts/startup/bl_ui/space_console.py
index fc1d8e2d4be..5ec9d06ec89 100644
--- a/release/scripts/startup/bl_ui/space_console.py
+++ b/release/scripts/startup/bl_ui/space_console.py
@@ -41,8 +41,16 @@ class CONSOLE_MT_console(Menu):
def draw(self, context):
layout = self.layout
+ layout.operator("console.indent")
+ layout.operator("console.unindent")
+
+ layout.separator()
+
layout.operator("console.clear")
layout.operator("console.clear_line")
+
+ layout.separator()
+
layout.operator("console.copy")
layout.operator("console.paste")
layout.menu("CONSOLE_MT_language")
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index 861a5670393..44fb429ffe7 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -502,9 +502,12 @@ class IMAGE_PT_view_histogram(Panel):
layout = self.layout
sima = context.space_data
+ hist = sima.scopes.histogram
layout.template_histogram(sima.scopes, "histogram")
- layout.prop(sima.scopes.histogram, "mode", icon_only=True)
+ row = layout.row(align=True)
+ row.prop(hist, "mode", icon_only=True, expand=True)
+ row.prop(hist, "show_line", text="")
class IMAGE_PT_view_waveform(Panel):
@@ -560,10 +563,13 @@ class IMAGE_PT_sample_line(Panel):
layout = self.layout
sima = context.space_data
+ hist = sima.sample_histogram
layout.operator("image.sample_line")
layout.template_histogram(sima, "sample_histogram")
- layout.prop(sima.sample_histogram, "mode")
+ row = layout.row(align=True)
+ row.prop(hist, "mode", expand=True)
+ row.prop(hist, "show_line", text="")
class IMAGE_PT_scope_sample(Panel):
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 732f675c208..276e8e5ae1d 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -198,6 +198,12 @@ class SEQUENCER_MT_add(Menu):
else:
layout.operator_menu_enum("sequencer.movieclip_strip_add", "clip", text="Clip...")
+ if len(bpy.data.masks) > 10:
+ layout.operator_context = 'INVOKE_DEFAULT'
+ layout.operator("sequencer.mask_strip_add", text="Masks...")
+ else:
+ layout.operator_menu_enum("sequencer.mask_strip_add", "mask", text="Mask...")
+
layout.operator("sequencer.movie_strip_add", text="Movie")
layout.operator("sequencer.image_strip_add", text="Image")
layout.operator("sequencer.sound_strip_add", text="Sound")
@@ -670,6 +676,35 @@ class SEQUENCER_PT_scene(SequencerButtonsPanel, Panel):
layout.label(text="Original frame range" + ": %d-%d (%d)" % (sta, end, end - sta + 1))
+class SEQUENCER_PT_mask(SequencerButtonsPanel, Panel):
+ bl_label = "Mask"
+
+ @classmethod
+ def poll(cls, context):
+ if not cls.has_sequencer(context):
+ return False
+
+ strip = act_strip(context)
+ if not strip:
+ return False
+
+ return (strip.type == 'MASK')
+
+ def draw(self, context):
+ layout = self.layout
+
+ strip = act_strip(context)
+
+ layout.template_ID(strip, "mask")
+
+ mask = strip.mask
+
+ if mask:
+ sta = mask.frame_start
+ end = mask.frame_end
+ layout.label(text="Original frame range" + ": %d-%d (%d)" % (sta, end, end - sta + 1))
+
+
class SEQUENCER_PT_filter(SequencerButtonsPanel, Panel):
bl_label = "Filter"
@@ -682,10 +717,10 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel, Panel):
if not strip:
return False
- return strip.type in {'MOVIE', 'IMAGE', 'SCENE', 'MOVIECLIP', 'META',
- 'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
- 'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
- 'WIPE', 'GLOW', 'TRANSFORM', 'COLOR',
+ return strip.type in {'MOVIE', 'IMAGE', 'SCENE', 'MOVIECLIP', 'MASK',
+ 'META', 'ADD', 'SUBTRACT', 'ALPHA_OVER',
+ 'ALPHA_UNDER', 'CROSS', 'GAMMA_CROSS', 'MULTIPLY',
+ 'OVER_DROP', 'WIPE', 'GLOW', 'TRANSFORM', 'COLOR',
'MULTICAM', 'SPEED', 'ADJUSTMENT'}
def draw(self, context):