Skip to content
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

[3.x] Fix display of programmatically created value in remote inspector #44657

Merged
merged 1 commit into from May 14, 2021

Conversation

timothyqiu
Copy link
Member

Programmatically created property value (object) were shown as "Empty" in the remote inspector. (See #28353 and #30033.)

  • These objects don't have path, but the empty path check was lost since Fixed error spam in remote debugger #22201.
  • Programmatically created value is now shown as an editable "Object ID: XXXX" in remote inspector, the same as in 3.0.6.

The debugger code on master had a huge change, so this PR only targets the 3.2 branch.

p.s. I tried the same approach on master in SceneDebuggerObject::serialize (here) and the value is shown as "Object ID: XXXX" correctly. But clicking it does not make the inspector inspect the object. I'm not familiar with the 4.0 code, so I don't know why it happens and whether that's the expected behavior in 4.0.

@YeldhamDev YeldhamDev added this to the 3.2 milestone Dec 25, 2020
@akien-mga akien-mga requested a review from a team January 15, 2021 15:53
Base automatically changed from 3.2 to 3.x March 16, 2021 11:11
@akien-mga akien-mga modified the milestones: 3.2, 3.3 Mar 17, 2021
@akien-mga akien-mga modified the milestones: 3.3, 3.4 Mar 22, 2021
@akien-mga akien-mga changed the title [3.2] Fix display of programmatically created value in remote inspector [3.x] Fix display of programmatically created value in remote inspector Mar 23, 2021
@akien-mga akien-mga merged commit 9d1770d into godotengine:3.x May 14, 2021
@akien-mga
Copy link
Member

Thanks!

The debugger code on master had a huge change, so this PR only targets the 3.2 branch.

It would be great to figure it out on master too so that we can have the issue fixed there too for future releases. CC @Faless

@Zireael07
Copy link
Contributor

yippee, this issue masked quite some problems I had, e.g. overly complex collision shapes...

@Faless
Copy link
Collaborator

Faless commented May 14, 2021

It would be great to figure it out on master too so that we can have the issue fixed there too for future releases. CC @Faless

I think this should be the equivalent change for master:

diff --git a/scene/debugger/scene_debugger.cpp b/scene/debugger/scene_debugger.cpp
index a1d4adcd41..a46f6a0197 100644
--- a/scene/debugger/scene_debugger.cpp
+++ b/scene/debugger/scene_debugger.cpp
@@ -367,7 +367,7 @@ void SceneDebuggerObject::serialize(Array &r_arr, int p_max_size) {
 
                PropertyHint hint = pi.hint;
                String hint_string = pi.hint_string;
-               if (!res.is_null()) {
+               if (!res.is_null() && !res->get_path().is_empty()) {
                        var = res->get_path();
                } else { //only send information that can be sent..
                        int len = 0; //test how big is this to encode

@akien-mga
Copy link
Member

Cherry-picked for 3.3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants