[Bf-extensions-cvs] [930f3799] master: Add Curve: Extra Objects: classmethod poll corrected
Spivak Vladimir cwolf3d
noreply at git.blender.org
Thu Sep 12 19:38:48 CEST 2019
Commit: 930f3799fa70298550eabda3d7462e71355f565f
Author: Spivak Vladimir (cwolf3d)
Date: Thu Sep 12 20:38:07 2019 +0300
Branches: master
https://developer.blender.org/rBA930f3799fa70298550eabda3d7462e71355f565f
Add Curve: Extra Objects: classmethod poll corrected
===================================================================
M add_curve_extra_objects/add_curve_simple.py
===================================================================
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
More information about the Bf-extensions-cvs
mailing list