Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5938

How to Capture and Replay Undo/Redo Actions in Grasshopper Python?

$
0
0

Hi everyone,

I’m developing a Python tool to help teachers and students track Grasshopper modeling history by recording and replaying undo/redo actions or saving versioned states of a definition. The goal is to let users review and reload past actions step-by-step, so its easier to understand workflows and automatic version control system.

I’ve managed to retrieve GH_UndoServer.UndoNames and UndoGuids, which provide action names (e.g., “Add Component, “Delete”, “Move”). However, I can’t find a way to retrieve the actual action details and apply them again.

What I’m Trying to Achieve:

1 Can we programmatically replay an action? (e.g., push an undo/redo record back to Grasshopper)
2 If not, can we at least extract what changed? (e.g., slider value update, menu option toggled, component deleted)
3 If that’s also impossible, can we identify which specific component was affected?

Any suggestions on how to retrieve, store, and reuse later? Any insights are appreciated!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles