Add "dedicated server" export mode which can strip unneeded visual resources

This commit is contained in:
David Snopek
2022-12-20 15:49:11 -06:00
parent 91713ced81
commit 74458b6e9b
26 changed files with 671 additions and 42 deletions

View File

@ -614,6 +614,13 @@ Size2i Mesh::get_lightmap_size_hint() const {
return lightmap_size_hint;
}
Ref<Resource> Mesh::create_placeholder() const {
Ref<PlaceholderMesh> placeholder;
placeholder.instantiate();
placeholder->set_aabb(get_aabb());
return placeholder;
}
void Mesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_lightmap_size_hint", "size"), &Mesh::set_lightmap_size_hint);
ClassDB::bind_method(D_METHOD("get_lightmap_size_hint"), &Mesh::get_lightmap_size_hint);
@ -626,6 +633,7 @@ void Mesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("surface_get_blend_shape_arrays", "surf_idx"), &Mesh::surface_get_blend_shape_arrays);
ClassDB::bind_method(D_METHOD("surface_set_material", "surf_idx", "material"), &Mesh::surface_set_material);
ClassDB::bind_method(D_METHOD("surface_get_material", "surf_idx"), &Mesh::surface_get_material);
ClassDB::bind_method(D_METHOD("create_placeholder"), &Mesh::create_placeholder);
BIND_ENUM_CONSTANT(PRIMITIVE_POINTS);
BIND_ENUM_CONSTANT(PRIMITIVE_LINES);