mirror of
https://github.com/Relintai/voxelman.git
synced 2024-11-20 10:47:19 +01:00
Fix SpatialMaterial support for the merger libraries.
This commit is contained in:
parent
e9269bc0b3
commit
1486959067
@ -331,6 +331,18 @@ void VoxelLibraryMerger::_setup_material_albedo(const int material_index, const
|
||||
|
||||
Ref<SpatialMaterial> spmat;
|
||||
|
||||
switch (material_index) {
|
||||
case MATERIAL_INDEX_VOXELS:
|
||||
spmat = material_get(i);
|
||||
break;
|
||||
case MATERIAL_INDEX_LIQUID:
|
||||
spmat = liquid_material_get(i);
|
||||
break;
|
||||
case MATERIAL_INDEX_PROP:
|
||||
spmat = prop_material_get(i);
|
||||
break;
|
||||
}
|
||||
|
||||
if (spmat.is_valid()) {
|
||||
spmat->set_texture(SpatialMaterial::TEXTURE_ALBEDO, texture);
|
||||
return;
|
||||
|
@ -670,6 +670,18 @@ void VoxelLibraryMergerPCM::_setup_material_albedo(const int material_index, con
|
||||
|
||||
Ref<SpatialMaterial> spmat;
|
||||
|
||||
switch (material_index) {
|
||||
case MATERIAL_INDEX_VOXELS:
|
||||
spmat = material_get(i);
|
||||
break;
|
||||
case MATERIAL_INDEX_LIQUID:
|
||||
spmat = liquid_material_get(i);
|
||||
break;
|
||||
case MATERIAL_INDEX_PROP:
|
||||
spmat = prop_material_get(i);
|
||||
break;
|
||||
}
|
||||
|
||||
if (spmat.is_valid()) {
|
||||
spmat->set_texture(SpatialMaterial::TEXTURE_ALBEDO, texture);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user