mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 12:53:03 +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);
|
||||
}
|
||||
|
||||
bool HeightfieldBrushTool::appliesTo(const AttributePointer& attribute) const {
|
||||
return attribute->inherits("HeightfieldAttribute");
|
||||
}
|
||||
|
||||
void HeightfieldBrushTool::render() {
|
||||
if (Application::getInstance()->isMouseHidden()) {
|
||||
return;
|
||||
|
|
|
@ -312,6 +312,8 @@ public:
|
|||
|
||||
HeightfieldBrushTool(MetavoxelEditor* editor, const QString& name);
|
||||
|
||||
virtual bool appliesTo(const AttributePointer& attribute) const;
|
||||
|
||||
virtual void render();
|
||||
|
||||
virtual bool eventFilter(QObject* watched, QEvent* event);
|
||||
|
|
Loading…
Reference in a new issue