Py API: bpy.data.orphans_purge incorrect argument parsing #89733

Closed
opened 2021-07-08 13:18:40 +02:00 by Yann Lanthony · 13 comments

System Information
Operating system: Windows-10

Blender Version
Broken: version: 2.93.1, branch: master, commit date: 2021-06-22 05:57, hash: 1b8d33b18c

Short description of error
Calling bpy.data.orphans_purge with arguments does not work as expected.
This seems related to how arguments for this function are parsed.
The proposed patch below fixes the issue.

fix_orphans_purge.diff

Exact steps for others to reproduce the error

  • Open Blender
  • Delete the default cube
  • In a console, run
bpy.data.orphans_purge(do_recursive=True)
# does nothing, outputs 0
bpy.data.orphans_purge()
# removes the mesh data, outputs 1
**System Information** Operating system: Windows-10 **Blender Version** Broken: version: 2.93.1, branch: master, commit date: 2021-06-22 05:57, hash: `1b8d33b18c` **Short description of error** Calling `bpy.data.orphans_purge` with arguments does not work as expected. This seems related to how arguments for this function are parsed. The proposed patch below fixes the issue. [fix_orphans_purge.diff](https://archive.blender.org/developer/F10217034/fix_orphans_purge.diff) **Exact steps for others to reproduce the error** * Open Blender * Delete the default cube * In a console, run ``` bpy.data.orphans_purge(do_recursive=True) # does nothing, outputs 0 bpy.data.orphans_purge() # removes the mesh data, outputs 1 ```
Author

Added subscriber: @yann-lty

Added subscriber: @yann-lty
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Thx for the fix!

However, I cannot even reproduce the problem :)
What could I be missing?
#89733.webm

Thx for the fix! However, I cannot even reproduce the problem :) What could I be missing? [#89733.webm](https://archive.blender.org/developer/F10217641/T89733.webm)
Author

Thanks for the feedback!
I just tried again with a clean Blender install on another machine that runs Windows and Linux.
And the problem seems to happen only on Windows, I failed to reproduce it on Linux too.

win10-#89733.webm

Thanks for the feedback! I just tried again with a clean Blender install on another machine that runs Windows and Linux. And the problem seems to happen only on Windows, I failed to reproduce it on Linux too. [win10-#89733.webm](https://archive.blender.org/developer/F10217718/win10-#89733.webm)
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'
Member

Can confirm on windows (2.93.2 9e64fd461a).

System Information

Graphics card : AMD Radeon(TM) 535 ATI Technologies .```
Can confirm on windows (2.93.2 `9e64fd461a`). **System Information** ```Operating system : Windows-10-10.0.18362-SP0 64 Bits Graphics card : AMD Radeon(TM) 535 ATI Technologies .```
Member

@yann-lty , thanks for the fix. Applying the patch fixes the issue on my side.

Please submit the .diff file here to get reviews from developers.

Also check Contributing_Code wiki page to understand the process :)

@yann-lty , thanks for the fix. Applying the patch fixes the issue on my side. Please submit the .diff file [here ](https://developer.blender.org/differential/diff/create/) to get reviews from developers. Also check [Contributing_Code ](https://wiki.blender.org/wiki/Process/Contributing_Code) wiki page to understand the process :)
Author

@PratikPB2123 Thanks for the update, I've just submitted the diff!

@PratikPB2123 Thanks for the update, I've just submitted the diff!

This issue was referenced by 59b77cd688

This issue was referenced by 59b77cd68848e56461c36287eba713079135f071

This issue was referenced by 574995478a

This issue was referenced by 574995478aca96d524fe2f34d555d3de64c0697e

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Bastien Montagne self-assigned this 2021-07-22 12:54:15 +02:00
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
5 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#89733
No description provided.