Most aud
Python module instance methods are documented as classmethods #108245
Labels
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
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#108245
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 531.41
Blender Version
Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-05-24 15:26, hash:
9acff4edabe5
Worked: (newest version of Blender that worked as expected)
Short description of error
The
aud
module contains a number of classes that have their own functions. These functions have been documented asclassmethod
, implying that an instance of the class is not needed to call the function (e.g.aud.Device.lock()
), however, most of the functions do need an instance of the class to be called because they are actually instance methods (e.g.my_device.lock()
or less commonaud.Device.lock(my_device)
).Exact steps for others to reproduce the error
The current documentation for the
aud
module can be found at https://docs.blender.org/api/current/aud.htmlFor a single example, run the following lines in the Python console:
import aud
print(aud.Device.lock.__doc__)
aud.Device.lock()
TypeError
occurs because the function is actually an unbound instance method and requires an instance to be passed as the first argument when called directly like this. If this function was aclassmethod
aud.Device
would have been bound to the first argument automatically.The below script can be run from the Text Editor to print to the console each function of a class in the
aud
module that claims to be aclassmethod
and whether this is actually the case:I had a look through the source for
aud
and it looks like this documentation is coming from within extern/audaspace, so I'm not sure if I should be reporting this on https://github.com/neXyon/audaspace instead?It seems that the audaspace bug tracker is the recommended one now. As we can see in the link:
But I will confirm in this tracker too for now.
@neXyon ^
Fixed!