Blender Interface Update: For the past couple of weeks, I have been working on the electroprogrammatic interface for Blender RoCo. Here are some issues that I have encountered, some of which I have solved and others I have some ideas of how I am going to approach solving. Before the list, I would like to remind you guys what I am trying to accomplish with this project. So, there are two sides to this project: the implementation side and the user interface side. The main difference between the two is that the implementation side should be purely functional, that is without side effects. For those who might not know what side effects are. Side Effects are changes to some state outside the currently executing context. So a simple example would be that a function call alters a global variable, thus changing the state of the program that would potentially alter the behavior of the function when it is called the next time. So, in essence, a function or program is without side effects if everytime they are called, the result returns the same.

The implementation side should be functional since once users have constructed the topology of their electricprogrammatic designs the output code generation and electrical wiring instructions should be a pure function that can be call to generate these results. This pure function is obtained by traversing through the user-constructed node tree, which is actually a RoCo component containing subcomponents that are connected to one another. RoCo keeps track of connections and the passing of parameters between subcomponents.

The user interface side would encapsulate all the side effects (user interactions and user inputs). Upon user changes, we would map the changes to RoCo API calls (constrain parameters, add connection, remove subcomponent, …etc). Then the user-constructed node tree is traversed again, but only through the parts that have changed since the last construction.

Status quo: Problem 1: Polymorphism in Blender is limited since Blender manages the data. So subclasses that call on inherited functions to change their states is prohibited. Work around 1: The construction of the nodes itself in the interface can be abstracted into just one class with inputs, outputs, and fields controlled by different operators (so instead of having many classes for different nodes, we would have many operators that operate on a generalized node class) Mixin class provides a way for classes to share methods and code reuse

… more to comeBLOG POST: Blender Interface Problems to Solve: For the past couple of weeks, I have been working on the electroprogrammatic interface for Blender RoCo. Here are some issues that I have encountered, some of which I have solved and others I have some ideas of how I am going to approach solving. Before the list, I would like to remind you guys what I am trying to accomplish with this project. So, there are two sides to this project: the implementation side and the user interface side. The main difference between the two is that the implementation side should be purely functional, that is without side effects. For those who might not know what side effects are. Side Effects are changes to some state outside the currently executing context. So a simple example would be that a function call alters a global variable, thus changing the state of the program that would potentially alter the behavior of the function when it is called the next time. So, in essence, a function or program is without side effects if everytime they are called, the result returns the same.

The implementation side should be functional since once users have constructed the topology of their electricprogrammatic designs the output code generation and electrical wiring instructions should be a pure function that can be call to generate these results. This pure function is obtained by traversing through the user-constructed node tree, which is actually a RoCo component containing subcomponents that are connected to one another. RoCo keeps track of connections and the passing of parameters between subcomponents.

The user interface side would encapsulate all the side effects (user interactions and user inputs). Upon user changes, we would map the changes to RoCo API calls (constrain parameters, add connection, remove subcomponent, …etc). Then the user-constructed node tree is traversed again, but only through the parts that have changed since the last construction.

Status quo: Problem 1: Polymorphism in Blender is limited since Blender manages the data. So subclasses that call on inherited functions to change their states is prohibited. Work around 1: The construction of the nodes itself in the interface can be abstracted into just one class with inputs, outputs, and fields controlled by different operators (so instead of having many classes for different nodes, we would have many operators that operate on a generalized node class) Mixin class provides a way for classes to share methods and code reuse

… more to come

Next Post Previous Post