diff --git a/Makefile b/Makefile index 6a06557..0fc16af 100644 --- a/Makefile +++ b/Makefile @@ -94,6 +94,12 @@ $(SBSAR_DIR)/%.sbsar: $(SBS_DIR)/%.sbs echo "listitem :"$$listitem;\ mkdir --parents $(TEXTURESET_FOLDER);\ echo $$listitem > $(TEXTURESET_FOLDER)/$$(basename -s .sbsar $@)_$$preset;\ - $(SBSRENDER) render $@ --use-preset $$preset --output-name {inputGraphUrl}\_$$preset\_{outputNodeName} --set-value \$$outputsize@10,10# --output-path $(PNG1024_DIR); \ + rendersize=$$(cat $(MATERIALLIST) | jq -r --arg folder "$${material}_$${preset}" '.[] | select(.name==$$folder) | .format') ;\ + echo "DEBUG : MATERIALLIST : $(MATERIALLIST)" ;\ + echo "DEBUG : material : "$$material ;\ + echo "DEBUG : preset : "$$preset ;\ + echo "DEBUG : material_preset : $${material}_$${preset}" ;\ + echo "DEBUG : rendersize : "$$rendersize ;\ + $(SBSRENDER) render $@ --use-preset $$preset --output-name {inputGraphUrl}\_$$preset\_{outputNodeName} --set-value \$$outputsize@$$rendersize# --output-path $(PNG1024_DIR); \ done;\ diff --git a/README.md b/README.md index 2965a1a..7a143b9 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,10 @@ The path to the json file used to manage all the metadata linked to texturesets ### Configuration of the json file -- « `name` » is the mundane texture name -- « `description` » is the description of the texture -- « `type` » is the subfolder name in `BLENDFILES_FOLDER` in the `local-config.mk` file the blender files used to generate the rpeviews are stored -- « `destination_1024` » is the folders names list where to copy the generated textrues files in 1024x1024, it can be left with an empty field if non-relevant. -- « `destination_512` » is the folders names list where to copy the generated textrues files in 512x512, it can be left with an empty field if non-relevant. -- « `destination_256` » is the folders names list where to copy the generated textrues files in 256x256, it can be left with an empty field if non-relevant. +- `name` is the mundane texture name +- `description` is the description of the texture +- `type` is the subfolder name in `BLENDFILES_FOLDER` in the `local-config.mk` file the blender files used to generate the rpeviews are stored +- `format` is the format of the texture, square or rectangular, it must be either "10,10" for normal 1024x1024 files, "9,10" for 512x1024 and "10,9" for 1024x512 +- `destination_1024` is the folders names list where to copy the generated textrues files in 1024x1024, it can be left with an empty field if non-relevant. +- `destination_512` is the folders names list where to copy the generated textrues files in 512x512, it can be left with an empty field if non-relevant. +- `destination_256` is the folders names list where to copy the generated textrues files in 256x256, it can be left with an empty field if non-relevant. diff --git a/example/material_list.json b/example/material_list.json index 6191458..af6c43a 100644 --- a/example/material_list.json +++ b/example/material_list.json @@ -3,8 +3,27 @@ "name":"texture_factory_test_preset0", "description":"Texture factory testing material", "type":"bhonr", - "destination_1024":["build/export/project_A","build/export/project_B/1024"], - "destination_512":["build/export/project_B/512"], + "format":"10,10", + "destination_1024":["build/export/project_A"], + "destination_512":["build/export/project_B_512"], "destination_256":[""] + }, + { + "name":"texture_factory_test2_preset0", + "description":"Texture factory testing material number 2", + "type":"bhonr", + "format":"10,9", + "destination_1024":["build/export/project_C"], + "destination_512":[""], + "destination_256":["build/export/project_D_256"] + }, + { + "name":"texture_factory_test3_preset0", + "description":"Texture factory testing material number 3", + "type":"bhonr", + "format":"9,10", + "destination_1024":["build/export/project_E"], + "destination_512":["build/export/project_F_512"], + "destination_256":["build/export/project_G_256"] } ] diff --git a/example/sbs/texture_factory_test2.sbs b/example/sbs/texture_factory_test2.sbs new file mode 100644 index 0000000..0616a12 --- /dev/null +++ b/example/sbs/texture_factory_test2.sbs @@ -0,0 +1 @@ + diff --git a/example/sbs/texture_factory_test2_preset0.sbsprs b/example/sbs/texture_factory_test2_preset0.sbsprs new file mode 100644 index 0000000..9ab1e87 --- /dev/null +++ b/example/sbs/texture_factory_test2_preset0.sbsprs @@ -0,0 +1,6 @@ + + + + + + diff --git a/example/sbs/texture_factory_test3.sbs b/example/sbs/texture_factory_test3.sbs new file mode 100644 index 0000000..7e2c5f0 --- /dev/null +++ b/example/sbs/texture_factory_test3.sbs @@ -0,0 +1 @@ + diff --git a/example/sbs/texture_factory_test3_preset0.sbsprs b/example/sbs/texture_factory_test3_preset0.sbsprs new file mode 100644 index 0000000..3b6206a --- /dev/null +++ b/example/sbs/texture_factory_test3_preset0.sbsprs @@ -0,0 +1,6 @@ + + + + + +