Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_graph/graph_edit.c
| Show First 20 Lines • Show All 598 Lines • ▼ Show 20 Lines | static void insert_graph_keys(bAnimContext *ac, eGraphKeys_InsertKey_Types mode) | ||||
| ListBase anim_data = {NULL, NULL}; | ListBase anim_data = {NULL, NULL}; | ||||
| ListBase nla_cache = {NULL, NULL}; | ListBase nla_cache = {NULL, NULL}; | ||||
| bAnimListElem *ale; | bAnimListElem *ale; | ||||
| int filter; | int filter; | ||||
| size_t num_items; | size_t num_items; | ||||
| ReportList *reports = ac->reports; | ReportList *reports = ac->reports; | ||||
| SpaceGraph *sipo = (SpaceGraph *)ac->sl; | SpaceGraph *sipo = (SpaceGraph *)ac->sl; | ||||
| struct Depsgraph *depsgraph = ac->depsgraph; | |||||
| Scene *scene = ac->scene; | Scene *scene = ac->scene; | ||||
| ToolSettings *ts = scene->toolsettings; | ToolSettings *ts = scene->toolsettings; | ||||
| short flag = 0; | short flag = 0; | ||||
| /* filter data */ | /* filter data */ | ||||
| filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | | filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | | ||||
| ANIMFILTER_NODUPLIS); | ANIMFILTER_NODUPLIS); | ||||
| if (mode & GRAPHKEYS_INSERTKEY_SEL) { | if (mode & GRAPHKEYS_INSERTKEY_SEL) { | ||||
| ▲ Show 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | for (ale = anim_data.first; ale; ale = ale->next) { | ||||
| * so it's easier for now to just read the F-Curve directly. | * so it's easier for now to just read the F-Curve directly. | ||||
| * (TODO: add the full-blown PointerRNA relative parsing case here...) | * (TODO: add the full-blown PointerRNA relative parsing case here...) | ||||
| * - fcu->driver != NULL: | * - fcu->driver != NULL: | ||||
| * If this is set, then it's a driver. If we don't check for this, we'd end | * If this is set, then it's a driver. If we don't check for this, we'd end | ||||
| * up adding the keyframes on a new F-Curve in the action data instead. | * up adding the keyframes on a new F-Curve in the action data instead. | ||||
| */ | */ | ||||
| if (ale->id && !ale->owner && !fcu->driver) { | if (ale->id && !ale->owner && !fcu->driver) { | ||||
| insert_keyframe(ac->bmain, | insert_keyframe(ac->bmain, | ||||
| depsgraph, | |||||
| reports, | reports, | ||||
| ale->id, | ale->id, | ||||
| NULL, | NULL, | ||||
| ((fcu->grp) ? (fcu->grp->name) : (NULL)), | ((fcu->grp) ? (fcu->grp->name) : (NULL)), | ||||
| fcu->rna_path, | fcu->rna_path, | ||||
| fcu->array_index, | fcu->array_index, | ||||
| cfra, | cfra, | ||||
| ts->keyframe_type, | ts->keyframe_type, | ||||
| ▲ Show 20 Lines • Show All 2,467 Lines • Show Last 20 Lines | |||||