Incorrect Attribute Naming Convention in Blender 4.0: Spaces Instead of Underscores #113981

Closed
opened 2023-10-20 20:40:08 +02:00 by BimanBordoloi-1 · 5 comments

System Information
Operating system: Windows 11
Graphics card: Nvidia GeForce RTX 4070 Ti

Blender Version
Broken: 4.0.0, beta
Worked: version: 4.0.0 Beta, branch: blender-v4.0-release, commit date: 2023-10-18 20:17, hash: e11f031d62cc
Worked: 3.6.2

Short description of error
When using bpy.data.libraries.load(filepath=path/to/file) in Blender 4.0, attribute names in data_to lack underscores and use spaces, deviating from the established snake_case naming convention. This inconsistency can lead to script errors and confusion.

Exact steps for others to reproduce the error
Run the below code snippet inside blender 4.0.0 text editor. Replace filepath with actual path to a blend file. In the console you can see all the atttributes including attributes with spaces instead of _

import bpy

filepath = "path/to/blend/file"

with bpy.data.libraries.load(filepath=filepath) as (
    data_from,
    data_to,
):
    for attr in dir(data_to):
        print(attr)
        
        
**System Information** Operating system: Windows 11 Graphics card: Nvidia GeForce RTX 4070 Ti **Blender Version** Broken: 4.0.0, beta Worked: version: 4.0.0 Beta, branch: blender-v4.0-release, commit date: 2023-10-18 20:17, hash: `e11f031d62cc` Worked: 3.6.2 **Short description of error** When using `bpy.data.libraries.load(filepath=path/to/file)` in Blender 4.0, attribute names in data_to lack underscores and use spaces, deviating from the established snake_case naming convention. This inconsistency can lead to script errors and confusion. **Exact steps for others to reproduce the error** Run the below code snippet inside blender 4.0.0 text editor. Replace filepath with actual path to a blend file. In the console you can see all the atttributes including attributes with spaces instead of `_` ``` import bpy filepath = "path/to/blend/file" with bpy.data.libraries.load(filepath=filepath) as ( data_from, data_to, ): for attr in dir(data_to): print(attr) ```
BimanBordoloi-1 added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-10-20 20:40:09 +02:00

Confirmed, seems to have changed in the past few days... looking.

Confirmed, seems to have changed in the past few days... looking.
Jesse Yurkovich added
Module
Core
Priority
High
Status
Confirmed
and removed
Priority
Normal
Status
Needs Triage
labels 2023-10-22 06:10:36 +02:00

Caused by e3fc935349.

CC @pioverfour This commit causes problem with python scripts with the rename from node_groups to node groups etc. See example from #114019 as well.

Caused by e3fc93534949d829190da12f54efee653dff4301. CC @pioverfour This commit causes problem with python scripts with the rename from `node_groups` to `node groups` etc. See example from #114019 as well.
Member

@deadpin Hi, thanks for letting me know. I opened a PR at !114030, is this something you could review?

@deadpin Hi, thanks for letting me know. I opened a PR at !114030, is this something you could review?

Yikes, how could I miss that! Thanks for the quick fix!

Yikes, how could I miss that! Thanks for the quick fix!
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-10-23 12:05:41 +02:00

Fix committed, builders kicked.

Fix committed, builders kicked.
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
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#113981
No description provided.