Skip to main content

Timeline for Bake a texture map with python

Current License: CC BY-SA 4.0

15 events
when toggle format what by license comment
Apr 13 at 18:33 comment added clankill3r Keep in mind that with C:\\TEMP\\baked.png it will only work on windows. You could use bpy.data.filepath and have some logic to check of the file is saved.
Oct 25, 2022 at 22:31 comment added MisterLBlends I tried that, actually. It didn't like it, just didn't put the image anywhere. It was weird.
Oct 25, 2022 at 21:57 comment added Noob Cat I Have update the Answer, Check if it helps you. It is always better to save the image directly without going through the node tree, unless you want to manipulate it.
Oct 25, 2022 at 21:55 history edited Noob Cat CC BY-SA 4.0
added 256 characters in body
Oct 25, 2022 at 18:23 comment added MisterLBlends I figured out a workaround, have the script generate the image, assign it to the image node, then save it as an image. The rendering function seems to not like interacting with the path function.
Oct 25, 2022 at 15:08 comment added MisterLBlends I've been adapting this for my own work, populating an existing node for baked textures, but it won't save. I have a script already that generates images and saves them like: //textures/imagename.png' But when I try to do the same for the baked image it tells me RuntimeError: Error: Could not write image: No such file or directory, '//bakes/DiffuseBake.png' Now I know the folder exists, because the same script checks if it exists and makes it if not. So why is this not working: imgbake.save_render(filepath = "//bakes/DiffuseBake.png")
Aug 26, 2020 at 15:53 history edited Noob Cat CC BY-SA 4.0
deleted 66 characters in body
Aug 25, 2020 at 17:37 history edited Noob Cat CC BY-SA 4.0
edited body
Aug 22, 2020 at 7:09 vote accept Thomas
Aug 22, 2020 at 5:18 history edited Noob Cat CC BY-SA 4.0
deleted 18 characters in body
Aug 22, 2020 at 5:12 history edited Noob Cat CC BY-SA 4.0
deleted 266 characters in body
Aug 21, 2020 at 18:41 history edited Noob Cat CC BY-SA 4.0
added 2 characters in body
Aug 21, 2020 at 18:35 history edited Noob Cat CC BY-SA 4.0
added 2 characters in body
Aug 21, 2020 at 18:28 history edited Noob Cat CC BY-SA 4.0
added 281 characters in body
Aug 21, 2020 at 18:23 history answered Noob Cat CC BY-SA 4.0