Age | Commit message (Collapse) | Author |
|
Cleanup old tracker task format to the new. e.g: [#34039] to T34039
Ref D8718
|
|
|
|
- reduce variable scope
- use bool instead of int
- use LISTBASE_FOREACH
|
|
|
|
|
|
This is part of T76372.
It adds the `blend_write`, `blend_read_data`, `blend_read_lib`
and `blend_read_expand` which correspond to the various
steps when reading and writing .blend files.
Having these callbacks allows us to decentralize the blenloader
code a lot more. This has the affect that code related to any
specific ID type is less scattered.
Reviewers: mont29
Differential Revision: https://developer.blender.org/D8670
|
|
Also order sizeof(..) first to promote other values to size_t.
|
|
Add a `NOLINT` marker to explicitly silence a warning from Clang-Tidy's
`readability-function-size` rule for the `node_type_base()` function.
This function is indeed huge, but that is because a lot of macros are
expanded. Before expansion things are still not small, but still
understandable & expandable.
No functional changes.
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenkernel` module.
No functional changes.
|
|
The hardcoded age limit is now gone. The behavior can be implemented
with an Age Reached Event and Kill Particle node. Other utility nodes
to handle age limits of particles can be added later. Adding an
Age Limit attribute to particles on birth will be useful for some effects,
e.g. when you want to control the color or size of a particle over its
life time.
The Random Float node takes a seed currently. Different nodes will
produce different values even with the same seed. However, the same
node will generate the same random number for the same seed every
time. The "Hash" of a particle can be used as seed. Later, we'd want
to have more modes in the node to make it more user friendly.
Modes could be: Per Particle, Per Time, Per Particle Per Time,
Per Node Instance, ...
Also a Random Vector node will be useful, as it currently has to be
build using three Random Float nodes.
|
|
The following nodes work now (although things can still be improved of course):
Particle Birth Event, Praticle Time Step Event, Set Particle Attribute and Execute Condition.
Multiple Set Particle Attribute nodes can be chained using the "Execute" sockets.
They will be executed from left to right.
|
|
I'll really have to refactor `ntreeUpdateTree` soon to avoid scanning
all node trees multiple times.
|
|
|
|
A simulation data block has an embedded node tree, which requires
special handling in a couple of places. Some of those places were
missing beforehand.
This also adds a relation to make sure that the simulation is evaluated
after animations on the embedded node tree are evaluated.
|
|
Object sockets work now, but only the new Object Transforms and the
Particle Mesh Emitter node use it. The emitter does not actually
use the mesh surface yet. Instead, new particles are just emitted around
the origin of the object.
Internally, handles to object data blocks are passed around in the network,
instead of raw object pointers. Using handles has a couple of benefits:
* The caller of the function has control over which handles can be resolved
and therefore limit access to specific data. The set of data blocks that
is accessed by a node tree should be known statically. This is necessary
for a proper integration with the dependency graph.
* When the pointer to an object changes (e.g. after restarting Blender),
all handles are still valid.
* When an object is deleted, the handle is invalidated without causing crashes.
* The handle is just an integer that can be stored per particle and can be cached easily.
The mapping between handles and their corresponding data blocks is
stored in the Simulation data block.
|
|
|
|
Since the function only iterates over the input members,
and matches their identifiers, `bNode *`can be `const`.
All other usages of the `nodeFindSocket` use it with
other functions that modify the node. (e.g.: ``nodeAddLink` )
But an exporter needs the node to be a `const`, so this
creates unnecessary and slightly unsafe design changes.
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D8142
|
|
Make it clear that this is the absolute path,
allow the 'name' to be renamed to 'filepath'.
Rename is safe since this is only for run-time.
|
|
|
|
- no sockets on Frame nodes
- no Input sockets on Group Input nodes
- no Output sockets on Group Output nodes
Maniphest Tasks: T76538
Differential Revision: https://developer.blender.org/D7671
|
|
|
|
Reviewers: brecht
Differential Revision: https://developer.blender.org/D7494
|
|
Reviewers: mont29
Differential Revision: https://developer.blender.org/D7476
|
|
Reviewers: brecht
Differential Revision: https://developer.blender.org/D7424
|
|
This commit adds the initial set of particles nodes. These are fairly
low level and are expected to be put into groups that we ship with Blender.
See D7384 for a description of the individual nodes.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D7384
|
|
These socket types will be necessary for particle nodes.
The way these sockets are drawn can be changed separately.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D7349
|
|
Those new socket types will be necessary for particle nodes.
The main difficulty with adding these socket types is that they
are the first that reference ID data in their `value`.
Therefore, user counting code had to be added in a couple new places.
Reviewers: brecht, mont29
Differential Revision: https://developer.blender.org/D7347
|
|
This adds an embedded node tree to the simulation data block dna.
The UI in the `Simulation Editor` has been updated to show a list
of simulation data blocks, instead of individual node trees.
The new `SpaceNodeEditor.simulation` property wraps the existing
`SpaceNodeEditor.id` property. It allows scripts to get and set
the simulation data block that is being edited.
Reviewers: brecht, mont29
Differential Revision: https://developer.blender.org/D7301
|
|
This implements a new builtin node tree type called `SimulationNodeTree`.
It is not yet embedded in the `Simulation` data block.
The node tree will initially be used for the new particle nodes system.
When the cmake option `WITH_NEW_SIMULATION_TYPE` is enabled, a new
`Simulation Editor` is shown in the editors menu (which is just a node editor).
This patch does not add entries to the Add Node menu, so it is empty.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D7287
|
|
Note this only changes cases where the variable was declared inside
the for loop. To handle it outside as well is a different challenge.
Differential Revision: https://developer.blender.org/D7320
|
|
Makes it more clear that code using this is related to the RNA
integration of a type.
Part of T74432.
Also ran clang-format on affected files.
|
|
The `BKE_animsys.h` and `anim_sys.c` files already had a an "AnimData
API" section. The code in that section has now been split off, and
placed into `BKE_anim_data.h` and `anim_data.c`.
All files that used to include `BKE_animsys.h` have been adjusted to
only include the animation headers they need (sometimes none).
No functional changes.
|
|
|
|
|
|
'Private' can be a rather confusing term, especially when considering
its meaning in programming languages.
So now root node trees and master collections are 'embedded' IDs
instead.
|
|
This has been long standing TODO...
Note that remaining usages of BKE_xxx_delete should all be carefully
checked for and utilmately nuked in favor of `BKE_id_delete()`, think we
still have quiet a few bugs hidden in those (code seems to usually
assume those functions do a full ID deletion, which is not the case).
|
|
|
|
Currently the link limit of sockets is stored in bNodeSocket->limit.
This allows for a lot of flexibility, but is also very redundant.
In every case I've had to deal with so far, it would have "more correct"
to set the link limit per socket type and not per socket. I did not enforce
this constraint yet, because the link limit is exposed in the Python API,
which I did not want to break here.
In the future it might even make sense to only support only three kinds of link limits:
a) no links, b) at most one link, c) an arbitrary number links links. The other link
limits usually don't work well with tools (e.g. which link should be removed when a new
one is connected?) and is not used in practice. However, that is for another day.
Eventually, I would like to get rid of bNodeSocket->limit completely and replace it
either with fixed link limits or a callback in bNodeSocketType.
This patch consists of three parts:
**1. Support defining link limit in socket type**
This introduces a new `nodeSocketLinkLimit` function that serves as an indirection to
hide where the link limit of a socket is defined.
**2. Define link limits for builtin sockets on socket type**
Data sockets: one input, many outputs
Virtual sockets: one input, one output
Undefined sockets: many inputs, many outputs (to avoid that links are removed when the type of the socket is not known)
**3. Remove `bNodeSocketTemplate->limit`**
This wasn't used anymore after the second commit. Removing it simplifies socket definitions
in hundreds of places and removes a lot of redundancy.
Differential Revision: https://developer.blender.org/D7038
Reviewers: brecht
|
|
Instead of using anonymous booleans flags, also allows to keep the same
behavior in all cases, without needing special handling from calling
code for our beloved oddballs object proxies...
|
|
This info is now stored in ID tags themselves, so no need to pass an
extra anonymous boolean parameter around, yay!
|
|
Also removed some only used locally from the header, `BKE_lib_id.h`
is already way too big, no need to overload it with unused things.
|
|
Reviewers: brecht
Differential Revision: https://developer.blender.org/D6963
|
|
This node provides the ability to rotate a vector around a `center` point using either `Axis Angle` , `Single Axis` or `Euler` methods.
Reviewed By: #cycles, brecht
Differential Revision: https://developer.blender.org/D3789
|
|
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D6375
|
|
Note that `BKE_library.h`/`library.c` were renamed to
`BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here.
Part of T72604.
|
|
|
|
|
|
Nice reversed-logic mistake in rB693721cc7e7d.
How this could remain unnoticed for almost one year is fairly
mysterious, this should have basically broke all node tree copying,
would expect such bug to get reported within days, weeks at most...
Probably because that function is not that much used in current code.
Nice reminder also that those bloody nodetrees still need a lot of
cleanup/refactor/simplification when it comes to ID management code.
Reported/fixed as part of D6484, but this really needs its own commit.
|
|
Custom render passes are added in the Shader AOVs panel in the view layer
settings, with a name and data type. In shader nodes, an AOV Output node
is then used to output either a value or color to the pass.
Arbitrary names can be used for these passes, as long as they don't conflict
with built-in passes that are enabled. The AOV Output node can be used in both
material and world shader nodes.
Implemented by Lukas, with tweaks by Brecht.
Differential Revision: https://developer.blender.org/D4837
|
|
This is only supposed to happen when copying nodes that are part of the user
editable database, not temporary copies for the dependency graph.
The LIB_ID_COPY_LOCALIZE test was wrong because it is a combination of multiple
bitflags as pointed out by Bastien, and was actually redundant anyway since
LIB_ID_CREATE_NO_MAIN is part of it.
|