Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_generics.c
| Context not available. | |||||
| #include "BKE_tracking.h" | #include "BKE_tracking.h" | ||||
| #include "BKE_mask.h" | #include "BKE_mask.h" | ||||
| #include "BKE_workspace.h" | #include "BKE_workspace.h" | ||||
| #include "BKE_gpencil.h" | |||||
| #include "DEG_depsgraph.h" | #include "DEG_depsgraph.h" | ||||
| Context not available. | |||||
| #include "ED_curve.h" /* for curve_editnurbs */ | #include "ED_curve.h" /* for curve_editnurbs */ | ||||
| #include "ED_clip.h" | #include "ED_clip.h" | ||||
| #include "ED_screen.h" | #include "ED_screen.h" | ||||
| #include "ED_gpencil.h" | |||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| Context not available. | |||||
| /* flush transform values back to actual coordinates */ | /* flush transform values back to actual coordinates */ | ||||
| flushTransIntFrameActionData(t); | flushTransIntFrameActionData(t); | ||||
| } | } | ||||
| else { | |||||
| if (ac.datatype != ANIMCONT_MASK) { | |||||
| /* get animdata blocks visible in editor, assuming that these will be the ones where things changed */ | /* get animdata blocks visible in editor, assuming that these will be the ones where things changed */ | ||||
| filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_ANIMDATA); | filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_ANIMDATA); | ||||
| ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); | ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); | ||||
| Context not available. | |||||
| } | } | ||||
| /* GPencil editing context */ | /* GPencil editing context */ | ||||
| if ((gpd) && (gpd->flag & GP_DATA_STROKE_EDITMODE)) { | if (GPENCIL_ANY_MODE(gpd)) { | ||||
| t->options |= CTX_GPENCIL_STROKES; | t->options |= CTX_GPENCIL_STROKES; | ||||
| } | } | ||||
| Context not available. | |||||
| } | } | ||||
| r_center[2] = 0.0f; | r_center[2] = 0.0f; | ||||
| } | } | ||||
| else if (t->options & CTX_GPENCIL_STROKES) { | |||||
| /* move cursor in local space */ | |||||
| Object *ob = t->obedit; | |||||
| float mat[3][3], imat[3][3]; | |||||
| sub_v3_v3v3(r_center, r_center, ob->obmat[3]); | |||||
| copy_m3_m4(mat, ob->obmat); | |||||
| invert_m3_m3(imat, mat); | |||||
| mul_m3_v3(imat, r_center); | |||||
| } | |||||
| } | } | ||||
| void calculateCenterCursor2D(TransInfo *t, float r_center[2]) | void calculateCenterCursor2D(TransInfo *t, float r_center[2]) | ||||
| Context not available. | |||||