def updateCallerNodes(self, socketStartValue = (None, None)): for node in self.id_data.nodes: if node.bl_idname == "mn_LoopNode": if node.selectedLoop == self.loopName: node.updateSockets(self, socketStartValue) nodeTreeChanged()
def newInputSocket(self): forbidCompiling() newSocketName = str(len(self.inputs)) + "." newSocket = self.inputs.new("mn_StringSocket", newSocketName) self.inputs.move(len(self.inputs) - 1, len(self.inputs) - 2) allowCompiling() nodeTreeChanged()
def updateCallerNodes(self, socketStartValue = (None, None)): for node in self.id_data.nodes: if node.bl_idname == "mn_LoopNode": if node.selectedLoop == self.loopName: node.updateSockets(self, socketStartValue) nodeTreeChanged()
def customNameChanged(self, context): if not self.customNameIsUpdating: self.customNameIsUpdating = True if self.customNameIsVariable: newCustomName = "" for char in self.customName: if char.isalpha(): newCustomName += char self.customName = newCustomName self.customNameIsUpdating = False if self.callNodeWhenCustomNameChanged: self.node.customSocketNameChanged(self) nodeTreeChanged()
def rebuildSockets(callerNode): forbidCompiling() connections = getConnectionDictionaries(callerNode) callerNode.removeDynamicSockets() startNode = callerNode.getStartNode() if startNode is not None: for socket in startNode.sockets: callerNode.inputs.new(socket.socketType, socket.socketName) callerNode.outputs.new(socket.socketType, socket.socketName) tryToSetConnectionDictionaries(callerNode, connections) allowCompiling() nodeTreeChanged()
def updateNode(node, context): singleInputOperations = [ "SINE", "COSINE", "TANGENT", "ARCSINE", "ARCCOSINE", "ARCTANGENT", "ABSOLUTE" ] if node.mathTypesProperty in singleInputOperations and not node.inputs[ -1].hide: node.inputs[-1].hide = True elif node.mathTypesProperty not in singleInputOperations and node.inputs[ -1].hide: node.inputs[-1].hide = False nodeTreeChanged()
def customNameChanged(self, context): if not self.customNameIsUpdating: self.customNameIsUpdating = True if self.customNameIsVariable: newCustomName = "" for char in self.customName: if char.isalpha(): newCustomName += char self.customName = newCustomName self.customNameIsUpdating = False if self.callNodeWhenCustomNameChanged: self.node.customSocketNameChanged(self) nodeTreeChanged()
def updateNode(node, context): singleInputOperations = ["SINE", "COSINE", "TANGENT", "ARCSINE", "ARCCOSINE", "ARCTANGENT", "ABSOLUTE"] if node.mathTypesProperty in singleInputOperations and not node.inputs[-1].hide: node.inputs[-1].hide = True elif node.mathTypesProperty not in singleInputOperations and node.inputs[-1].hide: node.inputs[-1].hide = False nodeTreeChanged()
def customNameChanged(self, context): if not self.customNameIsUpdating: self.customNameIsUpdating = True if self.customNameIsVariable: newCustomName = "" for char in self.customName: if char.isalpha(): newCustomName += char self.customName = newCustomName if self.uniqueCustomName: customName = self.customName self.customName = "temporary name to avoid some errors" self.customName = getNotUsedCustomName(self.node, prefix = customName) if self.callNodeWhenCustomNameChanged: self.node.customSocketNameChanged(self) self.customNameIsUpdating = False nodeTreeChanged()
def selectedSocketChanged(self, context): self.socketIsChanging = True self.setInputSocket() self.socketIsChanging = False nodeTreeChanged()
def selectedSocketChanged(self, context): self.socketIsChanging = True self.setInputSocket() self.socketIsChanging = False nodeTreeChanged()
def update(self): nodeTreeChanged()
def updateCallerNodes(self, socketStartValue = (None, None)): nodes = getNodesFromTypeWithAttribute("mn_LoopCallerNode", "selectedLoop", self.loopName) for node in nodes: node.updateSockets(self, socketStartValue) nodeTreeChanged()
def updateNode(node, context): self.setHideProperty() nodeTreeChanged()
def updateNode(node, context): nodeTreeChanged()
def inputAmountChanged(self, context): self.inputs.clear() self.setInputSockets() nodeTreeChanged()
def removeInputSocket(self): forbidCompiling() if len(self.inputs) > 2: self.inputs.remove(self.inputs[len(self.inputs) - 2]) allowCompiling() nodeTreeChanged()
def updateNode(node, context): nodeTreeChanged()
def usePropertyChanged(self, context): self.setHideProperty() nodeTreeChanged()
def update(self): nodeTreeChanged()
def updateNode(node, context): self.setHideProperty() nodeTreeChanged()