forked from ynput/OpenPype
-
Notifications
You must be signed in to change notification settings - Fork 0
Fusion: Tweak integration implementation #2
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
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2723294
Draft for re-implementation of Fusion integration
BigRoy ca3e2cb
Add "render" family so Loaders can be used on published renders from …
BigRoy 4cd01e2
Match menu labels and structure more with other hosts
BigRoy 364ee8b
Fusion Avalon pop-up menu use OpenPype styling
BigRoy 72abffa
Add current asset label in OpenPype menu to clarify where that proces…
BigRoy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import os | ||
|
|
||
| HOST_DIR = os.path.dirname( | ||
| os.path.abspath(__file__) | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| { | ||
| Action | ||
| { | ||
| ID = "OpenPype_Menu", | ||
| Category = "OpenPype", | ||
| Name = "OpenPype Menu", | ||
|
|
||
| Targets = | ||
| { | ||
| Composition = | ||
| { | ||
| Execute = _Lua [=[ | ||
| local scriptPath = app:MapPath("OpenPype:MenuScripts/openpype_menu.py") | ||
| if bmd.fileexists(scriptPath) == false then | ||
| print("[OpenPype Error] Can't run file: " .. scriptPath) | ||
| else | ||
| target:RunScript(scriptPath) | ||
| end | ||
| ]=], | ||
| }, | ||
| }, | ||
| }, | ||
| Action | ||
| { | ||
| ID = "OpenPype_Install_PySide2", | ||
| Category = "OpenPype", | ||
| Name = "Install PySide2", | ||
|
|
||
| Targets = | ||
| { | ||
| Composition = | ||
| { | ||
| Execute = _Lua [=[ | ||
| local scriptPath = app:MapPath("OpenPype:MenuScripts/install_pyside2.py") | ||
| if bmd.fileexists(scriptPath) == false then | ||
| print("[OpenPype Error] Can't run file: " .. scriptPath) | ||
| else | ||
| target:RunScript(scriptPath) | ||
| end | ||
| ]=], | ||
| }, | ||
| }, | ||
| }, | ||
| Menus | ||
| { | ||
| Target = "ChildFrame", | ||
|
|
||
| Before "Help" | ||
| { | ||
| Sub "OpenPype" | ||
| { | ||
| "OpenPype_Menu{}", | ||
| "_", | ||
| Sub "Admin" { | ||
| "OpenPype_Install_PySide2{}" | ||
| } | ||
| } | ||
| }, | ||
| }, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| ### OpenPype deploy MenuScripts | ||
|
|
||
| Note that this `MenuScripts` is not an official Fusion folder. | ||
| OpenPype only uses this folder in `{fusion}/deploy/` to trigger the OpenPype menu actions. | ||
|
|
||
| They are used in the actions defined in `.fu` files in `{fusion}/deploy/Config`. |
14 changes: 14 additions & 0 deletions
14
openpype/hosts/fusion/deploy/MenuScripts/install_pyside2.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # This is just a quick hack for users running Py3 locally but having no | ||
| # Qt library installed | ||
| import os | ||
|
|
||
| try: | ||
| print("Qt library found, nothing to do.") | ||
| from Qt import QtWidgets | ||
| except ImportError as exc: | ||
| print("Assuming no Qt library is installed..") | ||
| print('Installing PySide2 for Python 3.6: ' | ||
| f'{os.environ["FUSION16_PYTHON36_HOME"]}') | ||
|
|
||
| import subprocess | ||
| subprocess.Popen(["pip", "install", "PySide2"]) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| Locked = true, | ||
| Global = { | ||
| Paths = { | ||
| Map = { | ||
| ["OpenPype:"] = "$(OPENPYPE_FUSION)/deploy", | ||
| ["Reactor:"] = "$(REACTOR)", | ||
|
|
||
| ["Config:"] = "UserPaths:Config;OpenPype:Config", | ||
| ["Scripts:"] = "UserPaths:Scripts;Reactor:System/Scripts;OpenPype:Scripts", | ||
| ["UserPaths:"] = "UserData:;AllData:;Fusion:;Reactor:Deploy" | ||
| }, | ||
| }, | ||
| Script = { | ||
| PythonVersion = 3, | ||
| Python3Forced = true | ||
| }, | ||
| }, | ||
| } |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warning: This can install into e.g. OpenPype
.venvdue to not explicitly enough installing into the correct python.A fix was implemented here: 3d5fd09