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/scripts')
-rw-r--r--release/scripts/freestyle/modules/parameter_editor.py50
-rw-r--r--release/scripts/modules/animsys_refactor.py2
-rw-r--r--release/scripts/modules/bl_i18n_utils/bl_extract_messages.py4
-rw-r--r--release/scripts/modules/bpy/__init__.py4
-rw-r--r--release/scripts/modules/bpy/ops.py7
-rw-r--r--release/scripts/modules/bpy_extras/keyconfig_utils.py5
-rw-r--r--release/scripts/modules/bpy_extras/object_utils.py14
-rw-r--r--release/scripts/modules/bpyml.py2
-rw-r--r--release/scripts/modules/rna_info.py6
-rw-r--r--release/scripts/presets/interface_theme/back_to_black.xml3
-rw-r--r--release/scripts/presets/interface_theme/blender_24x.xml29
-rw-r--r--release/scripts/presets/interface_theme/elsyiun.xml25
-rw-r--r--release/scripts/presets/interface_theme/graph.xml24
-rw-r--r--release/scripts/presets/interface_theme/hexagon.xml25
-rw-r--r--release/scripts/presets/interface_theme/science_lab.xml24
-rw-r--r--release/scripts/presets/interface_theme/softimage.xml7
-rw-r--r--release/scripts/presets/interface_theme/ubuntu_ambiance.xml25
-rw-r--r--release/scripts/startup/bl_operators/rigidbody.py10
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_lightmap.py2
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_smart_project.py34
-rw-r--r--release/scripts/startup/bl_ui/__init__.py8
-rw-r--r--release/scripts/startup/bl_ui/properties_data_armature.py1
-rw-r--r--release/scripts/startup/bl_ui/properties_data_mesh.py4
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_freestyle.py10
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py437
-rw-r--r--release/scripts/startup/bl_ui/properties_texture.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_world.py2
-rw-r--r--release/scripts/startup/bl_ui/space_clip.py39
-rw-r--r--release/scripts/startup/bl_ui/space_console.py3
-rw-r--r--release/scripts/startup/bl_ui/space_dopesheet.py13
-rw-r--r--release/scripts/startup/bl_ui/space_graph.py9
-rw-r--r--release/scripts/startup/bl_ui/space_image.py27
-rw-r--r--release/scripts/startup/bl_ui/space_info.py7
-rw-r--r--release/scripts/startup/bl_ui/space_logic.py3
-rw-r--r--release/scripts/startup/bl_ui/space_nla.py3
-rw-r--r--release/scripts/startup/bl_ui/space_node.py48
-rw-r--r--release/scripts/startup/bl_ui/space_outliner.py3
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py58
-rw-r--r--release/scripts/startup/bl_ui/space_text.py3
-rw-r--r--release/scripts/startup/bl_ui/space_time.py3
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py15
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py27
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py25
-rw-r--r--release/scripts/templates_py/custom_nodes.py3
45 files changed, 866 insertions, 191 deletions
diff --git a/release/scripts/freestyle/modules/parameter_editor.py b/release/scripts/freestyle/modules/parameter_editor.py
index 9ac5c665f1e..ba79c5514e2 100644
--- a/release/scripts/freestyle/modules/parameter_editor.py
+++ b/release/scripts/freestyle/modules/parameter_editor.py
@@ -97,7 +97,7 @@ from freestyle.utils import (
stroke_normal,
bound,
pairwise,
- BoundedProperty
+ BoundedProperty,
)
from _freestyle import (
blendRamp,
@@ -110,6 +110,12 @@ from mathutils import Vector
from math import pi, sin, cos, acos, radians
from itertools import cycle, tee
+# lists of callback functions
+# WARNING: highly experimental, not a stable API
+callbacks_lineset_pre = []
+callbacks_modifiers_post = []
+callbacks_lineset_post = []
+
class ColorRampModifier(StrokeShader):
"""Primitive for the color modifiers."""
@@ -878,6 +884,21 @@ class Seed:
_seed = Seed()
+def get_dashed_pattern(linestyle):
+ """Extracts the dashed pattern from the various UI options """
+ pattern = []
+ if linestyle.dash1 > 0 and linestyle.gap1 > 0:
+ pattern.append(linestyle.dash1)
+ pattern.append(linestyle.gap1)
+ if linestyle.dash2 > 0 and linestyle.gap2 > 0:
+ pattern.append(linestyle.dash2)
+ pattern.append(linestyle.gap2)
+ if linestyle.dash3 > 0 and linestyle.gap3 > 0:
+ pattern.append(linestyle.dash3)
+ pattern.append(linestyle.gap3)
+ return pattern
+
+
integration_types = {
'MEAN': IntegrationType.MEAN,
'MIN': IntegrationType.MIN,
@@ -887,13 +908,16 @@ integration_types = {
# main function for parameter processing
-
def process(layer_name, lineset_name):
scene = getCurrentScene()
layer = scene.render.layers[layer_name]
lineset = layer.freestyle_settings.linesets[lineset_name]
linestyle = lineset.linestyle
+ # execute line set pre-processing callback functions
+ for fn in callbacks_lineset_pre:
+ fn(scene, layer, lineset)
+
selection_criteria = []
# prepare selection criteria by visibility
if lineset.select_by_visibility:
@@ -1172,24 +1196,26 @@ def process(layer_name, lineset_name):
has_tex = True
if has_tex:
shaders_list.append(StrokeTextureStepShader(linestyle.texture_spacing))
+
+ # execute post-base stylization callbacks
+ for fn in callbacks_modifiers_post:
+ shaders_list.extend(fn(scene, layer, lineset))
+
# -- Stroke caps -- #
if linestyle.caps == 'ROUND':
shaders_list.append(RoundCapShader())
elif linestyle.caps == 'SQUARE':
shaders_list.append(SquareCapShader())
+
# -- Dashed line -- #
if linestyle.use_dashed_line:
- pattern = []
- if linestyle.dash1 > 0 and linestyle.gap1 > 0:
- pattern.append(linestyle.dash1)
- pattern.append(linestyle.gap1)
- if linestyle.dash2 > 0 and linestyle.gap2 > 0:
- pattern.append(linestyle.dash2)
- pattern.append(linestyle.gap2)
- if linestyle.dash3 > 0 and linestyle.gap3 > 0:
- pattern.append(linestyle.dash3)
- pattern.append(linestyle.gap3)
+ pattern = get_dashed_pattern(linestyle)
if len(pattern) > 0:
shaders_list.append(DashedLineShader(pattern))
+
# create strokes using the shaders list
Operators.create(TrueUP1D(), shaders_list)
+
+ # execute line set post-processing callback functions
+ for fn in callbacks_lineset_post:
+ fn(scene, layer, lineset)
diff --git a/release/scripts/modules/animsys_refactor.py b/release/scripts/modules/animsys_refactor.py
index aaa06c32312..39f0ad2f049 100644
--- a/release/scripts/modules/animsys_refactor.py
+++ b/release/scripts/modules/animsys_refactor.py
@@ -51,7 +51,7 @@ def classes_recursive(base_type, clss=None):
return clss
-class DataPathBuilder(object):
+class DataPathBuilder:
"""Dummy class used to parse fcurve and driver data paths."""
__slots__ = ("data_path", )
diff --git a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
index 8874ecceb77..835d1fc5195 100644
--- a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
+++ b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
@@ -821,9 +821,9 @@ def dump_messages(do_messages, do_checks, settings):
# Get strings from addons' categories.
for uid, label, tip in bpy.types.WindowManager.addon_filter[1]['items'](bpy.context.window_manager, bpy.context):
- process_msg(msgs, settings.DEFAULT_CONTEXT, label, "Addons' categories", reports, None, settings)
+ process_msg(msgs, settings.DEFAULT_CONTEXT, label, "Add-ons' categories", reports, None, settings)
if tip:
- process_msg(msgs, settings.DEFAULT_CONTEXT, tip, "Addons' categories", reports, None, settings)
+ process_msg(msgs, settings.DEFAULT_CONTEXT, tip, "Add-ons' categories", reports, None, settings)
# Get strings specific to translations' menu.
for lng in settings.LANGUAGES:
diff --git a/release/scripts/modules/bpy/__init__.py b/release/scripts/modules/bpy/__init__.py
index 3a2f9bde2c7..b0d2233b380 100644
--- a/release/scripts/modules/bpy/__init__.py
+++ b/release/scripts/modules/bpy/__init__.py
@@ -38,10 +38,10 @@ __all__ = (
from _bpy import types, props, app, data, context
# python modules
-from . import utils, path, ops
+from . import utils, path
# fake operator module
-ops = ops.ops_fake_module
+from .ops import ops_fake_module as ops
def main():
diff --git a/release/scripts/modules/bpy/ops.py b/release/scripts/modules/bpy/ops.py
index f5455ce5018..d3d9255123b 100644
--- a/release/scripts/modules/bpy/ops.py
+++ b/release/scripts/modules/bpy/ops.py
@@ -30,12 +30,13 @@ op_get_rna = ops_module.get_rna
op_get_instance = ops_module.get_instance
-class BPyOps(object):
+class BPyOps:
"""
Fake module like class.
bpy.ops
"""
+ __slots__ = ()
def __getattr__(self, module):
"""
@@ -68,7 +69,7 @@ class BPyOps(object):
return "<module like class 'bpy.ops'>"
-class BPyOpsSubMod(object):
+class BPyOpsSubMod:
"""
Utility class to fake submodules.
@@ -104,7 +105,7 @@ class BPyOpsSubMod(object):
return "<module like class 'bpy.ops.%s'>" % self._module
-class BPyOpsSubModOp(object):
+class BPyOpsSubModOp:
"""
Utility class to fake submodule operators.
diff --git a/release/scripts/modules/bpy_extras/keyconfig_utils.py b/release/scripts/modules/bpy_extras/keyconfig_utils.py
index c50b320dceb..1903f3c0e09 100644
--- a/release/scripts/modules/bpy_extras/keyconfig_utils.py
+++ b/release/scripts/modules/bpy_extras/keyconfig_utils.py
@@ -32,7 +32,10 @@ KM_HIERARCHY = [
('View2D', 'EMPTY', 'WINDOW', []), # view 2d navigation (per region)
('View2D Buttons List', 'EMPTY', 'WINDOW', []), # view 2d with buttons navigation
('Header', 'EMPTY', 'WINDOW', []), # header stuff (per region)
- ('Grease Pencil', 'EMPTY', 'WINDOW', []), # grease pencil stuff (per region)
+
+ ('Grease Pencil', 'EMPTY', 'WINDOW', [ # grease pencil stuff (per region)
+ ('Grease Pencil Stroke Edit Mode', 'EMPTY', 'WINDOW', []),
+ ]),
('3D View', 'VIEW_3D', 'WINDOW', [ # view 3d navigation and generic stuff (select, transform)
('Object Mode', 'EMPTY', 'WINDOW', []),
diff --git a/release/scripts/modules/bpy_extras/object_utils.py b/release/scripts/modules/bpy_extras/object_utils.py
index 01390760c76..13ef86b23c0 100644
--- a/release/scripts/modules/bpy_extras/object_utils.py
+++ b/release/scripts/modules/bpy_extras/object_utils.py
@@ -99,7 +99,7 @@ def add_object_align_init(context, operator):
return location * rotation
-def object_data_add(context, obdata, operator=None, use_active_layer=True):
+def object_data_add(context, obdata, operator=None, use_active_layer=True, name=None):
"""
Add an object using the view context and preference to to initialize the
location, rotation and layer.
@@ -110,6 +110,8 @@ def object_data_add(context, obdata, operator=None, use_active_layer=True):
:type obdata: valid object data type or None.
:arg operator: The operator, checked for location and rotation properties.
:type operator: :class:`bpy.types.Operator`
+ :arg name: Optional name
+ :type name: string
:return: the newly created object in the scene.
:rtype: :class:`bpy.types.ObjectBase`
"""
@@ -119,7 +121,10 @@ def object_data_add(context, obdata, operator=None, use_active_layer=True):
for ob in scene.objects:
ob.select = False
- obj_new = bpy.data.objects.new(obdata.name, obdata)
+ if name is None:
+ name = "Object" if obdata is None else obdata.name
+
+ obj_new = bpy.data.objects.new(name, obdata)
base = scene.objects.link(obj_new)
base.select = True
@@ -150,7 +155,7 @@ def object_data_add(context, obdata, operator=None, use_active_layer=True):
obj_act.mode == 'EDIT' and
obj_act.type == obj_new.type):
- _obdata = bpy.data.meshes.new(obdata.name)
+ _obdata = bpy.data.meshes.new(name)
obj_act = bpy.data.objects.new(_obdata.name, _obdata)
obj_act.matrix_world = obj_new.matrix_world
scene.objects.link(obj_act)
@@ -169,7 +174,8 @@ def object_data_add(context, obdata, operator=None, use_active_layer=True):
#scene.objects.active = obj_new
bpy.ops.object.join() # join into the active.
- bpy.data.meshes.remove(obdata)
+ if obdata:
+ bpy.data.meshes.remove(obdata)
# base is freed, set to active object
base = scene.object_bases.active
diff --git a/release/scripts/modules/bpyml.py b/release/scripts/modules/bpyml.py
index e942006010b..f2a73501672 100644
--- a/release/scripts/modules/bpyml.py
+++ b/release/scripts/modules/bpyml.py
@@ -57,7 +57,7 @@ class ReturnStore(tuple):
return tuple.__getitem__(self, key)
-class FunctionStore(object):
+class FunctionStore:
def __call__(self, **kwargs):
return ReturnStore((self.__class__.__name__, kwargs, []))
diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py
index 3643ad89ea6..353362ed168 100644
--- a/release/scripts/modules/rna_info.py
+++ b/release/scripts/modules/rna_info.py
@@ -487,6 +487,12 @@ def GetInfoOperatorRNA(bl_rna):
def BuildRNAInfo():
+
+ # needed on successive calls to prevent stale data access
+ for cls in (InfoStructRNA, InfoFunctionRNA, InfoOperatorRNA, InfoPropertyRNA):
+ cls.global_lookup.clear()
+ del cls
+
# Use for faster lookups
# use rna_struct.identifier as the key for each dict
rna_struct_dict = {} # store identifier:rna lookups
diff --git a/release/scripts/presets/interface_theme/back_to_black.xml b/release/scripts/presets/interface_theme/back_to_black.xml
index 0d377f9af68..6520d81b900 100644
--- a/release/scripts/presets/interface_theme/back_to_black.xml
+++ b/release/scripts/presets/interface_theme/back_to_black.xml
@@ -5,6 +5,7 @@
menu_shadow_width="12"
icon_file=""
icon_alpha="1"
+ widget_emboss="#ffffff05"
axis_x="#dc0000"
axis_y="#00dc00"
axis_z="#0000dc">
@@ -747,6 +748,7 @@
<ThemeNodeEditor node_selected="#ffffff"
node_active="#ffffff"
wire="#6eafff"
+ wire_inner="#737373"
wire_select="#0019ff"
selected_text="#7f7070"
node_backdrop="#202030bc"
@@ -970,7 +972,6 @@
locked_marker="#7f7f7f"
path_before="#ff0000"
path_after="#0000ff"
- grid="#5e5e5e"
frame_current="#1b501b"
strips="#0c0a0a"
strips_selected="#ff8c00"
diff --git a/release/scripts/presets/interface_theme/blender_24x.xml b/release/scripts/presets/interface_theme/blender_24x.xml
index ef452aff353..bb9b03d56ea 100644
--- a/release/scripts/presets/interface_theme/blender_24x.xml
+++ b/release/scripts/presets/interface_theme/blender_24x.xml
@@ -5,6 +5,7 @@
menu_shadow_width="12"
icon_file=""
icon_alpha="1"
+ widget_emboss="#ffffff05"
axis_x="#dc0000"
axis_y="#00dc00"
axis_z="#0000dc">
@@ -245,8 +246,8 @@
camera="#000000"
view_overlay="#000000"
empty="#000000"
- object_selected="#f15800"
- object_active="#ffaa40"
+ object_selected="#dcaedc"
+ object_active="#ff88ff"
object_grouped="#083008"
object_grouped_active="#55bb55"
transform="#ffffff"
@@ -433,18 +434,18 @@
<nla_editor>
<ThemeNLAEditor grid="#5e5e5e"
view_sliders="#969696"
- active_action="#00000000"
- active_action_unset="#00000000"
+ active_action="#cc701a66"
+ active_action_unset="#9987614d"
strips="#0c0a0a"
strips_selected="#ff8c00"
- transition_strips="#000000"
- transition_strips_selected="#000000"
- meta_strips="#000000"
- meta_strips_selected="#000000"
- sound_strips="#000000"
- sound_strips_selected="#000000"
- tweak="#000000"
- tweak_duplicate="#000000"
+ transition_strips="#1c2630"
+ transition_strips_selected="#2e75db"
+ meta_strips="#332642"
+ meta_strips_selected="#692196"
+ sound_strips="#2b3d3d"
+ sound_strips_selected="#1f7a7a"
+ tweak="#4df31a"
+ tweak_duplicate="#d90000"
keyframe_border="#000000ff"
keyframe_border_selected="#000000ff"
frame_current="#60c040">
@@ -505,7 +506,7 @@
keyframe_jitter_selected="#61c042"
keyframe_border="#000000ff"
keyframe_border_selected="#000000ff"
- summary="#00000000">
+ summary="#cc701a66">
<space>
<ThemeSpaceGeneric back="#a0a0a0"
title="#000000"
@@ -747,6 +748,7 @@
<ThemeNodeEditor node_selected="#ffffff"
node_active="#ffffff"
wire="#000000"
+ wire_inner="#737373"
wire_select="#ffffff"
selected_text="#7f7070"
node_backdrop="#9b9b9ba0"
@@ -970,7 +972,6 @@
locked_marker="#7f7f7f"
path_before="#ff0000"
path_after="#0000ff"
- grid="#5e5e5e"
frame_current="#60c040"
strips="#0c0a0a"
strips_selected="#ff8c00"
diff --git a/release/scripts/presets/interface_theme/elsyiun.xml b/release/scripts/presets/interface_theme/elsyiun.xml
index 9b9804b5511..6734850f876 100644
--- a/release/scripts/presets/interface_theme/elsyiun.xml
+++ b/release/scripts/presets/interface_theme/elsyiun.xml
@@ -5,6 +5,7 @@
menu_shadow_width="12"
icon_file=""
icon_alpha="1"
+ widget_emboss="#ffffff05"
axis_x="#dc0000"
axis_y="#00dc00"
axis_z="#0000dc">
@@ -433,18 +434,18 @@
<nla_editor>
<ThemeNLAEditor grid="#585858"
view_sliders="#969696"
- active_action="#00000000"
- active_action_unset="#00000000"
+ active_action="#cc701a66"
+ active_action_unset="#9987614d"
strips="#0c0a0a"
strips_selected="#ff8c00"
- transition_strips="#000000"
- transition_strips_selected="#000000"
- meta_strips="#000000"
- meta_strips_selected="#000000"
- sound_strips="#000000"
- sound_strips_selected="#000000"
- tweak="#000000"
- tweak_duplicate="#000000"
+ transition_strips="#1c2630"
+ transition_strips_selected="#2e75db"
+ meta_strips="#332642"
+ meta_strips_selected="#692196"
+ sound_strips="#2b3d3d"
+ sound_strips_selected="#1f7a7a"
+ tweak="#4df31a"
+ tweak_duplicate="#d90000"
keyframe_border="#000000ff"
keyframe_border_selected="#000000ff"
frame_current="#60c040">
@@ -505,7 +506,7 @@
keyframe_jitter_selected="#61c042"
keyframe_border="#000000ff"
keyframe_border_selected="#000000ff"
- summary="#00000000">
+ summary="#cc701a66">
<space>
<ThemeSpaceGeneric back="#4b4b4b"
title="#000000"
@@ -747,6 +748,7 @@
<ThemeNodeEditor node_selected="#ffffff"
node_active="#ffffff"
wire="#000000"
+ wire_inner="#737373"
wire_select="#ffffff"
selected_text="#7f7070"
node_backdrop="#9b9b9ba0"
@@ -970,7 +972,6 @@
locked_marker="#7f7f7f"
path_before="#ff0000"
path_after="#0000ff"
- grid="#5e5e5e"
frame_current="#60c040"
strips="#0c0a0a"
strips_selected="#ff8c00"
diff --git a/release/scripts/presets/interface_theme/graph.xml b/release/scripts/presets/interface_theme/graph.xml
index 669fb936948..1cb9a8985e4 100644
--- a/release/scripts/presets/interface_theme/graph.xml
+++ b/release/scripts/presets/interface_theme/graph.xml
@@ -5,6 +5,7 @@
menu_shadow_width="12"
icon_file=""
icon_alpha="1"
+ widget_emboss="#ffffff05"
axis_x="#dc0000"
axis_y="#00dc00"
axis_z="#0000dc">
@@ -286,6 +287,7 @@
editmesh_active="#00f6ff5e"
normal="#22dddd"
vertex_normal="#2361dd"
+ split_normal="#dd23dd"
bone_solid="#ffffff"
bone_pose="#00b5ff"
bone_pose_active="#fff3fa"
@@ -432,18 +434,18 @@
<nla_editor>
<ThemeNLAEditor grid="#6e6e6e"
view_sliders="#969696"
- active_action="#00000000"
- active_action_unset="#00000000"
+ active_action="#cc701a66"
+ active_action_unset="#9987614d"
strips="#0c0a0a"
strips_selected="#ff8c00"
- transition_strips="#000000"
- transition_strips_selected="#000000"
- meta_strips="#000000"
- meta_strips_selected="#000000"
- sound_strips="#000000"
- sound_strips_selected="#000000"
- tweak="#000000"
- tweak_duplicate="#000000"
+ transition_strips="#1c2630"
+ transition_strips_selected="#2e75db"
+ meta_strips="#332642"
+ meta_strips_selected="#692196"
+ sound_strips="#2b3d3d"
+ sound_strips_selected="#1f7a7a"
+ tweak="#4df31a"
+ tweak_duplicate="#d90000"
keyframe_border="#000000ff"
keyframe_border_selected="#000000ff"
frame_current="#4291dc">
@@ -746,6 +748,7 @@
<ThemeNodeEditor node_selected="#fff4f8"
node_active="#ffffff"
wire="#292929"
+ wire_inner="#737373"
wire_select="#ffffff"
selected_text="#909090"
node_backdrop="#444444ff"
@@ -969,7 +972,6 @@
locked_marker="#7f7f7f"
path_before="#ff0000"
path_after="#0000ff"
- grid="#5e5e5e"
frame_current="#60c040"
strips="#0c0a0a"
strips_selected="#ff8c00"
diff --git a/release/scripts/presets/interface_theme/hexagon.xml b/release/scripts/presets/interface_theme/hexagon.xml
index 6f24d989e79..40228e832a7 100644
--- a/release/scripts/presets/interface_theme/hexagon.xml
+++ b/release/scripts/presets/interface_theme/hexagon.xml
@@ -5,6 +5,7 @@
menu_shadow_width="12"
icon_file=""
icon_alpha="1"
+ widget_emboss="#ffffff05"
axis_x="#dc0000"
axis_y="#00dc00"
axis_z="#0000dc">
@@ -433,18 +434,18 @@
<nla_editor>
<ThemeNLAEditor grid="#5e5e5e"
view_sliders="#969696"
- active_action="#00000000"
- active_action_unset="#00000000"
+ active_action="#cc701a66"
+ active_action_unset="#9987614d"
strips="#0c0a0a"
strips_selected="#ff8c00"
- transition_strips="#000000"
- transition_strips_selected="#000000"
- meta_strips="#000000"
- meta_strips_selected="#000000"
- sound_strips="#000000"
- sound_strips_selected="#000000"
- tweak="#000000"
- tweak_duplicate="#000000"
+ transition_strips="#1c2630"
+ transition_strips_selected="#2e75db"
+ meta_strips="#332642"
+ meta_strips_selected="#692196"
+ sound_strips="#2b3d3d"
+ sound_strips_selected="#1f7a7a"
+ tweak="#4df31a"
+ tweak_duplicate="#d90000"
keyframe_border="#000000ff"
keyframe_border_selected="#000000ff"
frame_current="#60c040">
@@ -505,7 +506,7 @@
keyframe_jitter_selected="#61c042"
keyframe_border="#000000ff"
keyframe_border_selected="#000000ff"
- summary="#00000000">
+ summary="#cc701a66">
<space>
<ThemeSpaceGeneric back="#7c7e88"
title="#000000"
@@ -747,6 +748,7 @@
<ThemeNodeEditor node_selected="#ffffff"
node_active="#ffffff"
wire="#000000"
+ wire_inner="#737373"
wire_select="#ffffff"
selected_text="#7f7070"
node_backdrop="#9b9baca0"
@@ -970,7 +972,6 @@
locked_marker="#7f7f7f"
path_before="#ff0000"
path_after="#0000ff"
- grid="#5e5e5e"
frame_current="#60c040"
strips="#0c0a0a"
strips_selected="#ff8c00"
diff --git a/release/scripts/presets/interface_theme/science_lab.xml b/release/scripts/presets/interface_theme/science_lab.xml
index f591c2f448e..98dddfb0014 100644
--- a/release/scripts/presets/interface_theme/science_lab.xml
+++ b/release/scripts/presets/interface_theme/science_lab.xml
@@ -5,6 +5,7 @@
menu_shadow_width="12"
icon_file=""
icon_alpha="1"
+ widget_emboss="#ffffff05"
axis_x="#dc4800"
axis_y="#73dc00"
axis_z="#00c2ff">
@@ -286,6 +287,7 @@
editmesh_active="#e4ffebab"
normal="#22dddd"
vertex_normal="#2361dd"
+ split_normal="#dd23dd"
bone_solid="#2890e8"
bone_pose="#50c8ff"
bone_pose_active="#8cffff"
@@ -746,6 +748,7 @@
<ThemeNodeEditor node_selected="#6ebdff"
node_active="#fefff3"
wire="#9effc5"
+ wire_inner="#737373"
wire_select="#99d9ff"
selected_text="#7f7070"
node_backdrop="#9b9b9bb9"
@@ -969,7 +972,6 @@
locked_marker="#7f7f7f"
path_before="#ff0000"
path_after="#0000ff"
- grid="#5e5e5e"
frame_current="#60c040"
strips="#0c0a0a"
strips_selected="#ff8c00"
@@ -1125,21 +1127,21 @@
<panel_title>
<ThemeFontStyle points="12"
font_kerning_style="FITTED"
- shadow="4"
+ shadow="1"
shadow_offset_x="0"
- shadow_offset_y="0"
- shadow_alpha="0.3"
- shadow_value="0">
+ shadow_offset_y="-1"
+ shadow_alpha="0.15"
+ shadow_value="1">
</ThemeFontStyle>
</panel_title>
<widget_label>
- <ThemeFontStyle points="12"
+ <ThemeFontStyle points="11"
font_kerning_style="FITTED"
- shadow="4"
+ shadow="3"
shadow_offset_x="0"
- shadow_offset_y="0"
- shadow_alpha="0.5"
- shadow_value="0">
+ shadow_offset_y="-1"
+ shadow_alpha="0.15"
+ shadow_value="1">
</ThemeFontStyle>
</widget_label>
<widget>
@@ -1147,7 +1149,7 @@
font_kerning_style="FITTED"
shadow="0"
shadow_offset_x="0"
- shadow_offset_y="-1"
+ shadow_offset_y="0"
shadow_alpha="0.25"
shadow_value="0">
</ThemeFontStyle>
diff --git a/release/scripts/presets/interface_theme/softimage.xml b/release/scripts/presets/interface_theme/softimage.xml
index b1cbed39150..d58e04619ed 100644
--- a/release/scripts/presets/interface_theme/softimage.xml
+++ b/release/scripts/presets/interface_theme/softimage.xml
@@ -5,6 +5,7 @@
menu_shadow_width="12"
icon_file=""
icon_alpha="1"
+ widget_emboss="#ffffff05"
axis_x="#ff5a5a"
axis_y="#58ff58"
axis_z="#6262ff">
@@ -747,6 +748,7 @@
<ThemeNodeEditor node_selected="#ffffff"
node_active="#ffffff"
wire="#222222"
+ wire_inner="#737373"
wire_select="#ffffff"
selected_text="#ffffff"
node_backdrop="#d4d4d4ff"
@@ -970,7 +972,6 @@
locked_marker="#7f7f7f"
path_before="#22d8d1"
path_after="#5a7575"
- grid="#5e5e5e"
frame_current="#f06868"
strips="#0c0a0a"
strips_selected="#ff8c00"
@@ -1127,9 +1128,9 @@
<ThemeFontStyle points="12"
font_kerning_style="FITTED"
shadow="1"
- shadow_offset_x="1"
+ shadow_offset_x="0"
shadow_offset_y="-1"
- shadow_alpha="0.278"
+ shadow_alpha="0.15"
shadow_value="1">
</ThemeFontStyle>
</panel_title>
diff --git a/release/scripts/presets/interface_theme/ubuntu_ambiance.xml b/release/scripts/presets/interface_theme/ubuntu_ambiance.xml
index e702e25bc86..b2743f36c02 100644
--- a/release/scripts/presets/interface_theme/ubuntu_ambiance.xml
+++ b/release/scripts/presets/interface_theme/ubuntu_ambiance.xml
@@ -5,6 +5,7 @@
menu_shadow_width="12"
icon_file=""
icon_alpha="1"
+ widget_emboss="#ffffff05"
axis_x="#dc0000"
axis_y="#00dc00"
axis_z="#0000dc">
@@ -433,18 +434,18 @@
<nla_editor>
<ThemeNLAEditor grid="#5c5c52"
view_sliders="#969696"
- active_action="#00000000"
- active_action_unset="#00000000"
+ active_action="#cc701a66"
+ active_action_unset="#9987614d"
strips="#0c0a0a"
strips_selected="#6b395a"
- transition_strips="#000000"
- transition_strips_selected="#000000"
- meta_strips="#000000"
- meta_strips_selected="#000000"
- sound_strips="#000000"
- sound_strips_selected="#000000"
- tweak="#000000"
- tweak_duplicate="#000000"
+ transition_strips="#1c2630"
+ transition_strips_selected="#2e75db"
+ meta_strips="#332642"
+ meta_strips_selected="#692196"
+ sound_strips="#2b3d3d"
+ sound_strips_selected="#1f7a7a"
+ tweak="#4df31a"
+ tweak_duplicate="#d90000"
keyframe_border="#000000ff"
keyframe_border_selected="#000000ff"
frame_current="#f58032">
@@ -505,7 +506,7 @@
keyframe_jitter_selected="#61c042"
keyframe_border="#000000ff"
keyframe_border_selected="#000000ff"
- summary="#00000000">
+ summary="#cc701a66">
<space>
<ThemeSpaceGeneric back="#131311"
title="#9c9c9c"
@@ -747,6 +748,7 @@
<ThemeNodeEditor node_selected="#ffffff"
node_active="#ffffff"
wire="#f45b00"
+ wire_inner="#737373"
wire_select="#f4b696"
selected_text="#7f7070"
node_backdrop="#52524ed1"
@@ -970,7 +972,6 @@
locked_marker="#7f7f7f"
path_before="#ff5100"
path_after="#19b6ee"
- grid="#302e2c"
frame_current="#f47421"
strips="#0c0a0a"
strips_selected="#ff8c00"
diff --git a/release/scripts/startup/bl_operators/rigidbody.py b/release/scripts/startup/bl_operators/rigidbody.py
index 9a3aae53ceb..237c2d55672 100644
--- a/release/scripts/startup/bl_operators/rigidbody.py
+++ b/release/scripts/startup/bl_operators/rigidbody.py
@@ -64,17 +64,19 @@ class CopyRigidbodySettings(Operator):
for o in context.selected_objects:
if o.type != 'MESH':
o.select = False
+ elif o.rigid_body is None:
+ # Add rigidbody to object!
+ scene.objects.active = o
+ bpy.ops.rigidbody.object_add()
+ scene.objects.active = obj_act
objects = context.selected_objects
if objects:
- # add selected objects to active one groups and recalculate
- bpy.ops.group.objects_add_active()
- scene.frame_set(scene.frame_current)
rb_from = obj_act.rigid_body
# copy settings
for o in objects:
rb_to = o.rigid_body
- if (o == obj_act) or (rb_to is None):
+ if o == obj_act:
continue
for attr in self._attrs:
setattr(rb_to, attr, getattr(rb_from, attr))
diff --git a/release/scripts/startup/bl_operators/uvcalc_lightmap.py b/release/scripts/startup/bl_operators/uvcalc_lightmap.py
index 8f618e0632e..a120e2b2461 100644
--- a/release/scripts/startup/bl_operators/uvcalc_lightmap.py
+++ b/release/scripts/startup/bl_operators/uvcalc_lightmap.py
@@ -23,7 +23,7 @@ from bpy.types import Operator
import mathutils
-class prettyface(object):
+class prettyface:
__slots__ = (
"uv",
"width",
diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
index aa8a1742c1e..73e6bcd9b0c 100644
--- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py
+++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
@@ -670,7 +670,7 @@ def VectoQuat(vec):
return vec.to_track_quat('Z', 'X' if abs(vec.x) > 0.5 else 'Y').inverted()
-class thickface(object):
+class thickface:
__slost__= "v", "uv", "no", "area", "edge_keys"
def __init__(self, face, uv_layer, mesh_verts):
self.v = [mesh_verts[i] for i in face.vertices]
@@ -708,6 +708,7 @@ def main(context,
island_margin,
projection_limit,
user_area_weight,
+ use_aspect
):
global USER_FILL_HOLES
global USER_FILL_HOLES_QUALITY
@@ -720,7 +721,6 @@ def main(context,
global dict_matrix
dict_matrix = {}
-
# Constants:
# Takes a list of faces that make up a UV island and rotate
# until they optimally fit inside a square.
@@ -992,9 +992,31 @@ def main(context,
print("Smart Projection time: %.2f" % (time.time() - time1))
# Window.DrawProgressBar(0.9, "Smart Projections done, time: %.2f sec" % (time.time() - time1))
+ # aspect correction is only done in edit mode - and only smart unwrap supports currently
if is_editmode:
bpy.ops.object.mode_set(mode='EDIT')
+ if use_aspect:
+ import bmesh
+ aspect = context.scene.uvedit_aspect(context.active_object)
+ if aspect[0] > aspect[1]:
+ aspect[0] = aspect[1]/aspect[0];
+ aspect[1] = 1.0
+ else:
+ aspect[1] = aspect[0]/aspect[1];
+ aspect[0] = 1.0
+
+ bm = bmesh.from_edit_mesh(me)
+
+ uv_act = bm.loops.layers.uv.active
+
+ faces = [f for f in bm.faces if f.select]
+
+ for f in faces:
+ for l in f.loops:
+ l[uv_act].uv[0] *= aspect[0]
+ l[uv_act].uv[1] *= aspect[1]
+
dict_matrix.clear()
#XXX Window.DrawProgressBar(1.0, "")
@@ -1017,7 +1039,7 @@ def main(context,
]
"""
-from bpy.props import FloatProperty
+from bpy.props import FloatProperty, BoolProperty
class SmartProject(Operator):
@@ -1046,6 +1068,11 @@ class SmartProject(Operator):
min=0.0, max=1.0,
default=0.0,
)
+ use_aspect = BoolProperty(
+ name="Correct Aspect",
+ description="Map UVs taking image aspect ratio into account",
+ default=True
+ )
@classmethod
def poll(cls, context):
@@ -1056,6 +1083,7 @@ class SmartProject(Operator):
self.island_margin,
self.angle_limit,
self.user_area_weight,
+ self.use_aspect
)
return {'FINISHED'}
diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py
index 6b72ef12dcc..6174dd95f2a 100644
--- a/release/scripts/startup/bl_ui/__init__.py
+++ b/release/scripts/startup/bl_ui/__init__.py
@@ -99,10 +99,10 @@ def register():
def addon_filter_items(self, context):
import addon_utils
- items = [('All', "All", "All Addons"),
- ('User', "User", "All Addons Installed by User"),
- ('Enabled', "Enabled", "All Enabled Addons"),
- ('Disabled', "Disabled", "All Disabled Addons"),
+ items = [('All', "All", "All Add-ons"),
+ ('User', "User", "All Add-ons Installed by User"),
+ ('Enabled', "Enabled", "All Enabled Add-ons"),
+ ('Disabled', "Disabled", "All Disabled Add-ons"),
]
items_unique = set()
diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py
index c6823f17153..6a8f9c586ed 100644
--- a/release/scripts/startup/bl_ui/properties_data_armature.py
+++ b/release/scripts/startup/bl_ui/properties_data_armature.py
@@ -144,6 +144,7 @@ class DATA_PT_bone_groups(ArmatureButtonsPanel, Panel):
if group.color_set:
col = split.column()
sub = col.row(align=True)
+ sub.enabled = group.is_custom_color_set # only custom colors are editable
sub.prop(group.colors, "normal", text="")
sub.prop(group.colors, "select", text="")
sub.prop(group.colors, "active", text="")
diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py
index 909c6ab0b56..7178e176c3b 100644
--- a/release/scripts/startup/bl_ui/properties_data_mesh.py
+++ b/release/scripts/startup/bl_ui/properties_data_mesh.py
@@ -29,7 +29,7 @@ class MESH_MT_vertex_group_specials(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("object.vertex_group_sort", icon='SORTALPHA').sort_type = "NAME"
+ layout.operator("object.vertex_group_sort", icon='SORTALPHA', text="Sort by Name").sort_type = "NAME"
layout.operator("object.vertex_group_sort", icon='ARMATURE_DATA', text="Sort by Bone Hierarchy").sort_type = "BONE_HIERARCHY"
layout.operator("object.vertex_group_copy", icon='COPY_ID')
layout.operator("object.vertex_group_copy_to_linked", icon='LINK_AREA')
@@ -58,6 +58,8 @@ class MESH_MT_shape_key_specials(Menu):
layout.operator("object.shape_key_mirror", text="Mirror Shape Key (Topology)", icon='ARROW_LEFTRIGHT').use_topology = True
layout.operator("object.shape_key_add", icon='ZOOMIN', text="New Shape From Mix").from_mix = True
layout.operator("object.shape_key_remove", icon='X', text="Delete All Shapes").all = True
+ layout.operator("object.shape_key_move", icon='TRIA_UP_BAR', text="Move To Top").type = 'TOP'
+ layout.operator("object.shape_key_move", icon='TRIA_DOWN_BAR', text="Move To Bottom").type = 'BOTTOM'
class MESH_UL_vgroups(UIList):
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index efc430db50f..7a969963911 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -962,7 +962,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col = split.column()
col.template_ID(md, "texture", new="texture.new")
layout.prop(md, "texture_coords")
- if md.texture_coords == 'MAP_UV' and ob.type == 'MESH':
+ if md.texture_coords == 'UV' and ob.type == 'MESH':
layout.prop_search(md, "uv_layer", ob.data, "uv_textures")
elif md.texture_coords == 'OBJECT':
layout.prop(md, "texture_coords_object")
diff --git a/release/scripts/startup/bl_ui/properties_freestyle.py b/release/scripts/startup/bl_ui/properties_freestyle.py
index 6abd6f448f5..606842db01d 100644
--- a/release/scripts/startup/bl_ui/properties_freestyle.py
+++ b/release/scripts/startup/bl_ui/properties_freestyle.py
@@ -39,7 +39,7 @@ class RenderFreestyleButtonsPanel():
class RENDER_PT_freestyle(RenderFreestyleButtonsPanel, Panel):
bl_label = "Freestyle"
bl_options = {'DEFAULT_CLOSED'}
- COMPAT_ENGINES = {'BLENDER_RENDER', 'CYCLES'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw_header(self, context):
rd = context.scene.render
@@ -111,7 +111,7 @@ class RENDER_MT_lineset_specials(Menu):
class RENDERLAYER_PT_freestyle(RenderLayerFreestyleButtonsPanel, Panel):
bl_label = "Freestyle"
- COMPAT_ENGINES = {'BLENDER_RENDER', 'CYCLES'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
layout = self.layout
@@ -167,7 +167,7 @@ class RENDERLAYER_PT_freestyle(RenderLayerFreestyleButtonsPanel, Panel):
class RENDERLAYER_PT_freestyle_lineset(RenderLayerFreestyleEditorButtonsPanel, Panel):
bl_label = "Freestyle Line Set"
- COMPAT_ENGINES = {'BLENDER_RENDER', 'CYCLES'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw_edge_type_buttons(self, box, lineset, edge_type):
# property names
@@ -259,7 +259,7 @@ class RENDERLAYER_PT_freestyle_lineset(RenderLayerFreestyleEditorButtonsPanel, P
class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel, Panel):
bl_label = "Freestyle Line Style"
bl_options = {'DEFAULT_CLOSED'}
- COMPAT_ENGINES = {'BLENDER_RENDER', 'CYCLES'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw_modifier_box_header(self, box, modifier):
row = box.row()
@@ -719,7 +719,7 @@ class MaterialFreestyleButtonsPanel():
class MATERIAL_PT_freestyle_line(MaterialFreestyleButtonsPanel, Panel):
bl_label = "Freestyle Line"
bl_options = {'DEFAULT_CLOSED'}
- COMPAT_ENGINES = {'BLENDER_RENDER', 'CYCLES'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
layout = self.layout
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 4789d119192..82f18a15469 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -19,11 +19,34 @@
# <pep8 compliant>
-class GreasePencilPanel():
+from bpy.types import Menu, UIList
+
+
+def gpencil_stroke_placement_settings(context, layout, gpd):
+ col = layout.column(align=True)
+
+ col.label(text="Stroke Placement:")
+
+ row = col.row(align=True)
+ row.prop_enum(gpd, "draw_mode", 'VIEW')
+ row.prop_enum(gpd, "draw_mode", 'CURSOR')
+
+ if context.space_data.type == 'VIEW_3D':
+ row = col.row(align=True)
+ row.prop_enum(gpd, "draw_mode", 'SURFACE')
+ row.prop_enum(gpd, "draw_mode", 'STROKE')
+
+ row = col.row(align=False)
+ row.active = gpd.draw_mode in {'SURFACE', 'STROKE'}
+ row.prop(gpd, "use_stroke_endpoints")
+
+
+class GreasePencilDrawingToolsPanel():
# subclass must set
# bl_space_type = 'IMAGE_EDITOR'
- # bl_region_type = 'TOOLS'
bl_label = "Grease Pencil"
+ bl_category = "Grease Pencil"
+ bl_region_type = 'TOOLS'
@staticmethod
def draw(self, context):
@@ -31,19 +54,421 @@ class GreasePencilPanel():
col = layout.column(align=True)
+ col.label(text="Draw:")
row = col.row(align=True)
row.operator("gpencil.draw", text="Draw").mode = 'DRAW'
- row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT'
+ row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
row = col.row(align=True)
+ row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT'
row.operator("gpencil.draw", text="Poly").mode = 'DRAW_POLY'
- row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
row = col.row(align=True)
- row.prop(context.tool_settings, "use_grease_pencil_sessions")
+ row.prop(context.tool_settings, "use_grease_pencil_sessions", text="Continuous Drawing")
+
+ if context.space_data.type in {'VIEW_3D', 'CLIP_EDITOR'}:
+ col.separator()
+ col.label("Data Source:")
+ row = col.row(align=True)
+ if context.space_data.type == 'VIEW_3D':
+ row.prop(context.tool_settings, "grease_pencil_source", expand=True)
+ elif context.space_data.type == 'CLIP_EDITOR':
+ row.prop(context.space_data, "grease_pencil_source", expand=True)
+
+ gpd = context.gpencil_data
+ if gpd:
+ col.separator()
+ gpencil_stroke_placement_settings(context, col, gpd)
if context.space_data.type == 'VIEW_3D':
col.separator()
+ col.separator()
- col.label(text="Measure:")
+ col.label(text="Tools:")
+ col.operator("gpencil.convert", text="Convert...")
col.operator("view3d.ruler")
+
+
+class GreasePencilStrokeEditPanel():
+ # subclass must set
+ # bl_space_type = 'IMAGE_EDITOR'
+ bl_label = "Edit Strokes"
+ bl_category = "Grease Pencil"
+ bl_region_type = 'TOOLS'
+
+ @classmethod
+ def poll(cls, context):
+ return (context.gpencil_data is not None)
+
+ @staticmethod
+ def draw(self, context):
+ layout = self.layout
+
+ gpd = context.gpencil_data
+ edit_ok = bool(context.editable_gpencil_strokes) and bool(gpd.use_stroke_edit_mode)
+
+ col = layout.column(align=True)
+ col.prop(gpd, "use_stroke_edit_mode", text="Enable Editing", icon='EDIT', toggle=True)
+
+ col.separator()
+
+ col.label(text="Select:")
+ subcol = col.column(align=True)
+ subcol.active = edit_ok
+ subcol.operator("gpencil.select_all", text="Select All")
+ subcol.operator("gpencil.select_border")
+ subcol.operator("gpencil.select_circle")
+
+ col.separator()
+
+ subcol = col.column(align=True)
+ subcol.active = edit_ok
+ subcol.operator("gpencil.select_linked")
+ subcol.operator("gpencil.select_more")
+ subcol.operator("gpencil.select_less")
+
+ col.separator()
+
+ col.label(text="Edit:")
+ subcol = col.column(align=True)
+ subcol.active = edit_ok
+ subcol.operator("gpencil.delete", text="Delete")
+ subcol.operator("gpencil.duplicate_move", text="Duplicate")
+ subcol.operator("transform.mirror", text="Mirror").gpencil_strokes = True
+
+ col.separator()
+
+ subcol = col.column(align=True)
+ subcol.active = edit_ok
+ subcol.operator("transform.translate").gpencil_strokes = True # icon='MAN_TRANS'
+ subcol.operator("transform.rotate").gpencil_strokes = True # icon='MAN_ROT'
+ subcol.operator("transform.resize", text="Scale").gpencil_strokes = True # icon='MAN_SCALE'
+
+ col.separator()
+
+ subcol = col.column(align=True)
+ subcol.active = edit_ok
+ subcol.operator("transform.bend", text="Bend").gpencil_strokes = True
+ subcol.operator("transform.shear", text="Shear").gpencil_strokes = True
+ subcol.operator("transform.tosphere", text="To Sphere").gpencil_strokes = True
+
+
+###############################
+
+class GPENCIL_PIE_tool_palette(Menu):
+ """A pie menu for quick access to Grease Pencil tools"""
+ bl_label = "Grease Pencil Tools"
+
+ def draw(self, context):
+ layout = self.layout
+
+ pie = layout.menu_pie()
+ gpd = context.gpencil_data
+
+ # W - Drawing Types
+ col = pie.column()
+ col.operator("gpencil.draw", text="Draw", icon='GREASEPENCIL').mode = 'DRAW'
+ col.operator("gpencil.draw", text="Straight Lines", icon='LINE_DATA').mode = 'DRAW_STRAIGHT'
+ col.operator("gpencil.draw", text="Poly", icon='MESH_DATA').mode = 'DRAW_POLY'
+
+ # E - Eraser
+ # XXX: needs a dedicated icon...
+ col = pie.column()
+ col.operator("gpencil.draw", text="Eraser", icon='FORCE_CURVE').mode = 'ERASER'
+
+ # E - "Settings" Palette is included here too, since it needs to be in a stable position...
+ if gpd and gpd.layers.active:
+ col.separator()
+ col.operator("wm.call_menu_pie", text="Settings...", icon='SCRIPTWIN').name = "GPENCIL_PIE_settings_palette"
+
+ # Editing tools
+ if gpd:
+ if gpd.use_stroke_edit_mode and context.editable_gpencil_strokes:
+ # S - Exit Edit Mode
+ pie.prop(gpd, "use_stroke_edit_mode", text="Exit Edit Mode", icon='EDIT')
+
+ # N - Transforms
+ col = pie.column()
+ row = col.row(align=True)
+ row.operator("transform.translate", icon='MAN_TRANS').gpencil_strokes = True
+ row.operator("transform.rotate", icon='MAN_ROT').gpencil_strokes = True
+ row.operator("transform.resize", text="Scale", icon='MAN_SCALE').gpencil_strokes = True
+ row = col.row(align=True)
+ row.label("Proportional Edit:")
+ row.prop(context.tool_settings, "proportional_edit", text="", icon_only=True)
+ row.prop(context.tool_settings, "proportional_edit_falloff", text="", icon_only=True)
+
+ # NW - Select (Non-Modal)
+ col = pie.column()
+ col.operator("gpencil.select_all", text="Select All", icon='PARTICLE_POINT')
+ col.operator("gpencil.select_all", text="Select Inverse", icon='BLANK1')
+ col.operator("gpencil.select_linked", text="Select Linked", icon='LINKED')
+
+ # NE - Select (Modal)
+ col = pie.column()
+ col.operator("gpencil.select_border", text="Border Select", icon='BORDER_RECT')
+ col.operator("gpencil.select_circle", text="Circle Select", icon='META_EMPTY')
+ col.operator("gpencil.select_lasso", text="Lasso Select", icon='BORDER_LASSO')
+
+ # SW - Edit Tools
+ col = pie.column()
+ col.operator("gpencil.duplicate_move", icon='PARTICLE_PATH', text="Duplicate")
+ col.operator("gpencil.delete", icon='X', text="Delete...")
+
+ # SE - More Tools
+ pie.operator("wm.call_menu_pie", text="More...").name = "GPENCIL_PIE_tools_more"
+ else:
+ # Toggle Edit Mode
+ pie.prop(gpd, "use_stroke_edit_mode", text="Enable Stroke Editing", icon='EDIT')
+
+
+class GPENCIL_PIE_settings_palette(Menu):
+ """A pie menu for quick access to Grease Pencil settings"""
+ bl_label = "Grease Pencil Settings"
+
+ @classmethod
+ def poll(cls, context):
+ return bool(context.gpencil_data and context.active_gpencil_layer)
+
+ def draw(self, context):
+ layout = self.layout
+
+ pie = layout.menu_pie()
+ # gpd = context.gpencil_data
+ gpl = context.active_gpencil_layer
+
+ # W - Stroke draw settings
+ col = pie.column(align=True)
+ col.label(text="Stroke")
+ col.prop(gpl, "color", text="")
+ col.prop(gpl, "alpha", text="", slider=True)
+
+ # E - Fill draw settings
+ col = pie.column(align=True)
+ col.label(text="Fill")
+ col.prop(gpl, "fill_color", text="")
+ col.prop(gpl, "fill_alpha", text="", slider=True)
+
+ # S - Layer settings
+ col = pie.column()
+ col.prop(gpl, "line_width", slider=True)
+ # col.prop(gpl, "use_volumetric_strokes")
+ col.prop(gpl, "use_onion_skinning")
+
+ # N - Active Layer
+ # XXX: this should show an operator to change the active layer instead
+ col = pie.column()
+ col.label("Active Layer: ")
+ col.prop(gpl, "info", text="")
+ # col.prop(gpd, "layers")
+ row = col.row()
+ row.prop(gpl, "lock")
+ row.prop(gpl, "hide")
+
+
+class GPENCIL_PIE_tools_more(Menu):
+ """A pie menu for accessing more Grease Pencil tools"""
+ bl_label = "More Grease Pencil Tools"
+
+ @classmethod
+ def poll(cls, context):
+ gpd = context.gpencil_data
+ return bool(gpd and gpd.use_stroke_edit_mode and context.editable_gpencil_strokes)
+
+ def draw(self, context):
+ layout = self.layout
+
+ pie = layout.menu_pie()
+ # gpd = context.gpencil_data
+
+ pie.operator("gpencil.select_more", icon='ZOOMIN')
+ pie.operator("gpencil.select_less", icon='ZOOMOUT')
+
+ pie.operator("transform.mirror", icon='MOD_MIRROR').gpencil_strokes = True
+ pie.operator("transform.bend", icon='MOD_SIMPLEDEFORM').gpencil_strokes = True
+ pie.operator("transform.shear", icon='MOD_TRIANGULATE').gpencil_strokes = True
+ pie.operator("transform.tosphere", icon='MOD_MULTIRES').gpencil_strokes = True
+
+ pie.operator("gpencil.convert", icon='OUTLINER_OB_CURVE')
+ pie.operator("wm.call_menu_pie", text="Back to Main Palette...").name = "GPENCIL_PIE_tool_palette"
+
+
+class GPENCIL_UL_layer(UIList):
+ def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
+ # assert(isinstance(item, bpy.types.GPencilLayer)
+ gpl = item
+
+ if self.layout_type in {'DEFAULT', 'COMPACT'}:
+ if gpl.lock:
+ layout.active = False
+
+ split = layout.split(percentage=0.2)
+ split.prop(gpl, "color", text="")
+ split.prop(gpl, "info", text="", emboss=False)
+
+ row = layout.row(align=True)
+ row.prop(gpl, "lock", text="", emboss=False)
+ row.prop(gpl, "hide", text="", emboss=False)
+ elif self.layout_type in {'GRID'}:
+ layout.alignment = 'CENTER'
+ layout.label(text="", icon_value=icon)
+
+
+class GreasePencilDataPanel():
+ # subclass must set
+ # bl_space_type = 'IMAGE_EDITOR'
+ bl_label = "Grease Pencil"
+ bl_region_type = 'UI'
+
+ @staticmethod
+ def draw_header(self, context):
+ self.layout.prop(context.space_data, "show_grease_pencil", text="")
+
+ @staticmethod
+ def draw(self, context):
+ layout = self.layout
+
+ # owner of Grease Pencil data
+ gpd_owner = context.gpencil_data_owner
+ gpd = context.gpencil_data
+
+ # Owner Selector
+ if context.space_data.type == 'VIEW_3D':
+ layout.prop(context.tool_settings, "grease_pencil_source", expand=True)
+ elif context.space_data.type == 'CLIP_EDITOR':
+ layout.prop(context.space_data, "grease_pencil_source", expand=True)
+
+ # Grease Pencil data selector
+ layout.template_ID(gpd_owner, "grease_pencil", new="gpencil.data_add", unlink="gpencil.data_unlink")
+
+ # Grease Pencil data...
+ if gpd:
+ self.draw_layers(context, layout, gpd)
+
+ def draw_layers(self, context, layout, gpd):
+ row = layout.row()
+
+ col = row.column()
+ col.template_list("GPENCIL_UL_layer", "", gpd, "layers", gpd.layers, "active_index", rows=5)
+
+ col = row.column()
+
+ sub = col.column(align=True)
+ sub.operator("gpencil.layer_add", icon='ZOOMIN', text="")
+ sub.operator("gpencil.layer_remove", icon='ZOOMOUT', text="")
+
+ gpl = context.active_gpencil_layer
+ if gpl:
+ col.separator()
+
+ sub = col.column(align=True)
+ sub.operator("gpencil.layer_move", icon='TRIA_UP', text="").type = 'UP'
+ sub.operator("gpencil.layer_move", icon='TRIA_DOWN', text="").type = 'DOWN'
+
+ if gpl:
+ self.draw_layer(layout, gpl)
+
+ def draw_layer(self, layout, gpl):
+ # layer settings
+ split = layout.split(percentage=0.5)
+ split.active = not gpl.lock
+
+ # Column 1 - Stroke
+ col = split.column(align=True)
+ col.label(text="Stroke:")
+ col.prop(gpl, "color", text="")
+ col.prop(gpl, "alpha", slider=True)
+
+ # Column 2 - Fill
+ col = split.column(align=True)
+ col.label(text="Fill:")
+ col.prop(gpl, "fill_color", text="")
+ col.prop(gpl, "fill_alpha", text="Opacity", slider=True)
+
+ # Options
+ split = layout.split(percentage=0.5)
+ split.active = not gpl.lock
+
+ col = split.column(align=True)
+ col.prop(gpl, "line_width", slider=True)
+ col.prop(gpl, "use_volumetric_strokes")
+
+ col = split.column(align=True)
+ col.prop(gpl, "show_x_ray")
+
+ # if debug:
+ # layout.prop(gpl, "show_points")
+
+ layout.separator()
+
+ # Full-Row - Frame Locking (and Delete Frame)
+ row = layout.row(align=True)
+ row.active = not gpl.lock
+
+ if gpl.active_frame:
+ lock_status = "Locked" if gpl.lock_frame else "Unlocked"
+ lock_label = "Frame: %d (%s)" % (gpl.active_frame.frame_number, lock_status)
+ else:
+ lock_label = "Lock Frame"
+ row.prop(gpl, "lock_frame", text=lock_label, icon='UNLOCKED')
+ row.operator("gpencil.active_frame_delete", text="", icon='X')
+
+ layout.separator()
+
+ # Onion skinning
+ col = layout.column(align=True)
+ col.active = not gpl.lock
+
+ row = col.row()
+ row.prop(gpl, "use_onion_skinning")
+ row.prop(gpl, "use_ghost_custom_colors", text="", icon='COLOR')
+
+ split = col.split(percentage=0.5)
+ split.active = gpl.use_onion_skinning
+
+ # - Before Frames
+ sub = split.column(align=True)
+ row = sub.row(align=True)
+ row.active = gpl.use_ghost_custom_colors
+ row.prop(gpl, "before_color", text="")
+ sub.prop(gpl, "ghost_before_range", text="Before")
+
+ # - After Frames
+ sub = split.column(align=True)
+ row = sub.row(align=True)
+ row.active = gpl.use_ghost_custom_colors
+ row.prop(gpl, "after_color", text="")
+ sub.prop(gpl, "ghost_after_range", text="After")
+
+
+class GreasePencilToolsPanel():
+ # subclass must set
+ # bl_space_type = 'IMAGE_EDITOR'
+ # bl_options = {'DEFAULT_CLOSED'}
+ bl_label = "Grease Pencil Settings"
+ bl_region_type = 'UI'
+
+ @classmethod
+ def poll(cls, context):
+ return (context.gpencil_data is not None)
+
+ @staticmethod
+ def draw(self, context):
+ layout = self.layout
+
+ # gpd_owner = context.gpencil_data_owner
+ gpd = context.gpencil_data
+
+ layout.prop(gpd, "use_stroke_edit_mode", text="Enable Editing", icon='EDIT', toggle=True)
+
+ layout.separator()
+
+ layout.label("Proportional Edit:")
+ row = layout.row()
+ row.prop(context.tool_settings, "proportional_edit", text="")
+ row.prop(context.tool_settings, "proportional_edit_falloff", text="")
+
+ layout.separator()
+ layout.separator()
+
+ gpencil_stroke_placement_settings(context, layout, gpd)
diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py
index faf0d4cb0e8..e491d3a7761 100644
--- a/release/scripts/startup/bl_ui/properties_texture.py
+++ b/release/scripts/startup/bl_ui/properties_texture.py
@@ -227,7 +227,7 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, Panel):
class TEXTURE_PT_preview(TextureButtonsPanel, Panel):
bl_label = "Preview"
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'CYCLES'}
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
def draw(self, context):
layout = self.layout
diff --git a/release/scripts/startup/bl_ui/properties_world.py b/release/scripts/startup/bl_ui/properties_world.py
index 0b6ce41eb5d..39a8986a20c 100644
--- a/release/scripts/startup/bl_ui/properties_world.py
+++ b/release/scripts/startup/bl_ui/properties_world.py
@@ -59,7 +59,7 @@ class WORLD_PT_context_world(WorldButtonsPanel, Panel):
elif world:
split.template_ID(space, "pin_id")
- if texture_count and rd.engine != 'CYCLES':
+ if texture_count:
split.label(text=str(texture_count), icon='TEXTURE')
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index 3382633af60..d2f2612c84e 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -21,7 +21,11 @@
import bpy
from bpy.types import Panel, Header, Menu, UIList
from bpy.app.translations import pgettext_iface as iface_
-from bl_ui.properties_grease_pencil_common import GreasePencilPanel
+from bl_ui.properties_grease_pencil_common import (
+ GreasePencilDrawingToolsPanel,
+ GreasePencilStrokeEditPanel,
+ GreasePencilDataPanel
+ )
class CLIP_UL_tracking_objects(UIList):
@@ -422,7 +426,9 @@ class CLIP_PT_tools_solve(CLIP_PT_tracking_panel, Panel):
col = layout.column()
row = col.row()
row.prop(settings, "use_tripod_solver", text="Tripod")
- row.prop(settings, "use_keyframe_selection", text="Keyframe")
+ sub = row.row()
+ sub.active = not settings.use_tripod_solver
+ sub.prop(settings, "use_keyframe_selection", text="Keyframe")
col = layout.column(align=True)
col.active = (not settings.use_tripod_solver and
@@ -1050,12 +1056,6 @@ class CLIP_PT_tools_mask(MASK_PT_tools, Panel):
# --- end mask ---
-class CLIP_PT_tools_grease_pencil(GreasePencilPanel, Panel):
- bl_space_type = 'CLIP_EDITOR'
- bl_region_type = 'TOOLS'
- bl_category = "Grease Pencil"
-
-
class CLIP_PT_footage(CLIP_PT_clip_view_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
@@ -1110,6 +1110,26 @@ class CLIP_PT_tools_scenesetup(Panel):
layout.operator("clip.setup_tracking_scene")
+# Grease Pencil properties
+class CLIP_PT_grease_pencil(GreasePencilDataPanel, CLIP_PT_clip_view_panel, Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'UI'
+ bl_options = {'DEFAULT_CLOSED'}
+
+ # NOTE: this is just a wrapper around the generic GP Panel
+ # But, this should only be visible in "clip" view
+
+
+# Grease Pencil drawing tools
+class CLIP_PT_tools_grease_pencil_draw(GreasePencilDrawingToolsPanel, Panel):
+ bl_space_type = 'CLIP_EDITOR'
+
+
+# Grease Pencil stroke editing tools
+class CLIP_PT_tools_grease_pencil_edit(GreasePencilStrokeEditPanel, Panel):
+ bl_space_type = 'CLIP_EDITOR'
+
+
class CLIP_MT_view(Menu):
bl_label = "View"
@@ -1152,7 +1172,8 @@ class CLIP_MT_view(Menu):
layout.separator()
layout.operator("screen.area_dupli")
- layout.operator("screen.screen_full_area")
+ layout.operator("screen.screen_full_area", text="Toggle Maximize Area")
+ layout.operator("screen.screen_full_area").use_hide_panels = True
class CLIP_MT_clip(Menu):
diff --git a/release/scripts/startup/bl_ui/space_console.py b/release/scripts/startup/bl_ui/space_console.py
index ec16cfd89be..327fb94cb95 100644
--- a/release/scripts/startup/bl_ui/space_console.py
+++ b/release/scripts/startup/bl_ui/space_console.py
@@ -70,7 +70,8 @@ class CONSOLE_MT_console(Menu):
layout.separator()
layout.operator("screen.area_dupli")
- layout.operator("screen.screen_full_area")
+ layout.operator("screen.screen_full_area", text="Toggle Maximize Area")
+ layout.operator("screen.screen_full_area").use_hide_panels = True
class CONSOLE_MT_language(Menu):
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index eeb08916416..0458ffe3377 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -91,6 +91,8 @@ def dopesheet_filter(layout, context, genericFiltersOnly=False):
row.prop(dopesheet, "show_speakers", text="")
if bpy.data.linestyles:
row.prop(dopesheet, "show_linestyles", text="")
+ if bpy.data.grease_pencil:
+ row.prop(dopesheet, "show_gpencil", text="")
#######################################
@@ -186,7 +188,8 @@ class DOPESHEET_MT_view(Menu):
layout.separator()
layout.operator("screen.area_dupli")
- layout.operator("screen.screen_full_area")
+ layout.operator("screen.screen_full_area", text="Toggle Maximize Area")
+ layout.operator("screen.screen_full_area").use_hide_panels = True
class DOPESHEET_MT_select(Menu):
@@ -364,14 +367,16 @@ class DOPESHEET_MT_gpencil_frame(Menu):
layout = self.layout
layout.menu("DOPESHEET_MT_key_transform", text="Transform")
-
- #layout.operator_menu_enum("action.snap", "type", text="Snap")
- #layout.operator_menu_enum("action.mirror", "type", text="Mirror")
+ layout.operator_menu_enum("action.snap", "type", text="Snap")
+ layout.operator_menu_enum("action.mirror", "type", text="Mirror")
layout.separator()
layout.operator("action.duplicate")
layout.operator("action.delete")
+ layout.separator()
+ layout.operator("action.keyframe_type")
+
#layout.separator()
#layout.operator("action.copy")
#layout.operator("action.paste")
diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py
index 3d39234ce08..5861bc0dc95 100644
--- a/release/scripts/startup/bl_ui/space_graph.py
+++ b/release/scripts/startup/bl_ui/space_graph.py
@@ -118,7 +118,8 @@ class GRAPH_MT_view(Menu):
layout.separator()
layout.operator("screen.area_dupli")
- layout.operator("screen.screen_full_area")
+ layout.operator("screen.screen_full_area", text="Toggle Maximize Area")
+ layout.operator("screen.screen_full_area").use_hide_panels = True
class GRAPH_MT_select(Menu):
@@ -188,10 +189,14 @@ class GRAPH_MT_channel(Menu):
layout.separator()
layout.operator("anim.channels_editable_toggle")
- layout.operator("anim.channels_visibility_set")
layout.operator_menu_enum("graph.extrapolation_type", "type", text="Extrapolation Mode")
layout.separator()
+ layout.operator("graph.hide", text="Hide Selected Curves").unselected = False
+ layout.operator("graph.hide", text="Hide Unselected Curves").unselected = True
+ layout.operator("graph.reveal")
+
+ layout.separator()
layout.operator("anim.channels_expand")
layout.operator("anim.channels_collapse")
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index 0b97a2dda28..a1da262d9f2 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -25,7 +25,11 @@ from bl_ui.properties_paint_common import (
brush_texpaint_common,
brush_mask_texture_settings,
)
-from bl_ui.properties_grease_pencil_common import GreasePencilPanel
+from bl_ui.properties_grease_pencil_common import (
+ GreasePencilDrawingToolsPanel,
+ GreasePencilStrokeEditPanel,
+ GreasePencilDataPanel
+ )
from bpy.app.translations import pgettext_iface as iface_
@@ -82,6 +86,7 @@ class IMAGE_MT_view(Menu):
layout.prop(uv, "show_other_objects")
if paint.brush and (context.image_paint_object or sima.mode == 'PAINT'):
layout.prop(uv, "show_texpaint")
+ layout.prop(toolsettings, "show_uv_local_view", text="Show same material")
layout.separator()
@@ -110,7 +115,8 @@ class IMAGE_MT_view(Menu):
layout.separator()
layout.operator("screen.area_dupli")
- layout.operator("screen.screen_full_area")
+ layout.operator("screen.screen_full_area", text="Toggle Maximize Area")
+ layout.operator("screen.screen_full_area").use_hide_panels = True
class IMAGE_MT_select(Menu):
@@ -1147,10 +1153,21 @@ class IMAGE_PT_scope_sample(Panel):
sub.prop(sima.scopes, "accuracy")
-class IMAGE_PT_tools_grease_pencil(GreasePencilPanel, Panel):
+# Grease Pencil properties
+class IMAGE_PT_grease_pencil(GreasePencilDataPanel, Panel):
+ bl_space_type = 'IMAGE_EDITOR'
+ bl_region_type = 'UI'
+
+ # NOTE: this is just a wrapper around the generic GP Panel
+
+# Grease Pencil drawing tools
+class IMAGE_PT_tools_grease_pencil_draw(GreasePencilDrawingToolsPanel, Panel):
+ bl_space_type = 'IMAGE_EDITOR'
+
+
+# Grease Pencil stroke editing tools
+class IMAGE_PT_tools_grease_pencil_edit(GreasePencilStrokeEditPanel, Panel):
bl_space_type = 'IMAGE_EDITOR'
- bl_region_type = 'TOOLS'
- bl_category = "Grease Pencil"
if __name__ == "__main__": # only for live edit.
diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py
index 67b2bbe1905..2b075128fef 100644
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@ -57,12 +57,15 @@ class INFO_HT_header(Header):
row = layout.row(align=True)
if bpy.app.autoexec_fail is True and bpy.app.autoexec_fail_quiet is False:
- row.label("Auto-run disabled: %s" % bpy.app.autoexec_fail_message, icon='ERROR')
+ row.label("Auto-run disabled", icon='ERROR')
if bpy.data.is_saved:
props = row.operator("wm.revert_mainfile", icon='SCREEN_BACK', text="Reload Trusted")
props.use_scripts = True
row.operator("script.autoexec_warn_clear", text="Ignore")
+
+ # include last so text doesn't push buttons out of the header
+ row.label(bpy.app.autoexec_fail_message)
return
row.operator("wm.splash", text="", icon='BLENDER', emboss=False)
@@ -276,7 +279,7 @@ class INFO_MT_help(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("wm.url_open", text="Manual", icon='HELP').url = "http://wiki.blender.org/index.php/Doc:2.6/Manual"
+ layout.operator("wm.url_open", text="Manual", icon='HELP').url = "http://www.blender.org/manual"
layout.operator("wm.url_open", text="Release Log", icon='URL').url = "http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/%d.%d" % bpy.app.version[:2]
layout.separator()
diff --git a/release/scripts/startup/bl_ui/space_logic.py b/release/scripts/startup/bl_ui/space_logic.py
index 9792a26d224..16182da1018 100644
--- a/release/scripts/startup/bl_ui/space_logic.py
+++ b/release/scripts/startup/bl_ui/space_logic.py
@@ -120,7 +120,8 @@ class LOGIC_MT_view(Menu):
layout.separator()
layout.operator("screen.area_dupli")
- layout.operator("screen.screen_full_area")
+ layout.operator("screen.screen_full_area", text="Toggle Maximize Area")
+ layout.operator("screen.screen_full_area").use_hide_panels = True
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 7634620cf0d..b748e904f31 100644
--- a/release/scripts/startup/bl_ui/space_nla.py
+++ b/release/scripts/startup/bl_ui/space_nla.py
@@ -89,7 +89,8 @@ class NLA_MT_view(Menu):
layout.separator()
layout.operator("screen.area_dupli")
- layout.operator("screen.screen_full_area")
+ layout.operator("screen.screen_full_area", text="Toggle Maximize Area")
+ layout.operator("screen.screen_full_area").use_hide_panels = True
class NLA_MT_select(Menu):
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index 24e8d2e4a53..4cc72f1dc4b 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -19,6 +19,12 @@
# <pep8 compliant>
import bpy
from bpy.types import Header, Menu, Panel
+from bl_ui.properties_grease_pencil_common import (
+ GreasePencilDrawingToolsPanel,
+ GreasePencilStrokeEditPanel,
+ GreasePencilDataPanel,
+ GreasePencilToolsPanel,
+ )
class NODE_HT_header(Header):
@@ -180,7 +186,8 @@ class NODE_MT_view(Menu):
layout.separator()
layout.operator("screen.area_dupli")
- layout.operator("screen.screen_full_area")
+ layout.operator("screen.screen_full_area", text="Toggle Maximize Area")
+ layout.operator("screen.screen_full_area").use_hide_panels = True
class NODE_MT_select(Menu):
@@ -438,6 +445,45 @@ class NODE_UL_interface_sockets(bpy.types.UIList):
layout.template_node_socket(color)
+# Grease Pencil properties
+class NODE_PT_grease_pencil(GreasePencilDataPanel, Panel):
+ bl_space_type = 'NODE_EDITOR'
+ bl_region_type = 'UI'
+
+ # NOTE: this is just a wrapper around the generic GP Panel
+
+ @classmethod
+ def poll(cls, context):
+ snode = context.space_data
+ return snode is not None and snode.node_tree is not None
+
+
+class NODE_PT_grease_pencil_tools(GreasePencilToolsPanel, Panel):
+ bl_space_type = 'NODE_EDITOR'
+ bl_region_type = 'UI'
+ bl_options = {'DEFAULT_CLOSED'}
+
+ # NOTE: this is just a wrapper around the generic GP tools panel
+ # It contains access to some essential tools usually found only in
+ # toolbar, but which may not necessarily be open
+
+
+# Tool Shelf ------------------
+
+
+# Grease Pencil drawing tools
+class NODE_PT_tools_grease_pencil_draw(GreasePencilDrawingToolsPanel, Panel):
+ bl_space_type = 'NODE_EDITOR'
+ bl_region_type = 'TOOLS'
+
+
+# Grease Pencil stroke editing tools
+class NODE_PT_tools_grease_pencil_edit(GreasePencilStrokeEditPanel, Panel):
+ bl_space_type = 'NODE_EDITOR'
+ bl_region_type = 'TOOLS'
+
+# -----------------------------
+
def node_draw_tree_view(layout, context):
pass
diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py
index 01165bf2889..7b508c067e1 100644
--- a/release/scripts/startup/bl_ui/space_outliner.py
+++ b/release/scripts/startup/bl_ui/space_outliner.py
@@ -96,7 +96,8 @@ class OUTLINER_MT_view(Menu):
layout.separator()
layout.operator("screen.area_dupli")
- layout.operator("screen.screen_full_area")
+ layout.operator("screen.screen_full_area", text="Toggle Maximize Area")
+ layout.operator("screen.screen_full_area").use_hide_panels = True
class OUTLINER_MT_search(Menu):
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index ce00d4eb8e7..f59d4e8d980 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Header, Menu, Panel
+from bl_ui.properties_grease_pencil_common import GreasePencilDataPanel, GreasePencilToolsPanel
from bpy.app.translations import pgettext_iface as iface_
@@ -82,6 +83,7 @@ class SEQUENCER_HT_header(Header):
layout.separator()
layout.operator("sequencer.refresh_all")
+ layout.prop(st, "show_backdrop")
else:
if st.view_type == 'SEQUENCER_PREVIEW':
layout.separator()
@@ -101,6 +103,17 @@ class SEQUENCER_HT_header(Header):
row = layout.row()
row.prop(st, "overlay_type", text="")
+ if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
+ gpd = context.gpencil_data
+ toolsettings = context.tool_settings
+
+ # Proportional editing
+ if gpd and gpd.use_stroke_edit_mode:
+ row = layout.row(align=True)
+ row.prop(toolsettings, "proportional_edit", icon_only=True)
+ if toolsettings.proportional_edit != 'DISABLED':
+ row.prop(toolsettings, "proportional_edit_falloff", icon_only=True)
+
row = layout.row(align=True)
row.operator("render.opengl", text="", icon='RENDER_STILL').sequencer = True
props = row.operator("render.opengl", text="", icon='RENDER_ANIMATION')
@@ -149,8 +162,10 @@ class SEQUENCER_MT_view(Menu):
layout = self.layout
st = context.space_data
+ is_preview = st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}
+ is_sequencer_view = st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}
- if st.view_type in {'PREVIEW'}:
+ if st.view_type == 'PREVIEW':
# Specifying the REGION_PREVIEW context is needed in preview-only
# mode, else the lookup for the shortcut will fail in
# wm_keymap_item_find_props() (see #32595).
@@ -160,10 +175,10 @@ class SEQUENCER_MT_view(Menu):
layout.separator()
- if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
+ if is_sequencer_view:
layout.operator("sequencer.view_all", text="View all Sequences")
layout.operator("sequencer.view_selected")
- if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
+ if is_preview:
layout.operator_context = 'INVOKE_REGION_PREVIEW'
layout.operator("sequencer.view_all_preview", text="Fit preview in window")
@@ -181,11 +196,14 @@ class SEQUENCER_MT_view(Menu):
# # XXX, invokes in the header view
# layout.operator("sequencer.view_ghost_border", text="Overlay Border")
- if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
+ if is_sequencer_view:
layout.prop(st, "show_seconds")
layout.prop(st, "show_frame_indicator")
+ layout.prop(st, "show_strip_offset")
- if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
+ layout.prop_menu_enum(st, "waveform_draw_type")
+
+ if is_preview:
if st.display_mode == 'IMAGE':
layout.prop(st, "show_safe_margin")
elif st.display_mode == 'WAVEFORM':
@@ -193,12 +211,13 @@ class SEQUENCER_MT_view(Menu):
layout.separator()
- if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
+ if is_sequencer_view:
layout.prop(st, "use_marker_sync")
layout.separator()
layout.operator("screen.area_dupli")
- layout.operator("screen.screen_full_area")
+ layout.operator("screen.screen_full_area", text="Toggle Maximize Area")
+ layout.operator("screen.screen_full_area").use_hide_panels = True
class SEQUENCER_MT_select(Menu):
@@ -337,6 +356,7 @@ class SEQUENCER_MT_strip(Menu):
layout.operator("sequencer.cut", text="Cut (hard) at frame").type = 'HARD'
layout.operator("sequencer.cut", text="Cut (soft) at frame").type = 'SOFT'
+ layout.operator("sequencer.slip", text="Slip Strip Contents")
layout.operator("sequencer.images_separate")
layout.operator("sequencer.offset_clear")
layout.operator("sequencer.deinterlace_selected_movies")
@@ -714,6 +734,7 @@ class SEQUENCER_PT_sound(SequencerButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ st = context.space_data
strip = act_strip(context)
sound = strip.sound
@@ -732,7 +753,9 @@ class SEQUENCER_PT_sound(SequencerButtonsPanel, Panel):
row.prop(sound, "use_memory_cache")
- layout.prop(strip, "show_waveform")
+ if st.waveform_draw_type == 'DEFAULT_WAVEFORMS':
+ layout.prop(strip, "show_waveform")
+
layout.prop(strip, "volume")
layout.prop(strip, "pitch")
layout.prop(strip, "pan")
@@ -774,6 +797,8 @@ class SEQUENCER_PT_scene(SequencerButtonsPanel, Panel):
layout.label(text="Camera Override")
layout.template_ID(strip, "scene_camera")
+ layout.prop(strip, "use_grease_pencil", text="Show Grease Pencil")
+
if scene:
layout.prop(scene, "audio_volume", text="Audio Volume")
@@ -1010,5 +1035,22 @@ class SEQUENCER_PT_modifiers(SequencerButtonsPanel, Panel):
col.prop(mod, "contrast")
+class SEQUENCER_PT_grease_pencil(GreasePencilDataPanel, SequencerButtonsPanel_Output, Panel):
+ bl_space_type = 'SEQUENCE_EDITOR'
+ bl_region_type = 'UI'
+
+ # NOTE: this is just a wrapper around the generic GP Panel
+ # But, it should only show up when there are images in the preview region
+
+
+class SEQUENCER_PT_grease_pencil_tools(GreasePencilToolsPanel, SequencerButtonsPanel_Output, Panel):
+ bl_space_type = 'SEQUENCE_EDITOR'
+ bl_region_type = 'UI'
+
+ # NOTE: this is just a wrapper around the generic GP tools panel
+ # It contains access to some essential tools usually found only in
+ # toolbar, which doesn't exist here...
+
+
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py
index a430fb09165..5eb4e333130 100644
--- a/release/scripts/startup/bl_ui/space_text.py
+++ b/release/scripts/startup/bl_ui/space_text.py
@@ -181,7 +181,8 @@ class TEXT_MT_view(Menu):
layout.separator()
layout.operator("screen.area_dupli")
- layout.operator("screen.screen_full_area")
+ layout.operator("screen.screen_full_area", text="Toggle Maximize Area")
+ layout.operator("screen.screen_full_area").use_hide_panels = True
class TEXT_MT_text(Menu):
diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py
index cfb147b3566..d23ee84d9d2 100644
--- a/release/scripts/startup/bl_ui/space_time.py
+++ b/release/scripts/startup/bl_ui/space_time.py
@@ -145,7 +145,8 @@ class TIME_MT_view(Menu):
layout.separator()
layout.operator("screen.area_dupli")
- layout.operator("screen.screen_full_area")
+ layout.operator("screen.screen_full_area", text="Toggle Maximize Area")
+ layout.operator("screen.screen_full_area").use_hide_panels = True
class TIME_MT_cache(Menu):
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index a7ddec040a5..10394e50581 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -744,7 +744,7 @@ class USERPREF_PT_theme(Panel):
col.separator()
col.separator()
- col.label("Menu Shadow:")
+ col.label("Styles:")
row = col.row()
@@ -762,11 +762,6 @@ class USERPREF_PT_theme(Panel):
colsub = padding.column()
colsub.row().prop(ui, "menu_shadow_width")
- col.separator()
- col.separator()
-
- col.label("Icons:")
-
row = col.row()
subsplit = row.split(percentage=0.95)
@@ -774,16 +769,14 @@ class USERPREF_PT_theme(Panel):
padding = subsplit.split(percentage=0.15)
colsub = padding.column()
colsub = padding.column()
- # Not working yet.
- #~ colsub.active = False
- #~ colsub.row().prop(ui, "icon_file")
+ colsub.row().prop(ui, "icon_alpha")
subsplit = row.split(percentage=0.85)
padding = subsplit.split(percentage=0.15)
colsub = padding.column()
colsub = padding.column()
- colsub.row().prop(ui, "icon_alpha")
+ colsub.row().prop(ui, "widget_emboss")
col.separator()
col.separator()
@@ -1167,7 +1160,7 @@ class USERPREF_MT_addons_dev_guides(Menu):
class USERPREF_PT_addons(Panel):
bl_space_type = 'USER_PREFERENCES'
- bl_label = "Addons"
+ bl_label = "Add-ons"
bl_region_type = 'WINDOW'
bl_options = {'HIDE_HEADER'}
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index cbae63e1f9a..7f2ec53b8fb 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Header, Menu, Panel
+from bl_ui.properties_grease_pencil_common import GreasePencilDataPanel
from bl_ui.properties_paint_common import UnifiedPaintPanel
from bpy.app.translations import contexts as i18n_contexts
@@ -56,7 +57,12 @@ class VIEW3D_HT_header(Header):
row.prop(view, "use_occlude_geometry", text="")
# Proportional editing
- if mode in {'EDIT', 'PARTICLE_EDIT'}:
+ if context.gpencil_data and context.gpencil_data.use_stroke_edit_mode:
+ row = layout.row(align=True)
+ row.prop(toolsettings, "proportional_edit", icon_only=True)
+ if toolsettings.proportional_edit != 'DISABLED':
+ row.prop(toolsettings, "proportional_edit_falloff", icon_only=True)
+ elif mode in {'EDIT', 'PARTICLE_EDIT'}:
row = layout.row(align=True)
row.prop(toolsettings, "proportional_edit", icon_only=True)
if toolsettings.proportional_edit != 'DISABLED':
@@ -66,6 +72,13 @@ class VIEW3D_HT_header(Header):
row.prop(toolsettings, "use_proportional_edit_objects", icon_only=True)
if toolsettings.use_proportional_edit_objects:
row.prop(toolsettings, "proportional_edit_falloff", icon_only=True)
+ else:
+ # Proportional editing
+ if context.gpencil_data and context.gpencil_data.use_stroke_edit_mode:
+ row = layout.row(align=True)
+ row.prop(toolsettings, "proportional_edit", icon_only=True)
+ if toolsettings.proportional_edit != 'DISABLED':
+ row.prop(toolsettings, "proportional_edit_falloff", icon_only=True)
# Snap
if not obj or mode not in {'SCULPT', 'VERTEX_PAINT', 'WEIGHT_PAINT', 'TEXTURE_PAINT'}:
@@ -421,7 +434,8 @@ class VIEW3D_MT_view(Menu):
layout.operator("screen.area_dupli")
layout.operator("screen.region_quadview")
- layout.operator("screen.screen_full_area")
+ layout.operator("screen.screen_full_area", text="Toggle Maximize Area")
+ layout.operator("screen.screen_full_area").use_hide_panels = True
class VIEW3D_MT_view_navigation(Menu):
@@ -2307,6 +2321,8 @@ class VIEW3D_MT_edit_mesh_faces(Menu):
layout.operator("mesh.faces_shade_smooth")
layout.operator("mesh.faces_shade_flat")
+ layout.operator("mesh.normals_make_consistent", text="Recalculate Normals")
+
layout.separator()
layout.operator("mesh.edge_rotate", text="Rotate Edge CW").use_ccw = False
@@ -2700,6 +2716,12 @@ class VIEW3D_MT_edit_armature_roll(Menu):
# ********** Panel **********
+class VIEW3D_PT_grease_pencil(GreasePencilDataPanel, Panel):
+ bl_space_type = 'VIEW_3D'
+ bl_region_type = 'UI'
+
+ # NOTE: this is just a wrapper around the generic GP Panel
+
class VIEW3D_PT_view3d_properties(Panel):
bl_space_type = 'VIEW_3D'
@@ -2810,6 +2832,7 @@ class VIEW3D_PT_view3d_display(Panel):
col = layout.column()
col.prop(view, "show_only_render")
+ col.prop(view, "show_world")
col = layout.column()
display_all = not view.show_only_render
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index da64caa7a30..b7fe9c69c1f 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -19,7 +19,10 @@
# <pep8 compliant>
import bpy
from bpy.types import Menu, Panel, UIList
-from bl_ui.properties_grease_pencil_common import GreasePencilPanel
+from bl_ui.properties_grease_pencil_common import (
+ GreasePencilDrawingToolsPanel,
+ GreasePencilStrokeEditPanel
+ )
from bl_ui.properties_paint_common import (
UnifiedPaintPanel,
brush_texture_settings,
@@ -313,6 +316,7 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, Panel):
col.menu("VIEW3D_MT_edit_mesh_extrude")
col.operator("view3d.edit_mesh_extrude_move_normal", text="Extrude Region")
col.operator("view3d.edit_mesh_extrude_individual_move", text="Extrude Individual")
+ col.operator("mesh.edge_face_add")
col.operator("mesh.subdivide")
col.operator("mesh.loopcut_slide")
col.operator("mesh.duplicate_move", text="Duplicate")
@@ -793,8 +797,8 @@ class VIEW3D_PT_imapaint_tools_missing(Panel, View3DPaintPanel):
if toolsettings.missing_uvs:
col.separator()
col.label("Missing UVs", icon='INFO')
- col.label("Unwrap the mesh in edit mode or generate a simple UVs")
- col.operator("mesh.uv_texture_add", text="Add Simple UVs")
+ col.label("Unwrap the mesh in edit mode or generate a simple UV layer")
+ col.operator("paint.add_simple_uvs")
if toolsettings.mode == 'MATERIAL':
if toolsettings.missing_materials:
@@ -1058,7 +1062,7 @@ class TEXTURE_UL_texpaintslots(UIList):
if self.layout_type in {'DEFAULT', 'COMPACT'}:
layout.prop(item, "name", text="", emboss=False, icon_value=icon)
- if (not mat.use_nodes) and (context.scene.render.engine == 'BLENDER_RENDER'):
+ if (not mat.use_nodes) and context.scene.render.engine in {'BLENDER_RENDER', 'BLENDER_GAME'}:
mtex_index = mat.texture_paint_slots[index].index
layout.prop(mat, "use_textures", text="", index=mtex_index)
elif self.layout_type in {'GRID'}:
@@ -1115,7 +1119,7 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel):
mat, "texture_paint_images",
mat, "paint_active_slot", rows=2)
- if (not mat.use_nodes) and (context.scene.render.engine == 'BLENDER_RENDER'):
+ if (not mat.use_nodes) and context.scene.render.engine in {'BLENDER_RENDER', 'BLENDER_GAME'}:
row = col.row(align=True)
row.operator_menu_enum("paint.add_texture_paint_slot", "type")
row.operator("paint.delete_texture_paint_slot", text="", icon='X')
@@ -1804,11 +1808,14 @@ class VIEW3D_PT_tools_particlemode(View3DPanel, Panel):
sub.prop(pe, "fade_frames", slider=True)
-# Grease Pencil tools
-class VIEW3D_PT_tools_grease_pencil(GreasePencilPanel, Panel):
+# Grease Pencil drawing tools
+class VIEW3D_PT_tools_grease_pencil_draw(GreasePencilDrawingToolsPanel, Panel):
+ bl_space_type = 'VIEW_3D'
+
+
+# Grease Pencil stroke editing tools
+class VIEW3D_PT_tools_grease_pencil_edit(GreasePencilStrokeEditPanel, Panel):
bl_space_type = 'VIEW_3D'
- bl_region_type = 'TOOLS'
- bl_category = "Grease Pencil"
# Note: moved here so that it's always in last position in 'Tools' panels!
diff --git a/release/scripts/templates_py/custom_nodes.py b/release/scripts/templates_py/custom_nodes.py
index 992ef734859..32c61abace7 100644
--- a/release/scripts/templates_py/custom_nodes.py
+++ b/release/scripts/templates_py/custom_nodes.py
@@ -13,9 +13,6 @@ class MyCustomTree(NodeTree):
# Label for nice name display
bl_label = 'Custom Node Tree'
# Icon identifier
- # NOTE: If no icon is defined, the node tree will not show up in the editor header!
- # This can be used to make additional tree types for groups and similar nodes (see below)
- # Only one base tree class is needed in the editor for selecting the general category
bl_icon = 'NODETREE'