-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ability to lock spatial nodes transform in editor #12359
Conversation
//SpatialEditorSelectedItem spatial_data = editor_selection.get_node_editor_data<SpatialEditorSelectedItem>(spatial); | ||
spatial->set_meta("_edit_lock_", Variant()); | ||
emit_signal("item_lock_status_changed"); | ||
//emit_signal("item_lock_status_changed"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't seem really useful to keep? ;)
Please check the other commented statements and see if they're needed or should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, my bad will clean them asap
fb82ac4
to
257d485
Compare
UX-wise it'd be great if the transform Gizmo handles would be hidden or at least have no active hover effect once the selected node is locked. This hopefully communicates the locked state & helps avoid confusing users that toggled the lock accidentally, wondering why they can't grab those handles even though they light up on mouse over. |
Sure I will take a look at this when I will have some time. Gizmos for sure should be still visible (so user could see where is pivot point of the node), but I can disable the hover effect for locked nodes. I also wanted to take a look into not allowing selection when clicking in viewport on locked node. But I'm not sure when exactly I will dig into this. |
I just noticed there is a problem when locking subscenes. The lock in that case is not stored between sessions. Will need to investigate this (take a look at how it's working in 2d in such case). |
I was looking hard to find how it's done for 2d subscenes. In the end it turns out it's not done at all (from my tests). |
If someone has any hints on how to save |
actually, I was thinking this information should be removed from metadata
and put as actual (hidden) properties in CanvasItem and Spatial..
so we can leave metadata for actual metadata stuff used by the user.
…On Sat, Nov 11, 2017 at 9:27 AM, kubecz3k ***@***.***> wrote:
If someone has any hints on how to save meta_data for subscenes I will be
obligated, there is not much time left before 20 :)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#12359 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF-Z2xKTbayLDi9I9MW-a_R5QnFw_1TVks5s1ZKegaJpZM4QDXtD>
.
|
@reduz oh I see, so storing metadata is not the best way to fix that issue. |
257d485
to
518d907
Compare
Works in the same fashion as lock icon for 2d nodes:
It locks translation, scale and rotation.
Change in
editor_data.cpp
is needed because it was possible to create infinite loop ofselection_changed
signals in the case whenselection_changed
signal was connected to the method that useseditor_data.get_selected_node_list
(it happened whenchanged
variable ofeditor_data
was set to false).