mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
fix(nuke): create read from write
- wasn't returning correctly if nothing found in file path
This commit is contained in:
parent
6f5f823e44
commit
59b4178fda
1 changed files with 6 additions and 2 deletions
|
|
@ -38,7 +38,7 @@ def evaluate_filepath_new(k_value, k_eval, project_dir, first_frame):
|
|||
filepath = os.path.abspath(filepath)
|
||||
except Exception as E:
|
||||
log.error("Cannot create Read node. Perhaps it needs to be rendered first :) Error: `{}`".format(E))
|
||||
return
|
||||
return None
|
||||
|
||||
filepath = filepath.replace('\\', '/')
|
||||
current_frame = re.findall(r'\d+', filepath)[-1]
|
||||
|
|
@ -114,12 +114,16 @@ def write_to_read(gn):
|
|||
n = group_writes[0]
|
||||
|
||||
if n.knob('file') is not None:
|
||||
myfiletranslated, firstFrame, lastFrame = evaluate_filepath_new(
|
||||
file_path_new = evaluate_filepath_new(
|
||||
n.knob('file').getValue(),
|
||||
n.knob('file').evaluate(),
|
||||
project_dir,
|
||||
comp_start
|
||||
)
|
||||
if not file_path_new:
|
||||
return
|
||||
|
||||
myfiletranslated, firstFrame, lastFrame = file_path_new
|
||||
# get node data
|
||||
ndata = {
|
||||
'filepath': myfiletranslated,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue