Added fast rendering mode (when CoarseView is set to true)

This commit is contained in:
Youen 2022-11-23 20:10:39 +01:00
parent 007e652567
commit 05e7da16a5

View File

@ -99,11 +99,23 @@ class TechDrawExtensions:
doc = view.Document
fast_rendering = False
#try:
# fast_rendering = view.Assembly_handbook_FastRendering
#except:
# pass
if view.CoarseView:
fast_rendering = True
selected_balloons = []
for obj in Gui.Selection.getSelection():
if obj.TypeId == 'TechDraw::DrawViewBalloon' and obj.SourceView == view and 'Assembly_handbook_Source' in obj.PropertiesList:
selected_balloons.append(obj)
#view.clearGeomFormats() # for an unknown reason, this will crash freecad
if not fast_rendering:
is_first_part = True
parts_to_paint = []
@ -131,7 +143,7 @@ class TechDrawExtensions:
default_line_thickness = 0.05
line_thickness = default_line_thickness
default_color = (0.5, 0.5, 0.5)
default_color = (0.0, 0.0, 0.0) if fast_rendering else (0.5, 0.5, 0.5)
color = default_color
if part is not None: