Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-05Cleanup: use doxygen sectionsCampbell Barton
2021-10-03Nodes: use extern templates for socket declarationsJacques Lucke
The new socket declaration api generates a surprising amount of symbols in each translation unit where it is used. This resulted in a measurable compile time increase. This commit reduces the number of symbols that are generated in each translation unit significantly. For example, in `node_geo_distribute_points_on_faces.cc` the number of symbols decreased from 1930 to 1335. In my tests, this results in a 5-20% compile time speedup when this and similar files are compiled in isolation (measured by executing the command in `compile_commands.json`). Compiling the distribute points on faces node sped up from ~2.65s to ~2.4s.
2021-10-03Cleanup: move more methods out of classesJacques Lucke
2021-09-28Geometry Nodes: Only show attribute toggle for field inputsHans Goudey
Change the toggle to switch between an attribute and a single value to only display for inputs that are fields, as determined statically by the field inferencing added in rB61f3d4eb7c7db7. This means the field inferencing must be calculated on file load, since it's used in the UI. Differential Revision: https://developer.blender.org/D12623
2021-09-24Nodes: initial support for socket tooltipsJohnny Matthews
This adds initial limited support for socket tooltips. It's limited in a couple of ways for now: * Only works when hovering over the socket shape, not when hovering over the value in the socket. * Only works for built-in nodes that already use the new node declaration system. This can later be extended to support pynodes. Those limitations are well worth it for now, given that the implementation is quite simple and the impact on usability is quite large. More complex updates to the layout system, that would allow showing socket tooltips in the nodes, can be done later. With the current implementation we can at least start writing tooltips for geometry nodes now. This commit already adds tooltips for the Cylinder node as an example. Differential Revision: https://developer.blender.org/D12607
2021-09-24Nodes: hide socket value when input is a field implicitlyJacques Lucke
2021-09-23Geometry Nodes: Initial socket visualization for fields.Jacques Lucke
This implements the update logic for the vizualization of which sockets pass data or constants directly, and which pass functions. The socket shapes may still have to be updated. That should be done separately, because it might be a bit more involved, because socket shapes are currently linked to keyframe shapes. Currently the circle and diamond shapes are used with the following meanings: - Input Sockets: - Circle: Required to be a single value. - Diamond: This input supports fields. - Output Sockets: - Circle: This output is a single value. - Diamond: This output may be a field. Connecting a field to a circle input socket is an error, since a field cannot be converted to a single value. If the socket shape is a diamond with a dot in the middle, it means it is currently a single value, but could be a field. In addition to socket shapes, the intention is to draw node links differently based on the field status. However, the exact method for conveying that isn't decided yet. Differential Revision: https://developer.blender.org/D12584
2021-09-23Cleanup: Move more shader nodes to socket declaration APIHans Goudey
I had to add `no_muted_links` to the declaration API. The name could change there, but I think it's more obvious than "internal"
2021-09-15Cleanup: avoid passing redundant parameterJacques Lucke
2021-09-15Nodes: refactor socket declarationsJacques Lucke
This commits adds a few common flags to `SocketDeclaration` so that they are available for all socket types (hide label, hide value, is multi input). This allows porting over the remaining geometry nodes to the new declaration system. Furthermore, this commit separates the concepts of the socket declaration and corresponding builders. The builders are used by nodes to declare which sockets they have (e.g. `FloatBuilder`). The ready build socket declarations can then be consumed by other systems such as the versioning code. Both use cases need different APIs and those will change for independent reasons, so it makes sense to separate the classes.
2021-09-14Nodes: cache node declaration on nodeJacques Lucke
Previously, it was necessary to rebuild the node declaration every time it was used. Now it is cached per node for easy and fast access. For more details on what this is, look at the comment in `DNA_node_types.h`. Differential Revision: https://developer.blender.org/D12471
2021-08-30Fix: add virtual destructor to base classJacques Lucke
2021-08-30Nodes: add more flexible method to declare sockets of a nodeJacques Lucke
Previously, built-in nodes had to implement "socket templates" (`bNodeSocketTemplate`) to tell Blender which sockets they have. It was nice that this was declarative, but this approach was way too rigid and was cumbersome to use in many cases. This commit starts to move us away from this rigid structure by letting nodes implement a function that declares the sockets the node has. Right now this is used as a direct replacement of the "socket template" approach to keep the refactor smaller. It's just a bit easier to read and write. In the future we want to support more complex features like dynamic numbers of sockets and type inferencing. Those features will be easier to build on this new approach. This new approach can live side by side with `bNodeSocketTemplate` for a while. That makes it easier to update nodes one by one. Note: In `bNodeSocketTemplate` socket identifiers were made unique automatically. In this new approach, one has to specify unique identifiers manually (unless the name is unique already). Differential Revision: https://developer.blender.org/D12335