Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions NodeToPython/ntp_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,14 @@ def _create_socket(self, socket: NodeTreeInterfaceSocket,
f"socket_type = {socket_type}"
f"{optional_parent_str})")

# vector dimensions
if hasattr(socket, "dimensions"):
dimensions = socket.dimensions
if socket.dimensions != 3:
self._write(f"{socket_var}.dimensions = {dimensions}")
self._write("# Get the socket again, as its default value could have been updated")
self._write(f"{socket_var} = {ntp_nt.var}.interface.items_tree[{socket_var}.index]")

self._set_tree_socket_defaults(socket, socket_var)

# subtype
Expand Down