OK it's ready for merge. There is just one more thing that I wanted to discuss with you.
I noticed there are two reasons hollow gives empty result (object with no mesh):
- Offset value is…
Enum values are supposed to be in UPPERCASE
You did not expand enum property so it currently shows as dropdown list.
Add draw method to the operator, right before execute
method and manually compose UI:
def draw(self,…
Adding presets was is just a suggestion,
Nice to have you back, meanwhile I got the flu and currently coughing my lungs out, but it's getting better.
I think that simple checkbox called inside is not user friendly, it is fine with on/off options, but with something more complex it's better to make all available options visible right away (even when there is only two options).
The scene settings have to go, it's hidden behavior and is really convoluted without clear benefit, and for reusing settings it is better to use presets.
default=1
I'm not suggesting removing the bi-directional offset functionality, just flip the sign, so positive would mean inward and negative outward, similar to solidify modifier.
The only software that I…
These comments are redundant, it's obvious why you flip normals, why you move new object to a location of current object, or why you remove mesh (you could name it mesh_temp
to emphasize intent).
Part of this code should be outside if
block, currently selection changes only when hollow duplicate is created. It should change regardless of that, new object is added to the scene - it should be selected and active.
- Operator should be called
Hollow
, it is short and widely accepted terminology.
It's a lot, but after that it all done for the exception of one issue which we'll discuss later after UI part is handled.
Double newline only allowed in-between class and function definitions, everything inside function body should be separated by 1 line max.
The name of the panel should be changed from Transform
to Edit
, Hollow tool should be placed first (no additional label needed).
If you find matrix stuff confusing, then you could write it as:
Again, you don't need to comment on every line, there is a check above if create_hollow
and you are using bpy.data.objects.new
right after it, the code is self-explanatory.
This code block is useless, just do if self.offset > 0.0
It's better to avoid negation, if possible, it just makes harder to follow the logic.