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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-08-06 13:25:24 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-08-06 13:45:03 +0300
commit9843921288307be33fc39450586ff9ad226829a1 (patch)
treede6e0ddd71b48d036bf5525e62edf10a57d3238e /release/scripts
parent4571fdde0ecfdebac6a9374364b05be74233aca5 (diff)
parent28c3bdf50bd62b510fdbd88a5dcb1c40f8726c20 (diff)
Merge branch 'master' into blender2.8
Conflicts: release/scripts/startup/bl_ui/properties_particle.py release/scripts/startup/bl_ui/properties_physics_cloth.py release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py release/scripts/startup/bl_ui/properties_physics_softbody.py source/blender/blenkernel/BKE_library.h source/blender/blenkernel/BKE_particle.h source/blender/blenkernel/intern/cloth.c source/blender/blenkernel/intern/library.c source/blender/blenkernel/intern/library_query.c source/blender/blenkernel/intern/particle_system.c source/blender/blenkernel/intern/scene.c source/blender/blenkernel/intern/softbody.c source/blender/blenloader/intern/readfile.c source/blender/blenloader/intern/versioning_270.c source/blender/editors/space_file/filesel.c source/blender/editors/space_outliner/outliner_intern.h source/blender/makesdna/DNA_ID.h source/blender/makesdna/DNA_object_force.h source/blender/makesdna/DNA_particle_types.h source/blender/makesrna/intern/rna_particle.c source/blender/makesrna/intern/rna_sculpt_paint.c source/blender/makesrna/intern/rna_smoke.c source/blender/makesrna/intern/rna_space.c
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/freestyle/modules/parameter_editor.py15
-rw-r--r--release/scripts/modules/addon_utils.py4
-rw-r--r--release/scripts/modules/bl_previews_utils/bl_previews_render.py5
-rw-r--r--release/scripts/modules/bpy/__init__.py12
-rw-r--r--release/scripts/modules/bpy/path.py32
-rw-r--r--release/scripts/modules/bpy_extras/keyconfig_utils.py34
-rw-r--r--release/scripts/modules/bpy_extras/view3d_utils.py4
-rw-r--r--release/scripts/modules/bpy_restrict_state.py2
-rw-r--r--release/scripts/modules/bpy_types.py7
-rw-r--r--release/scripts/modules/console/complete_import.py10
-rw-r--r--release/scripts/modules/console/complete_namespace.py4
-rw-r--r--release/scripts/modules/console/intellisense.py14
-rw-r--r--release/scripts/modules/console_python.py18
-rw-r--r--release/scripts/modules/keyingsets_utils.py3
-rw-r--r--release/scripts/modules/progress_report.py3
-rw-r--r--release/scripts/modules/rna_info.py40
-rw-r--r--release/scripts/modules/rna_xml.py5
-rw-r--r--release/scripts/modules/sys_info.py23
-rw-r--r--release/scripts/startup/bl_ui/properties_constraint.py13
-rw-r--r--release/scripts/startup/bl_ui/properties_data_bone.py3
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py44
-rw-r--r--release/scripts/startup/bl_ui/properties_game.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py482
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_cloth.py64
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_common.py3
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py24
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_field.py8
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_fluid.py12
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_rigidbody.py9
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py3
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_smoke.py18
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_softbody.py27
-rw-r--r--release/scripts/startup/bl_ui/properties_world.py4
-rw-r--r--release/scripts/startup/bl_ui/space_clip.py25
-rw-r--r--release/scripts/startup/bl_ui/space_dopesheet.py1
-rw-r--r--release/scripts/startup/bl_ui/space_image.py24
-rw-r--r--release/scripts/startup/bl_ui/space_info.py4
-rw-r--r--release/scripts/startup/bl_ui/space_node.py28
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py14
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py28
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py14
-rw-r--r--release/scripts/startup/keyingsets_builtins.py1
-rw-r--r--release/scripts/startup/nodeitems_builtins.py1
43 files changed, 855 insertions, 236 deletions
diff --git a/release/scripts/freestyle/modules/parameter_editor.py b/release/scripts/freestyle/modules/parameter_editor.py
index 082ce139a59..93305cb7c5a 100644
--- a/release/scripts/freestyle/modules/parameter_editor.py
+++ b/release/scripts/freestyle/modules/parameter_editor.py
@@ -914,14 +914,25 @@ class QuantitativeInvisibilityRangeUP1D(UnaryPredicate1D):
return self.qi_start <= qi <= self.qi_end
+def getQualifiedObjectName(ob):
+ if ob.library is not None:
+ return ob.library.filepath + '/' + ob.name
+ return ob.name
+
+
class ObjectNamesUP1D(UnaryPredicate1D):
def __init__(self, names, negative):
UnaryPredicate1D.__init__(self)
self.names = names
self.negative = negative
+ def getViewShapeName(self, vs):
+ if vs.library_path is not None:
+ return vs.library_path + '/' + vs.name
+ return vs.name
+
def __call__(self, viewEdge):
- found = viewEdge.viewshape.name in self.names
+ found = self.getViewShapeName(viewEdge.viewshape) in self.names
if self.negative:
return not found
return found
@@ -1256,7 +1267,7 @@ def process(layer_name, lineset_name):
# prepare selection criteria by group of objects
if lineset.select_by_group:
if lineset.group is not None:
- names = {ob.name: True for ob in lineset.group.objects}
+ names = {getQualifiedObjectName(ob): True for ob in lineset.group.objects}
upred = ObjectNamesUP1D(names, lineset.group_negation == 'EXCLUSIVE')
selection_criteria.append(upred)
# prepare selection criteria by image border
diff --git a/release/scripts/modules/addon_utils.py b/release/scripts/modules/addon_utils.py
index 95c0e5f187d..0f096f5812c 100644
--- a/release/scripts/modules/addon_utils.py
+++ b/release/scripts/modules/addon_utils.py
@@ -26,7 +26,7 @@ __all__ = (
"disable",
"reset_all",
"module_bl_info",
- )
+)
import bpy as _bpy
_user_preferences = _bpy.context.user_preferences
@@ -458,7 +458,7 @@ def module_bl_info(mod, info_basis=None):
"category": "",
"warning": "",
"show_expanded": False,
- }
+ }
addon_info = getattr(mod, "bl_info", {})
diff --git a/release/scripts/modules/bl_previews_utils/bl_previews_render.py b/release/scripts/modules/bl_previews_utils/bl_previews_render.py
index 674c1c00ab1..6c29223cf55 100644
--- a/release/scripts/modules/bl_previews_utils/bl_previews_render.py
+++ b/release/scripts/modules/bl_previews_utils/bl_previews_render.py
@@ -21,9 +21,7 @@
# Populate a template file (POT format currently) from Blender RNA/py/C data.
# Note: This script is meant to be used from inside Blender!
-import collections
import os
-import sys
import bpy
from mathutils import Vector, Euler, Matrix
@@ -67,6 +65,8 @@ def rna_backup_restore(data, backup):
def do_previews(do_objects, do_groups, do_scenes, do_data_intern):
+ import collections
+
# Helpers.
RenderContext = collections.namedtuple("RenderContext", (
"scene", "world", "camera", "lamp", "camera_data", "lamp_data", "image", # All those are names!
@@ -362,7 +362,6 @@ def do_previews(do_objects, do_groups, do_scenes, do_data_intern):
# File "<string>", line 327, in do_previews
# OverflowError: Python int too large to convert to C long
# ... :(
- import sys
scene = bpy.data.scenes[render_context.scene, None]
for obname in objects:
ob = bpy.data.objects[obname, None]
diff --git a/release/scripts/modules/bpy/__init__.py b/release/scripts/modules/bpy/__init__.py
index f012c1317d4..26fdbc8cc56 100644
--- a/release/scripts/modules/bpy/__init__.py
+++ b/release/scripts/modules/bpy/__init__.py
@@ -31,7 +31,7 @@ __all__ = (
"props",
"types",
"utils",
- )
+)
# internal blender C module
@@ -57,11 +57,11 @@ def main():
# fake module to allow:
# from bpy.types import Panel
sys.modules.update({
- "bpy.app": app,
- "bpy.app.handlers": app.handlers,
- "bpy.app.translations": app.translations,
- "bpy.types": types,
- })
+ "bpy.app": app,
+ "bpy.app.handlers": app.handlers,
+ "bpy.app.translations": app.translations,
+ "bpy.types": types,
+ })
# Initializes Python classes.
# (good place to run a profiler or trace).
diff --git a/release/scripts/modules/bpy/path.py b/release/scripts/modules/bpy/path.py
index 30f6c8eebed..a864a86eba7 100644
--- a/release/scripts/modules/bpy/path.py
+++ b/release/scripts/modules/bpy/path.py
@@ -39,16 +39,16 @@ __all__ = (
"reduce_dirs",
"relpath",
"resolve_ncase",
- )
+)
import bpy as _bpy
import os as _os
from _bpy_path import (
- extensions_audio,
- extensions_movie,
- extensions_image,
- )
+ extensions_audio,
+ extensions_movie,
+ extensions_image,
+)
def _getattr_bytes(var, attr):
@@ -71,22 +71,22 @@ def abspath(path, start=None, library=None):
if path.startswith(b"//"):
if library:
start = _os.path.dirname(
- abspath(_getattr_bytes(library, "filepath")))
+ abspath(_getattr_bytes(library, "filepath")))
return _os.path.join(
- _os.path.dirname(_getattr_bytes(_bpy.data, "filepath"))
- if start is None else start,
- path[2:],
- )
+ _os.path.dirname(_getattr_bytes(_bpy.data, "filepath"))
+ if start is None else start,
+ path[2:],
+ )
else:
if path.startswith("//"):
if library:
start = _os.path.dirname(
- abspath(library.filepath))
+ abspath(library.filepath))
return _os.path.join(
- _os.path.dirname(_bpy.data.filepath)
- if start is None else start,
- path[2:],
- )
+ _os.path.dirname(_bpy.data.filepath)
+ if start is None else start,
+ path[2:],
+ )
return path
@@ -175,7 +175,7 @@ def clean_name(name, replace="_"):
0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe,
- )
+ )
trans = str.maketrans({char: replace for char in bad_chars})
trans_cache[replace] = trans
return trans
diff --git a/release/scripts/modules/bpy_extras/keyconfig_utils.py b/release/scripts/modules/bpy_extras/keyconfig_utils.py
index 534dabf3d43..ee0638e254d 100644
--- a/release/scripts/modules/bpy_extras/keyconfig_utils.py
+++ b/release/scripts/modules/bpy_extras/keyconfig_utils.py
@@ -28,14 +28,14 @@ KM_HIERARCHY = [
('Screen', 'EMPTY', 'WINDOW', [ # full screen, undo, screenshot
('Screen Editing', 'EMPTY', 'WINDOW', []), # re-sizing, action corners
('Header', 'EMPTY', 'WINDOW', []), # header stuff (per region)
- ]),
+ ]),
('View2D', 'EMPTY', 'WINDOW', []), # view 2d navigation (per region)
('View2D Buttons List', 'EMPTY', 'WINDOW', []), # view 2d with buttons navigation
('User Interface', 'EMPTY', 'WINDOW', [
('Eyedropper Modal Map', 'EMPTY', 'WINDOW', []),
- ]),
+ ]),
('3D View', 'VIEW_3D', 'WINDOW', [ # view 3d navigation and generic stuff (select, transform)
('Object Mode', 'EMPTY', 'WINDOW', []),
@@ -71,18 +71,18 @@ KM_HIERARCHY = [
('View3D Dolly Modal', 'EMPTY', 'WINDOW', []),
('3D View Generic', 'VIEW_3D', 'WINDOW', []), # toolbar and properties
- ]),
+ ]),
('Graph Editor', 'GRAPH_EDITOR', 'WINDOW', [
('Graph Editor Generic', 'GRAPH_EDITOR', 'WINDOW', []),
- ]),
+ ]),
('Dopesheet', 'DOPESHEET_EDITOR', 'WINDOW', [
('Dopesheet Generic', 'DOPESHEET_EDITOR', 'WINDOW', []),
- ]),
+ ]),
('NLA Editor', 'NLA_EDITOR', 'WINDOW', [
('NLA Channels', 'NLA_EDITOR', 'WINDOW', []),
('NLA Generic', 'NLA_EDITOR', 'WINDOW', []),
- ]),
+ ]),
('Timeline', 'TIMELINE', 'WINDOW', []),
('Image', 'IMAGE_EDITOR', 'WINDOW', [
@@ -90,23 +90,23 @@ KM_HIERARCHY = [
('Image Paint', 'EMPTY', 'WINDOW', []), # image and view3d
('UV Sculpt', 'EMPTY', 'WINDOW', []),
('Image Generic', 'IMAGE_EDITOR', 'WINDOW', []),
- ]),
+ ]),
('Outliner', 'OUTLINER', 'WINDOW', []),
('Node Editor', 'NODE_EDITOR', 'WINDOW', [
('Node Generic', 'NODE_EDITOR', 'WINDOW', []),
- ]),
+ ]),
('Sequencer', 'SEQUENCE_EDITOR', 'WINDOW', [
('SequencerCommon', 'SEQUENCE_EDITOR', 'WINDOW', []),
('SequencerPreview', 'SEQUENCE_EDITOR', 'WINDOW', []),
- ]),
+ ]),
('Logic Editor', 'LOGIC_EDITOR', 'WINDOW', []),
('File Browser', 'FILE_BROWSER', 'WINDOW', [
('File Browser Main', 'FILE_BROWSER', 'WINDOW', []),
('File Browser Buttons', 'FILE_BROWSER', 'WINDOW', []),
- ]),
+ ]),
('Info', 'INFO', 'WINDOW', []),
@@ -114,17 +114,17 @@ KM_HIERARCHY = [
('Text', 'TEXT_EDITOR', 'WINDOW', [
('Text Generic', 'TEXT_EDITOR', 'WINDOW', []),
- ]),
+ ]),
('Console', 'CONSOLE', 'WINDOW', []),
('Clip', 'CLIP_EDITOR', 'WINDOW', [
('Clip Editor', 'CLIP_EDITOR', 'WINDOW', []),
('Clip Graph Editor', 'CLIP_EDITOR', 'WINDOW', []),
('Clip Dopesheet Editor', 'CLIP_EDITOR', 'WINDOW', []),
- ]),
+ ]),
('Grease Pencil', 'EMPTY', 'WINDOW', [ # grease pencil stuff (per region)
('Grease Pencil Stroke Edit Mode', 'EMPTY', 'WINDOW', []),
- ]),
+ ]),
('Mask Editing', 'EMPTY', 'WINDOW', []),
('Frames', 'EMPTY', 'WINDOW', []), # frame navigation (per region)
('Markers', 'EMPTY', 'WINDOW', []), # markers (per region)
@@ -138,7 +138,7 @@ KM_HIERARCHY = [
('Standard Modal Map', 'EMPTY', 'WINDOW', []),
('Transform Modal Map', 'EMPTY', 'WINDOW', []),
- ]
+]
# -----------------------------------------------------------------------------
@@ -239,7 +239,8 @@ def keyconfig_export(wm, kc, filepath):
" except Exception as e:\n"
" print(\"Warning: %r\" % e)\n\n")
f.write("wm = bpy.context.window_manager\n")
- f.write("kc = wm.keyconfigs.new(os.path.splitext(os.path.basename(__file__))[0])\n\n") # keymap must be created by caller
+ # keymap must be created by caller
+ f.write("kc = wm.keyconfigs.new(os.path.splitext(os.path.basename(__file__))[0])\n\n")
# Generate a list of keymaps to export:
#
@@ -267,7 +268,8 @@ def keyconfig_export(wm, kc, filepath):
km = km.active()
f.write("# Map %s\n" % km.name)
- f.write("km = kc.keymaps.new('%s', space_type='%s', region_type='%s', modal=%s)\n\n" % (km.name, km.space_type, km.region_type, km.is_modal))
+ f.write("km = kc.keymaps.new('%s', space_type='%s', region_type='%s', modal=%s)\n\n" %
+ (km.name, km.space_type, km.region_type, km.is_modal))
for kmi in km.keymap_items:
f.write(_kmistr(kmi, km.is_modal))
f.write("\n")
diff --git a/release/scripts/modules/bpy_extras/view3d_utils.py b/release/scripts/modules/bpy_extras/view3d_utils.py
index 5f83cdcfa0d..a4834a4531c 100644
--- a/release/scripts/modules/bpy_extras/view3d_utils.py
+++ b/release/scripts/modules/bpy_extras/view3d_utils.py
@@ -23,7 +23,7 @@ __all__ = (
"region_2d_to_origin_3d",
"region_2d_to_location_3d",
"location_3d_to_region_2d",
- )
+)
def region_2d_to_vector_3d(region, rv3d, coord):
@@ -50,7 +50,7 @@ def region_2d_to_vector_3d(region, rv3d, coord):
out = Vector(((2.0 * coord[0] / region.width) - 1.0,
(2.0 * coord[1] / region.height) - 1.0,
-0.5
- ))
+ ))
w = out.dot(persinv[3].xyz) + persinv[3][3]
diff --git a/release/scripts/modules/bpy_restrict_state.py b/release/scripts/modules/bpy_restrict_state.py
index 4658fddf0dc..589b3960b04 100644
--- a/release/scripts/modules/bpy_restrict_state.py
+++ b/release/scripts/modules/bpy_restrict_state.py
@@ -24,7 +24,7 @@ This module contains RestrictBlend context manager.
__all__ = (
"RestrictBlend",
- )
+)
import bpy as _bpy
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index d194de32bf3..d64acd2ce3b 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -39,7 +39,7 @@ class Context(StructRNA):
generic_attrs = (
*StructRNA.__dict__.keys(),
"bl_rna", "rna_type", "copy",
- )
+ )
for attr in dir(self):
if not (attr.startswith("_") or attr in generic_attrs):
value = getattr(self, attr)
@@ -542,6 +542,7 @@ class Sound(bpy_types.ID):
class RNAMeta(type):
+
def __new__(cls, name, bases, classdict, **args):
result = type.__new__(cls, name, bases, classdict)
if bases and bases[0] is not StructRNA:
@@ -562,6 +563,7 @@ class RNAMeta(type):
class OrderedDictMini(dict):
+
def __init__(self, *args):
self.order = []
dict.__init__(self, args)
@@ -581,6 +583,7 @@ class RNAMetaPropGroup(StructMetaPropGroup, RNAMeta):
class OrderedMeta(RNAMeta):
+
def __init__(cls, name, bases, attributes):
if attributes.__class__ is OrderedDictMini:
cls.order = attributes.order
@@ -635,7 +638,7 @@ class Macro(StructRNA, metaclass=OrderedMeta):
class PropertyGroup(StructRNA, metaclass=RNAMetaPropGroup):
- __slots__ = ()
+ __slots__ = ()
class RenderEngine(StructRNA, metaclass=RNAMeta):
diff --git a/release/scripts/modules/console/complete_import.py b/release/scripts/modules/console/complete_import.py
index f28f61b303d..e7218594a86 100644
--- a/release/scripts/modules/console/complete_import.py
+++ b/release/scripts/modules/console/complete_import.py
@@ -112,10 +112,10 @@ def module_list(path):
folder_list = []
#folder_list = glob.glob(os.path.join(path,'*'))
folder_list = [
- p for p in folder_list
- if (os.path.exists(os.path.join(path, p, '__init__.py')) or
- p[-3:] in {'.py', '.so'} or
- p[-4:] in {'.pyc', '.pyo', '.pyd'})]
+ p for p in folder_list
+ if (os.path.exists(os.path.join(path, p, '__init__.py')) or
+ p[-3:] in {'.py', '.so'} or
+ p[-4:] in {'.pyc', '.pyo', '.pyd'})]
folder_list = [os.path.basename(p).split('.')[0] for p in folder_list]
return folder_list
@@ -161,7 +161,7 @@ def complete(line):
if (not hasattr(m, '__file__')) or (not only_modules) or\
(hasattr(m, '__file__') and '__init__' in m.__file__):
completion_list = [attr for attr in dir(m)
- if is_importable(m, attr)]
+ if is_importable(m, attr)]
else:
completion_list = []
completion_list.extend(getattr(m, '__all__', []))
diff --git a/release/scripts/modules/console/complete_namespace.py b/release/scripts/modules/console/complete_namespace.py
index 992bb72aa08..3f223ba93dc 100644
--- a/release/scripts/modules/console/complete_namespace.py
+++ b/release/scripts/modules/console/complete_namespace.py
@@ -85,7 +85,7 @@ def complete_indices(word, namespace, obj=None, base=None):
>>> complete_indices("foo['b", {'foo': {'bar':0, 1:2}}, base='foo')
["foo['bar']"]
"""
- #FIXME: 'foo["b'
+ # FIXME: 'foo["b'
if base is None:
base = word
if obj is None:
@@ -148,7 +148,7 @@ def complete(word, namespace, private=True):
if re_incomplete_index:
# ignore incomplete index at the end, e.g 'a[1' -> 'a'
matches = complete_indices(word, namespace,
- base=re_incomplete_index.group(1))
+ base=re_incomplete_index.group(1))
elif not('[' in word):
matches = complete_names(word, namespace)
diff --git a/release/scripts/modules/console/intellisense.py b/release/scripts/modules/console/intellisense.py
index b694cceafea..84d4bff281d 100644
--- a/release/scripts/modules/console/intellisense.py
+++ b/release/scripts/modules/console/intellisense.py
@@ -121,8 +121,8 @@ def expand(line, cursor, namespace, private=True):
"""
if line[:cursor].strip().endswith('('):
from . import complete_calltip
- matches, word, scrollback = complete_calltip.complete(line,
- cursor, namespace)
+ matches, word, scrollback = complete_calltip.complete(
+ line, cursor, namespace)
prefix = os.path.commonprefix(matches)[len(word):]
no_calltip = False
else:
@@ -138,11 +138,11 @@ def expand(line, cursor, namespace, private=True):
white_space = " " + (" " * (cursor + len(prefix)))
word_prefix = word + prefix
scrollback = '\n'.join(
- [white_space + m[len(word_prefix):]
- if (word_prefix and m.startswith(word_prefix))
- else
- white_space + m.split('.')[-1]
- for m in matches])
+ [white_space + m[len(word_prefix):]
+ if (word_prefix and m.startswith(word_prefix))
+ else
+ white_space + m.split('.')[-1]
+ for m in matches])
no_calltip = True
diff --git a/release/scripts/modules/console_python.py b/release/scripts/modules/console_python.py
index 64bb002d6a1..a740f31c830 100644
--- a/release/scripts/modules/console_python.py
+++ b/release/scripts/modules/console_python.py
@@ -142,9 +142,9 @@ def execute(context, is_interactive):
# redirect output
from contextlib import (
- redirect_stdout,
- redirect_stderr,
- )
+ redirect_stdout,
+ redirect_stderr,
+ )
# not included with Python
class redirect_stdin(redirect_stdout.__base__):
@@ -152,8 +152,8 @@ def execute(context, is_interactive):
# don't allow the stdin to be used, can lock blender.
with redirect_stdout(stdout), \
- redirect_stderr(stderr), \
- redirect_stdin(None):
+ redirect_stderr(stderr), \
+ redirect_stdin(None):
# in case exception happens
line = "" # in case of encoding error
@@ -258,10 +258,10 @@ def autocomplete(context):
# This function isn't aware of the text editor or being an operator
# just does the autocomplete then copy its results back
result = intellisense.expand(
- line=line,
- cursor=current_line.current_character,
- namespace=console.locals,
- private=bpy.app.debug_python)
+ line=line,
+ cursor=current_line.current_character,
+ namespace=console.locals,
+ private=bpy.app.debug_python)
line_new = result[0]
current_line.body, current_line.current_character, scrollback = result
diff --git a/release/scripts/modules/keyingsets_utils.py b/release/scripts/modules/keyingsets_utils.py
index 375ee3feebe..8cef64c3590 100644
--- a/release/scripts/modules/keyingsets_utils.py
+++ b/release/scripts/modules/keyingsets_utils.py
@@ -28,7 +28,7 @@ __all__ = (
"RKS_POLL_selected_objects",
"RKS_POLL_selected_bones",
"RKS_POLL_selected_items",
- "RKS_ITER_selected_object",
+ "RKS_ITER_selected_objects",
"RKS_ITER_selected_bones",
"RKS_ITER_selected_item",
"RKS_GEN_available",
@@ -239,6 +239,7 @@ bbone_property_ids = (
"bone.bbone_out",
)
+
# Add Keying Set entries for bendy bones
def RKS_GEN_bendy_bones(ksi, context, ks, data):
# get id-block and path info
diff --git a/release/scripts/modules/progress_report.py b/release/scripts/modules/progress_report.py
index fc77a3e998e..bcce44aab9f 100644
--- a/release/scripts/modules/progress_report.py
+++ b/release/scripts/modules/progress_report.py
@@ -92,7 +92,8 @@ class ProgressReport:
self.wm.progress_update(steps)
if msg:
prefix = " " * (len(self.steps) - 1)
- print(prefix + "(%8.4f sec | %8.4f sec) %s\nProgress: %6.2f%%\r" % (tm, loc_tm, msg, steps_percent), end='')
+ print(prefix + "(%8.4f sec | %8.4f sec) %s\nProgress: %6.2f%%\r" %
+ (tm, loc_tm, msg, steps_percent), end='')
else:
print("Progress: %6.2f%%\r" % (steps_percent,), end='')
diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py
index dae262e93d7..94f5e9e17bb 100644
--- a/release/scripts/modules/rna_info.py
+++ b/release/scripts/modules/rna_info.py
@@ -95,7 +95,7 @@ class InfoStructRNA:
"children",
"references",
"properties",
- )
+ )
global_lookup = {}
@@ -119,8 +119,10 @@ class InfoStructRNA:
def build(self):
rna_type = self.bl_rna
parent_id = self.identifier
- self.properties[:] = [GetInfoPropertyRNA(rna_prop, parent_id) for rna_prop in get_direct_properties(rna_type) if rna_prop.identifier != "rna_type"]
- self.functions[:] = [GetInfoFunctionRNA(rna_prop, parent_id) for rna_prop in get_direct_functions(rna_type)]
+ self.properties[:] = [GetInfoPropertyRNA(rna_prop, parent_id)
+ for rna_prop in get_direct_properties(rna_type) if rna_prop.identifier != "rna_type"]
+ self.functions[:] = [GetInfoFunctionRNA(rna_prop, parent_id)
+ for rna_prop in get_direct_functions(rna_type)]
def get_bases(self):
bases = []
@@ -216,7 +218,7 @@ class InfoPropertyRNA:
"is_required",
"is_readonly",
"is_never_none",
- )
+ )
global_lookup = {}
def __init__(self, rna_prop):
@@ -362,7 +364,7 @@ class InfoFunctionRNA:
"args",
"return_values",
"is_classmethod",
- )
+ )
global_lookup = {}
def __init__(self, rna_func):
@@ -408,7 +410,7 @@ class InfoOperatorRNA:
"func_name",
"description",
"args",
- )
+ )
global_lookup = {}
def __init__(self, rna_op):
@@ -532,7 +534,7 @@ def BuildRNAInfo():
rna_struct = getattr(rna_type, "bl_rna", None)
if rna_struct:
- #if not rna_type_name.startswith('__'):
+ # if not rna_type_name.startswith('__'):
identifier = rna_struct.identifier
@@ -600,7 +602,8 @@ def BuildRNAInfo():
for rna_prop_ptr in (getattr(rna_prop, "fixed_type", None), getattr(rna_prop, "srna", None)):
# Does this property point to me?
if rna_prop_ptr:
- rna_references_dict[rna_prop_ptr.identifier].append("%s.%s" % (rna_struct_path, rna_prop_identifier))
+ rna_references_dict[rna_prop_ptr.identifier].append(
+ "%s.%s" % (rna_struct_path, rna_prop_identifier))
for rna_func in get_direct_functions(rna_struct):
for rna_prop_identifier, rna_prop in rna_func.parameters.items():
@@ -612,7 +615,8 @@ def BuildRNAInfo():
# Does this property point to me?
if rna_prop_ptr:
- rna_references_dict[rna_prop_ptr.identifier].append("%s.%s" % (rna_struct_path, rna_func.identifier))
+ rna_references_dict[rna_prop_ptr.identifier].append(
+ "%s.%s" % (rna_struct_path, rna_func.identifier))
# Store nested children
nested = rna_struct.nested
@@ -625,8 +629,8 @@ def BuildRNAInfo():
info_structs = []
for (rna_base, identifier, rna_struct) in structs:
- #if rna_struct.nested:
- # continue
+ # if rna_struct.nested:
+ # continue
#write_struct(rna_struct, '')
info_struct = GetInfoStructRNA(rna_struct)
@@ -664,7 +668,8 @@ def BuildRNAInfo():
default = prop.default
if type(default) in {float, int}:
if default < prop.min or default > prop.max:
- print("\t %s.%s, %s not in [%s - %s]" % (rna_info.identifier, prop.identifier, default, prop.min, prop.max))
+ print("\t %s.%s, %s not in [%s - %s]" %
+ (rna_info.identifier, prop.identifier, default, prop.min, prop.max))
# now for operators
op_mods = dir(bpy.ops)
@@ -691,8 +696,8 @@ def BuildRNAInfo():
for rna_prop in rna_info.args:
rna_prop.build()
- #for rna_info in InfoStructRNA.global_lookup.values():
- # print(rna_info)
+ # for rna_info in InfoStructRNA.global_lookup.values():
+ # print(rna_info)
return InfoStructRNA.global_lookup, InfoFunctionRNA.global_lookup, InfoOperatorRNA.global_lookup, InfoPropertyRNA.global_lookup
@@ -701,7 +706,7 @@ def main():
struct = rna_info.BuildRNAInfo()[0]
data = []
for struct_id, v in sorted(struct.items()):
- struct_id_str = v.identifier #~ "".join(sid for sid in struct_id if struct_id)
+ struct_id_str = v.identifier # "".join(sid for sid in struct_id if struct_id)
for base in v.get_bases():
struct_id_str = base.identifier + "|" + struct_id_str
@@ -714,7 +719,10 @@ def main():
if prop.array_length > 0:
prop_type += "[%d]" % prop.array_length
- data.append("%s.%s -> %s: %s%s %s" % (struct_id_str, prop.identifier, prop.identifier, prop_type, ", (read-only)" if prop.is_readonly else "", prop.description))
+ data.append(
+ "%s.%s -> %s: %s%s %s" %
+ (struct_id_str, prop.identifier, prop.identifier, prop_type,
+ ", (read-only)" if prop.is_readonly else "", prop.description))
data.sort()
if bpy.app.background:
diff --git a/release/scripts/modules/rna_xml.py b/release/scripts/modules/rna_xml.py
index ad4809efbe1..e8705834df3 100644
--- a/release/scripts/modules/rna_xml.py
+++ b/release/scripts/modules/rna_xml.py
@@ -90,7 +90,7 @@ def rna2xml(fw=print_ln,
bpy.types.PoseBone,
bpy.types.Node,
bpy.types.Sequence,
- )
+ )
def number_to_str(val, val_type):
if val_type == int:
@@ -276,7 +276,8 @@ def xml2rna(root_xml,
if value_xml.startswith("#"):
# read hexidecimal value as float array
value_xml_split = value_xml[1:]
- value_xml_coerce = [int(value_xml_split[i:i + 2], 16) / 255 for i in range(0, len(value_xml_split), 2)]
+ value_xml_coerce = [int(value_xml_split[i:i + 2], 16) /
+ 255 for i in range(0, len(value_xml_split), 2)]
del value_xml_split
else:
value_xml_split = value_xml.split()
diff --git a/release/scripts/modules/sys_info.py b/release/scripts/modules/sys_info.py
index 49395dd48f0..30b9cdfaf37 100644
--- a/release/scripts/modules/sys_info.py
+++ b/release/scripts/modules/sys_info.py
@@ -24,7 +24,6 @@
def write_sysinfo(filepath):
import sys
- import textwrap
import subprocess
import bpy
@@ -53,7 +52,8 @@ def write_sysinfo(filepath):
# build info
output.write(title("Blender"))
- output.write("version: %s, branch: %s, commit date: %s %s, hash: %s, type: %s\n" %
+ output.write(
+ "version: %s, branch: %s, commit date: %s %s, hash: %s, type: %s\n" %
(bpy.app.version_string,
prepr(bpy.app.build_branch),
prepr(bpy.app.build_commit_date),
@@ -81,9 +81,9 @@ def write_sysinfo(filepath):
output.write("binary path: %s\n" % prepr(bpy.app.binary_path_python))
try:
py_ver = prepr(subprocess.check_output([
- bpy.app.binary_path_python,
- "--version",
- ]).strip())
+ bpy.app.binary_path_python,
+ "--version",
+ ]).strip())
except Exception as e:
py_ver = str(e)
output.write("version: %s\n" % py_ver)
@@ -105,8 +105,9 @@ def write_sysinfo(filepath):
ffmpeg = bpy.app.ffmpeg
if ffmpeg.supported:
for lib in ("avcodec", "avdevice", "avformat", "avutil", "swscale"):
- output.write("%s:%s%r\n" % (lib, " " * (10 - len(lib)),
- getattr(ffmpeg, lib + "_version_string")))
+ output.write(
+ "%s:%s%r\n" % (lib, " " * (10 - len(lib)),
+ getattr(ffmpeg, lib + "_version_string")))
else:
output.write("Blender was built without FFmpeg support\n")
@@ -157,6 +158,13 @@ def write_sysinfo(filepath):
else:
output.write("Blender was built without OpenVDB support\n")
+ alembic = bpy.app.alembic
+ output.write("Alembic: ")
+ if alembic.supported:
+ output.write("%s\n" % alembic.version_string)
+ else:
+ output.write("Blender was built without Alembic support\n")
+
if not bpy.app.build_options.sdl:
output.write("SDL: Blender was built without SDL support\n")
@@ -205,4 +213,3 @@ def write_sysinfo(filepath):
output.write(cycles.engine.system_info())
output.close()
-
diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py
index 4ca2f773dcc..cb5f1595ff3 100644
--- a/release/scripts/startup/bl_ui/properties_constraint.py
+++ b/release/scripts/startup/bl_ui/properties_constraint.py
@@ -880,6 +880,19 @@ class ConstraintButtonsPanel:
layout.operator("clip.constraint_to_fcurve")
+ def TRANSFORM_CACHE(self, context, layout, con):
+ layout.label(text="Cache File Properties:")
+ box = layout.box()
+ box.template_cache_file(con, "cache_file")
+
+ cache_file = con.cache_file
+
+ layout.label(text="Constraint Properties:")
+ box = layout.box()
+
+ if cache_file is not None:
+ box.prop_search(con, "object_path", cache_file, "object_paths")
+
def SCRIPT(self, context, layout, con):
layout.label("Blender 2.6 doesn't support python constraints yet")
diff --git a/release/scripts/startup/bl_ui/properties_data_bone.py b/release/scripts/startup/bl_ui/properties_data_bone.py
index 853d45e2396..3a5475514c9 100644
--- a/release/scripts/startup/bl_ui/properties_data_bone.py
+++ b/release/scripts/startup/bl_ui/properties_data_bone.py
@@ -153,7 +153,7 @@ class BONE_PT_curved(BoneButtonsPanel, Panel):
def draw(self, context):
ob = context.object
bone = context.bone
- arm = context.armature
+ # arm = context.armature
pchan = None
if ob and bone:
@@ -268,7 +268,6 @@ class BONE_PT_relations(BoneButtonsPanel, Panel):
sub.prop(bone, "use_local_location")
-
class BONE_PT_display(BoneButtonsPanel, Panel):
bl_label = "Display"
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 0a8920dff59..59722ae09e4 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -151,14 +151,15 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col = split.column()
col.label(text="Operation:")
col.prop(md, "operation", text="")
- row = layout.row()
- row.label("Solver:")
- row.prop(md, "solver", expand=True)
col = split.column()
col.label(text="Object:")
col.prop(md, "object", text="")
+ split = layout.split()
+ split.column().label(text="Solver:")
+ split.column().prop(md, "solver", text="")
+
if md.solver == 'BMESH':
layout.prop(md, "double_threshold")
@@ -180,6 +181,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
layout.prop(md, "cache_format")
layout.prop(md, "filepath")
+ if md.cache_format == 'ABC':
+ layout.prop(md, "sub_object")
+
layout.label(text="Evaluation:")
layout.prop(md, "factor", slider=True)
layout.prop(md, "deform_mode")
@@ -214,6 +218,22 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
row = split.row()
row.prop(md, "flip_axis")
+ def MESH_SEQUENCE_CACHE(self, layout, ob, md):
+ layout.label(text="Cache File Properties:")
+ box = layout.box()
+ box.template_cache_file(md, "cache_file")
+
+ cache_file = md.cache_file
+
+ layout.label(text="Modifier Properties:")
+ box = layout.box()
+
+ if cache_file is not None:
+ box.prop_search(md, "object_path", cache_file, "object_paths")
+
+ if ob.type == 'MESH':
+ box.row().prop(md, "read_data")
+
def CAST(self, layout, ob, md):
split = layout.split(percentage=0.25)
@@ -845,9 +865,21 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Subdivisions:")
- col.prop(md, "levels", text="View")
- col.prop(md, "render_levels", text="Render")
+
+ engine = bpy.context.scene.render.engine
+ if engine == "CYCLES" and md == ob.modifiers[-1] and bpy.context.scene.cycles.feature_set == "EXPERIMENTAL":
+ col.label(text="Preview:")
+ col.prop(md, "levels", text="Levels")
+ col.label(text="Render:")
+ col.prop(ob.cycles, "use_adaptive_subdivision", text="Adaptive")
+ if ob.cycles.use_adaptive_subdivision:
+ col.prop(ob.cycles, "dicing_rate")
+ else:
+ col.prop(md, "render_levels", text="Levels")
+ else:
+ col.label(text="Subdivisions:")
+ col.prop(md, "levels", text="View")
+ col.prop(md, "render_levels", text="Render")
col = split.column()
col.label(text="Options:")
diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py
index 300be708049..386ad254892 100644
--- a/release/scripts/startup/bl_ui/properties_game.py
+++ b/release/scripts/startup/bl_ui/properties_game.py
@@ -568,7 +568,7 @@ class WORLD_PT_game_context_world(WorldButtonsPanel, Panel):
@classmethod
def poll(cls, context):
rd = context.scene.render
- return (context.scene) and (rd.use_game_engine)
+ return (context.scene) and (rd.engine in cls.COMPAT_ENGINES)
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 ac412688fa1..c80c5ca7ddd 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -63,7 +63,7 @@ class GreasePencilDrawingToolsPanel:
def draw(self, context):
layout = self.layout
- is_3d_view = context.space_data.type == 'VIEW_3D'
+ is_3d_view = context.space_data.type == 'VIEW_3D'
is_clip_editor = context.space_data.type == 'CLIP_EDITOR'
col = layout.column(align=True)
@@ -136,7 +136,7 @@ class GreasePencilStrokeEditPanel:
def draw(self, context):
layout = self.layout
- is_3d_view = context.space_data.type == 'VIEW_3D'
+ is_3d_view = context.space_data.type == 'VIEW_3D'
if not is_3d_view:
layout.label(text="Select:")
@@ -151,18 +151,19 @@ class GreasePencilStrokeEditPanel:
col.operator("gpencil.select_linked")
col.operator("gpencil.select_more")
col.operator("gpencil.select_less")
-
- layout.separator()
+ col.operator("gpencil.palettecolor_select")
layout.label(text="Edit:")
row = layout.row(align=True)
row.operator("gpencil.copy", text="Copy")
- row.operator("gpencil.paste", text="Paste")
+ row.operator("gpencil.paste", text="Paste").type = 'COPY'
+ row.operator("gpencil.paste", text="Paste & Merge").type = 'MERGE'
col = layout.column(align=True)
- col.operator("gpencil.delete", text="Delete")
+ col.operator("gpencil.delete")
col.operator("gpencil.duplicate_move", text="Duplicate")
- col.operator("transform.mirror", text="Mirror")
+ if is_3d_view:
+ col.operator("gpencil.stroke_cyclical_set", text="Toggle Cyclic").type = 'TOGGLE'
layout.separator()
@@ -176,9 +177,92 @@ class GreasePencilStrokeEditPanel:
col = layout.column(align=True)
col.operator("transform.bend", text="Bend")
+ col.operator("transform.mirror", text="Mirror")
col.operator("transform.shear", text="Shear")
col.operator("transform.tosphere", text="To Sphere")
+ layout.separator()
+ col = layout.column(align=True)
+ col.operator_menu_enum("gpencil.stroke_arrange", text="Arrange Strokes...", property="direction")
+ col.operator("gpencil.stroke_change_color", text="Move to Color")
+
+ layout.separator()
+ col = layout.column(align=True)
+ col.operator("gpencil.stroke_join", text="Join").type = 'JOIN'
+ col.operator("gpencil.stroke_join", text="Join & Copy").type = 'JOINCOPY'
+ col.operator("gpencil.stroke_flip", text="Flip Direction")
+
+ gpd = context.gpencil_data
+ if gpd:
+ col.prop(gpd, "show_stroke_direction", text="Show Directions")
+
+
+class GreasePencilBrushPanel:
+ # subclass must set
+ # bl_space_type = 'IMAGE_EDITOR'
+ bl_label = "Drawing Brushes"
+ bl_category = "Grease Pencil"
+ bl_region_type = 'TOOLS'
+
+ @staticmethod
+ def draw(self, context):
+ layout = self.layout
+
+ row = layout.row()
+ col = row.column()
+ ts = context.scene.tool_settings
+ if len(ts.gpencil_brushes) >= 2:
+ brows = 3
+ else:
+ brows = 2
+ col.template_list("GPENCIL_UL_brush", "", ts, "gpencil_brushes", ts.gpencil_brushes, "active_index", rows=brows)
+
+ col = row.column()
+
+ sub = col.column(align=True)
+ sub.operator("gpencil.brush_add", icon='ZOOMIN', text="")
+ sub.operator("gpencil.brush_remove", icon='ZOOMOUT', text="")
+ sub.menu("GPENCIL_MT_brush_specials", icon='DOWNARROW_HLT', text="")
+ brush = context.active_gpencil_brush
+ if brush:
+ if len(ts.gpencil_brushes) > 1:
+ col.separator()
+ sub = col.column(align=True)
+ sub.operator("gpencil.brush_move", icon='TRIA_UP', text="").type = 'UP'
+ sub.operator("gpencil.brush_move", icon='TRIA_DOWN', text="").type = 'DOWN'
+
+ # Brush details
+ if brush is not None:
+ row = layout.row()
+ row.prop(brush, "line_width")
+ row = layout.row(align=True)
+ row.prop(brush, "use_random_pressure", text='', icon='RNDCURVE')
+ row.prop(brush, "pen_sensitivity_factor", slider=True)
+ row.prop(brush, "use_pressure", text='', icon='STYLUS_PRESSURE')
+ row = layout.row(align=True)
+ row.prop(brush, "use_random_strength", text='', icon='RNDCURVE')
+ row.prop(brush, "strength", slider=True)
+ row.prop(brush, "use_strength_pressure", text='', icon='STYLUS_PRESSURE')
+ row = layout.row(align=True)
+ row.prop(brush, "random_press", slider=True)
+
+ row = layout.row(align=True)
+ row.prop(brush, "jitter", slider=True)
+ row.prop(brush, "use_jitter_pressure", text='', icon='STYLUS_PRESSURE')
+ row = layout.row()
+ row.prop(brush, "angle", slider=True)
+ row.prop(brush, "angle_factor", text="Factor", slider=True)
+
+ box = layout.box()
+ col = box.column(align=True)
+ col.label(text="Stroke Quality:")
+ col.prop(brush, "pen_smooth_factor")
+ col.prop(brush, "pen_smooth_steps")
+ col.separator()
+ row = col.row(align=False)
+ row.prop(brush, "pen_subdivision_steps")
+ row.prop(brush, "random_subdiv", text='Randomness', slider=True)
+
class GreasePencilStrokeSculptPanel:
# subclass must set
@@ -203,7 +287,7 @@ class GreasePencilStrokeSculptPanel:
tool = settings.tool
brush = settings.brush
- layout.column().prop(settings, "tool", expand=True)
+ layout.column().prop(settings, "tool")
col = layout.column()
col.prop(brush, "size", slider=True)
@@ -211,12 +295,17 @@ class GreasePencilStrokeSculptPanel:
row.prop(brush, "strength", slider=True)
row.prop(brush, "use_pressure_strength", text="")
col.prop(brush, "use_falloff")
+ if tool in {'SMOOTH', 'RANDOMIZE'}:
+ row = layout.row(align=True)
+ row.prop(settings, "affect_position", text="Position", icon='MESH_DATA', toggle=True)
+ row.prop(settings, "affect_strength", text="Strength", icon='COLOR', toggle=True)
+ row.prop(settings, "affect_thickness", text="Thickness", icon='LINE_DATA', toggle=True)
layout.separator()
- if settings.tool == 'THICKNESS':
+ if tool == 'THICKNESS':
layout.row().prop(brush, "direction", expand=True)
- elif settings.tool == 'PINCH':
+ elif tool == 'PINCH':
row = layout.row(align=True)
row.prop_enum(brush, "direction", 'ADD', text="Pinch")
row.prop_enum(brush, "direction", 'SUBTRACT', text="Inflate")
@@ -225,13 +314,49 @@ class GreasePencilStrokeSculptPanel:
row.prop_enum(brush, "direction", 'SUBTRACT', text="CW")
row.prop_enum(brush, "direction", 'ADD', text="CCW")
- layout.separator()
- layout.prop(settings, "use_select_mask")
+ row = layout.row(align=True)
+ row.prop(settings, "use_select_mask")
+ row = layout.row(align=True)
+ row.prop(settings, "selection_alpha", slider=True)
- if settings.tool == 'SMOOTH':
+ if tool == 'SMOOTH':
layout.prop(brush, "affect_pressure")
+class GreasePencilBrushCurvesPanel:
+ # subclass must set
+ # bl_space_type = 'IMAGE_EDITOR'
+ bl_label = "Brush Curves"
+ bl_category = "Grease Pencil"
+ bl_region_type = 'TOOLS'
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ if context.active_gpencil_brush is None:
+ return False
+
+ brush = context.active_gpencil_brush
+ return bool(brush)
+
+ @staticmethod
+ def draw(self, context):
+ layout = self.layout
+ brush = context.active_gpencil_brush
+ # Brush
+ layout.label("Sensitivity")
+ box = layout.box()
+ box.template_curve_mapping(brush, "curve_sensitivity", brush=True)
+
+ layout.label("Strength")
+ box = layout.box()
+ box.template_curve_mapping(brush, "curve_strength", brush=True)
+
+ layout.label("Jitter")
+ box = layout.box()
+ box.template_curve_mapping(brush, "curve_jitter", brush=True)
+
+
###############################
class GPENCIL_PIE_tool_palette(Menu):
@@ -282,6 +407,7 @@ class GPENCIL_PIE_tool_palette(Menu):
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')
+ col.operator("gpencil.palettecolor_select", text="Select Color", icon='COLOR')
# NE - Select (Modal)
col = pie.column()
@@ -315,24 +441,47 @@ class GPENCIL_PIE_settings_palette(Menu):
pie = layout.menu_pie()
# gpd = context.gpencil_data
gpl = context.active_gpencil_layer
+ palcolor = context.active_gpencil_palettecolor
+ brush = context.active_gpencil_brush
# 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)
+ if palcolor is not None:
+ col.label(text="Stroke")
+ col.prop(palcolor, "color", text="")
+ col.prop(palcolor, "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)
+ if palcolor is not None:
+ col.label(text="Fill")
+ col.prop(palcolor, "fill_color", text="")
+ col.prop(palcolor, "fill_alpha", text="", slider=True)
- # S - Layer settings
+ # S Brush settings
col = pie.column()
- col.prop(gpl, "line_width", slider=True)
- # col.prop(gpl, "use_volumetric_strokes")
- col.prop(gpl, "use_onion_skinning")
+ col.label("Active Brush: ")
+
+ row = col.row()
+ row.operator_context = 'EXEC_REGION_WIN'
+ row.operator_menu_enum("gpencil.brush_change", "brush", text="", icon='BRUSH_DATA')
+ row.prop(brush, "name", text="")
+
+ col.prop(brush, "line_width", slider=True)
+ row = col.row(align=True)
+ row.prop(brush, "use_random_pressure", text='', icon='RNDCURVE')
+ row.prop(brush, "pen_sensitivity_factor", slider=True)
+ row.prop(brush, "use_pressure", text='', icon='STYLUS_PRESSURE')
+ row = col.row(align=True)
+ row.prop(brush, "use_random_strength", text='', icon='RNDCURVE')
+ row.prop(brush, "strength", slider=True)
+ row.prop(brush, "use_strength_pressure", text='', icon='STYLUS_PRESSURE')
+ row = col.row(align=True)
+ row.prop(brush, "jitter", slider=True)
+ row.prop(brush, "use_jitter_pressure", text='', icon='STYLUS_PRESSURE')
+ row = col.row()
+ row.prop(brush, "angle", slider=True)
+ row.prop(brush, "angle_factor", text="Factor", slider=True)
# N - Active Layer
col = pie.column()
@@ -347,6 +496,35 @@ class GPENCIL_PIE_settings_palette(Menu):
row = col.row()
row.prop(gpl, "lock")
row.prop(gpl, "hide")
+ col.prop(gpl, "use_onion_skinning")
+
+ # NW - Move stroke Down
+ col = pie.column(align=True)
+ col.label("Arrange Strokes")
+ col.operator("gpencil.stroke_arrange", text="Send to Back").direction = 'BOTTOM'
+ col.operator("gpencil.stroke_arrange", text="Send Backward").direction = 'DOWN'
+
+ # NE - Move stroke Up
+ col = pie.column(align=True)
+ col.label("Arrange Strokes")
+ col.operator("gpencil.stroke_arrange", text="Bring to Front").direction = 'TOP'
+ col.operator("gpencil.stroke_arrange", text="Bring Forward").direction = 'UP'
+
+ # SW - Move stroke to color
+ col = pie.column(align=True)
+ col.operator("gpencil.stroke_change_color", text="Move to Color")
+
+ # SE - Join strokes
+ col = pie.column(align=True)
+ col.label("Join Strokes")
+ row = col.row()
+ row.operator("gpencil.stroke_join", text="Join").type = 'JOIN'
+ row.operator("gpencil.stroke_join", text="Join & Copy").type = 'JOINCOPY'
+ col.operator("gpencil.stroke_flip", text="Flip direction")
+
+ gpd = context.gpencil_data
+ if gpd:
+ col.prop(gpd, "show_stroke_direction", text="Show drawing direction")
class GPENCIL_PIE_tools_more(Menu):
@@ -411,6 +589,11 @@ class GPENCIL_PIE_sculpt(Menu):
row.prop(brush, "strength", slider=True)
# row.prop(brush, "use_pressure_strength", text="", icon_only=True)
col.prop(brush, "use_falloff")
+ if settings.tool in {'SMOOTH', 'RANDOMIZE'}:
+ row = col.row(align=True)
+ row.prop(settings, "affect_position", text="Position", icon='MESH_DATA', toggle=True)
+ row.prop(settings, "affect_strength", text="Strength", icon='COLOR', toggle=True)
+ row.prop(settings, "affect_thickness", text="Thickness", icon='LINE_DATA', toggle=True)
# S - Change Brush Type Shortcuts
row = pie.row()
@@ -422,6 +605,7 @@ class GPENCIL_PIE_sculpt(Menu):
row = pie.row()
row.prop_enum(settings, "tool", value='SMOOTH')
row.prop_enum(settings, "tool", value='THICKNESS')
+ row.prop_enum(settings, "tool", value='STRENGTH')
row.prop_enum(settings, "tool", value='RANDOMIZE')
@@ -448,6 +632,48 @@ class GPENCIL_MT_snap(Menu):
###############################
+class GPENCIL_UL_brush(UIList):
+ def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
+ # assert(isinstance(item, bpy.types.GPencilBrush)
+ brush = item
+
+ if self.layout_type in {'DEFAULT', 'COMPACT'}:
+ row = layout.row(align=True)
+ row.prop(brush, "name", text="", emboss=False, icon='BRUSH_DATA')
+ elif self.layout_type == 'GRID':
+ layout.alignment = 'CENTER'
+ layout.label(text="", icon_value=icon)
+
+
+class GPENCIL_UL_palettecolor(UIList):
+ def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
+ # assert(isinstance(item, bpy.types.PaletteColor)
+ palcolor = item
+
+ if self.layout_type in {'DEFAULT', 'COMPACT'}:
+ if palcolor.lock:
+ layout.active = False
+
+ split = layout.split(percentage=0.25)
+ row = split.row(align=True)
+ row.prop(palcolor, "color", text="", emboss=palcolor.is_stroke_visible)
+ row.prop(palcolor, "fill_color", text="", emboss=palcolor.is_fill_visible)
+ split.prop(palcolor, "info", text="", emboss=False)
+
+ row = layout.row(align=True)
+ row.prop(palcolor, "lock", text="", emboss=False)
+ row.prop(palcolor, "hide", text="", emboss=False)
+ if palcolor.ghost is True:
+ icon = 'GHOST_DISABLED'
+ else:
+ icon = 'GHOST_ENABLED'
+ row.prop(palcolor, "ghost", text="", icon=icon, emboss=False)
+
+ elif self.layout_type == 'GRID':
+ layout.alignment = 'CENTER'
+ layout.label(text="", icon_value=icon)
+
+
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)
@@ -457,15 +683,19 @@ class GPENCIL_UL_layer(UIList):
if gpl.lock:
layout.active = False
- split = layout.split(percentage=0.25)
- row = split.row(align=True)
- row.prop(gpl, "color", text="", emboss=gpl.is_stroke_visible)
- row.prop(gpl, "fill_color", text="", emboss=gpl.is_fill_visible)
- split.prop(gpl, "info", text="", emboss=False)
+ row = layout.row(align=True)
+ if gpl.is_parented:
+ icon = 'BONE_DATA'
+ else:
+ icon = 'BLANK1'
+
+ row.label(text="", icon=icon)
+ row.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)
+ row.prop(gpl, "unlock_color", text="", emboss=False)
elif self.layout_type == 'GRID':
layout.alignment = 'CENTER'
layout.label(text="", icon_value=icon)
@@ -489,11 +719,40 @@ class GPENCIL_MT_layer_specials(Menu):
layout.operator("gpencil.lock_all", icon='LOCKED', text="Lock All")
layout.operator("gpencil.unlock_all", icon='UNLOCKED', text="UnLock All")
+ layout.separator()
+
+ layout.operator("gpencil.layer_merge", icon='NLA', text="Merge Down")
+
+
+class GPENCIL_MT_brush_specials(Menu):
+ bl_label = "Layer"
+
+ def draw(self, context):
+ layout = self.layout
+ layout.operator("gpencil.brush_copy", icon='PASTEDOWN', text="Copy current drawing brush")
+ layout.operator("gpencil.brush_presets_create", icon='HELP', text="Create a set of predefined brushes")
+
+
+class GPENCIL_MT_palettecolor_specials(Menu):
+ bl_label = "Layer"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("gpencil.palettecolor_reveal", icon='RESTRICT_VIEW_OFF', text="Show All")
+ layout.operator("gpencil.palettecolor_hide", icon='RESTRICT_VIEW_ON', text="Hide Others").unselected = True
+
+ layout.separator()
+
+ layout.operator("gpencil.palettecolor_lock_all", icon='LOCKED', text="Lock All")
+ layout.operator("gpencil.palettecolor_unlock_all", icon='UNLOCKED', text="UnLock All")
+ layout.operator("gpencil.palettecolor_copy", icon='PASTEDOWN', text="Copy Color")
+
class GreasePencilDataPanel:
# subclass must set
# bl_space_type = 'IMAGE_EDITOR'
- bl_label = "Grease Pencil"
+ bl_label = "Grease Pencil Layers"
bl_region_type = 'UI'
@staticmethod
@@ -553,45 +812,49 @@ class GreasePencilDataPanel:
col.separator()
sub = col.column(align=True)
- sub.operator("gpencil.layer_isolate", icon='SOLO_OFF', text="").affect_visibility = False
+ sub.operator("gpencil.layer_isolate", icon='LOCKED', text="").affect_visibility = False
sub.operator("gpencil.layer_isolate", icon='RESTRICT_VIEW_OFF', text="").affect_visibility = True
if gpl:
- self.draw_layer(layout, gpl)
+ self.draw_layer(context, layout, gpl)
- def draw_layer(self, layout, gpl):
- # layer settings
+ def draw_layer(self, context, layout, gpl):
+ row = layout.row(align=True)
+ row.prop(gpl, "opacity", text="Opacity", slider=True)
+
+ # Layer options
split = layout.split(percentage=0.5)
split.active = not gpl.lock
+ split.prop(gpl, "show_x_ray")
+ split.prop(gpl, "show_points")
- # 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)
+ # Offsets + Parenting (where available)
+ split = layout.split(percentage=0.5)
+ split.active = not gpl.lock
- # Options
- col = layout.column(align=True)
- col.active = not gpl.lock
- col.prop(gpl, "line_width", slider=True)
+ # Offsets - Color Tint
+ col = split.column()
+ subcol = col.column(align=True)
+ subcol.label("Tint")
+ subcol.prop(gpl, "tint_color", text="")
+ subcol.prop(gpl, "tint_factor", text="Factor", slider=True)
+ # Offsets - Thickness
+ row = col.row(align=True)
+ row.prop(gpl, "line_change", text="Thickness Change", slider=True)
+ row.operator("gpencil.stroke_apply_thickness", icon='STYLUS_PRESSURE', text="")
- split = layout.split(percentage=0.5)
- split.active = not gpl.lock
+ # Parenting
+ if context.space_data.type == 'VIEW_3D':
+ col = split.column(align=True)
+ col.label(text="Parent:")
+ col.prop(gpl, "parent", text="")
- col = split.column(align=True)
- col.prop(gpl, "use_volumetric_strokes")
- col.prop(gpl, "show_points", text="Points")
-
- col = split.column(align=True)
- col.prop(gpl, "use_hq_fill")
- col.prop(gpl, "show_x_ray")
+ sub = col.column()
+ sub.prop(gpl, "parent_type", text="")
+ parent = gpl.parent
+ if parent and gpl.parent_type == 'BONE' and parent.type == 'ARMATURE':
+ sub.prop_search(gpl, "parent_bone", parent.data, "bones", text="")
layout.separator()
@@ -634,14 +897,103 @@ class GreasePencilDataPanel:
row.prop(gpl, "after_color", text="")
sub.prop(gpl, "ghost_after_range", text="After")
- # Smooth and subdivide new strokes
- layout.separator()
- col = layout.column(align=True)
- col.label(text="New Stroke Quality:")
- col.prop(gpl, "pen_smooth_factor")
- col.prop(gpl, "pen_smooth_steps")
- col.separator()
- col.prop(gpl, "pen_subdivision_steps")
+
+class GreasePencilPaletteColorPanel:
+ # subclass must set
+ bl_label = "Grease Pencil Colors"
+ bl_region_type = 'UI'
+
+ @classmethod
+ def poll(cls, context):
+ if context.gpencil_data is None:
+ return False
+
+ gpd = context.gpencil_data
+ return bool(gpd.layers.active)
+
+ @staticmethod
+ def draw(self, context):
+ layout = self.layout
+ palette = context.active_gpencil_palette
+
+ if palette:
+ row = layout.row(align=True)
+ row.operator_context = 'EXEC_REGION_WIN'
+ row.operator_menu_enum("gpencil.palette_change", "palette", text="", icon='COLOR')
+ row.prop(palette, "name", text="")
+ row.operator("gpencil.palette_add", icon='ZOOMIN', text="")
+ row.operator("gpencil.palette_remove", icon='X', text="")
+
+ # Palette colors
+ row = layout.row()
+ col = row.column()
+ if len(palette.colors) >= 2:
+ color_rows = 5
+ else:
+ color_rows = 2
+ col.template_list("GPENCIL_UL_palettecolor", "", palette, "colors", palette.colors, "active_index",
+ rows=color_rows)
+
+ col = row.column()
+
+ sub = col.column(align=True)
+ sub.operator("gpencil.palettecolor_add", icon='ZOOMIN', text="")
+ sub.operator("gpencil.palettecolor_remove", icon='ZOOMOUT', text="")
+
+ palcol = context.active_gpencil_palettecolor
+ if palcol:
+ sub.menu("GPENCIL_MT_palettecolor_specials", icon='DOWNARROW_HLT', text="")
+
+ if len(palette.colors) > 1:
+ col.separator()
+
+ sub = col.column(align=True)
+ sub.operator("gpencil.palettecolor_move", icon='TRIA_UP', text="").direction = 'UP'
+ sub.operator("gpencil.palettecolor_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
+
+ col.separator()
+ sub = col.column(align=True)
+ sub.operator("gpencil.palettecolor_isolate", icon='LOCKED', text="").affect_visibility = False
+ sub.operator("gpencil.palettecolor_isolate", icon='RESTRICT_VIEW_OFF', text="").affect_visibility = True
+ sub.operator("gpencil.stroke_lock_color", icon='BORDER_RECT', text="")
+ sub.operator("gpencil.palette_lock_layer", icon='COLOR', text="")
+
+ pcolor = palette.colors.active
+ if pcolor:
+ self.draw_palettecolors(layout, pcolor)
+
+ # ----------------------------------------------
+ # Draw palette colors
+ # ----------------------------------------------
+ def draw_palettecolors(self, layout, pcolor):
+ # color settings
+ split = layout.split(percentage=0.5)
+ split.active = not pcolor.lock
+
+ # Column 1 - Stroke
+ col = split.column(align=True)
+ col.active = not pcolor.lock
+ col.label(text="Stroke:")
+ col.prop(pcolor, "color", text="")
+ col.prop(pcolor, "alpha", slider=True)
+
+ # Column 2 - Fill
+ col = split.column(align=True)
+ col.active = not pcolor.lock
+ col.label(text="Fill:")
+ col.prop(pcolor, "fill_color", text="")
+ col.prop(pcolor, "fill_alpha", text="Opacity", slider=True)
+
+ # Options
+ split = layout.split(percentage=0.5)
+ split.active = not pcolor.lock
+
+ col = split.column(align=True)
+ col.active = not pcolor.lock
+ col.prop(pcolor, "use_volumetric_strokes")
+ col = split.column(align=True)
+ col.active = not pcolor.lock
+ col.prop(pcolor, "use_hq_fill")
class GreasePencilToolsPanel:
diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py
index 28a8858a61e..0362cc42371 100644
--- a/release/scripts/startup/bl_ui/properties_physics_cloth.py
+++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py
@@ -25,6 +25,11 @@ from bl_ui.properties_physics_common import (
)
+def cloth_panel_enabled(md):
+ return True
+ #return md.point_cache.is_baked is False
+
+
class CLOTH_MT_presets(Menu):
bl_label = "Cloth Presets"
preset_subdir = "cloth"
@@ -41,11 +46,12 @@ class PhysicButtonsPanel:
def poll(cls, context):
ob = context.object
rd = context.scene.render
- return (ob and ob.type == 'MESH') and (not rd.use_game_engine) and (context.cloth)
+ return (ob and ob.type == 'MESH') and (rd.engine in cls.COMPAT_ENGINES) and (context.cloth)
class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
bl_label = "Cloth"
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
layout = self.layout
@@ -54,18 +60,31 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
ob = context.object
cloth = md.settings
- split = layout.split()
+ layout.active = cloth_panel_enabled(md)
+
+ split = layout.split(percentage=0.25)
col = split.column()
- col.label(text="Presets:")
- sub = col.row(align=True)
+ split.label(text="Presets:")
+ sub = split.row(align=True)
sub.menu("CLOTH_MT_presets", text=bpy.types.CLOTH_MT_presets.bl_label)
sub.operator("cloth.preset_add", text="", icon='ZOOMIN')
sub.operator("cloth.preset_add", text="", icon='ZOOMOUT').remove_active = True
- col.label(text="Quality:")
- col.prop(cloth, "quality", text="Steps", slider=True)
+ split = layout.split(percentage=0.25)
+
+ split.label(text="Quality:")
+ split.prop(cloth, "quality", text="Steps")
+
+ split = layout.split(percentage=0.25)
+
+ split.label(text="Speed:")
+ split.prop(cloth, "time_scale", text="Multiplier")
+
+ split = layout.split()
+
+ col = split.column()
col.label(text="Material:")
col.prop(cloth, "mass")
@@ -79,7 +98,11 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
col.prop(cloth, "air_damping", text="Air")
col.prop(cloth, "vel_damping", text="Velocity")
- col.prop(cloth, "use_pin_cloth", text="Pinning")
+ split = layout.split()
+
+ col = split.column()
+
+ col.prop(cloth, "use_pin_cloth", text="Pinning:")
sub = col.column()
sub.active = cloth.use_pin_cloth
sub.prop_search(cloth, "vertex_group_mass", ob, "vertex_groups", text="")
@@ -96,20 +119,28 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
col.prop(cloth, "goal_friction", text="Friction")
"""
+ col = split.column()
+
+ col.prop(cloth, "use_dynamic_mesh", text="Dynamic Mesh")
+
key = ob.data.shape_keys
if key:
- col.label(text="Rest Shape Key:")
- col.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="")
+ sub = col.column()
+ sub.active = not cloth.use_dynamic_mesh
+ sub.label(text="Rest Shape Key:")
+ sub.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="")
class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel):
bl_label = "Cloth Collision"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw_header(self, context):
cloth = context.cloth.collision_settings
+ self.layout.active = cloth_panel_enabled(context.cloth)
self.layout.prop(cloth, "use_collision", text="")
def draw(self, context):
@@ -119,12 +150,12 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel):
md = context.cloth
ob = context.object
- layout.active = cloth.use_collision
+ layout.active = cloth.use_collision and cloth_panel_enabled(md)
split = layout.split()
col = split.column()
- col.prop(cloth, "collision_quality", slider=True, text="Quality")
+ col.prop(cloth, "collision_quality", text="Quality")
col.prop(cloth, "distance_min", slider=True, text="Distance")
col.prop(cloth, "repel_force", slider=True, text="Repel")
col.prop(cloth, "distance_repel", slider=True, text="Repel Distance")
@@ -134,7 +165,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel):
col.prop(cloth, "use_self_collision", text="Self Collision")
sub = col.column()
sub.active = cloth.use_self_collision
- sub.prop(cloth, "self_collision_quality", slider=True, text="Quality")
+ sub.prop(cloth, "self_collision_quality", text="Quality")
sub.prop(cloth, "self_distance_min", slider=True, text="Distance")
sub.prop_search(cloth, "vertex_group_self_collisions", ob, "vertex_groups", text="")
@@ -144,10 +175,12 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel):
class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel):
bl_label = "Cloth Stiffness Scaling"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw_header(self, context):
cloth = context.cloth.settings
+ self.layout.active = cloth_panel_enabled(context.cloth)
self.layout.prop(cloth, "use_stiffness_scale", text="")
def draw(self, context):
@@ -157,7 +190,7 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel):
ob = context.object
cloth = context.cloth.settings
- layout.active = cloth.use_stiffness_scale
+ layout.active = (cloth.use_stiffness_scale and cloth_panel_enabled(md))
split = layout.split()
@@ -175,10 +208,12 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel):
class PHYSICS_PT_cloth_sewing(PhysicButtonsPanel, Panel):
bl_label = "Cloth Sewing Springs"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw_header(self, context):
cloth = context.cloth.settings
+ self.layout.active = cloth_panel_enabled(context.cloth)
self.layout.prop(cloth, "use_sewing_springs", text="")
def draw(self, context):
@@ -188,7 +223,7 @@ class PHYSICS_PT_cloth_sewing(PhysicButtonsPanel, Panel):
ob = context.object
cloth = context.cloth.settings
- layout.active = cloth.use_sewing_springs
+ layout.active = (cloth.use_sewing_springs and cloth_panel_enabled(md))
layout.prop(cloth, "sewing_force_max", text="Sewing Force")
@@ -207,6 +242,7 @@ class PHYSICS_PT_cloth_sewing(PhysicButtonsPanel, Panel):
class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, Panel):
bl_label = "Cloth Field Weights"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
cloth = context.cloth.settings
diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py
index a3a5c503908..ea4bbc76f43 100644
--- a/release/scripts/startup/bl_ui/properties_physics_common.py
+++ b/release/scripts/startup/bl_ui/properties_physics_common.py
@@ -31,7 +31,7 @@ class PhysicButtonsPanel:
@classmethod
def poll(cls, context):
rd = context.scene.render
- return (context.object) and (not rd.use_game_engine)
+ return (context.object) and rd.engine in cls.COMPAT_ENGINES
def physics_add(self, layout, md, name, type, typeicon, toggles):
@@ -57,6 +57,7 @@ def physics_add_special(self, layout, data, name, addop, removeop, typeicon):
class PHYSICS_PT_add(PhysicButtonsPanel, Panel):
bl_label = ""
bl_options = {'HIDE_HEADER'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
obj = context.object
diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
index bba13a90aa2..b3640463224 100644
--- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
+++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
@@ -55,11 +55,12 @@ class PhysicButtonsPanel:
def poll(cls, context):
ob = context.object
rd = context.scene.render
- return (ob and ob.type == 'MESH') and (not rd.use_game_engine) and context.dynamic_paint
+ return (ob and ob.type == 'MESH') and rd.engine in cls.COMPAT_ENGINES and context.dynamic_paint
class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel):
bl_label = "Dynamic Paint"
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
layout = self.layout
@@ -134,12 +135,13 @@ class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel):
class PHYSICS_PT_dp_advanced_canvas(PhysicButtonsPanel, Panel):
bl_label = "Dynamic Paint Advanced"
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@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 (not rd.use_game_engine)
+ return md and md.ui_type == 'CANVAS' and md.canvas_settings and md.canvas_settings.canvas_surfaces.active and rd.engine in cls.COMPAT_ENGINES
def draw(self, context):
layout = self.layout
@@ -210,6 +212,7 @@ class PHYSICS_PT_dp_advanced_canvas(PhysicButtonsPanel, Panel):
class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel):
bl_label = "Dynamic Paint Output"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
@@ -220,7 +223,7 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel):
surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active
return (surface and
(not (surface.surface_format == 'VERTEX' and (surface.surface_type in {'DISPLACE', 'WAVE'}))) and
- (not rd.use_game_engine))
+ (rd.engine in cls.COMPAT_ENGINES))
def draw(self, context):
layout = self.layout
@@ -303,6 +306,7 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel):
class PHYSICS_PT_dp_canvas_initial_color(PhysicButtonsPanel, Panel):
bl_label = "Dynamic Paint Initial Color"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
@@ -311,7 +315,7 @@ class PHYSICS_PT_dp_canvas_initial_color(PhysicButtonsPanel, Panel):
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') and (not rd.use_game_engine)
+ return (surface and surface.surface_type == 'PAINT') and (rd.engine in cls.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
@@ -339,6 +343,7 @@ class PHYSICS_PT_dp_canvas_initial_color(PhysicButtonsPanel, Panel):
class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel):
bl_label = "Dynamic Paint Effects"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
@@ -347,7 +352,7 @@ class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel):
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') and (not rd.use_game_engine)
+ return (surface and surface.surface_type == 'PAINT') and (rd.engine in cls.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
@@ -387,12 +392,13 @@ class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel):
class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel):
bl_label = "Dynamic Paint Source"
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
md = context.dynamic_paint
rd = context.scene.render
- return md and md.ui_type == 'BRUSH' and md.brush_settings and (not rd.use_game_engine)
+ return md and md.ui_type == 'BRUSH' and md.brush_settings and (rd.engine in cls.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
@@ -430,12 +436,13 @@ class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel):
class PHYSICS_PT_dp_brush_velocity(PhysicButtonsPanel, Panel):
bl_label = "Dynamic Paint Velocity"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
md = context.dynamic_paint
rd = context.scene.render
- return md and md.ui_type == 'BRUSH' and md.brush_settings and (not rd.use_game_engine)
+ return md and md.ui_type == 'BRUSH' and md.brush_settings and (rd.engine in cls.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
@@ -466,12 +473,13 @@ class PHYSICS_PT_dp_brush_velocity(PhysicButtonsPanel, Panel):
class PHYSICS_PT_dp_brush_wave(PhysicButtonsPanel, Panel):
bl_label = "Dynamic Paint Waves"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
md = context.dynamic_paint
rd = context.scene.render
- return md and md.ui_type == 'BRUSH' and md.brush_settings and (not rd.use_game_engine)
+ return md and md.ui_type == 'BRUSH' and md.brush_settings and (rd.engine in cls.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
diff --git a/release/scripts/startup/bl_ui/properties_physics_field.py b/release/scripts/startup/bl_ui/properties_physics_field.py
index 348f66da145..1cebc0496b0 100644
--- a/release/scripts/startup/bl_ui/properties_physics_field.py
+++ b/release/scripts/startup/bl_ui/properties_physics_field.py
@@ -34,17 +34,18 @@ class PhysicButtonsPanel:
@classmethod
def poll(cls, context):
rd = context.scene.render
- return (context.object) and (not rd.use_game_engine)
+ return (context.object) and (rd.engine in cls.COMPAT_ENGINES)
class PHYSICS_PT_field(PhysicButtonsPanel, Panel):
bl_label = "Force Fields"
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
ob = context.object
rd = context.scene.render
- return (not rd.use_game_engine) and (ob.field) and (ob.field.type != 'NONE')
+ return (rd.engine in cls.COMPAT_ENGINES) and (ob.field) and (ob.field.type != 'NONE')
def draw(self, context):
layout = self.layout
@@ -176,12 +177,13 @@ class PHYSICS_PT_field(PhysicButtonsPanel, Panel):
class PHYSICS_PT_collision(PhysicButtonsPanel, Panel):
bl_label = "Collision"
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
ob = context.object
rd = context.scene.render
- return (ob and ob.type == 'MESH') and (not rd.use_game_engine) and (context.collision)
+ return (ob and ob.type == 'MESH') and (rd.engine in cls.COMPAT_ENGINES) and (context.collision)
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 d6fd8f3792c..5d7034c2e68 100644
--- a/release/scripts/startup/bl_ui/properties_physics_fluid.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py
@@ -38,11 +38,12 @@ class PhysicButtonsPanel:
def poll(cls, context):
ob = context.object
rd = context.scene.render
- return (ob and ob.type == 'MESH') and (not rd.use_game_engine) and (context.fluid)
+ return (ob and ob.type == 'MESH') and rd.engine in cls.COMPAT_ENGINES and (context.fluid)
class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
bl_label = "Fluid"
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
layout = self.layout
@@ -205,12 +206,13 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel):
bl_label = "Fluid World"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
md = context.fluid
rd = context.scene.render
- return md and md.settings and (md.settings.type == 'DOMAIN') and (not rd.use_game_engine)
+ return md and md.settings and (md.settings.type == 'DOMAIN') and rd.engine in cls.COMPAT_ENGINES
def draw(self, context):
layout = self.layout
@@ -258,12 +260,13 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel):
class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, Panel):
bl_label = "Fluid Boundary"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
md = context.fluid
rd = context.scene.render
- return md and md.settings and (md.settings.type == 'DOMAIN') and (not rd.use_game_engine)
+ return md and md.settings and (md.settings.type == 'DOMAIN') and rd.engine in cls.COMPAT_ENGINES
def draw(self, context):
layout = self.layout
@@ -288,12 +291,13 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, Panel):
class PHYSICS_PT_domain_particles(PhysicButtonsPanel, Panel):
bl_label = "Fluid Particles"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
md = context.fluid
rd = context.scene.render
- return md and md.settings and (md.settings.type == 'DOMAIN') and (not rd.use_game_engine)
+ return md and md.settings and (md.settings.type == 'DOMAIN') and rd.engine in cls.COMPAT_ENGINES
def draw(self, context):
layout = self.layout
diff --git a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
index e7225d73e41..eeb21c046bf 100644
--- a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
+++ b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
@@ -29,12 +29,13 @@ class PHYSICS_PT_rigidbody_panel:
class PHYSICS_PT_rigid_body(PHYSICS_PT_rigidbody_panel, Panel):
bl_label = "Rigid Body"
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
obj = context.object
return (obj and obj.rigid_body and
- (not context.scene.render.use_game_engine))
+ (context.scene.render.engine in cls.COMPAT_ENGINES))
def draw(self, context):
layout = self.layout
@@ -55,12 +56,13 @@ class PHYSICS_PT_rigid_body(PHYSICS_PT_rigidbody_panel, Panel):
class PHYSICS_PT_rigid_body_collisions(PHYSICS_PT_rigidbody_panel, Panel):
bl_label = "Rigid Body Collisions"
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
obj = context.object
return (obj and obj.rigid_body and
- (not context.scene.render.use_game_engine))
+ (context.scene.render.engine in cls.COMPAT_ENGINES))
def draw(self, context):
layout = self.layout
@@ -99,13 +101,14 @@ class PHYSICS_PT_rigid_body_collisions(PHYSICS_PT_rigidbody_panel, Panel):
class PHYSICS_PT_rigid_body_dynamics(PHYSICS_PT_rigidbody_panel, Panel):
bl_label = "Rigid Body Dynamics"
bl_default_closed = True
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
obj = context.object
return (obj and obj.rigid_body and
obj.rigid_body.type == 'ACTIVE' and
- (not context.scene.render.use_game_engine))
+ (context.scene.render.engine in cls.COMPAT_ENGINES))
def draw(self, context):
layout = self.layout
diff --git a/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py b/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py
index 3f5e0f1fc9b..38c97746f4a 100644
--- a/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py
+++ b/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py
@@ -29,12 +29,13 @@ class PHYSICS_PT_rigidbody_constraint_panel:
class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Panel):
bl_label = "Rigid Body Constraint"
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
ob = context.object
rd = context.scene.render
- return (ob and ob.rigid_body_constraint and (not rd.use_game_engine))
+ return (ob and ob.rigid_body_constraint and rd.engine in cls.COMPAT_ENGINES)
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 5c98cb45bac..8e6fc45af73 100644
--- a/release/scripts/startup/bl_ui/properties_physics_smoke.py
+++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py
@@ -34,11 +34,12 @@ class PhysicButtonsPanel:
def poll(cls, context):
ob = context.object
rd = context.scene.render
- return (ob and ob.type == 'MESH') and (not rd.use_game_engine) and (context.smoke)
+ return (ob and ob.type == 'MESH') and (rd.engine in cls.COMPAT_ENGINES) and (context.smoke)
class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
bl_label = "Smoke"
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
layout = self.layout
@@ -121,6 +122,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
class PHYSICS_PT_smoke_flow_advanced(PhysicButtonsPanel, Panel):
bl_label = "Smoke Flow Advanced"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
@@ -155,6 +157,7 @@ class PHYSICS_PT_smoke_flow_advanced(PhysicButtonsPanel, Panel):
class PHYSICS_PT_smoke_fire(PhysicButtonsPanel, Panel):
bl_label = "Smoke Flames"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
@@ -183,6 +186,7 @@ class PHYSICS_PT_smoke_fire(PhysicButtonsPanel, Panel):
class PHYSICS_PT_smoke_adaptive_domain(PhysicButtonsPanel, Panel):
bl_label = "Smoke Adaptive Domain"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
@@ -215,12 +219,13 @@ class PHYSICS_PT_smoke_adaptive_domain(PhysicButtonsPanel, Panel):
class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, Panel):
bl_label = "Smoke High Resolution"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
md = context.smoke
rd = context.scene.render
- return md and (md.smoke_type == 'DOMAIN') and (not rd.use_game_engine)
+ return md and (md.smoke_type == 'DOMAIN') and (rd.engine in cls.COMPAT_ENGINES)
def draw_header(self, context):
md = context.smoke.domain_settings
@@ -253,12 +258,13 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, Panel):
class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, Panel):
bl_label = "Smoke Groups"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
md = context.smoke
rd = context.scene.render
- return md and (md.smoke_type == 'DOMAIN') and (not rd.use_game_engine)
+ return md and (md.smoke_type == 'DOMAIN') and (rd.engine in cls.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
@@ -281,12 +287,13 @@ class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, Panel):
class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel):
bl_label = "Smoke Cache"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
md = context.smoke
rd = context.scene.render
- return md and (md.smoke_type == 'DOMAIN') and (not rd.use_game_engine)
+ return md and (md.smoke_type == 'DOMAIN') and (rd.engine in cls.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
@@ -311,12 +318,13 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel):
class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, Panel):
bl_label = "Smoke Field Weights"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
md = context.smoke
rd = context.scene.render
- return md and (md.smoke_type == 'DOMAIN') and (not rd.use_game_engine)
+ return md and (md.smoke_type == 'DOMAIN') and (rd.engine in cls.COMPAT_ENGINES)
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 32f220ce7c1..e873bb40013 100644
--- a/release/scripts/startup/bl_ui/properties_physics_softbody.py
+++ b/release/scripts/startup/bl_ui/properties_physics_softbody.py
@@ -25,6 +25,11 @@ from bl_ui.properties_physics_common import (
)
+def softbody_panel_enabled(md):
+ return True
+ #return (md.point_cache.is_baked is False)
+
+
class PhysicButtonsPanel:
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
@@ -34,11 +39,12 @@ class PhysicButtonsPanel:
def poll(cls, context):
ob = context.object
rd = context.scene.render
- return (ob and (ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE')) and (not rd.use_game_engine) and (context.soft_body)
+ return (ob and (ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE')) and (rd.engine in cls.COMPAT_ENGINES) and (context.soft_body)
class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel):
bl_label = "Soft Body"
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
layout = self.layout
@@ -50,6 +56,7 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel):
# General
split = layout.split()
+ split.enabled = softbody_panel_enabled(md)
col = split.column()
col.label(text="Object:")
@@ -61,14 +68,18 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel):
col.label(text="Simulation:")
col.prop(softbody, "speed")
+ layout.prop(softbody, "collision_group")
+
class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, Panel):
bl_label = "Soft Body Goal"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw_header(self, context):
softbody = context.soft_body.settings
+ self.layout.active = softbody_panel_enabled(context.soft_body)
self.layout.prop(softbody, "use_goal", text="")
def draw(self, context):
@@ -78,7 +89,7 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, Panel):
softbody = md.settings
ob = context.object
- layout.active = softbody.use_goal
+ layout.active = softbody.use_goal and softbody_panel_enabled(md)
split = layout.split()
@@ -103,10 +114,12 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, Panel):
class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, Panel):
bl_label = "Soft Body Edges"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw_header(self, context):
softbody = context.soft_body.settings
+ self.layout.active = softbody_panel_enabled(context.soft_body)
self.layout.prop(softbody, "use_edges", text="")
def draw(self, context):
@@ -116,7 +129,7 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, Panel):
softbody = md.settings
ob = context.object
- layout.active = softbody.use_edges
+ layout.active = softbody.use_edges and softbody_panel_enabled(md)
split = layout.split()
@@ -151,10 +164,12 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, Panel):
class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel):
bl_label = "Soft Body Self Collision"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw_header(self, context):
softbody = context.soft_body.settings
+ self.layout.active = softbody_panel_enabled(context.soft_body)
self.layout.prop(softbody, "use_self_collision", text="")
def draw(self, context):
@@ -163,7 +178,7 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel):
md = context.soft_body
softbody = md.settings
- layout.active = softbody.use_self_collision
+ layout.active = softbody.use_self_collision and softbody_panel_enabled(md)
layout.label(text="Collision Ball Size Calculation:")
layout.prop(softbody, "collision_type", expand=True)
@@ -178,6 +193,7 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel):
class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, Panel):
bl_label = "Soft Body Solver"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
layout = self.layout
@@ -185,6 +201,8 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, Panel):
md = context.soft_body
softbody = md.settings
+ layout.active = softbody_panel_enabled(md)
+
# Solver
split = layout.split()
@@ -208,6 +226,7 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, Panel):
class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel, Panel):
bl_label = "Soft Body Field Weights"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
md = context.soft_body
diff --git a/release/scripts/startup/bl_ui/properties_world.py b/release/scripts/startup/bl_ui/properties_world.py
index 2c8a6fac967..e07349a99ee 100644
--- a/release/scripts/startup/bl_ui/properties_world.py
+++ b/release/scripts/startup/bl_ui/properties_world.py
@@ -41,7 +41,7 @@ class WORLD_PT_context_world(WorldButtonsPanel, Panel):
@classmethod
def poll(cls, context):
rd = context.scene.render
- return (not rd.use_game_engine) and (rd.engine in cls.COMPAT_ENGINES)
+ return rd.engine in cls.COMPAT_ENGINES
def draw(self, context):
layout = self.layout
@@ -69,7 +69,7 @@ class WORLD_PT_preview(WorldButtonsPanel, Panel):
@classmethod
def poll(cls, context):
rd = context.scene.render
- return (context.world) and (not rd.use_game_engine) and (rd.engine in cls.COMPAT_ENGINES)
+ return (context.world) and (rd.engine in cls.COMPAT_ENGINES)
def draw(self, context):
self.layout.template_preview(context.world)
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index 58bb956f653..799f1e20dc6 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -25,8 +25,10 @@ from bl_ui.properties_grease_pencil_common import (
GreasePencilDrawingToolsPanel,
GreasePencilStrokeEditPanel,
GreasePencilStrokeSculptPanel,
- GreasePencilDataPanel
- )
+ GreasePencilBrushPanel,
+ GreasePencilBrushCurvesPanel,
+ GreasePencilDataPanel,
+ GreasePencilPaletteColorPanel)
class CLIP_UL_tracking_objects(UIList):
@@ -1126,6 +1128,16 @@ class CLIP_PT_grease_pencil(GreasePencilDataPanel, CLIP_PT_clip_view_panel, Pane
# But, this should only be visible in "clip" view
+# Grease Pencil palette colors
+class CLIP_PT_grease_pencil_palettecolor(GreasePencilPaletteColorPanel, 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'
@@ -1141,6 +1153,15 @@ class CLIP_PT_tools_grease_pencil_sculpt(GreasePencilStrokeSculptPanel, Panel):
bl_space_type = 'CLIP_EDITOR'
+# Grease Pencil drawing brushes
+class CLIP_PT_tools_grease_pencil_brush(GreasePencilBrushPanel, Panel):
+ bl_space_type = 'CLIP_EDITOR'
+
+
+# Grease Pencil drawing curves
+class CLIP_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Panel):
+ bl_space_type = 'CLIP_EDITOR'
+
class CLIP_MT_view(Menu):
bl_label = "View"
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index 6878d4dbb12..be9752a463e 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -101,6 +101,7 @@ def dopesheet_filter(layout, context, genericFiltersOnly=False):
layout.prop(dopesheet, "use_datablock_sort", text="")
+
#######################################
# DopeSheet Editor - General/Standard UI
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index c191a4b5bdc..bf6df05c2b2 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -29,7 +29,10 @@ from bl_ui.properties_grease_pencil_common import (
GreasePencilDrawingToolsPanel,
GreasePencilStrokeEditPanel,
GreasePencilStrokeSculptPanel,
+ GreasePencilBrushPanel,
+ GreasePencilBrushCurvesPanel,
GreasePencilDataPanel,
+ GreasePencilPaletteColorPanel
)
from bpy.app.translations import pgettext_iface as iface_
@@ -729,7 +732,6 @@ class IMAGE_PT_paint(Panel, ImagePaintPanel):
@classmethod
def poll(cls, context):
sima = context.space_data
- toolsettings = context.tool_settings.image_paint
return sima.show_paint
@@ -987,7 +989,7 @@ class IMAGE_PT_tools_paint_options(BrushButtonsPanel, Panel):
layout = self.layout
toolsettings = context.tool_settings
- brush = toolsettings.image_paint.brush
+ # brush = toolsettings.image_paint.brush
ups = toolsettings.unified_paint_settings
@@ -1188,6 +1190,14 @@ class IMAGE_PT_grease_pencil(GreasePencilDataPanel, Panel):
# NOTE: this is just a wrapper around the generic GP Panel
+# Grease Pencil palette colors
+class IMAGE_PT_grease_pencil_palettecolor(GreasePencilPaletteColorPanel, 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'
@@ -1203,5 +1213,15 @@ class IMAGE_PT_tools_grease_pencil_sculpt(GreasePencilStrokeSculptPanel, Panel):
bl_space_type = 'IMAGE_EDITOR'
+# Grease Pencil drawing brushes
+class IMAGE_PT_tools_grease_pencil_brush(GreasePencilBrushPanel, Panel):
+ bl_space_type = 'IMAGE_EDITOR'
+
+
+# Grease Pencil drawing curves
+class IMAGE_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Panel):
+ bl_space_type = 'IMAGE_EDITOR'
+
+
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py
index 97ef37fa5e0..780dc4cf982 100644
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@ -158,6 +158,8 @@ class INFO_MT_file_import(Menu):
def draw(self, context):
if bpy.app.build_options.collada:
self.layout.operator("wm.collada_import", text="Collada (Default) (.dae)")
+ if bpy.app.build_options.alembic:
+ self.layout.operator("wm.alembic_import", text="Alembic (.abc)")
class INFO_MT_file_export(Menu):
@@ -167,6 +169,8 @@ class INFO_MT_file_export(Menu):
def draw(self, context):
if bpy.app.build_options.collada:
self.layout.operator("wm.collada_export", text="Collada (Default) (.dae)")
+ if bpy.app.build_options.alembic:
+ self.layout.operator("wm.alembic_export", text="Alembic (.abc)")
class INFO_MT_file_external_data(Menu):
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index ee342265f3d..8821fa0ca58 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -25,8 +25,11 @@ from bl_ui.properties_grease_pencil_common import (
GreasePencilDrawingToolsPanel,
GreasePencilStrokeEditPanel,
GreasePencilStrokeSculptPanel,
+ GreasePencilBrushPanel,
+ GreasePencilBrushCurvesPanel,
GreasePencilDataPanel,
- GreasePencilToolsPanel,
+ GreasePencilPaletteColorPanel,
+ GreasePencilToolsPanel
)
@@ -464,6 +467,19 @@ class NODE_PT_grease_pencil(GreasePencilDataPanel, Panel):
return snode is not None and snode.node_tree is not None
+# Grease Pencil palette colors
+class NODE_PT_grease_pencil_palettecolor(GreasePencilPaletteColorPanel, 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'
@@ -494,6 +510,16 @@ class NODE_PT_tools_grease_pencil_sculpt(GreasePencilStrokeSculptPanel, Panel):
bl_space_type = 'NODE_EDITOR'
bl_region_type = 'TOOLS'
+# Grease Pencil drawing brushes
+class NODE_PT_tools_grease_pencil_brush(GreasePencilBrushPanel, Panel):
+ bl_space_type = 'NODE_EDITOR'
+ bl_region_type = 'TOOLS'
+
+# Grease Pencil drawing curves
+class NODE_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Panel):
+ bl_space_type = 'NODE_EDITOR'
+ bl_region_type = 'TOOLS'
+
# -----------------------------
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 4d1b9104344..26136a8e024 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -20,7 +20,11 @@
import bpy
from bpy.types import Header, Menu, Panel
from rna_prop_ui import PropertyPanel
-from bl_ui.properties_grease_pencil_common import GreasePencilDataPanel, GreasePencilToolsPanel
+from bl_ui.properties_grease_pencil_common import (
+ GreasePencilDataPanel,
+ GreasePencilPaletteColorPanel,
+ GreasePencilToolsPanel,
+ )
from bpy.app.translations import pgettext_iface as iface_
@@ -1186,6 +1190,14 @@ class SEQUENCER_PT_grease_pencil(GreasePencilDataPanel, SequencerButtonsPanel_Ou
# But, it should only show up when there are images in the preview region
+class SEQUENCER_PT_grease_pencil_palettecolor(GreasePencilPaletteColorPanel, 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'
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 9bae931880b..da1e9c47737 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -19,7 +19,10 @@
# <pep8 compliant>
import bpy
from bpy.types import Header, Menu, Panel
-from bl_ui.properties_grease_pencil_common import GreasePencilDataPanel
+from bl_ui.properties_grease_pencil_common import (
+ GreasePencilDataPanel,
+ GreasePencilPaletteColorPanel,
+ )
from bl_ui.properties_paint_common import UnifiedPaintPanel
from bpy.app.translations import contexts as i18n_contexts
@@ -37,7 +40,6 @@ class VIEW3D_HT_header(Header):
row = layout.row(align=True)
row.template_header()
- sub = row.row(align=True)
VIEW3D_MT_editor_menus.draw_collapsible(context, layout)
@@ -134,11 +136,12 @@ class VIEW3D_HT_header(Header):
row.operator("gpencil.copy", text="", icon='COPYDOWN')
row.operator("gpencil.paste", text="", icon='PASTEDOWN')
- layout.prop(context.gpencil_data, "use_onion_skinning", text="Onion Skins", icon='PARTICLE_PATH') # XXX: icon
-
- layout.prop(context.tool_settings.gpencil_sculpt, "use_select_mask")
-
+ # XXX: icon
+ layout.prop(context.gpencil_data, "use_onion_skinning", text="Onion Skins", icon='PARTICLE_PATH')
+ row = layout.row(align=True)
+ row.prop(context.tool_settings.gpencil_sculpt, "use_select_mask")
+ row.prop(context.tool_settings.gpencil_sculpt, "selection_alpha", slider=True)
class VIEW3D_MT_editor_menus(Menu):
@@ -1473,14 +1476,14 @@ class VIEW3D_MT_object_apply(Menu):
props.location, props.rotation, props.scale = False, True, True
layout.separator()
-
+
layout.operator("object.transforms_to_deltas", text="Location to Deltas", text_ctxt=i18n_contexts.default).mode = 'LOC'
layout.operator("object.transforms_to_deltas", text="Rotation to Deltas", text_ctxt=i18n_contexts.default).mode = 'ROT'
layout.operator("object.transforms_to_deltas", text="Scale to Deltas", text_ctxt=i18n_contexts.default).mode = 'SCALE'
-
+
layout.operator("object.transforms_to_deltas", text="All Transforms to Deltas", text_ctxt=i18n_contexts.default).mode = 'ALL'
layout.operator("object.anim_transforms_to_deltas")
-
+
layout.separator()
layout.operator("object.visual_transform_apply", text="Visual Transform", text_ctxt=i18n_contexts.default)
@@ -2970,6 +2973,13 @@ class VIEW3D_PT_grease_pencil(GreasePencilDataPanel, Panel):
# NOTE: this is just a wrapper around the generic GP Panel
+class VIEW3D_PT_grease_pencil_palettecolor(GreasePencilPaletteColorPanel, 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'
bl_region_type = 'UI'
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index ba44983b649..71f81483aac 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -22,7 +22,9 @@ from bpy.types import Menu, Panel, UIList
from bl_ui.properties_grease_pencil_common import (
GreasePencilDrawingToolsPanel,
GreasePencilStrokeEditPanel,
- GreasePencilStrokeSculptPanel
+ GreasePencilStrokeSculptPanel,
+ GreasePencilBrushPanel,
+ GreasePencilBrushCurvesPanel
)
from bl_ui.properties_paint_common import (
UnifiedPaintPanel,
@@ -605,6 +607,7 @@ class VIEW3D_PT_tools_curveedit_options_stroke(View3DPanel, Panel):
colsub = layout.column(align=True)
colsub.prop(cps, "surface_plane", expand=True)
+
# ********** default tools for editmode_surface ****************
class VIEW3D_PT_tools_transform_surface(View3DPanel, Panel):
@@ -1867,6 +1870,15 @@ class VIEW3D_PT_tools_grease_pencil_sculpt(GreasePencilStrokeSculptPanel, Panel)
bl_space_type = 'VIEW_3D'
+# Grease Pencil drawing brushes
+class VIEW3D_PT_tools_grease_pencil_brush(GreasePencilBrushPanel, Panel):
+ bl_space_type = 'VIEW_3D'
+
+# Grease Pencil drawingcurves
+class VIEW3D_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Panel):
+ bl_space_type = 'VIEW_3D'
+
+
# Note: moved here so that it's always in last position in 'Tools' panels!
class VIEW3D_PT_tools_history(View3DPanel, Panel):
bl_category = "Tools"
diff --git a/release/scripts/startup/keyingsets_builtins.py b/release/scripts/startup/keyingsets_builtins.py
index 3e245b07dbd..0b4fbd52b5d 100644
--- a/release/scripts/startup/keyingsets_builtins.py
+++ b/release/scripts/startup/keyingsets_builtins.py
@@ -175,6 +175,7 @@ class BUILTIN_KSI_RotScale(KeyingSetInfo):
# ------------
+
# Bendy Bones
class BUILTIN_KSI_BendyBones(KeyingSetInfo):
"""Insert a keyframe for each of the BBone shape properties"""
diff --git a/release/scripts/startup/nodeitems_builtins.py b/release/scripts/startup/nodeitems_builtins.py
index 092cd31330c..83e396b0997 100644
--- a/release/scripts/startup/nodeitems_builtins.py
+++ b/release/scripts/startup/nodeitems_builtins.py
@@ -32,6 +32,7 @@ class SortedNodeCategory(NodeCategory):
super().__init__(identifier, name, description, items)
+
class CompositorNodeCategory(SortedNodeCategory):
@classmethod
def poll(cls, context):