add docstrings for the functions in tycache families

This commit is contained in:
Kayla Man 2023-09-25 21:59:03 +08:00
parent dc9931418e
commit fd6c6f3b3c
2 changed files with 39 additions and 0 deletions

View file

@ -67,6 +67,25 @@ class ExtractTyCache(publish.Extractor):
self.log.info(f"Extracted instance '{instance.name}' to: {filenames}")
def get_file(self, filepath, start_frame, end_frame):
"""Get file names for tyFlow in tyCache format.
Set the filenames accordingly to the tyCache file
naming extension(.tyc) for the publishing purpose
Actual File Output from tyFlow in tyCache format:
<SceneFile>_<frame>.tyc
e.g. tyFlow_cloth_CCCS_blobbyFill_001_00004.tyc
Args:
fileapth (str): Output directory.
start_frame (int): Start frame.
end_frame (int): End frame.
Returns:
filenames(list): list of filenames
"""
filenames = []
filename = os.path.basename(filepath)
orig_name, _ = os.path.splitext(filename)

View file

@ -34,6 +34,16 @@ class ValidateTyFlowData(pyblish.api.InstancePlugin):
raise PublishValidationError(f"{report}")
def get_tyflow_object(self, instance):
"""Get the nodes which are not tyFlow object(s)
and editable mesh(es)
Args:
instance (str): instance node
Returns:
invalid(list): list of invalid nodes which are not
tyFlow object(s) and editable mesh(es).
"""
invalid = []
container = instance.data["instance_node"]
self.log.info(f"Validating tyFlow container for {container}")
@ -51,6 +61,16 @@ class ValidateTyFlowData(pyblish.api.InstancePlugin):
return invalid
def get_tyflow_operator(self, instance):
"""_summary_
Args:
instance (str): instance node
Returns:
invalid(list): list of invalid nodes which do
not consist of Export Particle Operators as parts
of the node connections
"""
invalid = []
container = instance.data["instance_node"]
self.log.info(f"Validating tyFlow object for {container}")