-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Traktor: Fixed the SplineComponent editor.
- Loading branch information
Showing
8 changed files
with
87 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 5 additions & 8 deletions
13
.../Shape/Editor/Spline/SplineEntityEditor.h → ...ape/Editor/Spline/SplineComponentEditor.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,29 @@ | ||
/* | ||
* TRAKTOR | ||
* Copyright (c) 2022 Anders Pistol. | ||
* Copyright (c) 2022-2024 Anders Pistol. | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
*/ | ||
#pragma once | ||
|
||
#include "Scene/Editor/DefaultEntityEditor.h" | ||
#include "Scene/Editor/DefaultComponentEditor.h" | ||
|
||
namespace traktor | ||
namespace traktor::shape | ||
{ | ||
namespace shape | ||
{ | ||
|
||
/*! | ||
* \ingroup Shape | ||
*/ | ||
class SplineEntityEditor : public scene::DefaultEntityEditor | ||
class SplineComponentEditor : public scene::DefaultComponentEditor | ||
{ | ||
T_RTTI_CLASS; | ||
|
||
public: | ||
SplineEntityEditor(scene::SceneEditorContext* context, scene::EntityAdapter* entityAdapter); | ||
explicit SplineComponentEditor(scene::SceneEditorContext* context, scene::EntityAdapter* entityAdapter, world::IEntityComponentData* componentData); | ||
|
||
virtual void drawGuide(render::PrimitiveRenderer* primitiveRenderer) const override final; | ||
}; | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* TRAKTOR | ||
* Copyright (c) 2022-2024 Anders Pistol. | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
*/ | ||
#include "Shape/Editor/Spline/SplineComponentData.h" | ||
#include "Shape/Editor/Spline/SplineComponentEditor.h" | ||
#include "Shape/Editor/Spline/SplineComponentEditorFactory.h" | ||
|
||
namespace traktor::shape | ||
{ | ||
|
||
T_IMPLEMENT_RTTI_CLASS(L"traktor.shape.SplineComponentEditorFactory", SplineComponentEditorFactory, scene::IComponentEditorFactory) | ||
|
||
const TypeInfoSet SplineComponentEditorFactory::getComponentDataTypes() const | ||
{ | ||
return makeTypeInfoSet< SplineComponentData >(); | ||
} | ||
|
||
bool SplineComponentEditorFactory::alwaysRebuild(const world::IEntityComponentData* componentData) const | ||
{ | ||
return false; | ||
} | ||
|
||
Ref< scene::IComponentEditor > SplineComponentEditorFactory::createComponentEditor(scene::SceneEditorContext* context, scene::EntityAdapter* entityAdapter, world::IEntityComponentData* componentData) const | ||
{ | ||
return new SplineComponentEditor(context, entityAdapter, componentData); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* TRAKTOR | ||
* Copyright (c) 2022-2024 Anders Pistol. | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
*/ | ||
#pragma once | ||
|
||
#include "Scene/Editor/IComponentEditorFactory.h" | ||
|
||
namespace traktor::shape | ||
{ | ||
|
||
/*! | ||
* \ingroup Shape | ||
*/ | ||
class SplineComponentEditorFactory : public scene::IComponentEditorFactory | ||
{ | ||
T_RTTI_CLASS; | ||
|
||
public: | ||
virtual const TypeInfoSet getComponentDataTypes() const override final; | ||
|
||
virtual bool alwaysRebuild(const world::IEntityComponentData* componentData) const override final; | ||
|
||
virtual Ref< scene::IComponentEditor > createComponentEditor(scene::SceneEditorContext* context, scene::EntityAdapter* entityAdapter, world::IEntityComponentData* componentData) const override final; | ||
}; | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.