Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Remove DNA headers, using forward declarations where possible.
Also removed duplicate header, header including it's self
and unnecessary inclusion of libc system headers from BKE header.
|
|
|
|
Replace `typedef` with `using` in C++ code.
In the case of `typedef struct SomeName { ... } SomeName;` I removed the
`typedef` altogether, as this is unnecessary in C++. Such cases have been
rewritten to `struct SomeName { ... };`
No functional changes.
|
|
|
|
Replace `NULL` with `nullptr` in C++ code.
No functional changes.
|
|
|
|
Was missed in rB9b6088cb9da4df1a893361997fc1a22986bf6f2e
|
|
|
|
The design for how we approach the "Everything Nodes" project
has changed. We will focus on a different part of the project initially.
While future me will likely refer back to some of the code I remove here,
there is no point in keeping this code around in master currently.
It would just confuse other developers working on the project.
This does not remove the simulation modifier and data block. Those are
just cleaned up, so that the boilerplate code can be reused in the future.
|
|
|
|
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
Cleanup old tracker task format to the new. e.g: [#34039] to T34039
Ref D8718
|
|
|
|
No functional changes
|
|
|
|
Also order sizeof(..) first to promote other values to size_t.
|
|
|
|
|
|
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule. This should be the final commit of the series of commits that
addresses this particular rule.
No functional changes.
|
|
Those were missing from the previous commit, because these headers
only exist in the `master` and not in the `blender-v2.90-release` branch.
|
|
|
|
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.
This patch has been generated by P1561 followed by `make format`.
Differential Revision: https://developer.blender.org/D8466
|
|
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.
|
|
Previously, there were only particle-birth and time-step events.
Now the solver can handle custom events. On the user level
this does not change anything yet. This feature of the solver
will be used by an upcoming Age Reached Event node and
possibly others. When this node exists, I can finally remove
the hardcoded maximum particle age.
|
|
Doing this change for consistency with the point cloud attributes.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
A particle action is some function that is triggered by some event.
Right now, users cannot control this. There is just a
randomize-velocity on-birth action. So the direction of spawned
particles is slightly randomized now.
This also adds a new integer attribute called "Hash" which is
useful for a number of things. Mainly for generating random numbers
for a specific particle. The ID of a particle is not necessarily a good source
of randomness.
|
|
This is a convenience wrapper for `Map<Key, Vector<Value>>`.
It does not provide any performance benefits (yet). I need this
kind of map in a couple of places and before I was duplicating
the lookup logic in many places.
|
|
Not sure if this is the correct fix, because I can't reproduce the error.
|
|
|
|
|
|
|
|
Particles are now emitted from vertices of the mesh.
|
|
I'll really have to refactor `ntreeUpdateTree` soon to avoid scanning
all node trees multiple times.
|
|
|
|
This solver should not be responsible for updating the handles.
|
|
|
|
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.
|
|
High quality emitters need to maintain state themselves. For example,
this it needs to remember when it spawned the last particle.
This is especially important when the birth rate is changing over time.
Otherwise, there will be very visible artifacts.
It is quite likely that other components of the simulation need their own
state as well. Therefore, I refactored the `SimulationState` type a bit,
to make it more extensible. Instead of using hardcoded type numbers, a
string is used to identify the state type. Also, instead of having switch
statements in many places, there is a new `SimulationStateType` that
encapsulates information about how a specific state is created/freed/copied/...
I removed the integration with the point cache for now, because it was
not used anyway in it's current state.
|