Undo in Armature Edit Mode does not undo Custom Properties #105744

Open
opened 2023-03-13 20:37:38 +01:00 by sanek122005 · 8 comments

System Information
Operating system: Ubuntu 20.04
Graphics card: Geforce MX230

Blender Version
Broken: 3.5 Beta

Short description of error
Undo in Armature Edit Mode does not undo changes to Armature Custom Properties

Exact steps for others to reproduce the error

  • [optionally] In default scene delete all objects
  • Add an "Armature" object
  • Go to Edit Mode
  • In Object Data Properties add a Custom Property
  • Change the value of the property (to for example 0.0) in order to add an Undo step
  • Try undo (Ctrl+Z)

The step is not undone in edit mode.
Interestingly, changes to the Custom Properties of Bones are correctly undone in Edit mode.
This makes it seem that changes to Armature Custom Properties were perhaps missed in the Armature Edit Mode Undo Context.


Original Report
Video
Note when changing the head size in the redo panel, you can observe how the number of elements in in the Collection Property bones_for_delete grows.

  1. Execute the script generate_rig.py from the file, if you do not have automatic script execution enabled
  2. After execution, the Generate Rig panel will appear in the Rig category
  3. Select Empty.021 first, then Armature.001. Switch to armature editing mode, and click Generate Rig on the panel
  4. The bones will appear, and also the text on the panel will notify that there are elements in bones_for_delete. After that, you can scroll the head size on the redo panel, or simply undo the operator. the label in the panel will notify you that the number of items will not change
**System Information** Operating system: Ubuntu 20.04 Graphics card: Geforce MX230 **Blender Version** Broken: 3.5 Beta **Short description of error** Undo in Armature Edit Mode does not undo changes to Armature Custom Properties **Exact steps for others to reproduce the error** - [optionally] In default scene delete all objects - Add an "Armature" object - Go to `Edit Mode` - In `Object Data Properties` add a `Custom Property` - Change the value of the property (to for example `0.0`) in order to add an Undo step - Try undo (`Ctrl+Z`) The step is not undone in edit mode. Interestingly, changes to the Custom Properties of Bones are correctly undone in Edit mode. This makes it seem that changes to Armature Custom Properties were perhaps missed in the Armature Edit Mode Undo Context. --- **Original Report** [Video](https://youtu.be/3RZNWd5tRQI) Note when changing the **head size** in the redo panel, you can observe how the number of elements in in the Collection Property `bones_for_delete` grows. 1. Execute the script generate_rig.py from the file, if you do not have automatic script execution enabled 2. After execution, the Generate Rig panel will appear in the Rig category 3. Select Empty.021 first, then Armature.001. Switch to armature editing mode, and click Generate Rig on the panel 4. The bones will appear, and also the text on the panel will notify that there are elements in bones_for_delete. After that, you can scroll the **head size** on the redo panel, or simply undo the operator. the label in the panel will notify you that the number of items will not change
sanek122005 added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-03-13 20:37:39 +01:00

Thanks for the report, but I'm having trouble understanding the problem.
I didn't see any "bones_for_delete" notification, but I did see this error message:

Traceback (most recent call last):
  File "C:\Users\Germano Cavalcante\Downloads\kira.blend\generate_rig.py", line 124, in draw
AttributeError: 'NoneType' object has no attribute 'bones_for_delete'

Unfortunately the scenario described is too time consuming for us to track down, we require the bug reporter to narrow down the problem.

Normally .blend files can be simplified by removing most objects and disabling settings, until the problem reveals itself more clearly.

Thanks for the report, but I'm having trouble understanding the problem. I didn't see any "bones_for_delete" notification, but I did see this error message: ``` Traceback (most recent call last): File "C:\Users\Germano Cavalcante\Downloads\kira.blend\generate_rig.py", line 124, in draw AttributeError: 'NoneType' object has no attribute 'bones_for_delete' ``` Unfortunately the scenario described is too time consuming for us to track down, we require the bug reporter to narrow down the problem. Normally .blend files can be simplified by removing most objects and disabling settings, until the problem reveals itself more clearly.
Germano Cavalcante added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-03-14 19:45:53 +01:00
Author

that's how it should be. this error does not matter, when you switch to the armature, the label will appear

that's how it should be. this error does not matter, when you switch to the armature, the label will appear

Can you try to simplify the file and the script?

The presented Scene is complex and too time consuming for us to track down. Generally bug reports only need a few lines of a script to demonstrate an error.

Also the error message in the presented script can hinder the developer to investigate.

Can you try to simplify the file and the script? The presented Scene is complex and too time consuming for us to track down. Generally bug reports only need a few lines of a script to demonstrate an error. Also the error message in the presented script can hinder the developer to investigate.
Author

good. I simplified the scene. the culprit of the bug is the script. if you create the necessary structure from emptys, and run a script on them in a new file, the error will also be reproducible
take this file here. execute generate_rig.py , I made some edits. select Empty first, then the Armature object with the Shift clamped. next, enter the bone editing mode, click Generate Rig. then the operator can be undo, for example, the panel will show that the number of items in the collection will not roll back

good. I simplified the scene. the culprit of the bug is the script. if you create the necessary structure from emptys, and run a script on them in a new file, the error will also be reproducible take this file here. execute generate_rig.py , I made some edits. select Empty first, then the Armature object with the Shift clamped. next, enter the bone editing mode, click Generate Rig. then the operator can be undo, for example, the panel will show that the number of items in the collection will not roll back

Thanks for simplifying the file. Now I could understand the problem.

What happens is that the Edit Mode of Armatures has its own Undo context - "Edit Armature"

Unlike the "Global Undo" context, apparently the "Edit Armature" context does not consider the Custom Properties of the Armature.

(It should be noted however that the Custom Properties of the Bones are considered).

We need information from the Core team developers to define whether the lack of Undo for Custom Properties of Armatures in Editing Mode is really a bug. However, the steps are still too complex to confirm this report.

Would you mind if I edit the description to just contain the following steps?
"

  • In default scene, optionally delete all objects
  • Add an "Armature" object
  • Go to Edit Mode
  • In Object Data Properties add a Custom Property
  • Change the value of the property (to for example 0.0) in order to add an Undo step
  • Try undo (Ctrl+Z)

The step is not undone in edit mode.
Interestingly, changes to the Custom Properties of Bones are correctly undone in Edit mode.
This makes it seem that changes to Armature Custom Properties were perhaps missed in the Armature Edit Mode Undo Context.
"

Thanks for simplifying the file. Now I could understand the problem. What happens is that the Edit Mode of Armatures has its own Undo context - "Edit Armature" Unlike the "Global Undo" context, apparently the "Edit Armature" context does not consider the Custom Properties of the Armature. (It should be noted however that the Custom Properties of the Bones are considered). We need information from the Core team developers to define whether the lack of Undo for Custom Properties of Armatures in Editing Mode is really a bug. However, the steps are still too complex to confirm this report. Would you mind if I edit the description to just contain the following steps? " - In default scene, optionally delete all objects - Add an "Armature" object - Go to `Edit Mode` - In `Object Data Properties` add a `Custom Property` - Change the value of the property (to for example `0.0`) in order to add an Undo step - Try undo (`Ctrl+Z`) The step is not undone in edit mode. Interestingly, changes to the Custom Properties of Bones are correctly undone in Edit mode. This makes it seem that changes to Armature Custom Properties were perhaps missed in the Armature Edit Mode Undo Context. "
Author

Would you mind if I edit the description to just contain the following steps?

I absolutely don't mind

> Would you mind if I edit the description to just contain the following steps? I absolutely don't mind
Germano Cavalcante changed title from changes to CollectionProperty are not undone to Undo in Armature Edit Mode does not undo Custom Properties 2023-03-15 15:58:37 +01:00
Bastien Montagne added
Interest
Undo
Type
Known Issue
and removed
Type
Report
labels 2023-04-18 15:15:54 +02:00

Most likely another one of the gazillions of issues related to mixing memfile undo with non-memfile undo....

Most likely another one of the gazillions of issues related to mixing memfile undo with non-memfile undo....

Since Custom Properties of Bones works, I believe it would just be a matter of supporting Custom Properties of Armatures.
It's not a mixing of memfile undo and non-memfile undo because, apparently, memfile undo is not even triggered when editing a Custom Property in edit mode (only non-memfile undo).

Since `Custom Properties` of `Bones` works, I believe it would just be a matter of supporting `Custom Properties` of `Armatures`. It's not a mixing of memfile undo and non-memfile undo because, apparently, memfile undo is not even triggered when editing a Custom Property in edit mode (only non-memfile undo).
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#105744
No description provided.