//sculpt: fix importing static brushes

This commit is contained in:
Starbeamrainbowlabs 2021-12-31 01:39:04 +00:00
parent dd8cd78d6b
commit 227265db72
No known key found for this signature in database
GPG Key ID: 1BE5172E637709C2
3 changed files with 13 additions and 2 deletions

@ -81,3 +81,14 @@ dofile(wea.modpath.."/lib/selection/init.lua") -- Helpers for selections
dofile(wea.modpath.."/lib/wireframe/corner_set.lua")
dofile(wea.modpath.."/lib/wireframe/make_compass.lua")
dofile(wea.modpath.."/lib/wireframe/wire_box.lua")
---
-- Post-setup tasks
---
--- 1: Scan for an import static brushes
-- Static brushes live in lib/sculpt/brushes (relative to this file), and have
-- the file extension ".brush.tsv" (without quotes, of course).
wea.sculpt.scan_static(wea.modpath.."/lib/sculpt/brushes")

@ -20,7 +20,7 @@ local sculpt = {
parse_static = dofile(wea.modpath.."/lib/sculpt/parse_static.lua")
}
sculpt.scan_static(wea.modpath.."/lib/sculpt/brushes")
-- scan_sculpt is called after everything is loaded in the main init file
return sculpt

@ -31,7 +31,7 @@ return function(dirpath, overwrite_existing)
local errors = 0
for filename in pairs(files) do
for i, filename in pairs(files) do
if wea.str_ends(filename, ".brush.tsv") then
local filepath = dirpath.."/"..filename
local name = filepath:gsub(".brush.tsv", "")