Add bison model to default editor palette and object catalog
checkpoint / checkpoint (push) Successful in 6m10s
checkpoint / checkpoint (push) Successful in 6m10s
This commit is contained in:
@@ -61,6 +61,8 @@ func _load_mesh() -> void:
|
||||
add_child(asset_node)
|
||||
if asset_node is MeshInstance3D:
|
||||
_mesh_instance = asset_node as MeshInstance3D
|
||||
else:
|
||||
_mesh_instance = asset_node.find_child("*", true, false) as MeshInstance3D
|
||||
return
|
||||
|
||||
# 2. Build a stylized, recognizable 3D representation based on catalog ID / asset ID
|
||||
@@ -96,9 +98,13 @@ func _try_load_asset(asset_id: String) -> Node:
|
||||
var candidate_paths: Array[String] = [
|
||||
asset_id,
|
||||
"res://assets/%s" % asset_id,
|
||||
"res://assets/props/%s" % asset_id.get_file(),
|
||||
"user://custom_assets/%s" % asset_id,
|
||||
"user://custom_assets/%s" % asset_id.get_file()
|
||||
]
|
||||
var lower_id := asset_id.to_lower()
|
||||
if lower_id.contains("bizon") or lower_id.contains("bison") or lower_id.contains("madtrollstudio"):
|
||||
candidate_paths.append("res://assets/props/bison.glb")
|
||||
|
||||
for cpath in candidate_paths:
|
||||
if FileAccess.file_exists(cpath):
|
||||
|
||||
Reference in New Issue
Block a user