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

Image re-import sometimes doesn't work and keeps old textures. #22747

Closed
ghost opened this issue Oct 5, 2018 · 10 comments
Closed

Image re-import sometimes doesn't work and keeps old textures. #22747

ghost opened this issue Oct 5, 2018 · 10 comments
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Oct 5, 2018

Windows 10 64-bit Alpha 3.1 8068d02

When replacing PNG files, sometimes Godot now doesn't update and reimport the new image. Even when forcing it, it still has some display issues that aren't corrected, and the old texture may still appear even when restarting the editor?

Hard to say exactly how to reproduce this, but it happened at least twice when:

  1. I created a new scene, dragged a PNG from the file manager onto the canvas as a Sprite.
  2. Replaced the source image in the folder from Windows Explorer

Below I had originally dragged a PNG of an X11 icon, then replace it with a Win10 icon.

Overwrote the image in Windows Explorer

(Changed the os.png from the X11 one to a Win10 version. No change on the canvas or in the file manager.)
godot_master_2018-10-05_05-58-03

Manually re-import sort of works, but is cut off.

(At one point it was saying it was 54x60 or something, the canvas texture shows that at least.)

godot_master_2018-10-05_05-59-17

Still shows the old icon in the file manager.

godot_master_2018-10-05_05-59-38

Overwrote the Win icon back to the X11 and restarted the editor.

(The textures for the windows icon were overwritten with the X11 one, but they still remain in the scenes?)

godot_master_2018-10-05_06-08-09

@ghost ghost changed the title Image auto re-import sometimes doesn't work. Image re-import sometimes doesn't work and keeps old textures. Oct 5, 2018
@ghost
Copy link
Author

ghost commented Oct 5, 2018

Seems to be working fine at least in 874e3b4.

@akien-mga akien-mga added this to the 3.1 milestone Oct 5, 2018
@akien-mga
Copy link
Member

That's a feature obviously, you're not allowed to replace Linux by Windows.

@akien-mga
Copy link
Member

Could be a regression from a recent warning fix in core/image.cpp or drivers/png/image_loader_png.cpp:

  • f48ee83
  • dec20a9 (especially this one fixed a mipmaps "bug", but maybe this bug was expected behaviour)
  • 95131e6

@ghost
Copy link
Author

ghost commented Oct 5, 2018

That's a feature obviously, you're not allowed to replace Linux by Windows.

It did warn me after all! XD

chrome_2018-10-05_12-02-23

@ghost
Copy link
Author

ghost commented Oct 5, 2018

@akien-mga Thanks for sharing the commits. I'll see if reverting them and building in the morning will keep me working from the head.

I at least tried out reverting dec20a9

It improves, but has some issue still. The reimport seems responsive again, but the texture sizes are wrong on the sprite, and will refresh when you drag it.

Replacing blue texture with larger red texture.

ezgif com-gif-maker

Replacing red texture back to the smaller blue one.

ezgif com-video-to-gif 1

File Drag & Drop Issues

I also tried dragging and dropping the PNG from Windows explorer to the file manager panel in the editor, and got this error. (Not experiencing this in my previous build.)

explorer_2018-10-06_00-01-58

@ghost
Copy link
Author

ghost commented Oct 5, 2018

Not much luck reverting the others. Ran into a merge conflict, and boy this is an area I know nothing about. X)

We're doing a lot of animation stuff this week and lots of texture importing to be done, so I'll be hanging back in 874e3b4 for the time being.

@akien-mga akien-mga self-assigned this Oct 6, 2018
@akien-mga
Copy link
Member

I confirm that dec20a9 caused the reimport regression, I'll dig further to see what part of the core/image.cpp changes are to blame, and fix that.

I can also confirm that there is still an issue with updating the size, but I don't know yet what caused that.

@akien-mga
Copy link
Member

I can also confirm that there is still an issue with updating the size, but I don't know yet what caused that.

@avencherus I still get this issue in 874e3b4, so it doesn't seem to be a recent regression.

@ghost
Copy link
Author

ghost commented Oct 6, 2018

@akien-mga Oh you're right, the texture resize issue is present there as well.

I noticed the drag and drop problem is something else entirely. I just wasn't getting it before until I came back to do some retests. Seems like it has something to do with where the file is dropped.

I will go explore some older versions and see what I see, and try to figure out how to precisely reproduce the drag and drop issue.

Seems like this is maybe three different issues, I just happened to incur them all at the same time.

@ghost
Copy link
Author

ghost commented Oct 6, 2018

I have the texture sizing issue as far back as the oldest 3.1 I have archived.

4571089 from September 2nd.

I will go split these off into other issues, if they don't already exist.

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

1 participant