fix poll errors
2.0.10 - fix: poll error in console
This commit is contained in:
+4
-2
@@ -31,7 +31,8 @@ class GPTB_OT_flipx_view(bpy.types.Operator):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.region_data.view_perspective == 'CAMERA'
|
||||
return context.area.type == 'VIEW_3D' and \
|
||||
context.region_data.view_perspective == 'CAMERA'
|
||||
|
||||
def execute(self, context):
|
||||
context.scene.camera.scale.x *= -1
|
||||
@@ -251,7 +252,8 @@ class GPTB_OT_set_view_as_cam(bpy.types.Operator):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.region_data.view_perspective != 'CAMERA'# need to be out of camera
|
||||
return context.area.type == 'VIEW_3D' and \
|
||||
context.region_data.view_perspective != 'CAMERA'# need to be out of camera
|
||||
# return context.scene.camera and not context.scene.camera.name.startswith('Cam')
|
||||
|
||||
def execute(self, context):
|
||||
|
||||
Reference in New Issue
Block a user