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-04-08Geometry Nodes: Support instances in attribute searchHans Goudey
Previously only attributes of "real" geometry were displayed in attribute search. This commit adds code to look through attributes on instances and add those to the search drop-down too. This required implementing the same sort of recursive traversal as the realize instances code. The situation is a bit different though, this can return early and doesn't need to keep track of transforms. I added a limit so that it doesn't look through the attributes of too many instanced geometry sets. I think this is important, since this isn't a trivial operation and it could potentially happen for every node in a large node tree. Currently the limit is set at 8 geometry sets, which I expect will be enough, since the set of attributes is mostly not very unique anyway. Fixes T86282 Diffrential Revision: https://developer.blender.org/D10919
2021-04-07Cleanup: Rename function, switch order of argumentsHans Goudey
The function name was not very specific, this makes it clearer that it works on instances rather than only real geometry. Also use `r_` prefix for the return argument.
2021-03-25Cleanup: Pass instance group result vector as an argumentHans Goudey
This will allow retrieving the instance groups from multiple geometry sets and avoiding needing vectors of vectors to store the results. This is useful when retrieving instances from a multi-input socket of geometries.
2021-03-18Geometry Nodes: Don't create empty components when realizing instancesHans Goudey
Previously even if the input goemetry set had no point cloud or no mesh instances, `geometry_set_realize_instances` would create empty data. This isn't necessarily bad, but it can complicate things down the line if there are a bunch of empty components getting passed around.
2021-03-15Geometry Nodes: expose builtin crease attributeJacques Lucke
This exposes the `crease` attribute, that is used by the Subdivide Smooth node. It is also the first attribute on the edge domain. Domain interpolations for the edge domain have not been implemented yet. Ref T86397. Differential Revision: https://developer.blender.org/D10660
2021-03-13Geometry Nodes: Add "normal" attribute for face normalsHans Goudey
This commit adds a `normal` attribute on the polygon domain. Since normal data is derived data purely based off of the location of each face's vertices, it is exposed as a read-only attribute. After rB80f7f1070f17, this attribute can be interpolated to the other domains. Since this attribute is a special case compared to the others, the implementation subclasses `BuiltinAttributeProvider`. It's possible there is a better way to abstract this. Something else might also become apparent if we add similar read-only attributes. See rB2966871a7a891bf36 for why this is preferred over the previous implementation. Differential Revision: https://developer.blender.org/D10677
2021-03-10Geometry Nodes: move geometry component type enum to CJacques Lucke
This allows us to use it in rna for the spreadsheet editor.
2021-03-09Geometry Nodes: Expose "shade smooth" as an attributeHans Goudey
This patch exposes the "Shade Smooth" value as a boolean attribute. This setting is exposed as a check-box in the mesh data properties, but the value is actually stored for every face, allowing some faces to be shaded smooth with a simple per-face control. One bonus, this allows at least a workaround to the lack of control of whether meshes created by nodes are shaded smooth or not: just use an attribute fill node. Differential Revision: https://developer.blender.org/D10538
2021-03-06Geometry Nodes: Expose vertex normals as an attributeHans Goudey
This attribute exposes mesh vertex normals as a `vertex_normal` attribute for use with nodes. Since the normal vector stored in vertices is only a cache of data computable from the surrounding faces, the attribute is read-only. A proper error message for attempting to write this attribute is part of T85749. A write-only normal attribute will likely come later, most likely called `corner_normal`. The normals are recomputed before reading if they are marked dirty. This involves const write-access to the mesh, protected by the mutex stored in `Mesh_Runtime`. This is essential for correct behavior after nodes like "Edge Split" or nodes that adjust the position attribute. Ref T84297, T85880, T86206 Differential Revision: https://developer.blender.org/D10541
2021-02-23Geometry Nodes: improve accessing attribute meta dataJacques Lucke
This allows accessing attribute meta data like domain and data type without having to create a `ReadAttribute`. I kept the `attribute_names` method for now to keep the patch more self contained. Differential Revision: https://developer.blender.org/D10511
2021-02-18Cleanup: rename AttributeInfo to AttributeKindJacques Lucke
"Kind" is a bit less generic than "Info" for me. Especially, it implies that the struct does not contain the name of a specific attribute (for me anyway).
2021-02-18Geometry Nodes: convert point cloud to mesh vertices for modifiersJacques Lucke
Previously, when a Geometry Nodes modifier outputs a point cloud (e.g. generated using the Point Distribute node), other modifiers could not use that data. Now, the point cloud data is converted to mesh vertices for such modifiers. Ref T85281. Differential Revision: https://developer.blender.org/D10451
2021-02-17Geometry Nodes: Expose material index attributeHans Goudey
The `material_index` attribute can adjust which material in the list will be applied to each face of the mesh. There are two new things about this attribute that haven't been exposed by the attribute API yet. Each comes with limitations: 1. Integer data type: Most attribute nodes are currently written to use float data types. This means that they can't write to this attribute because they can't change the type of a built-in attribute. 2. Polygon domain: This is our first attribute using the polygon domain, meaning until some of the interpolations are implemented, some operations may not work as expected. Currently the two nodes that work with this attribute are Attribute Fill and Attribute Randomize. Differential Revision: https://developer.blender.org/D10444
2021-02-16Geometry Nodes: move realize-instances code to blenkernelJacques Lucke
I need to access this functionality from modifier code. Therefore it should not be in the nodes module.
2021-02-16Geometry Nodes: move geometry set instance handling to separate fileJacques Lucke
In an upcoming commit I'll also move the make-instances-real functionality to this file. This code is not essential to working with geometry sets in general, so it makes sense to move it to a separate header.