Fix T80131: Rigid Body World Field Weights dont have a proper RNA path
(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
This commit is contained in:
parent
b248ec9776
commit
627132496d
Notes:
blender-bot
2023-02-14 08:49:53 +01:00
Referenced by issue #80131, Rigid Body World Field Weights dont have a proper RNA path (e.g. cannot be animated)
|
@ -26,6 +26,7 @@
|
|||
#include "DNA_object_types.h"
|
||||
#include "DNA_particle_types.h"
|
||||
#include "DNA_pointcache_types.h"
|
||||
#include "DNA_rigidbody_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
#include "RNA_define.h"
|
||||
|
@ -777,7 +778,18 @@ static char *rna_EffectorWeight_path(PointerRNA *ptr)
|
|||
}
|
||||
}
|
||||
else {
|
||||
Object *ob = (Object *)ptr->owner_id;
|
||||
ID *id = ptr->owner_id;
|
||||
|
||||
if (id && GS(id->name) == ID_SCE) {
|
||||
const Scene *scene = (Scene *)id;
|
||||
const RigidBodyWorld *rbw = scene->rigidbody_world;
|
||||
|
||||
if (rbw->effector_weights == ew) {
|
||||
return BLI_strdup("rigidbody_world.effector_weights");
|
||||
}
|
||||
}
|
||||
|
||||
Object *ob = (Object *)id;
|
||||
ModifierData *md;
|
||||
|
||||
/* check softbody modifier */
|
||||
|
|
Loading…
Reference in New Issue