prefer active_object to object

This commit is contained in:
themancalledjakob 2024-08-04 15:12:38 +02:00
parent 2d8ec86edc
commit ad7d62d13e

View file

@ -412,11 +412,11 @@ class FONT3D_PT_TextPropertiesPanel(bpy.types.Panel):
bl_region_type = "UI"
def get_active_text_properties(self):
if type(bpy.context.object) != type(None) and bpy.context.object.select_get():
if type(bpy.context.active_object) != type(None):# and bpy.context.object.select_get():
for t in bpy.context.scene.font3d_data.available_texts:
if bpy.context.object == t.text_object:
if bpy.context.active_object == t.text_object:
return t
if bpy.context.object.parent == t.text_object:
if bpy.context.active_object.parent == t.text_object:
return t
return None