Page MenuHome

baked texture not updating in viewport after using undo
Closed, ArchivedPublic


System Information
OS: windows 7&10 64bit
GPU: NVIDIA quadro k4000, gtx 860m

Blender Version
Broken: 2.75.2 0b7d0f9 & 2.75.4
Worked: (optional)

Short description of error
using undo after baking a texture to a object and then using undo will break the viewport update of the texture. its still baked in the uv editor but im not able to get it to update in the viewport any more unless i restart blender.

Exact steps for others to reproduce the error
Based on a (as simple as possible) attached .blend file with minimum amount of steps

  1. open blend file
  2. select all objects (a) and bake textures. after that you should see textures on all the objects
  3. there is a script which bakes when moving the planes, makes it a bit easier to reproduce. open a text editor and run the script
import bpy

class Observer:
    def __init__(self):
        self.last_location = (0,0,0)

    def print_updated_objects(self, scene):
        updated_objects = []
        for o in scene.objects:
            if o.is_updated:
        if(len(updated_objects) > 0):
            if not (updated_objects[0].location == self.last_location):
                self.last_location = updated_objects[0].location.copy()
                print("updated objects: %s"%updated_objects[0].location)
                print("same location")
  1. now move the plane with the name "Plane" and notice how the texture gets baked when you move it
  2. select the plane with the name "refPlaneZ" and hide it
  3. move the plane with the name "Plane" again
  4. use undo to unhide the plane with the name "refPlaneZ"
  5. notice the plane "Plane" will turn white and none of the planes will update the texture when you move them
  6. open a uv editor and move a plane, notice that the texture in the uv editor is still baked so i assume there is something going wrong when updating the texture in the viewport



Event Timeline

dan grauer (kromar) set Type to Bug.
dan grauer (kromar) created this task.
dan grauer (kromar) raised the priority of this task from to Needs Triage by Developer.
Sergey Sharybin (sergey) triaged this task as Normal priority.

My guess is that this is related on the GPU object restore policy in the undo file loading. Not sure there's a clean way resolving this, it's kind of stretching the system to it's max.. But needs some closer look.

Campbell Barton (campbellbarton) closed this task as Archived.

Images have their own undo system which works for paint, but not for bake.

This is more of a TODO relating to the undo system.

is there some timeline when these issues will get worked on? or maybe something we could contribute to get this fixed?