Fix console errors from UI when no object is selected #1
@ -466,7 +466,7 @@ def curve_tools_context_menu(self, context):
|
|||||||
def curve_tools_object_context_menu(self, context):
|
def curve_tools_object_context_menu(self, context):
|
||||||
bl_label = 'Curve tools'
|
bl_label = 'Curve tools'
|
||||||
|
|
||||||
if context.active_object.type == "CURVE":
|
if (obj := context.active_object) and obj.type == "CURVE":
|
||||||
self.layout.operator("curvetools.scale_reset", text="Scale Reset")
|
self.layout.operator("curvetools.scale_reset", text="Scale Reset")
|
||||||
self.layout.operator("curvetools.add_toolpath_offset_curve", text="Offset Curve")
|
self.layout.operator("curvetools.add_toolpath_offset_curve", text="Offset Curve")
|
||||||
self.layout.operator("curvetools.remove_doubles", text='Remove Doubles')
|
self.layout.operator("curvetools.remove_doubles", text='Remove Doubles')
|
||||||
|
Loading…
Reference in New Issue
Block a user