mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-08 23:07:09 +02:00
Only allow heightfield brushes on heightfield attributes.
This commit is contained in:
parent
5b8ff07449
commit
23a4c21ce1
2 changed files with 6 additions and 0 deletions
|
@ -1101,6 +1101,10 @@ HeightfieldBrushTool::HeightfieldBrushTool(MetavoxelEditor* editor, const QStrin
|
||||||
_radius->setValue(1.0);
|
_radius->setValue(1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool HeightfieldBrushTool::appliesTo(const AttributePointer& attribute) const {
|
||||||
|
return attribute->inherits("HeightfieldAttribute");
|
||||||
|
}
|
||||||
|
|
||||||
void HeightfieldBrushTool::render() {
|
void HeightfieldBrushTool::render() {
|
||||||
if (Application::getInstance()->isMouseHidden()) {
|
if (Application::getInstance()->isMouseHidden()) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -312,6 +312,8 @@ public:
|
||||||
|
|
||||||
HeightfieldBrushTool(MetavoxelEditor* editor, const QString& name);
|
HeightfieldBrushTool(MetavoxelEditor* editor, const QString& name);
|
||||||
|
|
||||||
|
virtual bool appliesTo(const AttributePointer& attribute) const;
|
||||||
|
|
||||||
virtual void render();
|
virtual void render();
|
||||||
|
|
||||||
virtual bool eventFilter(QObject* watched, QEvent* event);
|
virtual bool eventFilter(QObject* watched, QEvent* event);
|
||||||
|
|
Loading…
Reference in a new issue