ynput / OpenPype

Main OpenPype repository and AYON openpype addon codebase
https://openpype.io
MIT License
280 stars 128 forks source link

Nuke: Push to project - AY-742 #6245

Closed tokejepsen closed 2 months ago

tokejepsen commented 3 months ago

Changelog Description

This introduces the "Push to Project" menu item in Nuke.

This enables users to push the current workfile to a different project and copy all files from Read nodes to a resources folder next to the workfile. Containers will be baked to normal Read nodes.

Also gizmos will be baked to groups.

Testing notes:

  1. In Nuke have some Read nodes and containers.
  2. Go to OpenPype > Push to Project
  3. Choose a project, asset, task and variant. Variant is technically not needed for the workfile, but I didnt want to modify the Push to Library Project code too much.
  4. Hit Push.
  5. Launch the workfile in the chosen project. It wont open on launch, cause the workfile naming is wrong, but this is intentional so its works like a version 0.
  6. Validate all Read nodes works with paths from the resources folder.
jakubjezek001 commented 3 months ago

Also, it raises the question of whether we should convert the OCIO config environment variable to a customOCIOconfig path as an absolute value. Alternatively, is it acceptable to keep the current expression and add it, as I have done in this example? [regsub -all {\\} [getenv BUILTIN_OCIO_ROOT] "/"]/aces_1.2/config.ocio

tokejepsen commented 2 months ago

Also, it raises the question of whether we should convert the OCIO config environment variable to a customOCIOconfig path as an absolute value. Alternatively, is it acceptable to keep the current expression and add it, as I have done in this example? [regsub -all {\} [getenv BUILTIN_OCIO_ROOT] "/"]/aces_1.2/config.ocio

We could, but if the OCIO environment variable is set, then it'll override anyways, so not sure it'll be worth it atm?

jakubjezek001 commented 2 months ago

We could, but if the OCIO environment variable is set, then it'll override anyways, so not sure it'll be worth it atm?

Sure, it's fine for now. If we run into the problem later, we can handle it when it comes up.