MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / create_socket

Function create_socket

src/ifcsverchok/helper.py:120–139  ·  view source on GitHub ↗
(
    inputs_or_outputs: Union[bpy.types.NodeInputs, bpy.types.NodeOutputs],
    name: str,
    *,
    description: str = "",
    data_type: str = "",
    prop_name: str = "",
    socket_type: type[T_socket] = sverchok.core.sockets.SvStringsSocket,
)

Source from the content-addressed store, hash-verified

118
119
120def create_socket(
121 inputs_or_outputs: Union[bpy.types.NodeInputs, bpy.types.NodeOutputs],
122 name: str,
123 *,
124 description: str = "",
125 data_type: str = "",
126 prop_name: str = "",
127 socket_type: type[T_socket] = sverchok.core.sockets.SvStringsSocket,
128) -> T_socket:
129 socket = inputs_or_outputs.new(socket_type.bl_idname, name)
130 assert isinstance(socket, socket_type)
131
132 if data_type:
133 data_type = f"Type: `{data_type}`."
134 description = "\n\n".join(filter(None, [description, data_type]))
135 socket.description = description
136
137 if prop_name:
138 socket.prop_name = prop_name
139 return socket
140
141
142def get_file() -> ifcopenshell.file:

Callers

nothing calls this directly

Calls 3

newMethod · 0.80
filterFunction · 0.50
joinMethod · 0.45

Tested by

no test coverage detected