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

POT Generation ignores instantiated nodes in .tscn #79442

Closed
ghost opened this issue Jul 13, 2023 · 2 comments
Closed

POT Generation ignores instantiated nodes in .tscn #79442

ghost opened this issue Jul 13, 2023 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 13, 2023

Godot version

v4.0.3.stable.official [5222a99]

System information

N/A

Issue description

The POT Generation ignores instantiated scenes.

Investigating the source code, it's probably because of this check:

String node_type = state->get_node_type(i);
if (!ClassDB::is_parent_class(node_type, "Control") && !ClassDB::is_parent_class(node_type, "Window")) {
continue;
}

Because instantiated nodes returns empty for the type here:

StringName SceneState::get_node_type(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, nodes.size(), StringName());
if (nodes[p_idx].type == TYPE_INSTANTIATED) {
return StringName();
}

Steps to reproduce

  1. Open the MRP;
  2. Trigger the POT Generation in the ProjectSettings;
  3. Open the generated .pot and note that the instantiated node text wasn't serialized, but the local node was.

Minimal reproduction project

pot_generation_fails_for_instanced_nodes.zip

@Okxa
Copy link

Okxa commented Oct 30, 2023

Reported previously here: #74194

@AThousandShips
Copy link
Member

Duplicate of #74194

@AThousandShips AThousandShips marked this as a duplicate of #74194 Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants