flame: processing comments

This commit is contained in:
Jakub Jezek 2022-04-11 10:50:34 +02:00
parent c5683f50d4
commit 16e8407332
No known key found for this signature in database
GPG key ID: D8548FBF690B100A
4 changed files with 20 additions and 23 deletions

View file

@ -4,11 +4,12 @@ import shutil
from copy import deepcopy
from xml.etree import ElementTree as ET
from Qt import QtCore, QtWidgets
import openpype.api as openpype
import qargparse
from openpype import style
from openpype.pipeline import LegacyCreator, LoaderPlugin
from Qt import QtCore, QtWidgets
from . import constants
from . import lib as flib
@ -712,12 +713,13 @@ class OpenClipSolver(flib.MediaInfoFile):
# test also if file is not empty
with open(file) as f:
lines = f.readlines()
if len(lines) > 2:
return True
# file is probably corrupted
os.remove(file)
return False
if len(lines) > 2:
return True
# file is probably corrupted
os.remove(file)
return False
def make(self):

View file

@ -461,6 +461,10 @@ class WireTapCom(object):
def _subprocess_preexec_fn():
""" Helper function
Setting permission mask to 0777
"""
os.setpgrp()
os.umask(0o000)

View file

@ -455,15 +455,10 @@ def add_otio_metadata(otio_item, item, **kwargs):
otio_item.metadata.update({key: value})
def _get_shot_tokens_values(clip, tokens, from_clip=False):
def _get_shot_tokens_values(clip, tokens):
old_value = None
output = {}
# in case it is segment from reel clip
# avoiding duplicity of segement data
if from_clip:
return {}
old_value = clip.shot_name.get_value()
for token in tokens:
@ -480,7 +475,7 @@ def _get_shot_tokens_values(clip, tokens, from_clip=False):
return output
def _get_segment_attributes(segment, from_clip=False):
def _get_segment_attributes(segment):
log.debug("Segment name|hidden: {}|{}".format(
segment.name.get_value(), segment.hidden
@ -503,9 +498,10 @@ def _get_segment_attributes(segment, from_clip=False):
}
# add all available shot tokens
shot_tokens = _get_shot_tokens_values(segment, [
"<colour space>", "<width>", "<height>", "<depth>",
], from_clip)
shot_tokens = _get_shot_tokens_values(
segment,
["<colour space>", "<width>", "<height>", "<depth>"]
)
clip_data.update(shot_tokens)
# populate shot source metadata

View file

@ -299,10 +299,8 @@ class IntegrateBatchGroup(pyblish.api.InstancePlugin):
version_name = "v<version>"
version_padding = 3
# return it as ordered dict
reutrn_dict = OrderedDict()
# need to make sure the order of keys is correct
for item in (
return OrderedDict(
("name", name),
("media_path", media_path),
("media_path_pattern", media_path_pattern),
@ -320,10 +318,7 @@ class IntegrateBatchGroup(pyblish.api.InstancePlugin):
("version_mode", version_mode),
("version_name", version_name),
("version_padding", version_padding)
):
reutrn_dict.update({item[0]: item[1]})
return reutrn_dict
)
def _get_shot_task_dir_path(self, instance, task_data):
project_doc = instance.data["projectEntity"]