Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuke: refactor to latest publisher workfow #4006

Merged

Conversation

jakubjezek001
Copy link
Member

@jakubjezek001 jakubjezek001 commented Oct 19, 2022

Brief description

Nuke is working with latest publisher workflow

Description

All Creators plugins needed to be converted to the latest publisher API so they are recognized within the workflow. Also publishing plugins needed to be optimized so the new workflow is catching all as it should. Creator label names had been renamed for better consistency with family and plugin names.

Openpype menu Create flagged as [depricated], since it had been merged into new publisher.

Additional info

  • creator plugins had been converted to the new workflow
  • Tool for conversion of old publishing instances had been added as instance item "Convert legacy instances"
  • publisher plugins are converted to the new workflow
  • It is already having implemented new imageio settings position
  • CreateWriteStill plugin had been renamed to CreateWriteImage to better reflect family use. Still is added as Variant name.

Testing notes:

since this is part of 3.15.x dev you have to clone this separately and set to python 3.9 create_env

  1. Open nuke workfile with most of created instances in old publishing workfow, so you can test the conversion tool
  2. Go to Publisher and hit Update subsets button on Convert legacy instances item
  3. You should be able to see instances collected into left frame
  4. Hit publish and see what is going to happen ;)

PS: I apologize for the amount of changed files - there was no other way to split this into smaller chunks..

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'

@64qam
Copy link
Member

64qam commented Dec 19, 2022

Also, an option for farm rendering is missing

@jrsndl jrsndl closed this Dec 19, 2022
@github-actions github-actions bot added this to the next-minor milestone Dec 19, 2022
@jrsndl
Copy link
Collaborator

jrsndl commented Dec 19, 2022

Also, an option for farm rendering is missing

Setting up the deadline URL in the project settings helped me to get the farm rendering options.
(project_settings/deadline/publish)
image

@jakubjezek001 jakubjezek001 reopened this Dec 20, 2022
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'

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'

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'

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'

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'

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'

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'

Copy link
Collaborator

@jrsndl jrsndl left a comment

Choose a reason for hiding this comment

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

Converting Instances

Nuke 12.2 and Nuke 13.2 correctly detected and converted legacy instances.

Still publish

I was not able to create an image (still) publish from newly created or converted instance.

Optional Validate Version not available

I have Validate Version set to optional and active in project_settings/global/publish/ValidateVersion, but there seem to be no way to temporarily disable validate version in new publisher.

Intent

There seem to be no way to set the Publish Intent, but you can Validate the Intent in project_settings/global/publish/ValidateIntent and then the publish fails.

Comment on lines 97 to 111
def check_existing_subset(self, subset_name, instance_data):
"""Check if existing subset name versions already exists."""
# Get all subsets of the current asset
project_name = legacy_io.active_project()
asset_doc = get_asset_by_name(
project_name, instance_data["asset"], fields=["_id"]
)
subset_docs = get_subsets(
project_name, asset_ids=[asset_doc["_id"]], fields=["name"]
)
existing_subset_names_low = {
subset_doc["name"].lower()
for subset_doc in subset_docs
}
return subset_name.lower() in existing_subset_names_low
Copy link
Collaborator

@BigRoy BigRoy Jan 10, 2023

Choose a reason for hiding this comment

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

This seems like an overly verbose check. If a new nuke script is created after an initial publish and someone intentionally tries to publish into an existing entry they can't create it. Similary if somehow the output node got deleted in their nuke script and they want to recreate it again, they can't.

Even someone else from another task in the same assets couldn't even try to do so? (or maybe they could if it was prefixed with the task actually; not sure if that's the case).

I feel like a check whether the current Nuke script already has an instance publishing to the same asset + subset name would be a decent validation but the current 'check' seems quite blocking for what can definitely be a production use case.

In the old creator there was even a dropdown menu next to the "Create subset name" text field from which you could select existing variant names so that a user could explicitly publish it into an existing subset. Not sure if the new publisher also implements that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes I agree. We have to take this away. We should only be checking if a node with particular subset name is not already created in workfile nodes, like you've said.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We should only be checking if a node with particular subset name is not already created in workfile nodes, like you've said.

The next question is - is there ever a case where that might need to be allowed (outside of these creators, outside of the realm of Nuke). If not, then maybe should the publishing system/Creators in general already perform a check like that so that developers don't need to recreate that logic for each individual Creator plugin?

Copy link
Member Author

Choose a reason for hiding this comment

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

I presume this is more question for @iLLiCiTiT

Copy link
Member

@iLLiCiTiT iLLiCiTiT Jan 13, 2023

Choose a reason for hiding this comment

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

To be honest I don't think it's job of creator to check it until it's required for his functionality. This looks like a validation before validators. Check only subset name is not right, there might be different destination asset. Also subset_name.lower() in existing_subset_names_low is not right at all it must be subset_name.lower() == existing_subset_names_low (modelMain != modelMainHand but with this check it would look like it does).

Copy link
Member

@iLLiCiTiT iLLiCiTiT Jan 13, 2023

Choose a reason for hiding this comment

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

BTW you can change the context and variant after creation, where the create would not be called -> as the validation.

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 removed this from the next-minor milestone Jan 11, 2023
@jakubjezek001 jakubjezek001 merged commit 38dffbc into release/3.15.x Jan 11, 2023
@jakubjezek001 jakubjezek001 deleted the feature/OP-3845_nuke-convert-to-new-publisher branch January 11, 2023 11:50
@github-actions github-actions bot added this to the next-minor milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bump Minor Pull requests that update a dependency file host: Nuke type: feature Larger, user affecting changes and completely new things
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants