refactoring

This commit is contained in:
iperov 2018-12-24 13:45:40 +04:00
parent 44798c2b85
commit 8a223845fb
19 changed files with 963 additions and 468 deletions

View file

@ -5,6 +5,7 @@ import struct
import zlib
import pickle
import numpy as np
from facelib import FaceType
class Chunk(object):
def __init__(self, name=None, data=None):
@ -251,6 +252,9 @@ class DFLPNG(object):
inst = DFLPNG.load_raw (filename)
inst.fcwp_dict = inst.getDFLDictData()
if 'face_type' not in inst.fcwp_dict.keys():
inst.fcwp_dict['face_type'] = FaceType.toString (FaceType.FULL)
if inst.fcwp_dict == None:
if print_on_no_embedded_data:
print ( "No DFL data found in %s" % (filename) )