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()
예제 #4
0
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()
예제 #6
0
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()
예제 #7
0
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()
예제 #9
0
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()
예제 #12
0
	def update(self):
		nodeTreeChanged()
예제 #13
0
	def updateCallerNodes(self, socketStartValue = (None, None)):
		nodes = getNodesFromTypeWithAttribute("mn_LoopCallerNode", "selectedLoop", self.loopName)
		for node in nodes:
			node.updateSockets(self, socketStartValue)
		nodeTreeChanged()
예제 #14
0
def updateNode(node, context):
	self.setHideProperty()
	nodeTreeChanged()
예제 #15
0
def updateNode(node, context):
	nodeTreeChanged()
예제 #16
0
 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()
예제 #18
0
def updateNode(node, context):
    nodeTreeChanged()
예제 #19
0
	def usePropertyChanged(self, context):
		self.setHideProperty()
		nodeTreeChanged()
예제 #20
0
 def update(self):
     nodeTreeChanged()
예제 #21
0
def updateNode(node, context):
    self.setHideProperty()
    nodeTreeChanged()