Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

bugfix/82-nks_project_looses_slashes #144

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions pype/nuke/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,14 @@ def format_anatomy(data):
log.debug("__ anatomy.templates: {}".format(anatomy.templates))

try:
padding = int(anatomy.templates['render']['padding'])
# TODO: bck compatibility with old anatomy template
padding = int(anatomy.templates.get(
"frame_padding",
anatomy.templates["render"].get("padding"))
)
except KeyError as e:
msg = ("`padding` key is not in `render` "
"or `frame_padding` on is not available in "
"Anatomy template. Please, add it there and restart "
"the pipeline (padding: \"4\"): `{}`").format(e)

Expand Down Expand Up @@ -973,7 +978,7 @@ def set_context_settings(self):
self.set_colorspace()

def set_favorites(self):
projects_root = os.getenv("AVALON_PROJECTS")
projects_root = os.getenv("PYPE_ROOT_WORK")
work_dir = os.getenv("AVALON_WORKDIR")
asset = os.getenv("AVALON_ASSET")
project = os.getenv("AVALON_PROJECT")
Expand Down Expand Up @@ -1110,6 +1115,7 @@ def __init__(self,
nodes=nodes,
**kwargs)
self.to_script = to_script

# collect data for formating
self.data_tmp = {
"project": {"name": self._project["name"],
Expand Down
25 changes: 16 additions & 9 deletions pype/nukestudio/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,16 @@ def set_workfiles():
# show workfile gui
workfiles.show(workdir)


def sync_avalon_data_to_workfile():
# import session to get project dir
""" Setting up all avalon data into hiero project
"""
S = avalon.Session

# set active project root work directory
active_project_root = os.path.normpath(
os.path.join(S['AVALON_PROJECTS'], S['AVALON_PROJECT'])
)
os.path.join(os.getenv("PYPE_ROOT_WORK"), S['AVALON_PROJECT']))

# getting project
project = hiero.core.projects()[-1]

Expand Down Expand Up @@ -350,17 +354,20 @@ def CreateNukeWorkfile(nodes=None,
# create root node and save all metadata
root_node = hiero.core.nuke.RootNode()

root_path = os.environ["AVALON_PROJECTS"]
if not os.getenv("PYPE_ROOT_WORK"):
set_multiroot_env()
jakubjezek001 marked this conversation as resolved.
Show resolved Hide resolved
jakubjezek001 marked this conversation as resolved.
Show resolved Hide resolved

root_path = os.environ["PYPE_ROOT_WORK"]

nuke_script.addNode(root_node)

# here to call pype.nuke.lib.BuildWorkfile
script_builder = nklib.BuildWorkfile(
root_node=root_node,
root_path=root_path,
nodes=nuke_script.getNodes(),
**kwargs
)
root_node=root_node,
root_path=root_path,
nodes=nuke_script.getNodes(),
**kwargs
)


class ClipLoader:
Expand Down
30 changes: 0 additions & 30 deletions pype/plugins/nukestudio/_unused/collect_metadata.py

This file was deleted.

14 changes: 0 additions & 14 deletions pype/plugins/nukestudio/_unused/collect_submission.py

This file was deleted.

15 changes: 0 additions & 15 deletions pype/plugins/nukestudio/_unused/collect_workfile_version.py

This file was deleted.

30 changes: 0 additions & 30 deletions pype/plugins/nukestudio/_unused/extract_plates_waiting.py

This file was deleted.

124 changes: 0 additions & 124 deletions pype/plugins/nukestudio/_unused/extract_tasks.py

This file was deleted.

26 changes: 0 additions & 26 deletions pype/plugins/nukestudio/_unused/subset-representations_logic.txt

This file was deleted.

40 changes: 0 additions & 40 deletions pype/plugins/nukestudio/_unused/validate_projectroot.py

This file was deleted.

27 changes: 0 additions & 27 deletions pype/plugins/nukestudio/_unused/validate_resolved_paths.py

This file was deleted.

Loading