|
@@ -1,5 +1,5 @@
|
|
|
/**************************************************************************/
|
|
|
-/* sprite_3d_gizmo_plugin.cpp */
|
|
|
+/* sprite_base_3d_gizmo_plugin.cpp */
|
|
|
/**************************************************************************/
|
|
|
/* This file is part of: */
|
|
|
/* GODOT ENGINE */
|
|
@@ -28,36 +28,36 @@
|
|
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|
|
/**************************************************************************/
|
|
|
|
|
|
-#include "sprite_3d_gizmo_plugin.h"
|
|
|
+#include "sprite_base_3d_gizmo_plugin.h"
|
|
|
|
|
|
#include "editor/plugins/node_3d_editor_plugin.h"
|
|
|
#include "scene/3d/sprite_3d.h"
|
|
|
|
|
|
-Sprite3DGizmoPlugin::Sprite3DGizmoPlugin() {
|
|
|
+SpriteBase3DGizmoPlugin::SpriteBase3DGizmoPlugin() {
|
|
|
}
|
|
|
|
|
|
-bool Sprite3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
|
|
|
- return Object::cast_to<Sprite3D>(p_spatial) != nullptr;
|
|
|
+bool SpriteBase3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
|
|
|
+ return Object::cast_to<SpriteBase3D>(p_spatial) != nullptr;
|
|
|
}
|
|
|
|
|
|
-String Sprite3DGizmoPlugin::get_gizmo_name() const {
|
|
|
- return "Sprite3D";
|
|
|
+String SpriteBase3DGizmoPlugin::get_gizmo_name() const {
|
|
|
+ return "SpriteBase3D";
|
|
|
}
|
|
|
|
|
|
-int Sprite3DGizmoPlugin::get_priority() const {
|
|
|
+int SpriteBase3DGizmoPlugin::get_priority() const {
|
|
|
return -1;
|
|
|
}
|
|
|
|
|
|
-bool Sprite3DGizmoPlugin::can_be_hidden() const {
|
|
|
+bool SpriteBase3DGizmoPlugin::can_be_hidden() const {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
-void Sprite3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
|
|
|
- Sprite3D *sprite = Object::cast_to<Sprite3D>(p_gizmo->get_node_3d());
|
|
|
+void SpriteBase3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
|
|
|
+ SpriteBase3D *sprite_base = Object::cast_to<SpriteBase3D>(p_gizmo->get_node_3d());
|
|
|
|
|
|
p_gizmo->clear();
|
|
|
|
|
|
- Ref<TriangleMesh> tm = sprite->generate_triangle_mesh();
|
|
|
+ Ref<TriangleMesh> tm = sprite_base->generate_triangle_mesh();
|
|
|
if (tm.is_valid()) {
|
|
|
p_gizmo->add_collision_triangles(tm);
|
|
|
}
|