Move Layout From HDA to HDA

node = hou.node('/obj/matnet_explosion/pyroshader_improved1')
src = hou.node('/shop/pyro_improved1')
node.type().definition().setParmTemplateGroup(src.type().definition().parmTemplateGroup(), rename_conflicting_parms=False)
node.setParmTemplateGroup(node.type().definition().parmTemplateGroup(), rename_conflicting_parms=False)

hou.phm() in event handlers

phm() → hou.HDAModule

“This shortcut lets you write hou.phm() instead of hou.pwd().hdaModule(). You are most likely to use this shortcut from event handlers, button callbacks, and menu generation scripts in digital assets.”

It is Houdini’s Help.
But phm() and hou.pwd().hdaModule() do not work in event handlers.

Use instead in event handlers: