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

Pressing "AutoPlay on Load" button of the sprite frames editor emit error to the output #91826

Closed
Chaosus opened this issue May 11, 2024 · 1 comment · Fixed by #91830
Closed

Comments

@Chaosus
Copy link
Member

Chaosus commented May 11, 2024

Tested versions

4.3: 2ba22d1

System information

Windows 11

Issue description

sprite_frames_editor_bug

Steps to reproduce

Create and save a SpriteFrames as a separate resource, open it and check the bug.

Minimal reproduction project (MRP)

spriteframesbug.zip

@Chaosus
Copy link
Member Author

Chaosus commented May 11, 2024

A regression from #85494, if SpriteFrames is saved as a separate resource, frames.ptr() is not built-in and failed to found a correct history_id in:

if (Resource *res = Object::cast_to<Resource>(p_object)) {
if (res->is_built_in()) {
if (res->get_path().is_empty()) {
int idx = EditorNode::get_editor_data().get_current_edited_scene_history_id();
if (idx > 0) {
history_id = idx;
}
} else {
int idx = EditorNode::get_editor_data().get_scene_history_id_from_path(res->get_path().get_slice("::", 0));
if (idx > 0) {
history_id = idx;
}
}
}
}

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

Successfully merging a pull request may close this issue.

1 participant