Python script undo

   2593   2   1
User Avatar
Member
4 posts
Joined: Feb. 2016
Online
Hi,

I'm running a basic script from the Python Source Editor that creates some shaders. How do I undo the execution of the whole script in one go? Ctrl Z seems to be undoing it one step at a time…

Yolandi @ polygosh
User Avatar
Member
14 posts
Joined: June 2018
Offline
Use this syntax to group commands in a single undo group:

with hou.undos.group("name goes here"):
do_stuff()
User Avatar
Member
4 posts
Joined: Feb. 2016
Online
Thank you Aerys!

Yolandi @ polygosh
  • Quick Links