Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_generics.c
| Show First 20 Lines • Show All 104 Lines • ▼ Show 20 Lines | |||||
| #include "ED_view3d.h" | #include "ED_view3d.h" | ||||
| #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 "ED_gpencil.h" | ||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "wm_gizmo_wmapi.h" | |||||
| #include "RE_engine.h" | #include "RE_engine.h" | ||||
| #include "UI_resources.h" | #include "UI_resources.h" | ||||
| #include "UI_view2d.h" | #include "UI_view2d.h" | ||||
| #include "transform.h" | #include "transform.h" | ||||
| ▲ Show 20 Lines • Show All 1,154 Lines • ▼ Show 20 Lines | void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *event) | ||||
| bGPdata *gpd = CTX_data_gpencil_data(C); | bGPdata *gpd = CTX_data_gpencil_data(C); | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| t->depsgraph = depsgraph; | t->depsgraph = depsgraph; | ||||
| t->scene = sce; | t->scene = sce; | ||||
| t->view_layer = view_layer; | t->view_layer = view_layer; | ||||
| t->sa = sa; | t->sa = sa; | ||||
| t->ar = ar; | t->ar = ar; | ||||
| t->gz = wm_gizmomap_highlight_get(ar->gizmo_map); | |||||
| t->settings = ts; | t->settings = ts; | ||||
| t->reports = op ? op->reports : NULL; | t->reports = op ? op->reports : NULL; | ||||
| t->helpline = HLP_NONE; | t->helpline = HLP_NONE; | ||||
| t->flag = 0; | t->flag = 0; | ||||
| t->obedit_type = (object_mode == OB_MODE_EDIT) ? object_type : -1; | t->obedit_type = (object_mode == OB_MODE_EDIT) ? object_type : -1; | ||||
| ▲ Show 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *event) | ||||
| if (t->spacetype == SPACE_VIEW3D) { | if (t->spacetype == SPACE_VIEW3D) { | ||||
| View3D *v3d = sa->spacedata.first; | View3D *v3d = sa->spacedata.first; | ||||
| bScreen *animscreen = ED_screen_animation_playing(CTX_wm_manager(C)); | bScreen *animscreen = ED_screen_animation_playing(CTX_wm_manager(C)); | ||||
| t->view = v3d; | t->view = v3d; | ||||
| t->animtimer = (animscreen) ? animscreen->animtimer : NULL; | t->animtimer = (animscreen) ? animscreen->animtimer : NULL; | ||||
| /* turn gizmo off during transform */ | /* with the exception of the rotation mode, turn gizmo off during transform */ | ||||
| if (t->flag & T_MODAL) { | if (t->mode != TFM_ROTATION && t->flag & T_MODAL) { | ||||
| t->gizmo_flag = v3d->gizmo_flag; | t->gizmo_flag = v3d->gizmo_flag; | ||||
| v3d->gizmo_flag = V3D_GIZMO_HIDE; | v3d->gizmo_flag = V3D_GIZMO_HIDE; | ||||
| } | } | ||||
| if (t->scene->toolsettings->transform_flag & SCE_XFORM_AXIS_ALIGN) { | if (t->scene->toolsettings->transform_flag & SCE_XFORM_AXIS_ALIGN) { | ||||
| t->flag |= T_V3D_ALIGN; | t->flag |= T_V3D_ALIGN; | ||||
| } | } | ||||
| t->around = t->scene->toolsettings->transform_pivot_point; | t->around = t->scene->toolsettings->transform_pivot_point; | ||||
| ▲ Show 20 Lines • Show All 994 Lines • Show Last 20 Lines | |||||