Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_convert_action.c
| Show First 20 Lines • Show All 283 Lines • ▼ Show 20 Lines | if (is_prop_edit || (masklay_shape->flag & MASK_SHAPE_SELECT)) { | ||||
| count++; | count++; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| return count; | return count; | ||||
| } | } | ||||
| void createTransActionData(bContext *C, TransInfo *t) | static void createTransActionData(bContext *C, TransInfo *t) | ||||
| { | { | ||||
| Scene *scene = t->scene; | Scene *scene = t->scene; | ||||
| TransData *td = NULL; | TransData *td = NULL; | ||||
| TransData2D *td2d = NULL; | TransData2D *td2d = NULL; | ||||
| tGPFtransdata *tfd = NULL; | tGPFtransdata *tfd = NULL; | ||||
| rcti *mask = &t->region->v2d.mask; | rcti *mask = &t->region->v2d.mask; | ||||
| rctf *datamask = &t->region->v2d.cur; | rctf *datamask = &t->region->v2d.cur; | ||||
| ▲ Show 20 Lines • Show All 259 Lines • ▼ Show 20 Lines | static void flushTransIntFrameActionData(TransInfo *t) | ||||
| /* flush data! | /* flush data! | ||||
| * Expects data_gpf_len to be set in the data container. */ | * Expects data_gpf_len to be set in the data container. */ | ||||
| for (int i = 0; i < tc->data_gpf_len; i++, tfd++) { | for (int i = 0; i < tc->data_gpf_len; i++, tfd++) { | ||||
| *(tfd->sdata) = round_fl_to_int(tfd->val); | *(tfd->sdata) = round_fl_to_int(tfd->val); | ||||
| } | } | ||||
| } | } | ||||
| void recalcData_actedit(TransInfo *t) | static void recalcData_actedit(TransInfo *t) | ||||
| { | { | ||||
| ViewLayer *view_layer = t->view_layer; | ViewLayer *view_layer = t->view_layer; | ||||
| SpaceAction *saction = (SpaceAction *)t->area->spacedata.first; | SpaceAction *saction = (SpaceAction *)t->area->spacedata.first; | ||||
| bAnimContext ac = {NULL}; | bAnimContext ac = {NULL}; | ||||
| ListBase anim_data = {NULL, NULL}; | ListBase anim_data = {NULL, NULL}; | ||||
| bAnimListElem *ale; | bAnimListElem *ale; | ||||
| int filter; | int filter; | ||||
| ▲ Show 20 Lines • Show All 177 Lines • ▼ Show 20 Lines | else { | ||||
| posttrans_fcurve_clean(ale->key_data, SELECT, false); /* only use handles in graph editor */ | posttrans_fcurve_clean(ale->key_data, SELECT, false); /* only use handles in graph editor */ | ||||
| } | } | ||||
| } | } | ||||
| /* free temp data */ | /* free temp data */ | ||||
| ANIM_animdata_freelist(&anim_data); | ANIM_animdata_freelist(&anim_data); | ||||
| } | } | ||||
| void special_aftertrans_update__actedit(bContext *C, TransInfo *t) | static void special_aftertrans_update__actedit(bContext *C, TransInfo *t) | ||||
| { | { | ||||
| SpaceAction *saction = (SpaceAction *)t->area->spacedata.first; | SpaceAction *saction = (SpaceAction *)t->area->spacedata.first; | ||||
| bAnimContext ac; | bAnimContext ac; | ||||
| const bool canceled = (t->state == TRANS_CANCEL); | const bool canceled = (t->state == TRANS_CANCEL); | ||||
| const bool duplicate = (t->mode == TFM_TIME_DUPLICATE); | const bool duplicate = (t->mode == TFM_TIME_DUPLICATE); | ||||
| /* initialize relevant anim-context 'context' data */ | /* initialize relevant anim-context 'context' data */ | ||||
| ▲ Show 20 Lines • Show All 150 Lines • ▼ Show 20 Lines | if (!ELEM(ac.datatype, ANIMCONT_GPENCIL)) { | ||||
| ANIM_editkeyframes_refresh(&ac); | ANIM_editkeyframes_refresh(&ac); | ||||
| } | } | ||||
| /* clear flag that was set for time-slide drawing */ | /* clear flag that was set for time-slide drawing */ | ||||
| saction->flag &= ~SACTION_MOVING; | saction->flag &= ~SACTION_MOVING; | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| TransConvertTypeInfo TransConvertType_Action = { | |||||
| /* flags */ (T_POINTS | T_2D_EDIT), | |||||
| /* createTransData */ createTransActionData, | |||||
| /* recalcData */ recalcData_actedit, | |||||
| /* special_aftertrans_update */ special_aftertrans_update__actedit, | |||||
campbellbarton: This function can now be declared `static`. | |||||
| }; | |||||
This function can now be declared static.