Fix bug where annotation decorations didn't show correctly in Blender 3.0

This commit is contained in:
Dion Moult
2022-01-14 10:54:27 +11:00
parent 6d78ac4918
commit 30270db0c3
3 changed files with 6 additions and 5 deletions
@@ -340,9 +340,9 @@ class BaseDecorator:
blf.rotation(font_id, ang)
blf.color(font_id, *color)
#blf.enable(font_id, blf.SHADOW)
#blf.shadow(font_id, 5, 0, 0, 0, 1)
#blf.shadow_offset(font_id, 1, -1)
# blf.enable(font_id, blf.SHADOW)
# blf.shadow(font_id, 5, 0, 0, 0, 1)
# blf.shadow_offset(font_id, 1, -1)
blf.draw(font_id, text)
blf.disable(font_id, blf.ROTATION)
@@ -361,7 +361,7 @@ class BaseDecorator:
else:
return
return bpy.utils.units.to_string(unit_system, "LENGTH", value, precision, split_unit=True)
return bpy.utils.units.to_string(unit_system, "LENGTH", value, precision=precision, split_unit=True)
class DimensionDecorator(BaseDecorator):
@@ -393,6 +393,8 @@ class CreateDrawing(bpy.types.Operator):
self.serialiser.setFile(ifc)
self.serialiser.setWithoutStoreys(True)
self.serialiser.setPolygonal(True)
self.serialiser.setUseHlrPoly(True)
self.serialiser.setProfileThreshold(64)
self.serialiser.setUseNamespace(True)
self.serialiser.setAlwaysProject(True)
self.serialiser.setAutoElevation(False)
@@ -582,7 +582,6 @@ class SvgWriter:
)
)
def draw_dimension_annotations(self, dimension_obj, text_override=None):
matrix_world = dimension_obj.matrix_world
for spline in dimension_obj.data.splines: