Im very much a python noob, but im looking to learn.
Im trying to create some simple scripts to shorten some tasks in blender.
in this case I am trying to create a toggle for “Align Rotation to Target” in the snapping menu.
From my google-ing this seems correct but it returns an invalid syntax error so im clearly missing something…
can anyone help?
@killbourne If you are using windows then go to top left corner windows>toggle system console. This will open up terminal / console in which you can see error message. And answer by @Valentin_Min is correct. You need == for comparison, single = is assignment operator.
Fantastic! thank you all for the help
got the console as well as the script to work beautifully.
now to carry on the journey of learning python in blender…
before the if instruction. The variable (in this case a reference) is created automatically, you don’t need to declare it like in other languages. Be careful that some stuff are objects while others are direct values (immutable). Look for them in the Blender’s documentation.