|
Blender V5.3
|
#include <BKE_modifier.hh>
Definition at line 188 of file BKE_modifier.hh.
| void(*) blender::ModifierTypeInfo::blend_read(BlendDataReader *reader, ModifierData *md) |
Is called when the modifier is read from a file.
It can be used to update pointers to arrays and other structs. Furthermore, fields that have not been written (e.g. runtime data) can be reset.
Definition at line 410 of file BKE_modifier.hh.
Referenced by blender::BKE_modifier_blend_read_data().
| void(*) blender::ModifierTypeInfo::blend_write(BlendWriter *writer, const ID *id_owner, const ModifierData *md) |
Is called when the modifier is written to a file. The modifier data struct itself is written already.
This method should write any additional arrays and referenced structs that should be stored in the file.
Definition at line 402 of file BKE_modifier.hh.
Referenced by blender::BKE_modifier_blend_write().
| void(*) blender::ModifierTypeInfo::copy_data(const ModifierData *md, ModifierData *target, int flag) |
Copy instance data for this modifier type. Should copy all user level settings to the target modifier.
| flag | Copying options (see BKE_lib_id.hh's LIB_ID_COPY_... flags for more). |
Definition at line 228 of file BKE_modifier.hh.
Referenced by blender::BKE_modifier_copydata_ex().
| void(*) blender::ModifierTypeInfo::deform_matrices(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh, MutableSpan< float3 > positions, MutableSpan< float3x3 > matrices) |
Like deform_matrices_EM but called from object mode (for supporting modifiers in sculpt mode).
Definition at line 245 of file BKE_modifier.hh.
Referenced by blender::BKE_crazyspace_build_sculpt(), and blender::BKE_sculpt_get_first_deform_matrices().
| void(*) blender::ModifierTypeInfo::deform_matrices_EM(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh, MutableSpan< float3 > positions, MutableSpan< float3x3 > matrices) |
Set deform matrix per vertex for crazy-space correction.
Definition at line 260 of file BKE_modifier.hh.
Referenced by blender::BKE_crazyspace_get_first_deform_matrices_editbmesh(), and blender::BKE_modifier_is_correctable_deformed().
| void(*) blender::ModifierTypeInfo::deform_verts(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh, MutableSpan< float3 > positions) |
Apply a deformation to the positions in the positions array. If the mesh argument is non-null, if will contain proper (not wrapped) mesh data. The positions array may or may not be the same as the mesh's position attribute.
Definition at line 237 of file BKE_modifier.hh.
Referenced by blender::BKE_crazyspace_build_sculpt(), blender::BKE_curve_calc_modifiers_pre(), blender::BKE_lattice_modifiers_calc(), blender::BKE_modifier_deform_verts(), blender::ed::object::create_applied_mesh_for_modifier(), blender::curve_calc_modifiers_post(), and blender::ed::object::modifier_apply_obdata().
| void(*) blender::ModifierTypeInfo::deform_verts_EM(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh, MutableSpan< float3 > positions) |
Like deform_verts but called during edit-mode if supported. The mesh argument might be a wrapper around edit BMesh data (ME_WRAPPER_TYPE_BMESH).
Definition at line 254 of file BKE_modifier.hh.
Referenced by blender::BKE_modifier_deform_vertsEM(), and blender::bke::editbmesh_calc_modifiers().
| bool(*) blender::ModifierTypeInfo::depends_on_normals(ModifierData *md) |
Returns true when a deform modifier uses mesh normals as input. This callback is only required for deform modifiers that support deforming positions with an edit mesh (when deform_verts_EM is implemented).
Definition at line 357 of file BKE_modifier.hh.
Referenced by blender::BKE_modifier_deform_vertsEM().
| bool(*) blender::ModifierTypeInfo::depends_on_time(Scene *scene, ModifierData *md) |
Should return true if the modifier needs to be recalculated on time changes.
This function is optional (assumes false if not present).
Definition at line 350 of file BKE_modifier.hh.
Referenced by blender::BKE_modifier_depends_ontime().
| ModifierTypeFlag blender::ModifierTypeInfo::flags |
Definition at line 215 of file BKE_modifier.hh.
Referenced by blender::BKE_lattice_modifiers_calc(), blender::BKE_modifier_is_enabled(), blender::BKE_modifier_modify_mesh(), blender::BKE_modifier_supports_cage(), blender::BKE_modifier_supports_mapping(), blender::BKE_modifiers_add_at_end_if_possible(), blender::BKE_modifiers_get_cage_index(), blender::BKE_object_copy_modifier(), blender::BKE_object_support_modifier_type_check(), blender::bke::editbmesh_modifier_is_enabled(), blender::bke::greasepencil::convert::legacy_object_modifier_common(), blender::bke::mesh_calc_modifiers(), blender::ed::object::modifier_add(), blender::ed::object::modifier_add_itemf(), blender::modifier_allocate_and_init(), blender::ed::object::modifier_copy_to_object(), blender::modifier_panel_header(), blender::ed::object::object_modifier_check_move_after(), and blender::ed::object::object_modifier_check_move_before().
| void(*) blender::ModifierTypeInfo::foreach_cache(Object *object, ModifierData *md, FunctionRef< void(const IDCacheKey &cache_key, void **cache_p, uint flags)> fn) |
Iterate over all cache pointers of given modifier. Also see #IDTypeInfo::foreach_cache.
Definition at line 415 of file BKE_modifier.hh.
| void(*) blender::ModifierTypeInfo::foreach_ID_link(ModifierData *md, Object *ob, IDWalkFunc walk, void *user_data) |
Should call the given walk function with a pointer to each ID pointer (i.e. each data-block pointer) that the modifier data stores. This is used for linking on file load and for unlinking data-blocks or forwarding data-block references.
This function is optional.
Definition at line 367 of file BKE_modifier.hh.
Referenced by blender::BKE_modifier_copydata_ex(), blender::BKE_modifier_free_ex(), blender::BKE_modifiers_foreach_ID_link(), and blender::BKE_particlesystem_id_loop().
| void(*) blender::ModifierTypeInfo::foreach_tex_link(ModifierData *md, Object *ob, TexWalkFunc walk, void *user_data) |
Should call the given walk function for each texture that the modifier data stores. This is used for finding all textures in the context for the UI.
This function is optional. If it is not present, it will be assumed the modifier has no textures.
Definition at line 377 of file BKE_modifier.hh.
Referenced by blender::BKE_modifiers_foreach_tex_link().
| void(*) blender::ModifierTypeInfo::foreach_working_space_color(ModifierData *md, const IDTypeForeachColorFunctionCallback &fn) |
Iterate over all working space colors.
Definition at line 423 of file BKE_modifier.hh.
Referenced by blender::object_foreach_working_space_color().
| void(*) blender::ModifierTypeInfo::free_data(ModifierData *md) |
Free internal modifier data variables, this function should not free the md variable itself.
This function is responsible for freeing the runtime data as well.
This function is optional.
Definition at line 324 of file BKE_modifier.hh.
Referenced by blender::BKE_modifier_copydata_generic(), and blender::BKE_modifier_free_ex().
| void(*) blender::ModifierTypeInfo::free_runtime_data(void *runtime_data) |
Free given run-time data.
This data is coming from a modifier of the corresponding type, but actual modifier data is not known here.
Notes:
Definition at line 390 of file BKE_modifier.hh.
Referenced by blender::deg::ObjectRuntimeBackup::restore_modifier_runtime_data().
| int blender::ModifierTypeInfo::icon |
Icon of the modifier. Usually something like ICON_MOD_*.
Definition at line 218 of file BKE_modifier.hh.
Referenced by blender::buttons_texture_modifier_foreach().
| char blender::ModifierTypeInfo::idname[64] |
A unique identifier for this modifier. Used to generate the panel id type name. See BKE_modifier_type_panel_id.
Definition at line 193 of file BKE_modifier.hh.
Referenced by blender::BKE_modifier_type_panel_id().
| void(*) blender::ModifierTypeInfo::init_data(ModifierData *md) |
Initialize new instance data for this modifier type, this function should set modifier variables to their default values.
This function is optional.
Definition at line 298 of file BKE_modifier.hh.
Referenced by blender::modifier_allocate_and_init().
| bool(*) blender::ModifierTypeInfo::is_disabled(const Scene *scene, ModifierData *md, bool use_render_params) |
Return a boolean value indicating if this modifier is able to be calculated based on the modifier data. This is not regarding the md->flag, that is tested by the system, this is just if the data validates (for example, a lattice will return false if the lattice object is not defined).
This function is optional (assumes never disabled if not present).
Definition at line 335 of file BKE_modifier.hh.
Referenced by blender::BKE_lattice_modifiers_calc(), blender::BKE_modifier_couldbe_cage(), blender::BKE_modifier_is_enabled(), blender::BKE_modifier_supports_cage(), blender::BKE_modifiers_get_cage_index(), blender::ed::object::create_applied_mesh_for_modifier(), blender::ed::object::modifier_apply_obdata(), blender::ed::object::modifier_apply_shape(), and blender::modifier_panel_header().
| void(*) blender::ModifierTypeInfo::modify_geometry_set(ModifierData *md, const ModifierEvalContext *ctx, bke::GeometrySet *geometry_set) |
The modifier has to change the geometry set in-place. The geometry set can contain zero or more geometry components. This callback can be used by modifiers that don't work on any specific type of geometry (e.g. mesh).
Definition at line 286 of file BKE_modifier.hh.
Referenced by blender::ed::object::apply_grease_pencil_for_modifier(), blender::ed::object::apply_grease_pencil_for_modifier_all_keyframes(), blender::BKE_modifier_deform_verts(), blender::BKE_object_support_modifier_type_check(), blender::ed::object::create_applied_mesh_for_modifier(), blender::curve_calc_modifiers_post(), blender::curves_evaluate_modifiers(), blender::empty_object_apply_modifiers(), blender::grease_pencil_evaluate_modifiers(), blender::ed::object::modifier_apply_obdata(), blender::bke::modifier_modify_mesh_and_geometry_set(), blender::pointcloud_evaluate_modifiers(), and blender::volume_evaluate_modifiers().
| Mesh *(*) blender::ModifierTypeInfo::modify_mesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh) |
For non-deform types: apply the modifier and return a mesh data-block.
The mesh argument should always be non-NULL; the modifier should use the passed in mesh data-block rather than object->data, as it contains the mesh with modifier applied up to this point.
The modifier may modify and return the mesh argument, but must not free it and must ensure any referenced data layers are converted to non-referenced before modification.
Definition at line 279 of file BKE_modifier.hh.
Referenced by blender::BKE_modifier_modify_mesh(), blender::BKE_multires_create_mesh(), blender::ed::object::create_applied_mesh_for_modifier(), and blender::curve_calc_modifiers_post().
| char blender::ModifierTypeInfo::name[64] |
The user visible name for this modifier.
Definition at line 196 of file BKE_modifier.hh.
Referenced by blender::BKE_modifier_unique_name(), blender::modifier_allocate_and_init(), and blender::ed::object::modifier_copy_to_object().
| void(*) blender::ModifierTypeInfo::panel_register(ARegionType *region_type) |
Register the panel types for the modifier's UI.
Definition at line 393 of file BKE_modifier.hh.
Referenced by blender::ED_spacetype_buttons(), and blender::ui::template_modifiers().
| void(*) blender::ModifierTypeInfo::required_data_mask(ModifierData *md, CustomData_MeshMasks *r_cddata_masks) |
Should add to passed r_cddata_masks the data types that this modifier needs. If (mask & (1 << (layer type))) != 0, this modifier needs that custom data layer. It can change required layers depending on the modifier's settings.
Note that this means extra data (e.g. vertex groups) - it is assumed that all modifiers need mesh data and deform modifiers need vertex coordinates.
If this function is not present, it is assumed that no extra data is needed.
This function is optional.
Definition at line 314 of file BKE_modifier.hh.
Referenced by blender::BKE_modifier_calc_data_masks(), blender::bke::editbmesh_calc_modifiers(), and blender::bke::mesh_calc_modifiers().
| StructRNA** blender::ModifierTypeInfo::srna |
StructRNA of this modifier. This is typically something like RNA_*Modifier. Use a pointer to the struct pointer because ModifierTypeInfo is statically initialized, when the corresponding StructRNA pointers aren't set yet.
Definition at line 212 of file BKE_modifier.hh.
| char blender::ModifierTypeInfo::struct_name[64] |
The DNA struct name for the modifier data type, used to write the DNA data out.
Definition at line 202 of file BKE_modifier.hh.
Referenced by blender::BKE_modifier_blend_write(), and blender::modifier_allocate_and_init().
| int blender::ModifierTypeInfo::struct_size |
The size of the modifier data type, used by allocation.
Definition at line 205 of file BKE_modifier.hh.
Referenced by blender::BKE_modifier_copydata_generic(), blender::modifier_allocate_and_init(), and blender::modifier_struct_size().
| ModifierTypeType blender::ModifierTypeInfo::type |
Definition at line 214 of file BKE_modifier.hh.
Referenced by blender::BKE_crazyspace_get_first_deform_matrices_editbmesh(), blender::BKE_curve_calc_modifiers_pre(), blender::BKE_lattice_modifiers_calc(), blender::BKE_modifier_calc_data_masks(), blender::BKE_modifier_is_non_geometrical(), blender::BKE_modifier_is_same_topology(), blender::BKE_modifier_supports_mapping(), blender::BKE_modifiers_add_at_end_if_possible(), blender::BKE_multires_create_deformed_base_mesh_vert_coords(), blender::BKE_object_is_deform_modified(), blender::blo_do_versions_pre250(), blender::ed::sculpt_paint::dyntopo::check_attribute_warning(), blender::crazyspace_modifier_supports_deform(), blender::crazyspace_modifier_supports_deform_matrices(), blender::ed::object::create_applied_mesh_for_modifier(), blender::curve_calc_modifiers_post(), blender::curve_get_tessellate_point(), blender::bke::editbmesh_calc_modifiers(), blender::bke::greasepencil::convert::legacy_object_modifier_common(), blender::bke::mesh_calc_modifiers(), blender::ed::object::modifier_apply_exec_ex(), blender::ed::object::modifier_apply_obdata(), blender::ed::object::modifier_apply_shape(), blender::modifier_panel_header(), blender::ed::object::object_modifier_check_move_after(), blender::ed::object::object_modifier_check_move_before(), and blender::sculpt_modifiers_active().
| void(*) blender::ModifierTypeInfo::update_depsgraph(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx) |
Add the appropriate relations to the dependency graph.
This function is optional.
Definition at line 342 of file BKE_modifier.hh.
Referenced by blender::deg::DepsgraphRelationBuilder::build_object_modifiers().