UIList filter_items doesn't reorder properly #64635

Closed
opened 2019-05-15 03:51:35 +02:00 by lexomir · 4 comments

System Information
Operating system: Windows 10
Graphics card: GTX 970m

Blender Version
Broken: 2.80, a5b5bd2c24, branch: blender2.7, 2019-05-14
Worked: (optional)

UIList.filter_items does not reorder items correctly for most cases.
image.png

Exact steps for others to reproduce the error
bugTest.blend
Just open this blend file and run the script.
The scenes should be in order ['Scene.002', 'Scene', 'Scene.001', 'Scene.003', 'Scene.004'], but they are not.

Or make a custom UIList and set some weird item order inside UIList.filter_items

**System Information** Operating system: Windows 10 Graphics card: GTX 970m **Blender Version** Broken: 2.80, a5b5bd2c24e0, branch: blender2.7, 2019-05-14 Worked: (optional) UIList.filter_items does not reorder items correctly for most cases. ![image.png](https://archive.blender.org/developer/F7037920/image.png) **Exact steps for others to reproduce the error** [bugTest.blend](https://archive.blender.org/developer/F7037912/bugTest.blend) Just open this blend file and run the script. The scenes should be in order ['Scene.002', 'Scene', 'Scene.001', 'Scene.003', 'Scene.004'], but they are not. Or make a custom UIList and set some weird item order inside UIList.filter_items
Author

Added subscriber: @lexomir

Added subscriber: @lexomir

Added subscriber: @mont29

Added subscriber: @mont29

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Bastien Montagne self-assigned this 2019-05-15 16:54:53 +02:00

This is working exactly as expected, in your example first item is moved to third place, second item is moved to first place, third to second, etc. Again, this is a mapping (from index in array to value in array) old_idx -> new_idx. Not a mapping new_idx -> old_idx...

This is working exactly as expected, in your example first item is moved to third place, second item is moved to first place, third to second, etc. Again, this is a mapping (from index in array to value in array) `old_idx -> new_idx`. Not a mapping `new_idx -> old_idx`...
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
2 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#64635
No description provided.