diff --git a/logicnode_definitions/Template.py b/logicnode_definitions/Template.py index ae74720..4b7cfc4 100644 --- a/logicnode_definitions/Template.py +++ b/logicnode_definitions/Template.py @@ -10,7 +10,7 @@ # bl_icon = 'QUESTION' # def init(self, context): -# self.inputs.new('', '') -# self.outputs.new('', '') +# self.add_input('', '') +# self.add_output('', '') # add_node(, category='') diff --git a/logicnode_definitions/action_camera_controller.py b/logicnode_definitions/action_camera_controller.py index 9fd67e2..22120b6 100644 --- a/logicnode_definitions/action_camera_controller.py +++ b/logicnode_definitions/action_camera_controller.py @@ -11,37 +11,31 @@ class CameraController(ArmLogicTreeNode): bl_icon = 'QUESTION' def init(self, context): - self.outputs.new('ArmNodeSocketAction', 'Out') - - self.inputs.new('ArmNodeSocketAction', 'Activate') - - self.inputs.new('ArmNodeSocketObject', 'Player Object') - self.inputs[-1].default_value = 'Player' - - self.inputs.new('ArmNodeSocketObject', 'Camera Object') - self.inputs[-1].default_value = 'Camera' - - self.inputs.new('NodeSocketFloat', 'Speed Modifier') - self.inputs[-1].default_value = 1.0 - self.inputs.new('NodeSocketBool', 'Additional Modifier (e.g. sniper)') - self.inputs.new('NodeSocketFloat', 'Modifier') - self.inputs[-1].default_value = 0.25 - self.inputs.new('NodeSocketBool', 'Invert Horizontal') - self.inputs.new('NodeSocketBool', 'Invert Vertical') - - self.inputs.new('NodeSocketFloat', 'Horizontal Axis Movement') - self.inputs.new('NodeSocketFloat', 'Horizontal Speed') - self.inputs[-1].default_value = 1.0 - self.inputs.new('NodeSocketBool', 'Restrict Horizontal') - self.inputs.new('NodeSocketFloat', 'hMin (Radians)') - self.inputs.new('NodeSocketFloat', 'hMax (Radians)') - - self.inputs.new('NodeSocketFloat', 'Vertical Axis Movement') - self.inputs.new('NodeSocketFloat', 'Vertical Speed') - self.inputs[-1].default_value = 1.0 - self.inputs.new('NodeSocketBool', 'Restrict Vertical') - self.inputs.new('NodeSocketFloat', 'vMin (Radians)') - self.inputs.new('NodeSocketFloat', 'vMax (Radians)') + self.add_output('ArmNodeSocketAction', 'Out') + + self.add_input('ArmNodeSocketAction', 'Activate') + + self.add_input('ArmNodeSocketObject', 'Player Object', default_value='Player') + + self.add_input('ArmNodeSocketObject', 'Camera Object', default_value='Camera') + + self.add_input('NodeSocketFloat', 'Speed Modifier', default_value=1.0) + self.add_input('NodeSocketBool', 'Additional Modifier (e.g. sniper)') + self.add_input('NodeSocketFloat', 'Modifier', default_value=0.25) + self.add_input('NodeSocketBool', 'Invert Horizontal') + self.add_input('NodeSocketBool', 'Invert Vertical') + + self.add_input('NodeSocketFloat', 'Horizontal Axis Movement') + self.add_input('NodeSocketFloat', 'Horizontal Speed', default_value=1.0) + self.add_input('NodeSocketBool', 'Restrict Horizontal') + self.add_input('NodeSocketFloat', 'hMin (Radians)') + self.add_input('NodeSocketFloat', 'hMax (Radians)') + + self.add_input('NodeSocketFloat', 'Vertical Axis Movement') + self.add_input('NodeSocketFloat', 'Vertical Speed', default_value=1.0) + self.add_input('NodeSocketBool', 'Restrict Vertical') + self.add_input('NodeSocketFloat', 'vMin (Radians)') + self.add_input('NodeSocketFloat', 'vMax (Radians)') add_node(CameraController, category='Action') diff --git a/logicnode_definitions/action_look.py b/logicnode_definitions/action_look.py index 6a16b47..0ea2644 100644 --- a/logicnode_definitions/action_look.py +++ b/logicnode_definitions/action_look.py @@ -10,13 +10,13 @@ class LookNode(ArmLogicTreeNode): bl_icon = 'QUESTION' def init(self, context): - self.inputs.new('ArmNodeSocketAction', 'In') - self.inputs.new('ArmNodeSocketObject', 'Object') - self.inputs.new('NodeSocketVector', 'Vector') - self.inputs.new('NodeSocketBool', 'Look Y') - self.inputs.new('NodeSocketBool', 'Look Z') - self.inputs.new('NodeSocketFloat', 'Minimum') - self.inputs.new('NodeSocketFloat', 'Maximum') - self.outputs.new('ArmNodeSocketAction', 'Out') + self.add_input('ArmNodeSocketAction', 'In') + self.add_input('ArmNodeSocketObject', 'Object') + self.add_input('NodeSocketVector', 'Vector') + self.add_input('NodeSocketBool', 'Look Y') + self.add_input('NodeSocketBool', 'Look Z') + self.add_input('NodeSocketFloat', 'Minimum') + self.add_input('NodeSocketFloat', 'Maximum') + self.add_output('ArmNodeSocketAction', 'Out') add_node(LookNode, category='Action') diff --git a/logicnode_definitions/action_looking_at.py b/logicnode_definitions/action_looking_at.py index 9b9dd55..fdb03ee 100644 --- a/logicnode_definitions/action_looking_at.py +++ b/logicnode_definitions/action_looking_at.py @@ -10,22 +10,22 @@ class LookingAtNode(ArmLogicTreeNode): bl_icon = 'QUESTION' def init(self, context): - self.inputs.new('NodeSocketVector', 'From Position') - self.inputs.new('NodeSocketVector', 'To Position') - self.inputs.new('NodeSocketVector', 'Front Facing') + self.add_input('NodeSocketVector', 'From Position') + self.add_input('NodeSocketVector', 'To Position') + self.add_input('NodeSocketVector', 'Front Facing') self.inputs[-1].default_value = [1, 0, 0] - self.inputs.new('NodeSocketVector', 'Main Rotation Axis') + self.add_input('NodeSocketVector', 'Main Rotation Axis') self.inputs[-1].default_value = [0, 0, 1] - self.inputs.new('NodeSocketBool', 'Disable Primary Roatation') - self.inputs.new('NodeSocketBool', 'Disable Secodary Roatation') - self.inputs.new('NodeSocketBool', 'Restrict Primary Rotation') - self.inputs.new('NodeSocketFloat', 'min Primary Rotation') - self.inputs.new('NodeSocketFloat', 'max Primary Rotation') - self.inputs.new('NodeSocketBool', 'Restrict Secondary Rotation') - self.inputs.new('NodeSocketFloat', 'min Secondary Rotation') - self.inputs.new('NodeSocketFloat', 'max Secondary Rotation') - self.outputs.new('NodeSocketVector', 'Rotation (Euler)') - self.outputs.new('NodeSocketVector', 'Rotation (Quat)') - self.outputs.new('NodeSocketBool', 'Is in field of view') + self.add_input('NodeSocketBool', 'Disable Primary Roatation') + self.add_input('NodeSocketBool', 'Disable Secodary Roatation') + self.add_input('NodeSocketBool', 'Restrict Primary Rotation') + self.add_input('NodeSocketFloat', 'min Primary Rotation') + self.add_input('NodeSocketFloat', 'max Primary Rotation') + self.add_input('NodeSocketBool', 'Restrict Secondary Rotation') + self.add_input('NodeSocketFloat', 'min Secondary Rotation') + self.add_input('NodeSocketFloat', 'max Secondary Rotation') + self.add_output('NodeSocketVector', 'Rotation (Euler)') + self.add_output('NodeSocketVector', 'Rotation (Quat)') + self.add_output('NodeSocketBool', 'Is in field of view') add_node(LookingAtNode, category='Action') diff --git a/logicnode_definitions/action_player_controller.py b/logicnode_definitions/action_player_controller.py index 6a8e225..3c4dbea 100644 --- a/logicnode_definitions/action_player_controller.py +++ b/logicnode_definitions/action_player_controller.py @@ -10,44 +10,34 @@ class PlayerController(ArmLogicTreeNode): bl_icon = 'QUESTION' def init(self, context): - self.outputs.new('ArmNodeSocketAction', 'Out') + self.add_output('ArmNodeSocketAction', 'Out') - self.inputs.new('ArmNodeSocketAction', 'Activate') + self.add_input('ArmNodeSocketAction', 'Activate') - self.inputs.new('ArmNodeSocketObject', 'Player Object') - self.inputs[-1].default_value = 'Player' + self.add_input('ArmNodeSocketObject', 'Player Object', default_value='Player') - self.inputs.new('NodeSocketFloat', 'Overall Speed Modifier') - self.inputs[-1].default_value = 1.0 + self.add_input('NodeSocketFloat', 'Overall Speed Modifier', default_value=1.0) - self.inputs.new('NodeSocketBool', 'Forward') - self.inputs.new('NodeSocketFloat', 'Forward Speed') - self.inputs[-1].default_value = 1.0 + self.add_input('NodeSocketBool', 'Forward') + self.add_input('NodeSocketFloat', 'Forward Speed', default_value=1.0) - self.inputs.new('NodeSocketBool', 'Left') - self.inputs.new('NodeSocketFloat', 'Left Speed') - self.inputs[-1].default_value = 1.0 + self.add_input('NodeSocketBool', 'Left') + self.add_input('NodeSocketFloat', 'Left Speed', default_value=1.0) - self.inputs.new('NodeSocketBool', 'Right') - self.inputs.new('NodeSocketFloat', 'Right Speed') - self.inputs[-1].default_value = 1.0 + self.add_input('NodeSocketBool', 'Right') + self.add_input('NodeSocketFloat', 'Right Speed', default_value=1.0) - self.inputs.new('NodeSocketBool', 'Reverse') - self.inputs.new('NodeSocketFloat', 'Reverse Speed') - self.inputs[-1].default_value = 1.0 + self.add_input('NodeSocketBool', 'Reverse') + self.add_input('NodeSocketFloat', 'Reverse Speed', default_value=1.0) - self.inputs.new('NodeSocketBool', 'Jump') - self.inputs.new('NodeSocketFloat', 'Jump Height') - self.inputs[-1].default_value = 1.0 + self.add_input('NodeSocketBool', 'Jump') + self.add_input('NodeSocketFloat', 'Jump Height', default_value=1.0) - self.inputs.new('NodeSocketBool', 'Run') - self.inputs.new('NodeSocketFloat', 'Run Multiplier') - self.inputs[-1].default_value = 1.5 + self.add_input('NodeSocketBool', 'Run') + self.add_input('NodeSocketFloat', 'Run Multiplier', default_value=1.5) - self.inputs.new('NodeSocketBool', 'Crouch') - self.inputs.new('NodeSocketBool', 'Hold for crouch') - self.inputs[-1].default_value = 1 - self.inputs.new('NodeSocketFloat', 'Crouch Multiplier') - self.inputs[-1].default_value = 0.5 + self.add_input('NodeSocketBool', 'Crouch') + self.add_input('NodeSocketBool', 'Hold for crouch', default_value=1) + self.add_input('NodeSocketFloat', 'Crouch Multiplier', default_value=0.5) add_node(PlayerController, category='Action') diff --git a/logicnode_definitions/animation_animation_controller.py b/logicnode_definitions/animation_animation_controller.py index 20352d4..a571c02 100644 --- a/logicnode_definitions/animation_animation_controller.py +++ b/logicnode_definitions/animation_animation_controller.py @@ -13,16 +13,13 @@ def __init__(self): array_nodes[str(id(self))] = self def init(self, context): - self.outputs.new('ArmNodeSocketAction', 'Out') - self.outputs.new('ArmNodeSocketAction', 'Done') - - self.inputs.new('ArmNodeSocketAction', 'In') - self.inputs.new('ArmNodeSocketObject', 'Animated Object') - self.inputs[-1].default_value = 'Animated Object' - self.inputs.new('ArmNodeSocketAnimAction', 'Idle') - self.inputs[-1].default_value = 'Idle' - self.inputs.new('NodeSocketFloat', 'Blend Time') - self.inputs[-1].default_value = 0.2 + self.add_output('ArmNodeSocketAction', 'Out') + self.add_output('ArmNodeSocketAction', 'Done') + + self.add_input('ArmNodeSocketAction', 'In') + self.add_input('ArmNodeSocketObject', 'Animated Object', default_value='Animated Object') + self.add_input('ArmNodeSocketAnimAction', 'Idle', default_value='Idle') + self.add_input('NodeSocketFloat', 'Blend Time', default_value=0.2) def draw_buttons(self, context, layout): diff --git a/logicnode_definitions/event_call_function.py b/logicnode_definitions/event_call_function.py index 292a873..68b5ddd 100644 --- a/logicnode_definitions/event_call_function.py +++ b/logicnode_definitions/event_call_function.py @@ -14,10 +14,10 @@ def __init__(self): array_nodes[str(id(self))] = self def init(self, context): - self.outputs.new('ArmNodeSocketAction', 'Out') - self.inputs.new('ArmNodeSocketAction', 'In') - self.inputs.new('NodeSocketString', 'Function') - self.inputs.new('NodeSocketInt', 'ID') + self.add_output('ArmNodeSocketAction', 'Out') + self.add_input('ArmNodeSocketAction', 'In') + self.add_input('NodeSocketString', 'Function') + self.add_input('NodeSocketInt', 'ID') def draw_buttons(self, context, layout): row = layout.row(align=True) diff --git a/logicnode_definitions/event_end_function.py b/logicnode_definitions/event_end_function.py index 8dc1f08..dd62d32 100644 --- a/logicnode_definitions/event_end_function.py +++ b/logicnode_definitions/event_end_function.py @@ -14,9 +14,9 @@ def __init__(self): array_nodes[str(id(self))] = self def init(self, context): - self.outputs.new('ArmNodeSocketAction', 'Out') - self.inputs.new('ArmNodeSocketAction', 'In') - self.inputs.new('NodeSocketString', 'Function') + self.add_output('ArmNodeSocketAction', 'Out') + self.add_input('ArmNodeSocketAction', 'In') + self.add_input('NodeSocketString', 'Function') def draw_buttons(self, context, layout): row = layout.row(align=True) diff --git a/logicnode_definitions/event_return_function.py b/logicnode_definitions/event_return_function.py index 4dc0936..d5f1718 100644 --- a/logicnode_definitions/event_return_function.py +++ b/logicnode_definitions/event_return_function.py @@ -15,8 +15,8 @@ def __init__(self): array_nodes[str(id(self))] = self def init(self, context): - self.outputs.new('ArmNodeSocketAction', 'Out') - self.inputs.new('NodeSocketInt', 'ID') + self.add_output('ArmNodeSocketAction', 'Out') + self.add_input('NodeSocketInt', 'ID') def draw_buttons(self, context, layout): layout.prop(self, 'property0') diff --git a/logicnode_definitions/event_start_function.py b/logicnode_definitions/event_start_function.py index 138ac21..6b550b6 100644 --- a/logicnode_definitions/event_start_function.py +++ b/logicnode_definitions/event_start_function.py @@ -15,7 +15,7 @@ def __init__(self): array_nodes[str(id(self))] = self def init(self, context): - self.outputs.new('ArmNodeSocketAction', 'Out') + self.add_output('ArmNodeSocketAction', 'Out') def draw_buttons(self, context, layout): layout.prop(self, 'property0') diff --git a/logicnode_definitions/logic_array_loop_indice.py b/logicnode_definitions/logic_array_loop_indice.py index 1777851..eb95d95 100644 --- a/logicnode_definitions/logic_array_loop_indice.py +++ b/logicnode_definitions/logic_array_loop_indice.py @@ -10,11 +10,11 @@ class ArrayLoopIndiceNode(ArmLogicTreeNode): bl_icon = 'CURVE_PATH' def init(self, context): - self.inputs.new('ArmNodeSocketAction', 'In') - self.inputs.new('NodeSocketShader', 'Array') - self.outputs.new('ArmNodeSocketAction', 'Loop') - self.outputs.new('NodeSocketInt', 'Value') - self.outputs.new('ArmNodeSocketAction', 'Done') - self.outputs.new('NodeSocketInt', 'Indice') + self.add_input('ArmNodeSocketAction', 'In') + self.add_input('NodeSocketShader', 'Array') + self.add_output('ArmNodeSocketAction', 'Loop') + self.add_output('NodeSocketInt', 'Value') + self.add_output('ArmNodeSocketAction', 'Done') + self.add_output('NodeSocketInt', 'Indice') add_node(ArrayLoopIndiceNode, category='Logic') diff --git a/logicnode_definitions/logic_bool_operation.py b/logicnode_definitions/logic_bool_operation.py index 8ffe7b5..6c673f6 100644 --- a/logicnode_definitions/logic_bool_operation.py +++ b/logicnode_definitions/logic_bool_operation.py @@ -21,10 +21,10 @@ def __init__(self): array_nodes[str(id(self))] = self def init(self, context): - self.inputs.new('NodeSocketBool', 'Invert Output') - self.inputs.new('NodeSocketBool', 'Input 1') - self.inputs.new('NodeSocketBool', 'Input 2') - self.outputs.new('NodeSocketBool', 'Output') + self.add_input('NodeSocketBool', 'Invert Output') + self.add_input('NodeSocketBool', 'Input 1') + self.add_input('NodeSocketBool', 'Input 2') + self.add_output('NodeSocketBool', 'Output') def draw_buttons(self, context, layout): layout.prop(self, 'property0') diff --git a/logicnode_definitions/logic_number_compare.py b/logicnode_definitions/logic_number_compare.py index d5bfc42..2431285 100644 --- a/logicnode_definitions/logic_number_compare.py +++ b/logicnode_definitions/logic_number_compare.py @@ -22,9 +22,9 @@ class CompareNumberNode(ArmLogicTreeNode): property1: FloatProperty(name='Tolerance', description='Almost Equal threshold', default=0.0001) def init(self, context): - self.inputs.new('NodeSocketInt', 'A') - self.inputs.new('NodeSocketInt', 'B') - self.outputs.new('NodeSocketBool', 'Result') + self.add_input('NodeSocketInt', 'A') + self.add_input('NodeSocketInt', 'B') + self.add_output('NodeSocketBool', 'Result') def draw_buttons(self, context, layout): layout.prop(self, 'property0') diff --git a/logicnode_definitions/logic_timer.py b/logicnode_definitions/logic_timer.py index b809006..8b5b694 100644 --- a/logicnode_definitions/logic_timer.py +++ b/logicnode_definitions/logic_timer.py @@ -10,19 +10,19 @@ class TimerNode(ArmLogicTreeNode): bl_icon = 'QUESTION' def init(self, context): - self.outputs.new('ArmNodeSocketAction', 'Out') - self.outputs.new('ArmNodeSocketAction', 'Done') - self.outputs.new('NodeSocketBool', 'Running') - self.outputs.new('NodeSocketBool', 'Paused') - self.outputs.new('NodeSocketFloat', 'Seconds left') - self.outputs.new('NodeSocketFloat', 'Progress (in %)') - self.outputs.new('NodeSocketInt', 'Repetitions done') + self.add_output('ArmNodeSocketAction', 'Out') + self.add_output('ArmNodeSocketAction', 'Done') + self.add_output('NodeSocketBool', 'Running') + self.add_output('NodeSocketBool', 'Paused') + self.add_output('NodeSocketFloat', 'Seconds left') + self.add_output('NodeSocketFloat', 'Progress (in %)') + self.add_output('NodeSocketInt', 'Repetitions done') - self.inputs.new('ArmNodeSocketAction', 'Start') - self.inputs.new('NodeSocketBool', 'Pause') - self.inputs.new('NodeSocketBool', 'Stop') + self.add_input('ArmNodeSocketAction', 'Start') + self.add_input('NodeSocketBool', 'Pause') + self.add_input('NodeSocketBool', 'Stop') - self.inputs.new('NodeSocketFloat', 'Seconds') - self.inputs.new('NodeSocketInt', 'Repetitions (0 for oneshot, negative for unlimited)') + self.add_input('NodeSocketFloat', 'Seconds') + self.add_input('NodeSocketInt', 'Repetitions (0 for oneshot, negative for unlimited)') add_node(TimerNode, category='Logic') diff --git a/logicnode_definitions/physics_get_contact_coords.py b/logicnode_definitions/physics_get_contact_coords.py index 2af5b35..8a68754 100644 --- a/logicnode_definitions/physics_get_contact_coords.py +++ b/logicnode_definitions/physics_get_contact_coords.py @@ -10,8 +10,8 @@ class GetContactCoordsNode(ArmLogicTreeNode): bl_icon = 'QUESTION' def init(self, context): - self.inputs.new('ArmNodeSocketObject', 'Object') - self.outputs.new('ArmNodeSocketArray', 'Array') - self.outputs.new('ArmNodeSocketArray', 'Coords') + self.add_input('ArmNodeSocketObject', 'Object') + self.add_output('ArmNodeSocketArray', 'Array') + self.add_output('ArmNodeSocketArray', 'Coords') add_node(GetContactCoordsNode, category='Physics') diff --git a/logicnode_definitions/value_lerp_vectors.py b/logicnode_definitions/value_lerp_vectors.py index 8a54ad8..8734d9a 100644 --- a/logicnode_definitions/value_lerp_vectors.py +++ b/logicnode_definitions/value_lerp_vectors.py @@ -10,11 +10,11 @@ class LerpVectorsNode(ArmLogicTreeNode): bl_icon = 'QUESTION' def init(self, context): - self.inputs.new('ArmNodeSocketAction', 'In') - self.inputs.new('NodeSocketVector', 'Starting Vector') - self.inputs.new('NodeSocketVector', 'End Vector') - self.inputs.new('NodeSocketFloat', 'Time For Change') - self.inputs.new('NodeSocketBool', 'Stop Interpolation') - self.outputs.new('NodeSocketVector', 'Vector') + self.add_input('ArmNodeSocketAction', 'In') + self.add_input('NodeSocketVector', 'Starting Vector') + self.add_input('NodeSocketVector', 'End Vector') + self.add_input('NodeSocketFloat', 'Time For Change') + self.add_input('NodeSocketBool', 'Stop Interpolation') + self.add_output('NodeSocketVector', 'Vector') add_node(LerpVectorsNode, category='Value') diff --git a/logicnode_definitions/value_quat_to_euler.py b/logicnode_definitions/value_quat_to_euler.py index 0695b11..bc517b4 100644 --- a/logicnode_definitions/value_quat_to_euler.py +++ b/logicnode_definitions/value_quat_to_euler.py @@ -10,11 +10,11 @@ class QuatToEulerNode(ArmLogicTreeNode): bl_icon = 'QUESTION' def init(self, context): - self.inputs.new('NodeSocketFloat', 'X') - self.inputs.new('NodeSocketFloat', 'Y') - self.inputs.new('NodeSocketFloat', 'Z') - self.inputs.new('NodeSocketFloat', 'W') - self.outputs.new('NodeSocketVector', 'Euler') + self.add_input('NodeSocketFloat', 'X') + self.add_input('NodeSocketFloat', 'Y') + self.add_input('NodeSocketFloat', 'Z') + self.add_input('NodeSocketFloat', 'W') + self.add_output('NodeSocketVector', 'Euler') add_node(QuatToEulerNode, category='Value') diff --git a/logicnode_definitions/value_seperate_quat.py b/logicnode_definitions/value_seperate_quat.py index 522a420..6cd15cf 100644 --- a/logicnode_definitions/value_seperate_quat.py +++ b/logicnode_definitions/value_seperate_quat.py @@ -10,11 +10,11 @@ class SeparateQuatNode(ArmLogicTreeNode): bl_icon = 'QUESTION' def init(self, context): - self.inputs.new('NodeSocketVector', 'Quat') - self.outputs.new('NodeSocketFloat', 'X') - self.outputs.new('NodeSocketFloat', 'Y') - self.outputs.new('NodeSocketFloat', 'Z') - self.outputs.new('NodeSocketFloat', 'W') - self.outputs.new('NodeSocketVector', 'Euler') + self.add_input('NodeSocketVector', 'Quat') + self.add_output('NodeSocketFloat', 'X') + self.add_output('NodeSocketFloat', 'Y') + self.add_output('NodeSocketFloat', 'Z') + self.add_output('NodeSocketFloat', 'W') + self.add_output('NodeSocketVector', 'Euler') add_node(SeparateQuatNode, category='Value') diff --git a/logicnode_definitions/variable_min_max.py b/logicnode_definitions/variable_min_max.py index 89c2a9b..7b905dc 100644 --- a/logicnode_definitions/variable_min_max.py +++ b/logicnode_definitions/variable_min_max.py @@ -10,10 +10,10 @@ class MinMaxNode(ArmLogicTreeNode): bl_icon = 'QUESTION' def init(self, context): - self.inputs.new('ArmNodeSocketAction', 'In') - self.inputs.new('NodeSocketShader', 'Value') - self.inputs.new('NodeSocketFloat', 'Min') - self.inputs.new('NodeSocketFloat', 'Max') - self.outputs.new('ArmNodeSocketAction', 'Out') + self.add_input('ArmNodeSocketAction', 'In') + self.add_input('NodeSocketShader', 'Value') + self.add_input('NodeSocketFloat', 'Min') + self.add_input('NodeSocketFloat', 'Max') + self.add_output('ArmNodeSocketAction', 'Out') add_node(MinMaxNode, category='Variable')