Create content and library thumbnails on raytrace success
This commit is contained in:
parent
eab6844f41
commit
9bcb02db5b
1 changed files with 15 additions and 1 deletions
|
|
@ -127,7 +127,21 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
string thumbnailId = libraryItem.ID;
|
||||
|
||||
return GetThumbnail(object3D, thumbnailId, width, height);
|
||||
var thumbnail = GetThumbnail(object3D, thumbnailId, width, height);
|
||||
if (thumbnail != null)
|
||||
{
|
||||
// Cache content thumbnail
|
||||
AggContext.ImageIO.SaveImageData(
|
||||
ApplicationController.Instance.Thumbnails.CachePath(object3D.MeshRenderId().ToString(), width, height),
|
||||
thumbnail);
|
||||
|
||||
// Cache library thumbnail
|
||||
AggContext.ImageIO.SaveImageData(
|
||||
ApplicationController.Instance.Thumbnails.CachePath(libraryItem, width, height),
|
||||
thumbnail);
|
||||
}
|
||||
|
||||
return thumbnail ?? DefaultImage;
|
||||
}
|
||||
|
||||
// Limit to private scope until need returns
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue