VOXEDIT: limit the fillplane modifier to the selection
parent
700abb4a38
commit
8d48266d85
|
@ -52,6 +52,11 @@ public:
|
|||
_volume(volume), _region(volume->region()) {
|
||||
}
|
||||
|
||||
RawVolumeWrapper(voxel::RawVolume* volume, const voxel::Region ®ion) :
|
||||
_volume(volume), _region(region) {
|
||||
_region.cropTo(volume->region());
|
||||
}
|
||||
|
||||
inline operator RawVolume& () const {
|
||||
return *_volume;
|
||||
}
|
||||
|
|
|
@ -350,7 +350,11 @@ bool Modifier::aabbAction(voxel::RawVolume* volume, const std::function<void(con
|
|||
return false;
|
||||
}
|
||||
if ((_modifierType & ModifierType::FillPlane) == ModifierType::FillPlane) {
|
||||
voxel::RawVolumeWrapper wrapper(volume);
|
||||
voxel::Region region = volume->region();
|
||||
if (_selectionValid) {
|
||||
region = _selection;
|
||||
}
|
||||
voxel::RawVolumeWrapper wrapper(volume, region);
|
||||
voxelutil::fillPlane(wrapper, cursorVoxel(), voxel::Voxel(), cursorPosition(), cursorFace());
|
||||
const voxel::Region& modifiedRegion = wrapper.dirtyRegion();
|
||||
if (modifiedRegion.isValid()) {
|
||||
|
|
Loading…
Reference in New Issue