Toggle selection on and off with Show/End result

Toggle selection on and off with Show/End result

keith_brown
Advocate Advocate
570 Views
2 Replies
Message 1 of 3

Toggle selection on and off with Show/End result

keith_brown
Advocate
Advocate

 

 

I've put together a simple script that (in this case) toggles a mesh smooth modifier and hides the edges.

 

 

 

	showEndResult = not showEndResult
	actionMan.executeAction 0 "369"	

 

 

 

 

When the showEndResult is true, however, the vertices are still there. Is there a way to hide these when it's true and enable the latest selection again when showEndResult is false?

 

Script is binded to my TAB key when toggling:

0 Likes
571 Views
2 Replies
Replies (2)
Message 2 of 3

denisT.MaxDoctor
Advisor
Advisor

... because the sub-object level still set to 1 (#vertices in your case). You can change subobjectlevel to 0:

subobjectlevel = 0

but storing and restoring the previous level for the current object you have to do yourself. There is no built-in mechanism for this.

0 Likes
Message 3 of 3

keith_brown
Advocate
Advocate

Yes I tried making some if, else statements but as you say.

I can't store a variable that holds the latest subobjectlevel. If I set it to 0 it will be 0 further on.

0 Likes