mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #203 from pypeclub/bugfix/remove_harmony_from_top
bugfix/remove harmony from top
This commit is contained in:
commit
3fd6e8fb29
1 changed files with 0 additions and 39 deletions
|
|
@ -1,39 +0,0 @@
|
|||
import os
|
||||
|
||||
from avalon import api, harmony
|
||||
import pyblish.api
|
||||
|
||||
|
||||
def install():
|
||||
print("Installing Pype config...")
|
||||
|
||||
plugins_directory = os.path.join(
|
||||
os.path.dirname(os.path.dirname(__file__)), "plugins", "harmony"
|
||||
)
|
||||
|
||||
pyblish.api.register_plugin_path(
|
||||
os.path.join(plugins_directory, "publish")
|
||||
)
|
||||
api.register_plugin_path(
|
||||
api.Loader, os.path.join(plugins_directory, "load")
|
||||
)
|
||||
api.register_plugin_path(
|
||||
api.Creator, os.path.join(plugins_directory, "create")
|
||||
)
|
||||
|
||||
pyblish.api.register_callback(
|
||||
"instanceToggled", on_pyblish_instance_toggled
|
||||
)
|
||||
|
||||
|
||||
def on_pyblish_instance_toggled(instance, old_value, new_value):
|
||||
"""Toggle node enabling on instance toggles."""
|
||||
func = """function func(args)
|
||||
{
|
||||
node.setEnable(args[0], args[1])
|
||||
}
|
||||
func
|
||||
"""
|
||||
harmony.send(
|
||||
{"function": func, "args": [instance[0], new_value]}
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue