Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_surface.c
| Show All 26 Lines | |||||
| * ***** END GPL LICENSE BLOCK ***** | * ***** END GPL LICENSE BLOCK ***** | ||||
| * | * | ||||
| */ | */ | ||||
| /** \file blender/modifiers/intern/MOD_surface.c | /** \file blender/modifiers/intern/MOD_surface.c | ||||
| * \ingroup modifiers | * \ingroup modifiers | ||||
| */ | */ | ||||
| #include "CLG_log.h" | |||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| #include "DNA_mesh_types.h" | #include "DNA_mesh_types.h" | ||||
| #include "DNA_meshdata_types.h" | #include "DNA_meshdata_types.h" | ||||
| #include "BKE_bvhutils.h" | #include "BKE_bvhutils.h" | ||||
| #include "BKE_library.h" | #include "BKE_library.h" | ||||
| #include "BKE_mesh.h" | #include "BKE_mesh.h" | ||||
| #include "DEG_depsgraph.h" | #include "DEG_depsgraph.h" | ||||
| #include "DEG_depsgraph_query.h" | #include "DEG_depsgraph_query.h" | ||||
| #include "BLI_math.h" | #include "BLI_math.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "MOD_modifiertypes.h" | #include "MOD_modifiertypes.h" | ||||
| #include "MOD_util.h" | #include "MOD_util.h" | ||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| static CLG_LogRef LOG = {"mod.surface"}; | |||||
| static void initData(ModifierData *md) | static void initData(ModifierData *md) | ||||
| { | { | ||||
| SurfaceModifierData *surmd = (SurfaceModifierData *) md; | SurfaceModifierData *surmd = (SurfaceModifierData *) md; | ||||
| surmd->bvhtree = NULL; | surmd->bvhtree = NULL; | ||||
| surmd->mesh = NULL; | surmd->mesh = NULL; | ||||
| surmd->x = NULL; | surmd->x = NULL; | ||||
| ▲ Show 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | BKE_id_copy_ex( | ||||
| LIB_ID_COPY_NO_PREVIEW, | LIB_ID_COPY_NO_PREVIEW, | ||||
| false); | false); | ||||
| } | } | ||||
| else { | else { | ||||
| surmd->mesh = MOD_deform_mesh_eval_get(ctx->object, NULL, NULL, NULL, numVerts, false, false); | surmd->mesh = MOD_deform_mesh_eval_get(ctx->object, NULL, NULL, NULL, numVerts, false, false); | ||||
| } | } | ||||
| if (!ctx->object->pd) { | if (!ctx->object->pd) { | ||||
| printf("SurfaceModifier deformVerts: Should not happen!\n"); | CLOG_STR_ERROR(&LOG, "object->pd is NULL. Should not happen!"); | ||||
| return; | return; | ||||
| } | } | ||||
| if (surmd->mesh) { | if (surmd->mesh) { | ||||
| unsigned int numverts = 0, i = 0; | unsigned int numverts = 0, i = 0; | ||||
| int init = 0; | int init = 0; | ||||
| float *vec; | float *vec; | ||||
| MVert *x, *v; | MVert *x, *v; | ||||
| ▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines | |||||