Fix type for visibility layers and only emit signal if it changes in setter
This commit is contained in:
parent
e4f266b651
commit
f8f977b8f4
|
|
@ -378,7 +378,10 @@ ShadowCasting Terrain3DMeshAsset::get_lod_cast_shadows(const int p_lod_id) const
|
|||
return _cast_shadows;
|
||||
}
|
||||
|
||||
inline void Terrain3DMeshAsset::set_visibility_layers(const int p_layers) {
|
||||
inline void Terrain3DMeshAsset::set_visibility_layers(const uint32_t p_layers) {
|
||||
if (_visibility_layers == p_layers) {
|
||||
return;
|
||||
}
|
||||
LOG(INFO, _name, ": Setting visibility layers: ", p_layers);
|
||||
_visibility_layers = p_layers;
|
||||
LOG(DEBUG, "Emitting instancer_setting_changed, ID: ", _id);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ private:
|
|||
real_t _height_offset = 0.f;
|
||||
real_t _density = 10.f;
|
||||
ShadowCasting _cast_shadows = SHADOWS_ON;
|
||||
int _visibility_layers = 1;
|
||||
uint32_t _visibility_layers = 1;
|
||||
Ref<Material> _material_override;
|
||||
Ref<Material> _material_overlay;
|
||||
int _last_lod = MAX_LOD_COUNT - 1;
|
||||
|
|
@ -97,8 +97,8 @@ public:
|
|||
void set_cast_shadows(const ShadowCasting p_cast_shadows);
|
||||
ShadowCasting get_cast_shadows() const { return _cast_shadows; };
|
||||
ShadowCasting get_lod_cast_shadows(const int p_lod_id) const;
|
||||
void set_visibility_layers(const int p_layers);
|
||||
int get_visibility_layers() const { return _visibility_layers; }
|
||||
void set_visibility_layers(const uint32_t p_layers);
|
||||
uint32_t get_visibility_layers() const { return _visibility_layers; }
|
||||
void set_material_override(const Ref<Material> &p_material);
|
||||
Ref<Material> get_material_override() const { return _material_override; }
|
||||
void set_material_overlay(const Ref<Material> &p_material);
|
||||
|
|
|
|||
Loading…
Reference in New Issue