-
Notifications
You must be signed in to change notification settings - Fork 12
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
Initial commit of pyblish-houdini. Structure was copied from pyblish-… #1
Conversation
…maya and tweaked to reflect houdini specifics. Publish is added on the bottom of 'file' menu (this needs to be tweaked of course). GUI currently doesn't load and throws peculiar : 'This application failed to start because it could not find or load the Qt platform plugin "Windows." Reinstalling the application may fix this problem'
Thanks for this. Some notes.
Qt testingFor testing purposes, you can do: # In Houdini
from pyblish_win import util
util.augment_pythonpath()
util.augment_path()
import pyblish_houdini
pyblish_houdini.setup()
pyblish_houdini.show() It will append the Pyblish for Windows Python interpreter to the PATH, so that QML can access it. Houdini hostAnother issue I encountered was that Houdini has many executables, such as I'm sending a pull-request your way with some changes. Once it works with the above |
Sure this was just for quick testing
my bad. Pycharms put's this on top of all new code. Have to get rid of that setting
There's a few of them but not that many. I reckon for now until we find something better, we could just check if executable is in the list of provided ones. [houdini, houdinifx, hescape, hmaster, happrentice]. hescape and hmaster are there just forlegacy reasons. Currently only houdini and houdinifx should be needed. |
Some changes, see #1 for details.
Ah, that's good to hear. The reason I mentioned it was because my apprentice setup had put I do have an idea for a possible solution to this that I might go ahead and implement. It's bound to arise again for other integrations. Something like this. From Houdini integration import pyblish.api
pyblish.api.register_host(name="houdini", regex="(houdini)") But that's for another issue. |
Could you elaborate a bit on how the installation works? I noticed there was a |
Houdini is looking for a HOUDINI_PATH env var when it's launching. Any files of scripts that it finds will get appended to it's default launching scripts (creating menus, loading nodes etc.) Folder structure has to be the same as found in the houdini root directory (C:\Program Files\Side Effects Software\Houdini {Version}\houdini). Technically it works like NUKE_PATH however it can override or add to almost anything in houdini at startup. Nodes placed in HOUDINI_PATH/otls will be available, images in HOUDINI_PATH/pic can be loaded by refering to picture name without the rest of the path, anything in /scripts can be called directly as a module. Now our installer has /scripts with 123.py file. This is equivalent to maya's userSetup.py (it runs when houdini session starts) second file is MainMenuCommon.xml. This one is similar to Nuke's menu.py. It defines the main menu bar common across all houdini executables. (apprentice, fx, and normal have a few different options in menus, but this file holds everything that is common between them, hence ideal for us to add pyblish menu). It's structure need to follow MainMenuCommon.xml (in houdini root) which defines the deafult Hou menus. There is also ExampleMenu.xml which has guide on how to add custom menus to houdini. This is the simplest variation that adds pyblish after 'Save as' in file menu <?xml version="1.0" encoding="UTF-8"?>
<mainMenu>
<menuBar>
<addScriptItem id="h.pyblish">
<parent>file_menu</parent>
<label>Publish</label>
<insertAfter>h.save_as</insertAfter>
<scriptCode><![CDATA[# In Houdini
from pyblish_win import util
util.augment_pythonpath()
util.augment_path()
import pyblish_houdini
pyblish_houdini.setup()
pyblish_houdini.show()]]></scriptCode>
<scriptArgs></scriptArgs>
</addScriptItem>
</menuBar>
</mainMenu> The only trouble with this approach is that menus in houdini can only be created on startup and cannot be changed during the session. Just something to keep in mind. |
Awesome! There won't be a need for the If you adjust the menu item to only include |
Done. I'm leaving for the weekend now so I won't have access to a computer, but should be able to reply here or on gitter if you need something. |
Initial commit of pyblish-houdini. Structure was copied from pyblish-…
Merged! Have a great weekend! |
Structure was copied from pyblish-maya and tweaked to reflect houdini specifics. Publish is added on the bottom of 'file' menu (this needs to be tweaked of course).
Thought this might be a good start even though GUI currently doesn't load and throws this error:
'This application failed to start because it could not find or load the Qt platform plugin "Windows."
Reinstalling the application may fix this problem'