Age | Commit message (Collapse) | Author |
|
This adds a callback to bNodeTreeType to check which socket types are
valid for the tree type. Function has been implemented for the normal
tree types, and can be implemented for custom node trees with python,
by adding a `classmethod` to the tree. However, only builtin socket
types are supported.
This is relevant for T87049, but it also has the advantage that it is
now clear which node trees support which sockets. Previously this
was assumed to be known by all developers.
Differential Revision: https://developer.blender.org/D10938
|
|
This patch adds the Randomize options that exist in the Array modifier to the offset modifier.
Currently the patch uses
```
BLI_findindex(&gpf->strokes, gps);
```
to get the index of the current stroke for making each stroke a different seed value. This is how the noise modifier also gets the stroke seed value and it is noted there as well that this method is slow, and should be fixed in the future with another method of getting the stroke index.
Other methods were explored such as using the total number of points of the stroke, but that makes the randomize options incompatible with other modifiers before it such as Multiple Strokes, Array, Build, and Simplify.
{F9591325}
Differential Revision: https://developer.blender.org/D10171
|
|
Thickness modifiers
This patch allows you to dynamically control stroke's opacity and thickness using an object for distance reference in the modifier. Fading range is adjustable, and it is compatible with current curve/vertex group selection.
Reviewed By: #grease_pencil, antoniov, mendio
Maniphest Tasks: T82177, T80194
Differential Revision: https://developer.blender.org/D9091
|
|
|
|
Use WM_operator_properties_create_ptr so the owner_id is
set to the window manger which is now required.
Regression in 919558854d624f5db40acfa9f5674ac8c94873b6.
|
|
We shouldn't abbreviate words like this in the UI. "Int" is just a
programming term.
|
|
This is a first version of an Attribute Transfer node. It only supports two
modes for mapping attributes from one geometry to another for now.
More options are planned for the future.
Ref T87421.
Differential Revision: https://developer.blender.org/D11037
|
|
Correction to Prefs tooltip mention of 'add-ons' folder in Scripts Dir.
Differential Revision: https://developer.blender.org/D11064
Reviewed by Harley Acheson
|
|
|
|
- Re-order freeing so an instances __del__ method runs before the
`ExtensionRNA` has been freed.
- "remove" functions no longer free the gizmo/gizmo-group memory,
needed so the identifier used when freeing the extension
doesn't use the freed identifier.
|
|
Makes the functions (introduced in 557b3d2762a6) follow existing naming
conventions for the API.
Changes:
`bpy.types.ID.mark_asset` to `bpy.types.ID.asset_mark`
`bpy.types.ID.clear_asset` to `bpy.types.ID.asset_clear`
|
|
|
|
The `bisect_distance` in the mirror modifier was hard-coded to `0.001`.
This would result in some unexpected behavior like vertices close
to the mirror plane being deleted or merged.
The fix now adds a parameter to the mirror modifier to expose the
bisect distance to the user. The default is set to the previous
hard-coded value to not "change" previous files.
Ref D10201
|
|
Not a big deal, but nice to avoid notifiers when no change was done.
|
|
Adds `mark_asset()` and `clear_asset()` to ID data-blocks, e.g.
`bpy.context.active_object.mark_asset()`. They essentially do the same as the
mark and clear asset operators.
Scripts are generally discouraged from using operators where possible, but we
need to provide API functions to use instead. In this case it means scripts
don't have to override context to pass an ID to the operator.
|
|
|
|
This is a first iteration of a switch node. It can only switch between
two inputs values based on a boolean. A more sophisticated switch
node that has an integer selector will probably come later.
Currently, the geometry nodes evaluator does not support lazy evaluation
of individual inputs. Therefore, all inputs will be computed currently.
An improvement to the evaluator will be worked on separately.
Ref: T85374
Differential Revision: https://developer.blender.org/D10460
|
|
Keymap UI and import/export could depend on the current
context for dynamic enum's.
Use STRUCT_NO_CONTEXT_WITHOUT_OWNER_ID for OperatorProperties.
|
|
This flag is needed so PointerRNA structs that aren't
part of the current context can access enum values
without inspecting the context.
This is needed for keymap access, so the keymap UI and keymap
export doesn't depend on the current context.
|
|
The NULL context is used to extract items for document generation.
|
|
`make lite` does not use audaspace, so some files will pollute the console with
tons of warnings about audio values not defined.
Reviewed By: nexyon, campbellbarton
Differential Revision: https://developer.blender.org/D10981
|
|
The text was not changed in the refactor and had the old text.
|
|
This introduces a context path to the spreadsheet editor, which contains
information about what data is shown in the spreadsheet. The context
path (breadcrumbs) can reference a specific node in a node group
hierarchy. During object evaluation, the geometry nodes modifier checks
what data is currently requested by visible spreadsheets and stores
the corresponding geometry sets separately for later access.
The context path can be updated by the user explicitely, by clicking
on the new icon in the header of nodes. Under some circumstances,
the context path is updated automatically based on Blender's context.
This patch also consolidates the "Node" and "Final" object evaluation
mode to just "Evaluated". Based on the current context path, either
the final geometry set of an object will be displayed, or the data at
a specific node.
The new preview icon in geometry nodes now behaves more like
a toggle. It can be clicked again to clear the context path in an
open spreadsheet editor.
Previously, only an object could be pinned in the spreadsheet editor.
Now it is possible to pin the entire context path. That allows two
different spreadsheets to display geometry data from two different
nodes.
The breadcrumbs in the spreadsheet header can be collapsed by
clicking on the arrow icons. It's not ideal but works well for now.
This might be changed again, if we get a data set region on the left.
Differential Revision: https://developer.blender.org/D10931
|
|
With this patch, users can define custom tooltips for the exposed
properties of their Geometry Nodes Groups.
Currently this custom tooltips are only used in the modifier panel,
but its a long term goal to use it in the node editor.
Reviewer: Hans Goudey
Differential Revision: https://developer.blender.org/D10884
|
|
This implements the changes discussed in T87134 for including switch
object funcionality in 2.93. This includes:
- Remove the switch object operator experimental option
- Remove the option for switching objects in Edit Mode.
- Rename switch_object to transfer_mode.
- Enable the operator only in sculpt mode.
- Expose the operator in the Sculpt menu with an eyedropper modal
option.
On later releases, we could revisit enabling the operator in other mode
and object types as well as its place in the UI.
Reviewed By: JulienKaspar, JacquesLucke
Differential Revision: https://developer.blender.org/D10953
|
|
Ref T86821.
Differential Revision: https://developer.blender.org/D10962
|
|
Entering the numbers in the keyframe field was not triggering a viewport
update, so the little green lines down in the cache area were only
change when the user e.g. changed the frame.
Now send appropriate notifiers.
Issue spotted in T86456 by sebastian_k.
Maniphest Tasks: T86456
Differential Revision: https://developer.blender.org/D10963
|
|
Differential Revision: https://developer.blender.org/D8908
|
|
This is especially useful when trying to add a node group instance, e.g. via
drag & drop from the Outliner or Asset Browser.
Previously this would just silently fail, with no information why. This is a
source of confusion, e.g. earlier, it took me a moment to realize I was
dragging a node group into itself, which failed of course.
Blender should always try to help the user with useful error messages.
Adds error messages like: "Nesting a node group inside of itself is not
allowed", "Not a compositor node tree", etc.
Adds a disabled hint return argument to node and node tree polling functions.
On error the hint is reported, or could even be shown in advance (e.g. if
checked via an operator poll option).
Differential Revision: https://developer.blender.org/D10422
Reviewed by: Jacques Lucke
|
|
A few strings describing RNA objects were wrong, including copy/paste errors, spelling and case.
Reviewed By: Blendify
Differential Revision: https://developer.blender.org/D10899
|
|
|
|
Share macro for setting BLI_Iterator defaults to ensure
this doesn't happen again in cases the ITER_* macros aren't used.
Oversight in 14d74fb34174a91190d35d7fe595f8dd64cb79d1.
|
|
This is a minor change to add some plumbing code
to support custom geo nodes. This is working the
same way as the custom cycles and compositor nodes.
An example add-in is attached to D10784
Reviewed By: JacquesLucke
Differential Revision: http://developer.blender.org/D10784
|
|
The problem was that you could getting write access to a grid from a
`const Volume *` without breaking const correctness. I encountered this
when working on support for volumes in the bounding box node. For
geometry nodes there is an important distinction between getting data
"for read" and "for write", with the former returning a `const` version
of the data.
Also, for volumes it was necessary to cast away const, since all of
the relevant functions in `volume.cc` didn't have const versions. This
patch adds `const` in these places, distinguising between "for read"
and "for write" versions of functions where necessary.
The downside is that loading and unloading in the global volume cache
needs const write-access to some member variables. I see that as an
inherent problem that comes up with caching that never has a beautiful
solution anyway.
Some of the const-ness could probably be propogated futher in EEVEE
code, but I'll leave that out, since there is another level of caching.
Differential Revision: https://developer.blender.org/D10916
|
|
Previously, the spreadsheet editor could only show data of the original
and of the final evaluated object. Now it is possible to show the data
at some intermediate stages too.
For that the mode has to be set to "Node" in the spreadsheet editor.
Furthermore, the preview of a specific node has to be activated by
clicking the new icon in the header of geometry nodes.
The exact ui of this feature might be refined in upcoming commits.
It is already very useful for debugging node groups in it's current
state though.
Differential Revision: https://developer.blender.org/D10875
|
|
The issue was that where_on_path uses a resampled curve to get the data
from the curve. This leads to disconnects between the curve the user
sees and the evaluated location data.
To fix this we simply use the actual curve data the user can see.
The older code needed a cleanup either way as there were hacks in other
parts of the code trying to work around some brokenness. This is now
fixed and we no longer need to clamp the evaluation range to 0-1 or make
helper functions to make it do what we actually want.
Reviewed By: Campbell, Sybren
Differential Revision: http://developer.blender.org/D10898
|
|
While the existing behavior worked as intended,
it wasn't possible to have two views on the same file at different
locations.
Since there isn't much use in having two views open at the same location
allow one view to be at a different scroll location.
UI edit-source and selecting a text data block now need explicit calls
to scroll to the cursor location.
Resolves T87284
|
|
|
|
This is a minimal, information-only view currently, listing by default
all the override data-blocks, with their user-edited override
properties.
System-generated overrides (like the overrides of pointers to other
override data-blocks) can be shown through a filter option.
Finally, potential info or warning messages from (auto-)resync propcess
are also shown, as an icon + tooltip next to the affected items.
Part of D10855.
|
|
Tweaking e.g. a field strength would then not use the curve/surface
normal anymore [but the object center instead].
If a curve has a forcefield with effector shape Curve (in code its shape
is PFIELD_SHAPE_SURFACE then), it wil get a SurfaceModifier.
Changing properties will free the SurfaceModifierData's bvhtree and mesh
And these dont get copied along when doing the CoW copy, these are
explicitly set to NULL. So this was also failing for meshes, not just
curves.
Without the mesh & bvhtree though, get_effector_data() will not set the
EffectorData's normal correctly (it is closest_point_on_surface() which
does this). And without the right EffectorData's normal, the effector
will of course work unexpected.
Going in and out of editmode made this work because that goes down this
route:
- BKE_object_handle_data_update
- BKE_displist_make_curveTypes
- do_makeDispListCurveTypes
- curve_calc_modifiers_post
-- BKE_mesh_new_nomain_from_curve_displist
-- we then have our desired updated mesh from the curve
-- this will also call the SurfaceModifiers deformVerts [which - given we
have a valid mesh - will update the bvhtree properly]
Also note that _animating_ the effector actually works, (have not done
the deep dive why this works, assume the curve geometry is updated in
this case)
So, now just carefully tag the curve ID_RECALC_GEOMETRY in
rna_FieldSettings_update for this specific case.
Maniphest Tasks: T84623
Differential Revision: https://developer.blender.org/D10092
|
|
Caused by rB0f95f51361d7.
Similar to T85515, T84717, T85543 and their related fixes.
In this case, add missing shading notifier as in rB9274bd457a25.
Reviewed By: brecht, lichtwerk
Maniphest Tasks: T86175
Differential Revision: https://developer.blender.org/D10604
|
|
Reading Area.type & ui_type printed an error from `pyrna_enum_to_py`
and returned an empty string.
As empty is a valid value, include it in the property enum list.
|
|
For Cycles, when enabling the Persistent Data option, the full render data
will be preserved from frame-to-frame in animation renders and between
re-renders of the scene. This means that any modifier evaluation, BVH
building, OpenGL vertex buffer uploads, etc, can be done only once for
unchanged objects. This comes at an increased memory cost.
Previously there option was named Persistent Images and had a more limited
impact on render time and memory.
When using multiple view layers, only data from a single view layer is
preserved to keep memory usage somewhat under control. However objects
shared between view layers are preserved, and so this can speedup such
renders as well, even single frame renders.
For Eevee and Workbench this option is not available, however these engines
will now always reuse the depsgraph for animation and multiple view layers.
This can significantly speed up rendering.
These engines do not support sharing the depsgraph between re-renders, due
to technical issues regarding OpenGL contexts. Support for this could be added
if those are solved, see the code comments for details.
|
|
Materials used in grease pencil modifiers have the requirement that they
are already used on the object. In the UI dropdown, this restriction is
ensured by calling uiItemPointerR with appropriate searchptr and
searchpropname, so only giving the user the choice of materials already
used on the object.
From python though, it was still possible to assign materials outside of
this this restriction. This led to reports like T86981 [which have been
partially solved by clamping the material index in the modifier code to
be in the valid range].
Now make sure we dont assign "invalid" materials through RNA by
appropriate RNA pointer functions.
This also adds a proper warning (red, alert) in case of the LineArt
modifier if such a invalid material is still in the file [same as other
modifiers already do].
Differential Revision: https://developer.blender.org/D10873
|
|
This allows easily changing the scale attribute with a uniform scale
within a single simple node.
|
|
Before this change, you could have the new sculpt symmetry code and the
older weight paint symmetry code active at the same time. This would
lead to users easily trashing their weigh paint data if they were not
careful when switching between modes.
Now the specific weight paint symmetry code is an exclusive toggle so
the user can't accidentally mirror strokes and vertex groups at the same
time. This also paves the way of supporting Y and Z symmetry in the
future for weight groups mirroring if we decide to add it in the future.
Reviewed By: Sybren
Differential Revision: http://developer.blender.org/D10426
|
|
This commit improves the performance of the node by up to 40% in some
cases when there are only two input meshes, mainly by skipping the
conversion to and from BMesh.
When there are more than two input meshes (note the distinction from
"Geometries", a geometry set can have many mesh instances), the
performance is actually worse, since boolean currently always does
self intersection in that case. Theoretically this could be improved
in the boolean code, or another option is automatically realizing
instances for each input geometry set.
Another improvement is using multi-input sockets for the inputs, which
removes the need to have a separate boolean node for every operation,
which can hopefully simplify some node trees.
The changes necessary for transforms in `mesh_boolean_convert.cc` are
somewhat subtle; they come from the fact that the collecting the
geometry set instances already gives transforms in the local space
of the modifier object. There is also a very small amount of cleanup
to those lines, using `float4x4::identity()`.
This commit also fixes T87078, where overlapping difference meshes
makes the operation not work, though I haven't investigated why.
Differential Revision: https://developer.blender.org/D10599
|
|
This fixes T86440
As the CU_2D flag is set for nurbs, a Curve can have 2D nurbs mixed with 3D.
But the UI does not allow this mixing. It updates all nurbs to 2D or 3D when set.
So remove this specific flag for nurbs.
This may break old files, since 2D curves with mixed 3D are now set as 3D.
Differential Revision: https://developer.blender.org/D10738
|
|
After some back and forth with the GP module and some artists, this
option was deemed not that useful. The use case was considered too
obscure so we'll remove it.
It is still posible to have this functionality by using the vertex
weight modiifers or manually clamping the weights.
|
|
This can be done with an other GP modifier already.
|