Separator Out is a switch for displaying the resulting data. It does not carry any mathematical operations, it is just an appeal to the fields of the
Vec4 class. In the math node, I think it’s convenient.
I think this makes sense, I’ll leave it as it was.
Not really difficult. =)
- If it’s about mathematical operations, then they are partially similar to operations with vectors, and many have already been implemented in Kha. If you want to read on quaternions, then I recommend this article.
- If about the formation of nodes, then I will try to briefly describe, it may be useful. If you’re not interested, skip it.
It should be understood that the list (array) of input and output parameters can be changed at any time. There is only a problem with
outputs, which I wrote about here.
For example, to display the list of operations,
EnumProperty is used, which has the ability to specify the
get functions (all
Properties have them). Thus, we get control over saving the results of the selection and displaying it, and over the event selected from the list. As a result:
return self['property0'] # get the selected value
# Value – the order number in the items list
def set_enum(self, value):
select_current = self.get_enum_id_value(self, 'property0', value)
select_prev = self.property0
# Checking the choice of another operation, in case the same value was chosen, nothing changed
if select_prev != select_current:
# Examples of removing the last item in a list
# Checking which operation is selected
if (select_current == 'Lerp') or (select_current == 'Slerp'):
if (select_current == 'FromAxisAngle'):
self['property0'] = value # save select
items = [('Add', 'Add', 'Add'),
('Subtract', 'Subtract', 'Subtract'),
('Lerp', 'Lerp', 'Lerp'),
('Slerp', 'Slerp', 'Slerp'),
('FromAxisAngle', 'From Axis Angle', 'From Axis Angle')],
name='', default='Add', set=set_enum, get=get_enum)
Function for deriving an identifier from the EnumProperty items:
def get_enum_id_value(obj, prop_name, value):
If you delete the parameters, then the connections disappear, so you can control this too. For example, if there was an
Add operation, but
Subtract was selected, and other nodes were connected to the parameters, then it is not necessary to delete
Blender already renders the display of
I hope I explained clearly.