private void UpdateSocketList() { _sockets.Clear(); if (target == null || !target.IsValid()) { selectlist.Clear(); selectset.Clear(); return; } List <int> socket; if (_is_edge) { socket = target.GetEdgeSocketList(_invx, _invy, _axilist.index); } else { socket = target.GetFaceSocketList(_invx, _invy, _axilist.index); } if (socket == null) { selectlist.Clear(); selectset.Clear(); return; } for (int k = 0; k < socket.Count; k++) { _sockets.Add(socket[k]); } }
public void UpdatePrimarySocketSelection(bool invx, bool invy, bool is_edge, int axi_index, List <int> selectlist) { if (_vertexmode != VertexMode.PrimarySelect && _vertexmode != VertexMode.PrimarySecondarySelet) { return; } _primarytset.Clear(); _primarylist.Clear(); if (target == null || !target.IsValid()) { return; } List <int> socket; if (is_edge) { socket = target.GetEdgeSocketList(invx, invy, axi_index); } else { socket = target.GetFaceSocketList(invx, invy, axi_index); } if (selectlist == null || socket == null) { return; } for (int k = 0; k < selectlist.Count; k++) { int select_index = selectlist[k]; if (select_index < 0 || select_index >= socket.Count) { continue; } int vertex_index = socket[select_index]; if (_primarytset.Add(vertex_index)) { _primarylist.Add(vertex_index); } } }