Python script undo

   1932   2   1
User Avatar
Member
3 posts
Joined: Feb. 2016
Offline
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
3 posts
Joined: Feb. 2016
Offline
Thank you Aerys!

Yolandi @ polygosh
  • Quick Links