GPencil: Cleanup - More rename from gp_ to gpencil_

This commit is contained in:
Antonio Vazquez
2020-07-02 20:04:49 +02:00
parent c5ec8d91bd
commit 33f36b453a
3 changed files with 24 additions and 19 deletions

View File

@@ -178,10 +178,10 @@ typedef struct iterData {
float plane[4];
} iterData;
static void gp_layer_cache_populate(bGPDlayer *gpl,
bGPDframe *UNUSED(gpf),
bGPDstroke *UNUSED(gps),
void *thunk)
static void gpencil_layer_cache_populate(bGPDlayer *gpl,
bGPDframe *UNUSED(gpf),
bGPDstroke *UNUSED(gps),
void *thunk)
{
iterData *iter = (iterData *)thunk;
bGPdata *gpd = (bGPdata *)iter->ob->data;
@@ -204,10 +204,10 @@ static void gp_layer_cache_populate(bGPDlayer *gpl,
DRW_shgroup_uniform_vec4_copy(grp, "gpDepthPlane", iter->plane);
}
static void gp_stroke_cache_populate(bGPDlayer *UNUSED(gpl),
bGPDframe *UNUSED(gpf),
bGPDstroke *gps,
void *thunk)
static void gpencil_stroke_cache_populate(bGPDlayer *UNUSED(gpl),
bGPDframe *UNUSED(gpf),
bGPDstroke *gps,
void *thunk)
{
iterData *iter = (iterData *)thunk;
@@ -258,8 +258,13 @@ static void OVERLAY_outline_gpencil(OVERLAY_PrivateData *pd, Object *ob)
gpencil_depth_plane(ob, iter.plane);
}
BKE_gpencil_visible_stroke_iter(
NULL, ob, gp_layer_cache_populate, gp_stroke_cache_populate, &iter, false, pd->cfra);
BKE_gpencil_visible_stroke_iter(NULL,
ob,
gpencil_layer_cache_populate,
gpencil_stroke_cache_populate,
&iter,
false,
pd->cfra);
}
void OVERLAY_outline_cache_populate(OVERLAY_Data *vedata,

View File

@@ -1047,10 +1047,10 @@ static void sequence_cb(int event, TreeElement *te, TreeStoreElem *tselem, void
(void)tselem;
}
static void gp_layer_cb(int event,
TreeElement *te,
TreeStoreElem *UNUSED(tselem),
void *UNUSED(arg))
static void gpencil_layer_cb(int event,
TreeElement *te,
TreeStoreElem *UNUSED(tselem),
void *UNUSED(arg))
{
bGPDlayer *gpl = (bGPDlayer *)te->directdata;
@@ -2320,7 +2320,7 @@ static int outliner_data_operation_exec(bContext *C, wmOperator *op)
break;
}
case TSE_GP_LAYER: {
outliner_do_data_operation(soops, datalevel, event, &soops->tree, gp_layer_cb, NULL);
outliner_do_data_operation(soops, datalevel, event, &soops->tree, gpencil_layer_cb, NULL);
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL);
ED_undo_push(C, "Grease Pencil Layer operation");

View File

@@ -114,7 +114,7 @@ static void copyData(const GpencilModifierData *md, GpencilModifierData *target)
}
/* calculate factor of fallof */
static float gp_hook_falloff(const struct GPHookData_cb *tData, const float len_sq)
static float gpencil_hook_falloff(const struct GPHookData_cb *tData, const float len_sq)
{
BLI_assert(tData->falloff_sq);
if (len_sq > tData->falloff_sq) {
@@ -167,7 +167,7 @@ static float gp_hook_falloff(const struct GPHookData_cb *tData, const float len_
}
/* apply point deformation */
static void gp_hook_co_apply(struct GPHookData_cb *tData, float weight, bGPDspoint *pt)
static void gpencil_hook_co_apply(struct GPHookData_cb *tData, float weight, bGPDspoint *pt)
{
float fac;
@@ -183,7 +183,7 @@ static void gp_hook_co_apply(struct GPHookData_cb *tData, float weight, bGPDspoi
len_sq = len_squared_v3v3(tData->cent, &pt->x);
}
fac = gp_hook_falloff(tData, len_sq);
fac = gpencil_hook_falloff(tData, len_sq);
}
else {
fac = tData->fac_orig;
@@ -271,7 +271,7 @@ static void deformStroke(GpencilModifierData *md,
if (weight < 0.0f) {
continue;
}
gp_hook_co_apply(&tData, weight, pt);
gpencil_hook_co_apply(&tData, weight, pt);
}
/* Calc geometry data. */
BKE_gpencil_stroke_geometry_update(gps);