style: fixing tabs instead of 4 spaces indent
This commit is contained in:
parent
8a39fc5378
commit
314a219186
2 changed files with 19 additions and 19 deletions
|
@ -5,25 +5,25 @@ icons_collection = None
|
|||
icons_directory = os.path.dirname(__file__)
|
||||
|
||||
def initialize_icons_collection():
|
||||
import bpy.utils.previews
|
||||
global icons_collection
|
||||
print("icons_collection : {}".format(icons_collection))
|
||||
icons_collection = bpy.utils.previews.new()
|
||||
import bpy.utils.previews
|
||||
global icons_collection
|
||||
print("icons_collection : {}".format(icons_collection))
|
||||
icons_collection = bpy.utils.previews.new()
|
||||
|
||||
def unload_icons():
|
||||
bpy.utils.previews.remove(icons_collection)
|
||||
bpy.utils.previews.remove(icons_collection)
|
||||
|
||||
def get_icon_id(identifier):
|
||||
# The initialize_icons_collection function needs to be called first.
|
||||
return get_icon(identifier).icon_id
|
||||
# The initialize_icons_collection function needs to be called first.
|
||||
return get_icon(identifier).icon_id
|
||||
|
||||
def get_icon(identifier):
|
||||
if identifier in icons_collection:
|
||||
return icons_collection[identifier]
|
||||
return icons_collection.load(identifier, os.path.join(icons_directory, identifier + ".png"), "IMAGE")
|
||||
if identifier in icons_collection:
|
||||
return icons_collection[identifier]
|
||||
return icons_collection.load(identifier, os.path.join(icons_directory, identifier + ".png"), "IMAGE")
|
||||
|
||||
def register_icons():
|
||||
initialize_icons_collection()
|
||||
initialize_icons_collection()
|
||||
|
||||
def unregister_icons():
|
||||
unload_icons()
|
||||
unload_icons()
|
|
@ -3,16 +3,16 @@ import bpy
|
|||
from .panel_main import KH_PT_panel_main
|
||||
|
||||
classes = (
|
||||
KH_PT_panel_main,
|
||||
KH_PT_panel_main,
|
||||
)
|
||||
|
||||
def register_menus():
|
||||
from bpy.utils import register_class
|
||||
for cls in classes:
|
||||
register_class(cls)
|
||||
from bpy.utils import register_class
|
||||
for cls in classes:
|
||||
register_class(cls)
|
||||
|
||||
|
||||
def unregister_menus():
|
||||
from bpy.utils import unregister_class
|
||||
for cls in classes:
|
||||
unregister_class(cls)
|
||||
from bpy.utils import unregister_class
|
||||
for cls in classes:
|
||||
unregister_class(cls)
|
Loading…
Reference in a new issue