Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/modules/bpy_types.py
| Show First 20 Lines • Show All 538 Lines • ▼ Show 20 Lines | def factory(self): | ||||
| """The aud.Factory object of the sound.""" | """The aud.Factory object of the sound.""" | ||||
| import aud | import aud | ||||
| return aud._sound_from_pointer(self.as_pointer()) | return aud._sound_from_pointer(self.as_pointer()) | ||||
| class RNAMeta(type): | class RNAMeta(type): | ||||
| def __new__(cls, name, bases, classdict, **args): | def __new__(cls, name, bases, classdict, **args): | ||||
| result = type.__new__(cls, name, bases, classdict) | result = type.__new__(cls, name, bases, classdict) | ||||
| # BEGIN TEST | |||||
| # | |||||
| # This will be removed, it just avoids having to patch all add-ons. | |||||
| import _bpy as _hack_module | |||||
| addon = getattr(_hack_module, "_addon_current_hack", None) | |||||
| print(addon, name) | |||||
| if addon is not None: | |||||
| result.bl_ui_tag = addon | |||||
| # END TEST | |||||
| if bases and bases[0] is not StructRNA: | if bases and bases[0] is not StructRNA: | ||||
| from _weakref import ref as ref | from _weakref import ref as ref | ||||
| module = result.__module__ | module = result.__module__ | ||||
| # first part of packages only | # first part of packages only | ||||
| if "." in module: | if "." in module: | ||||
| module = module[:module.index(".")] | module = module[:module.index(".")] | ||||
| ▲ Show 20 Lines • Show All 426 Lines • Show Last 20 Lines | |||||