Some of mesh editing tools in blender have weird ways of working.
So far, most annoying is mirroring an object. The tool itself works as one might expect, but the mirrored object always has a negative scale on mirror axis:
[ You are not allowed to view attachments ]
It can be fixed by using 'apply scale' command to reset X, Y and Z scales to positive 1.000.
If the object's scaling is not uniform, it affects modifiers like beveling (which isn't that great in Blender, though). Anyway, I wonder where negative or non-uniform scale can be used without messing things out?
So, once the scale is reset, perhaps because of negative scale value, mirrored object's normals or faces are inverted, which also affects modifiers (such as Boolean operations won't work):
[ You are not allowed to view attachments ]
Next thing to do is to select all faces in edit mode, and apply ‘flip’ or ‘recalculate outside’ command.
Same steps have to be repeated over and over every time. It makes otherwise simple operation rather tedious, so I started to look if there are ways to automate previous steps.
One way is to use output of Blender's info window, which shows history of previous actions:
[ You are not allowed to view attachments ]
Commands can then be copied to Blender's text editor and executed there as a script. Seems to work quite well, with just one click. But to make a button for it to 3D window instead, I asked ChatGPT - that glorified oracle - how that can be done.
It added some python code to make it happen. Commands included are:
- Duplicate object
- Mirror (in this case in x axis)
- Apply scale
- Enter edit mode
- Selection mode face
- Select all (faces)
- Flip normals
- Enter object mode
Although I'm not much of a programmer, I was able to figure out, what kind of code snippet to add to make a script to an installable add-on:
[ You are not allowed to view attachments ]
There are also some other command sequences, that I guess can be handled or 'buttonized' with similar python scripts as well. The script that ChatGPT provided, has comments on what different parts of code does, so it's fairly clear where certain list of commands should be placed.