Changeset View
Changeset View
Standalone View
Standalone View
source/blender/render/intern/source/pointdensity.c
| Show First 20 Lines • Show All 357 Lines • ▼ Show 20 Lines | static void pointdensity_cache_vertex_normal(PointDensity *pd, Object *UNUSED(ob), Mesh *mesh, float *data_color) | ||||
| } | } | ||||
| } | } | ||||
| static void pointdensity_cache_object(PointDensity *pd, | static void pointdensity_cache_object(PointDensity *pd, | ||||
| Object *ob) | Object *ob) | ||||
| { | { | ||||
| float *data_color; | float *data_color; | ||||
| int i; | int i; | ||||
| CustomDataMask mask = CD_MASK_BAREMESH | CD_MASK_MTFACE | CD_MASK_MCOL; | |||||
| MVert *mvert = NULL, *mv; | MVert *mvert = NULL, *mv; | ||||
| Mesh *mesh = ob->data; | Mesh *mesh = ob->data; | ||||
| #if 0 /* UNUSED */ | |||||
| CustomData_MeshMasks mask = CD_MASK_BAREMESH; | |||||
| mask.fmask |= CD_MASK_MTFACE | CD_MASK_MCOL; | |||||
| switch (pd->ob_color_source) { | switch (pd->ob_color_source) { | ||||
| case TEX_PD_COLOR_VERTCOL: | case TEX_PD_COLOR_VERTCOL: | ||||
| mask |= CD_MASK_MLOOPCOL; | mask.lmask |= CD_MASK_MLOOPCOL; | ||||
| break; | break; | ||||
| case TEX_PD_COLOR_VERTWEIGHT: | case TEX_PD_COLOR_VERTWEIGHT: | ||||
| mask |= CD_MASK_MDEFORMVERT; | mask.vmask |= CD_MASK_MDEFORMVERT; | ||||
| break; | break; | ||||
| } | } | ||||
| #endif | |||||
| mvert = mesh->mvert; /* local object space */ | mvert = mesh->mvert; /* local object space */ | ||||
| pd->totpoints = mesh->totvert; | pd->totpoints = mesh->totvert; | ||||
| if (pd->totpoints == 0) { | if (pd->totpoints == 0) { | ||||
| return; | return; | ||||
| } | } | ||||
| pd->point_tree = BLI_bvhtree_new(pd->totpoints, 0.0, 4, 6); | pd->point_tree = BLI_bvhtree_new(pd->totpoints, 0.0, 4, 6); | ||||
| ▲ Show 20 Lines • Show All 573 Lines • Show Last 20 Lines | |||||