Notifications
Clear all
[Closed] Macros: Selection and Implementation
Mar 14, 2008 3:56 am
Hey Guys,
I've got a general question that I bet is really simple. While trying to make some integrated utilities, I've realized that it's kind of hard to make them seamless. For instance, when you use chamfer on vertices with the floater, you'll notice that if you deselect some verts while the tool window is open, the tool dynamically updates the effect. Neat! I wish I could do this in my own scripts.
How would you maintain an original version of the geometry in the viewport so that the user could select and deselect vertices, while also maintaining the [i]visual[/i] appearance of having chamfered those vertices?
How does one go about writing something this way? My current scripts are using a lousy substitute:
1. Apply the tool to the selection.
2. If the user adjusts a variable,
2.a undo, and
2.b Reapply the tool using the adjusted variable.
On ok, destroy the dialog.
On cancel, just undo.
The dialog is modal to preserve the undo stack.