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

Nuke: Expose write knobs - OP-7592 #6137

Merged

Conversation

tokejepsen
Copy link
Member

@tokejepsen tokejepsen commented Jan 16, 2024

Changelog Description

This PR adds exposed_knobs to the creator plugins settings at ayon+settings://nuke/create/CreateWriteRender/exposed_knobs.

When exposed knobs will be linked from the write node to the outside publish group, for users to adjust.

Testing notes:

  1. Add a knob to ayon+settings://nuke/create/CreateWriteRender/exposed_knobs.
  2. Create write instance in Nuke.
  3. Check knob is exposed.
  4. Add a different knob to ayon+settings://nuke/create/CreateWriteRender/exposed_knobs.
  5. Publish and check validate kicks in to add the linked knob.

OP-7592

@ynbot
Copy link
Contributor

ynbot commented Jan 16, 2024

@ynbot ynbot added size/XS Denotes a PR changes 0-99 lines, ignoring general files host: Nuke type: enhancement Enhancements to existing functionality labels Jan 16, 2024
@tokejepsen
Copy link
Member Author

Docs at ynput/ayon-documentation#119

Copy link
Member

@moonyuet moonyuet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Followed the testing notes and it works
image
Maybe the Exposed Knobs can be more precise like Exposed Knobs for Write Node or Exposed Knobs for Inner Write Node because I thought it also allows to expose the parameter of the reformat node inside the WriteNodeInstance.
Otherwise, it looks good.

@tokejepsen
Copy link
Member Author

Maybe the Exposed Knobs can be more precise like Exposed Knobs for Write Node or Exposed Knobs for Inner Write Node because I thought it also allows to expose the parameter of the reformat node inside the WriteNodeInstance.
Otherwise, it looks good.

Good point! Will update to Write Node Exposed Knobs.

@jakubjezek001 jakubjezek001 self-requested a review January 18, 2024 15:25
@jakubjezek001
Copy link
Member

Good point! Will update to Write Node Exposed Knobs.

Also I would add devider line with label, something like this
image

Copy link
Member

@jakubjezek001 jakubjezek001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the functionality and works well!

I am not only sure how to deal with typos in the input fields like this:
image

@tokejepsen tokejepsen added the sponsored Client endorsed or requested label Jan 23, 2024
jakubjezek001 and others added 3 commits January 26, 2024 16:18
# Conflicts:
#	server_addon/nuke/server/settings/create_plugins.py
- Explicit settings label.
- Refactor for code sharing between render, prerender and image families.
- Validate typos on settings knob names.
Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Traceback (most recent call last):
Traceback (most recent call last):
  File "/usr/local/bin/flake8", line 8, in 
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main
    app.run(argv)
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run
    self._run(argv)
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run
    self.run_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks
    self.file_checker_manager.run()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run
    self.run_serial()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial
    checker.run_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks
    self.run_ast_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks
    for (line_number, offset, text, check) in runner:
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run
    parser.visit(self.tree)
  File "/usr/lib/python3.8/ast.py", line 371, in visit
    return visitor(node)
  File "/usr/lib/python3.8/ast.py", line 379, in generic_visit
    self.visit(item)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef
    self.capture_issues_visitor('ClassDef', node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor
    self.generic_visit(node)
  File "/usr/lib/python3.8/ast.py", line 381, in generic_visit
    self.visit(value)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call
    self.capture_issues_visitor('Call', node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor
    issues = checker.run(node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run
    if isinstance(arg, ast.Call) and arg.func.id == 'locals':
AttributeError: 'Attribute' object has no attribute 'id'

@tokejepsen
Copy link
Member Author

Maybe the Exposed Knobs can be more precise like Exposed Knobs for Write Node or Exposed Knobs for Inner Write Node because I thought it also allows to expose the parameter of the reformat node inside the WriteNodeInstance.
Otherwise, it looks good.

@moonyuet I've change the label to Write Node Exposed Knobs.

Also I would add devider line with label, something like this

@jakubjezek001 done.
Capture

I am not only sure how to deal with typos in the input fields like this:

@jakubjezek001 I'm raising an error for the user to be warned and directed to the settings to resolve. I would suggest we get #6179 merged, before deploying to client, so there will be an error message pop instead of just script editor output.

Copy link
Member

@moonyuet moonyuet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for me.
image

Copy link
Member

@jakubjezek001 jakubjezek001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works well in Ayon!
image

Also if typo in knob name also pops up this warning:
image

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Traceback (most recent call last):
Traceback (most recent call last):
  File "/usr/local/bin/flake8", line 8, in 
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main
    app.run(argv)
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run
    self._run(argv)
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run
    self.run_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks
    self.file_checker_manager.run()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run
    self.run_serial()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial
    checker.run_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks
    self.run_ast_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks
    for (line_number, offset, text, check) in runner:
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run
    parser.visit(self.tree)
  File "/usr/lib/python3.8/ast.py", line 371, in visit
    return visitor(node)
  File "/usr/lib/python3.8/ast.py", line 379, in generic_visit
    self.visit(item)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef
    self.capture_issues_visitor('ClassDef', node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor
    self.generic_visit(node)
  File "/usr/lib/python3.8/ast.py", line 381, in generic_visit
    self.visit(value)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call
    self.capture_issues_visitor('Call', node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor
    issues = checker.run(node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run
    if isinstance(arg, ast.Call) and arg.func.id == 'locals':
AttributeError: 'Attribute' object has no attribute 'id'

@jakubjezek001 jakubjezek001 merged commit c81e139 into ynput:develop Jan 31, 2024
3 checks passed
@ynbot ynbot added this to the next-patch milestone Jan 31, 2024
@tokejepsen tokejepsen deleted the enhancement/OP-7592_expose_write_knobs branch February 1, 2024 09:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
host: Nuke size/XS Denotes a PR changes 0-99 lines, ignoring general files sponsored Client endorsed or requested type: enhancement Enhancements to existing functionality
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants