diff options
author | Darshan Kadu <darsh7807@gmail.com> | 2017-09-10 15:41:40 +0300 |
---|---|---|
committer | Darshan Kadu <darsh7807@gmail.com> | 2017-09-10 15:41:40 +0300 |
commit | 6594fa1ce02809a275c9cd488fa0223d03d73571 (patch) | |
tree | 0bcd95846e1e3b09239126b40ef434ed3dc3a50d /release/scripts | |
parent | f2017083a19e5c83aadc575625dce0642ffce6c5 (diff) |
merged the master branchsoc-2017-vertex_paint
Diffstat (limited to 'release/scripts')
76 files changed, 657 insertions, 422 deletions
diff --git a/release/scripts/freestyle/modules/freestyle/__init__.py b/release/scripts/freestyle/modules/freestyle/__init__.py index d2795f65b6a..6f6b44224d8 100644 --- a/release/scripts/freestyle/modules/freestyle/__init__.py +++ b/release/scripts/freestyle/modules/freestyle/__init__.py @@ -19,17 +19,20 @@ """ This module provides data types of view map components (0D and 1D elements), base classes for defining line stylization rules -(predicates, functions, chaining iterators, and stroke shaders), as -well as helper functions for style module writing. +(predicates, functions, chaining iterators, and stroke shaders), +as well as helper functions for style module writing. Submodules: -* :mod:`freestyle.types` -* :mod:`freestyle.predicates` -* :mod:`freestyle.functions` -* :mod:`freestyle.chainingiterators` -* :mod:`freestyle.shaders` -* :mod:`freestyle.utils` +.. toctree:: + :maxdepth: 1 + + freestyle.types.rst + freestyle.predicates.rst + freestyle.functions.rst + freestyle.chainingiterators.rst + freestyle.shaders.rst + freestyle.utils.rst """ diff --git a/release/scripts/freestyle/styles/apriori_and_causal_density.py b/release/scripts/freestyle/styles/apriori_and_causal_density.py index 2ba768af835..42fc3370488 100644 --- a/release/scripts/freestyle/styles/apriori_and_causal_density.py +++ b/release/scripts/freestyle/styles/apriori_and_causal_density.py @@ -19,8 +19,8 @@ # Filename : apriori_and_causal_density.py # Author : Stephane Grabli # Date : 04/08/2005 -# Purpose : Selects the lines with high a priori density and -# subjects them to the causal density so as to avoid +# Purpose : Selects the lines with high a priori density and +# subjects them to the causal density so as to avoid # cluttering from freestyle.chainingiterators import ChainPredicateIterator diff --git a/release/scripts/freestyle/styles/cartoon.py b/release/scripts/freestyle/styles/cartoon.py index e630127db1a..87518bb832e 100644 --- a/release/scripts/freestyle/styles/cartoon.py +++ b/release/scripts/freestyle/styles/cartoon.py @@ -19,7 +19,7 @@ # Filename : cartoon.py # Author : Stephane Grabli # Date : 04/08/2005 -# Purpose : Draws colored lines. The color is automatically +# Purpose : Draws colored lines. The color is automatically # inferred from each object's material in a cartoon-like # fashion. diff --git a/release/scripts/freestyle/styles/external_contour_sketchy.py b/release/scripts/freestyle/styles/external_contour_sketchy.py index 44dbda4709f..6bccf23ac8d 100644 --- a/release/scripts/freestyle/styles/external_contour_sketchy.py +++ b/release/scripts/freestyle/styles/external_contour_sketchy.py @@ -19,8 +19,8 @@ # Filename : external_contour_sketchy.py # Author : Stephane Grabli # Date : 04/08/2005 -# Purpose : Draws the external contour of the scene using a sketchy -# chaining iterator (in particular each ViewEdge can be drawn +# Purpose : Draws the external contour of the scene using a sketchy +# chaining iterator (in particular each ViewEdge can be drawn # several times from freestyle.chainingiterators import pySketchyChainingIterator @@ -41,7 +41,7 @@ from freestyle.shaders import ( from freestyle.types import Operators -upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D()) +upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D()) Operators.select(upred) Operators.bidirectional_chain(pySketchyChainingIterator(), NotUP1D(upred)) shaders_list = [ diff --git a/release/scripts/freestyle/styles/haloing.py b/release/scripts/freestyle/styles/haloing.py index 6cd37779a42..34e4f65cf91 100644 --- a/release/scripts/freestyle/styles/haloing.py +++ b/release/scripts/freestyle/styles/haloing.py @@ -19,8 +19,8 @@ # Filename : haloing.py # Author : Stephane Grabli # Date : 04/08/2005 -# Purpose : This style module selects the lines that -# are connected (in the image) to a specific +# Purpose : This style module selects the lines that +# are connected (in the image) to a specific # object and trims them in order to produce # a haloing effect around the target shape @@ -42,14 +42,14 @@ from freestyle.shaders import ( from freestyle.types import Id, Operators -# id corresponds to the id of the target object +# id corresponds to the id of the target object # (accessed by SHIFT+click) id = Id(3,0) upred = AndUP1D(QuantitativeInvisibilityUP1D(0), pyIsOccludedByUP1D(id)) Operators.select(upred) Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(upred)) shaders_list = [ - IncreasingThicknessShader(3, 5), + IncreasingThicknessShader(3, 5), IncreasingColorShader(1,0,0, 1,0,1,0,1), SamplingShader(1.0), pyTVertexRemoverShader(), diff --git a/release/scripts/freestyle/styles/invisible_lines.py b/release/scripts/freestyle/styles/invisible_lines.py index 461429b6437..5506f4ef11f 100644 --- a/release/scripts/freestyle/styles/invisible_lines.py +++ b/release/scripts/freestyle/styles/invisible_lines.py @@ -19,7 +19,7 @@ # Filename : invisible_lines.py # Author : Stephane Grabli # Date : 04/08/2005 -# Purpose : Draws all lines whose Quantitative Invisibility +# Purpose : Draws all lines whose Quantitative Invisibility # is different from 0 from freestyle.chainingiterators import ChainSilhouetteIterator diff --git a/release/scripts/freestyle/styles/long_anisotropically_dense.py b/release/scripts/freestyle/styles/long_anisotropically_dense.py index 50bec4f1a79..bfd5910cefe 100644 --- a/release/scripts/freestyle/styles/long_anisotropically_dense.py +++ b/release/scripts/freestyle/styles/long_anisotropically_dense.py @@ -19,13 +19,13 @@ # Filename : long_anisotropically_dense.py # Author : Stephane Grabli # Date : 04/08/2005 -# Purpose : Selects the lines that are long and have a high anisotropic -# a priori density and uses causal density +# Purpose : Selects the lines that are long and have a high anisotropic +# a priori density and uses causal density # to draw without cluttering. Ideally, half of the # selected lines are culled using the causal density. # # ********************* WARNING ************************************* -# ******** The Directional a priori density maps must ****** +# ******** The Directional a priori density maps must ****** # ******** have been computed prior to using this style module ****** from freestyle.chainingiterators import ChainSilhouetteIterator @@ -75,7 +75,7 @@ Operators.sort(pyLengthBP1D()) shaders_list = [ SamplingShader(2.0), ConstantThicknessShader(2), - ConstantColorShader(0.2,0.2,0.25,1), + ConstantColorShader(0.2,0.2,0.25,1), ] ## uniform culling Operators.create(pyDensityUP1D(3.0,2.0e-2, IntegrationType.MEAN, 0.1), shaders_list) diff --git a/release/scripts/freestyle/styles/multiple_parameterization.py b/release/scripts/freestyle/styles/multiple_parameterization.py index 0e224c74bbf..c03a61c9a81 100644 --- a/release/scripts/freestyle/styles/multiple_parameterization.py +++ b/release/scripts/freestyle/styles/multiple_parameterization.py @@ -19,7 +19,7 @@ # Filename : multiple_parameterization.py # Author : Stephane Grabli # Date : 04/08/2005 -# Purpose : The thickness and the color of the strokes vary continuously +# Purpose : The thickness and the color of the strokes vary continuously # independently from occlusions although only # visible lines are actually drawn. This is equivalent # to assigning the thickness using a parameterization covering diff --git a/release/scripts/freestyle/styles/nature.py b/release/scripts/freestyle/styles/nature.py index 74a42e6b2e5..1061f22017a 100644 --- a/release/scripts/freestyle/styles/nature.py +++ b/release/scripts/freestyle/styles/nature.py @@ -22,7 +22,7 @@ # Purpose : Uses the NatureUP1D predicate to select the lines # of a given type (among Nature.SILHOUETTE, Nature.CREASE, Nature.SUGGESTIVE_CONTOURS, # Nature.BORDERS). -# The suggestive contours must have been enabled in the +# The suggestive contours must have been enabled in the # options dialog to appear in the View Map. from freestyle.chainingiterators import ChainSilhouetteIterator diff --git a/release/scripts/freestyle/styles/near_lines.py b/release/scripts/freestyle/styles/near_lines.py index 5e260a22382..14c8d2f9e01 100644 --- a/release/scripts/freestyle/styles/near_lines.py +++ b/release/scripts/freestyle/styles/near_lines.py @@ -19,7 +19,7 @@ # Filename : near_lines.py # Author : Stephane Grabli # Date : 04/08/2005 -# Purpose : Draws the lines that are "closer" than a threshold +# Purpose : Draws the lines that are "closer" than a threshold # (between 0 and 1) from freestyle.chainingiterators import ChainSilhouetteIterator diff --git a/release/scripts/freestyle/styles/qi1.py b/release/scripts/freestyle/styles/qi1.py index d70e56d401a..4d87055eafb 100644 --- a/release/scripts/freestyle/styles/qi1.py +++ b/release/scripts/freestyle/styles/qi1.py @@ -20,7 +20,7 @@ # Author : Stephane Grabli # Date : 04/08/2005 # Purpose : Draws lines hidden by one surface. -# *** Quantitative Invisibility must have been +# *** Quantitative Invisibility must have been # enabled in the options dialog to use this style module **** from freestyle.chainingiterators import ChainSilhouetteIterator diff --git a/release/scripts/freestyle/styles/qi2.py b/release/scripts/freestyle/styles/qi2.py index 6ac933ecc05..937b5db590a 100644 --- a/release/scripts/freestyle/styles/qi2.py +++ b/release/scripts/freestyle/styles/qi2.py @@ -20,7 +20,7 @@ # Author : Stephane Grabli # Date : 04/08/2005 # Purpose : Draws lines hidden by two surfaces. -# *** Quantitative Invisibility must have been +# *** Quantitative Invisibility must have been # enabled in the options dialog to use this style module **** from freestyle.chainingiterators import ChainSilhouetteIterator diff --git a/release/scripts/freestyle/styles/sequentialsplit_sketchy.py b/release/scripts/freestyle/styles/sequentialsplit_sketchy.py index b980fdc87d7..5755fd3b845 100644 --- a/release/scripts/freestyle/styles/sequentialsplit_sketchy.py +++ b/release/scripts/freestyle/styles/sequentialsplit_sketchy.py @@ -21,7 +21,7 @@ # Date : 04/08/2005 # Purpose : Use the sequential split with two different # predicates to specify respectively the starting and -# the stopping extremities for strokes +# the stopping extremities for strokes from freestyle.chainingiterators import ChainSilhouetteIterator from freestyle.predicates import ( diff --git a/release/scripts/freestyle/styles/sketchy_multiple_parameterization.py b/release/scripts/freestyle/styles/sketchy_multiple_parameterization.py index a3ce6112165..8302ec8e4c3 100644 --- a/release/scripts/freestyle/styles/sketchy_multiple_parameterization.py +++ b/release/scripts/freestyle/styles/sketchy_multiple_parameterization.py @@ -19,7 +19,7 @@ # Filename : sketchy_multiple_parameterization.py # Author : Stephane Grabli # Date : 04/08/2005 -# Purpose : Builds sketchy strokes whose topology relies on a +# Purpose : Builds sketchy strokes whose topology relies on a # parameterization that covers the complete lines (visible+invisible) # whereas only the visible portions are actually drawn diff --git a/release/scripts/freestyle/styles/uniformpruning_zsort.py b/release/scripts/freestyle/styles/uniformpruning_zsort.py index 814e140ee49..64e808d9f8a 100644 --- a/release/scripts/freestyle/styles/uniformpruning_zsort.py +++ b/release/scripts/freestyle/styles/uniformpruning_zsort.py @@ -17,7 +17,7 @@ # ##### END GPL LICENSE BLOCK ##### # Filename : uniformpruning_zsort.py -# Authors : Fredo Durand, Stephane Grabli, Francois Sillion, Emmanuel Turquin +# Authors : Fredo Durand, Stephane Grabli, Francois Sillion, Emmanuel Turquin # Date : 08/04/2005 from freestyle.chainingiterators import ChainSilhouetteIterator diff --git a/release/scripts/modules/bl_i18n_utils/settings.py b/release/scripts/modules/bl_i18n_utils/settings.py index 07fc9f0c338..774ca5173d5 100644 --- a/release/scripts/modules/bl_i18n_utils/settings.py +++ b/release/scripts/modules/bl_i18n_utils/settings.py @@ -118,7 +118,7 @@ MSG_COMMENT_PREFIX = "#~ " MSG_CONTEXT_PREFIX = "MSGCTXT:" # The default comment prefix used in po's. -PO_COMMENT_PREFIX= "# " +PO_COMMENT_PREFIX = "# " # The comment prefix used to mark sources of msgids, in po's. PO_COMMENT_PREFIX_SOURCE = "#: " @@ -130,7 +130,7 @@ PO_COMMENT_PREFIX_SOURCE_CUSTOM = "#. :src: " PO_COMMENT_PREFIX_GENERATED = "#. " # The comment prefix used to comment entries in po's. -PO_COMMENT_PREFIX_MSG= "#~ " +PO_COMMENT_PREFIX_MSG = "#~ " # The comment prefix used to mark fuzzy msgids, in po's. PO_COMMENT_FUZZY = "#, fuzzy" diff --git a/release/scripts/modules/bl_i18n_utils/utils_spell_check.py b/release/scripts/modules/bl_i18n_utils/utils_spell_check.py index 285e2ebe477..b33588c903b 100644 --- a/release/scripts/modules/bl_i18n_utils/utils_spell_check.py +++ b/release/scripts/modules/bl_i18n_utils/utils_spell_check.py @@ -128,7 +128,7 @@ class SpellChecker: "multisampling", "multiscatter", "multitexture", - "multithreaded", + "multithreaded", "multiuser", "multiview", "namespace", diff --git a/release/scripts/modules/bpy/utils/__init__.py b/release/scripts/modules/bpy/utils/__init__.py index 1d555ae7123..185a0e73279 100644 --- a/release/scripts/modules/bpy/utils/__init__.py +++ b/release/scripts/modules/bpy/utils/__init__.py @@ -37,6 +37,8 @@ __all__ = ( "register_module", "register_manual_map", "unregister_manual_map", + "register_classes_factory", + "register_submodule_factory", "make_rna_paths", "manual_map", "previews", @@ -71,6 +73,7 @@ import addon_utils as _addon_utils _user_preferences = _bpy.context.user_preferences _script_module_dirs = "startup", "modules" +_is_factory_startup = _bpy.app.factory_startup def _test_import(module_name, loaded_modules): @@ -144,6 +147,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False): :type refresh_scripts: bool """ use_time = use_class_register_check = _bpy.app.debug_python + use_user = not _is_factory_startup if use_time: import time @@ -234,7 +238,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False): from bpy_restrict_state import RestrictBlend with RestrictBlend(): - for base_path in script_paths(): + for base_path in script_paths(use_user=use_user): for path_subdir in _script_module_dirs: path = _os.path.join(base_path, path_subdir) if _os.path.isdir(path): @@ -306,7 +310,7 @@ def script_path_pref(): return _os.path.normpath(path) if path else None -def script_paths(subdir=None, user_pref=True, check_all=False): +def script_paths(subdir=None, user_pref=True, check_all=False, use_user=True): """ Returns a list of valid script paths. @@ -328,15 +332,30 @@ def script_paths(subdir=None, user_pref=True, check_all=False): # so the 'BLENDER_SYSTEM_SCRIPTS' environment variable will be used. base_paths = _bpy_script_paths() + # Defined to be (system, user) so we can skip the second if needed. + if not use_user: + base_paths = base_paths[:1] + if check_all: # All possible paths, no duplicates, keep order. + if use_user: + test_paths = ('LOCAL', 'USER', 'SYSTEM') + else: + test_paths = ('LOCAL', 'SYSTEM') + base_paths = ( - *(path for path in (_os.path.join(resource_path(res), "scripts") - for res in ('LOCAL', 'USER', 'SYSTEM')) if path not in base_paths), + *(path for path in ( + _os.path.join(resource_path(res), "scripts") + for res in test_paths) if path not in base_paths), *base_paths, - ) + ) - for path in (*base_paths, script_path_user(), script_path_pref()): + if use_user: + test_paths = (*base_paths, script_path_user(), script_path_pref()) + else: + test_paths = (*base_paths, script_path_pref()) + + for path in test_paths: if path: path = _os.path.normpath(path) if path not in scripts and _os.path.isdir(path): @@ -684,6 +703,65 @@ def unregister_module(module, verbose=False): print("done.\n") +def register_classes_factory(classes): + """ + Utility function to create register and unregister functions + which simply registers and unregisters a sequence of classes. + """ + def register(): + from bpy.utils import register_class + for cls in classes: + register_class(cls) + + def unregister(): + from bpy.utils import unregister_class + for cls in reversed(classes): + unregister_class(cls) + + return register, unregister + + +def register_submodule_factory(module_name, submodule_names): + """ + Utility function to create register and unregister functions + which simply load submodules, + calling their register & unregister functions. + + .. note:: + + Modules are registered in the order given, + unregistered in reverse order. + + :arg module_name: The module name, typically ``__name__``. + :type module_name: string + :arg submodule_names: List of submodule names to load and unload. + :type submodule_names: list of strings + :return: register and unregister functions. + :rtype: tuple pair of functions + """ + + module = None + submodules = [] + + def register(): + nonlocal module + module = __import__(name=module_name, fromlist=submodule_names) + submodules[:] = [getattr(module, name) for name in submodule_names] + for mod in submodules: + mod.register() + + def unregister(): + from sys import modules + for mod in reversed(submodules): + mod.unregister() + name = mod.__name__ + delattr(module, name.partition(".")[2]) + del modules[name] + submodules.clear() + + return register, unregister + + # ----------------------------------------------------------------------------- # Manual lookups, each function has to return a basepath and a sequence # of... diff --git a/release/scripts/modules/bpy_extras/anim_utils.py b/release/scripts/modules/bpy_extras/anim_utils.py index 5e21260e5e4..f2df1bc16b3 100644 --- a/release/scripts/modules/bpy_extras/anim_utils.py +++ b/release/scripts/modules/bpy_extras/anim_utils.py @@ -20,35 +20,118 @@ __all__ = ( "bake_action", - ) + "bake_action_objects", + + "bake_action_iter", + "bake_action_objects_iter", +) import bpy -# XXX visual keying is actually always considered as True in this code... -def bake_action(frame_start, - frame_end, - frame_step=1, - only_selected=False, - do_pose=True, - do_object=True, - do_visual_keying=True, - do_constraint_clear=False, - do_parents_clear=False, - do_clean=False, - action=None, - ): +def bake_action( + obj, + *, + action, frames, + **kwargs, +): + """ + :arg obj: Object to bake. + :type obj: :class:`bpy.types.Object` + :arg action: An action to bake the data into, or None for a new action + to be created. + :type action: :class:`bpy.types.Action` or None + :arg frames: Frames to bake. + :type frames: iterable of int + :return: an action or None + :rtype: :class:`bpy.types.Action` """ - Return an image from the file path with options to search multiple paths - and return a placeholder if its not found. - - :arg frame_start: First frame to bake. - :type frame_start: int - :arg frame_end: Last frame to bake. - :type frame_end: int - :arg frame_step: Frame step. - :type frame_step: int + if not (do_pose or do_object): + return None + + action, = bake_action_objects( + [(obj, action)], + frames, + **kwargs, + ) + return action + + +def bake_action_objects( + object_action_pairs, + *, + frames, + **kwargs, +): + """ + A version of :func:`bake_action_objects_iter` that takes frames and returns the output. + + :arg frames: Frames to bake. + :type frames: iterable of int + + :return: A sequence of Action or None types (aligned with `object_action_pairs`) + :rtype: sequence of :class:`bpy.types.Action` + """ + iter = bake_action_objects_iter(object_action_pairs, **kwargs) + iter.send(None) + for frame in frames: + iter.send(frame) + return iter.send(None) + + +def bake_action_objects_iter( + object_action_pairs, + **kwargs, +): + """ + An coroutine that bakes actions for multiple objects. + + :arg object_action_pairs: Sequence of object action tuples, + action is the destination for the baked data. When None a new action will be created. + :type object_action_pairs: Sequence of (:class:`bpy.types.Object`, :class:`bpy.types.Action`) + """ + scene = bpy.context.scene + frame_back = scene.frame_current + iter_all = tuple( + bake_action_iter(obj, action=action, **kwargs) + for (obj, action) in object_action_pairs + ) + for iter in iter_all: + iter.send(None) + while True: + frame = yield None + if frame is None: + break + scene.frame_set(frame) + scene.update() + for iter in iter_all: + iter.send(frame) + scene.frame_set(frame_back) + yield tuple(iter.send(None) for iter in iter_all) + + +# XXX visual keying is actually always considered as True in this code... +def bake_action_iter( + obj, + *, + action, + only_selected=False, + do_pose=True, + do_object=True, + do_visual_keying=True, + do_constraint_clear=False, + do_parents_clear=False, + do_clean=False, +): + """ + An coroutine that bakes action for a single object. + + :arg obj: Object to bake. + :type obj: :class:`bpy.types.Object` + :arg action: An action to bake the data into, or None for a new action + to be created. + :type action: :class:`bpy.types.Action` or None :arg only_selected: Only bake selected bones. :type only_selected: bool :arg do_pose: Bake pose channels. @@ -63,14 +146,10 @@ def bake_action(frame_start, :type do_parents_clear: bool :arg do_clean: Remove redundant keyframes after baking. :type do_clean: bool - :arg action: An action to bake the data into, or None for a new action - to be created. - :type action: :class:`bpy.types.Action` or None :return: an action or None :rtype: :class:`bpy.types.Action` """ - # ------------------------------------------------------------------------- # Helper Functions and vars @@ -112,34 +191,32 @@ def bake_action(frame_start, # ------------------------------------------------------------------------- # Setup the Context - # TODO, pass data rather then grabbing from the context! - scene = bpy.context.scene - obj = bpy.context.object - frame_back = scene.frame_current - if obj.pose is None: do_pose = False if not (do_pose or do_object): - return None + raise Exception("Pose and object baking is disabled, no action needed") pose_info = [] obj_info = [] options = {'INSERTKEY_NEEDED'} - frame_range = range(frame_start, frame_end + 1, frame_step) - # ------------------------------------------------------------------------- # Collect transformations - for f in frame_range: - scene.frame_set(f) - scene.update() + while True: + # Caller is responsible for setting the frame and updating the scene. + frame = yield None + + # Signal we're done! + if frame is None: + break + if do_pose: - pose_info.append(pose_frame_info(obj)) + pose_info.append((frame, pose_frame_info(obj))) if do_object: - obj_info.append(obj_frame_info(obj)) + obj_info.append((frame, obj_frame_info(obj))) # ------------------------------------------------------------------------- # Clean (store initial data) @@ -178,7 +255,7 @@ def bake_action(frame_start, # create compatible eulers euler_prev = None - for (f, matrix) in zip(frame_range, pose_info): + for (f, matrix) in pose_info: pbone.matrix_basis = matrix[name].copy() pbone.keyframe_insert("location", -1, f, name, options) @@ -210,7 +287,7 @@ def bake_action(frame_start, # create compatible eulers euler_prev = None - for (f, matrix) in zip(frame_range, obj_info): + for (f, matrix) in obj_info: name = "Action Bake" # XXX: placeholder obj.matrix_basis = matrix @@ -261,6 +338,4 @@ def bake_action(frame_start, else: i += 1 - scene.frame_set(frame_back) - - return action + yield action diff --git a/release/scripts/modules/keyingsets_utils.py b/release/scripts/modules/keyingsets_utils.py index 8cef64c3590..7ce5f3e029b 100644 --- a/release/scripts/modules/keyingsets_utils.py +++ b/release/scripts/modules/keyingsets_utils.py @@ -232,7 +232,7 @@ bbone_property_ids = ( "bbone_scalein", "bbone_scaleout", - # NOTE: These are in the nested bone struct + # NOTE: These are in the nested bone struct # Do it this way to force them to be included # in whatever actions are being keyed here "bone.bbone_in", diff --git a/release/scripts/modules/nodeitems_utils.py b/release/scripts/modules/nodeitems_utils.py index be6f031217c..117e35dd028 100644 --- a/release/scripts/modules/nodeitems_utils.py +++ b/release/scripts/modules/nodeitems_utils.py @@ -59,15 +59,29 @@ class NodeItem: return self._label else: # if no custom label is defined, fall back to the node type UI name - return getattr(bpy.types, self.nodetype).bl_rna.name + bl_rna = bpy.types.Node.bl_rna_get_subclass(self.nodetype) + if bl_rna is not None: + return bl_rna.name + else: + return "Unknown" + + @property + def translation_context(self): + if self._label: + return bpy.app.translations.contexts.default + else: + # if no custom label is defined, fall back to the node type UI name + bl_rna = bpy.types.Node.bl_rna_get_subclass(self.nodetype) + if bl_rna is not None: + return bl_rna.translation_context + else: + return bpy.app.translations.contexts.default # NB: is a staticmethod because called with an explicit self argument # NodeItemCustom sets this as a variable attribute in __init__ @staticmethod def draw(self, layout, context): - default_context = bpy.app.translations.contexts.default - - props = layout.operator("node.add_node", text=self.label, text_ctxt=default_context) + props = layout.operator("node.add_node", text=self.label, text_ctxt=self.translation_context) props.type = self.nodetype props.use_transform = True diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py index 94f5e9e17bb..03f43486371 100644 --- a/release/scripts/modules/rna_info.py +++ b/release/scripts/modules/rna_info.py @@ -82,6 +82,32 @@ def float_as_string(f): return val_str +def get_py_class_from_rna(rna_type): + """ Get's the Python type for a class which isn't necessarily added to ``bpy.types``. + """ + identifier = rna_type.identifier + py_class = getattr(bpy.types, identifier, None) + if py_class is not None: + return py_class + + def subclasses_recurse(cls): + for c in cls.__subclasses__(): + # is_registered + if "bl_rna" in cls.__dict__: + yield c + yield from subclasses_recurse(c) + + while py_class is None: + base = rna_type.base + if base is None: + raise Exception("can't find type") + py_class_base = getattr(bpy.types, base.identifier, None) + if py_class_base is not None: + for cls in subclasses_recurse(py_class_base): + if cls.bl_rna.identifier == identifier: + return cls + + class InfoStructRNA: __slots__ = ( "bl_rna", @@ -146,7 +172,8 @@ class InfoStructRNA: def _get_py_visible_attrs(self): attrs = [] - py_class = getattr(bpy.types, self.identifier) + py_class = get_py_class_from_rna(self.bl_rna) + for attr_str in dir(py_class): if attr_str.startswith("_"): continue @@ -437,7 +464,11 @@ class InfoOperatorRNA: self.args.append(prop) def get_location(self): - op_class = getattr(bpy.types, self.identifier) + try: + op_class = getattr(bpy.types, self.identifier) + except AttributeError: + # defined in C. + return None, None op_func = getattr(op_class, "execute", None) if op_func is None: op_func = getattr(op_class, "invoke", None) diff --git a/release/scripts/modules/sys_info.py b/release/scripts/modules/sys_info.py index 5b81df28524..e447d8a4dc5 100644 --- a/release/scripts/modules/sys_info.py +++ b/release/scripts/modules/sys_info.py @@ -151,6 +151,13 @@ def write_sysinfo(filepath): else: output.write("Blender was built without Cycles support\n") + opensubdiv = bpy.app.opensubdiv + output.write("OpenSubdiv: ") + if opensubdiv.supported: + output.write("%s\n" % opensubdiv.version_string) + else: + output.write("Blender was built without OpenSubdiv support\n") + openvdb = bpy.app.openvdb output.write("OpenVDB: ") if openvdb.supported: diff --git a/release/scripts/presets/cycles/integrator/direct_light.py b/release/scripts/presets/cycles/integrator/direct_light.py index 12b332cb431..701aa10d556 100644 --- a/release/scripts/presets/cycles/integrator/direct_light.py +++ b/release/scripts/presets/cycles/integrator/direct_light.py @@ -2,12 +2,10 @@ import bpy cycles = bpy.context.scene.cycles cycles.max_bounces = 8 -cycles.min_bounces = 8 cycles.caustics_reflective = False cycles.caustics_refractive = False cycles.diffuse_bounces = 0 cycles.glossy_bounces = 1 cycles.transmission_bounces = 2 cycles.volume_bounces = 0 -cycles.transparent_min_bounces = 8 cycles.transparent_max_bounces = 8 diff --git a/release/scripts/presets/cycles/integrator/full_global_illumination.py b/release/scripts/presets/cycles/integrator/full_global_illumination.py index 69fa6e735bd..a03c6c8bd64 100644 --- a/release/scripts/presets/cycles/integrator/full_global_illumination.py +++ b/release/scripts/presets/cycles/integrator/full_global_illumination.py @@ -2,12 +2,10 @@ import bpy cycles = bpy.context.scene.cycles cycles.max_bounces = 128 -cycles.min_bounces = 3 cycles.caustics_reflective = True cycles.caustics_refractive = True cycles.diffuse_bounces = 128 cycles.glossy_bounces = 128 cycles.transmission_bounces = 128 cycles.volume_bounces = 128 -cycles.transparent_min_bounces = 8 cycles.transparent_max_bounces = 128 diff --git a/release/scripts/presets/cycles/integrator/limited_global_illumination.py b/release/scripts/presets/cycles/integrator/limited_global_illumination.py index 22a8478d23b..d37bf46c705 100644 --- a/release/scripts/presets/cycles/integrator/limited_global_illumination.py +++ b/release/scripts/presets/cycles/integrator/limited_global_illumination.py @@ -2,12 +2,10 @@ import bpy cycles = bpy.context.scene.cycles cycles.max_bounces = 8 -cycles.min_bounces = 3 cycles.caustics_reflective = False cycles.caustics_refractive = False cycles.diffuse_bounces = 1 cycles.glossy_bounces = 4 cycles.transmission_bounces = 8 cycles.volume_bounces = 2 -cycles.transparent_min_bounces = 8 cycles.transparent_max_bounces = 8 diff --git a/release/scripts/presets/cycles/sampling/final.py b/release/scripts/presets/cycles/sampling/final.py index d03423b6c2e..f1222d927c1 100644 --- a/release/scripts/presets/cycles/sampling/final.py +++ b/release/scripts/presets/cycles/sampling/final.py @@ -1,20 +1,18 @@ import bpy cycles = bpy.context.scene.cycles -cycles.use_square_samples = True - # Path Trace -cycles.samples = 24 -cycles.preview_samples = 12 +cycles.samples = 512 +cycles.preview_samples = 128 # Branched Path Trace -cycles.aa_samples = 8 -cycles.preview_aa_samples = 4 +cycles.aa_samples = 128 +cycles.preview_aa_samples = 32 -cycles.diffuse_samples = 3 -cycles.glossy_samples = 2 -cycles.transmission_samples = 2 +cycles.diffuse_samples = 4 +cycles.glossy_samples = 4 +cycles.transmission_samples = 4 cycles.ao_samples = 1 -cycles.mesh_light_samples = 2 -cycles.subsurface_samples = 2 -cycles.volume_samples = 2 +cycles.mesh_light_samples = 4 +cycles.subsurface_samples = 4 +cycles.volume_samples = 4 diff --git a/release/scripts/presets/cycles/sampling/preview.py b/release/scripts/presets/cycles/sampling/preview.py index 5f071c7474d..c16449e2c8f 100644 --- a/release/scripts/presets/cycles/sampling/preview.py +++ b/release/scripts/presets/cycles/sampling/preview.py @@ -1,20 +1,18 @@ import bpy cycles = bpy.context.scene.cycles -cycles.use_square_samples = True - # Path Trace -cycles.samples = 12 -cycles.preview_samples = 6 +cycles.samples = 128 +cycles.preview_samples = 32 # Branched Path Trace -cycles.aa_samples = 4 -cycles.preview_aa_samples = 2 +cycles.aa_samples = 32 +cycles.preview_aa_samples = 4 -cycles.diffuse_samples = 3 -cycles.glossy_samples = 2 -cycles.transmission_samples = 2 +cycles.diffuse_samples = 4 +cycles.glossy_samples = 4 +cycles.transmission_samples = 4 cycles.ao_samples = 1 -cycles.mesh_light_samples = 2 -cycles.subsurface_samples = 2 -cycles.volume_samples = 2 +cycles.mesh_light_samples = 4 +cycles.subsurface_samples = 4 +cycles.volume_samples = 4 diff --git a/release/scripts/presets/ffmpeg/DVD (note_colon_ this changes render resolution).py b/release/scripts/presets/ffmpeg/DVD_(note_colon__this_changes_render_resolution).py index d858bd70836..d858bd70836 100644 --- a/release/scripts/presets/ffmpeg/DVD (note_colon_ this changes render resolution).py +++ b/release/scripts/presets/ffmpeg/DVD_(note_colon__this_changes_render_resolution).py diff --git a/release/scripts/presets/ffmpeg/h264 in MP4.py b/release/scripts/presets/ffmpeg/h264_in_MP4.py index 0e9c32c4878..0e9c32c4878 100644 --- a/release/scripts/presets/ffmpeg/h264 in MP4.py +++ b/release/scripts/presets/ffmpeg/h264_in_MP4.py diff --git a/release/scripts/presets/ffmpeg/h264 in Matroska.py b/release/scripts/presets/ffmpeg/h264_in_Matroska.py index 1fe066dc4bf..1fe066dc4bf 100644 --- a/release/scripts/presets/ffmpeg/h264 in Matroska.py +++ b/release/scripts/presets/ffmpeg/h264_in_Matroska.py diff --git a/release/scripts/presets/ffmpeg/h264 in Matroska for scrubbing.py b/release/scripts/presets/ffmpeg/h264_in_Matroska_for_scrubbing.py index eb1889d272f..eb1889d272f 100644 --- a/release/scripts/presets/ffmpeg/h264 in Matroska for scrubbing.py +++ b/release/scripts/presets/ffmpeg/h264_in_Matroska_for_scrubbing.py diff --git a/release/scripts/presets/interface_theme/dark_blue_gradient.xml b/release/scripts/presets/interface_theme/dark_blue_gradient.xml index d3d0f5bb522..d226f8531b2 100644 --- a/release/scripts/presets/interface_theme/dark_blue_gradient.xml +++ b/release/scripts/presets/interface_theme/dark_blue_gradient.xml @@ -110,7 +110,7 @@ inner="#39424bcc" inner_sel="#667686bf" item="#191919ff" - text="#000000" + text="#b8b8b8" text_sel="#ffffff" show_shaded="TRUE" shadetop="25" diff --git a/release/scripts/presets/interface_theme/elsyiun.xml b/release/scripts/presets/interface_theme/elsyiun.xml index 7a3d5146636..b9292856fe9 100644 --- a/release/scripts/presets/interface_theme/elsyiun.xml +++ b/release/scripts/presets/interface_theme/elsyiun.xml @@ -110,7 +110,7 @@ inner="#4b4b4bff" inner_sel="#646464ff" item="#191919ff" - text="#000000" + text="#b8b8b8" text_sel="#ffffff" show_shaded="TRUE" shadetop="0" diff --git a/release/scripts/presets/interface_theme/flatty_light.xml b/release/scripts/presets/interface_theme/flatty_light.xml index 623e0b334dd..c89cbd92ca0 100644 --- a/release/scripts/presets/interface_theme/flatty_light.xml +++ b/release/scripts/presets/interface_theme/flatty_light.xml @@ -216,7 +216,7 @@ <wcol_list_item> <ThemeWidgetColors outline="#e6e6e6" inner="#00000000" - inner_sel="#5680c2ff" + inner_sel="#446599ff" item="#80b1ffff" text="#1a1a1a" text_sel="#ffffff" @@ -238,30 +238,33 @@ </ThemeUserInterface> </user_interface> <view_3d> - <ThemeView3D grid="#414141" + <ThemeView3D grid="#464646" + clipping_border_3d="#313131ff" wire="#000000" wire_edit="#808080" gp_vertex="#000000" gp_vertex_select="#ff8500" gp_vertex_size="3" - lamp="#00000028" - speaker="#000000" - camera="#000000" - view_overlay="#808080" - empty="#000000" + text_grease_pencil="#b5e61d" object_selected="#f15800" object_active="#ffaa40" - object_grouped="#083008" + object_grouped="#004200" object_grouped_active="#55bb55" - transform="#ffffff" + text_keyframe="#ddd700" + camera="#000000" + empty="#000000" + lamp="#00000028" + speaker="#000000" vertex="#000000" vertex_select="#ff8500" vertex_size="3" + vertex_bevel="#00a5ff" vertex_unreferenced="#000000" edge_select="#ffa000" edge_seam="#db2512" edge_sharp="#00ffff" edge_crease="#cc0099" + edge_bevel="#00a5ff" edge_facesel="#4b4b4b" freestyle_edge_mark="#7fff7f" face="#00000012" @@ -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="#000000" skin_root="#b44d4d" - clipping_border_3d="#313131ff" - text_keyframe="#ddd700" - text_grease_pencil="#b5e61d" + view_overlay="#808080" + transform="#ffffff" + frame_current="#60c040" paint_curve_handle="#7fff7f7f" - paint_curve_pivot="#ff7f7f7f"> + paint_curve_pivot="#ff7f7f7f" + outline_width="1"> <space> <ThemeSpaceGradient title="#000000" text="#000000" @@ -321,8 +323,8 @@ tab_outline="#999999"> <gradients> <ThemeGradientColors show_grad="TRUE" - gradient="#1b1b1b" - high_gradient="#3a3a3a"> + gradient="#444444" + high_gradient="#858585"> </ThemeGradientColors> </gradients> <panelcolors> @@ -348,6 +350,7 @@ vertex="#000000" vertex_select="#ff8500" vertex_size="6" + vertex_bevel="#000000" vertex_unreferenced="#000000" handle_free="#000000" handle_auto="#909000" @@ -372,13 +375,13 @@ header_text="#000000" header_text_hi="#ffffff" button="#999999e6" - button_title="#000000" + button_title="#1a1a1a" button_text="#000000" button_text_hi="#ffffff" - tab_active="#727272" - tab_inactive="#535353" - tab_back="#404040ff" - tab_outline="#3c3c3c"> + tab_active="#6697e6" + tab_inactive="#cccccc" + tab_back="#999999ff" + tab_outline="#999999"> <panelcolors> <ThemePanelColors header="#c2c2c2ea" back="#999999ff" @@ -398,23 +401,23 @@ </ThemeGraphEditor> </graph_editor> <file_browser> - <ThemeFileBrowser selected_file="#ff8c19"> + <ThemeFileBrowser selected_file="#5680c2"> <space> <ThemeSpaceGeneric back="#404040" title="#000000" - text="#f1f1f1" - text_hi="#0f0f0f" - header="#b3b3b3" + text="#eeeeee" + text_hi="#ffffff" + header="#adadad" header_text="#000000" header_text_hi="#ffffff" - button="#7272727f" - button_title="#000000" + button="#999999e6" + button_title="#1a1a1a" button_text="#000000" button_text_hi="#ffffff" tab_active="#6697e6" - tab_inactive="#535353" - tab_back="#404040ff" - tab_outline="#3c3c3c"> + tab_inactive="#cccccc" + tab_back="#999999ff" + tab_outline="#999999"> <panelcolors> <ThemePanelColors header="#c2c2c2ea" back="#99999980" @@ -501,6 +504,7 @@ keyframe_jitter_selected="#61c042" keyframe_border="#000000ff" keyframe_border_selected="#000000ff" + keyframe_scale_factor="1" summary="#d3660066"> <space> <ThemeSpaceGeneric back="#6b6b6b" @@ -543,6 +547,7 @@ vertex="#000000" vertex_select="#ff8500" vertex_size="3" + vertex_bevel="#000000" vertex_unreferenced="#000000" face="#ffffff0a" face_select="#ff85003c" diff --git a/release/scripts/presets/interface_theme/science_lab.xml b/release/scripts/presets/interface_theme/science_lab.xml index 9341e945375..2fe4cf99e41 100644 --- a/release/scripts/presets/interface_theme/science_lab.xml +++ b/release/scripts/presets/interface_theme/science_lab.xml @@ -110,7 +110,7 @@ inner="#303030ff" inner_sel="#678db2ff" item="#191919ff" - text="#272727" + text="#e6f1ff" text_sel="#ffffff" show_shaded="FALSE" shadetop="0" diff --git a/release/scripts/presets/operator/wm.collada_export/sl_plus_open_sim_rigged.py b/release/scripts/presets/operator/wm.collada_export/sl_plus_open_sim_rigged.py index 7825a4d0f32..deb23d76d91 100644 --- a/release/scripts/presets/operator/wm.collada_export/sl_plus_open_sim_rigged.py +++ b/release/scripts/presets/operator/wm.collada_export/sl_plus_open_sim_rigged.py @@ -10,7 +10,7 @@ op.include_armatures = True op.include_shapekeys = False op.deform_bones_only = True op.active_uv_only = True -op.include_uv_textures = True +op.export_texture_type_selection = 'uv' op.use_texture_copies = True op.triangulate = True op.use_object_instantiation = False diff --git a/release/scripts/presets/operator/wm.collada_export/sl_plus_open_sim_static.py b/release/scripts/presets/operator/wm.collada_export/sl_plus_open_sim_static.py index 9e2efcaa727..ca9de8bf005 100644 --- a/release/scripts/presets/operator/wm.collada_export/sl_plus_open_sim_static.py +++ b/release/scripts/presets/operator/wm.collada_export/sl_plus_open_sim_static.py @@ -10,7 +10,7 @@ op.include_armatures = False op.include_shapekeys = False op.deform_bones_only = False op.active_uv_only = True -op.include_uv_textures = True +op.export_texture_type_selection = 'uv' op.use_texture_copies = True op.triangulate = True op.use_object_instantiation = False diff --git a/release/scripts/startup/bl_operators/anim.py b/release/scripts/startup/bl_operators/anim.py index 02fb05e29eb..0632f9bc3ca 100644 --- a/release/scripts/startup/bl_operators/anim.py +++ b/release/scripts/startup/bl_operators/anim.py @@ -137,6 +137,9 @@ class ANIM_OT_keying_set_export(Operator): break else: self.report({'WARN'}, "Could not find scene using Compositor Node Tree - %s" % (ksp.id)) + elif ksp.id.bl_rna.name == "Key": + # "keys" conflicts with a Python keyword, hence the simple solution won't work + id_bpy_path = "bpy.data.shape_keys[\"%s\"]" % (ksp.id.name) else: idtype_list = ksp.id.bl_rna.name.lower() + "s" id_bpy_path = "bpy.data.%s[\"%s\"]" % (idtype_list, ksp.id.name) @@ -195,7 +198,7 @@ class ANIM_OT_keying_set_export(Operator): class BakeAction(Operator): - """Bake object/pose loc/scale/rotation animation to a new action""" + """Bake all selected objects loc/scale/rotation animation to an action""" bl_idname = "nla.bake" bl_label = "Bake Action" bl_options = {'REGISTER', 'UNDO'} @@ -219,7 +222,7 @@ class BakeAction(Operator): default=1, ) only_selected = BoolProperty( - name="Only Selected", + name="Only Selected Bones", description="Only key selected bones (Pose baking only)", default=True, ) @@ -255,29 +258,27 @@ class BakeAction(Operator): ) def execute(self, context): - from bpy_extras import anim_utils - - action = None - if self.use_current_action: - obj = context.object - if obj.animation_data: - action = obj.animation_data.action - - action = anim_utils.bake_action(self.frame_start, - self.frame_end, - frame_step=self.step, - only_selected=self.only_selected, - do_pose='POSE' in self.bake_types, - do_object='OBJECT' in self.bake_types, - do_visual_keying=self.visual_keying, - do_constraint_clear=self.clear_constraints, - do_parents_clear=self.clear_parents, - do_clean=True, - action=action, - ) - - if action is None: + objects = context.selected_editable_objects + object_action_pairs = ( + [(obj, getattr(obj.animation_data, "action", None)) for obj in objects] + if self.use_current_action else + [(obj, None) for obj in objects] + ) + + actions = anim_utils.bake_action_objects( + object_action_pairs, + frames=range(self.frame_start, self.frame_end + 1, self.step), + only_selected=self.only_selected, + do_pose='POSE' in self.bake_types, + do_object='OBJECT' in self.bake_types, + do_visual_keying=self.visual_keying, + do_constraint_clear=self.clear_constraints, + do_parents_clear=self.clear_parents, + do_clean=True, + ) + + if not any(actions): self.report({'INFO'}, "Nothing to bake") return {'CANCELLED'} diff --git a/release/scripts/startup/bl_operators/clip.py b/release/scripts/startup/bl_operators/clip.py index e52d577b900..f63b0495d02 100644 --- a/release/scripts/startup/bl_operators/clip.py +++ b/release/scripts/startup/bl_operators/clip.py @@ -210,7 +210,7 @@ class CLIP_OT_set_active_clip(bpy.types.Operator): @classmethod def poll(cls, context): space = context.space_data - return space.type == 'CLIP_EDITOR' + return space.type == 'CLIP_EDITOR' and space.clip def execute(self, context): clip = context.space_data.clip @@ -254,6 +254,11 @@ class CLIP_OT_track_to_empty(Operator): constraint.object = tracking_object.name constraint.camera = CLIP_camera_for_clip(context, clip) + @classmethod + def poll(cls, context): + space = context.space_data + return space.type == 'CLIP_EDITOR' and space.clip + def execute(self, context): sc = context.space_data clip = sc.clip @@ -782,8 +787,8 @@ class CLIP_OT_setup_tracking_scene(Operator): tree.links.new(mul_shadow.outputs["Image"], mul_image.inputs[2]) tree.links.new(rlayer_fg.outputs["Image"], vector_blur.inputs["Image"]) - tree.links.new(rlayer_fg.outputs["Z"], vector_blur.inputs["Z"]) - tree.links.new(rlayer_fg.outputs["Speed"], vector_blur.inputs["Speed"]) + tree.links.new(rlayer_fg.outputs["Depth"], vector_blur.inputs["Z"]) + tree.links.new(rlayer_fg.outputs["Vector"], vector_blur.inputs["Speed"]) tree.links.new(mul_image.outputs["Image"], alphaover.inputs[1]) tree.links.new(vector_blur.outputs["Image"], alphaover.inputs[2]) diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py index 5581415c083..cc590ac9502 100644 --- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py +++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py @@ -723,7 +723,7 @@ def main(context, global USER_FILL_HOLES_QUALITY global USER_STRETCH_ASPECT global USER_ISLAND_MARGIN - + from math import cos import time @@ -747,7 +747,7 @@ def main(context, USER_FILL_HOLES = 0 USER_FILL_HOLES_QUALITY = 50 # Only for hole filling. USER_VIEW_INIT = 0 # Only for hole filling. - + is_editmode = (context.active_object.mode == 'EDIT') if is_editmode: obList = [ob for ob in [context.active_object] if ob and ob.type == 'MESH'] diff --git a/release/scripts/startup/bl_ui/properties_animviz.py b/release/scripts/startup/bl_ui/properties_animviz.py index 84bae18dd6f..9782d5a072c 100644 --- a/release/scripts/startup/bl_ui/properties_animviz.py +++ b/release/scripts/startup/bl_ui/properties_animviz.py @@ -37,7 +37,7 @@ class MotionPathButtonsPanel: mps = avs.motion_path # Display Range - layout.prop(mps, "type", expand=True) + layout.row().prop(mps, "type", expand=True) split = layout.split() @@ -87,11 +87,11 @@ class MotionPathButtonsPanel: col.label(text="Show:") col.prop(mps, "show_frame_numbers", text="Frame Numbers") if mpath is not None: - col.prop(mpath, "lines", text='Lines') - col.prop(mpath, "line_thickness", text='Thickness') + col.prop(mpath, "lines", text="Lines") + col.prop(mpath, "line_thickness", text="Thickness") col = split.column() - col.label('') + col.label("") col.prop(mps, "show_keyframe_highlight", text="Keyframes") sub = col.column() sub.enabled = mps.show_keyframe_highlight @@ -102,10 +102,10 @@ class MotionPathButtonsPanel: # Customize path if mpath is not None: row = layout.row(align=True) - row.prop(mpath, "use_custom_color", text='', toggle=True, icon='COLOR') + row.prop(mpath, "use_custom_color", text="", toggle=True, icon='COLOR') sub = row.row(align=True) sub.enabled = mpath.use_custom_color - sub.prop(mpath, "color", text='') + sub.prop(mpath, "color", text="") # FIXME: this panel still needs to be ported so that it will work correctly with animviz @@ -120,7 +120,7 @@ class OnionSkinButtonsPanel: arm = context.armature - layout.prop(arm, "ghost_type", expand=True) + layout.row().prop(arm, "ghost_type", expand=True) split = layout.split() diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py index 00892d5f85b..9b61101778f 100644 --- a/release/scripts/startup/bl_ui/properties_constraint.py +++ b/release/scripts/startup/bl_ui/properties_constraint.py @@ -886,10 +886,10 @@ class ConstraintButtonsPanel: box.template_cache_file(con, "cache_file") cache_file = con.cache_file - + layout.label(text="Constraint Properties:") box = layout.box() - + if cache_file is not None: box.prop_search(con, "object_path", cache_file, "object_paths") diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py index a2ecf984eb5..6a13e2ddd44 100644 --- a/release/scripts/startup/bl_ui/properties_data_armature.py +++ b/release/scripts/startup/bl_ui/properties_data_armature.py @@ -57,7 +57,7 @@ class DATA_PT_skeleton(ArmatureButtonsPanel, Panel): arm = context.armature - layout.prop(arm, "pose_position", expand=True) + layout.row().prop(arm, "pose_position", expand=True) col = layout.column() col.label(text="Layers:") @@ -80,7 +80,7 @@ class DATA_PT_display(ArmatureButtonsPanel, Panel): ob = context.object arm = context.armature - layout.prop(arm, "draw_type", expand=True) + layout.row().prop(arm, "draw_type", expand=True) split = layout.split() @@ -96,7 +96,7 @@ class DATA_PT_display(ArmatureButtonsPanel, Panel): col.prop(arm, "use_deform_delay", text="Delay Refresh") -class DATA_PT_bone_group_specials(Menu): +class DATA_MT_bone_group_specials(Menu): bl_label = "Bone Group Specials" def draw(self, context): @@ -130,7 +130,7 @@ class DATA_PT_bone_groups(ArmatureButtonsPanel, Panel): col.active = (ob.proxy is None) col.operator("pose.group_add", icon='ZOOMIN', text="") col.operator("pose.group_remove", icon='ZOOMOUT', text="") - col.menu("DATA_PT_bone_group_specials", icon='DOWNARROW_HLT', text="") + col.menu("DATA_MT_bone_group_specials", icon='DOWNARROW_HLT', text="") if group: col.separator() col.operator("pose.group_move", icon='TRIA_UP', text="").direction = 'UP' @@ -178,6 +178,10 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, Panel): layout.template_ID(ob, "pose_library", new="poselib.new", unlink="poselib.unlink") if poselib: + # warning about poselib being in an invalid state + if len(poselib.fcurves) > 0 and len(poselib.pose_markers) == 0: + layout.label(icon='ERROR', text="Error: Potentially corrupt library, run 'Sanitize' operator to fix") + # list of poses in pose library row = layout.row() row.template_list("UI_UL_list", "pose_markers", poselib, "pose_markers", @@ -215,7 +219,7 @@ class DATA_PT_ghost(ArmatureButtonsPanel, Panel): arm = context.armature - layout.prop(arm, "ghost_type", expand=True) + layout.row().prop(arm, "ghost_type", expand=True) split = layout.split() @@ -252,11 +256,11 @@ class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, Panel): layout.prop(ob.pose, "ik_solver") if itasc: - layout.prop(itasc, "mode", expand=True) + layout.row().prop(itasc, "mode", expand=True) simulation = (itasc.mode == 'SIMULATION') if simulation: layout.label(text="Reiteration:") - layout.prop(itasc, "reiteration_method", expand=True) + layout.row().prop(itasc, "reiteration_method", expand=True) row = layout.row() row.active = not simulation or itasc.reiteration_method != 'NEVER' @@ -333,7 +337,7 @@ classes = ( DATA_PT_context_arm, DATA_PT_skeleton, DATA_PT_display, - DATA_PT_bone_group_specials, + DATA_MT_bone_group_specials, DATA_PT_bone_groups, DATA_PT_pose_library, DATA_PT_ghost, diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py index 101062095c4..14286045704 100644 --- a/release/scripts/startup/bl_ui/properties_data_camera.py +++ b/release/scripts/startup/bl_ui/properties_data_camera.py @@ -79,7 +79,7 @@ class DATA_PT_lens(CameraButtonsPanel, Panel): cam = context.camera - layout.prop(cam, "type", expand=True) + layout.row().prop(cam, "type", expand=True) split = layout.split() diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py index ac1eb9505a6..3a3ad31a8ef 100644 --- a/release/scripts/startup/bl_ui/properties_data_curve.py +++ b/release/scripts/startup/bl_ui/properties_data_curve.py @@ -371,10 +371,10 @@ class DATA_PT_paragraph(CurveButtonsPanelText, Panel): text = context.curve layout.label(text="Horizontal Alignment:") - layout.prop(text, "align_x", expand=True) + layout.row().prop(text, "align_x", expand=True) layout.label(text="Vertical Alignment:") - layout.prop(text, "align_y", expand=True) + layout.row().prop(text, "align_y", expand=True) split = layout.split() diff --git a/release/scripts/startup/bl_ui/properties_data_lamp.py b/release/scripts/startup/bl_ui/properties_data_lamp.py index f913ef51381..f9394139b42 100644 --- a/release/scripts/startup/bl_ui/properties_data_lamp.py +++ b/release/scripts/startup/bl_ui/properties_data_lamp.py @@ -83,7 +83,7 @@ class DATA_PT_lamp(DataButtonsPanel, Panel): lamp = context.lamp - layout.prop(lamp, "type", expand=True) + layout.row().prop(lamp, "type", expand=True) split = layout.split() @@ -210,13 +210,13 @@ class DATA_PT_shadow(DataButtonsPanel, Panel): lamp = context.lamp - layout.prop(lamp, "shadow_method", expand=True) + layout.row().prop(lamp, "shadow_method", expand=True) if lamp.shadow_method == 'NOSHADOW' and lamp.type == 'AREA': split = layout.split() col = split.column() - col.label(text="Form factor sampling:") + col.label(text="Form Factor Sampling:") sub = col.row(align=True) diff --git a/release/scripts/startup/bl_ui/properties_data_metaball.py b/release/scripts/startup/bl_ui/properties_data_metaball.py index a621dc7210f..dd62c4523b1 100644 --- a/release/scripts/startup/bl_ui/properties_data_metaball.py +++ b/release/scripts/startup/bl_ui/properties_data_metaball.py @@ -70,7 +70,7 @@ class DATA_PT_metaball(DataButtonsPanel, Panel): col.prop(mball, "threshold", text="Threshold") layout.label(text="Update:") - layout.prop(mball, "update_method", expand=True) + layout.row().prop(mball, "update_method", expand=True) class DATA_PT_mball_texture_space(DataButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index d72855fab6b..15c9077d970 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -381,7 +381,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): split = layout.split() col = split.column() - col.label(text="Vertex group:") + col.label(text="Vertex Group:") col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") sub = col.column() sub.active = bool(md.vertex_group) @@ -747,6 +747,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.prop(md, "steps") col.prop(md, "render_steps") col.prop(md, "use_smooth_shade") + col.prop(md, "use_merge_vertices") + sub = col.column() + sub.active = md.use_merge_vertices + sub.prop(md, "merge_threshold") col = split.column() row = col.row() @@ -917,9 +921,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): scene = bpy.context.scene engine = scene.render.engine - show_adaptive_options = (engine == "CYCLES" and md == ob.modifiers[-1] and - scene.cycles.feature_set == "EXPERIMENTAL") - + show_adaptive_options = ( + engine == 'CYCLES' and md == ob.modifiers[-1] and + scene.cycles.feature_set == 'EXPERIMENTAL' + ) if show_adaptive_options: col.label(text="View:") col.prop(md, "levels", text="Levels") diff --git a/release/scripts/startup/bl_ui/properties_freestyle.py b/release/scripts/startup/bl_ui/properties_freestyle.py index 9c5be7624e0..3d105934bf8 100644 --- a/release/scripts/startup/bl_ui/properties_freestyle.py +++ b/release/scripts/startup/bl_ui/properties_freestyle.py @@ -123,7 +123,7 @@ class RENDERLAYER_PT_freestyle(RenderLayerFreestyleButtonsPanel, Panel): layout.active = rl.use_freestyle row = layout.row() - layout.prop(freestyle, "mode", text="Control mode") + layout.prop(freestyle, "mode", text="Control Mode") layout.prop(freestyle, "use_view_map_cache", text="View Map Cache") layout.label(text="Edge Detection Options:") @@ -285,7 +285,7 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel, def draw_modifier_box_error(self, box, modifier, message): row = box.row() - row.label(text=message, icon="ERROR") + row.label(text=message, icon='ERROR') def draw_modifier_common(self, box, modifier): row = box.row() diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py index 46b34373aa5..277b0842b3d 100644 --- a/release/scripts/startup/bl_ui/properties_game.py +++ b/release/scripts/startup/bl_ui/properties_game.py @@ -90,11 +90,11 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel): split = layout.split() col = split.column() - col.label(text="Linear velocity:") + col.label(text="Linear Velocity:") sub = col.column(align=True) sub.prop(game, "velocity_min", text="Minimum") sub.prop(game, "velocity_max", text="Maximum") - col.label(text="Angular velocity:") + col.label(text="Angular Velocity:") sub = col.column(align=True) sub.prop(game, "angular_velocity_min", text="Minimum") sub.prop(game, "angular_velocity_max", text="Maximum") @@ -343,7 +343,7 @@ class RENDER_PT_game_stereo(RenderButtonsPanel, Panel): stereo_mode = gs.stereo # stereo options: - layout.prop(gs, "stereo", expand=True) + layout.row().prop(gs, "stereo", expand=True) # stereo: if stereo_mode == 'STEREO': @@ -392,7 +392,7 @@ class RENDER_PT_game_shading(RenderButtonsPanel, Panel): gs = context.scene.game_settings - layout.prop(gs, "material_mode", expand=True) + layout.row().prop(gs, "material_mode", expand=True) if gs.material_mode == 'GLSL': split = layout.split() 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 42e8d5272b3..2aa978a51d8 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -75,16 +75,16 @@ def gpencil_active_brush_settings_simple(context, layout): col.prop(brush, "line_width", slider=True) row = col.row(align=True) - row.prop(brush, "use_random_pressure", text='', icon='RNDCURVE') + row.prop(brush, "use_random_pressure", text="", icon='RNDCURVE') row.prop(brush, "pen_sensitivity_factor", slider=True) - row.prop(brush, "use_pressure", text='', icon='STYLUS_PRESSURE') + row.prop(brush, "use_pressure", text="", icon='STYLUS_PRESSURE') row = col.row(align=True) - row.prop(brush, "use_random_strength", text='', icon='RNDCURVE') + row.prop(brush, "use_random_strength", text="", icon='RNDCURVE') row.prop(brush, "strength", slider=True) - row.prop(brush, "use_strength_pressure", text='', icon='STYLUS_PRESSURE') + row.prop(brush, "use_strength_pressure", text="", icon='STYLUS_PRESSURE') row = col.row(align=True) row.prop(brush, "jitter", slider=True) - row.prop(brush, "use_jitter_pressure", text='', icon='STYLUS_PRESSURE') + row.prop(brush, "use_jitter_pressure", text="", icon='STYLUS_PRESSURE') row = col.row() row.prop(brush, "angle", slider=True) row.prop(brush, "angle_factor", text="Factor", slider=True) @@ -233,7 +233,7 @@ class GreasePencilStrokeEditPanel: if is_3d_view: layout.separator() - + layout.separator() col = layout.column(align=True) @@ -340,19 +340,19 @@ class GreasePencilBrushPanel: row = layout.row() row.prop(brush, "line_width") row = layout.row(align=True) - row.prop(brush, "use_random_pressure", text='', icon='RNDCURVE') + row.prop(brush, "use_random_pressure", text="", icon='RNDCURVE') row.prop(brush, "pen_sensitivity_factor", slider=True) - row.prop(brush, "use_pressure", text='', icon='STYLUS_PRESSURE') + row.prop(brush, "use_pressure", text="", icon='STYLUS_PRESSURE') row = layout.row(align=True) - row.prop(brush, "use_random_strength", text='', icon='RNDCURVE') + row.prop(brush, "use_random_strength", text="", icon='RNDCURVE') row.prop(brush, "strength", slider=True) - row.prop(brush, "use_strength_pressure", text='', icon='STYLUS_PRESSURE') + row.prop(brush, "use_strength_pressure", text="", icon='STYLUS_PRESSURE') row = layout.row(align=True) row.prop(brush, "random_press", slider=True) row = layout.row(align=True) row.prop(brush, "jitter", slider=True) - row.prop(brush, "use_jitter_pressure", text='', icon='STYLUS_PRESSURE') + row.prop(brush, "use_jitter_pressure", text="", icon='STYLUS_PRESSURE') row = layout.row() row.prop(brush, "angle", slider=True) row.prop(brush, "angle_factor", text="Factor", slider=True) @@ -365,7 +365,7 @@ class GreasePencilBrushPanel: col.separator() row = col.row(align=False) row.prop(brush, "pen_subdivision_steps") - row.prop(brush, "random_subdiv", text='Randomness', slider=True) + row.prop(brush, "random_subdiv", text="Randomness", slider=True) class GreasePencilStrokeSculptPanel: @@ -463,7 +463,7 @@ class GreasePencilBrushCurvesPanel: ############################### -class GPENCIL_PIE_tool_palette(Menu): +class GPENCIL_MT_pie_tool_palette(Menu): """A pie menu for quick access to Grease Pencil tools""" bl_label = "Grease Pencil Tools" @@ -487,7 +487,7 @@ class GPENCIL_PIE_tool_palette(Menu): # E - "Settings" Palette is included here too, since it needs to be in a stable position... if gpd and gpd.layers.active: col.separator() - col.operator("wm.call_menu_pie", text="Settings...", icon='SCRIPTWIN').name = "GPENCIL_PIE_settings_palette" + col.operator("wm.call_menu_pie", text="Settings...", icon='SCRIPTWIN').name = "GPENCIL_MT_pie_settings_palette" # Editing tools if gpd: @@ -525,13 +525,13 @@ class GPENCIL_PIE_tool_palette(Menu): col.operator("gpencil.delete", icon='X', text="Delete...") # SE - More Tools - pie.operator("wm.call_menu_pie", text="More...").name = "GPENCIL_PIE_tools_more" + pie.operator("wm.call_menu_pie", text="More...").name = "GPENCIL_MT_pie_tools_more" else: # Toggle Edit Mode pie.operator("gpencil.editmode_toggle", text="Enable Stroke Editing", icon='EDIT') -class GPENCIL_PIE_settings_palette(Menu): +class GPENCIL_MT_pie_settings_palette(Menu): """A pie menu for quick access to Grease Pencil settings""" bl_label = "Grease Pencil Settings" @@ -609,12 +609,12 @@ class GPENCIL_PIE_settings_palette(Menu): row = col.row() row.operator("gpencil.stroke_join", text="Join").type = 'JOIN' row.operator("gpencil.stroke_join", text="Join & Copy").type = 'JOINCOPY' - col.operator("gpencil.stroke_flip", text="Flip direction") + col.operator("gpencil.stroke_flip", text="Flip Direction") - col.prop(gpd, "show_stroke_direction", text="Show drawing direction") + col.prop(gpd, "show_stroke_direction", text="Show Drawing Direction") -class GPENCIL_PIE_tools_more(Menu): +class GPENCIL_MT_pie_tools_more(Menu): """A pie menu for accessing more Grease Pencil tools""" bl_label = "More Grease Pencil Tools" @@ -643,10 +643,10 @@ class GPENCIL_PIE_tools_more(Menu): pie.operator("transform.tosphere", icon='MOD_MULTIRES') pie.operator("gpencil.convert", icon='OUTLINER_OB_CURVE', text="Convert...") - pie.operator("wm.call_menu_pie", text="Back to Main Palette...").name = "GPENCIL_PIE_tool_palette" + pie.operator("wm.call_menu_pie", text="Back to Main Palette...").name = "GPENCIL_MT_pie_tool_palette" -class GPENCIL_PIE_sculpt(Menu): +class GPENCIL_MT_pie_sculpt(Menu): """A pie menu for accessing Grease Pencil stroke sculpting settings""" bl_label = "Grease Pencil Sculpt" @@ -839,8 +839,8 @@ class GPENCIL_MT_brush_specials(Menu): def draw(self, context): layout = self.layout - layout.operator("gpencil.brush_copy", icon='PASTEDOWN', text="Copy current drawing brush") - layout.operator("gpencil.brush_presets_create", icon='HELP', text="Create a set of predefined brushes") + layout.operator("gpencil.brush_copy", icon='PASTEDOWN', text="Copy Current Drawing Brush") + layout.operator("gpencil.brush_presets_create", icon='HELP', text="Create a Set of Predefined Brushes") class GPENCIL_MT_palettecolor_specials(Menu): @@ -884,9 +884,9 @@ class GreasePencilDataPanel: # Owner Selector if context.space_data.type == 'VIEW_3D': - layout.prop(context.tool_settings, "grease_pencil_source", expand=True) + layout.row().prop(context.tool_settings, "grease_pencil_source", expand=True) elif context.space_data.type == 'CLIP_EDITOR': - layout.prop(context.space_data, "grease_pencil_source", expand=True) + layout.row().prop(context.space_data, "grease_pencil_source", expand=True) # Grease Pencil data selector layout.template_ID(gpd_owner, "grease_pencil", new="gpencil.data_add", unlink="gpencil.data_unlink") @@ -963,7 +963,7 @@ class GreasePencilDataPanel: row.prop(gpl, "line_change", text="Thickness Change", slider=True) row.operator("gpencil.stroke_apply_thickness", icon='STYLUS_PRESSURE', text="") - # Parenting + # Parenting if context.space_data.type == 'VIEW_3D': col = split.column(align=True) col.label(text="Parent:") @@ -1158,10 +1158,10 @@ class GreasePencilToolsPanel: classes = ( - GPENCIL_PIE_tool_palette, - GPENCIL_PIE_settings_palette, - GPENCIL_PIE_tools_more, - GPENCIL_PIE_sculpt, + GPENCIL_MT_pie_tool_palette, + GPENCIL_MT_pie_settings_palette, + GPENCIL_MT_pie_tools_more, + GPENCIL_MT_pie_sculpt, GPENCIL_MT_snap, GPENCIL_MT_gpencil_edit_specials, GPENCIL_UL_brush, diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py index 06ae1847d06..73740df37e8 100644 --- a/release/scripts/startup/bl_ui/properties_material.py +++ b/release/scripts/startup/bl_ui/properties_material.py @@ -124,9 +124,10 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel, Panel): ob = context.object slot = context.material_slot space = context.space_data - is_sortable = (len(ob.material_slots) > 1) if ob: + is_sortable = (len(ob.material_slots) > 1) + rows = 1 if is_sortable: rows = 4 @@ -170,7 +171,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel, Panel): split.separator() if mat: - layout.prop(mat, "type", expand=True) + layout.row().prop(mat, "type", expand=True) if mat.use_nodes: row = layout.row() row.label(text="", icon='NODETREE') @@ -991,7 +992,7 @@ class MATERIAL_PT_volume_transp(VolumeButtonsPanel, Panel): mat = context.material # don't use node material - layout.prop(mat, "transparency_method", expand=True) + layout.row().prop(mat, "transparency_method", expand=True) class MATERIAL_PT_volume_integration(VolumeButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py index d7e18f81232..43c8300b558 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -294,7 +294,7 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, Panel): ob = context.object - layout.prop(ob, "dupli_type", expand=True) + layout.row().prop(ob, "dupli_type", expand=True) if ob.dupli_type == 'FRAMES': split = layout.split() diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index dfd20d90ec4..b79f8263e39 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -157,9 +157,9 @@ def brush_texpaint_common(panel, context, layout, brush, settings, projpaint=Fal col.separator() if projpaint: if settings.mode == 'MATERIAL': - col.prop(settings, "use_clone_layer", text="Clone from paint slot") + col.prop(settings, "use_clone_layer", text="Clone from Paint Slot") elif settings.mode == 'IMAGE': - col.prop(settings, "use_clone_layer", text="Clone from image/UV map") + col.prop(settings, "use_clone_layer", text="Clone from Image/UV Map") if settings.use_clone_layer: ob = context.active_object diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index e86df975927..aa4cb0ba1e9 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -284,7 +284,7 @@ class PARTICLE_PT_emission(ParticleButtonsPanel, Panel): col.prop(part, "lifetime_random", slider=True) layout.label(text="Emit From:") - layout.prop(part, "emit_from", expand=True) + layout.row().prop(part, "emit_from", expand=True) row = layout.row() if part.emit_from == 'VERT': @@ -297,7 +297,7 @@ class PARTICLE_PT_emission(ParticleButtonsPanel, Panel): row.prop(part, "use_even_distribution") if part.emit_from == 'FACE' or part.emit_from == 'VOLUME': - layout.prop(part, "distribution", expand=True) + layout.row().prop(part, "distribution", expand=True) row = layout.row() if part.distribution == 'JIT': @@ -578,7 +578,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel): layout.enabled = particle_panel_enabled(context, psys) - layout.prop(part, "physics_type", expand=True) + layout.row().prop(part, "physics_type", expand=True) row = layout.row() col = row.column(align=True) @@ -628,7 +628,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel): split = layout.split() col = split.column() - col.label(text="Fluid properties:") + col.label(text="Fluid Properties:") col.prop(fluid, "stiffness", text="Stiffness") col.prop(fluid, "linear_viscosity", text="Viscosity") col.prop(fluid, "buoyancy", text="Buoyancy", slider=True) @@ -749,7 +749,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel): if part.physics_type == 'BOIDS': layout.label(text="Relations:") elif part.physics_type == 'FLUID': - layout.label(text="Fluid interaction:") + layout.label(text="Fluid Interaction:") row = layout.row() row.template_list("UI_UL_list", "particle_targets", psys, "targets", @@ -785,7 +785,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel): sub.prop(key, "object", text="") sub.prop(key, "system", text="System") - layout.prop(key, "alliance", expand=True) + layout.row().prop(key, "alliance", expand=True) elif part.physics_type == 'FLUID': sub = row.row() # doesn't work yet @@ -933,7 +933,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel): col.prop(part, "show_unborn") col.prop(part, "use_dead") - layout.prop(part, "render_type", expand=True) + layout.row().prop(part, "render_type", expand=True) split = layout.split() @@ -1081,7 +1081,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel): col = row.column() col.prop(part, "trail_count") if part.trail_count > 1: - col.prop(part, "use_absolute_path_time", text="Length in frames") + col.prop(part, "use_absolute_path_time", text="Length in Frames") col = row.column() col.prop(part, "path_end", text="Length", slider=not part.use_absolute_path_time) col.prop(part, "length_random", text="Random", slider=True) diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py index 0b98d8738dc..73d3d5fc755 100644 --- a/release/scripts/startup/bl_ui/properties_physics_common.py +++ b/release/scripts/startup/bl_ui/properties_physics_common.py @@ -79,7 +79,7 @@ class PHYSICS_PT_add(PhysicButtonsPanel, Panel): col = split.column() - if obj.type in {'MESH', 'LATTICE', 'CURVE'}: + if obj.type in {'MESH', 'LATTICE', 'CURVE', 'SURFACE', 'FONT'}: physics_add(self, col, context.soft_body, "Soft Body", 'SOFT_BODY', 'MOD_SOFT', True) if obj.type == 'MESH': diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py index c813350be08..ec7287ef363 100644 --- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py +++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py @@ -68,7 +68,7 @@ class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel): md = context.dynamic_paint - layout.prop(md, "ui_type", expand=True) + layout.row().prop(md, "ui_type", expand=True) if md.ui_type == 'CANVAS': canvas = md.canvas_settings @@ -245,7 +245,7 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel): # paint-map output row = layout.row() - row.prop_search(surface, "output_name_a", ob.data, "vertex_colors", text="Paintmap layer") + row.prop_search(surface, "output_name_a", ob.data, "vertex_colors", text="Paintmap Layer") if surface.output_exists(object=ob, index=0): ic = 'ZOOMOUT' else: @@ -255,7 +255,7 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel): # wet-map output row = layout.row() - row.prop_search(surface, "output_name_b", ob.data, "vertex_colors", text="Wetmap layer") + row.prop_search(surface, "output_name_b", ob.data, "vertex_colors", text="Wetmap Layer") if surface.output_exists(object=ob, index=1): ic = 'ZOOMOUT' else: @@ -282,7 +282,7 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel): layout.prop(surface, "image_output_path", text="") row = layout.row() row.prop(surface, "image_fileformat", text="") - row.prop(surface, "use_premultiply", text="Premultiply alpha") + row.prop(surface, "use_premultiply", text="Premultiply Alpha") if surface_type == 'PAINT': split = layout.split(percentage=0.4) @@ -363,7 +363,7 @@ class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel): canvas = context.dynamic_paint.canvas_settings surface = canvas.canvas_surfaces.active - layout.prop(surface, "effect_ui", expand=True) + layout.row().prop(surface, "effect_ui", expand=True) if surface.effect_ui == 'SPREAD': layout.prop(surface, "use_spread") @@ -439,12 +439,12 @@ class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel): if brush.paint_source == 'PARTICLE_SYSTEM': col.prop_search(brush, "particle_system", ob, "particle_systems", text="") if brush.particle_system: - col.label(text="Particle effect:") + col.label(text="Particle Effect:") sub = col.column() sub.active = not brush.use_particle_radius sub.prop(brush, "solid_radius", text="Solid Radius") col.prop(brush, "use_particle_radius", text="Use Particle's Radius") - col.prop(brush, "smooth_radius", text="Smooth radius") + col.prop(brush, "smooth_radius", text="Smooth Radius") if brush.paint_source in {'DISTANCE', 'VOLUME_DISTANCE', 'POINT'}: col.prop(brush, "paint_distance", text="Paint Distance") diff --git a/release/scripts/startup/bl_ui/properties_physics_field.py b/release/scripts/startup/bl_ui/properties_physics_field.py index 2b12fcf982d..3fd47f0b8ca 100644 --- a/release/scripts/startup/bl_ui/properties_physics_field.py +++ b/release/scripts/startup/bl_ui/properties_physics_field.py @@ -128,7 +128,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel, Panel): if field.type not in {'NONE', 'GUIDE'}: layout.label(text="Falloff:") - layout.prop(field, "falloff_type", expand=True) + layout.row().prop(field, "falloff_type", expand=True) basic_force_field_falloff_ui(self, context, field) diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py index f2e6c1e22e3..4f0d3680834 100644 --- a/release/scripts/startup/bl_ui/properties_physics_smoke.py +++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py @@ -52,7 +52,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel): md = context.smoke ob = context.object - layout.prop(md, "smoke_type", expand=True) + layout.row().prop(md, "smoke_type", expand=True) if md.smoke_type == 'DOMAIN': domain = md.domain_settings @@ -322,14 +322,14 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel): if cache_file_format == 'POINTCACHE': layout.label(text="Compression:") - layout.prop(domain, "point_cache_compress_type", expand=True) + layout.row().prop(domain, "point_cache_compress_type", expand=True) elif cache_file_format == 'OPENVDB': if not bpy.app.build_options.openvdb: layout.label("Built without OpenVDB support") return layout.label(text="Compression:") - layout.prop(domain, "openvdb_cache_compress_type", expand=True) + layout.row().prop(domain, "openvdb_cache_compress_type", expand=True) row = layout.row() row.label("Data Depth:") row.prop(domain, "data_depth", expand=True, text="Data Depth") diff --git a/release/scripts/startup/bl_ui/properties_physics_softbody.py b/release/scripts/startup/bl_ui/properties_physics_softbody.py index 5960428e4ae..5efe105e7d8 100644 --- a/release/scripts/startup/bl_ui/properties_physics_softbody.py +++ b/release/scripts/startup/bl_ui/properties_physics_softbody.py @@ -26,6 +26,9 @@ from bl_ui.properties_physics_common import ( ) +COMPAT_OB_TYPES = {'MESH', 'LATTICE', 'CURVE', 'SURFACE', 'FONT'} + + def softbody_panel_enabled(md): return (md.point_cache.is_baked is False) @@ -39,7 +42,7 @@ class PhysicButtonsPanel: def poll(cls, context): ob = context.object rd = context.scene.render - return (ob and (ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE')) and (rd.engine in cls.COMPAT_ENGINES) and (context.soft_body) + return ob and ob.type in COMPAT_OB_TYPES and rd.engine in cls.COMPAT_ENGINES and context.soft_body class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel): @@ -191,7 +194,7 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel): layout.active = softbody.use_self_collision and softbody_panel_enabled(md) layout.label(text="Collision Ball Size Calculation:") - layout.prop(softbody, "collision_type", expand=True) + layout.row().prop(softbody, "collision_type", expand=True) col = layout.column(align=True) col.label(text="Ball:") diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index a7e8d9273ad..6101c715991 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -275,6 +275,7 @@ class RENDER_PT_performance(RenderButtonsPanel, Panel): col.separator() col.prop(rd, "preview_start_resolution") + col.prop(rd, "preview_pixel_size", text="") col = split.column() col.label(text="Memory:") @@ -286,7 +287,7 @@ class RENDER_PT_performance(RenderButtonsPanel, Panel): sub.prop(rd, "use_free_image_textures") sub = col.column() sub.active = rd.use_raytrace - sub.label(text="Acceleration structure:") + sub.label(text="Acceleration Structure:") sub.prop(rd, "raytrace_method", text="") if rd.raytrace_method == 'OCTREE': sub.prop(rd, "octree_resolution", text="Resolution") @@ -347,7 +348,7 @@ class RENDER_PT_stamp(RenderButtonsPanel, Panel): col.active = rd.use_stamp row = col.row() row.prop(rd, "stamp_font_size", text="Font Size") - row.prop(rd, "use_stamp_labels", text="Draw labels") + row.prop(rd, "use_stamp_labels", text="Draw Labels") row = col.row() row.column().prop(rd, "stamp_foreground", slider=True) @@ -482,9 +483,9 @@ class RENDER_PT_encoding(RenderButtonsPanel, Panel): layout.prop(ffmpeg, "gopsize") # B-Frames row = layout.row() - row.prop(ffmpeg, "use_max_b_frames", text='Max B-frames') + row.prop(ffmpeg, "use_max_b_frames", text="Max B-frames") pbox = row.split() - pbox.prop(ffmpeg, "max_b_frames", text='') + pbox.prop(ffmpeg, "max_b_frames", text="") pbox.enabled = ffmpeg.use_max_b_frames split = layout.split() diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py index d05527b7ef6..880684997bf 100644 --- a/release/scripts/startup/bl_ui/properties_texture.py +++ b/release/scripts/startup/bl_ui/properties_texture.py @@ -165,7 +165,7 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, Panel): pin_id = None if not space.use_pin_id: - layout.prop(space, "texture_context", expand=True) + layout.row().prop(space, "texture_context", expand=True) pin_id = None if space.texture_context == 'OTHER': @@ -318,9 +318,9 @@ class TEXTURE_PT_clouds(TextureTypePanel, Panel): tex = context.texture - layout.prop(tex, "cloud_type", expand=True) + layout.row().prop(tex, "cloud_type", expand=True) layout.label(text="Noise:") - layout.prop(tex, "noise_type", text="Type", expand=True) + layout.row().prop(tex, "noise_type", text="Type", expand=True) layout.prop(tex, "noise_basis", text="Basis") split = layout.split() @@ -342,8 +342,8 @@ class TEXTURE_PT_wood(TextureTypePanel, Panel): tex = context.texture - layout.prop(tex, "noise_basis_2", expand=True) - layout.prop(tex, "wood_type", expand=True) + layout.row().prop(tex, "noise_basis_2", expand=True) + layout.row().prop(tex, "wood_type", expand=True) col = layout.column() col.active = tex.wood_type in {'RINGNOISE', 'BANDNOISE'} @@ -371,10 +371,10 @@ class TEXTURE_PT_marble(TextureTypePanel, Panel): tex = context.texture - layout.prop(tex, "marble_type", expand=True) - layout.prop(tex, "noise_basis_2", expand=True) + layout.row().prop(tex, "marble_type", expand=True) + layout.row().prop(tex, "noise_basis_2", expand=True) layout.label(text="Noise:") - layout.prop(tex, "noise_type", text="Type", expand=True) + layout.row().prop(tex, "noise_type", text="Type", expand=True) layout.prop(tex, "noise_basis", text="Basis") split = layout.split() @@ -431,9 +431,9 @@ class TEXTURE_PT_stucci(TextureTypePanel, Panel): tex = context.texture - layout.prop(tex, "stucci_type", expand=True) + layout.row().prop(tex, "stucci_type", expand=True) layout.label(text="Noise:") - layout.prop(tex, "noise_type", text="Type", expand=True) + layout.row().prop(tex, "noise_type", text="Type", expand=True) layout.prop(tex, "noise_basis", text="Basis") row = layout.row() @@ -808,7 +808,7 @@ class TEXTURE_PT_pointdensity(TextureButtonsPanel, Panel): tex = context.texture pd = tex.point_density - layout.prop(pd, "point_source", expand=True) + layout.row().prop(pd, "point_source", expand=True) split = layout.split() diff --git a/release/scripts/startup/bl_ui/properties_world.py b/release/scripts/startup/bl_ui/properties_world.py index 6aa39580d34..107c31567b3 100644 --- a/release/scripts/startup/bl_ui/properties_world.py +++ b/release/scripts/startup/bl_ui/properties_world.py @@ -175,7 +175,7 @@ class WORLD_PT_gather(WorldButtonsPanel, Panel): layout.active = light.use_ambient_occlusion or light.use_environment_light or light.use_indirect_light - layout.prop(light, "gather_method", expand=True) + layout.row().prop(light, "gather_method", expand=True) split = layout.split() diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 43679727992..57195d22340 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -1033,11 +1033,11 @@ class CLIP_PT_proxy(CLIP_PT_clip_view_panel, Panel): if clip.source == 'MOVIE': col2 = col.column() - col2.label(text="Use timecode index:") + col2.label(text="Use Timecode Index:") col2.prop(clip.proxy, "timecode", text="") col2 = col.column() - col2.label(text="Proxy render size:") + col2.label(text="Proxy Render Size:") col.prop(sc.clip_user, "proxy_render_size", text="") @@ -1418,7 +1418,7 @@ class CLIP_MT_tracking_specials(Menu): text="Enable Markers").action = 'ENABLE' layout.operator("clip.disable_markers", - text="Disable markers").action = 'DISABLE' + text="Disable Markers").action = 'DISABLE' layout.separator() layout.operator("clip.set_origin") diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index f070161f3da..340a6c807df 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -1086,7 +1086,7 @@ class IMAGE_PT_tools_paint_options(BrushButtonsPanel, Panel): col.prop(ups, "use_unified_color", text="Color") -class IMAGE_UV_sculpt_curve(Panel): +class IMAGE_PT_uv_sculpt_curve(Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'TOOLS' bl_label = "UV Sculpt Curve" @@ -1117,7 +1117,7 @@ class IMAGE_UV_sculpt_curve(Panel): row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX' -class IMAGE_UV_sculpt(Panel, ImagePaintPanel): +class IMAGE_PT_uv_sculpt(Panel, ImagePaintPanel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'TOOLS' bl_category = "Tools" @@ -1370,8 +1370,8 @@ classes = ( IMAGE_PT_tools_imagepaint_symmetry, IMAGE_PT_tools_brush_appearance, IMAGE_PT_tools_paint_options, - IMAGE_UV_sculpt, - IMAGE_UV_sculpt_curve, + IMAGE_PT_uv_sculpt, + IMAGE_PT_uv_sculpt_curve, IMAGE_PT_view_histogram, IMAGE_PT_view_waveform, IMAGE_PT_view_vectorscope, diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index b37b3c5705a..e2056905d93 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -187,10 +187,10 @@ class NODE_MT_view(Menu): if context.space_data.show_backdrop: layout.separator() - layout.operator("node.backimage_move", text="Backdrop move") - layout.operator("node.backimage_zoom", text="Backdrop zoom in").factor = 1.2 - layout.operator("node.backimage_zoom", text="Backdrop zoom out").factor = 0.83333 - layout.operator("node.backimage_fit", text="Fit backdrop to available space") + layout.operator("node.backimage_move", text="Backdrop Move") + layout.operator("node.backimage_zoom", text="Backdrop Zoom In").factor = 1.2 + layout.operator("node.backimage_zoom", text="Backdrop Zoom Out").factor = 0.83333 + layout.operator("node.backimage_fit", text="Fit Backdrop to Available Space") layout.separator() @@ -243,7 +243,7 @@ class NODE_MT_node(Menu): layout.separator() - layout.operator("node.join", text="Join in new Frame") + layout.operator("node.join", text="Join in New Frame") layout.operator("node.detach", text="Remove from Frame") layout.separator() diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py index 4eb550bbb35..731ab3d4b14 100644 --- a/release/scripts/startup/bl_ui/space_outliner.py +++ b/release/scripts/startup/bl_ui/space_outliner.py @@ -56,7 +56,7 @@ class OUTLINER_HT_header(Header): row.operator("anim.keyframe_delete", text="", icon='KEY_DEHLT') else: row = layout.row() - row.label(text="No Keying Set active") + row.label(text="No Keying Set Active") elif space.display_mode == 'ORPHAN_DATA': layout.operator("outliner.orphans_purge") diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 6737b8e1089..06dd90685b7 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -43,7 +43,7 @@ def draw_color_balance(layout, color_balance): col.separator() col.separator() col.prop(color_balance, "lift", text="") - col.prop(color_balance, "invert_lift", text="Invert", icon="ARROW_LEFTRIGHT") + col.prop(color_balance, "invert_lift", text="Invert", icon='ARROW_LEFTRIGHT') split.template_color_picker(color_balance, "lift", value_slider=True, cubic=True) box = layout.box() @@ -53,7 +53,7 @@ def draw_color_balance(layout, color_balance): col.separator() col.separator() col.prop(color_balance, "gamma", text="") - col.prop(color_balance, "invert_gamma", text="Invert", icon="ARROW_LEFTRIGHT") + col.prop(color_balance, "invert_gamma", text="Invert", icon='ARROW_LEFTRIGHT') split.template_color_picker(color_balance, "gamma", value_slider=True, lock_luminosity=True, cubic=True) box = layout.box() @@ -63,7 +63,7 @@ def draw_color_balance(layout, color_balance): col.separator() col.separator() col.prop(color_balance, "gain", text="") - col.prop(color_balance, "invert_gain", text="Invert", icon="ARROW_LEFTRIGHT") + col.prop(color_balance, "invert_gain", text="Invert", icon='ARROW_LEFTRIGHT') split.template_color_picker(color_balance, "gain", value_slider=True, lock_luminosity=True, cubic=True) @@ -197,7 +197,7 @@ class SEQUENCER_MT_view(Menu): layout.operator_context = 'INVOKE_DEFAULT' if is_preview: layout.operator_context = 'INVOKE_REGION_PREVIEW' - layout.operator("sequencer.view_all_preview", text="Fit preview in window") + layout.operator("sequencer.view_all_preview", text="Fit Preview in Window") layout.separator() @@ -246,10 +246,10 @@ class SEQUENCER_MT_select(Menu): layout.operator("sequencer.select_active_side", text="Strips to the Left").side = 'LEFT' layout.operator("sequencer.select_active_side", text="Strips to the Right").side = 'RIGHT' - props = layout.operator("sequencer.select", text="All strips to the Left") + props = layout.operator("sequencer.select", text="All Strips to the Left") props.left_right = 'LEFT' props.linked_time = True - props = layout.operator("sequencer.select", text="All strips to the Right") + props = layout.operator("sequencer.select", text="All Strips to the Right") props.left_right = 'RIGHT' props.linked_time = True @@ -338,21 +338,21 @@ class SEQUENCER_MT_add(Menu): if len(bpy.data.scenes) > 10: layout.operator_context = 'INVOKE_DEFAULT' - layout.operator("sequencer.scene_strip_add", text="Scene") + layout.operator("sequencer.scene_strip_add", text="Scene...") else: - layout.operator_menu_enum("sequencer.scene_strip_add", "scene", text="Scene...") + layout.operator_menu_enum("sequencer.scene_strip_add", "scene", text="Scene") if len(bpy.data.movieclips) > 10: layout.operator_context = 'INVOKE_DEFAULT' - layout.operator("sequencer.movieclip_strip_add", text="Clips") + layout.operator("sequencer.movieclip_strip_add", text="Clips...") else: - layout.operator_menu_enum("sequencer.movieclip_strip_add", "clip", text="Clip...") + layout.operator_menu_enum("sequencer.movieclip_strip_add", "clip", text="Clip") if len(bpy.data.masks) > 10: layout.operator_context = 'INVOKE_DEFAULT' - layout.operator("sequencer.mask_strip_add", text="Masks") + layout.operator("sequencer.mask_strip_add", text="Masks...") else: - layout.operator_menu_enum("sequencer.mask_strip_add", "mask", text="Mask...") + layout.operator_menu_enum("sequencer.mask_strip_add", "mask", text="Mask") layout.operator("sequencer.movie_strip_add", text="Movie") layout.operator("sequencer.image_strip_add", text="Image") @@ -397,15 +397,15 @@ class SEQUENCER_MT_strip(Menu): layout.operator_context = 'INVOKE_REGION_WIN' layout.operator("transform.transform", text="Grab/Move").mode = 'TRANSLATION' - layout.operator("transform.transform", text="Grab/Extend from frame").mode = 'TIME_EXTEND' + layout.operator("transform.transform", text="Grab/Extend from Frame").mode = 'TIME_EXTEND' layout.operator("sequencer.gap_remove").all = False layout.operator("sequencer.gap_insert") # uiItemO(layout, NULL, 0, "sequencer.strip_snap"); // TODO - add this operator layout.separator() - layout.operator("sequencer.cut", text="Cut (hard) at frame").type = 'HARD' - layout.operator("sequencer.cut", text="Cut (soft) at frame").type = 'SOFT' + layout.operator("sequencer.cut", text="Cut (Hard) at Frame").type = 'HARD' + layout.operator("sequencer.cut", text="Cut (Soft) at Frame").type = 'SOFT' layout.operator("sequencer.slip", text="Slip Strip Contents") layout.operator("sequencer.images_separate") layout.operator("sequencer.offset_clear") @@ -631,7 +631,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel): if strip.use_as_speed: layout.prop(strip, "speed_factor") else: - layout.prop(strip, "speed_factor", text="Frame number") + layout.prop(strip, "speed_factor", text="Frame Number") layout.prop(strip, "scale_to_length") elif strip.type == 'TRANSFORM': @@ -698,7 +698,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel): row.label("") else: col.separator() - col.label(text="Two or more channels are needed below this strip", icon="INFO") + col.label(text="Two or more channels are needed below this strip", icon='INFO') elif strip.type == 'TEXT': @@ -728,7 +728,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel): elif strip.type in {'CROSS', 'GAMMA_CROSS', 'WIPE', 'ALPHA_OVER', 'ALPHA_UNDER', 'OVER_DROP'}: col.prop(strip, "use_default_fade", "Default fade") if not strip.use_default_fade: - col.prop(strip, "effect_fader", text="Effect fader") + col.prop(strip, "effect_fader", text="Effect Fader") elif strip.type == 'GAUSSIAN_BLUR': row = col.row(align=True) row.prop(strip, "size_x") @@ -784,7 +784,7 @@ class SEQUENCER_PT_input(SequencerButtonsPanel, Panel): split.label(text="Alpha:") split.prop(strip, "alpha_mode", text="") - layout.operator("sequencer.change_path", icon="FILESEL").filter_image = True + layout.operator("sequencer.change_path", icon='FILESEL').filter_image = True elif seq_type == 'MOVIE': split = layout.split(percentage=0.2) @@ -1056,9 +1056,9 @@ class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel): proxy = strip.proxy flow = layout.column_flow() - flow.prop(sequencer, "proxy_storage", text='Storage') + flow.prop(sequencer, "proxy_storage", text="Storage") if sequencer.proxy_storage == 'PROJECT': - flow.prop(sequencer, "proxy_dir", text='Directory') + flow.prop(sequencer, "proxy_dir", text="Directory") else: flow.prop(proxy, "use_proxy_custom_directory") flow.prop(proxy, "use_proxy_custom_file") @@ -1077,7 +1077,7 @@ class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel): layout.prop(proxy, "use_overwrite") col = layout.column() - col.prop(proxy, "quality", text="Build JPEG quality") + col.prop(proxy, "quality", text="Build JPEG Quality") if strip.type == 'MOVIE': col = layout.column() @@ -1101,9 +1101,6 @@ class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel): render = context.scene.render col = layout.column() - col.prop(render, "use_sequencer_gl_preview", text="OpenGL Preview") - col = layout.column() - #col.active = render.use_sequencer_gl_preview col.prop(render, "sequencer_gl_preview", text="") row = col.row() diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py index b9a25cd72a0..9930992e9bb 100644 --- a/release/scripts/startup/bl_ui/space_time.py +++ b/release/scripts/startup/bl_ui/space_time.py @@ -250,7 +250,7 @@ def marker_menu_generic(layout): layout.operator_context = 'INVOKE_DEFAULT' layout.operator("marker.make_links_scene", text="Duplicate Marker to Scene...", icon='OUTLINER_OB_EMPTY') else: - layout.operator_menu_enum("marker.make_links_scene", "scene", text="Duplicate Marker to Scene...") + layout.operator_menu_enum("marker.make_links_scene", "scene", text="Duplicate Marker to Scene") layout.operator("marker.delete", text="Delete Marker") diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 5ed481a215a..5ba1f0b8dcb 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -80,7 +80,7 @@ class USERPREF_PT_tabs(Panel): userpref = context.user_preferences - layout.prop(userpref, "active_section", expand=True) + layout.row().prop(userpref, "active_section", expand=True) class USERPREF_MT_interaction_presets(Menu): @@ -127,7 +127,7 @@ class USERPREF_MT_app_templates(Menu): text=bpy.path.display_name(d), ) props.use_splash = True - props.app_template = d; + props.app_template = d if use_install: layout.separator() @@ -218,6 +218,7 @@ class USERPREF_PT_interface(Panel): col = row.column() col.label(text="Display:") col.prop(view, "ui_scale", text="Scale") + col.prop(view, "ui_line_width", text="Line Width") col.prop(view, "show_tooltips") col.prop(view, "show_tooltips_python") col.prop(view, "show_object_info", text="Object Info") @@ -249,6 +250,7 @@ class USERPREF_PT_interface(Panel): col = row.column() col.label(text="View Manipulation:") col.prop(view, "use_mouse_depth_cursor") + col.prop(view, "use_cursor_lock_adjust") col.prop(view, "use_mouse_depth_navigate") col.prop(view, "use_zoom_to_mouse") col.prop(view, "use_rotate_around_active") @@ -477,7 +479,7 @@ class USERPREF_PT_system(Panel): col.label(text="Sound:") col.row().prop(system, "audio_device", expand=False) sub = col.column() - sub.active = system.audio_device != 'NONE' and system.audio_device != 'Null' + sub.active = system.audio_device not in {'NONE', 'Null'} #sub.prop(system, "use_preview_images") sub.prop(system, "audio_channels", text="Channels") sub.prop(system, "audio_mixing_buffer", text="Mixing Buffer") @@ -560,7 +562,7 @@ class USERPREF_PT_system(Panel): # 3. Column column = split.column() - column.label(text="Solid OpenGL lights:") + column.label(text="Solid OpenGL Lights:") split = column.split(percentage=0.1) split.label() @@ -1105,29 +1107,29 @@ class USERPREF_MT_ndof_settings(Menu): layout.prop(input_prefs, "ndof_show_guide") layout.separator() - layout.label(text="Orbit style") + layout.label(text="Orbit Style") layout.row().prop(input_prefs, "ndof_view_navigate_method", text="") layout.row().prop(input_prefs, "ndof_view_rotate_method", text="") layout.separator() - layout.label(text="Orbit options") + layout.label(text="Orbit Options") layout.prop(input_prefs, "ndof_rotx_invert_axis") layout.prop(input_prefs, "ndof_roty_invert_axis") layout.prop(input_prefs, "ndof_rotz_invert_axis") # view2d use pan/zoom layout.separator() - layout.label(text="Pan options") + layout.label(text="Pan Options") layout.prop(input_prefs, "ndof_panx_invert_axis") layout.prop(input_prefs, "ndof_pany_invert_axis") layout.prop(input_prefs, "ndof_panz_invert_axis") layout.prop(input_prefs, "ndof_pan_yz_swap_axis") - layout.label(text="Zoom options") + layout.label(text="Zoom Options") layout.prop(input_prefs, "ndof_zoom_invert") if is_view3d: layout.separator() - layout.label(text="Fly/Walk options") + layout.label(text="Fly/Walk Options") layout.prop(input_prefs, "ndof_fly_helicopter", icon='NDOF_FLY') layout.prop(input_prefs, "ndof_lock_horizon", icon='NDOF_DOM') @@ -1452,7 +1454,7 @@ class USERPREF_PT_addons(Panel): sub = row.row() sub.active = is_enabled - sub.label(text='%s: %s' % (info["category"], info["name"])) + sub.label(text="%s: %s" % (info["category"], info["name"])) if info["warning"]: sub.label(icon='ERROR') @@ -1480,11 +1482,11 @@ class USERPREF_PT_addons(Panel): if info["version"]: split = colsub.row().split(percentage=0.15) split.label(text="Version:") - split.label(text='.'.join(str(x) for x in info["version"]), translate=False) + split.label(text=".".join(str(x) for x in info["version"]), translate=False) if info["warning"]: split = colsub.row().split(percentage=0.15) split.label(text="Warning:") - split.label(text=' ' + info["warning"], icon='ERROR') + split.label(text=" " + info["warning"], icon='ERROR') user_addon = USERPREF_PT_addons.is_user_addon(mod, user_addon_paths) tot_row = bool(info["wiki_url"]) + bool(user_addon) diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 42a6d3138a7..0ba64a1177f 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -294,7 +294,8 @@ class VIEW3D_MT_transform_object(VIEW3D_MT_transform_base): layout.operator("object.origin_set", text="Geometry to Origin").type = 'GEOMETRY_ORIGIN' layout.operator("object.origin_set", text="Origin to Geometry").type = 'ORIGIN_GEOMETRY' layout.operator("object.origin_set", text="Origin to 3D Cursor").type = 'ORIGIN_CURSOR' - layout.operator("object.origin_set", text="Origin to Center of Mass").type = 'ORIGIN_CENTER_OF_MASS' + layout.operator("object.origin_set", text="Origin to Center of Mass (Surface)").type = 'ORIGIN_CENTER_OF_MASS' + layout.operator("object.origin_set", text="Origin to Center of Mass (Volume)").type = 'ORIGIN_CENTER_OF_VOLUME' layout.separator() layout.operator("object.randomize_transform") @@ -1255,14 +1256,14 @@ class INFO_MT_add(Menu): layout.menu("INFO_MT_lamp_add", icon='OUTLINER_OB_LAMP') layout.separator() - layout.operator_menu_enum("object.effector_add", "type", text="Force Field", icon='OUTLINER_OB_EMPTY') + layout.operator_menu_enum("object.effector_add", "type", text="Force Field", icon='OUTLINER_OB_FORCE_FIELD') layout.separator() if len(bpy.data.groups) > 10: layout.operator_context = 'INVOKE_REGION_WIN' - layout.operator("object.group_instance_add", text="Group Instance...", icon='OUTLINER_OB_EMPTY') + layout.operator("object.group_instance_add", text="Group Instance...", icon='OUTLINER_OB_GROUP_INSTANCE') else: - layout.operator_menu_enum("object.group_instance_add", "group", text="Group Instance", icon='OUTLINER_OB_EMPTY') + layout.operator_menu_enum("object.group_instance_add", "group", text="Group Instance", icon='OUTLINER_OB_GROUP_INSTANCE') # ********** Object menu ********** @@ -1663,7 +1664,7 @@ class VIEW3D_MT_make_links(Menu): layout.operator("object.make_links_scene", text="Objects to Scene...", icon='OUTLINER_OB_EMPTY') else: layout.operator_context = 'EXEC_REGION_WIN' - layout.operator_menu_enum("object.make_links_scene", "scene", text="Objects to Scene...") + layout.operator_menu_enum("object.make_links_scene", "scene", text="Objects to Scene") layout.operator_context = operator_context_default layout.operator_enum("object.make_links_data", "type") # inline @@ -1710,7 +1711,7 @@ class VIEW3D_MT_brush(Menu): # skip if no active brush if not brush: - layout.label(text="No Brushes currently available", icon="INFO") + layout.label(text="No Brushes currently available", icon='INFO') return # brush paint modes @@ -2115,7 +2116,7 @@ class VIEW3D_MT_pose_transform(Menu): layout.separator() - layout.operator("pose.user_transforms_clear", text="Reset unkeyed") + layout.operator("pose.user_transforms_clear", text="Reset Unkeyed") class VIEW3D_MT_pose_slide(Menu): @@ -3536,7 +3537,7 @@ class VIEW3D_PT_view3d_meshstatvis(Panel): row = layout.row(align=True) row.prop(statvis, "overhang_min", text="") row.prop(statvis, "overhang_max", text="") - layout.prop(statvis, "overhang_axis", expand=True) + layout.row().prop(statvis, "overhang_axis", expand=True) elif statvis_type == 'THICKNESS': row = layout.row(align=True) row.prop(statvis, "thickness_min", text="") diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index ca33d54a781..ec2e458ea7a 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -929,16 +929,18 @@ class VIEW3D_PT_imapaint_tools_missing(Panel, View3DPaintPanel): col.separator() col.label("Missing Canvas", icon='INFO') col.label("Add or assign a canvas image below") - col.label("Canvas Image") - col.template_ID(toolsettings, "canvas") + col.label("Canvas Image:") + # todo this should be combinded into a single row + col.template_ID(toolsettings, "canvas", open="image.open") col.operator("image.new", text="New").gen_context = 'PAINT_CANVAS' if toolsettings.missing_stencil: col.separator() col.label("Missing Stencil", icon='INFO') col.label("Add or assign a stencil image below") - col.label("Stencil Image") - col.template_ID(toolsettings, "stencil_image") + col.label("Stencil Image:") + # todo this should be combinded into a single row + col.template_ID(toolsettings, "stencil_image", open="image.open") col.operator("image.new", text="New").gen_context = 'PAINT_STENCIL' @@ -980,9 +982,9 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel): col.prop(brush, "steps", slider=True) col.prop(settings, "default_key_count", slider=True) elif tool == 'LENGTH': - layout.prop(brush, "length_mode", expand=True) + layout.row().prop(brush, "length_mode", expand=True) elif tool == 'PUFF': - layout.prop(brush, "puff_mode", expand=True) + layout.row().prop(brush, "puff_mode", expand=True) layout.prop(brush, "use_puff_volume") # Sculpt Mode # @@ -1232,20 +1234,20 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel): ob = context.active_object col = layout.column() - col.label("Painting Mode") + col.label("Painting Mode:") col.prop(settings, "mode", text="") col.separator() if settings.mode == 'MATERIAL': if len(ob.material_slots) > 1: - col.label("Materials") + col.label("Materials:") col.template_list("MATERIAL_UL_matslots", "layers", ob, "material_slots", ob, "active_material_index", rows=2) mat = ob.active_material if mat: - col.label("Available Paint Slots") + col.label("Available Paint Slots:") col.template_list("TEXTURE_UL_texpaintslots", "", mat, "texture_paint_images", mat, "paint_active_slot", rows=2) @@ -1265,16 +1267,17 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel): col.separator() if slot and slot.index != -1: - col.label("UV Map") + col.label("UV Map:") col.prop_search(slot, "uv_layer", ob.data, "uv_textures", text="") elif settings.mode == 'IMAGE': mesh = ob.data uv_text = mesh.uv_textures.active.name if mesh.uv_textures.active else "" - col.label("Canvas Image") - col.template_ID(settings, "canvas") + col.label("Canvas Image:") + # todo this should be combinded into a single row + col.template_ID(settings, "canvas", open="image.open") col.operator("image.new", text="New").gen_context = 'PAINT_CANVAS' - col.label("UV Map") + col.label("UV Map:") col.menu("VIEW3D_MT_tools_projectpaint_uvlayer", text=uv_text, translate=False) col.separator() @@ -1308,14 +1311,15 @@ class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel): col.active = ipaint.use_stencil_layer stencil_text = mesh.uv_texture_stencil.name if mesh.uv_texture_stencil else "" - col.label("UV Map") + col.label("UV Map:") col.menu("VIEW3D_MT_tools_projectpaint_stencil", text=stencil_text, translate=False) - col.label("Stencil Image") - col.template_ID(ipaint, "stencil_image") + col.label("Stencil Image:") + # todo this should be combinded into a single row + col.template_ID(ipaint, "stencil_image", open="image.open") col.operator("image.new", text="New").gen_context = 'PAINT_STENCIL' - col.label("Visualization") + col.label("Visualization:") row = col.row(align=True) row.prop(ipaint, "stencil_color", text="") row.prop(ipaint, "invert_stencil", text="", icon='IMAGE_ALPHA') @@ -1982,7 +1986,7 @@ class VIEW3D_PT_tools_particlemode(View3DPanel, Panel): col = layout.column(align=True) if pe.is_hair: col.active = pe.is_editable - col.prop(pe, "use_emitter_deflect", text="Deflect emitter") + col.prop(pe, "use_emitter_deflect", text="Deflect Emitter") sub = col.row(align=True) sub.active = pe.use_emitter_deflect sub.prop(pe, "emitter_distance", text="Distance") diff --git a/release/scripts/startup/keyingsets_builtins.py b/release/scripts/startup/keyingsets_builtins.py index ce0b1b62d44..390c043bb31 100644 --- a/release/scripts/startup/keyingsets_builtins.py +++ b/release/scripts/startup/keyingsets_builtins.py @@ -494,7 +494,7 @@ class BUILTIN_KSI_WholeCharacter(KeyingSetInfo): # bendy bone properties def doBBone(ksi, context, ks, pchan): bone = pchan.bone - + # This check is crude, but is the best we can do for now # It simply adds all of these if the bbone has segments # (and the bone is a control bone). This may lead to some @@ -643,26 +643,29 @@ class BUILTIN_KSI_DeltaScale(KeyingSetInfo): ############################### +# Note that this controls order of options in 'insert keyframe' menu. +# Better try to keep some logical order here beyond mere alphabetical one, also because of menu entries shortcut. +# See also T51867. classes = ( BUILTIN_KSI_Available, - BUILTIN_KSI_BendyBones, - BUILTIN_KSI_DeltaLocation, - BUILTIN_KSI_DeltaRotation, - BUILTIN_KSI_DeltaScale, + BUILTIN_KSI_Location, + BUILTIN_KSI_Rotation, + BUILTIN_KSI_Scaling, BUILTIN_KSI_LocRot, BUILTIN_KSI_LocRotScale, BUILTIN_KSI_LocScale, - BUILTIN_KSI_Location, BUILTIN_KSI_RotScale, - BUILTIN_KSI_Rotation, - BUILTIN_KSI_Scaling, + BUILTIN_KSI_DeltaLocation, + BUILTIN_KSI_DeltaRotation, + BUILTIN_KSI_DeltaScale, BUILTIN_KSI_VisualLoc, + BUILTIN_KSI_VisualRot, + BUILTIN_KSI_VisualScaling, BUILTIN_KSI_VisualLocRot, BUILTIN_KSI_VisualLocRotScale, BUILTIN_KSI_VisualLocScale, - BUILTIN_KSI_VisualRot, BUILTIN_KSI_VisualRotScale, - BUILTIN_KSI_VisualScaling, + BUILTIN_KSI_BendyBones, BUILTIN_KSI_WholeCharacter, BUILTIN_KSI_WholeCharacterSelected, ) diff --git a/release/scripts/templates_py/custom_nodes.py b/release/scripts/templates_py/custom_nodes.py index 32c61abace7..8ca748c1d66 100644 --- a/release/scripts/templates_py/custom_nodes.py +++ b/release/scripts/templates_py/custom_nodes.py @@ -11,7 +11,7 @@ class MyCustomTree(NodeTree): # Optional identifier string. If not explicitly defined, the python class name is used. bl_idname = 'CustomTreeType' # Label for nice name display - bl_label = 'Custom Node Tree' + bl_label = "Custom Node Tree" # Icon identifier bl_icon = 'NODETREE' @@ -23,24 +23,24 @@ class MyCustomSocket(NodeSocket): # Optional identifier string. If not explicitly defined, the python class name is used. bl_idname = 'CustomSocketType' # Label for nice name display - bl_label = 'Custom Node Socket' + bl_label = "Custom Node Socket" # Enum items list - my_items = [ - ("DOWN", "Down", "Where your feet are"), - ("UP", "Up", "Where your head should be"), - ("LEFT", "Left", "Not right"), - ("RIGHT", "Right", "Not left") - ] + my_items = ( + ('DOWN', "Down", "Where your feet are"), + ('UP', "Up", "Where your head should be"), + ('LEFT', "Left", "Not right"), + ('RIGHT', "Right", "Not left") + ) - myEnumProperty = bpy.props.EnumProperty(name="Direction", description="Just an example", items=my_items, default='UP') + my_enum_prop = bpy.props.EnumProperty(name="Direction", description="Just an example", items=my_items, default='UP') # Optional function for drawing the socket input value def draw(self, context, layout, node, text): if self.is_output or self.is_linked: layout.label(text) else: - layout.prop(self, "myEnumProperty", text=text) + layout.prop(self, "my_enum_prop", text=text) # Socket color def draw_color(self, context, node): @@ -63,7 +63,7 @@ class MyCustomNode(Node, MyCustomTreeNode): # Optional identifier string. If not explicitly defined, the python class name is used. bl_idname = 'CustomNodeType' # Label for nice name display - bl_label = 'Custom Node' + bl_label = "Custom Node" # Icon identifier bl_icon = 'SOUND' @@ -71,8 +71,8 @@ class MyCustomNode(Node, MyCustomTreeNode): # These work just like custom properties in ID data blocks # Extensive information can be found under # http://wiki.blender.org/index.php/Doc:2.6/Manual/Extensions/Python/Properties - myStringProperty = bpy.props.StringProperty() - myFloatProperty = bpy.props.FloatProperty(default=3.1415926) + my_string_prop = bpy.props.StringProperty() + my_float_prop = bpy.props.FloatProperty(default=3.1415926) # === Optional Functions === # Initialization function, called when a new node is created. @@ -99,14 +99,14 @@ class MyCustomNode(Node, MyCustomTreeNode): # Additional buttons displayed on the node. def draw_buttons(self, context, layout): layout.label("Node settings") - layout.prop(self, "myFloatProperty") + layout.prop(self, "my_float_prop") # Detail buttons in the sidebar. # If this function is not defined, the draw_buttons function is used instead def draw_buttons_ext(self, context, layout): - layout.prop(self, "myFloatProperty") - # myStringProperty button will only be visible in the sidebar - layout.prop(self, "myStringProperty") + layout.prop(self, "my_float_prop") + # my_string_prop button will only be visible in the sidebar + layout.prop(self, "my_string_prop") # Optional: custom label # Explicit user label overrides this, but here we can define a label dynamically @@ -122,7 +122,6 @@ class MyCustomNode(Node, MyCustomTreeNode): import nodeitems_utils from nodeitems_utils import NodeCategory, NodeItem - # our own base class with an appropriate poll function, # so the categories only show up in our own tree type class MyNodeCategory(NodeCategory): @@ -130,44 +129,50 @@ class MyNodeCategory(NodeCategory): def poll(cls, context): return context.space_data.tree_type == 'CustomTreeType' + # all categories in a list node_categories = [ # identifier, label, items list - MyNodeCategory("SOMENODES", "Some Nodes", items=[ + MyNodeCategory('SOMENODES', "Some Nodes", items=[ # our basic node NodeItem("CustomNodeType"), - ]), - MyNodeCategory("OTHERNODES", "Other Nodes", items=[ + ]), + MyNodeCategory('OTHERNODES', "Other Nodes", items=[ # the node item can have additional settings, # which are applied to new nodes # NB: settings values are stored as string expressions, # for this reason they should be converted to strings using repr() NodeItem("CustomNodeType", label="Node A", settings={ - "myStringProperty": repr("Lorem ipsum dolor sit amet"), - "myFloatProperty": repr(1.0), - }), + "my_string_prop": repr("Lorem ipsum dolor sit amet"), + "my_float_prop": repr(1.0), + }), NodeItem("CustomNodeType", label="Node B", settings={ - "myStringProperty": repr("consectetur adipisicing elit"), - "myFloatProperty": repr(2.0), - }), - ]), - ] - + "my_string_prop": repr("consectetur adipisicing elit"), + "my_float_prop": repr(2.0), + }), + ]), +] + +classes = ( + MyCustomTree, + MyCustomSocket, + MyCustomNode, +) def register(): - bpy.utils.register_class(MyCustomTree) - bpy.utils.register_class(MyCustomSocket) - bpy.utils.register_class(MyCustomNode) + from bpy.utils import register_class + for cls in classes: + register_class(cls) - nodeitems_utils.register_node_categories("CUSTOM_NODES", node_categories) + nodeitems_utils.register_node_categories('CUSTOM_NODES', node_categories) def unregister(): - nodeitems_utils.unregister_node_categories("CUSTOM_NODES") + nodeitems_utils.unregister_node_categories('CUSTOM_NODES') - bpy.utils.unregister_class(MyCustomTree) - bpy.utils.unregister_class(MyCustomSocket) - bpy.utils.unregister_class(MyCustomNode) + from bpy.utils import unregister_class + for cls in reversed(classes): + unregister_class(cls) if __name__ == "__main__": diff --git a/release/scripts/templates_py/gamelogic.py b/release/scripts/templates_py/gamelogic.py index 01ac27c56cd..e589ad43e63 100644 --- a/release/scripts/templates_py/gamelogic.py +++ b/release/scripts/templates_py/gamelogic.py @@ -62,7 +62,7 @@ def main(): # adding to our objects "life" property """ actu_collide = cont.sensors["collision_sens"] - for ob in actu_collide.objectHitList: + for ob in actu_collide.hitObjectList: # Check to see the object has this property if "life" in ob: own["life"] += ob["life"] |