Browse Source

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

master
Youen 2 years ago
parent
commit
05e7da16a5
  1. 14
      ahb_techdraw_extensions.py

14
ahb_techdraw_extensions.py

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

Loading…
Cancel
Save