baked texture not updating in viewport after using undo #45788

Closed
opened 2015-08-13 17:01:14 +02:00 by Daniel Grauer · 8 comments
Member

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 textureBakeViewportUpdate2.blend
  2. select all objects (a) and bake textures. after that you should see textures on all the objects
  {F223963}{F223965}
  1. there is a script which bakes when moving the planes, makes it a bit easier to reproduce. open a text editor and run the continuousBake.py 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:
                updated_objects.append(o)
                
        if(len(updated_objects) > 0):
            if not (updated_objects[0].location == self.last_location):
                self.last_location = updated_objects[0].location.copy()
                bpy.ops.object.bake_image()
                print("updated objects: %s"%updated_objects[0].location)
            else:
                print("same location")

bpy.app.handlers.scene_update_post.append(Observer().print_updated_objects)

  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
  {F223968}
  1. 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
  {F223970}
**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 [textureBakeViewportUpdate2.blend](https://archive.blender.org/developer/F223962/textureBakeViewportUpdate2.blend) 2. select all objects (a) and bake textures. after that you should see textures on all the objects ``` {F223963}{F223965} ``` 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 continuousBake.py 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: updated_objects.append(o) if(len(updated_objects) > 0): if not (updated_objects[0].location == self.last_location): self.last_location = updated_objects[0].location.copy() bpy.ops.object.bake_image() print("updated objects: %s"%updated_objects[0].location) else: print("same location") bpy.app.handlers.scene_update_post.append(Observer().print_updated_objects) ``` 4. now move the plane with the name "Plane" and notice how the texture gets baked when you move it 5. select the plane with the name "refPlaneZ" and hide it 6. move the plane with the name "Plane" again 7. use undo to unhide the plane with the name "refPlaneZ" 8. notice the plane "Plane" will turn white and none of the planes will update the texture when you move them ``` {F223968} ``` 9. 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 ``` {F223970}
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @DanielGrauer

Added subscriber: @DanielGrauer

Added subscriber: @Sergey

Added subscriber: @Sergey

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.

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.

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Campbell Barton self-assigned this 2015-08-24 13:04:25 +02:00

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.
http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/UserInterface#Undo.2C_Redo_and_Operator_Context

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. http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/UserInterface#Undo.2C_Redo_and_Operator_Context
Author
Member

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

is there some timeline when these issues will get worked on? or maybe something we could contribute to get this fixed?
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#45788
No description provided.