Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_generics.c
| Context not available. | |||||
| #include "BKE_mask.h" | #include "BKE_mask.h" | ||||
| #include "BKE_utildefines.h" | #include "BKE_utildefines.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. | |||||
| if (ELEM(ac.datatype, ANIMCONT_GPENCIL, ANIMCONT_MASK)) { | if (ELEM(ac.datatype, ANIMCONT_GPENCIL, ANIMCONT_MASK)) { | ||||
| /* flush transform values back to actual coordinates */ | /* flush transform values back to actual coordinates */ | ||||
| flushTransIntFrameActionData(t); | flushTransIntFrameActionData(t); | ||||
| /* refresh gpencil cache */ | |||||
| if (ac.datatype == ANIMCONT_GPENCIL) { | |||||
| BKE_gpencil_batch_cache_alldirty(); | |||||
| } | |||||
| } | } | ||||
| else { | else { | ||||
| /* 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 */ | ||||
| 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. | |||||