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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release')
-rw-r--r--release/datafiles/blender_icons.svg88
-rw-r--r--release/datafiles/blender_icons16/icon16_normalize_fcurves.datbin0 -> 1048 bytes
-rw-r--r--release/datafiles/blender_icons32/icon32_normalize_fcurves.datbin0 -> 4120 bytes
-rw-r--r--release/scripts/freestyle/modules/freestyle/shaders.py4
-rw-r--r--release/scripts/freestyle/modules/parameter_editor.py12
-rw-r--r--release/scripts/modules/addon_utils.py16
-rw-r--r--release/scripts/modules/bl_app_override/__init__.py202
-rw-r--r--release/scripts/modules/bl_app_override/helpers.py167
-rw-r--r--release/scripts/modules/bl_app_template_utils.py198
-rw-r--r--release/scripts/modules/bpy/__init__.py10
-rw-r--r--release/scripts/modules/bpy/path.py4
-rw-r--r--release/scripts/modules/bpy/utils/__init__.py82
-rw-r--r--release/scripts/modules/bpy_types.py56
-rw-r--r--release/scripts/modules/rna_keymap_ui.py7
-rw-r--r--release/scripts/presets/interface_theme/back_to_black.xml119
-rw-r--r--release/scripts/presets/keyconfig/3dsmax.py12
-rw-r--r--release/scripts/presets/keyconfig/maya.py6
-rw-r--r--release/scripts/startup/bl_operators/__init__.py14
-rw-r--r--release/scripts/startup/bl_operators/add_mesh_torus.py5
-rw-r--r--release/scripts/startup/bl_operators/anim.py42
-rw-r--r--release/scripts/startup/bl_operators/clip.py19
-rw-r--r--release/scripts/startup/bl_operators/console.py9
-rw-r--r--release/scripts/startup/bl_operators/file.py5
-rw-r--r--release/scripts/startup/bl_operators/freestyle.py18
-rw-r--r--release/scripts/startup/bl_operators/image.py8
-rw-r--r--release/scripts/startup/bl_operators/mask.py5
-rw-r--r--release/scripts/startup/bl_operators/mesh.py12
-rw-r--r--release/scripts/startup/bl_operators/node.py29
-rw-r--r--release/scripts/startup/bl_operators/object.py31
-rw-r--r--release/scripts/startup/bl_operators/object_align.py36
-rw-r--r--release/scripts/startup/bl_operators/object_quick_effects.py24
-rw-r--r--release/scripts/startup/bl_operators/object_randomize_transform.py5
-rw-r--r--release/scripts/startup/bl_operators/presets.py25
-rw-r--r--release/scripts/startup/bl_operators/rigidbody.py13
-rw-r--r--release/scripts/startup/bl_operators/screen_play_rendered_anim.py5
-rw-r--r--release/scripts/startup/bl_operators/sequencer.py7
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_follow_active.py5
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_lightmap.py5
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_smart_project.py11
-rw-r--r--release/scripts/startup/bl_operators/vertexpaint_dirt.py5
-rw-r--r--release/scripts/startup/bl_operators/view3d.py8
-rw-r--r--release/scripts/startup/bl_operators/wm.py288
-rw-r--r--release/scripts/startup/bl_ui/__init__.py15
-rw-r--r--release/scripts/startup/bl_ui/properties_animviz.py9
-rw-r--r--release/scripts/startup/bl_ui/properties_constraint.py9
-rw-r--r--release/scripts/startup/bl_ui/properties_data_armature.py18
-rw-r--r--release/scripts/startup/bl_ui/properties_data_bone.py17
-rw-r--r--release/scripts/startup/bl_ui/properties_data_camera.py17
-rw-r--r--release/scripts/startup/bl_ui/properties_data_curve.py18
-rw-r--r--release/scripts/startup/bl_ui/properties_data_empty.py9
-rw-r--r--release/scripts/startup/bl_ui/properties_data_lamp.py18
-rw-r--r--release/scripts/startup/bl_ui/properties_data_lattice.py11
-rw-r--r--release/scripts/startup/bl_ui/properties_data_mesh.py21
-rw-r--r--release/scripts/startup/bl_ui/properties_data_metaball.py13
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py37
-rw-r--r--release/scripts/startup/bl_ui/properties_data_speaker.py13
-rw-r--r--release/scripts/startup/bl_ui/properties_freestyle.py14
-rw-r--r--release/scripts/startup/bl_ui/properties_game.py27
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py21
-rw-r--r--release/scripts/startup/bl_ui/properties_mask_common.py14
-rw-r--r--release/scripts/startup/bl_ui/properties_material.py36
-rw-r--r--release/scripts/startup/bl_ui/properties_object.py74
-rw-r--r--release/scripts/startup/bl_ui/properties_paint_common.py10
-rw-r--r--release/scripts/startup/bl_ui/properties_particle.py67
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_cloth.py14
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_common.py11
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py26
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_field.py10
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_fluid.py13
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_rigidbody.py11
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py8
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_smoke.py32
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_softbody.py15
-rw-r--r--release/scripts/startup/bl_ui/properties_render.py21
-rw-r--r--release/scripts/startup/bl_ui/properties_render_layer.py13
-rw-r--r--release/scripts/startup/bl_ui/properties_scene.py22
-rw-r--r--release/scripts/startup/bl_ui/properties_texture.py73
-rw-r--r--release/scripts/startup/bl_ui/properties_world.py17
-rw-r--r--release/scripts/startup/bl_ui/space_clip.py66
-rw-r--r--release/scripts/startup/bl_ui/space_console.py12
-rw-r--r--release/scripts/startup/bl_ui/space_dopesheet.py18
-rw-r--r--release/scripts/startup/bl_ui/space_filebrowser.py15
-rw-r--r--release/scripts/startup/bl_ui/space_graph.py24
-rw-r--r--release/scripts/startup/bl_ui/space_image.py56
-rw-r--r--release/scripts/startup/bl_ui/space_info.py32
-rw-r--r--release/scripts/startup/bl_ui/space_logic.py13
-rw-r--r--release/scripts/startup/bl_ui/space_nla.py16
-rw-r--r--release/scripts/startup/bl_ui/space_node.py29
-rw-r--r--release/scripts/startup/bl_ui/space_outliner.py13
-rw-r--r--release/scripts/startup/bl_ui/space_properties.py18
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py76
-rw-r--r--release/scripts/startup/bl_ui/space_text.py40
-rw-r--r--release/scripts/startup/bl_ui/space_time.py21
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py121
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py178
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py66
-rw-r--r--release/scripts/startup/keyingsets_builtins.py32
-rw-r--r--release/scripts/startup/nodeitems_builtins.py6
98 files changed, 2821 insertions, 422 deletions
diff --git a/release/datafiles/blender_icons.svg b/release/datafiles/blender_icons.svg
index e9c114ba1bd..d88788fa904 100644
--- a/release/datafiles/blender_icons.svg
+++ b/release/datafiles/blender_icons.svg
@@ -14,7 +14,7 @@
height="640"
id="svg2"
sodipodi:version="0.32"
- inkscape:version="0.91 r"
+ inkscape:version="0.91 r13725"
version="1.0"
sodipodi:docname="blender_icons.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
@@ -31338,6 +31338,26 @@
d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
style="display:inline;fill:url(#linearGradient13110);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none" />
</clipPath>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient1610-6"
+ id="linearGradient18199"
+ gradientUnits="userSpaceOnUse"
+ x1="189.76083"
+ y1="248.13905"
+ x2="116.05637"
+ y2="183.6826" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient22562"
+ id="radialGradient23167-6"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.99220964,-0.12457927,0.11585516,0.92272644,-34.13325,22.766225)"
+ cx="-0.78262758"
+ cy="294.63174"
+ fx="-0.78262758"
+ fy="294.63174"
+ r="6.6750002" />
</defs>
<sodipodi:namedview
id="base"
@@ -31349,16 +31369,16 @@
objecttolerance="10000"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="14.413868"
- inkscape:cx="480.24726"
- inkscape:cy="269.95478"
+ inkscape:zoom="19.997864"
+ inkscape:cx="462.52244"
+ inkscape:cy="435.14241"
inkscape:document-units="px"
- inkscape:current-layer="layer1"
+ inkscape:current-layer="g23149-4"
showgrid="true"
- inkscape:window-width="1680"
- inkscape:window-height="1020"
- inkscape:window-x="0"
- inkscape:window-y="30"
+ inkscape:window-width="1920"
+ inkscape:window-height="1025"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
inkscape:snap-nodes="true"
inkscape:snap-bbox="true"
showguides="true"
@@ -92660,6 +92680,56 @@
style="opacity:0.51999996;fill:url(#radialGradient21448-8-143);fill-opacity:1;fill-rule:evenodd;stroke:none" />
</g>
</g>
+ <g
+ transform="translate(335.99871,21.048284)"
+ style="display:inline;enable-background:new"
+ id="ICON_ROTATE-7">
+ <rect
+ y="178"
+ x="110"
+ height="16"
+ width="16"
+ id="rect37989-8"
+ style="display:inline;overflow:visible;visibility:visible;opacity:0;fill:#b3b3b3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.79999995;marker:none;enable-background:accumulate" />
+ <path
+ style="display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:2.4000001;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:new"
+ d="m 114.5,192.5 -3,0 0,-3 m 13,0 0,3 -3,0 m -0.25,-13 3.25,0 0,3 m -13,0 0,-3 3,0"
+ id="path37498-7"
+ sodipodi:nodetypes="cccccccccccc"
+ inkscape:connector-curvature="0" />
+ <path
+ sodipodi:nodetypes="cccccccccccc"
+ id="rect38140-7"
+ d="m 114.5,192.5 -3,0 0,-3 m 13,0 0,3 -3,0 m -0.25,-13 3.25,0 0,3 m -13,0 0,-3 3,0"
+ style="display:inline;overflow:visible;visibility:visible;fill:none;stroke:url(#linearGradient18199);stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:new"
+ inkscape:connector-curvature="0" />
+ <g
+ transform="matrix(0.59971056,0,0,0.59971056,116.78278,9.7425599)"
+ style="display:inline;enable-background:new"
+ id="g23145-9">
+ <g
+ id="g23149-4">
+ <path
+ id="path39832-9"
+ style="display:inline;overflow:visible;visibility:visible;fill:none;stroke:#1a1a1a;stroke-width:4.66725159;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
+ d="m -4.3682386,287.81345 1.5,0 c 0.999089,0 2.07885534,1.30514 2.50490386,2.78207 1.06592652,3.69512 2.80867074,9.82446 5.88525404,9.96406 2.6782554,0 1.6181317,-5.11535 3.1736046,-5.26275 l 0.25,0"
+ sodipodi:nodetypes="cssccc"
+ inkscape:connector-curvature="0" />
+ <path
+ sodipodi:nodetypes="ccscc"
+ d="m 9.3647983,295.22328 -0.4793018,0 c -2.2335161,0 0.1796731,4.94901 -3.4398065,5.09984 -4.44796752,0.18536 -5.37272213,-12.59185 -8.0767581,-12.56237 l -2,0"
+ style="display:inline;overflow:visible;visibility:visible;fill:none;stroke:#a8df84;stroke-width:2.93474906;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
+ id="path39834-2"
+ inkscape:connector-curvature="0" />
+ </g>
+ <path
+ id="path39836-9"
+ style="display:inline;overflow:visible;visibility:visible;opacity:0.35;fill:none;stroke:url(#radialGradient23167-6);stroke-width:3.53503864;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
+ d="M 5.6770841,300.48165 C 0.7393262,300.21066 0.54777814,287.99792 -2.9522219,287.99792"
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0" />
+ </g>
+ </g>
</g>
<g
inkscape:groupmode="layer"
diff --git a/release/datafiles/blender_icons16/icon16_normalize_fcurves.dat b/release/datafiles/blender_icons16/icon16_normalize_fcurves.dat
new file mode 100644
index 00000000000..fe118a23d79
--- /dev/null
+++ b/release/datafiles/blender_icons16/icon16_normalize_fcurves.dat
Binary files differ
diff --git a/release/datafiles/blender_icons32/icon32_normalize_fcurves.dat b/release/datafiles/blender_icons32/icon32_normalize_fcurves.dat
new file mode 100644
index 00000000000..5b1f546a563
--- /dev/null
+++ b/release/datafiles/blender_icons32/icon32_normalize_fcurves.dat
Binary files differ
diff --git a/release/scripts/freestyle/modules/freestyle/shaders.py b/release/scripts/freestyle/modules/freestyle/shaders.py
index 633def38b5b..bce6642220b 100644
--- a/release/scripts/freestyle/modules/freestyle/shaders.py
+++ b/release/scripts/freestyle/modules/freestyle/shaders.py
@@ -568,7 +568,7 @@ class pyRandomColorShader(StrokeShader):
class py2DCurvatureColorShader(StrokeShader):
"""
- Assigns a color (greyscale) to the stroke based on the curvature.
+ Assigns a color (grayscale) to the stroke based on the curvature.
A higher curvature will yield a brighter color.
"""
def shade(self, stroke):
@@ -584,7 +584,7 @@ class py2DCurvatureColorShader(StrokeShader):
class pyTimeColorShader(StrokeShader):
"""
- Assigns a greyscale value that increases for every vertex.
+ Assigns a grayscale value that increases for every vertex.
The brightness will increase along the stroke.
"""
def __init__(self, step=0.01):
diff --git a/release/scripts/freestyle/modules/parameter_editor.py b/release/scripts/freestyle/modules/parameter_editor.py
index 93305cb7c5a..b093920a4cb 100644
--- a/release/scripts/freestyle/modules/parameter_editor.py
+++ b/release/scripts/freestyle/modules/parameter_editor.py
@@ -1170,6 +1170,7 @@ class Seed:
_seed = Seed()
+
def get_dashed_pattern(linestyle):
"""Extracts the dashed pattern from the various UI options """
pattern = []
@@ -1185,6 +1186,15 @@ def get_dashed_pattern(linestyle):
return pattern
+def get_grouped_objects(group):
+ for ob in group.objects:
+ if ob.dupli_type == 'GROUP' and ob.dupli_group is not None:
+ for dupli in get_grouped_objects(ob.dupli_group):
+ yield dupli
+ else:
+ yield ob
+
+
integration_types = {
'MEAN': IntegrationType.MEAN,
'MIN': IntegrationType.MIN,
@@ -1267,7 +1277,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 = {getQualifiedObjectName(ob): True for ob in lineset.group.objects}
+ names = {getQualifiedObjectName(ob): True for ob in get_grouped_objects(lineset.group)}
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 0f096f5812c..51e3e65b78c 100644
--- a/release/scripts/modules/addon_utils.py
+++ b/release/scripts/modules/addon_utils.py
@@ -24,6 +24,7 @@ __all__ = (
"check",
"enable",
"disable",
+ "disable_all",
"reset_all",
"module_bl_info",
)
@@ -31,8 +32,9 @@ __all__ = (
import bpy as _bpy
_user_preferences = _bpy.context.user_preferences
-error_duplicates = False
error_encoding = False
+# (name, file, path)
+error_duplicates = []
addons_fake_modules = {}
@@ -57,12 +59,11 @@ def paths():
def modules_refresh(module_cache=addons_fake_modules):
- global error_duplicates
global error_encoding
import os
- error_duplicates = False
error_encoding = False
+ error_duplicates.clear()
path_list = paths()
@@ -168,7 +169,7 @@ def modules_refresh(module_cache=addons_fake_modules):
if mod.__file__ != mod_path:
print("multiple addons with the same name:\n %r\n %r" %
(mod.__file__, mod_path))
- error_duplicates = True
+ error_duplicates.append((mod.bl_info["name"], mod.__file__, mod_path))
elif mod.__time__ != os.path.getmtime(mod_path):
print("reloading addon:",
@@ -444,6 +445,13 @@ def reset_all(*, reload_scripts=False):
disable(mod_name)
+def disable_all():
+ import sys
+ for mod_name, mod in sys.modules.items():
+ if getattr(mod, "__addon_enabled__", False):
+ disable(mod_name)
+
+
def module_bl_info(mod, info_basis=None):
if info_basis is None:
info_basis = {
diff --git a/release/scripts/modules/bl_app_override/__init__.py b/release/scripts/modules/bl_app_override/__init__.py
new file mode 100644
index 00000000000..89cc8a0eb28
--- /dev/null
+++ b/release/scripts/modules/bl_app_override/__init__.py
@@ -0,0 +1,202 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8-80 compliant>
+
+"""
+Module to manage overriding various parts of Blender.
+
+Intended for use with 'app_templates', though it can be used from anywhere.
+"""
+
+
+# TODO, how to check these aren't from add-ons.
+# templates might need to un-register while filtering.
+def class_filter(cls_parent, **kw):
+ whitelist = kw.pop("whitelist", None)
+ blacklist = kw.pop("blacklist", None)
+ kw_items = tuple(kw.items())
+ for cls in cls_parent.__subclasses__():
+ # same as is_registered()
+ if "bl_rna" in cls.__dict__:
+ if blacklist is not None and cls.__name__ in blacklist:
+ continue
+ if ((whitelist is not None and cls.__name__ is whitelist) or
+ all((getattr(cls, attr) in expect) for attr, expect in kw_items)):
+ yield cls
+
+
+def ui_draw_filter_register(
+ *,
+ ui_ignore_classes=None,
+ ui_ignore_operator=None,
+ ui_ignore_property=None,
+ ui_ignore_menu=None,
+ ui_ignore_label=None
+):
+ import bpy
+
+ UILayout = bpy.types.UILayout
+
+ if ui_ignore_classes is None:
+ ui_ignore_classes = (
+ bpy.types.Panel,
+ bpy.types.Menu,
+ bpy.types.Header,
+ )
+
+ class OperatorProperties_Fake:
+ pass
+
+ class UILayout_Fake(bpy.types.UILayout):
+ __slots__ = ()
+
+ def __getattribute__(self, attr):
+ # ensure we always pass down UILayout_Fake instances
+ if attr in {"row", "split", "column", "box", "column_flow"}:
+ real_func = UILayout.__getattribute__(self, attr)
+
+ def dummy_func(*args, **kw):
+ # print("wrapped", attr)
+ ret = real_func(*args, **kw)
+ return UILayout_Fake(ret)
+ return dummy_func
+
+ elif attr in {"operator", "operator_menu_enum", "operator_enum"}:
+ if ui_ignore_operator is None:
+ return UILayout.__getattribute__(self, attr)
+
+ real_func = UILayout.__getattribute__(self, attr)
+
+ def dummy_func(*args, **kw):
+ # print("wrapped", attr)
+ if not ui_ignore_operator(args[0]):
+ ret = real_func(*args, **kw)
+ else:
+ # UILayout.__getattribute__(self, "label")()
+ # may need to be set
+ ret = OperatorProperties_Fake()
+ return ret
+ return dummy_func
+
+ elif attr in {"prop", "prop_enum"}:
+ if ui_ignore_property is None:
+ return UILayout.__getattribute__(self, attr)
+
+ real_func = UILayout.__getattribute__(self, attr)
+
+ def dummy_func(*args, **kw):
+ # print("wrapped", attr)
+ if not ui_ignore_property(args[0].__class__.__name__, args[1]):
+ ret = real_func(*args, **kw)
+ else:
+ ret = None
+ return ret
+ return dummy_func
+
+ elif attr == "menu":
+ if ui_ignore_menu is None:
+ return UILayout.__getattribute__(self, attr)
+
+ real_func = UILayout.__getattribute__(self, attr)
+
+ def dummy_func(*args, **kw):
+ # print("wrapped", attr)
+ if not ui_ignore_menu(args[0]):
+ ret = real_func(*args, **kw)
+ else:
+ ret = None
+ return ret
+ return dummy_func
+
+ elif attr == "label":
+ if ui_ignore_label is None:
+ return UILayout.__getattribute__(self, attr)
+
+ real_func = UILayout.__getattribute__(self, attr)
+
+ def dummy_func(*args, **kw):
+ # print("wrapped", attr)
+ if not ui_ignore_label(args[0] if args else kw.get("text", "")):
+ ret = real_func(*args, **kw)
+ else:
+ # ret = real_func()
+ ret = None
+ return ret
+ return dummy_func
+ else:
+ return UILayout.__getattribute__(self, attr)
+ # print(self, attr)
+
+ def operator(*args, **kw):
+ return super().operator(*args, **kw)
+
+ def draw_override(func_orig, self_real, context):
+ cls_real = self_real.__class__
+ if cls_real is super:
+ # simple, no wrapping
+ return func_orig(self_real, context)
+
+ class Wrapper(cls_real):
+ __slots__ = ()
+ def __getattribute__(self, attr):
+ if attr == "layout":
+ return UILayout_Fake(self_real.layout)
+ else:
+ cls = super()
+ try:
+ return cls.__getattr__(self, attr)
+ except AttributeError:
+ # class variable
+ try:
+ return getattr(cls, attr)
+ except AttributeError:
+ # for preset bl_idname access
+ return getattr(UILayout(self), attr)
+
+ @property
+ def layout(self):
+ # print("wrapped")
+ return self_real.layout
+
+ return func_orig(Wrapper(self_real), context)
+
+ ui_ignore_store = []
+
+ for cls in ui_ignore_classes:
+ for subcls in list(cls.__subclasses__()):
+ if "draw" in subcls.__dict__: # don't want to get parents draw()
+
+ def replace_draw():
+ # function also serves to hold draw_old in a local name-space
+ draw_orig = subcls.draw
+
+ def draw(self, context):
+ return draw_override(draw_orig, self, context)
+ subcls.draw = draw
+
+ ui_ignore_store.append((subcls, "draw", subcls.draw))
+
+ replace_draw()
+
+ return ui_ignore_store
+
+
+def ui_draw_filter_unregister(ui_ignore_store):
+ for (obj, attr, value) in ui_ignore_store:
+ setattr(obj, attr, value)
diff --git a/release/scripts/modules/bl_app_override/helpers.py b/release/scripts/modules/bl_app_override/helpers.py
new file mode 100644
index 00000000000..981039e8ddc
--- /dev/null
+++ b/release/scripts/modules/bl_app_override/helpers.py
@@ -0,0 +1,167 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8-80 compliant>
+
+# -----------------------------------------------------------------------------
+# AppOverrideState
+
+
+class AppOverrideState:
+ """
+ Utility class to encapsulate overriding the application state
+ so that settings can be restored afterwards.
+ """
+ __slots__ = (
+ # setup_classes
+ "_class_store",
+ # setup_ui_ignore
+ "_ui_ignore_store",
+ # setup_addons
+ "_addon_store",
+ )
+
+ # ---------
+ # Callbacks
+ #
+ # Set as None, to make it simple to check if they're being overridden.
+
+ # setup/teardown classes
+ class_ignore = None
+
+ # setup/teardown ui_ignore
+ ui_ignore_classes = None
+ ui_ignore_operator = None
+ ui_ignore_property = None
+ ui_ignore_menu = None
+ ui_ignore_label = None
+
+ addon_paths = None
+ addons = None
+
+ # End callbacks
+
+ def __init__(self):
+ self._class_store = None
+ self._addon_store = None
+ self._ui_ignore_store = None
+
+ def _setup_classes(self):
+ import bpy
+ assert(self._class_store is None)
+ self._class_store = self.class_ignore()
+ from bpy.utils import unregister_class
+ for cls in self._class_store:
+ unregister_class(cls)
+
+ def _teardown_classes(self):
+ assert(self._class_store is not None)
+
+ from bpy.utils import register_class
+ for cls in self._class_store:
+ register_class(cls)
+ self._class_store = None
+
+ def _setup_ui_ignore(self):
+ import bl_app_override
+
+ self._ui_ignore_store = bl_app_override.ui_draw_filter_register(
+ ui_ignore_classes=(
+ None if self.ui_ignore_classes is None
+ else self.ui_ignore_classes()
+ ),
+ ui_ignore_operator=self.ui_ignore_operator,
+ ui_ignore_property=self.ui_ignore_property,
+ ui_ignore_menu=self.ui_ignore_menu,
+ ui_ignore_label=self.ui_ignore_label,
+ )
+
+ def _teardown_ui_ignore(self):
+ import bl_app_override
+ bl_app_override.ui_draw_filter_unregister(
+ self._ui_ignore_store
+ )
+ self._ui_ignore_store = None
+
+ def _setup_addons(self):
+ import sys
+ import os
+
+ sys_path = []
+ if self.addon_paths is not None:
+ for path in self.addon_paths():
+ if path not in sys.path:
+ sys.path.append(path)
+
+ import addon_utils
+ addons = []
+ if self.addons is not None:
+ addons.extend(self.addons())
+ for addon in addons:
+ addon_utils.enable(addon)
+
+ self._addon_store = {
+ "sys_path": sys_path,
+ "addons": addons,
+ }
+
+ def _teardown_addons(self):
+ import sys
+
+ sys_path = self._addon_store["sys_path"]
+ for path in sys_path:
+ # should always succeed, but if not it doesn't matter
+ # (someone else was changing the sys.path), ignore!
+ try:
+ sys.path.remove(path)
+ except:
+ pass
+
+ addons = self._addon_store["addons"]
+ import addon_utils
+ for addon in addons:
+ addon_utils.disable(addon)
+
+ self._addon_store.clear()
+ self._addon_store = None
+
+ def setup(self):
+ if self.class_ignore is not None:
+ self._setup_classes()
+
+ if any((self.addon_paths,
+ self.addons,
+ )):
+ self._setup_addons()
+
+ if any((self.ui_ignore_operator,
+ self.ui_ignore_property,
+ self.ui_ignore_menu,
+ self.ui_ignore_label,
+ )):
+ self._setup_ui_ignore()
+
+ def teardown(self):
+ if self._class_store is not None:
+ self._teardown_classes()
+
+ if self._addon_store is not None:
+ self._teardown_addons()
+
+ if self._ui_ignore_store is not None:
+ self._teardown_ui_ignore()
diff --git a/release/scripts/modules/bl_app_template_utils.py b/release/scripts/modules/bl_app_template_utils.py
new file mode 100644
index 00000000000..b3a4824aa7b
--- /dev/null
+++ b/release/scripts/modules/bl_app_template_utils.py
@@ -0,0 +1,198 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8-80 compliant>
+
+"""
+Similar to ``addon_utils``, except we can only have one active at a time.
+
+In most cases users of this module will simply call 'activate'.
+"""
+
+__all__ = (
+ "activate",
+ "import_from_path",
+ "import_from_id",
+ "reset",
+)
+
+import bpy as _bpy
+
+# Normally matches 'user_preferences.app_template_id',
+# but loading new preferences will get us out of sync.
+_app_template = {
+ "id": "",
+}
+
+# instead of sys.modules
+# note that we only ever have one template enabled at a time
+# so it may not seem necessary to use this.
+#
+# However, templates may want to share between each-other,
+# so any loaded modules are stored here?
+#
+# Note that the ID here is the app_template_id , not the modules __name__.
+_modules = {}
+
+
+def _enable(template_id, *, handle_error=None, ignore_not_found=False):
+ import os
+ import sys
+ from bpy_restrict_state import RestrictBlend
+
+ if handle_error is None:
+ def handle_error(ex):
+ import traceback
+ traceback.print_exc()
+
+ # Split registering up into 2 steps so we can undo
+ # if it fails par way through.
+
+ # disable the context, using the context at all is
+ # really bad while loading an template, don't do it!
+ with RestrictBlend():
+
+ # 1) try import
+ try:
+ mod = import_from_id(template_id, ignore_not_found=ignore_not_found)
+ if mod is None:
+ return None
+ mod.__template_enabled__ = False
+ _modules[template_id] = mod
+ except Exception as ex:
+ handle_error(ex)
+ return None
+
+ # 2) try run the modules register function
+ try:
+ mod.register()
+ except Exception as ex:
+ print("Exception in module register(): %r" %
+ getattr(mod, "__file__", template_id))
+ handle_error(ex)
+ del _modules[template_id]
+ return None
+
+ # * OK loaded successfully! *
+ mod.__template_enabled__ = True
+
+ if _bpy.app.debug_python:
+ print("\tapp_template_utils.enable", mod.__name__)
+
+ return mod
+
+
+def _disable(template_id, *, handle_error=None):
+ """
+ Disables a template by name.
+
+ :arg template_id: The name of the template and module.
+ :type template_id: string
+ :arg handle_error: Called in the case of an error,
+ taking an exception argument.
+ :type handle_error: function
+ """
+ import sys
+
+ if handle_error is None:
+ def handle_error(ex):
+ import traceback
+ traceback.print_exc()
+
+ mod = _modules.get(template_id)
+
+ if mod and getattr(mod, "__template_enabled__", False) is not False:
+ mod.__template_enabled__ = False
+
+ try:
+ mod.unregister()
+ except Exception as ex:
+ print("Exception in module unregister(): %r" %
+ getattr(mod, "__file__", template_id))
+ handle_error(ex)
+ else:
+ print("\tapp_template_utils.disable: %s not %s." %
+ (template_id, "disabled" if mod is None else "loaded"))
+
+ if _bpy.app.debug_python:
+ print("\tapp_template_utils.disable", template_id)
+
+
+def import_from_path(path, ignore_not_found=False):
+ import os
+ from importlib import import_module
+ base_module, template_id = path.rsplit(os.sep, 2)[-2:]
+ module_name = base_module + "." + template_id
+
+ try:
+ return import_module(module_name)
+ except ModuleNotFoundError as ex:
+ if ignore_not_found and ex.name == module_name:
+ return None
+ raise ex
+
+
+def import_from_id(template_id, ignore_not_found=False):
+ import os
+ path = next(iter(_bpy.utils.app_template_paths(template_id)), None)
+ if path is None:
+ if ignore_not_found:
+ return None
+ else:
+ raise Exception("%r template not found!" % template_id)
+ else:
+ if ignore_not_found:
+ if not os.path.exists(os.path.join(path, "__init__.py")):
+ return None
+ return import_from_path(path, ignore_not_found=ignore_not_found)
+
+
+def activate(template_id=None):
+ template_id_prev = _app_template["id"]
+
+ # not needed but may as well avoid activating same template
+ # ... in fact keep this, it will show errors early on!
+ """
+ if template_id_prev == template_id:
+ return
+ """
+
+ if template_id_prev:
+ _disable(template_id_prev)
+
+ # Disable all addons, afterwards caller must reset.
+ import addon_utils
+ addon_utils.disable_all()
+
+ # ignore_not_found so modules that don't contain scripts don't raise errors
+ mod = _enable(template_id, ignore_not_found=True) if template_id else None
+
+ _app_template["id"] = template_id
+
+
+def reset(*, reload_scripts=False):
+ """
+ Sets default state.
+ """
+ template_id = _bpy.context.user_preferences.app_template
+ if _bpy.app.debug_python:
+ print("bl_app_template_utils.reset('%s')" % template_id)
+
+ # TODO reload_scripts
+
+ activate(template_id)
diff --git a/release/scripts/modules/bpy/__init__.py b/release/scripts/modules/bpy/__init__.py
index 26fdbc8cc56..545b891505f 100644
--- a/release/scripts/modules/bpy/__init__.py
+++ b/release/scripts/modules/bpy/__init__.py
@@ -48,11 +48,11 @@ def main():
import sys
# Possibly temp. addons path
- from os.path import join, dirname, normpath
- sys.path.append(normpath(join(dirname(__file__),
- "..", "..", "addons", "modules")))
- sys.path.append(join(utils.user_resource('SCRIPTS'),
- "addons", "modules"))
+ from os.path import join, dirname
+ sys.path.extend([
+ join(dirname(dirname(dirname(__file__))), "addons", "modules"),
+ join(utils.user_resource('SCRIPTS'), "addons", "modules"),
+ ])
# fake module to allow:
# from bpy.types import Panel
diff --git a/release/scripts/modules/bpy/path.py b/release/scripts/modules/bpy/path.py
index a864a86eba7..e17d710068c 100644
--- a/release/scripts/modules/bpy/path.py
+++ b/release/scripts/modules/bpy/path.py
@@ -204,7 +204,9 @@ def display_name(name):
name = name.replace("_colon_", ":")
name = name.replace("_plus_", "+")
- name = name.replace("_", " ")
+ # strip to allow underscore prefix
+ # (when paths can't start with numbers for eg).
+ name = name.replace("_", " ").lstrip(" ")
if name.islower():
name = name.lower().title()
diff --git a/release/scripts/modules/bpy/utils/__init__.py b/release/scripts/modules/bpy/utils/__init__.py
index 31dd836e034..1d555ae7123 100644
--- a/release/scripts/modules/bpy/utils/__init__.py
+++ b/release/scripts/modules/bpy/utils/__init__.py
@@ -32,6 +32,7 @@ __all__ = (
"preset_find",
"preset_paths",
"refresh_script_paths",
+ "app_template_paths",
"register_class",
"register_module",
"register_manual_map",
@@ -49,18 +50,18 @@ __all__ = (
"unregister_class",
"unregister_module",
"user_resource",
- )
+)
from _bpy import (
- _utils_units as units,
- blend_paths,
- escape_identifier,
- register_class,
- resource_path,
- script_paths as _bpy_script_paths,
- unregister_class,
- user_resource as _user_resource,
- )
+ _utils_units as units,
+ blend_paths,
+ escape_identifier,
+ register_class,
+ resource_path,
+ script_paths as _bpy_script_paths,
+ unregister_class,
+ user_resource as _user_resource,
+)
import bpy as _bpy
import os as _os
@@ -142,7 +143,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
as modules.
:type refresh_scripts: bool
"""
- use_time = _bpy.app.debug_python
+ use_time = use_class_register_check = _bpy.app.debug_python
if use_time:
import time
@@ -161,7 +162,8 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
for module_name in [ext.module for ext in _user_preferences.addons]:
_addon_utils.disable(module_name)
- # *AFTER* unregistering all add-ons, otherwise all calls to unregister_module() will silently fail (do nothing).
+ # *AFTER* unregistering all add-ons, otherwise all calls to
+ # unregister_module() will silently fail (do nothing).
_bpy_types.TypeMap.clear()
def register_module_call(mod):
@@ -245,6 +247,12 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
for mod in modules_from_path(path, loaded_modules):
test_register(mod)
+ # load template (if set)
+ if any(_bpy.utils.app_template_paths()):
+ import bl_app_template_utils
+ bl_app_template_utils.reset(reload_scripts=reload_scripts)
+ del bl_app_template_utils
+
# deal with addons separately
_initialize = getattr(_addon_utils, "_initialize", None)
if _initialize is not None:
@@ -269,13 +277,21 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
if use_time:
print("Python Script Load Time %.4f" % (time.time() - t_main))
+ if use_class_register_check:
+ for cls in _bpy.types.bpy_struct.__subclasses__():
+ if getattr(cls, "is_registered", False):
+ for subcls in cls.__subclasses__():
+ if not subcls.is_registered:
+ print(
+ "Warning, unregistered class: %s(%s)" %
+ (subcls.__name__, cls.__name__)
+ )
+
# base scripts
-_scripts = _os.path.join(_os.path.dirname(__file__),
- _os.path.pardir,
- _os.path.pardir,
- )
-_scripts = (_os.path.normpath(_scripts), )
+_scripts = (
+ _os.path.dirname(_os.path.dirname(_os.path.dirname(__file__))),
+)
def script_path_user():
@@ -356,6 +372,38 @@ def refresh_script_paths():
_sys_path_ensure(path)
+def app_template_paths(subdir=None):
+ """
+ Returns valid application template paths.
+
+ :arg subdir: Optional subdir.
+ :type subdir: string
+ :return: app template paths.
+ :rtype: generator
+ """
+
+ # note: LOCAL, USER, SYSTEM order matches script resolution order.
+ subdir_tuple = (subdir,) if subdir is not None else ()
+
+ path = _os.path.join(*(
+ resource_path('LOCAL'), "scripts", "startup",
+ "bl_app_templates_user", *subdir_tuple))
+ if _os.path.isdir(path):
+ yield path
+ else:
+ path = _os.path.join(*(
+ resource_path('USER'), "scripts", "startup",
+ "bl_app_templates_user", *subdir_tuple))
+ if _os.path.isdir(path):
+ yield path
+
+ path = _os.path.join(*(
+ resource_path('SYSTEM'), "scripts", "startup",
+ "bl_app_templates_system", *subdir_tuple))
+ if _os.path.isdir(path):
+ yield path
+
+
def preset_paths(subdir):
"""
Returns a list of paths for a specific preset.
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index d64acd2ce3b..600b29a6b2b 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -683,6 +683,10 @@ class _GenericUI:
return draw_funcs
@classmethod
+ def is_extended(cls):
+ return bool(getattr(cls.draw, "_draw_funcs", None))
+
+ @classmethod
def append(cls, draw_func):
"""
Append a draw function to this menu,
@@ -725,11 +729,30 @@ class Header(StructRNA, _GenericUI, metaclass=RNAMeta):
class Menu(StructRNA, _GenericUI, metaclass=RNAMeta):
__slots__ = ()
- def path_menu(self, searchpaths, operator,
- props_default=None, filter_ext=None):
+ def path_menu(self, searchpaths, operator, *,
+ props_default=None, prop_filepath="filepath",
+ filter_ext=None, filter_path=None, display_name=None):
+ """
+ Populate a menu from a list of paths.
+
+ :arg searchpaths: Paths to scan.
+ :type searchpaths: sequence of strings.
+ :arg operator: The operator id to use with each file.
+ :type operator: string
+ :arg prop_filepath: Optional operator filepath property (defaults to "filepath").
+ :type prop_filepath: string
+ :arg props_default: Properties to assign to each operator.
+ :type props_default: dict
+ :arg filter_ext: Optional callback that takes the file extensions.
+
+ Returning false excludes the file from the list.
+
+ :type filter_ext: Callable that takes a string and returns a bool.
+ :arg display_name: Optional callback that takes the full path, returns the name to display.
+ :type display_name: Callable that takes a string and returns a string.
+ """
layout = self.layout
- # hard coded to set the operators 'filepath' to the filename.
import os
import bpy.utils
@@ -742,25 +765,32 @@ class Menu(StructRNA, _GenericUI, metaclass=RNAMeta):
# collect paths
files = []
for directory in searchpaths:
- files.extend([(f, os.path.join(directory, f))
- for f in os.listdir(directory)
- if (not f.startswith("."))
- if ((filter_ext is None) or
- (filter_ext(os.path.splitext(f)[1])))
- ])
+ files.extend(
+ [(f, os.path.join(directory, f))
+ for f in os.listdir(directory)
+ if (not f.startswith("."))
+ if ((filter_ext is None) or
+ (filter_ext(os.path.splitext(f)[1])))
+ if ((filter_path is None) or
+ (filter_path(f)))
+ ])
files.sort()
for f, filepath in files:
- props = layout.operator(operator,
- text=bpy.path.display_name(f),
- translate=False)
+ # Intentionally pass the full path to 'display_name' callback,
+ # since the callback may want to use part a directory in the name.
+ props = layout.operator(
+ operator,
+ text=display_name(filepath) if display_name else bpy.path.display_name(f),
+ translate=False,
+ )
if props_default is not None:
for attr, value in props_default.items():
setattr(props, attr, value)
- props.filepath = filepath
+ setattr(props, prop_filepath, filepath)
if operator == "script.execute_preset":
props.menu_idname = self.bl_idname
diff --git a/release/scripts/modules/rna_keymap_ui.py b/release/scripts/modules/rna_keymap_ui.py
index 2ca7a7997a5..a1a4e5b8763 100644
--- a/release/scripts/modules/rna_keymap_ui.py
+++ b/release/scripts/modules/rna_keymap_ui.py
@@ -128,16 +128,15 @@ def draw_kmi(display_keymaps, kc, km, kmi, layout, level):
else:
box = col.column()
- split = box.split(percentage=0.01)
+ split = box.split()
# header bar
- row = split.row()
+ row = split.row(align=True)
row.prop(kmi, "show_expanded", text="", emboss=False)
-
- row = split.row()
row.prop(kmi, "active", text="", emboss=False)
if km.is_modal:
+ row.separator()
row.prop(kmi, "propvalue", text="")
else:
row.label(text=kmi.name)
diff --git a/release/scripts/presets/interface_theme/back_to_black.xml b/release/scripts/presets/interface_theme/back_to_black.xml
index 915e9cb64f1..1636f5b5cf6 100644
--- a/release/scripts/presets/interface_theme/back_to_black.xml
+++ b/release/scripts/presets/interface_theme/back_to_black.xml
@@ -18,7 +18,7 @@
text_sel="#ffffff"
show_shaded="TRUE"
shadetop="-100"
- shadedown="0">
+ shadedown="5">
</ThemeWidgetColors>
</wcol_regular>
<wcol_tool>
@@ -30,19 +30,19 @@
text_sel="#ffffff"
show_shaded="TRUE"
shadetop="-100"
- shadedown="0">
+ shadedown="5">
</ThemeWidgetColors>
</wcol_tool>
<wcol_radio>
<ThemeWidgetColors outline="#2a2a2a"
inner="#111111ff"
inner_sel="#33406bff"
- item="#191919ff"
+ item="#444444ff"
text="#929292"
text_sel="#ffffff"
show_shaded="TRUE"
shadetop="-100"
- shadedown="0">
+ shadedown="5">
</ThemeWidgetColors>
</wcol_radio>
<wcol_text>
@@ -50,23 +50,23 @@
inner="#111111ff"
inner_sel="#33406bff"
item="#191919ff"
- text="#e4e4e4"
+ text="#929292"
text_sel="#ffffff"
show_shaded="TRUE"
shadetop="-100"
- shadedown="0">
+ shadedown="5">
</ThemeWidgetColors>
</wcol_text>
<wcol_option>
- <ThemeWidgetColors outline="#2a2a2a"
+ <ThemeWidgetColors outline="#535353"
inner="#111111ff"
inner_sel="#33406bff"
- item="#000000ff"
- text="#c7c7c7"
+ item="#a3a3a3ff"
+ text="#929292"
text_sel="#ffffff"
show_shaded="TRUE"
shadetop="-100"
- shadedown="0">
+ shadedown="5">
</ThemeWidgetColors>
</wcol_option>
<wcol_toggle>
@@ -78,7 +78,7 @@
text_sel="#ffffff"
show_shaded="TRUE"
shadetop="-100"
- shadedown="0">
+ shadedown="5">
</ThemeWidgetColors>
</wcol_toggle>
<wcol_num>
@@ -90,7 +90,7 @@
text_sel="#ffffff"
show_shaded="TRUE"
shadetop="-100"
- shadedown="0">
+ shadedown="5">
</ThemeWidgetColors>
</wcol_num>
<wcol_numslider>
@@ -102,7 +102,7 @@
text_sel="#ffffff"
show_shaded="TRUE"
shadetop="-100"
- shadedown="0">
+ shadedown="5">
</ThemeWidgetColors>
</wcol_numslider>
<wcol_box>
@@ -114,7 +114,7 @@
text_sel="#ffffff"
show_shaded="TRUE"
shadetop="-100"
- shadedown="0">
+ shadedown="5">
</ThemeWidgetColors>
</wcol_box>
<wcol_menu>
@@ -126,7 +126,7 @@
text_sel="#ffffff"
show_shaded="TRUE"
shadetop="-100"
- shadedown="0">
+ shadedown="5">
</ThemeWidgetColors>
</wcol_menu>
<wcol_pulldown>
@@ -138,7 +138,7 @@
text_sel="#ffffff"
show_shaded="TRUE"
shadetop="-100"
- shadedown="0">
+ shadedown="5">
</ThemeWidgetColors>
</wcol_pulldown>
<wcol_menu_back>
@@ -150,7 +150,7 @@
text_sel="#ffffff"
show_shaded="TRUE"
shadetop="-100"
- shadedown="0">
+ shadedown="5">
</ThemeWidgetColors>
</wcol_menu_back>
<wcol_pie_menu>
@@ -170,7 +170,7 @@
inner="#191919e6"
inner_sel="#2d2d2de6"
item="#646464ff"
- text="#ffffff"
+ text="#929292"
text_sel="#ffffff"
show_shaded="FALSE"
shadetop="25"
@@ -186,7 +186,7 @@
text_sel="#ffffff"
show_shaded="TRUE"
shadetop="-100"
- shadedown="0">
+ shadedown="5">
</ThemeWidgetColors>
</wcol_menu_item>
<wcol_scroll>
@@ -198,7 +198,7 @@
text_sel="#ffffff"
show_shaded="TRUE"
shadetop="-100"
- shadedown="0">
+ shadedown="5">
</ThemeWidgetColors>
</wcol_scroll>
<wcol_progress>
@@ -210,7 +210,7 @@
text_sel="#ffffff"
show_shaded="TRUE"
shadetop="-100"
- shadedown="0">
+ shadedown="5">
</ThemeWidgetColors>
</wcol_progress>
<wcol_list_item>
@@ -222,7 +222,7 @@
text_sel="#ffffff"
show_shaded="TRUE"
shadetop="-100"
- shadedown="0">
+ shadedown="5">
</ThemeWidgetColors>
</wcol_list_item>
<wcol_state>
@@ -239,32 +239,35 @@
</user_interface>
<view_3d>
<ThemeView3D grid="#222222"
+ clipping_border_3d="#313131ff"
wire="#888888"
- wire_edit="#000000"
+ wire_edit="#6c75ff"
gp_vertex="#000000"
gp_vertex_select="#ff8500"
gp_vertex_size="3"
- lamp="#c1d40028"
- speaker="#535353"
- camera="#000000"
- view_overlay="#000000"
- empty="#000000"
+ text_grease_pencil="#b5e61d"
object_selected="#f15800"
object_active="#ff8c19"
object_grouped="#083008"
object_grouped_active="#55bb55"
- transform="#ffffff"
+ text_keyframe="#ddd700"
+ camera="#535353"
+ empty="#535353"
+ lamp="#fff0d328"
+ speaker="#535353"
vertex="#72cfdd"
vertex_select="#ff8500"
vertex_size="3"
+ vertex_bevel="#00a5ff"
vertex_unreferenced="#000000"
edge_select="#ffa000"
edge_seam="#db2512"
edge_sharp="#ff2020"
edge_crease="#cc0099"
+ edge_bevel="#00a5ff"
edge_facesel="#6b6b6b"
freestyle_edge_mark="#7fff7f"
- face="#73828f12"
+ face="#73828f41"
face_select="#ffa4003c"
face_dot="#ffa900"
facedot_size="4"
@@ -291,19 +294,18 @@
normal="#22dddd"
vertex_normal="#2361dd"
split_normal="#dd23dd"
- bone_solid="#c8c8c8"
bone_pose="#50c8ff"
bone_pose_active="#8cffff"
- frame_current="#60c040"
- outline_width="1"
+ bone_solid="#c8c8c8"
bundle_solid="#c8c8c8"
camera_path="#5a5a5a"
skin_root="#000000"
- clipping_border_3d="#313131ff"
- text_keyframe="#ddd700"
- text_grease_pencil="#b5e61d"
+ view_overlay="#000000"
+ transform="#ffffff"
+ frame_current="#60c040"
paint_curve_handle="#7fff7f7f"
- paint_curve_pivot="#ff7f7f7f">
+ paint_curve_pivot="#ff7f7f7f"
+ outline_width="1">
<space>
<ThemeSpaceGradient title="#5d5d5d"
text="#7d7d7d"
@@ -312,23 +314,23 @@
header_text="#979797"
header_text_hi="#ffffff"
button="#00000057"
- button_title="#c5c5c5"
+ button_title="#929292"
button_text="#c3c3c3"
- button_text_hi="#ffffff"
+ button_text_hi="#e5e5e5"
tab_active="#212947"
tab_inactive="#000000"
tab_back="#060606ff"
tab_outline="#000000">
<gradients>
<ThemeGradientColors show_grad="TRUE"
- gradient="#0a0a0a"
+ gradient="#1d1d1d"
high_gradient="#000000">
</ThemeGradientColors>
</gradients>
<panelcolors>
<ThemePanelColors header="#00000019"
back="#72727280"
- show_header="FALSE"
+ show_header="TRUE"
show_back="FALSE">
</ThemePanelColors>
</panelcolors>
@@ -348,6 +350,7 @@
vertex="#ffffff"
vertex_select="#ff8500"
vertex_size="3"
+ vertex_bevel="#000000"
vertex_unreferenced="#000000"
handle_free="#808080"
handle_auto="#909000"
@@ -382,7 +385,7 @@
<panelcolors>
<ThemePanelColors header="#00000019"
back="#72727280"
- show_header="FALSE"
+ show_header="TRUE"
show_back="FALSE">
</ThemePanelColors>
</panelcolors>
@@ -418,7 +421,7 @@
<panelcolors>
<ThemePanelColors header="#00000019"
back="#72727280"
- show_header="FALSE"
+ show_header="TRUE"
show_back="FALSE">
</ThemePanelColors>
</panelcolors>
@@ -463,7 +466,7 @@
<panelcolors>
<ThemePanelColors header="#00000019"
back="#72727280"
- show_header="FALSE"
+ show_header="TRUE"
show_back="FALSE">
</ThemePanelColors>
</panelcolors>
@@ -501,6 +504,7 @@
keyframe_jitter_selected="#61c042"
keyframe_border="#000000ff"
keyframe_border_selected="#000000ff"
+ keyframe_scale_factor="1"
summary="#00000000">
<space>
<ThemeSpaceGeneric back="#080808"
@@ -521,7 +525,7 @@
<panelcolors>
<ThemePanelColors header="#00000019"
back="#72727280"
- show_header="FALSE"
+ show_header="TRUE"
show_back="FALSE">
</ThemePanelColors>
</panelcolors>
@@ -543,6 +547,7 @@
vertex="#0f13bb"
vertex_select="#ff8500"
vertex_size="3"
+ vertex_bevel="#000000"
vertex_unreferenced="#000000"
face="#ffffff0a"
face_select="#ff85003c"
@@ -596,7 +601,7 @@
<panelcolors>
<ThemePanelColors header="#00000019"
back="#72727280"
- show_header="FALSE"
+ show_header="TRUE"
show_back="FALSE">
</ThemePanelColors>
</panelcolors>
@@ -644,7 +649,7 @@
<panelcolors>
<ThemePanelColors header="#00000019"
back="#72727280"
- show_header="FALSE"
+ show_header="TRUE"
show_back="FALSE">
</ThemePanelColors>
</panelcolors>
@@ -673,7 +678,7 @@
<panelcolors>
<ThemePanelColors header="#00000019"
back="#72727280"
- show_header="FALSE"
+ show_header="TRUE"
show_back="FALSE">
</ThemePanelColors>
</panelcolors>
@@ -712,7 +717,7 @@
<panelcolors>
<ThemePanelColors header="#00000019"
back="#72727280"
- show_header="FALSE"
+ show_header="TRUE"
show_back="FALSE">
</ThemePanelColors>
</panelcolors>
@@ -744,7 +749,7 @@
<panelcolors>
<ThemePanelColors header="#00000019"
back="#72727280"
- show_header="FALSE"
+ show_header="TRUE"
show_back="FALSE">
</ThemePanelColors>
</panelcolors>
@@ -799,7 +804,7 @@
<panelcolors>
<ThemePanelColors header="#00000019"
back="#72727280"
- show_header="FALSE"
+ show_header="TRUE"
show_back="FALSE">
</ThemePanelColors>
</panelcolors>
@@ -835,7 +840,7 @@
<panelcolors>
<ThemePanelColors header="#00000019"
back="#72727280"
- show_header="FALSE"
+ show_header="TRUE"
show_back="FALSE">
</ThemePanelColors>
</panelcolors>
@@ -865,7 +870,7 @@
<panelcolors>
<ThemePanelColors header="#00000019"
back="#72727280"
- show_header="FALSE"
+ show_header="TRUE"
show_back="FALSE">
</ThemePanelColors>
</panelcolors>
@@ -903,7 +908,7 @@
<panelcolors>
<ThemePanelColors header="#00000019"
back="#72727280"
- show_header="FALSE"
+ show_header="TRUE"
show_back="FALSE">
</ThemePanelColors>
</panelcolors>
@@ -932,7 +937,7 @@
<panelcolors>
<ThemePanelColors header="#00000019"
back="#72727280"
- show_header="FALSE"
+ show_header="TRUE"
show_back="FALSE">
</ThemePanelColors>
</panelcolors>
@@ -966,7 +971,7 @@
<panelcolors>
<ThemePanelColors header="#00000019"
back="#72727280"
- show_header="FALSE"
+ show_header="TRUE"
show_back="FALSE">
</ThemePanelColors>
</panelcolors>
@@ -1019,7 +1024,7 @@
<panelcolors>
<ThemePanelColors header="#00000019"
back="#72727280"
- show_header="FALSE"
+ show_header="TRUE"
show_back="FALSE">
</ThemePanelColors>
</panelcolors>
diff --git a/release/scripts/presets/keyconfig/3dsmax.py b/release/scripts/presets/keyconfig/3dsmax.py
index 7694e338d68..6d05ff6982c 100644
--- a/release/scripts/presets/keyconfig/3dsmax.py
+++ b/release/scripts/presets/keyconfig/3dsmax.py
@@ -401,6 +401,12 @@ kmi = km.keymap_items.new('particle.hide', 'H', 'PRESS')
kmi.properties.unselected = False
kmi = km.keymap_items.new('particle.hide', 'H', 'PRESS', shift=True)
kmi.properties.unselected = True
+kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', shift=True)
+kmi.properties.release_confirm = True
+kmi.properties.use_planar_constraint= True
+kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', shift=True)
+kmi.properties.release_confirm = True
+kmi.properties.use_accurate= True
kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', any=True)
kmi.properties.release_confirm = True
kmi = km.keymap_items.new('particle.brush_edit', 'LEFTMOUSE', 'PRESS')
@@ -422,6 +428,12 @@ kmi.properties.value_2 = 'ENABLED'
# Map 3D View
km = kc.keymaps.new('3D View', space_type='VIEW_3D', region_type='WINDOW', modal=False)
+kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', shift=True)
+kmi.properties.release_confirm = True
+kmi.properties.use_planar_constraint= True
+kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', shift=True)
+kmi.properties.release_confirm = True
+kmi.properties.use_accurate= True
kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', any=True)
kmi.properties.release_confirm = True
kmi = km.keymap_items.new('view3d.cursor3d', 'ACTIONMOUSE', 'PRESS')
diff --git a/release/scripts/presets/keyconfig/maya.py b/release/scripts/presets/keyconfig/maya.py
index 67fd1fddcac..53129593a59 100644
--- a/release/scripts/presets/keyconfig/maya.py
+++ b/release/scripts/presets/keyconfig/maya.py
@@ -933,6 +933,12 @@ km = kc.keymaps.new('3D View', space_type='VIEW_3D', region_type='WINDOW', modal
kmi = km.keymap_items.new('view3d.cursor3d', 'ACTIONMOUSE', 'PRESS')
kmi = km.keymap_items.new('view3d.rotate', 'LEFTMOUSE', 'PRESS', alt=True)
+kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', shift=True)
+kmi.properties.release_confirm = True
+kmi.properties.use_planar_constraint = True
+kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', shift=True)
+kmi.properties.release_confirm = True
+kmi.properties.use_accurate = True
kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', any=True)
kmi.properties.release_confirm = True
kmi = km.keymap_items.new('view3d.move', 'MIDDLEMOUSE', 'PRESS', alt=True)
diff --git a/release/scripts/startup/bl_operators/__init__.py b/release/scripts/startup/bl_operators/__init__.py
index a696410ca1c..1e0dbe6925e 100644
--- a/release/scripts/startup/bl_operators/__init__.py
+++ b/release/scripts/startup/bl_operators/__init__.py
@@ -21,8 +21,7 @@
# support reloading sub-modules
if "bpy" in locals():
from importlib import reload
- for val in _modules_loaded:
- reload(val)
+ _modules_loaded[:] = [reload(val) for val in _modules_loaded]
del reload
_modules = [
@@ -63,8 +62,15 @@ del _namespace
def register():
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for mod in _modules_loaded:
+ for cls in mod.classes:
+ register_class(cls)
def unregister():
- bpy.utils.unregister_module(__name__)
+ from bpy.utils import unregister_class
+ for mod in reversed(_modules_loaded):
+ for cls in reversed(mod.classes):
+ if cls.is_registered:
+ unregister_class(cls)
diff --git a/release/scripts/startup/bl_operators/add_mesh_torus.py b/release/scripts/startup/bl_operators/add_mesh_torus.py
index 247b91e147f..0e5acea94f9 100644
--- a/release/scripts/startup/bl_operators/add_mesh_torus.py
+++ b/release/scripts/startup/bl_operators/add_mesh_torus.py
@@ -282,3 +282,8 @@ class AddTorus(Operator, object_utils.AddObjectHelper):
object_utils.object_data_add(context, mesh, operator=self)
return {'FINISHED'}
+
+
+classes = (
+ AddTorus,
+) \ No newline at end of file
diff --git a/release/scripts/startup/bl_operators/anim.py b/release/scripts/startup/bl_operators/anim.py
index c20d591241c..78fcf0dd124 100644
--- a/release/scripts/startup/bl_operators/anim.py
+++ b/release/scripts/startup/bl_operators/anim.py
@@ -28,11 +28,11 @@ if "bpy" in locals():
import bpy
from bpy.types import Operator
from bpy.props import (
- IntProperty,
- BoolProperty,
- EnumProperty,
- StringProperty,
- )
+ IntProperty,
+ BoolProperty,
+ EnumProperty,
+ StringProperty,
+)
class ANIM_OT_keying_set_export(Operator):
@@ -115,30 +115,30 @@ class ANIM_OT_keying_set_export(Operator):
# Find material or lamp using this node tree...
id_bpy_path = "bpy.data.nodes[\"%s\"]"
found = False
-
+
for mat in bpy.data.materials:
if mat.node_tree == ksp.id:
id_bpy_path = "bpy.data.materials[\"%s\"].node_tree" % (mat.name)
found = True
- break;
-
+ break
+
if not found:
for lamp in bpy.data.lamps:
if lamp.node_tree == ksp.id:
id_bpy_path = "bpy.data.lamps[\"%s\"].node_tree" % (lamp.name)
found = True
- break;
-
+ break
+
if not found:
- self.report({'WARN'}, "Could not find material or lamp using Shader Node Tree - %s" % (ksp.id))
+ self.report({'WARN'}, "Could not find material or lamp using Shader Node Tree - %s" % (ksp.id))
elif ksp.id.bl_rna.identifier.startswith("CompositorNodeTree"):
# Find compositor nodetree using this node tree...
for scene in bpy.data.scenes:
if scene.node_tree == ksp.id:
id_bpy_path = "bpy.data.scenes[\"%s\"].node_tree" % (scene.name)
- break;
+ break
else:
- self.report({'WARN'}, "Could not find scene using Compositor Node Tree - %s" % (ksp.id))
+ self.report({'WARN'}, "Could not find scene using Compositor Node Tree - %s" % (ksp.id))
else:
idtype_list = ksp.id.bl_rna.name.lower() + "s"
id_bpy_path = "bpy.data.%s[\"%s\"]" % (idtype_list, ksp.id.name)
@@ -302,9 +302,11 @@ class ClearUselessActions(Operator):
bl_label = "Clear Useless Actions"
bl_options = {'REGISTER', 'UNDO'}
- only_unused = BoolProperty(name="Only Unused",
+ only_unused = BoolProperty(
+ name="Only Unused",
description="Only unused (Fake User only) actions get considered",
- default=True)
+ default=True,
+ )
@classmethod
def poll(cls, context):
@@ -393,7 +395,7 @@ class UpdateAnimatedTransformConstraint(Operator):
except:
pass
ret = (data, new_path)
- #print(ret)
+ # print(ret)
return ret
@@ -412,3 +414,11 @@ class UpdateAnimatedTransformConstraint(Operator):
text.from_string(log)
self.report({'INFO'}, "Complete report available on '%s' text datablock" % text.name)
return {'FINISHED'}
+
+
+classes = (
+ ANIM_OT_keying_set_export,
+ BakeAction,
+ ClearUselessActions,
+ UpdateAnimatedTransformConstraint,
+)
diff --git a/release/scripts/startup/bl_operators/clip.py b/release/scripts/startup/bl_operators/clip.py
index 0c77ea2ab7e..e52d577b900 100644
--- a/release/scripts/startup/bl_operators/clip.py
+++ b/release/scripts/startup/bl_operators/clip.py
@@ -21,7 +21,10 @@ import bpy
import os
from bpy.types import Operator
from bpy.props import FloatProperty
-from mathutils import Vector, Matrix
+from mathutils import (
+ Vector,
+ Matrix,
+)
def CLIP_spaces_walk(context, all_screens, tarea, tspace, callback, *args):
@@ -1071,3 +1074,17 @@ class CLIP_OT_track_settings_to_track(bpy.types.Operator):
setattr(marker_selected, attr, getattr(marker, attr))
return {'FINISHED'}
+
+
+classes = (
+ CLIP_OT_bundles_to_mesh,
+ CLIP_OT_constraint_to_fcurve,
+ CLIP_OT_delete_proxy,
+ CLIP_OT_filter_tracks,
+ CLIP_OT_set_active_clip,
+ CLIP_OT_set_viewport_background,
+ CLIP_OT_setup_tracking_scene,
+ CLIP_OT_track_settings_as_default,
+ CLIP_OT_track_settings_to_track,
+ CLIP_OT_track_to_empty,
+)
diff --git a/release/scripts/startup/bl_operators/console.py b/release/scripts/startup/bl_operators/console.py
index 8cfc977294a..fb36f80239e 100644
--- a/release/scripts/startup/bl_operators/console.py
+++ b/release/scripts/startup/bl_operators/console.py
@@ -159,3 +159,12 @@ class ConsoleLanguage(Operator):
remove_duplicates=True)
return {'FINISHED'}
+
+
+classes = (
+ ConsoleAutocomplete,
+ ConsoleBanner,
+ ConsoleCopyAsScript,
+ ConsoleExec,
+ ConsoleLanguage,
+) \ No newline at end of file
diff --git a/release/scripts/startup/bl_operators/file.py b/release/scripts/startup/bl_operators/file.py
index 51e079164b6..d710b9af715 100644
--- a/release/scripts/startup/bl_operators/file.py
+++ b/release/scripts/startup/bl_operators/file.py
@@ -248,3 +248,8 @@ class WM_OT_previews_batch_clear(Operator):
return {'FINISHED'}
+
+classes = (
+ WM_OT_previews_batch_clear,
+ WM_OT_previews_batch_generate,
+) \ No newline at end of file
diff --git a/release/scripts/startup/bl_operators/freestyle.py b/release/scripts/startup/bl_operators/freestyle.py
index fe3b00d54cd..2e46160aeeb 100644
--- a/release/scripts/startup/bl_operators/freestyle.py
+++ b/release/scripts/startup/bl_operators/freestyle.py
@@ -16,13 +16,15 @@
#
# ##### END GPL LICENSE BLOCK #####
+# <pep8 compliant>
+
import bpy
from bpy.props import (
- BoolProperty,
- EnumProperty,
- StringProperty,
- )
+ BoolProperty,
+ EnumProperty,
+ StringProperty,
+)
class SCENE_OT_freestyle_fill_range_by_selection(bpy.types.Operator):
@@ -218,3 +220,11 @@ class SCENE_OT_freestyle_module_open(bpy.types.Operator):
text = bpy.data.texts.load(self.filepath, self.make_internal)
self.freestyle_module.script = text
return {'FINISHED'}
+
+
+classes = (
+ SCENE_OT_freestyle_add_edge_marks_to_keying_set,
+ SCENE_OT_freestyle_add_face_marks_to_keying_set,
+ SCENE_OT_freestyle_fill_range_by_selection,
+ SCENE_OT_freestyle_module_open,
+)
diff --git a/release/scripts/startup/bl_operators/image.py b/release/scripts/startup/bl_operators/image.py
index d3460383fe7..6a538f0ae33 100644
--- a/release/scripts/startup/bl_operators/image.py
+++ b/release/scripts/startup/bl_operators/image.py
@@ -242,3 +242,11 @@ class ProjectApply(Operator):
bpy.ops.paint.project_image(image=image_name)
return {'FINISHED'}
+
+
+classes = (
+ EditExternally,
+ ProjectApply,
+ ProjectEdit,
+ SaveDirty,
+) \ No newline at end of file
diff --git a/release/scripts/startup/bl_operators/mask.py b/release/scripts/startup/bl_operators/mask.py
index aa984659430..78a4bd9af27 100644
--- a/release/scripts/startup/bl_operators/mask.py
+++ b/release/scripts/startup/bl_operators/mask.py
@@ -31,3 +31,8 @@ class MASK_MT_add(Menu):
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("mask.primitive_circle_add", text="Circle", icon='MESH_CIRCLE')
layout.operator("mask.primitive_square_add", text="Square", icon='MESH_PLANE')
+
+
+classes = (
+ MASK_MT_add,
+) \ No newline at end of file
diff --git a/release/scripts/startup/bl_operators/mesh.py b/release/scripts/startup/bl_operators/mesh.py
index 58eab5436e6..4edefd7bf9b 100644
--- a/release/scripts/startup/bl_operators/mesh.py
+++ b/release/scripts/startup/bl_operators/mesh.py
@@ -21,7 +21,10 @@
import bpy
from bpy.types import Operator
-from bpy.props import EnumProperty, IntProperty
+from bpy.props import (
+ EnumProperty,
+ IntProperty,
+)
class MeshMirrorUV(Operator):
@@ -248,3 +251,10 @@ class MehsSetNormalsFromFaces(Operator):
return {'FINISHED'}
+
+classes = (
+ MehsSetNormalsFromFaces,
+ MeshMirrorUV,
+ MeshSelectNext,
+ MeshSelectPrev,
+)
diff --git a/release/scripts/startup/bl_operators/node.py b/release/scripts/startup/bl_operators/node.py
index acff259e503..40876e2b069 100644
--- a/release/scripts/startup/bl_operators/node.py
+++ b/release/scripts/startup/bl_operators/node.py
@@ -21,16 +21,16 @@
import bpy
import nodeitems_utils
from bpy.types import (
- Operator,
- PropertyGroup,
- )
+ Operator,
+ PropertyGroup,
+)
from bpy.props import (
- BoolProperty,
- CollectionProperty,
- EnumProperty,
- IntProperty,
- StringProperty,
- )
+ BoolProperty,
+ CollectionProperty,
+ EnumProperty,
+ IntProperty,
+ StringProperty,
+)
class NodeSetting(PropertyGroup):
@@ -295,3 +295,14 @@ class NODE_OT_tree_path_parent(Operator):
space.path.pop()
return {'FINISHED'}
+
+
+classes = (
+ NodeSetting,
+
+ NODE_OT_add_and_link_node,
+ NODE_OT_add_node,
+ NODE_OT_add_search,
+ NODE_OT_collapse_hide_unused_toggle,
+ NODE_OT_tree_path_parent,
+)
diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py
index 6356da216b1..3a42d8d2e78 100644
--- a/release/scripts/startup/bl_operators/object.py
+++ b/release/scripts/startup/bl_operators/object.py
@@ -21,12 +21,12 @@
import bpy
from bpy.types import Operator
from bpy.props import (
- StringProperty,
- BoolProperty,
- EnumProperty,
- IntProperty,
- FloatProperty,
- )
+ BoolProperty,
+ EnumProperty,
+ FloatProperty,
+ IntProperty,
+ StringProperty,
+)
class SelectPattern(Operator):
@@ -1034,3 +1034,22 @@ class LodGenerate(Operator):
scene.objects.active = ob
return {'FINISHED'}
+
+
+classes = (
+ ClearAllRestrictRender,
+ DupliOffsetFromCursor,
+ IsolateTypeRender,
+ JoinUVs,
+ LodByName,
+ LodClearAll,
+ LodGenerate,
+ MakeDupliFace,
+ SelectCamera,
+ SelectHierarchy,
+ SelectPattern,
+ ShapeTransfer,
+ SubdivisionSet,
+ TransformsToDeltas,
+ TransformsToDeltasAnim,
+)
diff --git a/release/scripts/startup/bl_operators/object_align.py b/release/scripts/startup/bl_operators/object_align.py
index a6ee16e6b71..1539ffb3545 100644
--- a/release/scripts/startup/bl_operators/object_align.py
+++ b/release/scripts/startup/bl_operators/object_align.py
@@ -26,13 +26,14 @@ from mathutils import Vector
def GlobalBB_LQ(bb_world):
# Initialize the variables with the 8th vertex
- left, right, front, back, down, up = (bb_world[7][0],
- bb_world[7][0],
- bb_world[7][1],
- bb_world[7][1],
- bb_world[7][2],
- bb_world[7][2],
- )
+ left, right, front, back, down, up = (
+ bb_world[7][0],
+ bb_world[7][0],
+ bb_world[7][1],
+ bb_world[7][1],
+ bb_world[7][2],
+ bb_world[7][2],
+ )
# Test against the other 7 verts
for i in range(7):
@@ -398,16 +399,23 @@ class AlignObjects(Operator):
def execute(self, context):
align_axis = self.align_axis
- ret = align_objects(context,
- 'X' in align_axis,
- 'Y' in align_axis,
- 'Z' in align_axis,
- self.align_mode,
- self.relative_to,
- self.bb_quality)
+ ret = align_objects(
+ context,
+ 'X' in align_axis,
+ 'Y' in align_axis,
+ 'Z' in align_axis,
+ self.align_mode,
+ self.relative_to,
+ self.bb_quality,
+ )
if not ret:
self.report({'WARNING'}, "No objects with bound-box selected")
return {'CANCELLED'}
else:
return {'FINISHED'}
+
+
+classes = (
+ AlignObjects,
+)
diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py
index ef10e279bb4..16f29c77bb9 100644
--- a/release/scripts/startup/bl_operators/object_quick_effects.py
+++ b/release/scripts/startup/bl_operators/object_quick_effects.py
@@ -22,12 +22,12 @@ from mathutils import Vector
import bpy
from bpy.types import Operator
from bpy.props import (
- BoolProperty,
- EnumProperty,
- IntProperty,
- FloatProperty,
- FloatVectorProperty,
- )
+ BoolProperty,
+ EnumProperty,
+ IntProperty,
+ FloatProperty,
+ FloatVectorProperty,
+)
def object_ensure_material(obj, mat_name):
@@ -319,7 +319,7 @@ class QuickSmoke(Operator):
def execute(self, context):
if not bpy.app.build_options.mod_smoke:
- self.report({'ERROR'}, "Build without Smoke modifier support")
+ self.report({'ERROR'}, "Built without Smoke modifier support")
return {'CANCELLED'}
fake_context = context.copy()
@@ -568,7 +568,7 @@ class QuickFluid(Operator):
def execute(self, context):
if not bpy.app.build_options.mod_fluid:
- self.report({'ERROR'}, "Build without Fluid modifier support")
+ self.report({'ERROR'}, "Built without Fluid modifier support")
return {'CANCELLED'}
fake_context = context.copy()
@@ -645,3 +645,11 @@ class QuickFluid(Operator):
bpy.ops.fluid.bake('INVOKE_DEFAULT')
return {'FINISHED'}
+
+
+classes = (
+ QuickExplode,
+ QuickFluid,
+ QuickFur,
+ QuickSmoke,
+)
diff --git a/release/scripts/startup/bl_operators/object_randomize_transform.py b/release/scripts/startup/bl_operators/object_randomize_transform.py
index 38110328603..f856b85844e 100644
--- a/release/scripts/startup/bl_operators/object_randomize_transform.py
+++ b/release/scripts/startup/bl_operators/object_randomize_transform.py
@@ -185,3 +185,8 @@ class RandomizeLocRotSize(Operator):
loc, rot, scale, scale_even, scale_min)
return {'FINISHED'}
+
+
+classes = (
+ RandomizeLocRotSize,
+) \ No newline at end of file
diff --git a/release/scripts/startup/bl_operators/presets.py b/release/scripts/startup/bl_operators/presets.py
index e01e509b292..fdacf24f6e0 100644
--- a/release/scripts/startup/bl_operators/presets.py
+++ b/release/scripts/startup/bl_operators/presets.py
@@ -135,7 +135,7 @@ class AddPresetBase:
file_preset.write("%s = %r\n" % (rna_path_step, value))
- file_preset = open(filepath, 'w')
+ file_preset = open(filepath, 'w', encoding="utf-8")
file_preset.write("import bpy\n")
if hasattr(self, "preset_defines"):
@@ -680,3 +680,26 @@ class AddPresetUnitsLength(AddPresetBase, Operator):
]
preset_subdir = "units_length"
+
+
+classes = (
+ AddPresetCamera,
+ AddPresetCloth,
+ AddPresetFluid,
+ AddPresetHairDynamics,
+ AddPresetInteraction,
+ AddPresetInterfaceTheme,
+ AddPresetKeyconfig,
+ AddPresetNodeColor,
+ AddPresetOperator,
+ AddPresetRender,
+ AddPresetSSS,
+ AddPresetSafeAreas,
+ AddPresetSunSky,
+ AddPresetTrackingCamera,
+ AddPresetTrackingSettings,
+ AddPresetTrackingTrackColor,
+ AddPresetUnitsLength,
+ ExecutePreset,
+ WM_MT_operator_presets,
+) \ No newline at end of file
diff --git a/release/scripts/startup/bl_operators/rigidbody.py b/release/scripts/startup/bl_operators/rigidbody.py
index 750a5b0bf0f..6792d525683 100644
--- a/release/scripts/startup/bl_operators/rigidbody.py
+++ b/release/scripts/startup/bl_operators/rigidbody.py
@@ -20,8 +20,10 @@
import bpy
from bpy.types import Operator
-from bpy.props import IntProperty
-from bpy.props import EnumProperty
+from bpy.props import (
+ EnumProperty,
+ IntProperty,
+)
class CopyRigidbodySettings(Operator):
@@ -309,3 +311,10 @@ class ConnectRigidBodies(Operator):
else:
self.report({'WARNING'}, "No other objects selected")
return {'CANCELLED'}
+
+
+classes = (
+ BakeToKeyframes,
+ ConnectRigidBodies,
+ CopyRigidbodySettings,
+)
diff --git a/release/scripts/startup/bl_operators/screen_play_rendered_anim.py b/release/scripts/startup/bl_operators/screen_play_rendered_anim.py
index a5565699364..f4d6c7065a9 100644
--- a/release/scripts/startup/bl_operators/screen_play_rendered_anim.py
+++ b/release/scripts/startup/bl_operators/screen_play_rendered_anim.py
@@ -180,3 +180,8 @@ class PlayRenderedAnim(Operator):
return {'CANCELLED'}
return {'FINISHED'}
+
+
+classes = (
+ PlayRenderedAnim,
+) \ No newline at end of file
diff --git a/release/scripts/startup/bl_operators/sequencer.py b/release/scripts/startup/bl_operators/sequencer.py
index 31ca4249a9d..7209b6b478f 100644
--- a/release/scripts/startup/bl_operators/sequencer.py
+++ b/release/scripts/startup/bl_operators/sequencer.py
@@ -134,3 +134,10 @@ class SequencerDeinterlaceSelectedMovies(Operator):
s.use_deinterlace = True
return {'FINISHED'}
+
+
+classes = (
+ SequencerCrossfadeSounds,
+ SequencerCutMulticam,
+ SequencerDeinterlaceSelectedMovies,
+) \ No newline at end of file
diff --git a/release/scripts/startup/bl_operators/uvcalc_follow_active.py b/release/scripts/startup/bl_operators/uvcalc_follow_active.py
index d1ac9e0b586..25ee5cafe81 100644
--- a/release/scripts/startup/bl_operators/uvcalc_follow_active.py
+++ b/release/scripts/startup/bl_operators/uvcalc_follow_active.py
@@ -248,3 +248,8 @@ class FollowActiveQuads(Operator):
def invoke(self, context, event):
wm = context.window_manager
return wm.invoke_props_dialog(self)
+
+
+classes = (
+ FollowActiveQuads,
+) \ No newline at end of file
diff --git a/release/scripts/startup/bl_operators/uvcalc_lightmap.py b/release/scripts/startup/bl_operators/uvcalc_lightmap.py
index 3b095c883a3..8ee29d15d1b 100644
--- a/release/scripts/startup/bl_operators/uvcalc_lightmap.py
+++ b/release/scripts/startup/bl_operators/uvcalc_lightmap.py
@@ -668,3 +668,8 @@ class LightMapPack(Operator):
def invoke(self, context, event):
wm = context.window_manager
return wm.invoke_props_dialog(self)
+
+
+classes = (
+ LightMapPack,
+) \ No newline at end of file
diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
index 52e7b0e0ae4..5581415c083 100644
--- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py
+++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
@@ -18,7 +18,11 @@
# TODO <pep8 compliant>
-from mathutils import Matrix, Vector, geometry
+from mathutils import (
+ Matrix,
+ Vector,
+ geometry,
+)
import bpy
from bpy.types import Operator
@@ -1100,3 +1104,8 @@ class SmartProject(Operator):
def invoke(self, context, event):
wm = context.window_manager
return wm.invoke_props_dialog(self)
+
+
+classes = (
+ SmartProject,
+)
diff --git a/release/scripts/startup/bl_operators/vertexpaint_dirt.py b/release/scripts/startup/bl_operators/vertexpaint_dirt.py
index 892e1822d68..c006e8e6e92 100644
--- a/release/scripts/startup/bl_operators/vertexpaint_dirt.py
+++ b/release/scripts/startup/bl_operators/vertexpaint_dirt.py
@@ -182,3 +182,8 @@ class VertexPaintDirt(Operator):
ret = applyVertexDirt(mesh, self.blur_iterations, self.blur_strength, self.dirt_angle, self.clean_angle, self.dirt_only)
return ret
+
+
+classes = (
+ VertexPaintDirt,
+) \ No newline at end of file
diff --git a/release/scripts/startup/bl_operators/view3d.py b/release/scripts/startup/bl_operators/view3d.py
index df4a93bb87f..acec2d8fe91 100644
--- a/release/scripts/startup/bl_operators/view3d.py
+++ b/release/scripts/startup/bl_operators/view3d.py
@@ -213,3 +213,11 @@ class VIEW3D_OT_select_or_deselect_all(Operator):
enumerate=self.enumerate,
object=self.object,
location=(x, y))
+
+
+classes = (
+ VIEW3D_OT_edit_mesh_extrude_individual_move,
+ VIEW3D_OT_edit_mesh_extrude_move,
+ VIEW3D_OT_edit_mesh_extrude_shrink_fatten,
+ VIEW3D_OT_select_or_deselect_all,
+) \ No newline at end of file
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index f5460d58d44..d94951341c1 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -21,12 +21,12 @@
import bpy
from bpy.types import Operator
from bpy.props import (
- StringProperty,
- BoolProperty,
- IntProperty,
- FloatProperty,
- EnumProperty,
- )
+ StringProperty,
+ BoolProperty,
+ IntProperty,
+ FloatProperty,
+ EnumProperty,
+)
from bpy.app.translations import pgettext_tip as tip_
@@ -130,6 +130,20 @@ def execute_context_assign(self, context):
return operator_path_undo_return(context, data_path)
+def module_filesystem_remove(path_base, module_name):
+ import os
+ module_name = os.path.splitext(module_name)[0]
+ for f in os.listdir(path_base):
+ f_base = os.path.splitext(f)[0]
+ if f_base == module_name:
+ f_full = os.path.join(path_base, f)
+
+ if os.path.isdir(f_full):
+ os.rmdir(f_full)
+ else:
+ os.remove(f_full)
+
+
class BRUSH_OT_active_index_set(Operator):
"""Set active sculpt/paint brush from it's number"""
bl_idname = "brush.active_index_set"
@@ -907,7 +921,10 @@ def _wm_doc_get_id(doc_id, do_url=True, url_prefix=""):
# an operator (common case - just button referencing an op)
if hasattr(bpy.types, class_name.upper() + "_OT_" + class_prop):
if do_url:
- url = ("%s/bpy.ops.%s.html#bpy.ops.%s.%s" % (url_prefix, class_name, class_name, class_prop))
+ url = (
+ "%s/bpy.ops.%s.html#bpy.ops.%s.%s" %
+ (url_prefix, class_name, class_name, class_prop)
+ )
else:
rna = "bpy.ops.%s.%s" % (class_name, class_prop)
else:
@@ -922,7 +939,10 @@ def _wm_doc_get_id(doc_id, do_url=True, url_prefix=""):
class_name, class_prop = class_name.split("_OT_", 1)
class_name = class_name.lower()
if do_url:
- url = ("%s/bpy.ops.%s.html#bpy.ops.%s.%s" % (url_prefix, class_name, class_name, class_prop))
+ url = (
+ "%s/bpy.ops.%s.html#bpy.ops.%s.%s" %
+ (url_prefix, class_name, class_name, class_prop)
+ )
else:
rna = "bpy.ops.%s.%s" % (class_name, class_prop)
else:
@@ -938,9 +958,12 @@ def _wm_doc_get_id(doc_id, do_url=True, url_prefix=""):
rna_parent = rna_parent.base
if do_url:
- url = ("%s/bpy.types.%s.html#bpy.types.%s.%s" % (url_prefix, class_name, class_name, class_prop))
+ url = (
+ "%s/bpy.types.%s.html#bpy.types.%s.%s" %
+ (url_prefix, class_name, class_name, class_prop)
+ )
else:
- rna = ("bpy.types.%s.%s" % (class_name, class_prop))
+ rna = "bpy.types.%s.%s" % (class_name, class_prop)
else:
# We assume this is custom property, only try to generate generic url/rna_id...
if do_url:
@@ -1008,11 +1031,9 @@ class WM_OT_doc_view(Operator):
doc_id = doc_id
if bpy.app.version_cycle == "release":
- _prefix = ("https://www.blender.org/api/blender_python_api_%s%s_release" %
- ("_".join(str(v) for v in bpy.app.version[:2]), bpy.app.version_char))
+ _prefix = ("https://docs.blender.org/api/blender_python_api_current")
else:
- _prefix = ("https://www.blender.org/api/blender_python_api_%s" %
- "_".join(str(v) for v in bpy.app.version))
+ _prefix = ("https://docs.blender.org/api/blender_python_api_master")
def execute(self, context):
url = _wm_doc_get_id(self.doc_id, do_url=True, url_prefix=self._prefix)
@@ -1089,10 +1110,10 @@ class WM_OT_properties_edit(Operator):
def execute(self, context):
from rna_prop_ui import (
- rna_idprop_ui_prop_get,
- rna_idprop_ui_prop_clear,
- rna_idprop_ui_prop_update,
- )
+ rna_idprop_ui_prop_get,
+ rna_idprop_ui_prop_clear,
+ rna_idprop_ui_prop_update,
+ )
data_path = self.data_path
value = self.value
@@ -1269,9 +1290,9 @@ class WM_OT_properties_add(Operator):
def execute(self, context):
from rna_prop_ui import (
- rna_idprop_ui_prop_get,
- rna_idprop_ui_prop_update,
- )
+ rna_idprop_ui_prop_get,
+ rna_idprop_ui_prop_update,
+ )
data_path = self.data_path
item = eval("context.%s" % data_path)
@@ -1286,10 +1307,10 @@ class WM_OT_properties_add(Operator):
return prop_new
- prop = unique_name(
- {*item.keys(),
- *type(item).bl_rna.properties.keys(),
- })
+ prop = unique_name({
+ *item.keys(),
+ *type(item).bl_rna.properties.keys(),
+ })
item[prop] = 1.0
rna_idprop_ui_prop_update(item, prop)
@@ -1329,9 +1350,9 @@ class WM_OT_properties_remove(Operator):
def execute(self, context):
from rna_prop_ui import (
- rna_idprop_ui_prop_clear,
- rna_idprop_ui_prop_update,
- )
+ rna_idprop_ui_prop_clear,
+ rna_idprop_ui_prop_update,
+ )
data_path = self.data_path
item = eval("context.%s" % data_path)
prop = self.property
@@ -1369,7 +1390,10 @@ class WM_OT_appconfig_default(Operator):
filepath = os.path.join(bpy.utils.preset_paths("interaction")[0], "blender.py")
if os.path.exists(filepath):
- bpy.ops.script.execute_preset(filepath=filepath, menu_idname="USERPREF_MT_interaction_presets")
+ bpy.ops.script.execute_preset(
+ filepath=filepath,
+ menu_idname="USERPREF_MT_interaction_presets",
+ )
return {'FINISHED'}
@@ -1389,7 +1413,10 @@ class WM_OT_appconfig_activate(Operator):
filepath = self.filepath.replace("keyconfig", "interaction")
if os.path.exists(filepath):
- bpy.ops.script.execute_preset(filepath=filepath, menu_idname="USERPREF_MT_interaction_presets")
+ bpy.ops.script.execute_preset(
+ filepath=filepath,
+ menu_idname="USERPREF_MT_interaction_presets",
+ )
return {'FINISHED'}
@@ -1494,7 +1521,7 @@ class WM_OT_blenderplayer_start(Operator):
"-g", "show_profile", "=", "%d" % gs.show_framerate_profile,
"-g", "show_properties", "=", "%d" % gs.show_debug_properties,
"-g", "ignore_deprecation_warnings", "=", "%d" % (not gs.use_deprecation_warnings),
- ])
+ ])
# finish the call with the path to the blend file
args.append(filepath)
@@ -1624,10 +1651,11 @@ class WM_OT_keyconfig_export(Operator):
wm = context.window_manager
- keyconfig_utils.keyconfig_export(wm,
- wm.keyconfigs.active,
- self.filepath,
- )
+ keyconfig_utils.keyconfig_export(
+ wm,
+ wm.keyconfigs.active,
+ self.filepath,
+ )
return {'FINISHED'}
@@ -1892,7 +1920,10 @@ class WM_OT_theme_install(Operator):
try:
shutil.copyfile(xmlfile, path_dest)
- bpy.ops.script.execute_preset(filepath=path_dest, menu_idname="USERPREF_MT_interface_theme_presets")
+ bpy.ops.script.execute_preset(
+ filepath=path_dest,
+ menu_idname="USERPREF_MT_interface_theme_presets",
+ )
except:
traceback.print_exc()
@@ -1919,10 +1950,12 @@ class WM_OT_addon_refresh(Operator):
return {'FINISHED'}
+# Note: shares some logic with WM_OT_app_template_install
+# but not enough to de-duplicate. Fixed here may apply to both.
class WM_OT_addon_install(Operator):
"Install an add-on"
bl_idname = "wm.addon_install"
- bl_label = "Install from File..."
+ bl_label = "Install Add-on from File..."
overwrite = BoolProperty(
name="Overwrite",
@@ -1953,20 +1986,6 @@ class WM_OT_addon_install(Operator):
options={'HIDDEN'},
)
- @staticmethod
- def _module_remove(path_addons, module):
- import os
- module = os.path.splitext(module)[0]
- for f in os.listdir(path_addons):
- f_base = os.path.splitext(f)[0]
- if f_base == module:
- f_full = os.path.join(path_addons, f)
-
- if os.path.isdir(f_full):
- os.rmdir(f_full)
- else:
- os.remove(f_full)
-
def execute(self, context):
import addon_utils
import traceback
@@ -2019,7 +2038,7 @@ class WM_OT_addon_install(Operator):
if self.overwrite:
for f in file_to_extract.namelist():
- WM_OT_addon_install._module_remove(path_addons, f)
+ module_filesystem_remove(path_addons, f)
else:
for f in file_to_extract.namelist():
path_dest = os.path.join(path_addons, os.path.basename(f))
@@ -2037,7 +2056,7 @@ class WM_OT_addon_install(Operator):
path_dest = os.path.join(path_addons, os.path.basename(pyfile))
if self.overwrite:
- WM_OT_addon_install._module_remove(path_addons, os.path.basename(pyfile))
+ module_filesystem_remove(path_addons, os.path.basename(pyfile))
elif os.path.exists(path_dest):
self.report({'WARNING'}, "File already installed to %r\n" % path_dest)
return {'CANCELLED'}
@@ -2072,7 +2091,10 @@ class WM_OT_addon_install(Operator):
bpy.utils.refresh_script_paths()
# print message
- msg = tip_("Modules Installed from %r into %r (%s)") % (pyfile, path_addons, ", ".join(sorted(addons_new)))
+ msg = (
+ tip_("Modules Installed (%s) from %r into %r") %
+ (", ".join(sorted(addons_new)), pyfile, path_addons)
+ )
print(msg)
self.report({'INFO'}, msg)
@@ -2166,6 +2188,7 @@ class WM_OT_addon_expand(Operator):
return {'FINISHED'}
+
class WM_OT_addon_userpref_show(Operator):
"Show add-on user preferences"
bl_idname = "wm.addon_userpref_show"
@@ -2194,3 +2217,160 @@ class WM_OT_addon_userpref_show(Operator):
bpy.ops.screen.userpref_show('INVOKE_DEFAULT')
return {'FINISHED'}
+
+
+# Note: shares some logic with WM_OT_addon_install
+# but not enough to de-duplicate. Fixes here may apply to both.
+class WM_OT_app_template_install(Operator):
+ "Install an application-template"
+ bl_idname = "wm.app_template_install"
+ bl_label = "Install Template from File..."
+
+ overwrite = BoolProperty(
+ name="Overwrite",
+ description="Remove existing template with the same ID",
+ default=True,
+ )
+
+ filepath = StringProperty(
+ subtype='FILE_PATH',
+ )
+ filter_folder = BoolProperty(
+ name="Filter folders",
+ default=True,
+ options={'HIDDEN'},
+ )
+ filter_glob = StringProperty(
+ default="*.zip",
+ options={'HIDDEN'},
+ )
+
+ def execute(self, context):
+ import traceback
+ import zipfile
+ import shutil
+ import os
+
+ filepath = self.filepath
+
+ path_app_templates = bpy.utils.user_resource(
+ 'SCRIPTS', os.path.join("startup", "bl_app_templates_user"),
+ create=True,
+ )
+
+ if not path_app_templates:
+ self.report({'ERROR'}, "Failed to get add-ons path")
+ return {'CANCELLED'}
+
+ if not os.path.isdir(path_app_templates):
+ try:
+ os.makedirs(path_app_templates, exist_ok=True)
+ except:
+ traceback.print_exc()
+
+ app_templates_old = set(os.listdir(path_app_templates))
+
+ # check to see if the file is in compressed format (.zip)
+ if zipfile.is_zipfile(filepath):
+ try:
+ file_to_extract = zipfile.ZipFile(filepath, 'r')
+ except:
+ traceback.print_exc()
+ return {'CANCELLED'}
+
+ if self.overwrite:
+ for f in file_to_extract.namelist():
+ module_filesystem_remove(path_app_templates, f)
+ else:
+ for f in file_to_extract.namelist():
+ path_dest = os.path.join(path_app_templates, os.path.basename(f))
+ if os.path.exists(path_dest):
+ self.report({'WARNING'}, "File already installed to %r\n" % path_dest)
+ return {'CANCELLED'}
+
+ try: # extract the file to "bl_app_templates_user"
+ file_to_extract.extractall(path_app_templates)
+ except:
+ traceback.print_exc()
+ return {'CANCELLED'}
+
+ else:
+ # Only support installing zipfiles
+ self.report({'WARNING'}, "Expected a zip-file %r\n" % filepath)
+ return {'CANCELLED'}
+
+ app_templates_new = set(os.listdir(path_app_templates)) - app_templates_old
+
+ # in case a new module path was created to install this addon.
+ bpy.utils.refresh_script_paths()
+
+ # print message
+ msg = (
+ tip_("Template Installed (%s) from %r into %r") %
+ (", ".join(sorted(app_templates_new)), filepath, path_app_templates)
+ )
+ print(msg)
+ self.report({'INFO'}, msg)
+
+ return {'FINISHED'}
+
+ def invoke(self, context, event):
+ wm = context.window_manager
+ wm.fileselect_add(self)
+ return {'RUNNING_MODAL'}
+
+
+classes = (
+ BRUSH_OT_active_index_set,
+ WM_OT_addon_disable,
+ WM_OT_addon_enable,
+ WM_OT_addon_expand,
+ WM_OT_addon_install,
+ WM_OT_addon_refresh,
+ WM_OT_addon_remove,
+ WM_OT_addon_userpref_show,
+ WM_OT_app_template_install,
+ WM_OT_appconfig_activate,
+ WM_OT_appconfig_default,
+ WM_OT_blenderplayer_start,
+ WM_OT_context_collection_boolean_set,
+ WM_OT_context_cycle_array,
+ WM_OT_context_cycle_enum,
+ WM_OT_context_cycle_int,
+ WM_OT_context_menu_enum,
+ WM_OT_context_modal_mouse,
+ WM_OT_context_pie_enum,
+ WM_OT_context_scale_float,
+ WM_OT_context_scale_int,
+ WM_OT_context_set_boolean,
+ WM_OT_context_set_enum,
+ WM_OT_context_set_float,
+ WM_OT_context_set_id,
+ WM_OT_context_set_int,
+ WM_OT_context_set_string,
+ WM_OT_context_set_value,
+ WM_OT_context_toggle,
+ WM_OT_context_toggle_enum,
+ WM_OT_copy_prev_settings,
+ WM_OT_doc_view,
+ WM_OT_doc_view_manual,
+ WM_OT_keyconfig_activate,
+ WM_OT_keyconfig_export,
+ WM_OT_keyconfig_import,
+ WM_OT_keyconfig_remove,
+ WM_OT_keyconfig_test,
+ WM_OT_keyitem_add,
+ WM_OT_keyitem_remove,
+ WM_OT_keyitem_restore,
+ WM_OT_keymap_restore,
+ WM_OT_operator_cheat_sheet,
+ WM_OT_operator_pie_enum,
+ WM_OT_path_open,
+ WM_OT_properties_add,
+ WM_OT_properties_context_change,
+ WM_OT_properties_edit,
+ WM_OT_properties_remove,
+ WM_OT_sysinfo,
+ WM_OT_theme_install,
+ WM_OT_url_open,
+)
diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py
index 2389be6787d..5b609605cee 100644
--- a/release/scripts/startup/bl_ui/__init__.py
+++ b/release/scripts/startup/bl_ui/__init__.py
@@ -23,8 +23,7 @@
# support reloading sub-modules
if "bpy" in locals():
from importlib import reload
- for val in _modules_loaded:
- reload(val)
+ _modules_loaded[:] = [reload(val) for val in _modules_loaded]
del reload
_modules = [
@@ -94,7 +93,10 @@ del _namespace
def register():
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for mod in _modules_loaded:
+ for cls in mod.classes:
+ register_class(cls)
# space_userprefs.py
from bpy.props import StringProperty, EnumProperty
@@ -143,8 +145,11 @@ def register():
def unregister():
- bpy.utils.unregister_module(__name__)
-
+ from bpy.utils import unregister_class
+ for mod in reversed(_modules_loaded):
+ for cls in reversed(mod.classes):
+ if cls.is_registered:
+ unregister_class(cls)
# Define a default UIList, when a list does not need any custom drawing...
# Keep in sync with its #defined name in UI_interface.h
diff --git a/release/scripts/startup/bl_ui/properties_animviz.py b/release/scripts/startup/bl_ui/properties_animviz.py
index 046b5eb2aa5..84bae18dd6f 100644
--- a/release/scripts/startup/bl_ui/properties_animviz.py
+++ b/release/scripts/startup/bl_ui/properties_animviz.py
@@ -139,6 +139,11 @@ class OnionSkinButtonsPanel:
col.label(text="Display:")
col.prop(arm, "show_only_ghost_selected", text="Selected Only")
+
+classes = (
+)
+
if __name__ == "__main__": # only for live edit.
- import bpy
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py
index cb5f1595ff3..00892d5f85b 100644
--- a/release/scripts/startup/bl_ui/properties_constraint.py
+++ b/release/scripts/startup/bl_ui/properties_constraint.py
@@ -941,5 +941,12 @@ class BONE_PT_constraints(ConstraintButtonsPanel, Panel):
for con in context.pose_bone.constraints:
self.draw_constraint(context, con)
+classes = (
+ OBJECT_PT_constraints,
+ BONE_PT_constraints,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py
index 8261f0c7770..a2ecf984eb5 100644
--- a/release/scripts/startup/bl_ui/properties_data_armature.py
+++ b/release/scripts/startup/bl_ui/properties_data_armature.py
@@ -328,5 +328,21 @@ class DATA_PT_custom_props_arm(ArmatureButtonsPanel, PropertyPanel, Panel):
_context_path = "object.data"
_property_type = bpy.types.Armature
+
+classes = (
+ DATA_PT_context_arm,
+ DATA_PT_skeleton,
+ DATA_PT_display,
+ DATA_PT_bone_group_specials,
+ DATA_PT_bone_groups,
+ DATA_PT_pose_library,
+ DATA_PT_ghost,
+ DATA_PT_iksolver_itasc,
+ DATA_PT_motion_paths,
+ DATA_PT_custom_props_arm,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_data_bone.py b/release/scripts/startup/bl_ui/properties_data_bone.py
index 3a5475514c9..132c355ed99 100644
--- a/release/scripts/startup/bl_ui/properties_data_bone.py
+++ b/release/scripts/startup/bl_ui/properties_data_bone.py
@@ -449,5 +449,20 @@ class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel, Panel):
else:
return "active_bone"
+
+classes = (
+ BONE_PT_context_bone,
+ BONE_PT_transform,
+ BONE_PT_transform_locks,
+ BONE_PT_curved,
+ BONE_PT_relations,
+ BONE_PT_display,
+ BONE_PT_inverse_kinematics,
+ BONE_PT_deform,
+ BONE_PT_custom_props,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py
index c6fa77aec00..101062095c4 100644
--- a/release/scripts/startup/bl_ui/properties_data_camera.py
+++ b/release/scripts/startup/bl_ui/properties_data_camera.py
@@ -325,5 +325,20 @@ def draw_display_safe_settings(layout, safe_data, settings):
col.prop(safe_data, "action_center", slider=True)
+classes = (
+ CAMERA_MT_presets,
+ SAFE_AREAS_MT_presets,
+ DATA_PT_context_camera,
+ DATA_PT_lens,
+ DATA_PT_camera,
+ DATA_PT_camera_stereoscopy,
+ DATA_PT_camera_dof,
+ DATA_PT_camera_display,
+ DATA_PT_camera_safe_areas,
+ DATA_PT_custom_props_camera,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py
index 33af812b6c4..ac1eb9505a6 100644
--- a/release/scripts/startup/bl_ui/properties_data_curve.py
+++ b/release/scripts/startup/bl_ui/properties_data_curve.py
@@ -431,5 +431,21 @@ class DATA_PT_custom_props_curve(CurveButtonsPanel, PropertyPanel, Panel):
_context_path = "object.data"
_property_type = bpy.types.Curve
+
+classes = (
+ DATA_PT_context_curve,
+ DATA_PT_shape_curve,
+ DATA_PT_curve_texture_space,
+ DATA_PT_geometry_curve,
+ DATA_PT_pathanim,
+ DATA_PT_active_spline,
+ DATA_PT_font,
+ DATA_PT_paragraph,
+ DATA_PT_text_boxes,
+ DATA_PT_custom_props_curve,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_data_empty.py b/release/scripts/startup/bl_ui/properties_data_empty.py
index a752d3517de..c66ff87ecbd 100644
--- a/release/scripts/startup/bl_ui/properties_data_empty.py
+++ b/release/scripts/startup/bl_ui/properties_data_empty.py
@@ -55,5 +55,12 @@ class DATA_PT_empty(DataButtonsPanel, Panel):
layout.prop(ob, "empty_draw_size", text="Size")
+
+classes = (
+ DATA_PT_empty,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_data_lamp.py b/release/scripts/startup/bl_ui/properties_data_lamp.py
index 30cd39d2e2f..f913ef51381 100644
--- a/release/scripts/startup/bl_ui/properties_data_lamp.py
+++ b/release/scripts/startup/bl_ui/properties_data_lamp.py
@@ -394,5 +394,21 @@ class DATA_PT_custom_props_lamp(DataButtonsPanel, PropertyPanel, Panel):
_context_path = "object.data"
_property_type = bpy.types.Lamp
+
+classes = (
+ LAMP_MT_sunsky_presets,
+ DATA_PT_context_lamp,
+ DATA_PT_preview,
+ DATA_PT_lamp,
+ DATA_PT_sunsky,
+ DATA_PT_shadow,
+ DATA_PT_area,
+ DATA_PT_spot,
+ DATA_PT_falloff_curve,
+ DATA_PT_custom_props_lamp,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_data_lattice.py b/release/scripts/startup/bl_ui/properties_data_lattice.py
index cbfa6961e8c..4b3fd48c195 100644
--- a/release/scripts/startup/bl_ui/properties_data_lattice.py
+++ b/release/scripts/startup/bl_ui/properties_data_lattice.py
@@ -82,5 +82,14 @@ class DATA_PT_custom_props_lattice(DataButtonsPanel, PropertyPanel, Panel):
_context_path = "object.data"
_property_type = bpy.types.Lattice
+
+classes = (
+ DATA_PT_context_lattice,
+ DATA_PT_lattice,
+ DATA_PT_custom_props_lattice,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py
index 59907692fe0..de55b4152ba 100644
--- a/release/scripts/startup/bl_ui/properties_data_mesh.py
+++ b/release/scripts/startup/bl_ui/properties_data_mesh.py
@@ -392,5 +392,24 @@ class DATA_PT_custom_props_mesh(MeshButtonsPanel, PropertyPanel, Panel):
_property_type = bpy.types.Mesh
+classes = (
+ MESH_MT_vertex_group_specials,
+ MESH_MT_shape_key_specials,
+ MESH_UL_vgroups,
+ MESH_UL_shape_keys,
+ MESH_UL_uvmaps_vcols,
+ DATA_PT_context_mesh,
+ DATA_PT_normals,
+ DATA_PT_texture_space,
+ DATA_PT_vertex_groups,
+ DATA_PT_shape_keys,
+ DATA_PT_uv_texture,
+ DATA_PT_vertex_colors,
+ DATA_PT_customdata,
+ DATA_PT_custom_props_mesh,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_data_metaball.py b/release/scripts/startup/bl_ui/properties_data_metaball.py
index b42258c386a..a621dc7210f 100644
--- a/release/scripts/startup/bl_ui/properties_data_metaball.py
+++ b/release/scripts/startup/bl_ui/properties_data_metaball.py
@@ -135,5 +135,16 @@ class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, Panel):
_context_path = "object.data"
_property_type = bpy.types.MetaBall
+
+classes = (
+ DATA_PT_context_metaball,
+ DATA_PT_metaball,
+ DATA_PT_mball_texture_space,
+ DATA_PT_metaball_element,
+ DATA_PT_custom_props_metaball,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index d66fb08bcd6..a37d61dd0af 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -569,6 +569,14 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col.prop(md, "use_mirror_u", text="U")
col.prop(md, "use_mirror_v", text="V")
+ col = layout.column(align=True)
+
+ if md.use_mirror_u:
+ col.prop(md, "mirror_offset_u")
+
+ if md.use_mirror_v:
+ col.prop(md, "mirror_offset_v")
+
col = layout.column()
if md.use_mirror_merge is True:
@@ -951,6 +959,23 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
def SURFACE(self, layout, ob, md):
layout.label(text="Settings are inside the Physics tab")
+ def SURFACE_DEFORM(self, layout, ob, md):
+ col = layout.column()
+ col.active = not md.is_bound
+
+ col.prop(md, "target")
+ col.prop(md, "falloff")
+
+ layout.separator()
+
+ col = layout.column()
+ col.active = md.target is not None
+
+ if md.is_bound:
+ col.operator("object.surfacedeform_bind", text="Unbind")
+ else:
+ col.operator("object.surfacedeform_bind", text="Bind")
+
def UV_PROJECT(self, layout, ob, md):
split = layout.split()
@@ -1320,7 +1345,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
row.prop(md, "thickness_vertex_group", text="Factor")
col.prop(md, "use_crease", text="Crease Edges")
- col.prop(md, "crease_weight", text="Crease Weight")
+ row = col.row()
+ row.active = md.use_crease
+ row.prop(md, "crease_weight", text="Crease Weight")
col = split.column()
@@ -1503,5 +1530,11 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
layout.operator("object.correctivesmooth_bind", text="Unbind" if is_bind else "Bind")
+classes = (
+ DATA_PT_modifiers,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_data_speaker.py b/release/scripts/startup/bl_ui/properties_data_speaker.py
index 5ed0f8c3265..eecb2690302 100644
--- a/release/scripts/startup/bl_ui/properties_data_speaker.py
+++ b/release/scripts/startup/bl_ui/properties_data_speaker.py
@@ -121,5 +121,16 @@ class DATA_PT_custom_props_speaker(DataButtonsPanel, PropertyPanel, Panel):
_context_path = "object.data"
_property_type = bpy.types.Speaker
+
+classes = (
+ DATA_PT_context_speaker,
+ DATA_PT_speaker,
+ DATA_PT_distance,
+ DATA_PT_cone,
+ DATA_PT_custom_props_speaker,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_freestyle.py b/release/scripts/startup/bl_ui/properties_freestyle.py
index e0620447185..9c5be7624e0 100644
--- a/release/scripts/startup/bl_ui/properties_freestyle.py
+++ b/release/scripts/startup/bl_ui/properties_freestyle.py
@@ -828,5 +828,17 @@ class MATERIAL_PT_freestyle_line(MaterialFreestyleButtonsPanel, Panel):
row.prop(mat, "line_priority", text="Priority")
+classes = (
+ RENDER_PT_freestyle,
+ RENDERLAYER_UL_linesets,
+ RENDER_MT_lineset_specials,
+ RENDERLAYER_PT_freestyle,
+ RENDERLAYER_PT_freestyle_lineset,
+ RENDERLAYER_PT_freestyle_linestyle,
+ MATERIAL_PT_freestyle_line,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py
index ec061370fe5..46b34373aa5 100644
--- a/release/scripts/startup/bl_ui/properties_game.py
+++ b/release/scripts/startup/bl_ui/properties_game.py
@@ -852,5 +852,30 @@ class OBJECT_PT_levels_of_detail(ObjectButtonsPanel, Panel):
row.menu("OBJECT_MT_lod_tools", text="", icon='TRIA_DOWN')
+classes = (
+ PHYSICS_PT_game_physics,
+ PHYSICS_PT_game_collision_bounds,
+ PHYSICS_PT_game_obstacles,
+ RENDER_PT_embedded,
+ RENDER_PT_game_player,
+ RENDER_PT_game_stereo,
+ RENDER_PT_game_shading,
+ RENDER_PT_game_system,
+ RENDER_PT_game_display,
+ SCENE_PT_game_physics,
+ SCENE_PT_game_physics_obstacles,
+ SCENE_PT_game_navmesh,
+ SCENE_PT_game_hysteresis,
+ WORLD_PT_game_context_world,
+ WORLD_PT_game_world,
+ WORLD_PT_game_environment_lighting,
+ WORLD_PT_game_mist,
+ DATA_PT_shadow_game,
+ OBJECT_MT_lod_tools,
+ OBJECT_PT_levels_of_detail,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
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 4529c127839..42e8d5272b3 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -1155,3 +1155,24 @@ class GreasePencilToolsPanel:
layout.separator()
gpencil_stroke_placement_settings(context, layout)
+
+
+classes = (
+ GPENCIL_PIE_tool_palette,
+ GPENCIL_PIE_settings_palette,
+ GPENCIL_PIE_tools_more,
+ GPENCIL_PIE_sculpt,
+ GPENCIL_MT_snap,
+ GPENCIL_MT_gpencil_edit_specials,
+ GPENCIL_UL_brush,
+ GPENCIL_UL_palettecolor,
+ GPENCIL_UL_layer,
+ GPENCIL_MT_layer_specials,
+ GPENCIL_MT_brush_specials,
+ GPENCIL_MT_palettecolor_specials,
+)
+
+if __name__ == "__main__": # only for live edit.
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_mask_common.py b/release/scripts/startup/bl_ui/properties_mask_common.py
index f4836da50bc..a7a67130f2f 100644
--- a/release/scripts/startup/bl_ui/properties_mask_common.py
+++ b/release/scripts/startup/bl_ui/properties_mask_common.py
@@ -392,5 +392,17 @@ class MASK_MT_select(Menu):
layout.operator("mask.select_all", text="Inverse").action = 'INVERT'
layout.operator("mask.select_linked", text="Select Linked")
+
+classes = (
+ MASK_UL_layers,
+ MASK_MT_mask,
+ MASK_MT_visibility,
+ MASK_MT_transform,
+ MASK_MT_animation,
+ MASK_MT_select,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py
index d916007ea41..06ae1847d06 100644
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@ -71,6 +71,7 @@ class MATERIAL_MT_specials(Menu):
class MATERIAL_UL_matslots(UIList):
+
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
# assert(isinstance(item, bpy.types.MaterialSlot)
# ob = data
@@ -1052,5 +1053,38 @@ class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, Panel):
_context_path = "material"
_property_type = bpy.types.Material
+
+classes = (
+ MATERIAL_MT_sss_presets,
+ MATERIAL_MT_specials,
+ MATERIAL_UL_matslots,
+ MATERIAL_PT_context_material,
+ MATERIAL_PT_preview,
+ MATERIAL_PT_pipeline,
+ MATERIAL_PT_diffuse,
+ MATERIAL_PT_specular,
+ MATERIAL_PT_shading,
+ MATERIAL_PT_transp,
+ MATERIAL_PT_mirror,
+ MATERIAL_PT_sss,
+ MATERIAL_PT_halo,
+ MATERIAL_PT_flare,
+ MATERIAL_PT_game_settings,
+ MATERIAL_PT_physics,
+ MATERIAL_PT_strand,
+ MATERIAL_PT_options,
+ MATERIAL_PT_shadow,
+ MATERIAL_PT_transp_game,
+ MATERIAL_PT_volume_density,
+ MATERIAL_PT_volume_shading,
+ MATERIAL_PT_volume_lighting,
+ MATERIAL_PT_volume_transp,
+ MATERIAL_PT_volume_integration,
+ MATERIAL_PT_volume_options,
+ MATERIAL_PT_custom_props,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index 3ff7a248c60..d7e18f81232 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -152,6 +152,33 @@ class OBJECT_PT_relations(ObjectButtonsPanel, Panel):
sub.active = (parent is not None)
+class OBJECT_PT_relations_extras(ObjectButtonsPanel, Panel):
+ bl_label = "Relations Extras"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw(self, context):
+ layout = self.layout
+
+ ob = context.object
+
+ split = layout.split()
+
+ if context.scene.render.engine != 'BLENDER_GAME':
+ col = split.column()
+ col.label(text="Tracking Axes:")
+ col.prop(ob, "track_axis", text="Axis")
+ col.prop(ob, "up_axis", text="Up Axis")
+
+ col = split.column()
+ col.prop(ob, "use_slow_parent")
+ row = col.row()
+ row.active = ((ob.parent is not None) and (ob.use_slow_parent))
+ row.prop(ob, "slow_parent_offset", text="Offset")
+
+ layout.prop(ob, "use_extra_recalc_object")
+ layout.prop(ob, "use_extra_recalc_data")
+
+
class GROUP_MT_specials(Menu):
bl_label = "Group Specials"
@@ -296,33 +323,6 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
layout.prop(ob, "dupli_group", text="Group")
-class OBJECT_PT_relations_extras(ObjectButtonsPanel, Panel):
- bl_label = "Relations Extras"
- bl_options = {'DEFAULT_CLOSED'}
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
-
- split = layout.split()
-
- if context.scene.render.engine != 'BLENDER_GAME':
- col = split.column()
- col.label(text="Tracking Axes:")
- col.prop(ob, "track_axis", text="Axis")
- col.prop(ob, "up_axis", text="Up Axis")
-
- col = split.column()
- col.prop(ob, "use_slow_parent")
- row = col.row()
- row.active = ((ob.parent is not None) and (ob.use_slow_parent))
- row.prop(ob, "slow_parent_offset", text="Offset")
-
- layout.prop(ob, "use_extra_recalc_object")
- layout.prop(ob, "use_extra_recalc_data")
-
-
from bl_ui.properties_animviz import (
MotionPathButtonsPanel,
OnionSkinButtonsPanel,
@@ -366,5 +366,23 @@ class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, Panel):
_context_path = "object"
_property_type = bpy.types.Object
+
+classes = (
+ OBJECT_PT_context_object,
+ OBJECT_PT_transform,
+ OBJECT_PT_delta_transform,
+ OBJECT_PT_transform_locks,
+ OBJECT_PT_relations,
+ OBJECT_PT_relations_extras,
+ GROUP_MT_specials,
+ OBJECT_PT_groups,
+ OBJECT_PT_display,
+ OBJECT_PT_duplication,
+ OBJECT_PT_motion_paths,
+ OBJECT_PT_custom_props,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index 09a3a19cbce..dfd20d90ec4 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -309,3 +309,13 @@ def brush_mask_texture_settings(layout, brush):
split = layout.split()
split.prop(mask_tex_slot, "offset")
split.prop(mask_tex_slot, "scale")
+
+
+classes = (
+ VIEW3D_MT_tools_projectpaint_clone,
+)
+
+if __name__ == "__main__": # only for live edit.
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
index 29fc56c3fad..2c27c68ed9d 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -23,11 +23,11 @@ from rna_prop_ui import PropertyPanel
from bpy.app.translations import pgettext_iface as iface_
from bl_ui.properties_physics_common import (
- point_cache_ui,
- effector_weights_ui,
- basic_force_field_settings_ui,
- basic_force_field_falloff_ui,
- )
+ point_cache_ui,
+ effector_weights_ui,
+ basic_force_field_settings_ui,
+ basic_force_field_falloff_ui,
+)
def particle_panel_enabled(context, psys):
@@ -108,6 +108,7 @@ def find_modifier(ob, psys):
class PARTICLE_UL_particle_systems(bpy.types.UIList):
+
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index, flt_flag):
ob = data
psys = item
@@ -117,8 +118,10 @@ class PARTICLE_UL_particle_systems(bpy.types.UIList):
layout.prop(psys, "name", text="", emboss=False, icon_value=icon)
if md:
- layout.prop(md, "show_render", emboss=False, icon_only=True, icon='RESTRICT_RENDER_OFF' if md.show_render else 'RESTRICT_RENDER_ON')
- layout.prop(md, "show_viewport", emboss=False, icon_only=True, icon='RESTRICT_VIEW_OFF' if md.show_viewport else 'RESTRICT_VIEW_ON')
+ layout.prop(md, "show_render", emboss=False, icon_only=True,
+ icon='RESTRICT_RENDER_OFF' if md.show_render else 'RESTRICT_RENDER_ON')
+ layout.prop(md, "show_viewport", emboss=False, icon_only=True,
+ icon='RESTRICT_VIEW_OFF' if md.show_viewport else 'RESTRICT_VIEW_ON')
elif self.layout_type == 'GRID':
layout.alignment = 'CENTER'
@@ -401,7 +404,8 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
label = "ERROR"
icon = 'ERROR'
box.label(label, icon=icon)
- box.label("Iterations: %d .. %d (avg. %d)" % (result.min_iterations, result.max_iterations, result.avg_iterations))
+ box.label("Iterations: %d .. %d (avg. %d)" %
+ (result.min_iterations, result.max_iterations, result.avg_iterations))
box.label("Error: %.5f .. %.5f (avg. %.5f)" % (result.min_error, result.max_error, result.avg_error))
@@ -423,7 +427,12 @@ class PARTICLE_PT_cache(ParticleButtonsPanel, Panel):
phystype = psys.settings.physics_type
if phystype == 'NO' or phystype == 'KEYED':
return False
- return (psys.settings.type in {'EMITTER', 'REACTOR'} or (psys.settings.type == 'HAIR' and (psys.use_hair_dynamics or psys.point_cache.is_baked))) and engine in cls.COMPAT_ENGINES
+ return (
+ (psys.settings.type in {'EMITTER', 'REACTOR'} or
+ (psys.settings.type == 'HAIR' and
+ (psys.use_hair_dynamics or psys.point_cache.is_baked))) and
+ engine in cls.COMPAT_ENGINES
+ )
def draw(self, context):
psys = context.particle_system
@@ -743,7 +752,8 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
layout.label(text="Fluid interaction:")
row = layout.row()
- row.template_list("UI_UL_list", "particle_targets", psys, "targets", psys, "active_particle_target_index", rows=4)
+ row.template_list("UI_UL_list", "particle_targets", psys, "targets",
+ psys, "active_particle_target_index", rows=4)
col = row.column()
sub = col.row()
@@ -760,7 +770,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
row = layout.row()
if part.physics_type == 'KEYED':
col = row.column()
- #doesn't work yet
+ # doesn't work yet
#col.alert = key.valid
col.prop(key, "object", text="")
col.prop(key, "system", text="System")
@@ -770,7 +780,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
col.prop(key, "duration")
elif part.physics_type == 'BOIDS':
sub = row.row()
- #doesn't work yet
+ # doesn't work yet
#sub.alert = key.valid
sub.prop(key, "object", text="")
sub.prop(key, "system", text="System")
@@ -778,7 +788,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
layout.prop(key, "alliance", expand=True)
elif part.physics_type == 'FLUID':
sub = row.row()
- #doesn't work yet
+ # doesn't work yet
#sub.alert = key.valid
sub.prop(key, "object", text="")
sub.prop(key, "system", text="System")
@@ -831,7 +841,8 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel):
row.label(text="")
row = layout.row()
- row.template_list("UI_UL_list", "particle_boids_rules", state, "rules", state, "active_boid_rule_index", rows=4)
+ row.template_list("UI_UL_list", "particle_boids_rules", state,
+ "rules", state, "active_boid_rule_index", rows=4)
col = row.column()
sub = col.row()
@@ -848,7 +859,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel):
if rule:
row = layout.row()
row.prop(rule, "name", text="")
- #somebody make nice icons for boids here please! -jahka
+ # somebody make nice icons for boids here please! -jahka
row.prop(rule, "use_in_air", icon='TRIA_UP', text="")
row.prop(rule, "use_on_land", icon='TRIA_DOWN', text="")
@@ -1404,5 +1415,29 @@ class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, Panel):
_context_path = "particle_system.settings"
_property_type = bpy.types.ParticleSettings
+
+classes = (
+ PARTICLE_MT_specials,
+ PARTICLE_MT_hair_dynamics_presets,
+ PARTICLE_UL_particle_systems,
+ PARTICLE_PT_context_particles,
+ PARTICLE_PT_emission,
+ PARTICLE_PT_hair_dynamics,
+ PARTICLE_PT_cache,
+ PARTICLE_PT_velocity,
+ PARTICLE_PT_rotation,
+ PARTICLE_PT_physics,
+ PARTICLE_PT_boidbrain,
+ PARTICLE_PT_render,
+ PARTICLE_PT_draw,
+ PARTICLE_PT_children,
+ PARTICLE_PT_field_weights,
+ PARTICLE_PT_force_fields,
+ PARTICLE_PT_vertexgroups,
+ PARTICLE_PT_custom_props,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py
index 3ebf2691b4c..0a7890670b2 100644
--- a/release/scripts/startup/bl_ui/properties_physics_cloth.py
+++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py
@@ -256,5 +256,17 @@ class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, Panel):
cloth = context.cloth.settings
effector_weights_ui(self, context, cloth.effector_weights, 'CLOTH')
+classes = (
+ CLOTH_MT_presets,
+ PHYSICS_PT_cloth,
+ PHYSICS_PT_cloth_cache,
+ PHYSICS_PT_cloth_collision,
+ PHYSICS_PT_cloth_stiffness,
+ PHYSICS_PT_cloth_sewing,
+ PHYSICS_PT_cloth_field_weights,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py
index 277b59d187d..0b98d8738dc 100644
--- a/release/scripts/startup/bl_ui/properties_physics_common.py
+++ b/release/scripts/startup/bl_ui/properties_physics_common.py
@@ -274,6 +274,8 @@ def basic_force_field_settings_ui(self, context, field):
col.prop(field, "use_global_coords", text="Global")
elif field.type == 'HARMONIC':
col.prop(field, "use_multiple_springs")
+ if field.type == 'FORCE':
+ col.prop(field, "use_gravity_falloff", text="Gravitation")
split = layout.split()
@@ -316,5 +318,12 @@ def basic_force_field_falloff_ui(self, context, field):
sub.active = field.use_max_distance
sub.prop(field, "distance_max", text="Maximum")
+
+classes = (
+ PHYSICS_PT_add,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
index 6c3a3246cf6..c813350be08 100644
--- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
+++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
@@ -529,12 +529,20 @@ class PHYSICS_PT_dp_brush_wave(PhysicButtonsPanel, Panel):
row.prop(brush, "wave_clamp")
-def register():
- bpy.utils.register_module(__name__)
-
-
-def unregister():
- bpy.utils.register_module(__name__)
-
-if __name__ == "__main__":
- register()
+classes = (
+ PHYSICS_UL_dynapaint_surfaces,
+ PHYSICS_PT_dynamic_paint,
+ PHYSICS_PT_dp_advanced_canvas,
+ PHYSICS_PT_dp_canvas_output,
+ PHYSICS_PT_dp_canvas_initial_color,
+ PHYSICS_PT_dp_effects,
+ PHYSICS_PT_dp_cache,
+ PHYSICS_PT_dp_brush_source,
+ PHYSICS_PT_dp_brush_velocity,
+ PHYSICS_PT_dp_brush_wave,
+)
+
+if __name__ == "__main__": # only for live edit.
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_physics_field.py b/release/scripts/startup/bl_ui/properties_physics_field.py
index 1cebc0496b0..2b12fcf982d 100644
--- a/release/scripts/startup/bl_ui/properties_physics_field.py
+++ b/release/scripts/startup/bl_ui/properties_physics_field.py
@@ -228,5 +228,13 @@ class PHYSICS_PT_collision(PhysicButtonsPanel, Panel):
col.label(text="Force Fields:")
col.prop(settings, "absorption", text="Absorption")
+
+classes = (
+ PHYSICS_PT_field,
+ PHYSICS_PT_collision,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py
index 5d7034c2e68..ab92370f9ae 100644
--- a/release/scripts/startup/bl_ui/properties_physics_fluid.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py
@@ -308,5 +308,16 @@ class PHYSICS_PT_domain_particles(PhysicButtonsPanel, Panel):
row.prop(fluid, "tracer_particles", text="Tracer")
row.prop(fluid, "generate_particles", text="Generate")
+
+classes = (
+ FLUID_MT_presets,
+ PHYSICS_PT_fluid,
+ PHYSICS_PT_domain_gravity,
+ PHYSICS_PT_domain_boundary,
+ PHYSICS_PT_domain_particles,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
index eeb21c046bf..6afdd800b88 100644
--- a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
+++ b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
@@ -137,5 +137,14 @@ class PHYSICS_PT_rigid_body_dynamics(PHYSICS_PT_rigidbody_panel, Panel):
col.prop(rbo, "linear_damping", text="Translation")
col.prop(rbo, "angular_damping", text="Rotation")
+
+classes = (
+ PHYSICS_PT_rigid_body,
+ PHYSICS_PT_rigid_body_collisions,
+ PHYSICS_PT_rigid_body_dynamics,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
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 9d4f51b256b..84a4cbb4b68 100644
--- a/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py
+++ b/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py
@@ -260,5 +260,11 @@ class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Pa
sub.prop(rbc, "spring_damping_ang_z", text="Damping")
+classes = (
+ PHYSICS_PT_rigid_body_constraint,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py
index ee9135b9dbf..f2e6c1e22e3 100644
--- a/release/scripts/startup/bl_ui/properties_physics_smoke.py
+++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py
@@ -21,9 +21,9 @@ import bpy
from bpy.types import Panel
from bl_ui.properties_physics_common import (
- point_cache_ui,
- effector_weights_ui,
- )
+ point_cache_ui,
+ effector_weights_ui,
+)
class PhysicButtonsPanel:
@@ -380,23 +380,23 @@ class PHYSICS_PT_smoke_display_settings(PhysicButtonsPanel, Panel):
do_axis_slicing = (slice_method == 'AXIS_ALIGNED')
do_full_slicing = (axis_slice_method == 'FULL')
- row = layout.row();
+ row = layout.row()
row.enabled = do_axis_slicing
row.prop(domain, "axis_slice_method")
- col = layout.column();
+ col = layout.column()
col.enabled = not do_full_slicing and do_axis_slicing
col.prop(domain, "slice_axis")
col.prop(domain, "slice_depth")
- row = layout.row();
+ row = layout.row()
row.enabled = do_full_slicing or not do_axis_slicing
row.prop(domain, "slice_per_voxel")
layout.separator()
layout.label(text="Debug:")
layout.prop(domain, "draw_velocity")
- col = layout.column();
+ col = layout.column()
col.enabled = domain.draw_velocity
col.prop(domain, "vector_draw_type")
col.prop(domain, "vector_scale")
@@ -404,11 +404,25 @@ class PHYSICS_PT_smoke_display_settings(PhysicButtonsPanel, Panel):
layout.separator()
layout.label(text="Color Mapping:")
layout.prop(domain, "use_color_ramp")
- col = layout.column();
+ col = layout.column()
col.enabled = domain.use_color_ramp
col.prop(domain, "coba_field")
col.template_color_ramp(domain, "color_ramp", expand=True)
+classes = (
+ PHYSICS_PT_smoke,
+ PHYSICS_PT_smoke_flow_advanced,
+ PHYSICS_PT_smoke_fire,
+ PHYSICS_PT_smoke_adaptive_domain,
+ PHYSICS_PT_smoke_highres,
+ PHYSICS_PT_smoke_groups,
+ PHYSICS_PT_smoke_cache,
+ PHYSICS_PT_smoke_field_weights,
+ PHYSICS_PT_smoke_display_settings,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_physics_softbody.py b/release/scripts/startup/bl_ui/properties_physics_softbody.py
index a458af739f2..5960428e4ae 100644
--- a/release/scripts/startup/bl_ui/properties_physics_softbody.py
+++ b/release/scripts/startup/bl_ui/properties_physics_softbody.py
@@ -244,5 +244,18 @@ class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel, Panel):
effector_weights_ui(self, context, softbody.effector_weights, 'SOFTBODY')
+
+classes = (
+ PHYSICS_PT_softbody,
+ PHYSICS_PT_softbody_cache,
+ PHYSICS_PT_softbody_goal,
+ PHYSICS_PT_softbody_edge,
+ PHYSICS_PT_softbody_collision,
+ PHYSICS_PT_softbody_solver,
+ PHYSICS_PT_softbody_field_weights,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index 6d23c07152e..a7e8d9273ad 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -584,5 +584,24 @@ class RENDER_PT_bake(RenderButtonsPanel, Panel):
sub.prop(rd, "bake_user_scale", text="User Scale")
+classes = (
+ RENDER_MT_presets,
+ RENDER_MT_ffmpeg_presets,
+ RENDER_MT_framerate_presets,
+ RENDER_PT_render,
+ RENDER_PT_dimensions,
+ RENDER_PT_antialiasing,
+ RENDER_PT_motion_blur,
+ RENDER_PT_shading,
+ RENDER_PT_performance,
+ RENDER_PT_post_processing,
+ RENDER_PT_stamp,
+ RENDER_PT_output,
+ RENDER_PT_encoding,
+ RENDER_PT_bake,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_render_layer.py b/release/scripts/startup/bl_ui/properties_render_layer.py
index 9b8bc237db9..084bc387822 100644
--- a/release/scripts/startup/bl_ui/properties_render_layer.py
+++ b/release/scripts/startup/bl_ui/properties_render_layer.py
@@ -227,5 +227,16 @@ class RENDERLAYER_PT_views(RenderLayerButtonsPanel, Panel):
row.prop(rv, "camera_suffix", text="")
+classes = (
+ RENDERLAYER_UL_renderlayers,
+ RENDERLAYER_PT_layers,
+ RENDERLAYER_PT_layer_options,
+ RENDERLAYER_PT_layer_passes,
+ RENDERLAYER_UL_renderviews,
+ RENDERLAYER_PT_views,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py
index d6253ec7fbc..fb93c0b56f2 100644
--- a/release/scripts/startup/bl_ui/properties_scene.py
+++ b/release/scripts/startup/bl_ui/properties_scene.py
@@ -443,5 +443,25 @@ class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, Panel):
_context_path = "scene"
_property_type = bpy.types.Scene
+
+classes = (
+ SCENE_MT_units_length_presets,
+ SCENE_UL_keying_set_paths,
+ SCENE_PT_scene,
+ SCENE_PT_unit,
+ SCENE_PT_keying_sets,
+ SCENE_PT_keying_set_paths,
+ SCENE_PT_color_management,
+ SCENE_PT_audio,
+ SCENE_PT_physics,
+ SCENE_PT_rigid_body_world,
+ SCENE_PT_rigid_body_cache,
+ SCENE_PT_rigid_body_field_weights,
+ SCENE_PT_simplify,
+ SCENE_PT_custom_props,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py
index caf19a9e469..d05527b7ef6 100644
--- a/release/scripts/startup/bl_ui/properties_texture.py
+++ b/release/scripts/startup/bl_ui/properties_texture.py
@@ -21,15 +21,15 @@ import bpy
from bpy.types import Menu, Panel, UIList
from bpy.types import (
- Brush,
- FreestyleLineStyle,
- Lamp,
- Material,
- Object,
- ParticleSettings,
- Texture,
- World,
- )
+ Brush,
+ FreestyleLineStyle,
+ Lamp,
+ Material,
+ Object,
+ ParticleSettings,
+ Texture,
+ World,
+)
from rna_prop_ui import PropertyPanel
@@ -60,6 +60,7 @@ class TEXTURE_MT_envmap_specials(Menu):
class TEXTURE_UL_texslots(UIList):
+
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
# assert(isinstance(item, bpy.types.MaterialTextureSlot)
ma = data
@@ -198,7 +199,8 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, Panel):
if tex_collection:
row = layout.row()
- row.template_list("TEXTURE_UL_texslots", "", idblock, "texture_slots", idblock, "active_texture_index", rows=2)
+ row.template_list("TEXTURE_UL_texslots", "", idblock, "texture_slots",
+ idblock, "active_texture_index", rows=2)
col = row.column(align=True)
col.operator("texture.slot_move", text="", icon='TRIA_UP').type = 'UP'
@@ -1210,12 +1212,22 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
row = layout.row()
sub = row.row()
- sub.active = (tex.use_map_normal or tex.use_map_warp) and not (tex.texture.type == 'IMAGE' and (tex.texture.use_normal_map or tex.texture.use_derivative_map))
+ sub.active = (
+ (tex.use_map_normal or tex.use_map_warp) and
+ not (tex.texture.type == 'IMAGE' and
+ (tex.texture.use_normal_map or tex.texture.use_derivative_map))
+ )
sub.prop(tex, "bump_method", text="Method")
- # the space setting is supported for: derivative-maps + bump-maps (DEFAULT,BEST_QUALITY), not for normal-maps
+ # the space setting is supported for: derivative-maps + bump-maps
+ # (DEFAULT,BEST_QUALITY), not for normal-maps
sub = row.row()
- sub.active = (tex.use_map_normal or tex.use_map_warp) and not (tex.texture.type == 'IMAGE' and tex.texture.use_normal_map) and ((tex.bump_method in {'BUMP_LOW_QUALITY', 'BUMP_MEDIUM_QUALITY', 'BUMP_BEST_QUALITY'}) or (tex.texture.type == 'IMAGE' and tex.texture.use_derivative_map))
+ sub.active = (
+ (tex.use_map_normal or tex.use_map_warp) and
+ not (tex.texture.type == 'IMAGE' and tex.texture.use_normal_map) and
+ ((tex.bump_method in {'BUMP_LOW_QUALITY', 'BUMP_MEDIUM_QUALITY', 'BUMP_BEST_QUALITY'}) or
+ (tex.texture.type == 'IMAGE' and tex.texture.use_derivative_map))
+ )
sub.prop(tex, "bump_objectspace", text="Space")
@@ -1224,5 +1236,38 @@ class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel, Panel):
_context_path = "texture"
_property_type = Texture
+
+classes = (
+ TEXTURE_MT_specials,
+ TEXTURE_MT_envmap_specials,
+ TEXTURE_UL_texslots,
+ TEXTURE_PT_context_texture,
+ TEXTURE_PT_preview,
+ TEXTURE_PT_colors,
+ TEXTURE_PT_clouds,
+ TEXTURE_PT_wood,
+ TEXTURE_PT_marble,
+ TEXTURE_PT_magic,
+ TEXTURE_PT_blend,
+ TEXTURE_PT_stucci,
+ TEXTURE_PT_image,
+ TEXTURE_PT_image_sampling,
+ TEXTURE_PT_image_mapping,
+ TEXTURE_PT_envmap,
+ TEXTURE_PT_envmap_sampling,
+ TEXTURE_PT_musgrave,
+ TEXTURE_PT_voronoi,
+ TEXTURE_PT_distortednoise,
+ TEXTURE_PT_voxeldata,
+ TEXTURE_PT_pointdensity,
+ TEXTURE_PT_pointdensity_turbulence,
+ TEXTURE_PT_ocean,
+ TEXTURE_PT_mapping,
+ TEXTURE_PT_influence,
+ TEXTURE_PT_custom_props,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_world.py b/release/scripts/startup/bl_ui/properties_world.py
index e07349a99ee..6aa39580d34 100644
--- a/release/scripts/startup/bl_ui/properties_world.py
+++ b/release/scripts/startup/bl_ui/properties_world.py
@@ -248,5 +248,20 @@ class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, Panel):
_context_path = "world"
_property_type = bpy.types.World
+
+classes = (
+ WORLD_PT_context_world,
+ WORLD_PT_preview,
+ WORLD_PT_world,
+ WORLD_PT_ambient_occlusion,
+ WORLD_PT_environment_lighting,
+ WORLD_PT_indirect_lighting,
+ WORLD_PT_gather,
+ WORLD_PT_mist,
+ WORLD_PT_custom_props,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index 5cc135392c1..3f05620fcf6 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -1486,5 +1486,69 @@ class CLIP_MT_stabilize_2d_rotation_specials(Menu):
layout.operator("clip.stabilize_2d_rotation_select")
+classes = (
+ CLIP_UL_tracking_objects,
+ CLIP_HT_header,
+ CLIP_MT_track,
+ CLIP_MT_tracking_editor_menus,
+ CLIP_MT_masking_editor_menus,
+ CLIP_PT_track,
+ CLIP_PT_tools_clip,
+ CLIP_PT_tools_marker,
+ CLIP_PT_tracking_settings,
+ CLIP_PT_tools_tracking,
+ CLIP_PT_tools_plane_tracking,
+ CLIP_PT_tools_solve,
+ CLIP_PT_tools_cleanup,
+ CLIP_PT_tools_geometry,
+ CLIP_PT_tools_orientation,
+ CLIP_PT_tools_object,
+ CLIP_PT_objects,
+ CLIP_PT_plane_track,
+ CLIP_PT_track_settings,
+ CLIP_PT_tracking_camera,
+ CLIP_PT_tracking_lens,
+ CLIP_PT_display,
+ CLIP_PT_marker,
+ CLIP_PT_marker_display,
+ CLIP_PT_stabilization,
+ CLIP_PT_proxy,
+ CLIP_PT_mask,
+ CLIP_PT_mask_layers,
+ CLIP_PT_mask_display,
+ CLIP_PT_active_mask_spline,
+ CLIP_PT_active_mask_point,
+ CLIP_PT_tools_mask,
+ CLIP_PT_tools_mask_add,
+ CLIP_PT_tools_mask_transforms,
+ CLIP_PT_footage,
+ CLIP_PT_footage_info,
+ CLIP_PT_tools_scenesetup,
+ CLIP_PT_grease_pencil,
+ CLIP_PT_grease_pencil_palettecolor,
+ CLIP_PT_tools_grease_pencil_draw,
+ CLIP_PT_tools_grease_pencil_edit,
+ CLIP_PT_tools_grease_pencil_sculpt,
+ CLIP_PT_tools_grease_pencil_brush,
+ CLIP_PT_tools_grease_pencil_brushcurves,
+ CLIP_MT_view,
+ CLIP_MT_clip,
+ CLIP_MT_proxy,
+ CLIP_MT_reconstruction,
+ CLIP_MT_track_visibility,
+ CLIP_MT_track_transform,
+ CLIP_MT_select,
+ CLIP_MT_select_grouped,
+ CLIP_MT_tracking_specials,
+ CLIP_MT_camera_presets,
+ CLIP_MT_track_color_presets,
+ CLIP_MT_tracking_settings_presets,
+ CLIP_MT_track_color_specials,
+ CLIP_MT_stabilize_2d_specials,
+ CLIP_MT_stabilize_2d_rotation_specials,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/space_console.py b/release/scripts/startup/bl_ui/space_console.py
index 4266abc5ad7..e6f96d989c7 100644
--- a/release/scripts/startup/bl_ui/space_console.py
+++ b/release/scripts/startup/bl_ui/space_console.py
@@ -102,5 +102,15 @@ def add_scrollback(text, text_type):
bpy.ops.console.scrollback_append(text=l.expandtabs(4),
type=text_type)
+
+classes = (
+ CONSOLE_HT_header,
+ CONSOLE_MT_editor_menus,
+ CONSOLE_MT_console,
+ CONSOLE_MT_language,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index 4d365c8dc08..e02649219dd 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -449,5 +449,21 @@ class DOPESHEET_MT_delete(Menu):
layout.operator("action.clean", text="Clean Channels").channels = True
+classes = (
+ DOPESHEET_HT_header,
+ DOPESHEET_MT_editor_menus,
+ DOPESHEET_MT_view,
+ DOPESHEET_MT_select,
+ DOPESHEET_MT_marker,
+ DOPESHEET_MT_channel,
+ DOPESHEET_MT_key,
+ DOPESHEET_MT_key_transform,
+ DOPESHEET_MT_gpencil_channel,
+ DOPESHEET_MT_gpencil_frame,
+ DOPESHEET_MT_delete,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py
index d7b93dc36f0..bd72dfa9370 100644
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@ -247,5 +247,18 @@ class FILEBROWSER_PT_advanced_filter(Panel):
col.prop(params, "filter_id")
+classes = (
+ FILEBROWSER_HT_header,
+ FILEBROWSER_UL_dir,
+ FILEBROWSER_PT_system_folders,
+ FILEBROWSER_PT_system_bookmarks,
+ FILEBROWSER_MT_bookmarks_specials,
+ FILEBROWSER_PT_bookmarks,
+ FILEBROWSER_PT_recent_folders,
+ FILEBROWSER_PT_advanced_filter,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py
index 446df9e6e79..21b49df61ae 100644
--- a/release/scripts/startup/bl_ui/space_graph.py
+++ b/release/scripts/startup/bl_ui/space_graph.py
@@ -42,10 +42,11 @@ class GRAPH_HT_header(Header):
dopesheet_filter(layout, context)
- layout.prop(st, "use_normalization", text="Normalize")
- row = layout.row()
- row.active = st.use_normalization
- row.prop(st, "use_auto_normalization", text="Auto")
+ row = layout.row(align=True)
+ row.prop(st, "use_normalization", icon='NORMALIZE_FCURVES', text="Normalize", toggle=True)
+ sub = row.row(align=True)
+ sub.active = st.use_normalization
+ sub.prop(st, "use_auto_normalization", icon='FILE_REFRESH', text="", toggle=True)
row = layout.row(align=True)
@@ -298,6 +299,19 @@ class GRAPH_MT_delete(Menu):
layout.operator("graph.clean").channels = False
layout.operator("graph.clean", text="Clean Channels").channels = True
+classes = (
+ GRAPH_HT_header,
+ GRAPH_MT_editor_menus,
+ GRAPH_MT_view,
+ GRAPH_MT_select,
+ GRAPH_MT_marker,
+ GRAPH_MT_channel,
+ GRAPH_MT_key,
+ GRAPH_MT_key_transform,
+ GRAPH_MT_delete,
+)
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index 04b4cef9512..b274657b4f4 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -1242,5 +1242,59 @@ class IMAGE_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Pan
bl_space_type = 'IMAGE_EDITOR'
+classes = (
+ IMAGE_MT_view,
+ IMAGE_MT_select,
+ IMAGE_MT_brush,
+ IMAGE_MT_image,
+ IMAGE_MT_image_invert,
+ IMAGE_MT_uvs,
+ IMAGE_MT_uvs_showhide,
+ IMAGE_MT_uvs_proportional,
+ IMAGE_MT_uvs_transform,
+ IMAGE_MT_uvs_snap,
+ IMAGE_MT_uvs_mirror,
+ IMAGE_MT_uvs_weldalign,
+ IMAGE_MT_uvs_select_mode,
+ IMAGE_HT_header,
+ MASK_MT_editor_menus,
+ IMAGE_PT_mask,
+ IMAGE_PT_mask_layers,
+ IMAGE_PT_mask_display,
+ IMAGE_PT_active_mask_spline,
+ IMAGE_PT_active_mask_point,
+ IMAGE_PT_image_properties,
+ IMAGE_PT_game_properties,
+ IMAGE_PT_view_properties,
+ IMAGE_PT_tools_transform_uvs,
+ IMAGE_PT_paint,
+ IMAGE_PT_tools_brush_overlay,
+ IMAGE_PT_tools_brush_texture,
+ IMAGE_PT_tools_mask,
+ IMAGE_PT_tools_mask_texture,
+ IMAGE_PT_tools_brush_tool,
+ IMAGE_PT_paint_stroke,
+ IMAGE_PT_paint_curve,
+ IMAGE_PT_tools_imagepaint_symmetry,
+ IMAGE_PT_tools_brush_appearance,
+ IMAGE_PT_tools_paint_options,
+ IMAGE_UV_sculpt,
+ IMAGE_UV_sculpt_curve,
+ IMAGE_PT_view_histogram,
+ IMAGE_PT_view_waveform,
+ IMAGE_PT_view_vectorscope,
+ IMAGE_PT_sample_line,
+ IMAGE_PT_scope_sample,
+ IMAGE_PT_grease_pencil,
+ IMAGE_PT_grease_pencil_palettecolor,
+ IMAGE_PT_tools_grease_pencil_draw,
+ IMAGE_PT_tools_grease_pencil_edit,
+ IMAGE_PT_tools_grease_pencil_sculpt,
+ IMAGE_PT_tools_grease_pencil_brush,
+ IMAGE_PT_tools_grease_pencil_brushcurves,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py
index 2a085b8aada..a7b518dfd2e 100644
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@ -127,6 +127,18 @@ class INFO_MT_file(Menu):
layout.operator("wm.save_homefile", icon='SAVE_PREFS')
layout.operator("wm.read_factory_settings", icon='LOAD_FACTORY')
+ if any(bpy.utils.app_template_paths()):
+ app_template = context.user_preferences.app_template
+ if app_template:
+ layout.operator(
+ "wm.read_factory_settings",
+ text="Load Factory Template Settings",
+ icon='LOAD_FACTORY',
+ ).app_template = app_template
+ del app_template
+
+ layout.menu("USERPREF_MT_app_templates", icon='FILE_BLEND')
+
layout.separator()
layout.operator_context = 'INVOKE_AREA'
@@ -340,5 +352,23 @@ class INFO_MT_help(Menu):
layout.operator("wm.splash", icon='BLENDER')
+
+classes = (
+ INFO_HT_header,
+ INFO_MT_editor_menus,
+ INFO_MT_file,
+ INFO_MT_file_import,
+ INFO_MT_file_export,
+ INFO_MT_file_external_data,
+ INFO_MT_file_previews,
+ INFO_MT_game,
+ INFO_MT_render,
+ INFO_MT_opengl_render,
+ INFO_MT_window,
+ INFO_MT_help,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/space_logic.py b/release/scripts/startup/bl_ui/space_logic.py
index 1b316a3eede..b552181f491 100644
--- a/release/scripts/startup/bl_ui/space_logic.py
+++ b/release/scripts/startup/bl_ui/space_logic.py
@@ -130,5 +130,16 @@ class LOGIC_MT_view(Menu):
layout.operator("screen.screen_full_area")
layout.operator("screen.screen_full_area", text="Toggle Fullscreen Area").use_hide_panels = True
+
+classes = (
+ LOGIC_PT_properties,
+ LOGIC_MT_logicbricks_add,
+ LOGIC_HT_header,
+ LOGIC_MT_editor_menus,
+ LOGIC_MT_view,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/space_nla.py b/release/scripts/startup/bl_ui/space_nla.py
index 8fbf9bfc6ac..65d020477dc 100644
--- a/release/scripts/startup/bl_ui/space_nla.py
+++ b/release/scripts/startup/bl_ui/space_nla.py
@@ -209,5 +209,19 @@ class NLA_MT_edit_transform(Menu):
layout.operator("transform.transform", text="Extend").mode = 'TIME_EXTEND'
layout.operator("transform.transform", text="Scale").mode = 'TIME_SCALE'
+
+classes = (
+ NLA_HT_header,
+ NLA_MT_edit,
+ NLA_MT_editor_menus,
+ NLA_MT_view,
+ NLA_MT_select,
+ NLA_MT_marker,
+ NLA_MT_add,
+ NLA_MT_edit_transform,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index 8821fa0ca58..b939d34e154 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -526,6 +526,33 @@ class NODE_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Pane
def node_draw_tree_view(layout, context):
pass
+classes = (
+ NODE_HT_header,
+ NODE_MT_editor_menus,
+ NODE_MT_add,
+ NODE_MT_view,
+ NODE_MT_select,
+ NODE_MT_node,
+ NODE_MT_node_color_presets,
+ NODE_MT_node_color_specials,
+ NODE_PT_active_node_generic,
+ NODE_PT_active_node_color,
+ NODE_PT_active_node_properties,
+ NODE_PT_backdrop,
+ NODE_PT_quality,
+ NODE_UL_interface_sockets,
+ NODE_PT_grease_pencil,
+ NODE_PT_grease_pencil_palettecolor,
+ NODE_PT_grease_pencil_tools,
+ NODE_PT_tools_grease_pencil_draw,
+ NODE_PT_tools_grease_pencil_edit,
+ NODE_PT_tools_grease_pencil_sculpt,
+ NODE_PT_tools_grease_pencil_brush,
+ NODE_PT_tools_grease_pencil_brushcurves,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py
index 6f7c535fe21..4eb550bbb35 100644
--- a/release/scripts/startup/bl_ui/space_outliner.py
+++ b/release/scripts/startup/bl_ui/space_outliner.py
@@ -130,5 +130,16 @@ class OUTLINER_MT_edit_datablocks(Menu):
layout.operator("outliner.drivers_add_selected")
layout.operator("outliner.drivers_delete_selected")
+
+classes = (
+ OUTLINER_HT_header,
+ OUTLINER_MT_editor_menus,
+ OUTLINER_MT_view,
+ OUTLINER_MT_search,
+ OUTLINER_MT_edit_datablocks,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/space_properties.py b/release/scripts/startup/bl_ui/space_properties.py
index f0ca01ec3ba..20cb5719e20 100644
--- a/release/scripts/startup/bl_ui/space_properties.py
+++ b/release/scripts/startup/bl_ui/space_properties.py
@@ -34,13 +34,11 @@ class PROPERTIES_HT_header(Header):
row.prop(view, "context", expand=True, icon_only=True)
-def register():
- bpy.utils.register_module(__name__)
-
-
-def unregister():
- bpy.utils.unregister_module(__name__)
-
-
-if __name__ == "__main__":
- register()
+classes = (
+ PROPERTIES_HT_header,
+)
+
+if __name__ == "__main__": # only for live edit.
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 6bb516cf929..01da3b48f7d 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -652,17 +652,39 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
col.prop(strip, "rotation_start", text="Rotation")
elif strip.type == 'MULTICAM':
- layout.prop(strip, "multicam_source")
-
- row = layout.row(align=True)
- sub = row.row(align=True)
- sub.scale_x = 2.0
-
- sub.operator("screen.animation_play", text="", icon='PAUSE' if context.screen.is_animation_playing else 'PLAY')
+ col = layout.column(align=True)
+ strip_channel = strip.channel
+
+ col.prop(strip, "multicam_source", text="Source Channel")
+
+ # The multicam strip needs at least 2 strips to be useful
+ if strip_channel > 2:
+ BT_ROW = 4
+
+ col.label("Cut To:")
+ row = col.row()
+
+ for i in range(1, strip_channel):
+ if (i % BT_ROW) == 1:
+ row = col.row(align=True)
+
+ # Workaround - .enabled has to have a separate UI block to work
+ if i == strip.multicam_source:
+ sub = row.row(align=True)
+ sub.enabled = False
+ sub.operator("sequencer.cut_multicam", text="%d" % i).camera = i
+ else:
+ sub_1 = row.row(align=True)
+ sub_1.enabled = True
+ sub_1.operator("sequencer.cut_multicam", text="%d" % i).camera = i
+
+ if strip.channel > BT_ROW and (strip_channel - 1) % BT_ROW:
+ for i in range(strip.channel, strip_channel + ((BT_ROW + 1 - strip_channel) % BT_ROW)):
+ row.label("")
+ else:
+ col.separator()
+ col.label(text="Two or more channels are needed below this strip", icon="INFO")
- row.label("Cut To")
- for i in range(1, strip.channel):
- row.operator("sequencer.cut_multicam", text="%d" % i).camera = i
elif strip.type == 'TEXT':
col = layout.column()
@@ -1217,5 +1239,37 @@ class SEQUENCER_PT_custom_props(SequencerButtonsPanel, PropertyPanel, Panel):
bl_category = "Strip"
+classes = (
+ SEQUENCER_HT_header,
+ SEQUENCER_MT_editor_menus,
+ SEQUENCER_MT_view,
+ SEQUENCER_MT_view_toggle,
+ SEQUENCER_MT_select,
+ SEQUENCER_MT_marker,
+ SEQUENCER_MT_change,
+ SEQUENCER_MT_frame,
+ SEQUENCER_MT_add,
+ SEQUENCER_MT_add_effect,
+ SEQUENCER_MT_strip,
+ SEQUENCER_PT_edit,
+ SEQUENCER_PT_effect,
+ SEQUENCER_PT_input,
+ SEQUENCER_PT_sound,
+ SEQUENCER_PT_scene,
+ SEQUENCER_PT_mask,
+ SEQUENCER_PT_filter,
+ SEQUENCER_PT_proxy,
+ SEQUENCER_PT_preview,
+ SEQUENCER_PT_view,
+ SEQUENCER_PT_view_safe_areas,
+ SEQUENCER_PT_modifiers,
+ SEQUENCER_PT_grease_pencil,
+ SEQUENCER_PT_grease_pencil_palettecolor,
+ SEQUENCER_PT_grease_pencil_tools,
+ SEQUENCER_PT_custom_props,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py
index 1fd10575e07..98a7da855ca 100644
--- a/release/scripts/startup/bl_ui/space_text.py
+++ b/release/scripts/startup/bl_ui/space_text.py
@@ -215,20 +215,22 @@ class TEXT_MT_templates_py(Menu):
bl_label = "Python"
def draw(self, context):
- self.path_menu(bpy.utils.script_paths("templates_py"),
- "text.open",
- {"internal": True},
- )
+ self.path_menu(
+ bpy.utils.script_paths("templates_py"),
+ "text.open",
+ props_default={"internal": True},
+ )
class TEXT_MT_templates_osl(Menu):
bl_label = "Open Shading Language"
def draw(self, context):
- self.path_menu(bpy.utils.script_paths("templates_osl"),
- "text.open",
- {"internal": True},
- )
+ self.path_menu(
+ bpy.utils.script_paths("templates_osl"),
+ "text.open",
+ props_default={"internal": True},
+ )
class TEXT_MT_templates(Menu):
@@ -341,5 +343,25 @@ class TEXT_MT_toolbox(Menu):
layout.operator("text.run_script")
+
+classes = (
+ TEXT_HT_header,
+ TEXT_MT_edit,
+ TEXT_MT_editor_menus,
+ TEXT_PT_properties,
+ TEXT_PT_find,
+ TEXT_MT_view,
+ TEXT_MT_text,
+ TEXT_MT_templates,
+ TEXT_MT_templates_py,
+ TEXT_MT_templates_osl,
+ TEXT_MT_edit_select,
+ TEXT_MT_format,
+ TEXT_MT_edit_to3d,
+ TEXT_MT_toolbox,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py
index 508e62e4f56..b9a25cd72a0 100644
--- a/release/scripts/startup/bl_ui/space_time.py
+++ b/release/scripts/startup/bl_ui/space_time.py
@@ -49,7 +49,10 @@ class TIME_HT_header(Header):
row.prop(scene, "frame_preview_start", text="Start")
row.prop(scene, "frame_preview_end", text="End")
- layout.prop(scene, "frame_current", text="")
+ if scene.show_subframe:
+ layout.prop(scene, "frame_float", text="")
+ else:
+ layout.prop(scene, "frame_current", text="")
layout.separator()
@@ -135,6 +138,7 @@ class TIME_MT_view(Menu):
layout.prop(st, "show_frame_indicator")
layout.prop(scene, "show_keys_from_selected_only")
+ layout.prop(scene, "show_subframe")
layout.separator()
@@ -265,5 +269,18 @@ def marker_menu_generic(layout):
layout.prop(ts, "lock_markers")
+classes = (
+ TIME_HT_header,
+ TIME_MT_editor_menus,
+ TIME_MT_marker,
+ TIME_MT_view,
+ TIME_MT_cache,
+ TIME_MT_frame,
+ TIME_MT_playback,
+ TIME_MT_autokey,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 075a6f870fa..e50beba50d8 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -90,6 +90,63 @@ class USERPREF_MT_interaction_presets(Menu):
draw = Menu.draw_preset
+class USERPREF_MT_app_templates(Menu):
+ bl_label = "Application Templates"
+ preset_subdir = "app_templates"
+
+ def draw_ex(self, context, *, use_splash=False, use_default=False, use_install=False):
+ import os
+
+ layout = self.layout
+
+ # now draw the presets
+ layout.operator_context = 'EXEC_DEFAULT'
+
+ if use_default:
+ props = layout.operator("wm.read_homefile", text="Default")
+ props.use_splash = True
+ props.app_template = ""
+ layout.separator()
+
+ template_paths = bpy.utils.app_template_paths()
+
+ # expand template paths
+ app_templates = []
+ for path in template_paths:
+ for d in os.listdir(path):
+ if d.startswith(("__", ".")):
+ continue
+ template = os.path.join(path, d)
+ if os.path.isdir(template):
+ # template_paths_expand.append(template)
+ app_templates.append(d)
+
+ for d in sorted(app_templates):
+ props = layout.operator(
+ "wm.read_homefile",
+ text=bpy.path.display_name(d),
+ )
+ props.use_splash = True
+ props.app_template = d;
+
+ if use_install:
+ layout.separator()
+ layout.operator_context = 'INVOKE_DEFAULT'
+ props = layout.operator("wm.app_template_install")
+
+
+ def draw(self, context):
+ self.draw_ex(context, use_splash=False, use_default=True, use_install=True)
+
+
+class USERPREF_MT_templates_splash(Menu):
+ bl_label = "Startup Templates"
+ preset_subdir = "templates"
+
+ def draw(self, context):
+ USERPREF_MT_app_templates.draw_ex(self, context, use_splash=True, use_default=True)
+
+
class USERPREF_MT_appconfigs(Menu):
bl_label = "AppPresets"
preset_subdir = "keyconfig"
@@ -110,7 +167,17 @@ class USERPREF_MT_splash(Menu):
split = layout.split()
row = split.row()
- row.label("")
+
+ if any(bpy.utils.app_template_paths()):
+ row.label("Template:")
+ template = context.user_preferences.app_template
+ row.menu(
+ "USERPREF_MT_templates_splash",
+ text=bpy.path.display_name(template) if template else "Default",
+ )
+ else:
+ row.label("")
+
row = split.row()
row.label("Interaction:")
@@ -150,6 +217,7 @@ class USERPREF_PT_interface(Panel):
col = row.column()
col.label(text="Display:")
+ col.prop(view, "ui_scale", text="Scale")
col.prop(view, "show_tooltips")
col.prop(view, "show_tooltips_python")
col.prop(view, "show_object_info", text="Object Info")
@@ -400,11 +468,6 @@ class USERPREF_PT_system(Panel):
col = colsplit.column()
col.label(text="General:")
- col.prop(system, "dpi")
- col.label("Virtual Pixel Mode:")
- col.prop(system, "virtual_pixel_mode", text="")
-
- col.separator()
col.prop(system, "frame_server_port")
col.prop(system, "scrollback", text="Console Scrollback")
@@ -453,6 +516,7 @@ class USERPREF_PT_system(Panel):
col.separator()
col.label(text="Selection")
col.prop(system, "select_method", text="")
+ col.prop(system, "use_select_pick_depth")
col.separator()
@@ -1243,7 +1307,7 @@ class USERPREF_MT_addons_online_resources(Menu):
"wm.url_open", text="API Concepts", icon='URL',
).url = bpy.types.WM_OT_doc_view._prefix + "/info_quickstart.html"
layout.operator("wm.url_open", text="Add-on Tutorial", icon='URL',
- ).url = "http://www.blender.org/api/blender_python_api_current/info_tutorial_addon.html"
+ ).url = bpy.types.WM_OT_doc_view._prefix + "/info_tutorial_addon.html"
class USERPREF_PT_addons(Panel):
@@ -1317,11 +1381,18 @@ class USERPREF_PT_addons(Panel):
# set in addon_utils.modules_refresh()
if addon_utils.error_duplicates:
- self.draw_error(col,
- "Multiple addons using the same name found!\n"
- "likely a problem with the script search path.\n"
- "(see console for details)",
- )
+ box = col.box()
+ row = box.row()
+ row.label("Multiple add-ons with the same name found!")
+ row.label(icon='ERROR')
+ box.label("Please delete one of each pair:")
+ for (addon_name, addon_file, addon_path) in addon_utils.error_duplicates:
+ box.separator()
+ sub_col = box.column(align=True)
+ sub_col.label(addon_name + ":")
+ sub_col.label(" " + addon_file)
+ sub_col.label(" " + addon_path)
+
if addon_utils.error_encoding:
self.draw_error(col,
@@ -1473,5 +1544,29 @@ class USERPREF_PT_addons(Panel):
row.label(text=module_name, translate=False)
+classes = (
+ USERPREF_HT_header,
+ USERPREF_PT_tabs,
+ USERPREF_MT_interaction_presets,
+ USERPREF_MT_templates_splash,
+ USERPREF_MT_app_templates,
+ USERPREF_MT_appconfigs,
+ USERPREF_MT_splash,
+ USERPREF_MT_splash_footer,
+ USERPREF_PT_interface,
+ USERPREF_PT_edit,
+ USERPREF_PT_system,
+ USERPREF_MT_interface_theme_presets,
+ USERPREF_PT_theme,
+ USERPREF_PT_file,
+ USERPREF_MT_ndof_settings,
+ USERPREF_MT_keyconfigs,
+ USERPREF_PT_input,
+ USERPREF_MT_addons_online_resources,
+ USERPREF_PT_addons,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 1183d078a8c..f13c7095f67 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -284,7 +284,8 @@ class VIEW3D_MT_transform_object(VIEW3D_MT_transform_base):
layout.separator()
layout.operator_context = 'EXEC_REGION_WIN'
- layout.operator("transform.transform", text="Align to Transform Orientation").mode = 'ALIGN' # XXX see alignmenu() in edit.c of b2.4x to get this working
+ # XXX see alignmenu() in edit.c of b2.4x to get this working
+ layout.operator("transform.transform", text="Align to Transform Orientation").mode = 'ALIGN'
layout.separator()
@@ -1205,6 +1206,16 @@ class INFO_MT_lamp_add(Menu):
layout.operator_enum("object.lamp_add", "type")
+class INFO_MT_camera_add(Menu):
+ bl_idname = "INFO_MT_camera_add"
+ bl_label = "Camera"
+
+ def draw(self, context):
+ layout = self.layout
+ layout.operator_context = 'EXEC_REGION_WIN'
+ layout.operator("object.camera_add", text="Camera", icon='OUTLINER_OB_CAMERA')
+
+
class INFO_MT_add(Menu):
bl_label = "Add"
@@ -1236,7 +1247,11 @@ class INFO_MT_add(Menu):
layout.operator("object.speaker_add", text="Speaker", icon='OUTLINER_OB_SPEAKER')
layout.separator()
- layout.operator("object.camera_add", text="Camera", icon='OUTLINER_OB_CAMERA')
+ if INFO_MT_camera_add.is_extended():
+ layout.menu("INFO_MT_camera_add", icon='OUTLINER_OB_CAMERA')
+ else:
+ INFO_MT_camera_add.draw(self, context)
+
layout.menu("INFO_MT_lamp_add", icon='OUTLINER_OB_LAMP')
layout.separator()
@@ -1533,6 +1548,7 @@ class VIEW3D_MT_object_apply(Menu):
layout.separator()
layout.operator("object.visual_transform_apply", text="Visual Transform", text_ctxt=i18n_contexts.default)
+ layout.operator("object.convert", text="Visual Geometry to Mesh", text_ctxt=i18n_contexts.default).target = 'MESH'
layout.operator("object.duplicates_make_real")
@@ -1744,6 +1760,7 @@ class VIEW3D_MT_brush_paint_modes(Menu):
layout.prop(brush, "use_paint_weight", text="Weight Paint")
layout.prop(brush, "use_paint_image", text="Texture Paint")
+
# ********** Vertex paint menu **********
@@ -1813,6 +1830,7 @@ class VIEW3D_MT_vertex_group(Menu):
layout.operator("object.vertex_group_remove", text="Remove Active Group").all = False
layout.operator("object.vertex_group_remove", text="Remove All Groups").all = True
+
# ********** Weight paint menu **********
@@ -1851,6 +1869,7 @@ class VIEW3D_MT_paint_weight(Menu):
layout.operator("paint.weight_set")
+
# ********** Sculpt menu **********
@@ -2004,6 +2023,7 @@ class VIEW3D_MT_particle_specials(Menu):
class VIEW3D_MT_particle_showhide(ShowHideMenu, Menu):
_operator_name = "particle"
+
# ********** Pose Menu **********
@@ -2277,6 +2297,7 @@ class VIEW3D_MT_bone_options_disable(Menu, BoneOptions):
bl_label = "Disable Bone Options"
type = 'DISABLE'
+
# ********** Edit Menus, suffix from ob.type **********
@@ -2444,6 +2465,7 @@ class VIEW3D_MT_edit_mesh_vertices(Menu):
with_bullet = bpy.app.build_options.bullet
layout.operator("mesh.merge")
+ layout.operator("mesh.remove_doubles")
layout.operator("mesh.rip_move")
layout.operator("mesh.rip_move_fill")
layout.operator("mesh.rip_edge_move")
@@ -2466,7 +2488,6 @@ class VIEW3D_MT_edit_mesh_vertices(Menu):
if with_bullet:
layout.operator("mesh.convex_hull")
layout.operator("mesh.vertices_smooth")
- layout.operator("mesh.remove_doubles")
layout.operator("mesh.blend_from_shape")
@@ -2623,6 +2644,7 @@ class VIEW3D_MT_edit_mesh_clean(Menu):
layout.operator("mesh.face_make_planar")
layout.operator("mesh.vert_connect_nonplanar")
layout.operator("mesh.vert_connect_concave")
+ layout.operator("mesh.remove_doubles")
layout.operator("mesh.fill_holes")
@@ -3780,13 +3802,143 @@ class VIEW3D_PT_context_properties(Panel):
# Draw with no edit button
rna_prop_ui.draw(self.layout, context, member, object, False)
-
-def register():
- bpy.utils.register_module(__name__)
-
-
-def unregister():
- bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
- register()
+classes = (
+ VIEW3D_HT_header,
+ VIEW3D_MT_editor_menus,
+ VIEW3D_MT_transform,
+ VIEW3D_MT_transform_base,
+ VIEW3D_MT_transform_object,
+ VIEW3D_MT_transform_armature,
+ VIEW3D_MT_mirror,
+ VIEW3D_MT_snap,
+ VIEW3D_MT_uv_map,
+ VIEW3D_MT_edit_proportional,
+ VIEW3D_MT_view,
+ VIEW3D_MT_view_navigation,
+ VIEW3D_MT_view_align,
+ VIEW3D_MT_view_align_selected,
+ VIEW3D_MT_view_cameras,
+ VIEW3D_MT_select_object,
+ VIEW3D_MT_select_object_more_less,
+ VIEW3D_MT_select_pose,
+ VIEW3D_MT_select_pose_more_less,
+ VIEW3D_MT_select_particle,
+ VIEW3D_MT_edit_mesh,
+ VIEW3D_MT_edit_mesh_select_similar,
+ VIEW3D_MT_edit_mesh_select_by_trait,
+ VIEW3D_MT_edit_mesh_select_more_less,
+ VIEW3D_MT_select_edit_mesh,
+ VIEW3D_MT_select_edit_curve,
+ VIEW3D_MT_select_edit_surface,
+ VIEW3D_MT_select_edit_text,
+ VIEW3D_MT_select_edit_metaball,
+ VIEW3D_MT_select_edit_lattice,
+ VIEW3D_MT_select_edit_armature,
+ VIEW3D_MT_select_gpencil,
+ VIEW3D_MT_select_paint_mask,
+ VIEW3D_MT_select_paint_mask_vertex,
+ VIEW3D_MT_angle_control,
+ INFO_MT_mesh_add,
+ INFO_MT_curve_add,
+ INFO_MT_surface_add,
+ INFO_MT_metaball_add,
+ INFO_MT_edit_curve_add,
+ INFO_MT_edit_armature_add,
+ INFO_MT_armature_add,
+ INFO_MT_lamp_add,
+ INFO_MT_camera_add,
+ INFO_MT_add,
+ VIEW3D_MT_object,
+ VIEW3D_MT_object_animation,
+ VIEW3D_MT_object_clear,
+ VIEW3D_MT_object_specials,
+ VIEW3D_MT_object_apply,
+ VIEW3D_MT_object_parent,
+ VIEW3D_MT_object_track,
+ VIEW3D_MT_object_group,
+ VIEW3D_MT_object_constraints,
+ VIEW3D_MT_object_quick_effects,
+ VIEW3D_MT_object_showhide,
+ VIEW3D_MT_make_single_user,
+ VIEW3D_MT_make_links,
+ VIEW3D_MT_object_game,
+ VIEW3D_MT_brush,
+ VIEW3D_MT_brush_paint_modes,
+ VIEW3D_MT_paint_vertex,
+ VIEW3D_MT_hook,
+ VIEW3D_MT_vertex_group,
+ VIEW3D_MT_paint_weight,
+ VIEW3D_MT_sculpt,
+ VIEW3D_MT_hide_mask,
+ VIEW3D_MT_particle,
+ VIEW3D_MT_particle_specials,
+ VIEW3D_MT_particle_showhide,
+ VIEW3D_MT_pose,
+ VIEW3D_MT_pose_transform,
+ VIEW3D_MT_pose_slide,
+ VIEW3D_MT_pose_propagate,
+ VIEW3D_MT_pose_library,
+ VIEW3D_MT_pose_motion,
+ VIEW3D_MT_pose_group,
+ VIEW3D_MT_pose_ik,
+ VIEW3D_MT_pose_constraints,
+ VIEW3D_MT_pose_showhide,
+ VIEW3D_MT_pose_apply,
+ VIEW3D_MT_pose_specials,
+ VIEW3D_MT_bone_options_toggle,
+ VIEW3D_MT_bone_options_enable,
+ VIEW3D_MT_bone_options_disable,
+ VIEW3D_MT_edit_mesh_specials,
+ VIEW3D_MT_edit_mesh_select_mode,
+ VIEW3D_MT_edit_mesh_extrude,
+ VIEW3D_MT_edit_mesh_vertices,
+ VIEW3D_MT_edit_mesh_edges,
+ VIEW3D_MT_edit_mesh_faces,
+ VIEW3D_MT_edit_mesh_normals,
+ VIEW3D_MT_edit_mesh_clean,
+ VIEW3D_MT_edit_mesh_delete,
+ VIEW3D_MT_edit_mesh_showhide,
+ VIEW3D_MT_edit_gpencil,
+ VIEW3D_MT_edit_gpencil_delete,
+ VIEW3D_MT_edit_curve,
+ VIEW3D_MT_edit_curve_ctrlpoints,
+ VIEW3D_MT_edit_curve_segments,
+ VIEW3D_MT_edit_curve_specials,
+ VIEW3D_MT_edit_curve_delete,
+ VIEW3D_MT_edit_curve_showhide,
+ VIEW3D_MT_edit_surface,
+ VIEW3D_MT_edit_font,
+ VIEW3D_MT_edit_text_chars,
+ VIEW3D_MT_edit_meta,
+ VIEW3D_MT_edit_meta_showhide,
+ VIEW3D_MT_edit_lattice,
+ VIEW3D_MT_edit_armature,
+ VIEW3D_MT_armature_specials,
+ VIEW3D_MT_edit_armature_parent,
+ VIEW3D_MT_edit_armature_roll,
+ VIEW3D_MT_edit_armature_delete,
+ VIEW3D_MT_edit_gpencil_transform,
+ VIEW3D_MT_edit_gpencil_interpolate,
+ VIEW3D_PT_grease_pencil,
+ VIEW3D_PT_grease_pencil_palettecolor,
+ VIEW3D_PT_view3d_properties,
+ VIEW3D_PT_view3d_cursor,
+ VIEW3D_PT_view3d_name,
+ VIEW3D_PT_view3d_display,
+ VIEW3D_PT_view3d_stereo,
+ VIEW3D_PT_view3d_shading,
+ VIEW3D_PT_view3d_motion_tracking,
+ VIEW3D_PT_view3d_meshdisplay,
+ VIEW3D_PT_view3d_meshstatvis,
+ VIEW3D_PT_view3d_curvedisplay,
+ VIEW3D_PT_background_image,
+ VIEW3D_PT_transform_orientations,
+ VIEW3D_PT_etch_a_ton,
+ VIEW3D_PT_context_properties,
+)
+
+
+if __name__ == "__main__": # only for live edit.
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 60e86d7544d..d58453deaef 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -2008,5 +2008,69 @@ class VIEW3D_PT_tools_history(View3DPanel, Panel):
col.operator("screen.repeat_history", text="History...")
+classes = (
+ VIEW3D_PT_tools_transform,
+ VIEW3D_PT_tools_object,
+ VIEW3D_PT_tools_add_object,
+ VIEW3D_PT_tools_relations,
+ VIEW3D_PT_tools_animation,
+ VIEW3D_PT_tools_rigid_body,
+ VIEW3D_PT_tools_transform_mesh,
+ VIEW3D_PT_tools_meshedit,
+ VIEW3D_PT_tools_meshweight,
+ VIEW3D_PT_tools_add_mesh_edit,
+ VIEW3D_PT_tools_shading,
+ VIEW3D_PT_tools_uvs,
+ VIEW3D_PT_tools_meshedit_options,
+ VIEW3D_PT_tools_transform_curve,
+ VIEW3D_PT_tools_curveedit,
+ VIEW3D_PT_tools_add_curve_edit,
+ VIEW3D_PT_tools_curveedit_options_stroke,
+ VIEW3D_PT_tools_transform_surface,
+ VIEW3D_PT_tools_surfaceedit,
+ VIEW3D_PT_tools_add_surface_edit,
+ VIEW3D_PT_tools_textedit,
+ VIEW3D_PT_tools_armatureedit,
+ VIEW3D_PT_tools_armatureedit_transform,
+ VIEW3D_PT_tools_armatureedit_options,
+ VIEW3D_PT_tools_mballedit,
+ VIEW3D_PT_tools_add_mball_edit,
+ VIEW3D_PT_tools_latticeedit,
+ VIEW3D_PT_tools_posemode,
+ VIEW3D_PT_tools_posemode_options,
+ VIEW3D_PT_imapaint_tools_missing,
+ VIEW3D_PT_tools_brush,
+ TEXTURE_UL_texpaintslots,
+ VIEW3D_MT_tools_projectpaint_uvlayer,
+ VIEW3D_PT_slots_projectpaint,
+ VIEW3D_PT_stencil_projectpaint,
+ VIEW3D_PT_tools_brush_overlay,
+ VIEW3D_PT_tools_brush_texture,
+ VIEW3D_PT_tools_mask_texture,
+ VIEW3D_PT_tools_brush_stroke,
+ VIEW3D_PT_tools_brush_curve,
+ VIEW3D_PT_sculpt_dyntopo,
+ VIEW3D_PT_sculpt_options,
+ VIEW3D_PT_sculpt_symmetry,
+ VIEW3D_PT_tools_brush_appearance,
+ VIEW3D_PT_tools_weightpaint,
+ VIEW3D_PT_tools_weightpaint_options,
+ VIEW3D_PT_tools_vertexpaint,
+ VIEW3D_PT_tools_imagepaint_external,
+ VIEW3D_PT_tools_imagepaint_symmetry,
+ VIEW3D_PT_tools_projectpaint,
+ VIEW3D_MT_tools_projectpaint_stencil,
+ VIEW3D_PT_tools_particlemode,
+ VIEW3D_PT_tools_grease_pencil_draw,
+ VIEW3D_PT_tools_grease_pencil_edit,
+ VIEW3D_PT_tools_grease_pencil_interpolate,
+ VIEW3D_PT_tools_grease_pencil_sculpt,
+ VIEW3D_PT_tools_grease_pencil_brush,
+ VIEW3D_PT_tools_grease_pencil_brushcurves,
+ VIEW3D_PT_tools_history,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --git a/release/scripts/startup/keyingsets_builtins.py b/release/scripts/startup/keyingsets_builtins.py
index 97320e56378..ce0b1b62d44 100644
--- a/release/scripts/startup/keyingsets_builtins.py
+++ b/release/scripts/startup/keyingsets_builtins.py
@@ -643,13 +643,41 @@ class BUILTIN_KSI_DeltaScale(KeyingSetInfo):
###############################
+classes = (
+ BUILTIN_KSI_Available,
+ BUILTIN_KSI_BendyBones,
+ BUILTIN_KSI_DeltaLocation,
+ BUILTIN_KSI_DeltaRotation,
+ BUILTIN_KSI_DeltaScale,
+ BUILTIN_KSI_LocRot,
+ BUILTIN_KSI_LocRotScale,
+ BUILTIN_KSI_LocScale,
+ BUILTIN_KSI_Location,
+ BUILTIN_KSI_RotScale,
+ BUILTIN_KSI_Rotation,
+ BUILTIN_KSI_Scaling,
+ BUILTIN_KSI_VisualLoc,
+ BUILTIN_KSI_VisualLocRot,
+ BUILTIN_KSI_VisualLocRotScale,
+ BUILTIN_KSI_VisualLocScale,
+ BUILTIN_KSI_VisualRot,
+ BUILTIN_KSI_VisualRotScale,
+ BUILTIN_KSI_VisualScaling,
+ BUILTIN_KSI_WholeCharacter,
+ BUILTIN_KSI_WholeCharacterSelected,
+)
+
def register():
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
def unregister():
- bpy.utils.unregister_module(__name__)
+ from bpy.utils import unregister_class
+ for cls in classes:
+ unregister_class(cls)
if __name__ == "__main__":
diff --git a/release/scripts/startup/nodeitems_builtins.py b/release/scripts/startup/nodeitems_builtins.py
index 7c0adb3077a..8fd039f2bf7 100644
--- a/release/scripts/startup/nodeitems_builtins.py
+++ b/release/scripts/startup/nodeitems_builtins.py
@@ -19,7 +19,11 @@
# <pep8 compliant>
import bpy
import nodeitems_utils
-from nodeitems_utils import NodeCategory, NodeItem, NodeItemCustom
+from nodeitems_utils import (
+ NodeCategory,
+ NodeItem,
+ NodeItemCustom,
+)
# Subclasses for standard node types