Skip to content

Commit

Permalink
Fix the asset_type of Godot GLTF from gltf-godot to gltf_godot
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Gajdosik authored and agajdosi committed Dec 14, 2024
1 parent 56f08b2 commit 8090865
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nightly_gltf_godot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
MAX_ASSET_COUNT: 200

jobs:
GLTF-Godot:
GLTF_Godot:
runs-on: ubuntu-latest
container: blenderkit/headless-blender:blender-4.2 # LATEST STABLE
steps:
Expand Down
10 changes: 5 additions & 5 deletions blender_bg_scripts/gltf_bg_blender.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ def generate_gltf(json_result_path: str, target_format: str):
continue
mod.show_viewport = False

# CHOOSE EXPORT OPTIONS - based on target_format (gltf/gltf-godot)
# CHOOSE EXPORT OPTIONS - based on target_format (gltf/gltf_godot)
print(f"Gonna generate GLTF for target format: {target_format}")
if target_format == "gltf": # Optimize for web presentation - adding draco compression
options = [["maximal",maximalGLTF | dracoMeshCompression], ["minimal", minimalGLTF | dracoMeshCompression]]
elif target_format == "gltf-godot": # Optimize for use in Godot
elif target_format == "gltf_godot": # Optimize for use in Godot
options = [["maximal",maximalGLTF], ["minimal", minimalGLTF]]
else:
print("target_format needs to be gltf/gltf-godot!")
print("target_format needs to be gltf/gltf_godot!")
exit(10)

# TRY EXPORT - go from ideal to minimal export settings
Expand Down Expand Up @@ -86,12 +86,12 @@ def generate_gltf(json_result_path: str, target_format: str):

json_result_path = data.get('result_filepath') # Output data JSON
if not json_result_path:
print("You need to specify json_result_path (gltf/gltf-godot) for GLTF generation")
print("You need to specify json_result_path (gltf/gltf_godot) for GLTF generation")
exit(10)

target_format = data.get('target_format')
if not target_format:
print("You need to specify target_format (gltf/gltf-godot) for GLTF generation")
print("You need to specify target_format (gltf/gltf_godot) for GLTF generation")
exit(10)

generate_gltf(json_result_path, target_format)
2 changes: 1 addition & 1 deletion blenderkit_server_utils/send_to_bg.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def send_to_bg(
api_key - api key for the server
script - script that should be run in background
addons - addons that should be enabled in the background instance
target_format - which file format we want to export, e.g.: gltf, gltf-godot
target_format - which file format we want to export, e.g.: gltf, gltf_godot
command - command which should be run in background.
verbosity_level - level of verbosity: 0 for silent mode, 1 to only print errors, 2 to print everything
Expand Down
2 changes: 1 addition & 1 deletion generate_gltf_godot.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def generate_gltf(asset_data, api_key, binary_path: str) -> bool:
result_path=result_path,
script='gltf_bg_blender.py',
binary_path=binary_path,
target_format="gltf-godot"
target_format="gltf_godot"
)

files = None
Expand Down

0 comments on commit 8090865

Please sign in to comment.