Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_conversions.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 3,046 Lines • ▼ Show 20 Lines | if (is_island_center) { | ||||
| island_info = editmesh_islands_info_calc( | island_info = editmesh_islands_info_calc( | ||||
| em, &island_info_tot, &island_vert_map, calc_single_islands); | em, &island_info_tot, &island_vert_map, calc_single_islands); | ||||
| } | } | ||||
| /* detect CrazySpace [tm] */ | /* detect CrazySpace [tm] */ | ||||
| if (modifiers_getCageIndex(t->scene, tc->obedit, NULL, 1) != -1) { | if (modifiers_getCageIndex(t->scene, tc->obedit, NULL, 1) != -1) { | ||||
| int totleft = -1; | int totleft = -1; | ||||
| if (modifiers_isCorrectableDeformed(t->scene, tc->obedit)) { | if (modifiers_isCorrectableDeformed(t->scene, tc->obedit)) { | ||||
| BKE_scene_graph_evaluated_ensure(t->depsgraph, CTX_data_main(t->context)); | |||||
| /* Use evaluated state because we need b-bone cache. */ | /* Use evaluated state because we need b-bone cache. */ | ||||
| Scene *scene_eval = (Scene *)DEG_get_evaluated_id(t->depsgraph, &t->scene->id); | Scene *scene_eval = (Scene *)DEG_get_evaluated_id(t->depsgraph, &t->scene->id); | ||||
| Object *obedit_eval = (Object *)DEG_get_evaluated_id(t->depsgraph, &tc->obedit->id); | Object *obedit_eval = (Object *)DEG_get_evaluated_id(t->depsgraph, &tc->obedit->id); | ||||
| BMEditMesh *em_eval = BKE_editmesh_from_object(obedit_eval); | BMEditMesh *em_eval = BKE_editmesh_from_object(obedit_eval); | ||||
| /* check if we can use deform matrices for modifier from the | /* check if we can use deform matrices for modifier from the | ||||
| * start up to stack, they are more accurate than quats */ | * start up to stack, they are more accurate than quats */ | ||||
| totleft = BKE_crazyspace_get_first_deform_matrices_editbmesh( | totleft = BKE_crazyspace_get_first_deform_matrices_editbmesh( | ||||
| t->depsgraph, scene_eval, obedit_eval, em_eval, &defmats, &defcos); | t->depsgraph, scene_eval, obedit_eval, em_eval, &defmats, &defcos); | ||||
| ▲ Show 20 Lines • Show All 6,583 Lines • ▼ Show 20 Lines | void createTransData(bContext *C, TransInfo *t) | ||||
| } | } | ||||
| else if ((ob) && | else if ((ob) && | ||||
| (ELEM( | (ELEM( | ||||
| ob->mode, OB_MODE_PAINT_GPENCIL, OB_MODE_SCULPT_GPENCIL, OB_MODE_WEIGHT_GPENCIL))) { | ob->mode, OB_MODE_PAINT_GPENCIL, OB_MODE_SCULPT_GPENCIL, OB_MODE_WEIGHT_GPENCIL))) { | ||||
| /* In grease pencil all transformations must be canceled if not Object or Edit. */ | /* In grease pencil all transformations must be canceled if not Object or Edit. */ | ||||
| has_transform_context = false; | has_transform_context = false; | ||||
| } | } | ||||
| else { | else { | ||||
| /* Needed for correct Object.obmat after duplication, see: T62135. */ | |||||
| BKE_scene_graph_evaluated_ensure(t->depsgraph, CTX_data_main(t->context)); | |||||
| createTransObject(C, t); | createTransObject(C, t); | ||||
| countAndCleanTransDataContainer(t); | countAndCleanTransDataContainer(t); | ||||
| t->flag |= T_OBJECT; | t->flag |= T_OBJECT; | ||||
| if (t->data_len_all && t->flag & T_PROP_EDIT) { | if (t->data_len_all && t->flag & T_PROP_EDIT) { | ||||
| // selected objects are already first, no need to presort | // selected objects are already first, no need to presort | ||||
| set_prop_dist(t, 1); | set_prop_dist(t, 1); | ||||
| sort_trans_data_dist(t); | sort_trans_data_dist(t); | ||||
| Show All 26 Lines | |||||