prefer active_object to object
This commit is contained in:
parent
2d8ec86edc
commit
ad7d62d13e
1 changed files with 3 additions and 3 deletions
|
@ -412,11 +412,11 @@ class FONT3D_PT_TextPropertiesPanel(bpy.types.Panel):
|
||||||
bl_region_type = "UI"
|
bl_region_type = "UI"
|
||||||
|
|
||||||
def get_active_text_properties(self):
|
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:
|
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
|
return t
|
||||||
if bpy.context.object.parent == t.text_object:
|
if bpy.context.active_object.parent == t.text_object:
|
||||||
return t
|
return t
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue