Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/action.c
| Show First 20 Lines • Show All 973 Lines • ▼ Show 20 Lines | for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan_next) { | ||||
| if (ob->pose->chanhash) { | if (ob->pose->chanhash) { | ||||
| BLI_ghash_remove(ob->pose->chanhash, pchan->name, NULL, NULL); | BLI_ghash_remove(ob->pose->chanhash, pchan->name, NULL, NULL); | ||||
| } | } | ||||
| BLI_freelinkN(&ob->pose->chanbase, pchan); | BLI_freelinkN(&ob->pose->chanbase, pchan); | ||||
| } | } | ||||
| else { | else { | ||||
| /* Maybe something the bone references is being removed instead? */ | /* Maybe something the bone references is being removed instead? */ | ||||
| for (con = pchan->constraints.first; con; con = con->next) { | for (con = pchan->constraints.first; con; con = con->next) { | ||||
| const bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con); | |||||
| ListBase targets = {NULL, NULL}; | ListBase targets = {NULL, NULL}; | ||||
| bConstraintTarget *ct; | bConstraintTarget *ct; | ||||
| if (cti && cti->get_constraint_targets) { | if (BKE_constraint_targets_get(con, &targets)) { | ||||
| cti->get_constraint_targets(con, &targets); | |||||
| for (ct = targets.first; ct; ct = ct->next) { | for (ct = targets.first; ct; ct = ct->next) { | ||||
| if (ct->tar == ob) { | if (ct->tar == ob) { | ||||
| if (ct->subtarget[0]) { | if (ct->subtarget[0]) { | ||||
| if (filter_fn(ct->subtarget, user_data)) { | if (filter_fn(ct->subtarget, user_data)) { | ||||
| con->flag |= CONSTRAINT_DISABLE; | con->flag |= CONSTRAINT_DISABLE; | ||||
| ct->subtarget[0] = 0; | ct->subtarget[0] = 0; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if (cti->flush_constraint_targets) { | BKE_constraint_targets_flush(con, &targets, 0); | ||||
| cti->flush_constraint_targets(con, &targets, 0); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| if (pchan->bbone_prev) { | if (pchan->bbone_prev) { | ||||
| if (filter_fn(pchan->bbone_prev->name, user_data)) { | if (filter_fn(pchan->bbone_prev->name, user_data)) { | ||||
| pchan->bbone_prev = NULL; | pchan->bbone_prev = NULL; | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 979 Lines • Show Last 20 Lines | |||||