You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Node3D gizmo improvements
* Clean-up of node_3d_editor_plugin.{h,cpp}: removed unused code, fixed some bugs.
* Moved node_3d_editor_gizmos.{h,cpp} to editor/plugins.
* Added support for multiple gizmos per node. This means custom gizmos will no longer override the built-in ones and that multiple gizmos can be used in more complex nodes.
* Added support for handle IDs. When adding handles to a gizmo, an ID can be specified for each one, making it easier to work with gizmos that have a variable number of handles.
* Added support for subgizmos, selectable elements that can be transformed without needing a node of their own. By overriding _subgizmo_intersect_frustum() and/or _subgizmo_intersect_ray() gizmos can define which subgizmos should be selected on a region or click selection. Subgizmo transformations are applied using get/set/commit virtual methods, similar to how handles work.
This commit is contained in:
@@ -31,7 +31,9 @@
|
||||
#ifndef PATH_EDITOR_PLUGIN_H
|
||||
#define PATH_EDITOR_PLUGIN_H
|
||||
|
||||
#include "editor/node_3d_editor_gizmos.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "editor/plugins/node_3d_editor_gizmos.h"
|
||||
#include "scene/3d/camera_3d.h"
|
||||
#include "scene/3d/path_3d.h"
|
||||
|
||||
class Path3DGizmo : public EditorNode3DGizmo {
|
||||
@@ -44,9 +46,9 @@ class Path3DGizmo : public EditorNode3DGizmo {
|
||||
|
||||
public:
|
||||
virtual String get_handle_name(int p_idx) const override;
|
||||
virtual Variant get_handle_value(int p_idx) override;
|
||||
virtual void set_handle(int p_idx, Camera3D *p_camera, const Point2 &p_point) override;
|
||||
virtual void commit_handle(int p_idx, const Variant &p_restore, bool p_cancel = false) override;
|
||||
virtual Variant get_handle_value(int p_id) const override;
|
||||
virtual void set_handle(int p_id, Camera3D *p_camera, const Point2 &p_point) const override;
|
||||
virtual void commit_handle(int p_id, const Variant &p_restore, bool p_cancel = false) const override;
|
||||
|
||||
virtual void redraw() override;
|
||||
Path3DGizmo(Path3D *p_path = nullptr);
|
||||
|
||||
Reference in New Issue
Block a user