Supercharged H20 extension (TouchDesigner Style)

   37315   122   8
User Avatar
Member
32 posts
Joined: May 2020
Offline
I lost the function of dropdown menus while i try to disable overlay network editor. Which files and names contain this dropdown function so i can bring it back?
User Avatar
Member
4702 posts
Joined: Feb. 2012
Online
utility_hotkey_system.py
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
32 posts
Joined: May 2020
Offline
Is there a way to create custom hotkey.csv files for different desktops? Or maybe assign a hotkey to change hotkeys? I wanna be able to change my custom hotkeys to grooming tools when i do grooming and terrain tools when i do terrain. Is it possible to do this?
User Avatar
Member
4702 posts
Joined: Feb. 2012
Online
omerlefaruk
Is there a way to create custom hotkey.csv files for different desktops? Or maybe assign a hotkey to change hotkeys? I wanna be able to change my custom hotkeys to grooming tools when i do grooming and terrain tools when i do terrain. Is it possible to do this?

Yes you can do this easily, you just have to create different CSV files and implement the logic to load different ones based on some mode that you can store for example.

Check utility_hotkey_system.py

def __load_actions():
    if showstatus:
        print ("Reloading hotkeys...")

    global __actions
    __actions = defaultdict(lambda: defaultdict(list))
    with open(hotkeysfile) as f:
        reader = csv.DictReader(f)
        for row in reader:
            for context in ("OBJECT", "SOP", "VOP", "DOP", "COP2", "CHOP", "SHOP", "DRIVER", "TOP", "LOP"):
                if row[context] != '':
                    __actions[context][row["Key Name"]].append(row[context])
__load_actions()

this.fs_watcher = QtCore.QFileSystemWatcher()
this.fs_watcher.addPath(hotkeysfile)
this.fs_watcher.fileChanged.connect(__load_actions)

showstatus = True
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
32 posts
Joined: May 2020
Offline
When i'm using Supercharge in 18.5 with ODTools, i can't use the hotkeys for creating nodes. What can be causes the problem? It does work on houdini 19
User Avatar
Member
4702 posts
Joined: Feb. 2012
Online
Perhaps OdTools also override the nodegraph hooks? That would be my guess.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
32 posts
Joined: May 2020
Offline
Is it possible to use overlay menu in network view list in lists? I wanna create a list that includes
mn:[('op:heightfield', 'H')]
then create heightfield noises list with
mn:[('op:heightfield_noise', 'N')]
in the heightfield menu that i just created.

I'm trying something like this but no luck
mn:[('Heightfield', 'op:heightfield', 'H'),
('mn:[('Heightfield_Noises', 'op:heightfield_noise', 'A')]', 'N'),
('op:heightfield_blur', 'B')]
Edited by raumafu - Sept. 7, 2022 17:45:24
User Avatar
Member
284 posts
Joined: Oct. 2019
Offline
animatrix_
Perhaps OdTools also override the nodegraph hooks? That would be my guess.
yeah.. sorry.. it does...
Oliver Hotz
Origami Digital
Author of ODTools for Houdini: https://origamidigital.com/cart/index.php?route=product/product&path=59_63&product_id=66 [origamidigital.com]
User Avatar
Member
1 posts
Joined: Sept. 2020
Offline
Hey there, I've been really enjoying the addon so far.

Just one question I haven't been able to figure out yet. In the Advanced UI Customization video you mention the ability to use shortcuts to toggle open/close some of the other panes, like the geo spreadsheet. Are there default shortcuts you have created to do that or do I need to set them up myself?

Also, is it possible to set the network view overlay to toggle off/on without having to hold down the spacebar to see the 3D viewport? For example, press spacebar once to turn off the network view overlay and show the 3D view, and then another spacebar press to bring it back?

Thanks!
User Avatar
Member
4702 posts
Joined: Feb. 2012
Online
raumafu
Is it possible to use overlay menu in network view list in lists? I wanna create a list that includes
mn:[('op:heightfield', 'H')]
then create heightfield noises list with
mn:[('op:heightfield_noise', 'N')]
in the heightfield menu that i just created.

I'm trying something like this but no luck
mn:[('Heightfield', 'op:heightfield', 'H'),
('mn:[('Heightfield_Noises', 'op:heightfield_noise', 'A')]', 'N'),
('op:heightfield_blur', 'B')]

You mean different configurations of the same node? If so yes, you can invoke presets from anywhere include the menus.

My latest H key is like this where Group Highlight is AttribWrangle preset.

H,,"mn:[('op:groupcombine', 'C'),
('op:groupcopy', 'Y'),
('op:groupdelete', 'D'),
('op:groupexpand', 'E'),
('op:groupexpression', 'X'),
('op:groupfindpath', 'F'),
('op:groupfromattribboundary', 'B'),
('op:attribwrangle(Highlight Group)|Group Highlight', 'L'),
('op:grouppromote', 'P'),
('op:grouprange', 'A'),
('op:grouprename', 'R')]","mn:[('op:bbox', 'B'),
('op:relbbox', 'R'),
('op:primuv', 'P'),
('op:primnormal', 'N'),
('op:intersect', 'I'),
('op:intersectall', 'A'),
('op:minpos', 'M'),
('op:xyzdist', 'X'),
('op:displacenml', 'D'),
('op:surfacedist', 'S'),
('op:ingroup', 'G'),
('op:texture', 'T')]",,,,,,,

kylehamm
Hey there, I've been really enjoying the addon so far.

Just one question I haven't been able to figure out yet. In the Advanced UI Customization video you mention the ability to use shortcuts to toggle open/close some of the other panes, like the geo spreadsheet. Are there default shortcuts you have created to do that or do I need to set them up myself?

Also, is it possible to set the network view overlay to toggle off/on without having to hold down the spacebar to see the 3D viewport? For example, press spacebar once to turn off the network view overlay and show the 3D view, and then another spacebar press to bring it back?

Thanks!

These hotkeys I configured using Supercharged shelf buttons that was created. So you can assign your own hotkeys if you are not using my overrides, where some of the tools are:

    <memberTool name="toggleOverlayNetworkEditor"/>
    <memberTool name="toggleNetworkEditor"/>
    <memberTool name="toggleDetailsView"/>
    <memberTool name="togglePerfMon"/>
    <memberTool name="toggleParameterEditor"/>
    <memberTool name="toggleSceneView"/>
    <memberTool name="toggleSceneRenderView"/>

The default key for toggling the overlay network editor is ` (tilde) key but you can assign Space too. Because Space key is a special volatile key. So if you want to do this, open up the HOUDINI_USER_DIR/animatrix/overlay network editor/python3.9libs/pythonrc.py and change this line:

useVolatileSpaceToToggleNetworkEditor = True

to:

useVolatileSpaceToToggleNetworkEditor = False


Hope you enjoy it!
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
32 posts
Joined: May 2020
Offline
Both actually. I want to assign a hotkey for opening a menu like this

-- Press the menu hotkey H --

--Heightfield_Nodes, H
--Heightfield_Presets, P
--Heightfield_Noise Presets, N

-- Pressed P --

I--Heightfield_Noise_Default, H
I--Heightfield_Noise_Low_Freq_Preset, P
I--Heightfield_Noise_High_Freq_Preset, V

A menu that opens another menu that opens another menu with custom node presets.

Image example attached.
Edited by raumafu - Dec. 11, 2022 11:32:28

Attachments:
ApplicationFrameHost_LfMh35p3kW.png (78.4 KB)

User Avatar
Member
4702 posts
Joined: Feb. 2012
Online
I see what you mean. By default the built-in menu system only supports one level. It would likely need to be extended further to support multi-level menus. You can edit the performAction and executeActionString functions inside utility_hotkey_system.py for this.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
32 posts
Joined: May 2020
Offline
Is it possible to add ALT key as a volatile key for viewport instead of space key for overlay network view?
User Avatar
Member
4702 posts
Joined: Feb. 2012
Online
raumafu
Is it possible to add ALT key as a volatile key for viewport instead of space key for overlay network view?

You can use the setVolatileKeys(keys) function:
https://www.sidefx.com/docs/houdini/hom/hou/NetworkEditor.html [www.sidefx.com]

I have a feeling just the modifier key by itself might not work but it's worth a try.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
32 posts
Joined: May 2020
Offline
I have found this function inside utility.ui and i'd like to use this function with a hotkey inside a wrangle but when i assign a hotkey to this function inside a hotkey editor, it just doesn't work. How can i use this? My workaround is that i click an empty space in the parameter window, press the hotkey then ctrl + v paste the number inside a wrangle. Is this the correct behavior?

def pasteRandomNumber(digits=4, decimals=4):
    rnd = np.random.uniform(0, pow(10, digits), 1)[0].round(decimals=decimals)
    hou.ui.copyTextToClipboard(str(rnd))
    key = QtGui.QKeyEvent(QtGui.QKeyEvent.KeyPress, QtGui.Qt.Key_V, QtGui.Qt.ControlModifier, "V")
    QtWidgets.QApplication.sendEvent(QtWidgets.QApplication.focusWidget(), key)
Edited by raumafu - Aug. 22, 2023 14:50:44
User Avatar
Member
4702 posts
Joined: Feb. 2012
Online
raumafu
I have found this function inside utility.ui and i'd like to use this function with a hotkey inside a wrangle but when i assign a hotkey to this function inside a hotkey editor, it just doesn't work. How can i use this? My workaround is that i click an empty space in the parameter window, press the hotkey then ctrl + v paste the number inside a wrangle. Is this the correct behavior?

def pasteRandomNumber(digits=4, decimals=4):
    rnd = np.random.uniform(0, pow(10, digits), 1)[0].round(decimals=decimals)
    hou.ui.copyTextToClipboard(str(rnd))
    key = QtGui.QKeyEvent(QtGui.QKeyEvent.KeyPress, QtGui.Qt.Key_V, QtGui.Qt.ControlModifier, "V")
    QtWidgets.QApplication.sendEvent(QtWidgets.QApplication.focusWidget(), key)

Normally it should just work that. Basically the code generates a random number, copies it into the clipboard and then invokes Ctrl+V. So it should paste this number wherever the caret is currently.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
4702 posts
Joined: Feb. 2012
Online
Supercharged extension is updated to be fully compatible with Houdini 20. It also implements the latest changes to be more in line with the latest API, such as the new hotkey standard to use unmodified keys:
https://www.sidefx.com/docs/houdini/news/20/hotkeys.html [www.sidefx.com]

The new version is freely available to existing users. Enjoy
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
1 posts
Joined: Jan. 2022
Online
I have a problem using Houdini 20.0

When I right-click, it looks like this

Traceback (most recent call last):
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.506/houdini/python3.10libs\nodegraph.py", line 170, in handleEventCoroutine
event_handler = event_handler.handleEvent(uievent,
File "C:\Users/User/Documents/houdini20.0/animatrix/hotkey system/python3.10libs\nodegraphhooks.py", line 229, in handleEvent
uievent.editor.openTabMenu(key = utils.getDefaultTabMenuKey())
TypeError: getDefaultTabMenuKey() missing 1 required positional argument: 'editor'
User Avatar
Member
4702 posts
Joined: Feb. 2012
Online
a2jixrxau
I have a problem using Houdini 20.0

When I right-click, it looks like this

Traceback (most recent call last):
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.506/houdini/python3.10libs\nodegraph.py", line 170, in handleEventCoroutine
event_handler = event_handler.handleEvent(uievent,
File "C:\Users/User/Documents/houdini20.0/animatrix/hotkey system/python3.10libs\nodegraphhooks.py", line 229, in handleEvent
uievent.editor.openTabMenu(key = utils.getDefaultTabMenuKey())
TypeError: getDefaultTabMenuKey() missing 1 required positional argument: 'editor'

Hi, that's strange. I am unable to reproduce it. Which context and how are you right clicking i.e. is it on a node, etc? Recording a video would help.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
32 posts
Joined: May 2020
Offline
animatrix_
Supercharged extension is updated to be fully compatible with Houdini 20. It also implements the latest changes to be more in line with the latest API, such as the new hotkey standard to use unmodified keys:
https://www.sidefx.com/docs/houdini/news/20/hotkeys.html [www.sidefx.com]

The new version is freely available to existing users. Enjoy

Is it also updated on the patreon?
  • Quick Links