Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_gizmo_3d.c
| Show First 20 Lines • Show All 794 Lines • ▼ Show 20 Lines | if (is_gp_edit) { | ||||
| LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) { | LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) { | ||||
| /* only editable and visible layers are considered */ | /* only editable and visible layers are considered */ | ||||
| if (BKE_gpencil_layer_is_editable(gpl) && (gpl->actframe != NULL)) { | if (BKE_gpencil_layer_is_editable(gpl) && (gpl->actframe != NULL)) { | ||||
| /* calculate difference matrix */ | /* calculate difference matrix */ | ||||
| BKE_gpencil_parent_matrix_get(depsgraph, ob, gpl, diff_mat); | BKE_gpencil_parent_matrix_get(depsgraph, ob, gpl, diff_mat); | ||||
| for (bGPDstroke *gps = gpl->actframe->strokes.first; gps; gps = gps->next) { | LISTBASE_FOREACH (bGPDstroke *, gps, &gpl->actframe->strokes) { | ||||
| /* skip strokes that are invalid for current view */ | /* skip strokes that are invalid for current view */ | ||||
| if (ED_gpencil_stroke_can_use(C, gps) == false) { | if (ED_gpencil_stroke_can_use(C, gps) == false) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| /* we're only interested in selected points here... */ | /* we're only interested in selected points here... */ | ||||
| if (gps->flag & GP_STROKE_SELECT) { | if (gps->flag & GP_STROKE_SELECT) { | ||||
| bGPDspoint *pt; | bGPDspoint *pt; | ||||
| ▲ Show 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | ((void)0) | ||||
| else if (obedit->type == OB_ARMATURE) { | else if (obedit->type == OB_ARMATURE) { | ||||
| FOREACH_EDIT_OBJECT_BEGIN (ob_iter, use_mat_local) { | FOREACH_EDIT_OBJECT_BEGIN (ob_iter, use_mat_local) { | ||||
| bArmature *arm = ob_iter->data; | bArmature *arm = ob_iter->data; | ||||
| float mat_local[4][4]; | float mat_local[4][4]; | ||||
| if (use_mat_local) { | if (use_mat_local) { | ||||
| mul_m4_m4m4(mat_local, obedit->imat, ob_iter->obmat); | mul_m4_m4m4(mat_local, obedit->imat, ob_iter->obmat); | ||||
| } | } | ||||
| for (EditBone *ebo = arm->edbo->first; ebo; ebo = ebo->next) { | LISTBASE_FOREACH (EditBone *, ebo, arm->edbo) { | ||||
| if (EBONE_VISIBLE(arm, ebo)) { | if (EBONE_VISIBLE(arm, ebo)) { | ||||
| if (ebo->flag & BONE_TIPSEL) { | if (ebo->flag & BONE_TIPSEL) { | ||||
| calc_tw_center_with_matrix(tbounds, ebo->tail, use_mat_local, mat_local); | calc_tw_center_with_matrix(tbounds, ebo->tail, use_mat_local, mat_local); | ||||
| totsel++; | totsel++; | ||||
| } | } | ||||
| if ((ebo->flag & BONE_ROOTSEL) && | if ((ebo->flag & BONE_ROOTSEL) && | ||||
| /* don't include same point multiple times */ | /* don't include same point multiple times */ | ||||
| ((ebo->flag & BONE_CONNECTED) && (ebo->parent != NULL) && | ((ebo->flag & BONE_CONNECTED) && (ebo->parent != NULL) && | ||||
| ▲ Show 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | else if (obedit->type == OB_MBALL) { | ||||
| FOREACH_EDIT_OBJECT_BEGIN (ob_iter, use_mat_local) { | FOREACH_EDIT_OBJECT_BEGIN (ob_iter, use_mat_local) { | ||||
| MetaBall *mb = (MetaBall *)ob_iter->data; | MetaBall *mb = (MetaBall *)ob_iter->data; | ||||
| float mat_local[4][4]; | float mat_local[4][4]; | ||||
| if (use_mat_local) { | if (use_mat_local) { | ||||
| mul_m4_m4m4(mat_local, obedit->imat, ob_iter->obmat); | mul_m4_m4m4(mat_local, obedit->imat, ob_iter->obmat); | ||||
| } | } | ||||
| for (MetaElem *ml = mb->editelems->first; ml; ml = ml->next) { | LISTBASE_FOREACH (MetaElem *, ml, mb->editelems) { | ||||
| if (ml->flag & SELECT) { | if (ml->flag & SELECT) { | ||||
| calc_tw_center_with_matrix(tbounds, &ml->x, use_mat_local, mat_local); | calc_tw_center_with_matrix(tbounds, &ml->x, use_mat_local, mat_local); | ||||
| totsel++; | totsel++; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| FOREACH_EDIT_OBJECT_END(); | FOREACH_EDIT_OBJECT_END(); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,563 Lines • Show Last 20 Lines | |||||