Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Fri, 7 Sep 2018 20:21:30 +0000 (06:21 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 7 Sep 2018 20:21:52 +0000 (06:21 +1000)
14 files changed:
1  2 
add_dimension.py
io_directx_bel/__init__.py
io_import_BrushSet.py
io_import_sound_to_anim.py
io_points_pcd/__init__.py
io_scene_cod/import_xmodel.py
io_scene_map/__init__.py
mesh_ktools.py
mesh_xoffsets.py
np_station/utils_graphics.py
object_particle_hair_lab.py
oscurart_mesh_thread.py
space_view3d_enhanced_3d_cursor.py
space_view3d_toolshelf_menu.py

Simple merge
@@@ -288,8 -288,8 +288,8 @@@ def register()
  def unregister():
      bpy.utils.unregister_module(__name__)
  
 -    bpy.types.INFO_MT_file_import.remove(menu_func_import)
 -    #bpy.types.INFO_MT_file_export.remove(menu_func_export)
 +    bpy.types.TOPBAR_MT_file_import.remove(menu_func_import)
 +    #bpy.types.TOPBAR_MT_file_export.remove(menu_func_export)
  
  if __name__ == "__main__":
-     register()
+     register()
Simple merge
Simple merge
- # ##### BEGIN GPL LICENSE BLOCK #####\r
- #\r
- #  This program is free software; you can redistribute it and/or\r
- #  modify it under the terms of the GNU General Public License\r
- #  as published by the Free Software Foundation; either version 2\r
- #  of the License, or (at your option) any later version.\r
- #\r
- #  This program is distributed in the hope that it will be useful,\r
- #  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- #  GNU General Public License for more details.\r
- #\r
- #  You should have received a copy of the GNU General Public License\r
- #  along with this program; if not, write to the Free Software Foundation,\r
- #  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r
- #\r
- # ##### END GPL LICENSE BLOCK #####\r
\r
- bl_info = {\r
-     "name": "PCD",\r
-     "author": "Aurel Wildfellner",\r
-     "version": (0, 2),\r
-     "blender": (2, 57, 0),\r
-     "location": "File > Import-Export > Point Cloud Data",\r
-     "description": "Imports and Exports PCD (Point Cloud Data) files. PCD files are the default format used by  pcl (Point Cloud Library).",\r
-     "warning": "",\r
-     "wiki_url": "http://wiki.blender.org/index.php?title=Extensions:2.6/Py/Scripts/Import-Export/Point_Cloud_Data_IO",\r
-     "tracker_url": "https://developer.blender.org/maniphest/task/edit/form/2/",\r
- #    "support": 'OFFICAL',\r
-     "category": "Import-Export"}\r
\r
\r
- if "bpy" in locals():\r
-     import imp\r
-     imp.reload(pcd_utils)\r
- else:\r
-     from . import pcd_utils\r
\r
- import itertools\r
- import os\r
\r
\r
- import bpy\r
- from bpy.props import *\r
- from bpy_extras.io_utils import ExportHelper, ImportHelper\r
\r
\r
- class ImportPCD(bpy.types.Operator, ImportHelper):\r
-     """Load PCD (Point Cloud Data) files"""\r
-     bl_idname = "import_points.stl"\r
-     bl_label = "Import PCD"\r
\r
-     filename_ext = ".pcd"\r
\r
-     filter_glob = StringProperty(default="*.pcd", options={'HIDDEN'})\r
-     object_name = StringProperty(default="", options={'HIDDEN'})\r
\r
-     files = CollectionProperty(name="File Path",\r
-                           description="File path used for importing "\r
-                                       "the PCD file",\r
-                           type=bpy.types.OperatorFileListElement)\r
\r
-     directory = StringProperty(subtype='DIR_PATH')\r
\r
-     def execute(self, context):\r
-         paths = [os.path.join(self.directory, name.name) for name in self.files]\r
-         if not paths:\r
-             paths.append(self.filepath)\r
\r
-         for path in paths:\r
\r
-             objname = ""\r
\r
-             if self.object_name == "":\r
-                 # name the object with the filename exluding .pcd\r
-                 objname = os.path.basename(path)[:-4]\r
-             else:\r
-                 # use name set by calling the operator with the arg\r
-                 objname = self.object_name\r
\r
-             pcd_utils.import_pcd(path, objname)\r
\r
-         return {'FINISHED'}\r
\r
\r
\r
\r
- class ExportPCD(bpy.types.Operator, ExportHelper):\r
-     """Save PCD (Point Cloud Data) files"""\r
-     bl_idname = "export_points.pcd"\r
-     bl_label = "Export PCD"\r
\r
-     filename_ext = ".pcd"\r
\r
-     filter_glob = StringProperty(default="*.pcd", options={'HIDDEN'})\r
\r
\r
-     def execute(self, context):\r
-         pcd_utils.export_pcd(self.filepath)\r
\r
-         return {'FINISHED'}\r
\r
\r
\r
\r
- def menu_func_import(self, context):\r
-     self.layout.operator(ImportPCD.bl_idname, text="Point Cloud Data (.pcd)").filepath = "*.pcd"\r
\r
\r
- def menu_func_export(self, context):\r
-     self.layout.operator(ExportPCD.bl_idname, text="Point Cloud Data (.pcd)")\r
\r
\r
- def register():\r
-     bpy.utils.register_module(__name__)\r
\r
-     bpy.types.TOPBAR_MT_file_import.append(menu_func_import)\r
-     bpy.types.TOPBAR_MT_file_export.append(menu_func_export)\r
\r
\r
- def unregister():\r
-     bpy.utils.unregister_module(__name__)\r
\r
-     bpy.types.TOPBAR_MT_file_import.remove(menu_func_import)\r
-     bpy.types.TOPBAR_MT_file_export.remove(menu_func_export)\r
\r
\r
- if __name__ == "__main__":\r
-     register()\r
\r
+ # ##### BEGIN GPL LICENSE BLOCK #####
+ #
+ #  This program is free software; you can redistribute it and/or
+ #  modify it under the terms of the GNU General Public License
+ #  as published by the Free Software Foundation; either version 2
+ #  of the License, or (at your option) any later version.
+ #
+ #  This program is distributed in the hope that it will be useful,
+ #  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ #  GNU General Public License for more details.
+ #
+ #  You should have received a copy of the GNU General Public License
+ #  along with this program; if not, write to the Free Software Foundation,
+ #  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ #
+ # ##### END GPL LICENSE BLOCK #####
+ bl_info = {
+     "name": "PCD",
+     "author": "Aurel Wildfellner",
+     "version": (0, 2),
+     "blender": (2, 57, 0),
+     "location": "File > Import-Export > Point Cloud Data",
+     "description": "Imports and Exports PCD (Point Cloud Data) files. PCD files are the default format used by  pcl (Point Cloud Library).",
+     "warning": "",
+     "wiki_url": "http://wiki.blender.org/index.php?title=Extensions:2.6/Py/Scripts/Import-Export/Point_Cloud_Data_IO",
+     "tracker_url": "https://developer.blender.org/maniphest/task/edit/form/2/",
+ #    "support": 'OFFICAL',
+     "category": "Import-Export"}
+ if "bpy" in locals():
+     import imp
+     imp.reload(pcd_utils)
+ else:
+     from . import pcd_utils
+ import itertools
+ import os
+ import bpy
+ from bpy.props import *
+ from bpy_extras.io_utils import ExportHelper, ImportHelper
+ class ImportPCD(bpy.types.Operator, ImportHelper):
+     """Load PCD (Point Cloud Data) files"""
+     bl_idname = "import_points.stl"
+     bl_label = "Import PCD"
+     filename_ext = ".pcd"
+     filter_glob = StringProperty(default="*.pcd", options={'HIDDEN'})
+     object_name = StringProperty(default="", options={'HIDDEN'})
+     files = CollectionProperty(name="File Path",
+                           description="File path used for importing "
+                                       "the PCD file",
+                           type=bpy.types.OperatorFileListElement)
+     directory = StringProperty(subtype='DIR_PATH')
+     def execute(self, context):
+         paths = [os.path.join(self.directory, name.name) for name in self.files]
+         if not paths:
+             paths.append(self.filepath)
+         for path in paths:
+             objname = ""
+             if self.object_name == "":
+                 # name the object with the filename exluding .pcd
+                 objname = os.path.basename(path)[:-4]
+             else:
+                 # use name set by calling the operator with the arg
+                 objname = self.object_name
+             pcd_utils.import_pcd(path, objname)
+         return {'FINISHED'}
+ class ExportPCD(bpy.types.Operator, ExportHelper):
+     """Save PCD (Point Cloud Data) files"""
+     bl_idname = "export_points.pcd"
+     bl_label = "Export PCD"
+     filename_ext = ".pcd"
+     filter_glob = StringProperty(default="*.pcd", options={'HIDDEN'})
+     def execute(self, context):
+         pcd_utils.export_pcd(self.filepath)
+         return {'FINISHED'}
+ def menu_func_import(self, context):
+     self.layout.operator(ImportPCD.bl_idname, text="Point Cloud Data (.pcd)").filepath = "*.pcd"
+ def menu_func_export(self, context):
+     self.layout.operator(ExportPCD.bl_idname, text="Point Cloud Data (.pcd)")
+ def register():
+     bpy.utils.register_module(__name__)
 -    bpy.types.INFO_MT_file_import.append(menu_func_import)
 -    bpy.types.INFO_MT_file_export.append(menu_func_export)
++    bpy.types.TOPBAR_MT_file_import.append(menu_func_import)
++    bpy.types.TOPBAR_MT_file_export.append(menu_func_export)
+ def unregister():
+     bpy.utils.unregister_module(__name__)
 -    bpy.types.INFO_MT_file_import.remove(menu_func_import)
 -    bpy.types.INFO_MT_file_export.remove(menu_func_export)
++    bpy.types.TOPBAR_MT_file_import.remove(menu_func_import)
++    bpy.types.TOPBAR_MT_file_export.remove(menu_func_export)
+ if __name__ == "__main__":
+     register()
Simple merge
Simple merge
diff --cc mesh_ktools.py
@@@ -556,16 -556,16 +556,16 @@@ class quickbool(bpy.types.Operator)
                                          bpy.ops.mesh.select_all(action='SELECT')
                                          bpy.ops.mesh.delete(type='VERT')
                                          bpy.ops.object.mode_set(mode = 'OBJECT', toggle = False)
-  
                                          bpy.ops.object.delete(use_global=False)
-                                         bpy.context.scene.objects.active = bpy.data.objects[original] 
-                                 else: 
+                                         bpy.context.scene.objects.active = bpy.data.objects[original]
+                                 else:
                                          bpy.ops.object.select_all(action='DESELECT')
                                          bpy.ops.object.select_pattern(pattern=name)
-                                         bpy.context.scene.objects.active = bpy.data.objects[name] 
+                                         bpy.context.scene.objects.active = bpy.data.objects[name]
  
 -                                        bpy.context.object.draw_type = 'WIRE'
 +                                        bpy.context.object.display_type = 'WIRE'
-                                         
                                          # Move to garbage layer
                                          if move_to == True:
                                                  bpy.ops.object.move_to_layer(layers=(False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False))
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -1406,10 -1402,8 +1406,10 @@@ class VIEW3D_MT_EditCursorMenu2(Menu)
          layout.operator("view3d.snap_cursor_to_edge_intersection2",
                          text="Cursor to Edge Intersection")
          UseSeparator(self, context)
-         layout.operator("view3d.snap_selected_to_cursor", 
 -        layout.operator("view3d.snap_selected_to_cursor", text="Selection to Cursor").use_offset = False
 -        layout.operator("view3d.snap_selected_to_cursor", text="Selection to Cursor (Offset)").use_offset = True
++        layout.operator("view3d.snap_selected_to_cursor",
 +                        text="Selection to Cursor").use_offset = False
 +        layout.operator("view3d.snap_selected_to_cursor",
 +                        text="Selection to Cursor (Keep Offset)").use_offset = True
          layout.operator("view3d.snap_selected_to_grid",
                          text="Selection to Grid")
          UseSeparator(self, context)