How to mantain the original Image Size?

I’m creating a plugin, that’s updating the material images size. Example: The user has some material with a texture called “wood.jpg”, “street.jpg”, “iron.png”, but they want to update this image to other that are in a different folder. The users select the folder, and the script reload all images.

The problem is, when the image have been load, the original size changes to 0,25m x 0,25m (Width and Height).

But i would to mantain the previous image size.

Most likely you have a problem in your code, when you queries the previous (original material texture) image size, or when you are apply this stored size to the texture you loaded.

1 Like

But i’m not doing nothing about the image size in my code. It’s change the image by itself.

If you “not doing nothing”, did you actually write code or not? Images don’t just change themselves. Images won’t load and apply as texture themselves. Someone had to write code.
Without seeing it (your code), hard to tell where you made a mistake or what is missing from the code. ( However, in my previous post, tried to mention what could have been missed)

1 Like