diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-14 09:51:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-14 09:51:38 +0300 |
commit | 10a4add4fae2adbc1dbf87df743a8cd00dc565aa (patch) | |
tree | ff73c9d98e27a51edaa81725af616d11483b407e | |
parent | a6221258081ac6aa5666cb4bcaeb93365c12ef81 (diff) | |
parent | 9ca218bf4252869dda11b44029cdebfcbff9aad1 (diff) |
Merge branch 'master' into blender2.8
-rw-r--r-- | io_anim_bvh/__init__.py | 1 | ||||
-rw-r--r-- | io_mesh_ply/__init__.py | 1 | ||||
-rw-r--r-- | io_scene_3ds/__init__.py | 1 | ||||
-rw-r--r-- | mesh_bsurfaces.py | 11 | ||||
-rw-r--r-- | space_view3d_math_vis/__init__.py | 99 |
5 files changed, 69 insertions, 44 deletions
diff --git a/io_anim_bvh/__init__.py b/io_anim_bvh/__init__.py index 27c8003b..8a63fbbc 100644 --- a/io_anim_bvh/__init__.py +++ b/io_anim_bvh/__init__.py @@ -21,6 +21,7 @@ bl_info = { "name": "BioVision Motion Capture (BVH) format", "author": "Campbell Barton", + "version": (1, 0, 0), "blender": (2, 74, 0), "location": "File > Import-Export", "description": "Import-Export BVH from armature objects", diff --git a/io_mesh_ply/__init__.py b/io_mesh_ply/__init__.py index 3e84a4fd..77259690 100644 --- a/io_mesh_ply/__init__.py +++ b/io_mesh_ply/__init__.py @@ -21,6 +21,7 @@ bl_info = { "name": "Stanford PLY format", "author": "Bruce Merry, Campbell Barton", + "version": (1, 0, 0), "blender": (2, 74, 0), "location": "File > Import-Export", "description": "Import-Export PLY mesh data withs UV's and vertex colors", diff --git a/io_scene_3ds/__init__.py b/io_scene_3ds/__init__.py index 4436141e..9236c07e 100644 --- a/io_scene_3ds/__init__.py +++ b/io_scene_3ds/__init__.py @@ -21,6 +21,7 @@ bl_info = { "name": "Autodesk 3DS format", "author": "Bob Holcomb, Campbell Barton", + "version": (1, 0, 0), "blender": (2, 74, 0), "location": "File > Import-Export", "description": "Import-Export 3DS, meshes, uvs, materials, textures, " diff --git a/mesh_bsurfaces.py b/mesh_bsurfaces.py index 80943858..d6c855de 100644 --- a/mesh_bsurfaces.py +++ b/mesh_bsurfaces.py @@ -1592,10 +1592,11 @@ class GPENCIL_OT_SURFSK_add_surface(Operator): final_ob_duplicate = bpy.context.scene.objects.active bpy.ops.object.modifier_add('INVOKE_REGION_WIN', type='SHRINKWRAP') - final_ob_duplicate.modifiers["Shrinkwrap"].wrap_method = "NEAREST_VERTEX" - final_ob_duplicate.modifiers["Shrinkwrap"].target = self.main_object + shrinkwrap_modifier = final_ob_duplicate.modifiers[-1] + shrinkwrap_modifier.wrap_method = "NEAREST_VERTEX" + shrinkwrap_modifier.target = self.main_object - bpy.ops.object.modifier_apply('INVOKE_REGION_WIN', apply_as='DATA', modifier='Shrinkwrap') + bpy.ops.object.modifier_apply('INVOKE_REGION_WIN', apply_as='DATA', modifier=shrinkwrap_modifier.name) # Make list with verts of original mesh as index and coords as value main_object_verts_coords = [] @@ -3156,8 +3157,10 @@ class GPENCIL_OT_SURFSK_add_surface(Operator): # XXX gpencil.convert now keep org object as active/selected, *not* newly created curve! # XXX This is far from perfect, but should work in most cases... # self.original_curve = bpy.context.object + gplayer_prefix_translated = bpy.app.translations.pgettext_data('GP_Layer') for ob in bpy.context.selected_objects: - if ob != bpy.context.scene.objects.active and ob.name.startswith("GP_Layer"): + if ob != bpy.context.scene.objects.active and \ + ob.name.startswith((gplayer_prefix_translated, 'GP_Layer')): self.original_curve = ob self.using_external_curves = False elif self.strokes_type == "EXTERNAL_CURVE": diff --git a/space_view3d_math_vis/__init__.py b/space_view3d_math_vis/__init__.py index df220136..50d399f2 100644 --- a/space_view3d_math_vis/__init__.py +++ b/space_view3d_math_vis/__init__.py @@ -42,20 +42,20 @@ else: import bpy from bpy.types import ( - Operator, - Panel, - PropertyGroup, - UIList, - ) + Operator, + Panel, + PropertyGroup, + UIList, +) from bpy.props import ( - StringProperty, - BoolProperty, - BoolVectorProperty, - FloatProperty, - IntProperty, - PointerProperty, - CollectionProperty, - ) + StringProperty, + BoolProperty, + BoolVectorProperty, + FloatProperty, + IntProperty, + PointerProperty, + CollectionProperty, +) class PanelConsoleVars(Panel): @@ -77,14 +77,14 @@ class PanelConsoleVars(Panel): col.label("No vars to display") else: layout.template_list( - 'MathVisVarList', - 'MathVisStatePropList', - bpy.context.window_manager, - 'MathVisStatePropList', - bpy.context.window_manager.MathVisProp, - 'index', - rows=10 - ) + 'MathVisVarList', + 'MathVisStatePropList', + bpy.context.window_manager, + 'MathVisStatePropList', + bpy.context.window_manager.MathVisProp, + 'index', + rows=10 + ) col = layout.column() col.prop(bpy.context.window_manager.MathVisProp, "name_hide") col.prop(bpy.context.window_manager.MathVisProp, "bbox_hide") @@ -220,40 +220,58 @@ class MathVisVarList(UIList): class MathVis(PropertyGroup): index = IntProperty( - name="index" - ) + name="index" + ) bbox_hide = BoolProperty( - name="Hide BBoxes", - default=False, - description="Hide the bounding boxes rendered for Matrix like items", - update=call_console_hook - ) + name="Hide BBoxes", + default=False, + description="Hide the bounding boxes rendered for Matrix like items", + update=call_console_hook + ) name_hide = BoolProperty( - name="Hide Names", - default=False, - description="Hide the names of the rendered items", - update=call_console_hook - ) + name="Hide Names", + default=False, + description="Hide the names of the rendered items", + update=call_console_hook + ) bbox_scale = FloatProperty( - name="Scale factor", - min=0, default=1, - description="Resize the Bounding Box and the coordinate " - "lines for the display of Matrix items" - ) + name="Scale factor", + min=0, default=1, + description="Resize the Bounding Box and the coordinate " + "lines for the display of Matrix items" + ) + + +classes = ( + PanelConsoleVars, + DeleteVar, + ToggleDisplay, + ToggleLock, + ToggleMatrixBBoxDisplay, + CleanupConsole, + MathVisStateProp, + MathVisVarList, + MathVis, +) def register(): + from bpy.utils import register_class + draw.callback_enable() import console_python console_python.execute.hooks.append((console_hook, ())) - bpy.utils.register_module(__name__) + for cls in classes: + bpy.utils.register_class(cls) bpy.types.WindowManager.MathVisProp = PointerProperty(type=MathVis) bpy.types.WindowManager.MathVisStatePropList = CollectionProperty(type=MathVisStateProp) bpy.types.CONSOLE_MT_console.prepend(menu_func_cleanup) def unregister(): + from bpy.utils import unregister_class + draw.callback_disable() import console_python @@ -262,4 +280,5 @@ def unregister(): del bpy.types.WindowManager.MathVisProp del bpy.types.WindowManager.MathVisStatePropList - bpy.utils.unregister_module(__name__) + for cls in classes: + unregister_class(cls) |