diff options
author | Spivak Vladimir (cwolf3d) <cwolf3d@gmail.com> | 2019-09-12 20:38:07 +0300 |
---|---|---|
committer | Spivak Vladimir (cwolf3d) <cwolf3d@gmail.com> | 2019-09-12 20:38:07 +0300 |
commit | 930f3799fa70298550eabda3d7462e71355f565f (patch) | |
tree | 429e6b3da8f6856d400a5edc03b112a9646e95d9 /add_curve_extra_objects | |
parent | 8d9e3c94aff9e366d9a4804d98b2517bd04244f6 (diff) |
Add Curve: Extra Objects: classmethod poll corrected
Diffstat (limited to 'add_curve_extra_objects')
-rw-r--r-- | add_curve_extra_objects/add_curve_simple.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/add_curve_extra_objects/add_curve_simple.py b/add_curve_extra_objects/add_curve_simple.py index 9873e5a5..65685043 100644 --- a/add_curve_extra_objects/add_curve_simple.py +++ b/add_curve_extra_objects/add_curve_simple.py @@ -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 |