Adding a subfolder based upon Textureset name for export destination - Close #13
This commit is contained in:
parent
3c804ef784
commit
428e7ee01f
1 changed files with 6 additions and 6 deletions
|
@ -2,24 +2,24 @@
|
|||
TEXTURE_LIST := $(notdir $(wildcard $(TEXTURESET_FOLDER)/*))
|
||||
|
||||
# Build list of destination filenames for 1024 files
|
||||
EACH_DEST_1024 = $(foreach DEST, $(shell cat $(MATERIALLIST) | jq -r --arg folder "$(TEXTURENAME)" '.[] | select(.name==$$folder) | .destination_1024 | join(" ")'), $(subst $(PNG1024_DIR)/, $(DEST)/, $(wildcard $(PNG1024_DIR)/$(TEXTURENAME)*.png)))
|
||||
EACH_DEST_1024 = $(foreach DEST, $(shell cat $(MATERIALLIST) | jq -r --arg folder "$(TEXTURENAME)" '.[] | select(.name==$$folder) | .destination_1024 | join(" ")'), $(subst $(PNG1024_DIR)/, $(DEST)/$(TEXTURENAME)/, $(wildcard $(PNG1024_DIR)/$(TEXTURENAME)*.png)))
|
||||
DEST_1024 := $(foreach TEXTURENAME, $(TEXTURE_LIST), $(EACH_DEST_1024))
|
||||
REQUIR_1024 := $(PNG1024_DIR)/%.png
|
||||
EACH_REQUIR_1024 = $(foreach DEST, $(shell cat $(MATERIALLIST) | jq -r --arg folder "$(TEXTURENAME)" '.[] | select(.name==$$folder) | .destination_1024 | join(" ")'), $(subst $(PNG1024_DIR)/, $(DEST)/, $(REQUIR_1024)))
|
||||
EACH_REQUIR_1024 = $(foreach DEST, $(shell cat $(MATERIALLIST) | jq -r --arg folder "$(TEXTURENAME)" '.[] | select(.name==$$folder) | .destination_1024 | join(" ")'), $(subst $(PNG1024_DIR)/, $(DEST)/$(TEXTURENAME)/, $(REQUIR_1024)))
|
||||
TARGET_1024 := $(foreach TEXTURENAME, $(TEXTURE_LIST), $(EACH_REQUIR_1024))
|
||||
|
||||
# Build list of destination filenames for 512 files
|
||||
EACH_DEST_512 = $(foreach DEST, $(shell cat $(MATERIALLIST) | jq -r --arg folder "$(TEXTURENAME)" '.[] | select(.name==$$folder) | .destination_512 | join(" ")'), $(subst $(PNG512_DIR)/, $(DEST)/, $(wildcard $(PNG512_DIR)/$(TEXTURENAME)*.png)))
|
||||
EACH_DEST_512 = $(foreach DEST, $(shell cat $(MATERIALLIST) | jq -r --arg folder "$(TEXTURENAME)" '.[] | select(.name==$$folder) | .destination_512 | join(" ")'), $(subst $(PNG512_DIR)/, $(DEST)/$(TEXTURENAME)/, $(wildcard $(PNG512_DIR)/$(TEXTURENAME)*.png)))
|
||||
DEST_512 := $(foreach TEXTURENAME, $(TEXTURE_LIST), $(EACH_DEST_512))
|
||||
REQUIR_512 := $(PNG512_DIR)/%.png
|
||||
EACH_REQUIR_512 = $(foreach DEST, $(shell cat $(MATERIALLIST) | jq -r --arg folder "$(TEXTURENAME)" '.[] | select(.name==$$folder) | .destination_512 | join(" ")'), $(subst $(PNG512_DIR)/, $(DEST)/, $(REQUIR_512)))
|
||||
EACH_REQUIR_512 = $(foreach DEST, $(shell cat $(MATERIALLIST) | jq -r --arg folder "$(TEXTURENAME)" '.[] | select(.name==$$folder) | .destination_512 | join(" ")'), $(subst $(PNG512_DIR)/, $(DEST)/$(TEXTURENAME)/, $(REQUIR_512)))
|
||||
TARGET_512 := $(foreach TEXTURENAME, $(TEXTURE_LIST), $(EACH_REQUIR_512))
|
||||
|
||||
# Build list of destination filenames for 256 files
|
||||
EACH_DEST_256 = $(foreach DEST, $(shell cat $(MATERIALLIST) | jq -r --arg folder "$(TEXTURENAME)" '.[] | select(.name==$$folder) | .destination_256 | join(" ")'), $(subst $(PNG256_DIR)/, $(DEST)/, $(wildcard $(PNG256_DIR)/$(TEXTURENAME)*.png)))
|
||||
EACH_DEST_256 = $(foreach DEST, $(shell cat $(MATERIALLIST) | jq -r --arg folder "$(TEXTURENAME)" '.[] | select(.name==$$folder) | .destination_256 | join(" ")'), $(subst $(PNG256_DIR)/, $(DEST)/$(TEXTURENAME)/, $(wildcard $(PNG256_DIR)/$(TEXTURENAME)*.png)))
|
||||
DEST_256 := $(foreach TEXTURENAME, $(TEXTURE_LIST), $(EACH_DEST_256))
|
||||
REQUIR_256 := $(PNG256_DIR)/%.png
|
||||
EACH_REQUIR_256 = $(foreach DEST, $(shell cat $(MATERIALLIST) | jq -r --arg folder "$(TEXTURENAME)" '.[] | select(.name==$$folder) | .destination_256 | join(" ")'), $(subst $(PNG256_DIR)/, $(DEST)/, $(REQUIR_256)))
|
||||
EACH_REQUIR_256 = $(foreach DEST, $(shell cat $(MATERIALLIST) | jq -r --arg folder "$(TEXTURENAME)" '.[] | select(.name==$$folder) | .destination_256 | join(" ")'), $(subst $(PNG256_DIR)/, $(DEST)/$(TEXTURENAME)/, $(REQUIR_256)))
|
||||
TARGET_256 := $(foreach TEXTURENAME, $(TEXTURE_LIST), $(EACH_REQUIR_256))
|
||||
|
||||
all: $(DEST_1024) $(DEST_512) $(DEST_256)
|
||||
|
|
Loading…
Reference in a new issue