Skip to content

Commit

Permalink
Merge with latest develop
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-ynput committed Dec 4, 2024
2 parents 86c282b + 0087bfc commit 13565b9
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 12 deletions.
41 changes: 37 additions & 4 deletions .github/workflows/assign_pr_to_project.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,48 @@
name: 🔸Auto assign pr
on:
workflow_dispatch:
inputs:
pr_number:
type: string
description: "Run workflow for this PR number"
required: true
project_id:
type: string
description: "Github Project Number"
required: true
default: "16"
pull_request:
types:
- opened

env:
GH_TOKEN: ${{ github.token }}

jobs:
get-pr-repo:
runs-on: ubuntu-latest
outputs:
pr_repo_name: ${{ steps.get-repo-name.outputs.repo_name || github.event.pull_request.head.repo.full_name }}

# INFO `github.event.pull_request.head.repo.full_name` is not available on manual triggered (dispatched) runs
steps:
- name: Get PR repo name
if: ${{ github.event_name == 'workflow_dispatch' }}
id: get-repo-name
run: |
repo_name=$(gh pr view ${{ inputs.pr_number }} --json headRepository,headRepositoryOwner --repo ${{ github.repository }} | jq -r '.headRepositoryOwner.login + "/" + .headRepository.name')
echo "repo_name=$repo_name" >> $GITHUB_OUTPUT
auto-assign-pr:
uses: ynput/ops-repo-automation/.github/workflows/pr_to_project.yml@develop
needs:
- get-pr-repo
if: ${{ needs.get-pr-repo.outputs.pr_repo_name == github.repository }}
uses: ynput/ops-repo-automation/.github/workflows/pr_to_project.yml@main
with:
repo: "${{ github.repository }}"
project_id: 16
pull_request_number: ${{ github.event.pull_request.number }}
project_id: ${{ inputs.project_id != '' && fromJSON(inputs.project_id) || 16 }}
pull_request_number: ${{ github.event.pull_request.number || fromJSON(inputs.pr_number) }}
secrets:
token: ${{ secrets.YNPUT_BOT_TOKEN }}
# INFO fallback to default `github.token` is required for PRs from forks
# INFO organization secrets won't be available to forks
token: ${{ secrets.YNPUT_BOT_TOKEN || github.token}}
2 changes: 1 addition & 1 deletion .github/workflows/validate_pr_labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
validate-type-label:
uses: ynput/ops-repo-automation/.github/workflows/validate_pr_labels.yml@develop
uses: ynput/ops-repo-automation/.github/workflows/validate_pr_labels.yml@main
with:
repo: "${{ github.repository }}"
pull_request_number: ${{ github.event.pull_request.number }}
Expand Down
2 changes: 1 addition & 1 deletion client/ayon_nuke/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
"""Package declaring AYON addon 'nuke' version."""
__version__ = "0.2.5+dev"
__version__ = "0.2.6+dev"
2 changes: 1 addition & 1 deletion package.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "nuke"
title = "Nuke"
version = "0.2.5+dev"
version = "0.2.6+dev"
app_host_name = "nuke"
client_dir = "ayon_nuke"

Expand Down
4 changes: 2 additions & 2 deletions server/settings/gizmo.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class GizmoItem(BaseSettingsModel):


DEFAULT_GIZMO_ITEM = {
"toolbar_menu_name": "OpenPype Gizmo",
"toolbar_menu_name": "AYON Gizmo",
"gizmo_source_dir": {
"windows": [],
"darwin": [],
Expand All @@ -69,7 +69,7 @@ class GizmoItem(BaseSettingsModel):
{
"sourcetype": "python",
"title": "Gizmo Note",
"command": "nuke.nodes.StickyNote(label='You can create your own toolbar menu in the Nuke GizmoMenu of OpenPype')",
"command": "nuke.nodes.StickyNote(label='You can create your own toolbar menu in the Nuke GizmoMenu of AYON.')",
"icon": "",
"shortcut": ""
}
Expand Down
28 changes: 27 additions & 1 deletion server/settings/imageio.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,41 @@
ColorspaceConfigurationModel,
)

def nuke_creator_plugins_enum():
return [
{"value": "CreateWritePrerender", "label": "Prerender (write)"},
{"value": "CreateCamera", "label": "Camera (3d)"},
{"value": "CreateGizmo", "label": "Gizmo (group)"},
{"value": "CreateWriteImage", "label": "Image (write)"},
{"value": "CreateModel", "label": "Model (3d)"},
{"value": "CreateBackdrop", "label": "Nukenodes (backdrop)"},
{"value": "CreateWriteRender", "label": "Render (write)"},
{"value": "CreateSource", "label": "Source (read)"},
]


def nuke_node_class_enum():
return [
{"value": "Write", "label": "Write [Image]"},
{"value": "Read", "label": "Read [Image]"},
{"value": "Group", "label": "Group [Other]"},
{"value": "Camera4", "label": "Camera [3D]"},
{"value": "Camera2", "label": "Camera [3D Classic]"},
{"value": "Scene", "label": "Scene [3D Classic]"},
{"value": "BackdropNode", "label": "Backdrop [Other]"},
]


class NodesModel(BaseSettingsModel):
_layout = "expanded"
plugins: list[str] = SettingsField(
default_factory=list,
title="Used in plugins"
title="Used in plugins",
enum_resolver=nuke_creator_plugins_enum
)
nuke_node_class: str = SettingsField(
title="Nuke Node Class",
enum_resolver=nuke_node_class_enum
)


Expand Down
4 changes: 2 additions & 2 deletions server/settings/scriptsmenu.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ class ScriptsmenuSettings(BaseSettingsModel):
"type": "action",
"sourcetype": "python",
"title": "Set non publish output for Write Node",
"command": "from ayon_nuke.startup.custom_write_node import main;main();", # noqa
"tooltip": "Open the OpenPype Nuke user doc page"
"command": "from ayon_nuke.startup.custom_write_node import main; main();", # noqa
"tooltip": "Set up write nodes for non-publish"
}
]
}

0 comments on commit 13565b9

Please sign in to comment.