Optimize buildings
This commit is contained in:
34
Makefile
34
Makefile
@@ -3,7 +3,7 @@ SERVER = src/godot/bin/godot_server.x11.opt.tools.64
|
||||
|
||||
.PHONY: all godot-editor-main export export-models export-clothes \
|
||||
export-clean export-linux-demo export-windows-demo \
|
||||
export-binaries patch tests import-vrm
|
||||
export-binaries patch tests import-vrm export-buildings
|
||||
all: godot-editor-main godot-main
|
||||
ARCH=$(patsubst aarch64,arm64,$(shell uname -m))
|
||||
godot-main: patch
|
||||
@@ -38,6 +38,38 @@ import-vrm: install-addons export-clean
|
||||
export2edit: import-vrm
|
||||
$(BLENDER) -b -Y -P assets/blender/scripts/export_for_modelling.py
|
||||
|
||||
BLENDDIR_BUILDINGS=assets/blender/buildings
|
||||
GLTFDIR_BUILDINGS=godot/astream/terrain/details
|
||||
BUILDINGS_BUSINNESS=business-bar1 business-cafe1 business-office1 buisness-store1
|
||||
BUILDINGS_RESIDENTAL=residental-house1 residental-house2 residental-house \
|
||||
residental-house4 residental-house5 residental-house6 \
|
||||
residental-house7 residental-house8 residental-house9 \
|
||||
residental-house10 residental-house11 residental-house13 \
|
||||
residental-hut1 residental-garage-door \
|
||||
residental-garage-enterance residental-garage \
|
||||
residental-parking residental-wall1 residental-wall-corner
|
||||
BUILDINGS_MAIN=gym-exterior home-exterior logistics-center-exterior office-exterior townhall-exterior
|
||||
|
||||
|
||||
BUILDINGS=bus-stop power-in-box power-pole power-pole-wire $(BUILDINGS_BUSINESS) \
|
||||
$(BUILDINGS_RESIDENTAL) $(BUILDINGS_MAIN)
|
||||
zebra
|
||||
|
||||
define export_building
|
||||
$(GLTFDIR_BUILDINGS)/$(1).gltf: $(BLENDDIR_BUILDINGS)/$(1).blend
|
||||
$(BLENDER) -b $(BLENDDIR_BUILDINGS)/$(1).blend -P /home/slapin/godot-projects/streaming_world/assets/blender/scripts/export_buildings.py -- $(GLTFDIR_BUILDINGS)/$(1).gltf
|
||||
ALL_BUILDINGS += $(GLTFDIR_BUILDINGS)/$(1).gltf
|
||||
CLEAN_BUILDINGS += $(GLTFDIR_BUILDINGS)/$(1).gltf \
|
||||
$(GLTFDIR_BUILDINGS)/$(1).bin
|
||||
endef
|
||||
|
||||
$(foreach prog,$(BUILDINGS),$(eval $(call export_building,$(prog))))
|
||||
|
||||
export-buildings: $(ALL_BUILDINGS)
|
||||
@echo $(ALL_BUILDINGS)
|
||||
clean-buildings:
|
||||
rm -f $(CLEAN_BUILDINGS) $(GLTFDIR_BUILDINGS)/material_atlas*.material
|
||||
|
||||
export-models: export-clean import-vrm
|
||||
$(BLENDER) -b -Y -P assets/blender/scripts/export_models.py
|
||||
|
||||
|
||||
Reference in New Issue
Block a user