_parse_connections: Condition "!common_parent" is true. Continuing.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Dumuz

I have no idea what this means, I’ve never seen this warning and I can’t find anyone else that’s had it.

" _parse_connections: Condition “!common_parent” is true. Continuing. "

func _on_Toy_btn_pressed():
    var x = range(0,10)
	var highlight = Button.new()
	var empty = StyleBoxEmpty.new()
	highlight.rect_min_size = Vector2(100,100)
	highlight.set('custom_styles/normal', empty )
	highlight.connect("pressed",pet,"_praise",["toy","doll"],2)
	highlight.connect("pressed",self,"_clean_up",[highlight.get_instance_id()],2)
	var highlighted = PackedScene.new()
	highlighted.pack(highlight)    #--------------This is where my error is.
	for c in x:
			$Inv_GUI/inv_cont.get_child(c).add_child(highlighted.instance())
			continue

This only happened after I added the enum flags (2) at the end of my signals, in an attempt to keep the buttons working after the scene is packed for instancing. Before that, my signal connect weren’t working at all.

So, I didn’t find the answer. But I got the buttons to work. Turns out the connect() methods had to be applied to the instance after it was created at the bottom.

If anyone knows what the error meant and why, I’d appreciate it. just for knowledge purposes.

Dumuz | 2020-02-15 23:25

Hi all, I am a Godot newbie. I had the same error but it was due to other reasons. Thought I’d add a comment in case this helps someone else resolve their issue.

Like njamster mentioned, reading “!common_parent” out loud to say “not common parent” helped me find the solution, as in “whatever you’re trying to do is throwing an error because something does not have a common parent.”

I realized that the issue was the .tscn import I was doing. I had edited the children in the main scene GUI, but what I need to do is OPEN the .tscn in a new tab by clicking on the film icon, make whatever edits I want there, save, and close the tab. The edits I was making was essentially not popping up in the .tscn file, so the parent was misplaced–Godot couldn’t recognize a common parent! After I make those fixes, now the edits appear in the main GUI without the “!common_parent” error.

(For reference, I created the .tscn file by exporting from Blender using this exporter: Blender ESCN exporter — Godot Engine (stable) documentation in English. I then renamed the .escn file to .tscn because for some reason sometimes Godot didn’t recognize the .escn extension. Someone mentioned in some thread somewhere that .escn was becoming obsolete and Godot treats .tscn and .escn the same way anyways, so now I always change the .escn extension to .tscn. Phew!)

jchillen | 2020-07-13 00:01

:bust_in_silhouette: Reply From: njamster

The exclamation mark in the error message means “not”, so the error tries to tell you that two nodes don’t have a common parent node, i.e. are in separate scene trees. Which is true because the button has not been added to any tree when you connect the signals, thus it simply cannot be in the same tree as self or pet.

However, from your code snippet I don’t see why you’d need a PackedScene in the first place. Are you aware that new() already returns an instance?

for c in range(0, 10):
    # create a new button instance
    var highlight = Button.new()

    # modify the instance properties
    highlight.rect_min_size = Vector2(100, 100)
    highlight.set('custom_styles/normal', empty)
    highlight.connect("pressed", pet, "_praise", ["toy", "doll"], 2)
    highlight.connect("pressed", self, "_clean_up", [highlight.get_instance_id()], 2)

    # add the instance to the tree
    $Inv_GUI/inv_cont.get_child(c).add_child(highlight)

I did not! Thank you for clearing that up! :smiley:

Dumuz | 2020-02-16 15:53

1 Like