Remove default channel from is_uniform() to prevent mistakes

This commit is contained in:
Marc Gilleron 2019-04-28 00:27:17 +01:00
parent 227bf5ad36
commit 0f378fe218
2 changed files with 2 additions and 2 deletions

View File

@ -304,7 +304,7 @@ void VoxelBuffer::_bind_methods() {
ClassDB::bind_method(D_METHOD("copy_from", "other", "channel"), &VoxelBuffer::_copy_from_binding, DEFVAL(0)); ClassDB::bind_method(D_METHOD("copy_from", "other", "channel"), &VoxelBuffer::_copy_from_binding, DEFVAL(0));
ClassDB::bind_method(D_METHOD("copy_from_area", "other", "src_min", "src_max", "dst_min", "channel"), &VoxelBuffer::_copy_from_area_binding, DEFVAL(0)); ClassDB::bind_method(D_METHOD("copy_from_area", "other", "src_min", "src_max", "dst_min", "channel"), &VoxelBuffer::_copy_from_area_binding, DEFVAL(0));
ClassDB::bind_method(D_METHOD("is_uniform", "channel"), &VoxelBuffer::is_uniform, DEFVAL(0)); ClassDB::bind_method(D_METHOD("is_uniform", "channel"), &VoxelBuffer::is_uniform);
ClassDB::bind_method(D_METHOD("optimize"), &VoxelBuffer::optimize); ClassDB::bind_method(D_METHOD("optimize"), &VoxelBuffer::optimize);
BIND_ENUM_CONSTANT(CHANNEL_TYPE); BIND_ENUM_CONSTANT(CHANNEL_TYPE);

View File

@ -76,7 +76,7 @@ public:
_FORCE_INLINE_ void fill_iso(float value, unsigned int channel = 0) { fill(iso_to_byte(value), channel); } _FORCE_INLINE_ void fill_iso(float value, unsigned int channel = 0) { fill(iso_to_byte(value), channel); }
void fill_area(int defval, Vector3i min, Vector3i max, unsigned int channel_index = 0); void fill_area(int defval, Vector3i min, Vector3i max, unsigned int channel_index = 0);
bool is_uniform(unsigned int channel_index = 0) const; bool is_uniform(unsigned int channel_index) const;
void optimize(); void optimize();