Add Curve Extra Objects: Fix invalid context traceback error
This patch simply adds a preliminary check for the built-in Add Curve Extra Objects add-on. The check basically prevents a traceback in the console. Without this patch the add-on still functions as intended, just with a console prompt. Reviewed By: Blendify Differential Revision: https://developer.blender.org/D9666
This commit is contained in:
parent
448eeb681a
commit
3a409083e7
|
@ -424,10 +424,11 @@ def menu_funcs(self, context):
|
|||
|
||||
layout = self.layout
|
||||
|
||||
if bpy.context.view_layer.objects.active.type == "CURVE":
|
||||
layout.operator("curve.bevelcurve")
|
||||
layout.operator("curve.tapercurve")
|
||||
layout.separator()
|
||||
if context.view_layer.objects.active:
|
||||
if context.view_layer.objects.active.type == "CURVE":
|
||||
layout.operator("curve.bevelcurve")
|
||||
layout.operator("curve.tapercurve")
|
||||
layout.separator()
|
||||
|
||||
# Register
|
||||
classes = [
|
||||
|
|
Loading…
Reference in New Issue