forked from LeenkxTeam/LNXSDK
Consolidate and update
This commit is contained in:
@ -123,6 +123,8 @@ def set_socket_default(socket: NodeSocket, value: Any):
|
||||
"""Set the socket's default value if it exists."""
|
||||
if isinstance(socket, lnx.logicnode.lnx_sockets.LnxCustomSocket):
|
||||
if socket.lnx_socket_type != 'NONE':
|
||||
if socket.lnx_socket_type == 'INT' and isinstance(value, float):
|
||||
value = int(value)
|
||||
socket.default_value_raw = value
|
||||
|
||||
# Shader-type sockets don't have a default value
|
||||
|
||||
Reference in New Issue
Block a user