Age | Commit message (Collapse) | Author |
|
|
|
Even never-shown RNA properties should have at least a description, as
this is used by API doc generation scripts.
NOTE: this is more of an opportunistic set of changes than a proper
complete fix of that loack of documentation.
|
|
|
|
This shows the text as part of the assertion message.
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
|
|
|
|
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
|
|
The `object.collision.use` flag was treated as a redundant marker
of the existence of the modifier, going as far as adding/removing
it when the value was changed, which is not actually very useful.
Removing the modifier loses its position in the stack, and requires
a dependency graph rebuild. It feels it may be a legacy flag?
What would be useful however is the ability to toggle collisions
dynamically without removing the modifier. This patch adjusts the
code to keep the modifier when the flag is disabled, and add it
if it doesn't exist when the flag is enabled. The modifier now
checks the flag at the start and quickly exits after cleaning
up stale data. The redesigned setting is exposed in the UI.
Collisions can't be disabled by simply using the modifier enable
flags because the modifier merely saves a snapshot of the mesh at
a certain point of the modifier stack for other objects to use,
and thus has to be able to clear the stale data.
Differential Revision: https://developer.blender.org/D10064
|
|
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.
|
|
Forgot to run Make Format on recent spelling changes
|
|
Use 'and' instead of ampersand in descriptions and comments.
Differential Revision: https://developer.blender.org/D9797
Reviewed by Aaron Carlisle
|
|
Prepare for `BLI_str_unescape` which doesn't read well
without the separator.
|
|
dynamic paint modifiers
Looks like prior to the introduction of mantaflow, the former
SmokeModifierData always had a domain initialized (even if its type was
set to None). Since mataflow, the FluidModifierData type needs to be set
to MOD_FLUID_TYPE_DOMAIN (otherwise domain is invalid)
Maniphest Tasks: T82729
Differential Revision: https://developer.blender.org/D9644
|
|
|
|
Note that due to convoluted layout of point caches in RNA (active one
also storing list of all available ones), we'll often have the
pointcache overrides rules twice. Should not be a huge problem,
practically speaking.
Part of first step of T82503: support disk cache in liboverrides.
|
|
Use "Rotation" in place of "Rot" for the rotation header text.
Cleanup various RNA titles and tooltips.
Differential Revision: https://developer.blender.org/D9457
|
|
(e.g. cannot be animated)
An RNA path is mandatory for RNA_path_from_ID_to_property, and for
EffectorWeights, this has to be provided using RNA_def_struct_path_func
(since this struct is shared across ParticleSettings, Modifiers and Rigid
Body World). Without this, the animation system cannot work and e.g.
keyframes cannot be inserted.
The case for Rigid Body World in rna_EffectorWeight_path was missing,
now added.
Rigid Body World Field Weights are capable of being animated, tested
with file from T80131 (e.g. gravity, wind).
Maniphest Tasks: T80131
Differential Revision: https://developer.blender.org/D8713
|
|
|
|
It was always possible to set it to zero by typing in the value.
This new soft limit is more consistent with the fluid cache
and the Scene.frame_start property.
|
|
rna_EffectorWeight_path() needs to point to "domain_settings" (instead
of "settings"), was a missing change when switching the FluidModifier to
mantaflow.
Maniphest Tasks: T79264
Differential Revision: https://developer.blender.org/D8398
|
|
Duplication and deletion code of modifiers was totally wrong for
particle system, that special weird thing needs its own custom
management.
Note that for now I chose not to duplicate the particle settings ID when
duplicating the modifier...
|
|
Changed variable names from mmd, mds, mfs, and mes to fmd, fds, ffs, and fes. The author of this commits lights a candle for all the merge conflicts this will cause.
|
|
Currently all force effectors can only act on cloth when the force is
perpendicular to the surface. This makes sense for wind, but not for
other forces; and the user may want even wind to have some friction.
This changes effector code to output two force vectors - although
you of course can pass the same pointer for both. The force is split
between the two outputs based on a new per-effector setting.
Differential Revision: https://developer.blender.org/D8017
|
|
Reviewers: brecht
Differential Revision: https://developer.blender.org/D7965
|
|
Better to use more general term since in theory these forces can be used for smoke and liquid.
|
|
|
|
Give pointcaches a proper path function which e.g. also resolves
ALT+click (assign to all selected) not working for anything relating to
pointcaches.
This also cleans up the usage of the 'eModifierTypeFlag_UsesPointCache'
flag (removed from the boolean modifier, added to the softbody modifier).
Maniphest Tasks: T64573
Differential Revision: https://developer.blender.org/D7115
|
|
|
|
A collection of smaller changes that are required in the /blender/source files. A lot of them are also due to variable renaming.
Reviewed By: sergey
Maniphest Tasks: T59995
Differential Revision: https://developer.blender.org/D3855
|
|
keyframed
'rna_CollisionSettings_update' has a history of tagging ob for update:
rB79312c1912b4 ID_RECALC_TRANSFORM |ID_RECALC_GEOMETRY |
ID_RECALC_ANIMATION
rBf90a2123eedc OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME
rBfaf1c9a4bb27 OB_RECALC_ALL
rB7df35db1b136 OB_RECALC
Since the meaning of OB_RECALC_TIME/ID_RECALC_ANIMATION changed a bit
historically (from "please update my animation if the animation
datablock is tagged for update" to "update animation of this datablock")
this was now always overwriting user edit with animated values, making
it impossible to change those values once animated.
Thx @sergey for guidance!
Maniphest Tasks: T68396
Differential Revision: https://developer.blender.org/D6113
|
|
Differential Revision: https://developer.blender.org/D5716
|
|
|
|
|
|
Issue was exposed by recent own rB03bf84db86b commit, but was actually
present in RNA API for PointCaches since (probably) ages: whole accessor
code here was assuming that owner ID was an Object, when it is actually
a scene for RigidBody simulations...
Had also to make `BKE_ptcache_id_find()` and friends a bit more
flexible, now they also accept a NULL object pointer parameter...
|
|
Patch by Yevgeny Makarov (jenkm)
Differential Revision: D5514
|
|
The old layout of `PointerRNA` was confusing for historic reasons:
```
typedef struct PointerRNA {
struct {
void *data;
} id;
struct StructRNA *type;
void *data;
} PointerRNA;
```
This patch updates it to:
```
typedef struct PointerRNA {
struct ID *owner_id;
struct StructRNA *type;
void *data;
} PointerRNA;
```
Throughout the code base `id.data` was replaced with `owner_id`.
Furthermore, many explicit pointer type casts were added which
were implicit before. Some type casts to `ID *` were removed.
Reviewers: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D5558
|
|
|
|
i18n code does not work from threads on some plaforms, so it is disabled
in Blender when called from non-main thread.
Means that we have to go to a slightly different approach, with dirty
tag and generating string on request for UI.
Note: Also had to update the `info` string size, to fit with expensive
asiatic scripts in utf-8... Using mem for that kind of runtime data is
not really nice, but for now it will have to do.
|
|
animation
|
|
|
|
While not exactly optimal, that's the only disambiguation solution I
found doable for translations (i18n). ID names tend to sneak
everywhere, including in places where we have no access to i18n context
currently (like menu labels e.g.).
Other alternative would have been to use 'Lightweight', but that is a
tad too long, we love short UI messages as much as possible.
The genius who decided that it was critical to rename ID lamp to light
in 2.8 is welcome to find a better solution...
Part of T43295.
|
|
|
|
Force fields requires relations update in the dependency graph.
|
|
There is no more sorting happening, so the comment is out of date
by manu reasons. If something extra is needed there it would need
to be done differently anyway.
|
|
Previous cleanups didn't account for space after '#'.
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
|
|
|
|
Effect vs Affect
|