GP: Cleanup style
This commit is contained in:
@@ -102,7 +102,7 @@ tGPencilObjectCache *gpencil_object_cache_add(
|
||||
memset(cache_elem, 0, sizeof(*cache_elem));
|
||||
|
||||
cache_elem->is_dup_ob = gpencil_check_ob_duplicated(cache_array, *gp_cache_used, ob);
|
||||
|
||||
|
||||
STRNCPY(cache_elem->ob_name, ob->id.name);
|
||||
cache_elem->gpd = (bGPdata *)ob->data;
|
||||
|
||||
@@ -156,7 +156,7 @@ tGPencilObjectCache *gpencil_object_cache_add(
|
||||
/* get current cache data */
|
||||
static GpencilBatchCache *gpencil_batch_get_element(Object *ob)
|
||||
{
|
||||
bGPdata *gpd = ob->data;
|
||||
bGPdata *gpd = (bGPdata *)ob->data;
|
||||
if (gpd->runtime.batch_cache_data == NULL) {
|
||||
gpd->runtime.batch_cache_data = BLI_ghash_str_new("GP batch cache data");
|
||||
return NULL;
|
||||
|
||||
@@ -506,37 +506,24 @@ static void gpencil_add_draw_data(void *vedata, Object *ob)
|
||||
int i = stl->g_data->gp_cache_used - 1;
|
||||
tGPencilObjectCache *cache_ob = &stl->g_data->gp_object_cache[i];
|
||||
|
||||
if (cache_ob->is_dup_ob == false) {
|
||||
/* save init shading group */
|
||||
cache_ob->init_grp = stl->storage->shgroup_id;
|
||||
/* save init shading group */
|
||||
cache_ob->init_grp = stl->storage->shgroup_id;
|
||||
|
||||
/* fill shading groups */
|
||||
if (!is_multiedit) {
|
||||
DRW_gpencil_populate_datablock(&e_data, vedata, scene, ob, cache_ob);
|
||||
}
|
||||
else {
|
||||
DRW_gpencil_populate_multiedit(&e_data, vedata, scene, ob, cache_ob);
|
||||
}
|
||||
|
||||
/* save end shading group */
|
||||
cache_ob->end_grp = stl->storage->shgroup_id - 1;
|
||||
/* fill shading groups */
|
||||
if ((!is_multiedit) || (cache_ob->is_dup_ob)) {
|
||||
DRW_gpencil_populate_datablock(&e_data, vedata, scene, ob, cache_ob);
|
||||
}
|
||||
else {
|
||||
/* save init shading group */
|
||||
cache_ob->init_grp = stl->storage->shgroup_id;
|
||||
|
||||
DRW_gpencil_populate_datablock(
|
||||
&e_data, vedata, scene, ob,
|
||||
cache_ob);
|
||||
|
||||
/* save end shading group */
|
||||
cache_ob->end_grp = stl->storage->shgroup_id - 1;
|
||||
DRW_gpencil_populate_multiedit(&e_data, vedata, scene, ob, cache_ob);
|
||||
}
|
||||
|
||||
/* save end shading group */
|
||||
cache_ob->end_grp = stl->storage->shgroup_id - 1;
|
||||
|
||||
/* FX passses */
|
||||
cache_ob->has_fx = false;
|
||||
if ((!stl->storage->simplify_fx) &&
|
||||
(BKE_shaderfx_has_gpencil(ob)))
|
||||
(BKE_shaderfx_has_gpencil(ob)))
|
||||
{
|
||||
cache_ob->has_fx = true;
|
||||
if ((!stl->storage->simplify_fx) && (!is_multiedit)) {
|
||||
|
||||
Reference in New Issue
Block a user