hotkey for Char vis in APEx animation

   849   2   2
User Avatar
Member
7 posts
Joined: 12月 2024
Offline
hello folks!

Id like to make my self a hotkey for turning on and off the character visibility in the view scene for houdini 20.5.410, but i'm not a script person at all and i am very new to houdini. Anyone else know how i might accomplish this? I like to speed up my workflow using hotkeys rather than constant menu clicking.

thanks in advance

Patricia.
User Avatar
Member
7997 posts
Joined: 7月 2005
Offline
Sorry for the late reply here. The scripting API is still very much in flux but if you create a shelf tool, then you can assign a hotkey to it for this code:
from apex.ui import statecommandutils as scu
from apex.ui.selectionmanager import utils as ssu
model = ssu.retrieveModel()
chars = {}
for p in scu.findSceneDataPaths('*.char'):
    c = scu.getSceneData(p)
    if not c.isVisible():
        chars[p.split('/')[-1]] = {}
ssu.sendCharacterVisibility(chars, model)
The main problem will be finding a hotkey that works. On a quick try, Ctrl+F2 assigned at the global scope was the first thing that worked for me.
Edited by edward - 2025年1月27日 16:14:13
User Avatar
Member
7997 posts
Joined: 7月 2005
Offline
PS. For the next major release, there will be some default available actions so that a script will not be needed.
  • Quick Links