Merge branch 'blender-v3.3-release'
This commit is contained in:
commit
047d0e6c4a
|
@ -449,7 +449,7 @@ static void object_foreach_id(ID *id, LibraryForeachIDData *data)
|
|||
|
||||
if (object->soft->effector_weights) {
|
||||
BKE_LIB_FOREACHID_PROCESS_IDSUPER(
|
||||
data, object->soft->effector_weights->group, IDWALK_CB_NOP);
|
||||
data, object->soft->effector_weights->group, IDWALK_CB_USER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,7 +171,7 @@ static void particle_settings_foreach_id(ID *id, LibraryForeachIDData *data)
|
|||
}
|
||||
|
||||
if (psett->effector_weights) {
|
||||
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, psett->effector_weights->group, IDWALK_CB_NOP);
|
||||
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, psett->effector_weights->group, IDWALK_CB_USER);
|
||||
}
|
||||
|
||||
if (psett->pd) {
|
||||
|
|
|
@ -1176,6 +1176,9 @@ RigidBodyWorld *BKE_rigidbody_world_copy(RigidBodyWorld *rbw, const int flag)
|
|||
|
||||
if (rbw->effector_weights) {
|
||||
rbw_copy->effector_weights = MEM_dupallocN(rbw->effector_weights);
|
||||
if ((flag & LIB_ID_CREATE_NO_USER_REFCOUNT) == 0) {
|
||||
id_us_plus((ID *)rbw->effector_weights->group);
|
||||
}
|
||||
}
|
||||
if ((flag & LIB_ID_CREATE_NO_USER_REFCOUNT) == 0) {
|
||||
id_us_plus((ID *)rbw_copy->group);
|
||||
|
@ -1205,9 +1208,9 @@ void BKE_rigidbody_world_groups_relink(RigidBodyWorld *rbw)
|
|||
|
||||
void BKE_rigidbody_world_id_loop(RigidBodyWorld *rbw, RigidbodyWorldIDFunc func, void *userdata)
|
||||
{
|
||||
func(rbw, (ID **)&rbw->group, userdata, IDWALK_CB_NOP);
|
||||
func(rbw, (ID **)&rbw->constraints, userdata, IDWALK_CB_NOP);
|
||||
func(rbw, (ID **)&rbw->effector_weights->group, userdata, IDWALK_CB_NOP);
|
||||
func(rbw, (ID **)&rbw->group, userdata, IDWALK_CB_USER);
|
||||
func(rbw, (ID **)&rbw->constraints, userdata, IDWALK_CB_USER);
|
||||
func(rbw, (ID **)&rbw->effector_weights->group, userdata, IDWALK_CB_USER);
|
||||
|
||||
if (rbw->objects) {
|
||||
int i;
|
||||
|
@ -1424,7 +1427,7 @@ static bool rigidbody_add_object_to_scene(Main *bmain, Scene *scene, Object *ob)
|
|||
|
||||
if (rbw->group == NULL) {
|
||||
rbw->group = BKE_collection_add(bmain, NULL, "RigidBodyWorld");
|
||||
id_fake_user_set(&rbw->group->id);
|
||||
id_us_plus(&rbw->group->id);
|
||||
}
|
||||
|
||||
/* Add object to rigid body group. */
|
||||
|
@ -1453,7 +1456,7 @@ static bool rigidbody_add_constraint_to_scene(Main *bmain, Scene *scene, Object
|
|||
|
||||
if (rbw->constraints == NULL) {
|
||||
rbw->constraints = BKE_collection_add(bmain, NULL, "RigidBodyConstraints");
|
||||
id_fake_user_set(&rbw->constraints->id);
|
||||
id_us_plus(&rbw->constraints->id);
|
||||
}
|
||||
|
||||
/* Add object to rigid body group. */
|
||||
|
|
|
@ -88,7 +88,7 @@ bool ED_rigidbody_constraint_add(
|
|||
/* create constraint group if it doesn't already exits */
|
||||
if (rbw->constraints == NULL) {
|
||||
rbw->constraints = BKE_collection_add(bmain, NULL, "RigidBodyConstraints");
|
||||
id_fake_user_set(&rbw->constraints->id);
|
||||
id_us_plus(&rbw->constraints->id);
|
||||
}
|
||||
/* make rigidbody constraint settings */
|
||||
ob->rigidbody_constraint = BKE_rigidbody_create_constraint(scene, ob, type);
|
||||
|
|
|
@ -1276,7 +1276,7 @@ static void rna_def_effector_weight(BlenderRNA *brna)
|
|||
prop = RNA_def_property(srna, "collection", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_struct_type(prop, "Collection");
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "group");
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT);
|
||||
RNA_def_property_ui_text(prop, "Effector Collection", "Limit effectors to this collection");
|
||||
RNA_def_property_update(prop, 0, "rna_EffectorWeight_dependency_update");
|
||||
|
||||
|
|
|
@ -865,7 +865,7 @@ static void rna_def_rigidbody_world(BlenderRNA *brna)
|
|||
prop = RNA_def_property(srna, "collection", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_struct_type(prop, "Collection");
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "group");
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK);
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK | PROP_ID_REFCOUNT);
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Collection", "Collection containing objects participating in this simulation");
|
||||
|
@ -873,7 +873,7 @@ static void rna_def_rigidbody_world(BlenderRNA *brna)
|
|||
|
||||
prop = RNA_def_property(srna, "constraints", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_struct_type(prop, "Collection");
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK);
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK | PROP_ID_REFCOUNT);
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Constraints", "Collection containing rigid body constraint objects");
|
||||
|
|
|
@ -254,7 +254,7 @@ static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *u
|
|||
}
|
||||
|
||||
if (clmd->sim_parms && clmd->sim_parms->effector_weights) {
|
||||
walk(userData, ob, (ID **)&clmd->sim_parms->effector_weights->group, IDWALK_CB_NOP);
|
||||
walk(userData, ob, (ID **)&clmd->sim_parms->effector_weights->group, IDWALK_CB_USER);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *u
|
|||
walk(userData, ob, (ID **)&surface->brush_group, IDWALK_CB_NOP);
|
||||
walk(userData, ob, (ID **)&surface->init_texture, IDWALK_CB_USER);
|
||||
if (surface->effector_weights) {
|
||||
walk(userData, ob, (ID **)&surface->effector_weights->group, IDWALK_CB_NOP);
|
||||
walk(userData, ob, (ID **)&surface->effector_weights->group, IDWALK_CB_USER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -215,7 +215,7 @@ static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *u
|
|||
}
|
||||
|
||||
if (fmd->domain->effector_weights) {
|
||||
walk(userData, ob, (ID **)&fmd->domain->effector_weights->group, IDWALK_CB_NOP);
|
||||
walk(userData, ob, (ID **)&fmd->domain->effector_weights->group, IDWALK_CB_USER);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue