Skip to content
Snippets Groups Projects
Commit 87579bd1 authored by Philipp Oeser's avatar Philipp Oeser
Browse files

fix T53624: A.N.T. Landscape should not be operating in edit mode

parent dc6704ab
No related branches found
No related tags found
No related merge requests found
...@@ -586,6 +586,14 @@ class AntAddLandscape(bpy.types.Operator): ...@@ -586,6 +586,14 @@ class AntAddLandscape(bpy.types.Operator):
description="Automatic refresh" 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): def draw(self, context):
draw_ant_refresh(self, context) draw_ant_refresh(self, context)
draw_ant_main(self, context, generate=True) draw_ant_main(self, context, generate=True)
......
...@@ -193,7 +193,10 @@ class AntLandscapeRegenerate(bpy.types.Operator): ...@@ -193,7 +193,10 @@ class AntLandscapeRegenerate(bpy.types.Operator):
@classmethod @classmethod
def poll(cls, context): 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): def execute(self, context):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment