metadata: fix check for existing objects

Don't process files with EXCLUDE_OBJECT_DEFINE gcode
commands.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-11-30 13:43:39 -05:00
parent f3f39b7ab0
commit 1cb46a8f8f
No known key found for this signature in database
GPG Key ID: 5A1EB336DFB4C71B
1 changed files with 4 additions and 1 deletions

View File

@ -137,7 +137,10 @@ class BaseSlicer(object):
data: str,
pattern: Optional[str] = None
) -> bool:
match = re.search(r"\nDEFINE_OBJECT NAME=", data)
match = re.search(
r"\n(DEFINE_OBJECT)|(EXCLUDE_OBJECT_DEFINE) NAME=",
data
)
if match is not None:
# Objects alread processed
return False