Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/fmodifier.c
| Show First 20 Lines • Show All 1,121 Lines • ▼ Show 20 Lines | FModifier *add_fmodifier(ListBase *modifiers, int type, FCurve *owner_fcu) | ||||
| /* init custom settings if necessary */ | /* init custom settings if necessary */ | ||||
| if (fmi->new_data) { | if (fmi->new_data) { | ||||
| fmi->new_data(fcm->data); | fmi->new_data(fcm->data); | ||||
| } | } | ||||
| /* update the fcurve if the Cycles modifier is added */ | /* update the fcurve if the Cycles modifier is added */ | ||||
| if ((owner_fcu) && (type == FMODIFIER_TYPE_CYCLES)) { | if ((owner_fcu) && (type == FMODIFIER_TYPE_CYCLES)) { | ||||
| calchandles_fcurve(owner_fcu); | BKE_fcurve_handles_recalc(owner_fcu); | ||||
| } | } | ||||
| /* return modifier for further editing */ | /* return modifier for further editing */ | ||||
| return fcm; | return fcm; | ||||
| } | } | ||||
| FModifier *copy_fmodifier(const FModifier *src) | FModifier *copy_fmodifier(const FModifier *src) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | bool remove_fmodifier(ListBase *modifiers, FModifier *fcm) | ||||
| } | } | ||||
| /* remove modifier from stack */ | /* remove modifier from stack */ | ||||
| if (modifiers) { | if (modifiers) { | ||||
| BLI_freelinkN(modifiers, fcm); | BLI_freelinkN(modifiers, fcm); | ||||
| /* update the fcurve if the Cycles modifier is removed */ | /* update the fcurve if the Cycles modifier is removed */ | ||||
| if (update_fcu) { | if (update_fcu) { | ||||
| calchandles_fcurve(update_fcu); | BKE_fcurve_handles_recalc(update_fcu); | ||||
| } | } | ||||
| return true; | return true; | ||||
| } | } | ||||
| /* XXX this case can probably be removed some day, as it shouldn't happen... */ | /* XXX this case can probably be removed some day, as it shouldn't happen... */ | ||||
| CLOG_STR_ERROR(&LOG, "no modifier stack given"); | CLOG_STR_ERROR(&LOG, "no modifier stack given"); | ||||
| MEM_freeN(fcm); | MEM_freeN(fcm); | ||||
| ▲ Show 20 Lines • Show All 299 Lines • Show Last 20 Lines | |||||