VOXEDIT: removed thicken command - use lua script

master
Martin Gerhardy 2020-09-02 23:07:06 +02:00
parent 76d9a4bac6
commit ac32746f9c
3 changed files with 0 additions and 31 deletions

View File

@ -263,7 +263,6 @@ TBLayout: distribution: gravity, axis: y
TBButton: @include: definitions>menubutton, text: Extend, id: extend, command: "resize", auto-repeat: 1
TBSkinImage: skin: voxedit-extend
TBButton: @include: definitions>menubutton, text: Layer from color, id: colortolayer, command: "colortolayer"
TBButton: @include: definitions>menubutton, text: Thicken, id: thicken, command: "thicken"
TBButton: @include: definitions>menubutton, text: Scale, id: scale, command: "scale"
TBSection: value: 1, text: "Translate"

View File

@ -352,26 +352,6 @@ void SceneManager::modified(int layerId, const voxel::Region& modifiedRegion, bo
resetLastTrace();
}
void SceneManager::thicken(int amount) {
const glm::ivec3 dimensions(amount + 1);
_layerMgr.foreachGroupLayer([&] (int layerId) {
voxel::RawVolume* v = volume(layerId);
if (v == nullptr) {
return;
}
voxel::Region region = v->region();
region.shiftLowerCorner(-dimensions);
region.shiftUpperCorner(dimensions);
voxel::RawVolume* thinkened = new voxel::RawVolume(region);
voxel::RawVolumeWrapper wrapper(thinkened);
voxelutil::visitVolume(*v, [&] (int32_t x, int32_t y, int32_t z, const voxel::Voxel& voxel) {
voxelgenerator::shape::createCube(wrapper, glm::ivec3(x, y, z), dimensions, voxel);
});
setNewVolume(layerId, thinkened, true);
modified(layerId, wrapper.dirtyRegion());
});
}
void SceneManager::colorToNewLayer(const voxel::Voxel voxelColor) {
voxel::RawVolume* newVolume = new voxel::RawVolume(region());
_layerMgr.foreachGroupLayer([&] (int layerId) {
@ -1027,15 +1007,6 @@ void SceneManager::construct() {
_modifier.aabbStop();
}).setHelp("Aborts the current modifier action");
command::Command::registerCommand("thicken", [&] (const command::CmdArgs& args) {
const int argc = args.size();
int value = 1;
if (argc >= 1) {
value = core::string::toInt(args[0]);
}
thicken(value);
}).setHelp("Thicken existing voxels");
command::Command::registerCommand("setvoxelresolution", [&] (const command::CmdArgs& args) {
const int argc = args.size();
if (argc == 1) {

View File

@ -178,7 +178,6 @@ private:
void moveCursor(int x, int y, int z);
void colorToNewLayer(const voxel::Voxel voxelColor);
void thicken(int amount);
void crop();
void scale(int layerId);
void resize(const glm::ivec3& size);