mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 08:53:52 +00:00
Add optional post-processing (smooth/rough), add/fix tooltips.
This commit is contained in:
parent
2d34b63b0b
commit
deb122ffdb
2 changed files with 38 additions and 8 deletions
|
@ -242,14 +242,24 @@ void CSMPrefs::State::declare()
|
||||||
addValues (insertOutsideCell);
|
addValues (insertOutsideCell);
|
||||||
declareEnum ("outside-visible-drop", "Handling drops outside of visible cells", showAndInsert).
|
declareEnum ("outside-visible-drop", "Handling drops outside of visible cells", showAndInsert).
|
||||||
addValues (insertOutsideVisibleCell);
|
addValues (insertOutsideVisibleCell);
|
||||||
declareEnum ("outside-landedit", "Handling land edit outside of cells", createAndLandEdit).
|
declareEnum ("outside-landedit", "Handling terrain edit outside of cells", createAndLandEdit).
|
||||||
|
setTooltip("Behavior of terrain editing, if land editing brush reaches an area without cell record.").
|
||||||
addValues (landeditOutsideCell);
|
addValues (landeditOutsideCell);
|
||||||
declareEnum ("outside-visible-landedit", "Handling land edit outside of visible cells", showAndLandEdit).
|
declareEnum ("outside-visible-landedit", "Handling terrain edit outside of visible cells", showAndLandEdit).
|
||||||
|
setTooltip("Behavior of terrain editing, if land editing brush reaches an area that is not currently visible.").
|
||||||
addValues (landeditOutsideVisibleCell);
|
addValues (landeditOutsideVisibleCell);
|
||||||
declareInt ("texturebrush-maximumsize", "Maximum texture brush size", 50).
|
declareInt ("texturebrush-maximumsize", "Maximum texture brush size", 50).
|
||||||
setMin (1);
|
setMin (1);
|
||||||
declareInt ("shapebrush-maximumsize", "Maximum shape brush size", 100).
|
declareInt ("shapebrush-maximumsize", "Maximum height edit brush size", 100).
|
||||||
|
setTooltip("Setting for the slider range of brush size in terrain height editing.").
|
||||||
setMin (1);
|
setMin (1);
|
||||||
|
declareBool ("landedit-post-smoothpainting", "Smooth land after painting height", false).
|
||||||
|
setTooltip("Raise and lower tools will leave bumpy finish without this option");
|
||||||
|
declareDouble ("landedit-post-smoothstrength", "Smoothing strength (post-edit)", 0.25).
|
||||||
|
setTooltip("If smoothing land after painting height is used, this is the percentage of smooth applied afterwards. "
|
||||||
|
"Negative values may be used to roughen instead of smooth.").
|
||||||
|
setMin (-1).
|
||||||
|
setMax (1);
|
||||||
declareBool ("open-list-view", "Open displays list view", false).
|
declareBool ("open-list-view", "Open displays list view", false).
|
||||||
setTooltip ("When opening a reference from the scene view, it will open the"
|
setTooltip ("When opening a reference from the scene view, it will open the"
|
||||||
" instance list view instead of the individual instance record view.");
|
" instance list view instead of the individual instance record view.");
|
||||||
|
|
|
@ -420,7 +420,12 @@ void CSVRender::TerrainShapeMode::editTerrainShapeGrid(const std::pair<int, int>
|
||||||
int x = CSMWorld::CellCoordinates::vertexGlobalToInCellCoords(vertexCoords.first);
|
int x = CSMWorld::CellCoordinates::vertexGlobalToInCellCoords(vertexCoords.first);
|
||||||
int y = CSMWorld::CellCoordinates::vertexGlobalToInCellCoords(vertexCoords.second);
|
int y = CSMWorld::CellCoordinates::vertexGlobalToInCellCoords(vertexCoords.second);
|
||||||
if (mShapeEditTool == ShapeEditTool_Drag) alterHeight(cellCoords, x, y, mTotalDiffY);
|
if (mShapeEditTool == ShapeEditTool_Drag) alterHeight(cellCoords, x, y, mTotalDiffY);
|
||||||
if (mShapeEditTool == ShapeEditTool_PaintToRaise || mShapeEditTool == ShapeEditTool_PaintToLower) alterHeight(cellCoords, x, y, mShapeEditToolStrength);
|
if (mShapeEditTool == ShapeEditTool_PaintToRaise || mShapeEditTool == ShapeEditTool_PaintToLower)
|
||||||
|
{
|
||||||
|
alterHeight(cellCoords, x, y, mShapeEditToolStrength);
|
||||||
|
float smoothMultiplier = static_cast<float>(CSMPrefs::get()["3D Scene Editing"]["landedit-post-smoothstrength"].toDouble());
|
||||||
|
if (CSMPrefs::get()["3D Scene Editing"]["landedit-post-smoothpainting"].isTrue()) smoothHeight(cellCoords, x, y, mShapeEditToolStrength * smoothMultiplier);
|
||||||
|
}
|
||||||
if (mShapeEditTool == ShapeEditTool_Smooth) smoothHeight(cellCoords, x, y, mShapeEditToolStrength);
|
if (mShapeEditTool == ShapeEditTool_Smooth) smoothHeight(cellCoords, x, y, mShapeEditToolStrength);
|
||||||
if (mShapeEditTool == ShapeEditTool_Flatten) flattenHeight(cellCoords, x, y, mShapeEditToolStrength, mTargetHeight);
|
if (mShapeEditTool == ShapeEditTool_Flatten) flattenHeight(cellCoords, x, y, mShapeEditToolStrength, mTargetHeight);
|
||||||
}
|
}
|
||||||
|
@ -436,7 +441,12 @@ void CSVRender::TerrainShapeMode::editTerrainShapeGrid(const std::pair<int, int>
|
||||||
int x = CSMWorld::CellCoordinates::vertexGlobalToInCellCoords(i);
|
int x = CSMWorld::CellCoordinates::vertexGlobalToInCellCoords(i);
|
||||||
int y = CSMWorld::CellCoordinates::vertexGlobalToInCellCoords(j);
|
int y = CSMWorld::CellCoordinates::vertexGlobalToInCellCoords(j);
|
||||||
if (mShapeEditTool == ShapeEditTool_Drag) alterHeight(cellCoords, x, y, mTotalDiffY);
|
if (mShapeEditTool == ShapeEditTool_Drag) alterHeight(cellCoords, x, y, mTotalDiffY);
|
||||||
if (mShapeEditTool == ShapeEditTool_PaintToRaise || mShapeEditTool == ShapeEditTool_PaintToLower) alterHeight(cellCoords, x, y, mShapeEditToolStrength);
|
if (mShapeEditTool == ShapeEditTool_PaintToRaise || mShapeEditTool == ShapeEditTool_PaintToLower)
|
||||||
|
{
|
||||||
|
alterHeight(cellCoords, x, y, mShapeEditToolStrength);
|
||||||
|
float smoothMultiplier = static_cast<float>(CSMPrefs::get()["3D Scene Editing"]["landedit-post-smoothstrength"].toDouble());
|
||||||
|
if (CSMPrefs::get()["3D Scene Editing"]["landedit-post-smoothpainting"].isTrue()) smoothHeight(cellCoords, x, y, mShapeEditToolStrength * smoothMultiplier);
|
||||||
|
}
|
||||||
if (mShapeEditTool == ShapeEditTool_Smooth) smoothHeight(cellCoords, x, y, mShapeEditToolStrength);
|
if (mShapeEditTool == ShapeEditTool_Smooth) smoothHeight(cellCoords, x, y, mShapeEditToolStrength);
|
||||||
if (mShapeEditTool == ShapeEditTool_Flatten) flattenHeight(cellCoords, x, y, mShapeEditToolStrength, mTargetHeight);
|
if (mShapeEditTool == ShapeEditTool_Flatten) flattenHeight(cellCoords, x, y, mShapeEditToolStrength, mTargetHeight);
|
||||||
}
|
}
|
||||||
|
@ -462,8 +472,13 @@ void CSVRender::TerrainShapeMode::editTerrainShapeGrid(const std::pair<int, int>
|
||||||
if (mShapeEditTool == ShapeEditTool_PaintToRaise || mShapeEditTool == ShapeEditTool_PaintToLower) smoothedByDistance = (r + mShapeEditToolStrength) - (r + mShapeEditToolStrength) * (3 * distancePerRadius * distancePerRadius - 2 * distancePerRadius * distancePerRadius * distancePerRadius);
|
if (mShapeEditTool == ShapeEditTool_PaintToRaise || mShapeEditTool == ShapeEditTool_PaintToLower) smoothedByDistance = (r + mShapeEditToolStrength) - (r + mShapeEditToolStrength) * (3 * distancePerRadius * distancePerRadius - 2 * distancePerRadius * distancePerRadius * distancePerRadius);
|
||||||
if (distance <= r)
|
if (distance <= r)
|
||||||
{
|
{
|
||||||
if (mShapeEditTool == ShapeEditTool_Drag || mShapeEditTool == ShapeEditTool_PaintToRaise || mShapeEditTool == ShapeEditTool_PaintToLower)
|
if (mShapeEditTool == ShapeEditTool_Drag) alterHeight(cellCoords, x, y, smoothedByDistance);
|
||||||
alterHeight(cellCoords, x, y, smoothedByDistance);
|
if (mShapeEditTool == ShapeEditTool_PaintToRaise || mShapeEditTool == ShapeEditTool_PaintToLower)
|
||||||
|
{
|
||||||
|
alterHeight(cellCoords, x, y, smoothedByDistance);
|
||||||
|
float smoothMultiplier = static_cast<float>(CSMPrefs::get()["3D Scene Editing"]["landedit-post-smoothstrength"].toDouble());
|
||||||
|
if (CSMPrefs::get()["3D Scene Editing"]["landedit-post-smoothpainting"].isTrue()) smoothHeight(cellCoords, x, y, mShapeEditToolStrength * smoothMultiplier);
|
||||||
|
}
|
||||||
if (mShapeEditTool == ShapeEditTool_Smooth) smoothHeight(cellCoords, x, y, mShapeEditToolStrength);
|
if (mShapeEditTool == ShapeEditTool_Smooth) smoothHeight(cellCoords, x, y, mShapeEditToolStrength);
|
||||||
if (mShapeEditTool == ShapeEditTool_Flatten) flattenHeight(cellCoords, x, y, mShapeEditToolStrength, mTargetHeight);
|
if (mShapeEditTool == ShapeEditTool_Flatten) flattenHeight(cellCoords, x, y, mShapeEditToolStrength, mTargetHeight);
|
||||||
}
|
}
|
||||||
|
@ -481,7 +496,12 @@ void CSVRender::TerrainShapeMode::editTerrainShapeGrid(const std::pair<int, int>
|
||||||
int x = CSMWorld::CellCoordinates::vertexGlobalToInCellCoords(vertexCoords.first + value.first);
|
int x = CSMWorld::CellCoordinates::vertexGlobalToInCellCoords(vertexCoords.first + value.first);
|
||||||
int y = CSMWorld::CellCoordinates::vertexGlobalToInCellCoords(vertexCoords.second + value.second);
|
int y = CSMWorld::CellCoordinates::vertexGlobalToInCellCoords(vertexCoords.second + value.second);
|
||||||
if (mShapeEditTool == ShapeEditTool_Drag) alterHeight(cellCoords, x, y, mTotalDiffY);
|
if (mShapeEditTool == ShapeEditTool_Drag) alterHeight(cellCoords, x, y, mTotalDiffY);
|
||||||
if (mShapeEditTool == ShapeEditTool_PaintToRaise || mShapeEditTool == ShapeEditTool_PaintToLower) alterHeight(cellCoords, x, y, mShapeEditToolStrength);
|
if (mShapeEditTool == ShapeEditTool_PaintToRaise || mShapeEditTool == ShapeEditTool_PaintToLower)
|
||||||
|
{
|
||||||
|
alterHeight(cellCoords, x, y, mShapeEditToolStrength);
|
||||||
|
float smoothMultiplier = static_cast<float>(CSMPrefs::get()["3D Scene Editing"]["landedit-post-smoothstrength"].toDouble());
|
||||||
|
if (CSMPrefs::get()["3D Scene Editing"]["landedit-post-smoothpainting"].isTrue()) smoothHeight(cellCoords, x, y, mShapeEditToolStrength * smoothMultiplier);
|
||||||
|
}
|
||||||
if (mShapeEditTool == ShapeEditTool_Smooth) smoothHeight(cellCoords, x, y, mShapeEditToolStrength);
|
if (mShapeEditTool == ShapeEditTool_Smooth) smoothHeight(cellCoords, x, y, mShapeEditToolStrength);
|
||||||
if (mShapeEditTool == ShapeEditTool_Flatten) flattenHeight(cellCoords, x, y, mShapeEditToolStrength, mTargetHeight);
|
if (mShapeEditTool == ShapeEditTool_Flatten) flattenHeight(cellCoords, x, y, mShapeEditToolStrength, mTargetHeight);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue