Skip to content

Commit

Permalink
Move GridMapEditor to bottom panel
Browse files Browse the repository at this point in the history
add transform mode, which pass event to the 3d editor so we can move, rotate, scale

fix the selection_level_instance not applying transform from the node

correct the rotation of the selection after duplicating or moving a block

fix giant cube on start up

remove few unnecessary lines of code

re-introduce clear rotation in the setting/tool menu

added icons and change the size_slider with zoom_widget

make the paint and select tool work

start adding tools in toolbar

make the selection cursor

but there is a bug with the Q and E shortcuts

fix cursor not updating when button toggled

when button are part of a group, they send the signal `toggled` rather than `pressed`
we also made sure that the transform is updated correctly after the cursor update

add cursors

update cursors and move more actions to toolbar

add clear and change fill shortcut
  • Loading branch information
Nodragem committed Oct 13, 2024
1 parent 694d3c2 commit e50622f
Show file tree
Hide file tree
Showing 4 changed files with 441 additions and 198 deletions.
5 changes: 5 additions & 0 deletions editor/plugins/node_3d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4000,6 +4000,11 @@ void Node3DEditorViewport::update_transform_gizmo_view() {
RenderingServer::get_singleton()->instance_set_visible(rotate_gizmo_instance[3], spatial_editor->is_gizmo_visible() && transform_gizmo_visible && (spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_SELECT || spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_ROTATE));
}

void Node3DEditorViewport::set_transform_gizmo_view(bool value) {
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(VIEW_TRANSFORM_GIZMO), value);
_menu_option(VIEW_TRANSFORM_GIZMO);
}

void Node3DEditorViewport::set_state(const Dictionary &p_state) {
if (p_state.has("position")) {
cursor.pos = p_state["position"];
Expand Down
1 change: 1 addition & 0 deletions editor/plugins/node_3d_editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ class Node3DEditorViewport : public Control {
public:
void update_surface() { surface->queue_redraw(); }
void update_transform_gizmo_view();
void set_transform_gizmo_view(bool value);

void set_can_preview(Camera3D *p_preview);
void set_state(const Dictionary &p_state);
Expand Down
Loading

0 comments on commit e50622f

Please sign in to comment.