45 lines
945 B
Python
45 lines
945 B
Python
|
import typing as typ
|
||
|
|
||
|
import bpy
|
||
|
import pydantic as pyd
|
||
|
import tidy3d as td
|
||
|
|
||
|
from .. import base
|
||
|
from ... import contracts
|
||
|
|
||
|
class MaxwellBoundFaceBLSocket(base.BLSocket):
|
||
|
socket_type = contracts.SocketType.MaxwellBoundFace
|
||
|
bl_label = "Maxwell Bound Face"
|
||
|
|
||
|
compatible_types = {
|
||
|
td.BoundarySpec: {}
|
||
|
}
|
||
|
|
||
|
####################
|
||
|
# - Computation of Default Value
|
||
|
####################
|
||
|
@property
|
||
|
def default_value(self) -> td.BoundarySpec:
|
||
|
return td.BoundarySpec()
|
||
|
|
||
|
@default_value.setter
|
||
|
def default_value(self, value: typ.Any) -> None:
|
||
|
return None
|
||
|
|
||
|
####################
|
||
|
# - Socket Configuration
|
||
|
####################
|
||
|
class MaxwellBoundFaceSocketDef(pyd.BaseModel):
|
||
|
socket_type: contracts.SocketType = contracts.SocketType.MaxwellBoundFace
|
||
|
label: str
|
||
|
|
||
|
def init(self, bl_socket: MaxwellBoundFaceBLSocket) -> None:
|
||
|
pass
|
||
|
|
||
|
####################
|
||
|
# - Blender Registration
|
||
|
####################
|
||
|
BL_REGISTER = [
|
||
|
MaxwellBoundFaceBLSocket,
|
||
|
]
|