fix T53624: A.N.T. Landscape should not be operating in edit mode
This commit is contained in:
parent
dc6704ab42
commit
87579bd164
Notes:
blender-bot
2023-02-14 19:32:11 +01:00
Referenced by commit 4aa080a1: A.N.T. Landscape: prevent entering editmode
Referenced by commit 4aa080a1
, A.N.T. Landscape: prevent entering editmode
Referenced by issue #55050, cant open the add mesh A.N.T landscape
Referenced by issue #55087, A.N.T landscape not working
Referenced by issue #53624, ANT Landscape report error traceback
Referenced by issue #53684, 2.79a release - addons
|
@ -586,6 +586,14 @@ class AntAddLandscape(bpy.types.Operator):
|
|||
description="Automatic refresh"
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def poll(self, context):
|
||||
ob = context.object
|
||||
if ob is not None:
|
||||
if ob.mode == 'EDIT':
|
||||
return False
|
||||
return True
|
||||
|
||||
def draw(self, context):
|
||||
draw_ant_refresh(self, context)
|
||||
draw_ant_main(self, context, generate=True)
|
||||
|
|
|
@ -193,7 +193,10 @@ class AntLandscapeRegenerate(bpy.types.Operator):
|
|||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return bpy.context.active_object.ant_landscape
|
||||
ob = bpy.context.active_object
|
||||
if ob.mode == 'EDIT':
|
||||
return False
|
||||
return ob.ant_landscape
|
||||
|
||||
|
||||
def execute(self, context):
|
||||
|
|
Loading…
Reference in New Issue