diff options
author | Hans Goudey <h.goudey@me.com> | 2022-04-20 17:10:10 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-04-20 17:10:10 +0300 |
commit | 03ec505fa549840936d7425269073dc82fd29b10 (patch) | |
tree | 63d94605acd1248689852735ae07056c08505cd7 /source/blender/modifiers | |
parent | 0385e2f1f90ff10c75773cc22125292a82cddaa6 (diff) |
Cleanup: Rename CD_MLOOPCOL to CD_PROP_BYTE_COLOR
The "PROP" in the name reflects its generic status, and removing
"LOOP" makes sense because it is no longer associated with just
mesh face corners. In general the goal is to remove extra semantic
meaning from the custom data types.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_dynamicpaint.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_ocean.c | 6 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_particleinstance.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/modifiers/intern/MOD_dynamicpaint.c b/source/blender/modifiers/intern/MOD_dynamicpaint.c index f8cf80b673c..1891ac5df7c 100644 --- a/source/blender/modifiers/intern/MOD_dynamicpaint.c +++ b/source/blender/modifiers/intern/MOD_dynamicpaint.c @@ -91,7 +91,7 @@ static void requiredDataMask(Object *UNUSED(ob), /* mcol */ if (surface->type == MOD_DPAINT_SURFACE_T_PAINT || surface->init_color_type == MOD_DPAINT_INITIAL_VERTEXCOLOR) { - r_cddata_masks->lmask |= CD_MASK_MLOOPCOL; + r_cddata_masks->lmask |= CD_MASK_PROP_BYTE_COLOR; } /* CD_MDEFORMVERT */ if (surface->type == MOD_DPAINT_SURFACE_T_WEIGHT) { diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c index fbc5b7c288f..b5411eee883 100644 --- a/source/blender/modifiers/intern/MOD_ocean.c +++ b/source/blender/modifiers/intern/MOD_ocean.c @@ -373,17 +373,17 @@ static Mesh *doOcean(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mes /* add vcols before displacement - allows lookup based on position */ if (omd->flag & MOD_OCEAN_GENERATE_FOAM) { - if (CustomData_number_of_layers(&result->ldata, CD_MLOOPCOL) < MAX_MCOL) { + if (CustomData_number_of_layers(&result->ldata, CD_PROP_BYTE_COLOR) < MAX_MCOL) { const int polys_num = result->totpoly; const int loops_num = result->totloop; MLoop *mloops = result->mloop; MLoopCol *mloopcols = CustomData_add_layer_named( - &result->ldata, CD_MLOOPCOL, CD_CALLOC, NULL, loops_num, omd->foamlayername); + &result->ldata, CD_PROP_BYTE_COLOR, CD_CALLOC, NULL, loops_num, omd->foamlayername); MLoopCol *mloopcols_spray = NULL; if (omd->flag & MOD_OCEAN_GENERATE_SPRAY) { mloopcols_spray = CustomData_add_layer_named( - &result->ldata, CD_MLOOPCOL, CD_CALLOC, NULL, loops_num, omd->spraylayername); + &result->ldata, CD_PROP_BYTE_COLOR, CD_CALLOC, NULL, loops_num, omd->spraylayername); } if (mloopcols) { /* unlikely to fail */ diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c index 5af95a0f289..2a8d2454670 100644 --- a/source/blender/modifiers/intern/MOD_particleinstance.c +++ b/source/blender/modifiers/intern/MOD_particleinstance.c @@ -59,7 +59,7 @@ static void requiredDataMask(Object *UNUSED(ob), ParticleInstanceModifierData *pimd = (ParticleInstanceModifierData *)md; if (pimd->index_layer_name[0] != '\0' || pimd->value_layer_name[0] != '\0') { - r_cddata_masks->lmask |= CD_MASK_MLOOPCOL; + r_cddata_masks->lmask |= CD_MASK_PROP_BYTE_COLOR; } } @@ -328,9 +328,9 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * orig_mloop = mesh->mloop; MLoopCol *mloopcols_index = CustomData_get_layer_named( - &result->ldata, CD_MLOOPCOL, pimd->index_layer_name); + &result->ldata, CD_PROP_BYTE_COLOR, pimd->index_layer_name); MLoopCol *mloopcols_value = CustomData_get_layer_named( - &result->ldata, CD_MLOOPCOL, pimd->value_layer_name); + &result->ldata, CD_PROP_BYTE_COLOR, pimd->value_layer_name); int *vert_part_index = NULL; float *vert_part_value = NULL; if (mloopcols_index != NULL) { |