Add Curve: Extra Objects: classmethod poll corrected

This commit is contained in:
Vladimir Spivak 2019-09-12 20:38:07 +03:00
parent 8d9e3c94af
commit 930f3799fa
1 changed files with 6 additions and 3 deletions

View File

@ -1342,7 +1342,8 @@ class BezierPointsFillet(Operator):
@classmethod
def poll(cls, context):
return context.scene is not None
return (context.object is not None and
context.object.type == 'CURVE')
def execute(self, context):
# main function
@ -1469,7 +1470,8 @@ class BezierDivide(Operator):
@classmethod
def poll(cls, context):
return context.scene is not None
return (context.object is not None and
context.object.type == 'CURVE')
def execute(self, context):
# main function
@ -1557,7 +1559,8 @@ class CurveScaleReset(Operator):
@classmethod
def poll(cls, context):
return context.scene is not None
return (context.object is not None and
context.object.type == 'CURVE')
def execute(self, context):
# main function