Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
EduardoOliveira committed Apr 1, 2024
1 parent 073e3ff commit 4cc2f5b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions core/processing/enrichment/3mfExtractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ func (me *mfExtractor) Extract(e Enrichable) ([]*Extracted, error) {
}
defer archive.Close()

utils.CreateAssetsFolder(e.GetProject().UUID)

for i, f := range archive.File {
ext := filepath.Ext(f.Name)
// Only allow image files the platform supports
Expand Down
2 changes: 2 additions & 0 deletions core/processing/enrichment/renderGcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ func (g *gcodeRenderer) Render(job Enrichable) (string, error) {

if image.Data != nil {

utils.CreateAssetsFolder(job.GetProject().UUID)

h := sha1.New()
_, err = h.Write(image.Data)
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions core/processing/enrichment/renderStl.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,7 @@ func (s *stlRenderer) Render(job Enrichable) (string, error) {
image := context.Image()
image = resize.Resize(uint(s.width), uint(s.height), image, resize.Bilinear)

utils.CreateAssetsFolder(job.GetProject().UUID)

return renderName, fauxgl.SavePNG(renderSavePath, image)
}
2 changes: 1 addition & 1 deletion core/runtime/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func init() {
cfg := &Config{}
viper.Unmarshal(cfg)

cfg.Library.Blacklist = append(cfg.Library.Blacklist, ".project.stlib")
cfg.Library.Blacklist = append(cfg.Library.Blacklist, ".project.stlib", ".thumb.png", ".render.png")

if _, err := os.Stat(path.Join(dataPath, "config.toml")); os.IsNotExist(err) {
log.Println("config.toml not found, creating...")
Expand Down

0 comments on commit 4cc2f5b

Please sign in to comment.