VOXEDIT: added Single flag to FillPlane modifier
parent
fd3ebcba60
commit
1374f1e563
|
@ -336,7 +336,7 @@ glm::ivec3 Modifier::aabbDim() const {
|
|||
}
|
||||
|
||||
bool Modifier::aabbAction(voxel::RawVolume* volume, const std::function<void(const voxel::Region& region, ModifierType type)>& callback) {
|
||||
if (_modifierType == ModifierType::ColorPicker) {
|
||||
if ((_modifierType & ModifierType::ColorPicker) == ModifierType::ColorPicker) {
|
||||
// TODO:
|
||||
const glm::ivec3 &pos = cursorPosition();
|
||||
if (volume->region().containsPoint(pos)) {
|
||||
|
@ -345,7 +345,7 @@ bool Modifier::aabbAction(voxel::RawVolume* volume, const std::function<void(con
|
|||
}
|
||||
return false;
|
||||
}
|
||||
if (_modifierType == ModifierType::FillPlane) {
|
||||
if ((_modifierType & ModifierType::FillPlane) == ModifierType::FillPlane) {
|
||||
voxel::RawVolumeWrapper wrapper(volume);
|
||||
voxelutil::fillPlane(wrapper, cursorVoxel(), voxel::Voxel(), cursorPosition(), cursorFace());
|
||||
const voxel::Region& modifiedRegion = wrapper.dirtyRegion();
|
||||
|
|
|
@ -8,12 +8,13 @@
|
|||
|
||||
enum class ModifierType {
|
||||
None = 0,
|
||||
Place = (1 << 0),
|
||||
Single = (1 << 1),
|
||||
Single = (1 << 0),
|
||||
|
||||
Place = (1 << 1),
|
||||
Delete = (1 << 2),
|
||||
Update = (1 << 3),
|
||||
Select = (1 << 4),
|
||||
ColorPicker = (1 << 5) | Single,
|
||||
FillPlane = (1 << 6)
|
||||
FillPlane = (1 << 6) | Single
|
||||
};
|
||||
CORE_ENUM_BIT_OPERATIONS(ModifierType)
|
||||
|
|
Loading…
Reference in New Issue