Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_displace.c
| Show First 20 Lines • Show All 284 Lines • ▼ Show 20 Lines | static void displaceModifier_do( | ||||
| const bool use_global_direction = dmd->space == MOD_DISP_SPACE_GLOBAL; | const bool use_global_direction = dmd->space == MOD_DISP_SPACE_GLOBAL; | ||||
| if (dmd->texture == NULL && dmd->direction == MOD_DISP_DIR_RGB_XYZ) return; | if (dmd->texture == NULL && dmd->direction == MOD_DISP_DIR_RGB_XYZ) return; | ||||
| if (dmd->strength == 0.0f) return; | if (dmd->strength == 0.0f) return; | ||||
| mvert = mesh->mvert; | mvert = mesh->mvert; | ||||
| MOD_get_vgroup(ob, mesh, dmd->defgrp_name, &dvert, &defgrp_index); | MOD_get_vgroup(ob, mesh, dmd->defgrp_name, &dvert, &defgrp_index); | ||||
| Tex *tex_target = (Tex *)DEG_get_evaluated_id(ctx->depsgraph, &dmd->texture->id); | Tex *tex_target = dmd->texture; | ||||
| if (tex_target != NULL) { | if (tex_target != NULL) { | ||||
| tex_co = MEM_calloc_arrayN((size_t)numVerts, sizeof(*tex_co), | tex_co = MEM_calloc_arrayN((size_t)numVerts, sizeof(*tex_co), | ||||
| "displaceModifier_do tex_co"); | "displaceModifier_do tex_co"); | ||||
| MOD_get_texture_coords((MappingInfoModifierData *)dmd, ctx, ob, mesh, vertexCos, tex_co); | MOD_get_texture_coords((MappingInfoModifierData *)dmd, ctx, ob, mesh, vertexCos, tex_co); | ||||
| MOD_init_texture((MappingInfoModifierData *)dmd, ctx); | MOD_init_texture((MappingInfoModifierData *)dmd, ctx); | ||||
| } | } | ||||
| else { | else { | ||||
| ▲ Show 20 Lines • Show All 131 Lines • Show Last 20 Lines | |||||