3D Print Toolbox: Add hollow out #105194
@ -909,6 +909,9 @@ class MESH_OT_print3d_hollow(Operator):
|
|||||||
# Generate offset surface
|
# Generate offset surface
|
||||||
if self.offset_direction == 'INSIDE':
|
if self.offset_direction == 'INSIDE':
|
||||||
newverts, newquads = levelset.convertToQuads(-self.offset)
|
newverts, newquads = levelset.convertToQuads(-self.offset)
|
||||||
|
if newquads.size == 0:
|
||||||
|
self.report({"ERROR"}, "Make sure target mesh has closed surface and offset value is less than half of target thickness")
|
||||||
MikhailRachinskiy marked this conversation as resolved
Outdated
|
|||||||
|
return {'FINISHED'}
|
||||||
MikhailRachinskiy marked this conversation as resolved
Outdated
Mikhail Rachinskiy
commented
That's unnecessary, just check if in edit mode in That's unnecessary, just check if in edit mode in `invoke` method and if true switch to object mode, switching back is not needed here.
|
|||||||
else:
|
else:
|
||||||
newverts, newquads = levelset.convertToQuads(self.offset)
|
newverts, newquads = levelset.convertToQuads(self.offset)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user
Again, you don't need to comment on every line, there is a check above
if create_hollow
and you are usingbpy.data.objects.new
right after it, the code is self-explanatory.Same with offset check.