cleanup
This commit is contained in:
parent
abdee651e0
commit
a3c7172573
1 changed files with 5 additions and 14 deletions
19
__init__.py
19
__init__.py
|
@ -4,14 +4,14 @@
|
|||
A 3D font helper
|
||||
"""
|
||||
|
||||
import functools
|
||||
import importlib
|
||||
import io
|
||||
import os
|
||||
|
||||
import bpy
|
||||
from bpy.app.handlers import persistent
|
||||
from bpy.types import Panel
|
||||
|
||||
from . import addon_updater_ops, bimport, butils
|
||||
from .common import Font, utils
|
||||
|
||||
bl_info = {
|
||||
"name": "ABC3D",
|
||||
|
@ -24,9 +24,6 @@ bl_info = {
|
|||
}
|
||||
# NOTE: also change version in common/utils.py
|
||||
|
||||
from . import addon_updater_ops, bimport, butils
|
||||
from .common import Font, utils
|
||||
|
||||
# make sure that modules are reloadable
|
||||
# when registering
|
||||
# handy for development
|
||||
|
@ -127,10 +124,6 @@ class ABC3D_addonPreferences(bpy.types.AddonPreferences):
|
|||
layout.label(text="Directory for storage of fonts and other assets:")
|
||||
layout.prop(self, "assets_dir")
|
||||
|
||||
# Works best if a column, or even just self.layout.
|
||||
mainrow = layout.row()
|
||||
col = mainrow.column()
|
||||
|
||||
# Updater draw function, could also pass in col as third arg.
|
||||
addon_updater_ops.update_settings_ui(self, context)
|
||||
|
||||
|
@ -148,7 +141,6 @@ class ABC3D_glyph_properties(bpy.types.PropertyGroup):
|
|||
description="Letter Spacing",
|
||||
)
|
||||
|
||||
|
||||
class ABC3D_text_properties(bpy.types.PropertyGroup):
|
||||
def font_items_callback(self, context):
|
||||
items = []
|
||||
|
@ -158,7 +150,6 @@ class ABC3D_text_properties(bpy.types.PropertyGroup):
|
|||
|
||||
def font_default_callback(self, context):
|
||||
d = context.scene.abc3d_data
|
||||
items = self.font_items_callback(context)
|
||||
if len(d.available_fonts) > 0:
|
||||
if len(d.available_fonts) > d.active_text_index:
|
||||
f = d.available_fonts[d.active_text_index]
|
||||
|
@ -167,7 +158,7 @@ class ABC3D_text_properties(bpy.types.PropertyGroup):
|
|||
f = d.available_fonts[0]
|
||||
return 0 # f"{f.font_name} {f.face_name}"
|
||||
|
||||
if type(self.font_name) != type(None) and type(self.face_name) != type(None):
|
||||
if not isinstance(self.font_name, None) and not isinstance(self.face_name, None):
|
||||
return 0 # f"{self.font_name} {self.face_name}"
|
||||
else:
|
||||
return 0 # ""
|
||||
|
@ -481,7 +472,7 @@ class ABC3D_PT_TextManagement(bpy.types.Panel):
|
|||
for c in t.text_object.children:
|
||||
if (
|
||||
len(c.users_collection) > 0
|
||||
and (c.get(f"{utils.prefix()}_linked_textobject")) != type(None)
|
||||
and not isinstance(c.get(f"{utils.prefix()}_linked_textobject"), None)
|
||||
and c.get(f"{utils.prefix()}_linked_textobject") == t.text_id
|
||||
):
|
||||
remove_me = False
|
||||
|
|
Loading…
Add table
Reference in a new issue