From 35d964f3e6c15d9ec93248fa20c24354ac3ad909 Mon Sep 17 00:00:00 2001 From: yannk Date: Thu, 30 Dec 2021 10:13:22 +0100 Subject: [PATCH 1/3] Adding 2 more test files to help testing --- example/material_list.json | 23 +++++++++++++++++-- example/sbs/texture_factory_test2.sbs | 1 + .../sbs/texture_factory_test2_preset0.sbsprs | 6 +++++ example/sbs/texture_factory_test3.sbs | 1 + .../sbs/texture_factory_test3_preset0.sbsprs | 6 +++++ 5 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 example/sbs/texture_factory_test2.sbs create mode 100644 example/sbs/texture_factory_test2_preset0.sbsprs create mode 100644 example/sbs/texture_factory_test3.sbs create mode 100644 example/sbs/texture_factory_test3_preset0.sbsprs 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 @@ + + + + + + From 2d2a8b61c7ad252f64be6796c7785b5110c067b6 Mon Sep 17 00:00:00 2001 From: yannk Date: Thu, 30 Dec 2021 10:14:18 +0100 Subject: [PATCH 2/3] Adding the size format to be specified by json file when rendering the sbsar file --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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;\ From 868813e48655b071122f5c4ce45f4be91185aed0 Mon Sep 17 00:00:00 2001 From: yannk Date: Thu, 30 Dec 2021 10:17:22 +0100 Subject: [PATCH 3/3] Adding information about format parameter in json file --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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.