Flame: fixing NoneType in abs

This commit is contained in:
Jakub Jezek 2022-06-20 22:04:36 +02:00
parent 70d9b6fcb7
commit 250f73656a
No known key found for this signature in database
GPG key ID: 730D7C02726179A7

View file

@ -1,4 +1,5 @@
import re
from types import NoneType
import pyblish
import openpype.hosts.flame.api as opfapi
from openpype.hosts.flame.otio import flame_export
@ -75,6 +76,12 @@ class CollectTimelineInstances(pyblish.api.ContextPlugin):
marker_data["handleEnd"]
)
# make sure there is not NoneType rather 0
if isinstance(head, NoneType):
head = 0
if isinstance(tail, NoneType):
tail = 0
# make sure value is absolute
if head != 0:
head = abs(head)