Skip to content

Do not create a bpy Image for missing textures#30

Open
Dragorn421 wants to merge 1 commit into
Fast-64:mainfrom
Dragorn421:dont_create_bpy_image_for_missing_textures
Open

Do not create a bpy Image for missing textures#30
Dragorn421 wants to merge 1 commit into
Fast-64:mainfrom
Dragorn421:dont_create_bpy_image_for_missing_textures

Conversation

@Dragorn421

Copy link
Copy Markdown

Currently f64render creates an image f64render_missing_texture that is used when a texture is not found

I found out you can create a GPUTexture out of pixel data directly without having to create a bpy Image

This way seems less fragile and less clutter in the blend.

@Lilaa3

Lilaa3 commented Mar 14, 2026

Copy link
Copy Markdown

This is only a feature in more modern versions of the gpu api

@Dragorn421

Copy link
Copy Markdown
Author

Really? I didn't test on 3.2, only in 4.2, but 3.2 API does document the exact same constructors for GPUTexture https://docs.blender.org/api/3.2/gpu.types.html#gpu.types.GPUTexture and Buffer https://docs.blender.org/api/3.2/gpu.types.html#gpu.types.Buffer

@Dragorn421

Dragorn421 commented Mar 14, 2026

Copy link
Copy Markdown
Author

I tested on 3.2.2 and it's weird
it does not error and it does show a black texture (like in other versions), but setting the texture color to gray for testing purposes keeps the texture black whereas it's gray in 4.2 and 3.4

@Dragorn421

Copy link
Copy Markdown
Author

NVM I just forgot to set the renderer to f64render in 3.2.2... this works just fine in 3.2.2 too

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants