Blender 2.8 - 4.5 Support

This commit is contained in:
2025-09-28 12:44:04 -07:00
parent 8f8d4b1376
commit f97d8fd846
34 changed files with 581 additions and 399 deletions

View File

@ -1,5 +1,5 @@
import collections.abc
from typing import Any, Generator, Optional, Type, Union
from typing import Any, Generator, Optional, Type, Tuple, Union
import bpy
import mathutils
@ -49,7 +49,7 @@ def iter_nodes_by_type(node_group: bpy.types.NodeTree, ntype: str) -> Generator[
yield node
def input_get_connected_node(input_socket: bpy.types.NodeSocket) -> tuple[Optional[bpy.types.Node], Optional[bpy.types.NodeSocket]]:
def input_get_connected_node(input_socket: bpy.types.NodeSocket) -> Tuple[Optional[bpy.types.Node], Optional[bpy.types.NodeSocket]]:
"""Get the node and the output socket of that node that is connected
to the given input, while following reroutes. If the input has
multiple incoming connections, the first one is followed. If the
@ -70,7 +70,7 @@ def input_get_connected_node(input_socket: bpy.types.NodeSocket) -> tuple[Option
return from_node, link.from_socket
def output_get_connected_node(output_socket: bpy.types.NodeSocket) -> tuple[Optional[bpy.types.Node], Optional[bpy.types.NodeSocket]]:
def output_get_connected_node(output_socket: bpy.types.NodeSocket) -> Tuple[Optional[bpy.types.Node], Optional[bpy.types.NodeSocket]]:
"""Get the node and the input socket of that node that is connected
to the given output, while following reroutes. If the output has
multiple outgoing connections, the first one is followed. If the
@ -152,7 +152,7 @@ def get_export_node_name(node: bpy.types.Node) -> str:
return '_' + lnx.utils.safesrc(node.name)
def get_haxe_property_names(node: bpy.types.Node) -> Generator[tuple[str, str], None, None]:
def get_haxe_property_names(node: bpy.types.Node) -> Generator[Tuple[str, str], None, None]:
"""Generator that yields the names of all node properties that have
a counterpart in the node's Haxe class.
"""