jerry7

jerry7

About Me

Connect

LOCATION
ウェブサイト

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Undo group problem 2026年7月19日19:41

In the shelf tool, throwing an exception does not modify the scene. I want to implement this functionality in the Python panel.
This code works normally.

try:
    with hou.undos.group("my code"):
        hou.node('/obj/geo1').createNode('box')
        hou.node('/obj/geo1').createNode('box')
        raise hou.Error()
except:
        hou.undos.performUndo()


However, if an error occurs before modifying the scene, the current undo group is not recorded in the undo history. The undo executed in the except block will cancel the previous operation.

try:
    with hou.undos.group("my code"):
        raise hou.Error() # raise exception before modifying scene , no undo is added to undo history.
        hou.node('/obj/geo1').createNode('box')
        hou.node('/obj/geo1').createNode('box')
                
except:
        hou.undos.performUndo() # undo operation before my code

How to solve this problem?

Thanks!

Multiple Shelf panels and Shelf issues. 2026年7月18日19:53

I like the idea,you could send a RFE to sidefx.

H22 How to set Shelf color? 2026年7月17日4:49

Hi,

How to set shelf and tab have different colors as old version?

Thanks!