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

Way to fire a command without it adding to the undo stack?

$
0
0

Hi there,

As the title says, is there a way to fire a command without it being recorded in the undo-stack?

I use a custom command SetTargetToCursor quite frequently: CommandTracker shows I’ve used it 6.5K times on a file that I’ve been working on since late April.

What bothers me is there are situations where I’m looking around my model a lot before modelling anything or wanting to undo something, so I’ll end up using the command a lot. When I want to undo something, I have to hit Ctrl-Z a bunch of times to go past all my SetTargetToCursor commands before I get to a relevant modelling command.

So my command history often looks like this:

I tried adding SetTargetToCursor to the ‘Never repeat these commands’ box in Options > General but no luck.

If it helps, the command is a plug-in of a Rhinoscript that I compiled using the built-in script compiler. Could there be a way to add some code to pause and start the undo-stack recording at the beginning and end of the script respectively?

If anyone has any ideas, I’d appreciate it.

– Vince

8 posts - 5 participants

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles