|
|
|
@ -132,6 +132,11 @@ class RasterView:
|
|
|
|
|
prev_parts = [] |
|
|
|
|
new_parts = [] |
|
|
|
|
all_parts = view.XSource + view.Source |
|
|
|
|
|
|
|
|
|
objects_to_hide = [] |
|
|
|
|
if 'Assembly_handbook_HideParts' in view.PropertiesList: |
|
|
|
|
objects_to_hide = self._flatten_objects_tree(view.Assembly_handbook_HideParts) |
|
|
|
|
|
|
|
|
|
for part in all_parts: |
|
|
|
|
link = tmp_doc.addObject('App::Link', part.Name) |
|
|
|
|
link.Label = part.Label |
|
|
|
@ -180,12 +185,12 @@ class RasterView:
|
|
|
|
|
else: |
|
|
|
|
prev_parts.append(link) |
|
|
|
|
|
|
|
|
|
# hide objects that we don't want to display ; also make a backup of properties we want to reset after we're done |
|
|
|
|
# hide objects that we don't want to display ; also make a backup of properties we want to reset after we're done |
|
|
|
|
for obj in self._flatten_objects_tree([link]): |
|
|
|
|
if obj in objects_to_reset.keys(): |
|
|
|
|
continue |
|
|
|
|
|
|
|
|
|
if self._should_render(obj): |
|
|
|
|
if self._should_render(obj) and not obj in objects_to_hide: |
|
|
|
|
if not fast_render: |
|
|
|
|
objects_to_reset[obj] = ( |
|
|
|
|
obj.ViewObject.Visibility, |
|
|
|
@ -285,7 +290,7 @@ class RasterView:
|
|
|
|
|
# restore properties on objects we have modified |
|
|
|
|
for obj, props in objects_to_reset.items(): |
|
|
|
|
obj.ViewObject.Visibility = props[0] |
|
|
|
|
if self._should_render(obj): |
|
|
|
|
if self._should_render(obj) and not obj in objects_to_hide: |
|
|
|
|
obj.ViewObject.LineColor = props[1] |
|
|
|
|
obj.ViewObject.ShapeMaterial.AmbientColor = props[2] |
|
|
|
|
obj.ViewObject.ShapeMaterial.DiffuseColor = props[3] |
|
|
|
|