Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_volume_displace.cc
| /* SPDX-License-Identifier: GPL-2.0-or-later */ | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||||
| /** \file | /** \file | ||||
| * \ingroup modifiers | * \ingroup modifiers | ||||
| */ | */ | ||||
| #include "BKE_geometry_set.hh" | #include "BKE_geometry_set.hh" | ||||
| #include "BKE_lib_query.h" | #include "BKE_lib_query.h" | ||||
| #include "BKE_mesh_runtime.h" | #include "BKE_mesh_runtime.h" | ||||
| #include "BKE_modifier.h" | #include "BKE_modifier.h" | ||||
| #include "BKE_object.h" | #include "BKE_object.h" | ||||
| #include "BKE_texture.h" | #include "BKE_texture.h" | ||||
| #include "BKE_volume.h" | #include "BKE_volume.h" | ||||
| #include "BLT_translation.h" | |||||
| #include "DNA_mesh_types.h" | #include "DNA_mesh_types.h" | ||||
| #include "DNA_meshdata_types.h" | #include "DNA_meshdata_types.h" | ||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| #include "DNA_screen_types.h" | #include "DNA_screen_types.h" | ||||
| #include "DNA_texture_types.h" | #include "DNA_texture_types.h" | ||||
| #include "DNA_volume_types.h" | #include "DNA_volume_types.h" | ||||
| #include "DEG_depsgraph_build.h" | #include "DEG_depsgraph_build.h" | ||||
| ▲ Show 20 Lines • Show All 279 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| Volume *input_volume = geometry_set->get_volume_for_write(); | Volume *input_volume = geometry_set->get_volume_for_write(); | ||||
| if (input_volume != nullptr) { | if (input_volume != nullptr) { | ||||
| displace_volume(md, ctx, input_volume); | displace_volume(md, ctx, input_volume); | ||||
| } | } | ||||
| } | } | ||||
| ModifierTypeInfo modifierType_VolumeDisplace = { | ModifierTypeInfo modifierType_VolumeDisplace = { | ||||
| /* name */ "Volume Displace", | /* name */ N_("Volume Displace"), | ||||
| /* structName */ "VolumeDisplaceModifierData", | /* structName */ "VolumeDisplaceModifierData", | ||||
| /* structSize */ sizeof(VolumeDisplaceModifierData), | /* structSize */ sizeof(VolumeDisplaceModifierData), | ||||
| /* srna */ &RNA_VolumeDisplaceModifier, | /* srna */ &RNA_VolumeDisplaceModifier, | ||||
| /* type */ eModifierTypeType_NonGeometrical, | /* type */ eModifierTypeType_NonGeometrical, | ||||
| /* flags */ static_cast<ModifierTypeFlag>(0), | /* flags */ static_cast<ModifierTypeFlag>(0), | ||||
| /* icon */ ICON_VOLUME_DATA, /* TODO: Use correct icon. */ | /* icon */ ICON_VOLUME_DATA, /* TODO: Use correct icon. */ | ||||
| /* copyData */ BKE_modifier_copydata_generic, | /* copyData */ BKE_modifier_copydata_generic, | ||||
| Show All 22 Lines | |||||