hotkey for Char vis in APEx animation

   Views 721   Replies 2   Subscribers 2
User Avatar
Member
7 posts
Joined: Dec. 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
7969 posts
Joined: July 2005
Online
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 - Jan. 27, 2025 16:14:13
User Avatar
Member
7969 posts
Joined: July 2005
Online
PS. For the next major release, there will be some default available actions so that a script will not be needed.
  • Quick Links