214 Commits

Author SHA1 Message Date
Erik Abrahamsson
be16794ba1 Geometry Nodes: String to Curves Node
This commit adds a node that generates a text paragraph as curve
instances. The inputs on the node control the overall shape of the
paragraph, and other nodes can be used to move the individual instances
afterwards. To output more than one line, the "Special Characters" node
can be used.

The node outputs instances instead of real geometry so that it doesn't
have to duplicate work for every character afterwards. This is much
more efficient, because all of the curve evaluation and nodes like fill
curve don't have to repeat the same calculation for every instance of
the same character.

In the future, the instances component will support attributes, and the
node can output attribute fields like "Word Index" and "Line Index".

Differential Revision: https://developer.blender.org/D11522
2021-09-24 12:41:49 -05:00
Erik Abrahamsson
5c0017e85a Geometry Nodes: Special string characters node
This patch adds a new node called "Special Characters" with two string
outputs: "Line Break" and "Tab". This is necessary because the newline
character cannot be easily typed with a keyboard, but is necessary for
the string to curve node.

Differential Revision: https://developer.blender.org/D12620
2021-09-24 11:00:21 -05:00
Jacques Lucke
e7ae2840a5 Geometry Nodes: new Distribute Points on Faces node
This adds a replacement for the deprecated Point Distribute node.

Arguments for the name change can be found in T91155.
Descriptions of the sockets are available in D12536.

Thanks to Jarrett Johnson for the initial patch!

Differential Revision: https://developer.blender.org/D12536
2021-09-24 11:50:02 +02:00
dilithjay
0d350e0193 Geometry Nodes: Curve Fillet Node
This node can be used to fillet splines at control points to
create a circular arc.
The implementation roughly follows T89227's design.

The node works in two main modes: Bezier and Poly
* Bezier: Creates a circular arc at vertices by changing
handle lengths (applicable only for Bezier splines).
* Poly: Creates a circular arc by creating vertices (as
many as defined by the Count fields input) along
the arc (applicable for all spline types).

In both modes, the radius of the created arc is defined
by the Radius fields input.
The Limit Radius attribute can be enabled to prevent
overlapping when the defined radius exceeds the maximum
possible radius for a given point.

Reviewed By: Hans Goudey

Differential Revision: https://developer.blender.org/D12115
2021-09-22 20:11:12 +05:30
Hans Goudey
4d881d9dad Geometry Nodes: Curve Parameter Node
This commit adds a field input node that outputs the fraction of the
total length of the spline on each control point. This is useful for
anything that involves varying a value depending on how far along
the spline it is.

It also works when evaluated on the spline domain, where it outputs
the fraction of the total length of all of the splines at the start.

The operation isn't as well defined for NURB splines for the reasons
noted in the code comment. That can be said explicitly in the docs.

Differential Revision: https://developer.blender.org/D12548
2021-09-21 17:38:37 -05:00
Erik Abrahamsson
29e3545194 Geometry Nodes: String manipulation nodes
This patch adds four new nodes to a new "Text" category:
 - String Length: Outputs length of a string
 - String Substring: Outputs part of a string
 - Value to String: Converts a value to a string
 - String Join: Concatenates multiple strings with a delimiter

The initial use case of these nodes is the upcoming string to curve
node. However, they could also be used to calculate dynamic attribute
names, or with string attributes in the future.

Differential Revision: https://developer.blender.org/D12532
2021-09-21 14:11:32 -05:00
Hans Goudey
4d51af68ad Geometry Nodes: Curve tangent node
This node outputs the direction vector, or tangent of a curve at every
control point. For poly splines this is simply the evaluated tangents,
so it all works very simply. For Bezier splines it uses the tangent at
the evaluated point corresponding to each control point, and NURBS
are interpereted as poly splines built from their control points.

Internally the node is called "Input Tangent" to simplify using it for
mesh tangents as well in the future like the "Normal" node.

Differential Revision: https://developer.blender.org/D12581
2021-09-21 13:11:39 -05:00
Hans Goudey
17021adcea Geometry Nodes: Curve Sample Node
This node allows sampling positions, tangents, and normals at any
arbitrary point along a curve. The curve can include multiple splines,
all are taken into account. The node does not yet support transferring
generic attributes like radius, because some more general tooling will
make that much more feasible and useful in different scenarios.

This is a field node, so it is evaluated in the context of a data-flow
node like "Set Position". One nice thing about that is it can easily
be used to move an entire geometry like the follow path constraint.

The point along the curve is chosen either with a factor of the total
length of the curve, or a length into the curve, the same choice used
in the curve trim node.

Differential Revision: https://developer.blender.org/D12565
2021-09-20 20:23:26 -05:00
Victor-Louis De Gusseme
05f3f11d55 Geometry Nodes: Attribute Statistic Node
This nodes evaluates a field on a geometry and outputs various
statistics about the entire data set, like min, max, or even
the standard deviation. It works for float and vector types currently,
though more types could be supported in the future.

 - All statistics are calculated element-wise for vectors.
 - "Product" was not added since the result could very easily overflow.
 - The "Size" output was not added since it isn't specific to an
   attribute and would fit better in another node.

The implementation shares work as much as possible when multiple
statistics are needed.

This node has been in development since the beginning of this year,
with additions from Johnny Matthews and Hans Goudey.

Differential Revision: https://developer.blender.org/D10202
2021-09-20 18:39:39 -05:00
Jacques Lucke
fc4f82d200 Geometry Nodes: support Noise Texture node
This makes the Noise Texture node available in geometry nodes.
It should behave the same as in shader node, with the exception
that it does not have an implicit position input yet. That will
be added separately.

Differential Revision: https://developer.blender.org/D12467
2021-09-20 13:12:25 +02:00
Jacques Lucke
7da9da2b27 Geometry Nodes: new Realize Instances node
This node has a simple geometry input and output.
If the input geometry contains instances, they will be realized
into actual geometry. When there are many instances, this can
be very slow and memory intensive. Generally, instances should
only be made real when necessary, e.g. when every instance
should be deformed independently.

Differential Revision: https://developer.blender.org/D12556
2021-09-20 12:37:52 +02:00
Jacques Lucke
6b0aa7ae15 Geometry Nodes: hide Attribute Remove node when fields are enabled 2021-09-17 16:21:20 +02:00
Hans Goudey
09f14b38f2 Geometry Nodes: Add fields version of material nodes
This commit moves the old material nodes to a "legacy" folder and adds
versions of the nodes that work with fields.

The "Select by Material" node is a field node now, so it doesn't have
a geometry output. This is an improvement because there are fewer links
to connect, and it's more easily usable in different situations.
It's also called "Material Selection", since it's more of an input
than an action now.

It's sometimes necessary to use the attribute capture node to get a
more predictable interpolation to mesh faces. This is because the
selection field input is always evaluated on the face domain, so
attribute inputs are interpolated before they are booleans, so they
cannot use the new interpolations from rB5841f8656d9580d7b9.

Differential Revision: https://developer.blender.org/D12456
2021-09-15 10:51:52 -05:00
Hans Goudey
e2f99c338b Geometry Nodes: Add versioning to change legacy node ID names
Recently we have decided to avoid fancier versioning for nodes with
string inputs for attribute names when updating the attribute workflow
for 3.0. In that case we would just duplicate any node that will
have an updated version to work with fields.

We want to be able to use the "proper" ID names for the new versions
of the nodes though, so this patch adds "Legacy" to the IDs of all
nodes that will be replaced in 3.0. This commit also removes the nodes
from the add menu when the fields experimental preference is enabled,
in order to make it clear what has been updated and what hasn't.

Nodes in the "Maybe" categories in versioning_300.c can be renamed
later if necessary. For now it's probably better to be conservative,
and to keep the list complete.

Differential Revision: https://developer.blender.org/D12420
2021-09-10 10:34:49 -05:00
Jacques Lucke
bf47fb40fd Geometry Nodes: fields and anonymous attributes
This implements the initial core framework for fields and anonymous
attributes (also see T91274).

The new functionality is hidden behind the "Geometry Nodes Fields"
feature flag. When enabled in the user preferences, the following
new nodes become available: `Position`, `Index`, `Normal`,
`Set Position` and `Attribute Capture`.

Socket inspection has not been updated to work with fields yet.

Besides these changes at the user level, this patch contains the
ground work for:
* building and evaluating fields at run-time (`FN_fields.hh`) and
* creating and accessing anonymous attributes on geometry
  (`BKE_anonymous_attribute.h`).

For evaluating fields we use a new so called multi-function procedure
(`FN_multi_function_procedure.hh`). It allows composing multi-functions
in arbitrary ways and supports efficient evaluation as is required by
fields. See `FN_multi_function_procedure.hh` for more details on how
this evaluation mechanism can be used.

A new `AttributeIDRef` has been added which allows handling named
and anonymous attributes in the same way in many places.

Hans and I worked on this patch together.

Differential Revision: https://developer.blender.org/D12414
2021-09-09 12:54:20 +02:00
Aaron Carlisle
d10ea97053 Compositor: New Posterize Node
The posterize node limits the number of colors per channel.
This is useful to generate masks or to generate stylized images

Both the tiled and full-frame implementation are included in this patch

{F10314012}

Reviewed By: manzanilla, jbakker

Differential Revision: https://developer.blender.org/D12304
2021-09-05 15:24:35 -04:00
Erik Abrahamsson
a71d2b2601 Geometry Nodes: Curve Fill Node
This node takes a curve geometry input and creates a filled mesh at Z=0
using a constrained Delaunay triangulation algorithm. Because of the
choice of algorithm, the results should be higher quality than the
filling for 2D curve objects.

This commit adds an initial fairly simple version of the node, but more
features may be added in the future, like transferring attributes when
necessary, or an index attribute input to break up the calculations
into smaller chunks to improve performance.

Differential Revision: https://developer.blender.org/D11846
2021-08-29 23:27:35 -05:00
Charlie Jolly
04376c3bac Geometry Nodes: Add shader Color Mix node
Port color mix shader node to Geometry Nodes.

Differential Revision: https://developer.blender.org/D10585
2021-08-18 14:50:52 +01:00
Hans Goudey
1f8485ae82 Geometry Nodes: Select by Handle Type Node
Just like the "Select by Material" node, this node outputs a
boolean attribute for control points that have a matching handle
type. By default left and right handles are considered, but it's
possible to only check one side with the toggle in the node.

Differential Revision: https://developer.blender.org/D12135
2021-08-05 18:42:20 -05:00
Johnny Matthews
0f45576590 Geometry Nodes: Curve Set Spline Type
This node sets the selected (or all) splines in curve to a chosen target
spline type. Poly, Bezier, and NURB splines can be converted to any of
the other types. This is meant to be a building block node, useful in
many procedural situations.

In the future the node could be optimized with multi-threading, or by
avoiding copying in many cases, either by retrieving the curve for write
access or by passing the raw vectors to the new splines where possible.

With edits from Hans Goudey (@HooglyBoogly)

Differential Revision: https://developer.blender.org/D12013
2021-08-03 23:14:03 -04:00
Johnny Matthews
0e8d1c6bcf Geometry Nodes: Set Bezier Handle Type Node
This node takes a curve and a point selection and allows you to set the
specified (or all) points left/right or both handles to a given type.

Differential Revision: https://developer.blender.org/D11992
2021-07-22 10:55:50 -04:00
Angus Stanton
e7a800c52f Geometry Nodes: Curve Trim Node
This node implements shortening each spline in the curve based on
either a length from the start of each spline, or a factor of the
total length of each spline, similar to the "Start & End Mapping"
panel of curve properties.

For Bezier curves, the first and last control points are adjusted
to maintain the shape of the curve, but NURB splines are currently
implicitly converted to poly splines.

The node is implemented to avoid copying where possible, so it outputs
a changed version of the input curve rather than a new one.

Differential Revision: https://developer.blender.org/D11901
2021-07-18 14:09:38 -04:00
Campbell Barton
d35b14449e Cleanup: ensure one newline at end of file, strip trailing space 2021-07-15 17:53:26 +10:00
Johnny Matthews
2a41ab5e6c Geometry Nodes: Curve Primitive Quadrilateral
This commit adds a curve primitive node for creating squares,
rectangles, trapezoids, kites, and parallelograms. It also includes
a mode where the four points are just vector inputs.

Differential Revision: https://developer.blender.org/D11665
2021-07-12 13:11:52 -04:00
Hans Goudey
0b1050bf09 Geometry Nodes: Rename nodes for clarity between mesh and curve
Rename the mesh circle to "Mesh Circle", mesh line to "Mesh Line",
and mesh subdivide to "Mesh Subdivide". Previously they looked exactly
the same in the search menu, and the nodes themselves had the same
label. This is a "deep" rename that also renames internal defines and
function names to match the UI.
2021-07-06 23:00:27 -05:00
Angus Stanton
63a8b3b972 Geometry Nodes: Curve Endpoints Node
This node is quite similar to the curve to points node, but creates
points for only the start and end of each spline. This is a separate
node because the sampling from the curve to points node don't apply,
and just for ease of use.

All attributes from the curves are copied, including the data for
instancing: tangents, normals, and the derived rotations. One simple
use case is to make round caps on curves by instancinghalves of a
sphere on each end of the splines.

Differential Revision: https://developer.blender.org/D11719
2021-07-06 22:24:04 -05:00
Johnny Matthews
29d6750134 Geometry Nodes: Curve Primitive Line
This node creates a poly spline line in one of 2 modes:
 - Line between two points
 - Start Point, Direction, and Length

Both modes create splines with only start and endpoints.
A resample node can be used afterward to increase the point count.

Differential Revision: https://developer.blender.org/D11769
2021-07-05 12:27:12 -05:00
Nikhil Shringarpurey
fd0370acc2 Geometry Nodes: Add explicit Float to Int conversion node
This patch adds a very simple node that explicitly converts a float to
an int. While this may seem redundant, it would offer 2 benefits to the
current requirement to use implicit float conversions:
 1. It makes the node tree's intent more clear and self-documenting
    (especially if changes in the future require integer inputs).
 2. It eliminates undefined behavior in current/future nodes from float
    inputs by guaranteeing that the input is an integer.

The node offers a variety of rounding techniques to make it more flexible.

Differential Revision: https://developer.blender.org/D11700
2021-07-05 11:52:10 -05:00
Jacques Lucke
9009ac2c3d Geometry Nodes: new Viewer node
This adds a viewer node similar to the one in the compositor.
The icon in the headers of nodes is removed because it served
the same purpose and is not necessary anymore.

Node outputs can be connected to the active viewer using
ctrl+shift+LMB, just like in the compositor. Right now this collides
with the shortcut used in the node wrangler addon, which will
be changed separately.

As of now, the viewed geometry is only visible in the spreadsheet.
Viewport visualization will be added separately.

There are a couple of benefits of using a viewer node compared
to the old approach with the icon in the node header:
* Better support for nodes that have more than one geometry output.
* It's more consistent with the compositor.
* If attributes become decoupled from geometry in the future,
  the viewer can have a separate input for the attribute to visualize.
* The viewer node could potentially have visualization settings.
* Allows to keep "visualization points" around by having multiple
  viewer nodes.
* Less visual clutter in node headers.

Differential Revision: https://developer.blender.org/D11470
2021-07-05 10:46:36 +02:00
Johnny Matthews
c1fc180861 Geometry Nodes: Curve Primitive Circle
This node has two modes: the first mode computes a circle from three
locations and a resolution. The second takes radius and resolution.
The first mode also outputs the center of the computed circle as
a vector.

Differential Revision: https://developer.blender.org/D11650
2021-06-30 19:22:13 -05:00
Johnny Matthews
8884d2d61b Geometry Nodes: Curve Primitive Bezier Segment
Creates a Curve with 1 Bezier Spline from four positions (start,
start handle, end handle, end) and a resolution. The handles are
aligned and mirrored automatically. An "Offset" mode is also included
to allow specifying the handles relative to the control points.

The default settings recreate the existing default Bezier Curve in the
3D viewport add menu.

Differential Revision: https://developer.blender.org/D11648
2021-06-30 00:03:55 -05:00
Johnny Matthews
d3788207aa Geometry Nodes: Curve Primitive Quadratic Bezier Segment
This patch is for a node that creates a poly spline from a
3 point quadratic Bezier. Resolution is also specified.

Curve primitives design task: T89220

Differential Revision: https://developer.blender.org/D11649
2021-06-29 22:39:26 -05:00
Johnny Matthews
21ebee2580 Geometry Nodes: Curve Primitive Spiral
This node creates a curve spline and gives control for the number of
rotations, the number of points per rotation, start and end radius,
height, and direction. The "Reverse" input produces a visual change,
it doesn't just change the order of the control points.

Differential Revision: https://developer.blender.org/D11609
2021-06-29 22:22:28 -05:00
Johnny Matthews
86c6769e20 Geometry Nodes: Curve Primitive Spiral
This patch adds a Curve Primitives menu in Geometry nodes with an
initial entry of a star primitive.

The node is a basic star pattern node that outputs a poly spline.
Options control the inner and outer radius, the number of points,
and the twist of the valleys.

Differential Revision: https://developer.blender.org/D11653
2021-06-29 22:00:29 -05:00
Lukas Tönne
4b673ebb99 Raycast geometry node.
The //Raycast// node intersects rays from one geometry onto another.
It computes hit points on the target mesh and returns normals, distances
and any surface attribute specified by the user.

A ray starts on each point of the input //Geometry//. Rays continue
in the //Ray Direction// until they either hit the //Target Geometry//
or reach the //Ray Length// limit. If the target is hit, the value of the
//Is Hit// attribute in the output mesh will be true. //Hit Position//,
//Hit Normal//, //Hit Distance// and //Hit Index// are the properties of the
target mesh at the intersection point. In addition, a //Target Attribute//
can be specified that is interpolated at the hit point and the result
stored in //Hit Attribute//.

Docs: D11620

Reviewed By: HooglyBoogly

Differential Revision: https://developer.blender.org/D11619
2021-06-17 21:11:32 +01:00
Hans Goudey
ed4222258e Geometry Nodes: Add Curve Subdivision Node
This node creates splines with more control points in between the
existing control points. The point is to give the splines more
definition for further tweaking like randomization with white noise,
instead of deforming a resampled poly spline with a noise texture.

For poly splines and NURBS, the node simply interpolates new values
between the existing control points. However, for Bezier splines,
the result follows the existing evaluated shape of the curve, changing
the handle positions and handle types to make that possible.

The number of "cuts" can be controlled by an integer input, or an
attribute can be used. Both spline and point domain attributes are
supported, so the number of cuts can vary using the value from the
point at the start of each segment.

Dynamic curve attributes are interpolated to the result with linear
interpolation.

Differential Revision: https://developer.blender.org/D11421
2021-06-17 11:39:23 -05:00
Johnny Matthews
ed4b2ba75a Geometry Nodes: Separate Components Node
Implementation of T86970. This node takes a geometry input with
multiple components and outputs them by component type. Meshes,
Curves, and Point Clouds support combining multiple input instances,
while volumes will only output the first volume component input until
suitable instance realization for multiple volumes is finished.

When direct geometry instancing is implemented it will be possible to
avoid realizing instances in this node.

Differential Revision: https://developer.blender.org/D11577
2021-06-15 22:31:57 -05:00
Campbell Barton
013fc69ea8 Cleanup: unused argument & variable warnings 2021-06-15 10:50:43 +10:00
Johnny Matthews
4a540b9b48 Geometry Nodes: Curve Reverse Node
This is an implementation of T88722. It accepts a curve object and
for each spline, reverses the order of the points and all attributes.
This is more of a foundational node to support other nodes in the
future (like curve deform)

Selection takes spline domain attributes to determine which splines
are selected. If no selection is present all splines are reversed.

Differential Revision: https://developer.blender.org/D11538
2021-06-14 13:28:38 -05:00
Hans Goudey
fcbb20286a Geometry Nodes: Curve to Points Node for Evaluated Data
This node implements the second option of T87429, creating points
along the input splines with the necessary evaluated information
for instancing: `tangent`, `normal`, and `rotation` attributes.
All generic curve point and spline attributes are copied to the
result points as well.

The "Count" and "Length" methods are just like the current options
in the resample node, but the output is points instead of a curve.
The "Evaluated" method uses the points you see on the curve directly,
and therefore should be the fastest.

The rotation data is retrieved from a transform matrix built with the
same method that the curve to mesh node uses. The radius attribute is
divided by 10 so the points don't look absurdly huge in the viewport.
In the future that could be an option.

For the implementation, one thing that could use an improvement
is the amount of temporary allocations while resampling to evaluated
points before the final points. I expect that reusing a buffer for
each thread would give a nice improvement.

Differential Revision: https://developer.blender.org/D11539
2021-06-14 12:52:08 -05:00
Jacques Lucke
20ece8736f Fix T89001: node search not working anymore 2021-06-11 16:27:56 +02:00
Henrik Dick
df2a19eac7 Geometry Nodes: Add Convex Hull Node
This commit adds a node to output the convex hull of any input geometry
as a mesh, which is an enclosing geometry around a set of points.
All geometry types are supported, besides volumes.

The code supports operating on instances to avoid copying all input
geometry before the operation. The implementation uses the same backend
as the operation in edit mode, but uses Mesh directly instead of BMesh.

Attribute transfer is not supported currently, but would be a point of
improvement for the future if it can work in a predictable way on
different geometry input types.

Differential Revision: https://developer.blender.org/D10925
2021-06-09 11:58:08 -05:00
Campbell Barton
f29a738e23 PyAPI: use keyword only arguments
Use keyword only arguments for the following functions.

- addon_utils.module_bl_info 2nd arg `info_basis`.
- addon_utils.modules 1st `module_cache`, 2nd arg `refresh`.
- addon_utils.modules_refresh 1st arg `module_cache`.
- bl_app_template_utils.activate 1nd arg `template_id`.
- bl_app_template_utils.import_from_id 2nd arg `ignore_not_found`.
- bl_app_template_utils.import_from_path 2nd arg `ignore_not_found`.
- bl_keymap_utils.keymap_from_toolbar.generate 2nd & 3rd args `use_fallback_keys` & `use_reset`.
- bl_keymap_utils.platform_helpers.keyconfig_data_oskey_from_ctrl 2nd arg `filter_fn`.
- bl_ui_utils.bug_report_url.url_prefill_from_blender 1st arg `addon_info`.
- bmesh.types.BMFace.copy 1st & 2nd args `verts`, `edges`.
- bmesh.types.BMesh.calc_volume 1st arg `signed`.
- bmesh.types.BMesh.from_mesh 2nd..4th args `face_normals`, `use_shape_key`, `shape_key_index`.
- bmesh.types.BMesh.from_object 3rd & 4th args `cage`, `face_normals`.
- bmesh.types.BMesh.transform 2nd arg `filter`.
- bmesh.types.BMesh.update_edit_mesh 2nd & 3rd args `loop_triangles`, `destructive`.
- bmesh.types.{BMVertSeq,BMEdgeSeq,BMFaceSeq}.sort 1st & 2nd arg `key`, `reverse`.
- bmesh.utils.face_split 4th..6th args `coords`, `use_exist`, `example`.
- bpy.data.libraries.load 2nd..4th args `link`, `relative`, `assets_only`.
- bpy.data.user_map 1st..3rd args `subset`, `key_types, `value_types`.
- bpy.msgbus.subscribe_rna 5th arg `options`.
- bpy.path.abspath 2nd & 3rd args `start` & `library`.
- bpy.path.clean_name 2nd arg `replace`.
- bpy.path.ensure_ext 3rd arg `case_sensitive`.
- bpy.path.module_names 2nd arg `recursive`.
- bpy.path.relpath 2nd arg `start`.
- bpy.types.EditBone.transform 2nd & 3rd arg `scale`, `roll`.
- bpy.types.Operator.as_keywords 1st arg `ignore`.
- bpy.types.Struct.{keyframe_insert,keyframe_delete} 2nd..5th args `index`, `frame`, `group`, `options`.
- bpy.types.WindowManager.popup_menu 2nd & 3rd arg `title`, `icon`.
- bpy.types.WindowManager.popup_menu_pie 3rd & 4th arg `title`, `icon`.
- bpy.utils.app_template_paths 1st arg `subdir`.
- bpy.utils.app_template_paths 1st arg `subdir`.
- bpy.utils.blend_paths 1st..3rd args `absolute`, `packed`, `local`.
- bpy.utils.execfile 2nd arg `mod`.
- bpy.utils.keyconfig_set 2nd arg `report`.
- bpy.utils.load_scripts 1st & 2nd `reload_scripts` & `refresh_scripts`.
- bpy.utils.preset_find 3rd & 4th args `display_name`, `ext`.
- bpy.utils.resource_path 2nd & 3rd arg `major`, `minor`.
- bpy.utils.script_paths 1st..4th args `subdir`, `user_pref`, `check_all`, `use_user`.
- bpy.utils.smpte_from_frame 2nd & 3rd args `fps`, `fps_base`.
- bpy.utils.smpte_from_seconds 2nd & 3rd args `fps`, `fps_base`.
- bpy.utils.system_resource 2nd arg `subdir`.
- bpy.utils.time_from_frame 2nd & 3rd args `fps`, `fps_base`.
- bpy.utils.time_to_frame 2nd & 3rd args `fps`, `fps_base`.
- bpy.utils.units.to_string 4th..6th `precision`, `split_unit`, `compatible_unit`.
- bpy.utils.units.to_value 4th arg `str_ref_unit`.
- bpy.utils.user_resource 2nd & 3rd args `subdir`, `create`
- bpy_extras.view3d_utils.location_3d_to_region_2d 4th arg `default`.
- bpy_extras.view3d_utils.region_2d_to_origin_3d 4th arg `clamp`.
- gpu.offscreen.unbind 1st arg `restore`.
- gpu_extras.batch.batch_for_shader 4th arg `indices`.
- gpu_extras.batch.presets.draw_circle_2d 4th arg `segments`.
- gpu_extras.presets.draw_circle_2d 4th arg `segments`.
- imbuf.types.ImBuf.resize 2nd arg `resize`.
- imbuf.write 2nd arg `filepath`.
- mathutils.kdtree.KDTree.find 2nd arg `filter`.
- nodeitems_utils.NodeCategory 3rd & 4th arg `descriptions`, `items`.
- nodeitems_utils.NodeItem 2nd..4th args `label`, `settings`, `poll`.
- nodeitems_utils.NodeItemCustom 1st & 2nd arg `poll`, `draw`.
- rna_prop_ui.draw 5th arg `use_edit`.
- rna_prop_ui.rna_idprop_ui_get 2nd arg `create`.
- rna_prop_ui.rna_idprop_ui_prop_clear 3rd arg `remove`.
- rna_prop_ui.rna_idprop_ui_prop_get 3rd arg `create`.
- rna_xml.xml2rna 2nd arg `root_rna`.
- rna_xml.xml_file_write 4th arg `skip_typemap`.
2021-06-09 03:05:44 +10:00
Jacques Lucke
08b0de45f3 Geometry Nodes: new Select by Material node
This node creates a boolean face attribute that is "true" for
every face that has the given material.

Differential Revision: https://developer.blender.org/D11324
2021-06-08 16:01:54 +02:00
Johnny Matthews
ddd4b2b785 Geometry Nodes: Curve Length Node
This commit adds a node that outputs the total length of all
evalauted curve splines in a geometry set as a float value.

Differential Revision: https://developer.blender.org/D11459
2021-06-03 19:12:38 -04:00
Wannes Malfait
464797078d Geometry Nodes: Add Delete Geometry Node
This node is similar to the mask modifier, but it deletes the elements
of the geometry corresponding to the selection, which is retrieved as
a boolean attribute. The node currently supports both mesh and point
cloud data. For meshes, which elements are deleted depends on the
domain of the input selection attribute, just like how behavior depends
on the selection mode in mesh edit mode.

In the future this node will support curve data, and ideally volume
data in some way.

Differential Revision: https://developer.blender.org/D10748
2021-06-01 17:32:03 -04:00
Hans Goudey
11e32332dd Geometry Nodes: Add Mesh to Curve Node
This node creates poly curve splines from mesh edges. A selection
attribute input allows only using some of the edges from the mesh.
The node builds cyclic splines from branchless groups of edges where
possible, but when there is a three-way intersection, the spline stops.

The node also transfers all attributes from the mesh to the resulting
control points. In the future we could add a way to limit that to a
subset of the attributes to improve performance.

The algorithm is from Animation Nodes, written by @OmarSquircleArt.
I added the ability to use a selection, attribute transferring, and
used different variable names, etc, but other than that the algorithm
is the same.

Differential Revision: https://developer.blender.org/D11265
2021-05-28 10:42:22 -04:00
Charlie Jolly
8cd506639a Geometry Nodes: Add Shader Curve Nodes
Convert curve vec and curve rgb shader nodes to geometry nodes, based on node_shader_valToRgb.cc implementation.
2021-05-25 15:43:51 +01:00
Jacques Lucke
067587e329 Cleanup: remove unused function 2021-05-25 13:12:54 +02:00
Jacques Lucke
c154b078b5 Geometry Nodes: new Material Replace node
This node can change all faces that use a specific material to use a
different material. Using this node is significantly more efficient
than creating a selection from all faces with a specific material
index and then using the Material Assign node.

Ref T88055.

Differential Revision: https://developer.blender.org/D11325
2021-05-21 09:43:55 +02:00