diff options
Diffstat (limited to 'release/scripts/modules/bpy_types.py')
-rw-r--r-- | release/scripts/modules/bpy_types.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index a32feda5d0c..11e1115fa4c 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -484,6 +484,15 @@ class Text(bpy_types.ID): if cont.type == 'PYTHON'] ) +class NodeSocket(StructRNA): # , metaclass=RNAMeta + __slots__ = () + + @property + def links(self): + """List of node links from or to this socket""" + return tuple(link for link in self.id_data.links if link.from_socket == self or link.to_socket == self) + + # values are module: [(cls, path, line), ...] TypeMap = {} @@ -717,12 +726,3 @@ class Menu(StructRNA, _GenericUI, metaclass=RNAMeta): self.path_menu(bpy.utils.preset_paths(self.preset_subdir), self.preset_operator, filter_ext=lambda ext: ext.lower() in {".py", ".xml"}) - - -class NodeSocket(StructRNA, metaclass=RNAMeta): - __slots__ = () - - @property - def links(self): - """List of node links from or to this socket""" - return [link for link in self.id_data.links if link.from_socket == self or link.to_socket == self] |