Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
f167a2b9
Commit
f167a2b9
authored
Jun 24, 2020
by
Michael Alexsander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix regressions in the 3D lock buttons
parent
3c9fc891
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
node_3d_editor_plugin.cpp
editor/plugins/node_3d_editor_plugin.cpp
+17
-12
No files found.
editor/plugins/node_3d_editor_plugin.cpp
View file @
f167a2b9
...
...
@@ -4948,7 +4948,7 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
for
(
List
<
Node
*>::
Element
*
E
=
selection
.
front
();
E
;
E
=
E
->
next
())
{
Node3D
*
spatial
=
Object
::
cast_to
<
Node3D
>
(
E
->
get
());
if
(
!
spatial
||
!
spatial
->
is_
visible_in
_tree
())
{
if
(
!
spatial
||
!
spatial
->
is_
inside
_tree
())
{
continue
;
}
...
...
@@ -4962,8 +4962,8 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
undo_redo
->
add_undo_method
(
this
,
"emit_signal"
,
"item_lock_status_changed"
);
}
undo_redo
->
add_do_method
(
this
,
"_refresh_menu_icons"
,
Variant
()
);
undo_redo
->
add_undo_method
(
this
,
"_refresh_menu_icons"
,
Variant
()
);
undo_redo
->
add_do_method
(
this
,
"_refresh_menu_icons"
);
undo_redo
->
add_undo_method
(
this
,
"_refresh_menu_icons"
);
undo_redo
->
commit_action
();
}
break
;
case
MENU_UNLOCK_SELECTED
:
{
...
...
@@ -4973,7 +4973,7 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
for
(
List
<
Node
*>::
Element
*
E
=
selection
.
front
();
E
;
E
=
E
->
next
())
{
Node3D
*
spatial
=
Object
::
cast_to
<
Node3D
>
(
E
->
get
());
if
(
!
spatial
||
!
spatial
->
is_
visible_in
_tree
())
{
if
(
!
spatial
||
!
spatial
->
is_
inside
_tree
())
{
continue
;
}
...
...
@@ -4987,8 +4987,8 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
undo_redo
->
add_undo_method
(
this
,
"emit_signal"
,
"item_lock_status_changed"
);
}
undo_redo
->
add_do_method
(
this
,
"_refresh_menu_icons"
,
Variant
()
);
undo_redo
->
add_undo_method
(
this
,
"_refresh_menu_icons"
,
Variant
()
);
undo_redo
->
add_do_method
(
this
,
"_refresh_menu_icons"
);
undo_redo
->
add_undo_method
(
this
,
"_refresh_menu_icons"
);
undo_redo
->
commit_action
();
}
break
;
case
MENU_GROUP_SELECTED
:
{
...
...
@@ -4998,7 +4998,7 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
for
(
List
<
Node
*>::
Element
*
E
=
selection
.
front
();
E
;
E
=
E
->
next
())
{
Node3D
*
spatial
=
Object
::
cast_to
<
Node3D
>
(
E
->
get
());
if
(
!
spatial
||
!
spatial
->
is_
visible_in
_tree
())
{
if
(
!
spatial
||
!
spatial
->
is_
inside
_tree
())
{
continue
;
}
...
...
@@ -5012,8 +5012,8 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
undo_redo
->
add_undo_method
(
this
,
"emit_signal"
,
"item_group_status_changed"
);
}
undo_redo
->
add_do_method
(
this
,
"_refresh_menu_icons"
,
Variant
()
);
undo_redo
->
add_undo_method
(
this
,
"_refresh_menu_icons"
,
Variant
()
);
undo_redo
->
add_do_method
(
this
,
"_refresh_menu_icons"
);
undo_redo
->
add_undo_method
(
this
,
"_refresh_menu_icons"
);
undo_redo
->
commit_action
();
}
break
;
case
MENU_UNGROUP_SELECTED
:
{
...
...
@@ -5022,7 +5022,7 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
for
(
List
<
Node
*>::
Element
*
E
=
selection
.
front
();
E
;
E
=
E
->
next
())
{
Node3D
*
spatial
=
Object
::
cast_to
<
Node3D
>
(
E
->
get
());
if
(
!
spatial
||
!
spatial
->
is_
visible_in
_tree
())
{
if
(
!
spatial
||
!
spatial
->
is_
inside
_tree
())
{
continue
;
}
...
...
@@ -5036,8 +5036,8 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
undo_redo
->
add_undo_method
(
this
,
"emit_signal"
,
"item_group_status_changed"
);
}
undo_redo
->
add_do_method
(
this
,
"_refresh_menu_icons"
,
Variant
()
);
undo_redo
->
add_undo_method
(
this
,
"_refresh_menu_icons"
,
Variant
()
);
undo_redo
->
add_do_method
(
this
,
"_refresh_menu_icons"
);
undo_redo
->
add_undo_method
(
this
,
"_refresh_menu_icons"
);
undo_redo
->
commit_action
();
}
break
;
}
...
...
@@ -5979,6 +5979,7 @@ void Node3DEditor::_bind_methods() {
ClassDB
::
bind_method
(
"_unhandled_key_input"
,
&
Node3DEditor
::
_unhandled_key_input
);
ClassDB
::
bind_method
(
"_get_editor_data"
,
&
Node3DEditor
::
_get_editor_data
);
ClassDB
::
bind_method
(
"_request_gizmo"
,
&
Node3DEditor
::
_request_gizmo
);
ClassDB
::
bind_method
(
"_refresh_menu_icons"
,
&
Node3DEditor
::
_refresh_menu_icons
);
ADD_SIGNAL
(
MethodInfo
(
"transform_key_request"
));
ADD_SIGNAL
(
MethodInfo
(
"item_lock_status_changed"
));
...
...
@@ -6086,24 +6087,28 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) {
tool_button
[
TOOL_LOCK_SELECTED
]
=
memnew
(
Button
);
hbc_menu
->
add_child
(
tool_button
[
TOOL_LOCK_SELECTED
]);
tool_button
[
TOOL_LOCK_SELECTED
]
->
set_flat
(
true
);
button_binds
.
write
[
0
]
=
MENU_LOCK_SELECTED
;
tool_button
[
TOOL_LOCK_SELECTED
]
->
connect
(
"pressed"
,
callable_mp
(
this
,
&
Node3DEditor
::
_menu_item_pressed
),
button_binds
);
tool_button
[
TOOL_LOCK_SELECTED
]
->
set_tooltip
(
TTR
(
"Lock the selected object in place (can't be moved)."
));
tool_button
[
TOOL_UNLOCK_SELECTED
]
=
memnew
(
Button
);
hbc_menu
->
add_child
(
tool_button
[
TOOL_UNLOCK_SELECTED
]);
tool_button
[
TOOL_UNLOCK_SELECTED
]
->
set_flat
(
true
);
button_binds
.
write
[
0
]
=
MENU_UNLOCK_SELECTED
;
tool_button
[
TOOL_UNLOCK_SELECTED
]
->
connect
(
"pressed"
,
callable_mp
(
this
,
&
Node3DEditor
::
_menu_item_pressed
),
button_binds
);
tool_button
[
TOOL_UNLOCK_SELECTED
]
->
set_tooltip
(
TTR
(
"Unlock the selected object (can be moved)."
));
tool_button
[
TOOL_GROUP_SELECTED
]
=
memnew
(
Button
);
hbc_menu
->
add_child
(
tool_button
[
TOOL_GROUP_SELECTED
]);
tool_button
[
TOOL_GROUP_SELECTED
]
->
set_flat
(
true
);
button_binds
.
write
[
0
]
=
MENU_GROUP_SELECTED
;
tool_button
[
TOOL_GROUP_SELECTED
]
->
connect
(
"pressed"
,
callable_mp
(
this
,
&
Node3DEditor
::
_menu_item_pressed
),
button_binds
);
tool_button
[
TOOL_GROUP_SELECTED
]
->
set_tooltip
(
TTR
(
"Makes sure the object's children are not selectable."
));
tool_button
[
TOOL_UNGROUP_SELECTED
]
=
memnew
(
Button
);
hbc_menu
->
add_child
(
tool_button
[
TOOL_UNGROUP_SELECTED
]);
tool_button
[
TOOL_UNGROUP_SELECTED
]
->
set_flat
(
true
);
button_binds
.
write
[
0
]
=
MENU_UNGROUP_SELECTED
;
tool_button
[
TOOL_UNGROUP_SELECTED
]
->
connect
(
"pressed"
,
callable_mp
(
this
,
&
Node3DEditor
::
_menu_item_pressed
),
button_binds
);
tool_button
[
TOOL_UNGROUP_SELECTED
]
->
set_tooltip
(
TTR
(
"Restores the object's children's ability to be selected."
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment