Wierd behaviour on UI List update on baked action #121307

Closed
opened 2024-05-01 16:26:59 +02:00 by blenderboi · 12 comments

System Information
Operating system: Linux-6.8.7-arch1-2-x86_64-with-glibc2.39 64 Bits, WAYLAND UI
Graphics card: Mesa Intel(R) UHD Graphics 630 (CFL GT2) Intel 4.6 (Core Profile) Mesa 24.0.6-arch1.2

Blender Version
Broken: version: version: 4.1.1, branch: blender-v4.1-release, commit date: 2024-04-15 15:11, hash: e1743a0317bc
Worked: (newest version of Blender that worked as expected)

Short description of error
I encounter a very wierd problem, after baked my actions with anim_utils baking function, the actions become "bugged out" when use in very specific way in script

when I have a property group with a pointer property pointing to Action type, when use with collection property and UIList, and if I use update function for index on the UIList, if i change the action to the "bugged out" action, when I click in UI list, it will act unexpectedly

Exact steps for others to reproduce the error

here is the step

  1. Download and open the Blend Flle
  2. Run the Script in the Blend File
  3. Go to Properties -> Object -> UIList Panel
    ---- Problem here ----
  4. Click each Item in the list, the expected behaviour is that the object should switch its action to the action in the list and the active index should be the clicked slot, but the active index behave unpredictably
  5. Try changing up the action in the list, or adding more item to the list and click around, this only happen on some of the action
  6. The Action that have problem are baked using function from bpy_extras.anim_utils

You can refer to the attached video for more context

**System Information** Operating system: Linux-6.8.7-arch1-2-x86_64-with-glibc2.39 64 Bits, WAYLAND UI Graphics card: Mesa Intel(R) UHD Graphics 630 (CFL GT2) Intel 4.6 (Core Profile) Mesa 24.0.6-arch1.2 **Blender Version** Broken: version: version: 4.1.1, branch: blender-v4.1-release, commit date: 2024-04-15 15:11, hash: `e1743a0317bc` Worked: (newest version of Blender that worked as expected) **Short description of error** I encounter a very wierd problem, after baked my actions with anim_utils baking function, the actions become "bugged out" when use in very specific way in script when I have a property group with a pointer property pointing to Action type, when use with collection property and UIList, and if I use update function for index on the UIList, if i change the action to the "bugged out" action, when I click in UI list, it will act unexpectedly **Exact steps for others to reproduce the error** here is the step 1. Download and open the Blend Flle 2. Run the Script in the Blend File 3. Go to Properties -> Object -> UIList Panel ---- Problem here ---- 4. Click each Item in the list, the expected behaviour is that the object should switch its action to the action in the list and the active index should be the clicked slot, but the active index behave unpredictably 5. Try changing up the action in the list, or adding more item to the list and click around, this only happen on some of the action 6. The Action that have problem are baked using function from bpy_extras.anim_utils You can refer to the attached video for more context
blenderboi added the
Severity
Normal
Status
Needs Triage
Type
Report
labels 2024-05-01 16:27:00 +02:00

Please write out the steps to reproduce. It is much more time-consuming to watch a video, pause it, scrub back & forth, etc. than it is to read some text.

Also videos cannot be indexed by the search engine, so people won't be able to find your description when searching for it.

the actions become "bugged out"

It would help to have a more objective description of the issue.

when use in very specific way in script

It would help to know what this specific way is.

Please write out the steps to reproduce. It is much more time-consuming to watch a video, pause it, scrub back & forth, etc. than it is to read some text. Also videos cannot be indexed by the search engine, so people won't be able to find your description when searching for it. > the actions become "bugged out" It would help to have a more objective description of the issue. > when use in very specific way in script It would help to know what this specific way is.
Member

:) Already asked him to write out the steps, he said he will.

:) Already asked him to write out the steps, he said he will.
Author

Sorry for the trouble

here is the step

  1. Download and open the Blend Flle
  2. Run the Script in the Blend File
  3. Go to Properties -> Object -> UIList Panel
    ---- Problem here ----
  4. Click each Item in the list, the expected behaviour is that the object should switch its action to the action in the list and the active index should be the clicked slot, but the active index behave unpredictably
  5. Try changing up the action in the list, or adding more item to the list and click around, this only happen on some of the action
  6. The Action that have problem are baked using function from bpy_extras.anim_utils

I hope that is descriptive enough

Sorry for the trouble here is the step 1. Download and open the Blend Flle 2. Run the Script in the Blend File 3. Go to Properties -> Object -> UIList Panel ---- Problem here ---- 4. Click each Item in the list, the expected behaviour is that the object should switch its action to the action in the list and the active index should be the clicked slot, but the active index behave unpredictably 5. Try changing up the action in the list, or adding more item to the list and click around, this only happen on some of the action 6. The Action that have problem are baked using function from bpy_extras.anim_utils I hope that is descriptive enough

It took some digging, but I found the culprit. Baking the custom properties also bakes the current value of object.action_settings_index. So switching to the baked action will immediately switch back to whatever was assigned to action_settings_index at the time of baking. Action1 also animated that property, so switching to that one will also potentially cause an immediate switch to another slot.

This is not an issue with Blender. Hope the analysis helps ;-)

It took some digging, but I found the culprit. Baking the custom properties also bakes the current value of `object.action_settings_index`. So switching to the baked action will immediately switch back to whatever was assigned to `action_settings_index` at the time of baking. `Action1` also animated that property, so switching to that one will also potentially cause an immediate switch to another slot. This is not an issue with Blender. Hope the analysis helps ;-)
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2024-05-02 12:18:23 +02:00
Author

Ahh, Thank you very much

Ahh, Thank you very much
Author

If the Property is do not have {"ANIMATABLE"} and bake action bake that property, would that be consider a bug?

If the Property is do not have {"ANIMATABLE"} and bake action bake that property, would that be consider a bug?

I'd say so, yes. Please report :)

I'd say so, yes. Please report :)

I think {"ANIMATABLE"} is the default

I think {"ANIMATABLE"} is the default

Hence the request for a separate bug report (because it's another issue) -- then we can also double-check that the properties in question really have that flag explicitly cleared, and we have a clear example file that we can use as a basis for automated tests to prevent this from happening in the future.

Hence the request for a separate bug report (because it's another issue) -- then we can also double-check that the properties in question really have that flag explicitly cleared, and we have a clear example file that we can use as a basis for automated tests to prevent this from happening in the future.
Member

This thread by the way is a great example of why it is important to properly log something, to the follow up work and then continue to explore until it is resolved to help everyone.

This thread by the way is a great example of why it is important to properly log something, to the follow up work and then continue to explore until it is resolved to help everyone.
Author

#121349

I Already made the separate bug report, not sure if I should share it here

Sometimes i'm a little hesitant to post bug report as I can't tell if its a expected behaviour, or a bug, or just purely my mistake

https://projects.blender.org/blender/blender/issues/121349 I Already made the separate bug report, not sure if I should share it here Sometimes i'm a little hesitant to post bug report as I can't tell if its a expected behaviour, or a bug, or just purely my mistake

@blenderboi2018 if you think it's a bug, it's usually best to just report it as one. It's easy to close a report as duplicate of another, but it's much harder to disentangle a single report that's actually trying to discuss multiple issues at the same time.

And also you're always welcome in #animation-module on Blender Chat to check whether the issue you're facing is really a bug report. If it's simple to answer you'll get an answer, and sometimes the answer might be "please report it so that we can have a better look" :)

@blenderboi2018 if you think it's a bug, it's usually best to just report it as one. It's easy to close a report as duplicate of another, but it's much harder to disentangle a single report that's actually trying to discuss multiple issues at the same time. And also you're always welcome in [#animation-module on Blender Chat](https://blender.chat/channel/animation-module) to check whether the issue you're facing is really a bug report. If it's simple to answer you'll get an answer, and sometimes the answer might be "please report it so that we can have a better look" :)
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
4 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#121307
No description provided.