fix: .pypanel must be XML, not JSON (Houdini convention)
This commit is contained in:
@@ -1,6 +1,34 @@
|
|||||||
{
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
"interface": "hermes_bridge_panel.show",
|
<pythonPanelDocument>
|
||||||
"label": "Hermes Bridge",
|
<interface name="hermes_bridge" label="Hermes Bridge" icon="MISC_python"
|
||||||
"icon": "MISC_python",
|
help_url="https://git.niklashmotion.art/Hermes/hermes-houdini-bridge">
|
||||||
"help_url": "https://git.niklashmotion.art/Hermes/hermes-houdini-bridge"
|
<script><![CDATA[
|
||||||
}
|
import sys, os
|
||||||
|
|
||||||
|
# Ensure our package scripts are importable
|
||||||
|
_pkg = os.environ.get("HHB_PACKAGE", "")
|
||||||
|
if _pkg:
|
||||||
|
_scripts = os.path.join(_pkg, "scripts", "python")
|
||||||
|
if _scripts not in sys.path:
|
||||||
|
sys.path.insert(0, _scripts)
|
||||||
|
|
||||||
|
from hermes_bridge_panel import HermesBridgePanel
|
||||||
|
|
||||||
|
_the_panel = None
|
||||||
|
|
||||||
|
def onCreateInterface():
|
||||||
|
global _the_panel
|
||||||
|
_the_panel = HermesBridgePanel()
|
||||||
|
return _the_panel
|
||||||
|
|
||||||
|
def onActivateInterface():
|
||||||
|
if _the_panel:
|
||||||
|
_the_panel._refresh_status()
|
||||||
|
|
||||||
|
def onDestroyInterface():
|
||||||
|
global _the_panel
|
||||||
|
_the_panel = None
|
||||||
|
]]></script>
|
||||||
|
<includeInToolbarMenu menu_position="500" create_separator="true"/>
|
||||||
|
</interface>
|
||||||
|
</pythonPanelDocument>
|
||||||
|
|||||||
Reference in New Issue
Block a user