diff options
author | Antonioya <blendergit@gmail.com> | 2019-05-29 20:59:54 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-05-29 20:59:54 +0300 |
commit | 6ef39cbdf03846510a97be4874a9faac9c06e777 (patch) | |
tree | 57899392734c229fe08c99ce9d463ae2d3ce5319 /source/blender/draw/engines/gpencil | |
parent | 7fae3e375a6c3804dc986371d488675d0d4869cd (diff) |
GPencil: Rename viewmatrix field to parent_obmat
The name of the field was not clear about the use.
Diffstat (limited to 'source/blender/draw/engines/gpencil')
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_draw_utils.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c index 58cae5888a2..83bbd8d4c3b 100644 --- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c @@ -1035,11 +1035,11 @@ static void gpencil_draw_strokes(GpencilBatchCache *cache, /* get parent matrix and save as static data */ if ((cache_ob != NULL) && (cache_ob->is_dup_ob)) { - copy_m4_m4(derived_gpf->runtime.viewmatrix, cache_ob->obmat); + copy_m4_m4(derived_gpf->runtime.parent_obmat, cache_ob->obmat); } else { /* get parent matrix and save as static data */ - ED_gpencil_parent_location(depsgraph, ob, gpd, gpl, derived_gpf->runtime.viewmatrix); + ED_gpencil_parent_location(depsgraph, ob, gpd, gpl, derived_gpf->runtime.parent_obmat); } /* apply geometry modifiers */ @@ -1177,11 +1177,8 @@ static void gpencil_draw_onion_strokes(GpencilBatchCache *cache, GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl; Depsgraph *depsgraph = DRW_context_state_get()->depsgraph; - float viewmatrix[4][4]; - /* get parent matrix and save as static data */ - ED_gpencil_parent_location(depsgraph, ob, gpd, gpl, viewmatrix); - copy_m4_m4(gpf->runtime.viewmatrix, viewmatrix); + ED_gpencil_parent_location(depsgraph, ob, gpd, gpl, gpf->runtime.parent_obmat); for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) { MaterialGPencilStyle *gp_style = BKE_material_gpencil_settings_get(ob, gps->mat_nr + 1); @@ -1367,7 +1364,7 @@ static void gpencil_copy_frame(bGPDframe *gpf, bGPDframe *derived_gpf) derived_gpf->flag = gpf->flag; derived_gpf->key_type = gpf->key_type; derived_gpf->runtime = gpf->runtime; - copy_m4_m4(derived_gpf->runtime.viewmatrix, gpf->runtime.viewmatrix); + copy_m4_m4(derived_gpf->runtime.parent_obmat, gpf->runtime.parent_obmat); /* copy strokes */ BLI_listbase_clear(&derived_gpf->strokes); @@ -1733,7 +1730,7 @@ static void DRW_gpencil_shgroups_create(GPENCIL_e_data *e_data, if ((do_onion) || (elm->onion == false)) { DRW_shgroup_call_range(shgrp, cache->b_stroke.batch, - (!cache_ob->is_dup_ob) ? gpf->runtime.viewmatrix : + (!cache_ob->is_dup_ob) ? gpf->runtime.parent_obmat : cache_ob->obmat, start_stroke, len); @@ -1762,7 +1759,7 @@ static void DRW_gpencil_shgroups_create(GPENCIL_e_data *e_data, if ((do_onion) || (elm->onion == false)) { DRW_shgroup_call_range(shgrp, cache->b_point.batch, - (!cache_ob->is_dup_ob) ? gpf->runtime.viewmatrix : + (!cache_ob->is_dup_ob) ? gpf->runtime.parent_obmat : cache_ob->obmat, start_point, len); @@ -1788,7 +1785,7 @@ static void DRW_gpencil_shgroups_create(GPENCIL_e_data *e_data, if ((do_onion) || (elm->onion == false)) { DRW_shgroup_call_range(shgrp, cache->b_fill.batch, - (!cache_ob->is_dup_ob) ? gpf->runtime.viewmatrix : + (!cache_ob->is_dup_ob) ? gpf->runtime.parent_obmat : cache_ob->obmat, start_fill, len); @@ -1803,7 +1800,7 @@ static void DRW_gpencil_shgroups_create(GPENCIL_e_data *e_data, /* use always the same group */ DRW_shgroup_call_range(stl->g_data->shgrps_edit_point, cache->b_edit.batch, - (!cache_ob->is_dup_ob) ? gpf->runtime.viewmatrix : + (!cache_ob->is_dup_ob) ? gpf->runtime.parent_obmat : cache_ob->obmat, start_edit, len); @@ -1818,7 +1815,7 @@ static void DRW_gpencil_shgroups_create(GPENCIL_e_data *e_data, /* use always the same group */ DRW_shgroup_call_range(stl->g_data->shgrps_edit_line, cache->b_edlin.batch, - (!cache_ob->is_dup_ob) ? gpf->runtime.viewmatrix : + (!cache_ob->is_dup_ob) ? gpf->runtime.parent_obmat : cache_ob->obmat, start_edlin, len); |