Snap Utilities Line: Cleanup

This commit is contained in:
Germano Cavalcante 2018-10-30 02:12:30 -03:00
parent 8b32385cf0
commit 296002e6a3
2 changed files with 8 additions and 19 deletions

View File

@ -22,11 +22,11 @@
bl_info = {
"name": "Snap_Utilities_Line",
"author": "Germano Cavalcante",
"version": (5, 8, 22),
"version": (5, 8, 23),
"blender": (2, 80, 0),
"location": "View3D > TOOLS > Snap Utilities > snap utilities",
"location": "View3D > TOOLS > Make Line",
"description": "Extends Blender Snap controls",
"wiki_url" : "http://blenderartists.org/forum/showthread.php?363859-Addon-CAD-Snap-Utilities",
#"wiki_url" : "http://blenderartists.org/forum/showthread.php?363859-Addon-CAD-Snap-Utilities",
"category": "Mesh"}
if "bpy" in locals():
@ -73,12 +73,12 @@ def tool_make_line():
)
def get_tool_list(space_type, context_mode):
from bl_ui.space_toolsystem_common import ToolSelectPanelHelper
cls = ToolSelectPanelHelper._tool_class_from_space_type(space_type)
return cls._tools[context_mode]
def register():
def get_tool_list(space_type, context_mode):
from bl_ui.space_toolsystem_common import ToolSelectPanelHelper
cls = ToolSelectPanelHelper._tool_class_from_space_type(space_type)
return cls._tools[context_mode]
bpy.utils.register_class(preferences.SnapUtilitiesLinePreferences)
bpy.utils.register_class(ops_line.SnapUtilitiesLine)

View File

@ -26,17 +26,6 @@ from bpy.props import (
)
def update_panel(self, context):
try:
panel = bpy.types.VIEW3D_PT_snap_utilities
panel.bl_category = context.user_preferences.addons[__package__].preferences.category
bpy.utils.unregister_class(panel)
bpy.utils.register_class(panel)
except:
print('not update')
pass
class SnapUtilitiesLinePreferences(bpy.types.AddonPreferences):
# this must match the addon name, use '__package__'
# when defining this in a submodule of a python package.