How to set boolean in operator
I have got this boolean that has an operator that'll change its value depending on whether or not the Alt key is pressed.
There are two operators, one that'll execute when the alt key is pressed down and another one that'll execute when the alt key is released (img1&2).
The issue is that these operators don't seem to be changing the value of the boolean. They execute but don't change the "alt_is_pressed" boolean variable.
I feel like I am missing something very simple and basic, or I need to change my approach, but I'm not sure what is missing and what other way to approach this.
The reason I have this operator is so that change the way the a vertex float changes its value. If alt is pressed the value of all selected vertices will equal the active selected vertex value.
If alt is not pressed all selected vertices will equal their own value plus the difference from the previous value.
So, if a value was 1 then it was changed to 3, the difference would be 2 so each selected vertices will equal its self plus 2. So, the vert with 0.2 will now equal 2.2, the one with 0.5 will equal 2.5 etc.(img3)
Any help would be greatly appreciated. I included the code along with the images in case you want to go in and edit some things yourself.
1
12 comments
Orange Flip
3
How to set boolean in operator
CG Python Academy (Free)
skool.com/cgpython
3D artists learning Blender Python.
Leaderboard (30-day)
Powered by