Node Editor Tutorial 07: How to implement Sockets

preview_player
Показать описание

In this Node Editor tutorial we will have a look at how to implement Sockets
Рекомендации по теме
Комментарии
Автор

Does your python evaluate a different order of operations?

Getting to the part where I am placing sockets the math doesn't seem to follow our standards.
And when I run it, it is indeed placing them as the position I would expect which is wrong. I had to rewrite those equations.

Is there a local setting that defines that or something?

for example:
I had to write
self.grNode.title_height + self.grNode._padding + self.grNode.edge_size + index * self.socketSpacing as
self.grNode.title_height + self.grNode._padding + self.grNode.edge_size + self.socketSpacing * index

because it otherwise would be evaluated as:
(self.grNode.title_height + self.grNode._padding + self.grNode.edge_size + index) * selfsocketSpacing

ErichToven
Автор

I use Pyside6 to write it, why my socket does not move with the node

旋律青春