diff --git a/__init__.py b/__init__.py index c8575d2..0943139 100644 --- a/__init__.py +++ b/__init__.py @@ -1417,65 +1417,6 @@ class ABC3D_OT_CreateFontFromObjects(bpy.types.Operator): return {'FINISHED'} -class ABC3D_PT_RightPropertiesPanel(bpy.types.Panel): - """Creates a Panel in the Object properties window""" - bl_label = f"{bl_info['name']}" - bl_idname = "ABC3D_PT_RightPropertiesPanel" - bl_space_type = 'PROPERTIES' - bl_region_type = 'WINDOW' - bl_context = "object" - - @classmethod - def poll(self, context): - # only show the panel, if it's a textobject or a glyph - is_text = type(next((t for t in context.scene.abc3d_data.available_texts if t.text_object == - context.active_object), None)) != type(None) - is_glyph = type(next((t for t in context.scene.abc3d_data.available_texts if t.text_object == - context.active_object.parent), None)) != type(None) - return is_text or is_glyph - - def draw(self, context): - layout = self.layout - scene = context.scene - abc3d_data = scene.abc3d_data - - obj = context.active_object - - def is_it_text(): - return type(next((t for t in context.scene.abc3d_data.available_texts if t.text_object == context.active_object), None)) != type(None) - - def is_it_glyph(): - return type(next((t for t in context.scene.abc3d_data.available_texts if t.text_object == context.active_object.parent), None)) != type(None) - - is_text = is_it_text() - is_glyph = is_it_glyph() - - textobject = obj if is_text else obj.parent if is_glyph else obj - available_text = abc3d_data.available_texts[abc3d_data.active_text_index] - - # row = layout.row() - # row.label(text="Hello world!", icon='WORLD_DATA') - # row = layout.row() - # row.label(text="Active object is: " + obj.name) - # row = layout.row() - # row.label(text="text object is: " + textobject.name) - row = layout.row() - row.label(text=f"active text index is: {abc3d_data.active_text_index}") - - layout.row().label(text="Text Properties:") - layout.row().prop(available_text, "text") - layout.row().prop(available_text, "letter_spacing") - layout.row().prop(available_text, "font_size") - layout.row().prop(available_text, "offset") - layout.row().prop(available_text, "compensate_curvature") - layout.row().prop(available_text, "ignore_orientation") - layout.column().prop(available_text, "translation") - layout.column().prop(available_text, "orientation") - - if is_glyph: - layout.row().label(text="Glyph Properties:") - - class ABC3D_OT_Reporter(bpy.types.Operator): bl_idname = f"{__name__}.reporter" bl_label = "Report" @@ -1528,7 +1469,6 @@ classes = ( ABC3D_OT_ToggleABC3DCollection, ABC3D_OT_SaveFontToFile, ABC3D_OT_CreateFontFromObjects, - ABC3D_PT_RightPropertiesPanel, ABC3D_OT_Reporter, )