90#include "RNA_prototypes.hh"
153 const int mode = md_eval->
mode;
156 md_eval->
mode = mode;
206 next_md = next_md->
next;
265 if ((md != exclude) && (md->type == type)) {
275 const bool include_orig,
279 ID *ob_data_id =
static_cast<ID *
>(orig_ob->
data);
289 int totfound = include_orig ? 0 : 1;
294 if (((ob != orig_ob) || include_orig) && (ob->
data == orig_ob->
data)) {
303 else if (include_orig) {
304 return callback(orig_ob, callback_data);
319 int totlevel = *((
char *)totlevel_v);
367 *r_sort_depsgraph =
true;
370 *r_sort_depsgraph =
true;
388 ob->
mode &= ~OB_MODE_PARTICLE_EDIT;
400 bool sort_depsgraph =
false;
418 bool sort_depsgraph =
false;
451 BKE_report(reports, error_type,
"Cannot move above a modifier requiring original data");
457 BKE_report(reports, error_type,
"Cannot move modifier beyond the start of the list");
489 BKE_report(reports, error_type,
"Cannot move beyond a non-deforming modifier");
495 BKE_report(reports, error_type,
"Cannot move modifier beyond the end of the list");
522 BKE_report(reports, error_type,
"Cannot move modifier beyond the end of the stack");
529 if (md_index < index) {
533 for (; md_index < index; md_index++, md_target = md_target->
next) {
535 if (!allow_partial || md == md_target) {
548 else if (md_index > index) {
552 for (; md_index > index; md_index--, md_target = md_target->
prev) {
554 if (!allow_partial || md == md_target) {
605 "Object '%s' does not support %s modifiers",
615 "Modifier can only be added once to object '%s'",
624 "Copying modifier '%s' to object '%s' failed",
672 int verts_num = 0, edges_num = 0;
674 for (
int a = 0; a < part_num; a++) {
684 for (
int a = 0; a < child_num; a++) {
693 if (verts_num == 0) {
702 mesh->edges_num = edges_num;
722 for (
int a = 0; a < part_num; a++) {
725 for (
int k = 0; k <= kmax; k++, key++, cvert++, vert_index++) {
726 positions[vert_index] = key->
co;
728 edges[edge_index] =
int2(cvert - 1, cvert);
733 select_vert.
span[vert_index] =
true;
739 for (
int a = 0; a < child_num; a++) {
742 for (
int k = 0; k <= kmax; k++, key++, cvert++, vert_index++) {
745 edges[edge_index] =
int2(cvert - 1, cvert);
750 select_vert.
span[vert_index] =
true;
772 "vertex size mismatch (Mesh '%s':%d != KeyBlock '%s':%d)",
801 const bool use_virtual_modifiers,
802 const bool build_shapekey_layers,
806 reinterpret_cast<Mesh *
>(ob_eval->
runtime->data_orig) :
807 reinterpret_cast<Mesh *
>(ob_eval->
data);
819 if (build_shapekey_layers && mesh->key) {
825 reinterpret_cast<float(*)[3]
>(mesh->vert_positions_for_write().data()),
830 Mesh *mesh_temp =
reinterpret_cast<Mesh *
>(
834 if (use_virtual_modifiers) {
839 md_eval_virt = md_eval_virt->
next)
851 mti_virt->
deform_verts(md_eval_virt, &mectx, mesh_temp, deformedVerts);
855 Mesh *result =
nullptr;
858 mti->
deform_verts(md_eval, &mectx, result, deformedVerts);
859 result->tag_positions_changed();
861 if (build_shapekey_layers) {
866 if (build_shapekey_layers) {
875 BKE_report(reports,
RPT_ERROR,
"Evaluated geometry from modifier does not contain a mesh");
881 result = mti->
modify_mesh(md_eval, &mectx, mesh_temp);
882 if (mesh_temp != result) {
917 Key *key = mesh->key;
936 if (key ==
nullptr) {
959 const eCustomDataMask types)
982 if (!
meta_data_matches(attributes.lookup_meta_data(mesh.default_color_attribute),
991 const int eval_frame,
996 using namespace bke::greasepencil;
1000 const Layer &layer = orig_grease_pencil.layer(layer_i);
1001 orig_layers_to_apply.
add(&layer);
1005 const int old_layers_num = src_grease_pencil.layers().size();
1008 for (
const int layer_i :
IndexRange(old_layers_num)) {
1009 const Layer &layer = src_grease_pencil.layer(layer_i);
1012 layers_map[new_layer_index].
append(layer_i);
1015 src_grease_pencil, layers_map, {});
1025 Set<Layer *> orig_layers_to_clear(orig_grease_pencil.layers_for_write());
1026 for (
const TreeNode *node_eval : merged_layers_grease_pencil.nodes()) {
1028 TreeNode *node_orig = orig_grease_pencil.find_node_by_name(node_eval->name());
1031 if (node_eval->is_layer()) {
1033 const bool has_valid_orig_layer = (node_orig !=
nullptr && node_orig->is_layer());
1034 if (!has_valid_orig_layer) {
1036 Layer &layer_orig = orig_grease_pencil.add_layer(node_eval->name(),
true);
1037 orig_layers_to_apply.
add(&layer_orig);
1039 orig_grease_pencil.insert_frame(layer_orig, eval_frame);
1040 node_orig = &layer_orig.
as_node();
1043 Layer &layer_orig = node_orig->as_layer();
1045 orig_layers_to_clear.
remove(&layer_orig);
1047 if (orig_layers_to_apply.
contains(&layer_orig)) {
1049 const Layer &layer_eval = node_eval->as_layer();
1054 eval_to_orig_layer_map.add_new(&layer_eval, &layer_orig);
1060 if (node_orig && node_orig->parent_group()) {
1062 node_orig->parent_group(),
1063 [&](TreeNode **node_ptr) {
1065 *node_ptr = node_orig;
1067 [&](TreeNode **node_ptr) {
1068 orig_grease_pencil.move_node_after(*node_orig, **node_ptr);
1069 *node_ptr = node_orig;
1076 for (
Layer *layer_orig : orig_layers_to_clear) {
1078 Drawing *drawing_orig = orig_grease_pencil.insert_frame(*layer_orig, eval_frame);
1079 if (drawing_orig ==
nullptr) {
1081 drawing_orig = orig_grease_pencil.get_drawing_at(*layer_orig, eval_frame);
1091 for (
auto [layer_eval, layer_orig] : eval_to_orig_layer_map.items()) {
1092 const Drawing *drawing_eval = merged_layers_grease_pencil.get_drawing_at(*layer_eval,
1094 Drawing *drawing_orig = orig_grease_pencil.get_drawing_at(*layer_orig, eval_frame);
1095 if (drawing_orig && drawing_eval) {
1101 all_updated_drawings.
add_new(drawing_orig);
1109 for (
Material *eval_material : eval_materials) {
1110 if (eval_material !=
nullptr && eval_material->id.orig_id !=
nullptr) {
1111 original_materials.
add_new(
reinterpret_cast<Material *
>(eval_material->id.orig_id));
1123 const int map_index = original_materials.
index_of_try(material);
1124 if (map_index != -1) {
1125 material_indices_map[mat_i] = map_index;
1130 if (!material_indices_map.
is_empty() &&
1139 if (all_updated_drawings.
contains(&drawing)) {
1144 if (!attributes.contains(
"material_index")) {
1148 "material_index", AttrDomain::Curve);
1149 for (
int &material_index : material_indices.span) {
1150 if (material_index >= 0 && material_index < material_indices_map.
size()) {
1151 material_index = material_indices_map[material_index];
1154 material_indices.finish();
1160 for (
const int layer_eval_i : merged_layers_grease_pencil.layers().index_range()) {
1161 const Layer *layer_eval = &merged_layers_grease_pencil.layer(layer_eval_i);
1162 if (eval_to_orig_layer_map.contains(layer_eval)) {
1163 const Layer *layer_orig = eval_to_orig_layer_map.lookup(layer_eval);
1164 const int layer_orig_index = *orig_grease_pencil.get_layer_index(*layer_orig);
1165 eval_to_orig_layer_indices_map.
add(layer_eval_i, layer_orig_index);
1170 AttributeAccessor src_attributes = merged_layers_grease_pencil.attributes();
1171 MutableAttributeAccessor dst_attributes = orig_grease_pencil.attributes_for_write();
1174 if (attribute_name_is_anonymous(iter.
name)) {
1181 GSpanAttributeWriter dst = dst_attributes.lookup_or_add_for_write_only_span(
1186 attribute_math::convert_to_static_type(src.
type(), [&](
auto dummy) {
1187 using T = decltype(dummy);
1188 Span<T> src_span = src.typed<T>();
1189 MutableSpan<T> dst_span = dst.span.typed<T>();
1190 for (const auto [src_i, dst_i] : eval_to_orig_layer_indices_map.items()) {
1191 dst_span[dst_i] = src_span[src_i];
1198 BKE_id_free(
nullptr, &merged_layers_grease_pencil);
1206 using namespace bke;
1207 using namespace bke::greasepencil;
1212 ob_eval->
runtime->data_orig) :
1213 &grease_pencil_orig;
1217 grease_pencil_temp->
runtime->eval_frame = eval_frame;
1218 GeometrySet eval_geometry_set = GeometrySet::from_grease_pencil(grease_pencil_temp,
1219 GeometryOwnershipType::Owned);
1223 if (!eval_geometry_set.has_grease_pencil()) {
1228 *eval_geometry_set.get_component_for_write<GreasePencilComponent>().get_for_write();
1232 grease_pencil_orig.layers().index_range(),
1233 grease_pencil_orig);
1237 for (
Layer *layer : grease_pencil_orig.layers_for_write()) {
1238 if (layer->name().is_empty()) {
1239 grease_pencil_orig.rename_node(*bmain, layer->as_node(),
DATA_(
"Layer"));
1252 using namespace bke;
1253 using namespace bke::greasepencil;
1262 for (
const int layer_i : grease_pencil_orig.layers().index_range()) {
1263 const Layer &layer = grease_pencil_orig.layer(layer_i);
1264 for (
const auto &[key, value] : layer.frames().items()) {
1265 if (value.is_end()) {
1273 Array<int> sorted_frame_times(layer_indices_to_apply_per_frame.
size());
1275 for (
const int key : layer_indices_to_apply_per_frame.
keys()) {
1276 sorted_frame_times[i++] = key;
1278 std::sort(sorted_frame_times.
begin(), sorted_frame_times.
end());
1281 bool changed =
false;
1282 for (
const int eval_frame : sorted_frame_times) {
1283 const Span<int> layer_indices = layer_indices_to_apply_per_frame.
lookup(eval_frame).as_span();
1284 scene->r.cfra = eval_frame;
1290 ob_eval->
runtime->data_orig) :
1291 &grease_pencil_orig;
1295 grease_pencil_temp->
runtime->eval_frame = eval_frame;
1296 GeometrySet eval_geometry_set = GeometrySet::from_grease_pencil(grease_pencil_temp,
1297 GeometryOwnershipType::Owned);
1302 if (!eval_geometry_set.has_grease_pencil()) {
1306 *eval_geometry_set.get_component_for_write<GreasePencilComponent>().get_for_write();
1309 const IndexMask orig_layers_to_apply = IndexMask::from_indices(layer_indices, memory);
1311 grease_pencil_result, eval_frame, orig_layers_to_apply, grease_pencil_orig);
1317 scene->r.cfra = prev_frame;
1321 for (
Layer *layer : grease_pencil_orig.layers_for_write()) {
1322 if (layer->name().is_empty()) {
1323 grease_pencil_orig.rename_node(*bmain, layer->as_node(),
DATA_(
"Layer"));
1336 const bool do_all_keyframes)
1376 if (!mesh_applied) {
1385 mesh->attributes_for_write().remove_anonymous();
1405 "Cannot apply constructive modifiers on curve. Convert curve to mesh in order to apply");
1411 "Applied modifier only changed CV points, not tessellated/bevel vertices");
1416 md_eval, &mectx,
nullptr, {
reinterpret_cast<float3 *
>(vertexCos), verts_num});
1436 md_eval, &mectx,
nullptr, {
reinterpret_cast<float3 *
>(vertexCos), verts_num});
1451 &curves, bke::GeometryOwnershipType::ReadOnly);
1456 BKE_report(reports,
RPT_ERROR,
"Evaluated geometry from modifier does not contain curves");
1462 curves_eval.
geometry.wrap().attributes_for_write().remove_anonymous();
1464 curves.geometry.wrap() = std::move(curves_eval.
geometry.wrap());
1476 &points, bke::GeometryOwnershipType::ReadOnly);
1482 reports,
RPT_ERROR,
"Evaluated geometry from modifier does not contain a point cloud");
1489 pointcloud_eval->attributes_for_write().remove_anonymous();
1501 bool success =
false;
1502 if (do_all_keyframes) {
1509 depsgraph, scene, ob, grease_pencil_orig, md);
1517 "Evaluated geometry from modifier does not contain grease pencil geometry");
1549 const bool do_all_keyframes)
1564 "Constructive modifier cannot be applied to multi-res data in sculpt mode");
1569 BKE_report(reports,
RPT_INFO,
"Applied modifier was not first, result may not be as expected");
1578 Depsgraph *local_depsgraph =
nullptr;
1596 apply_depsgraph = local_depsgraph;
1607 bool did_apply =
false;
1613 reports, apply_depsgraph, scene, ob, md_eval, do_all_keyframes);
1617 if (!keep_modifier) {
1624 if (local_depsgraph !=
nullptr) {
1675 "use_selected_objects",
1678 "Affect all selected objects instead of just the active object");
1692 bool changed =
false;
1749 group_item = md_item;
1755 group_item =
nullptr;
1772 ot->
name =
"Add Modifier";
1773 ot->
description =
"Add a procedural operation/effect to the active object";
1774 ot->
idname =
"OBJECT_OT_modifier_add";
1803 const bool is_editmode_allowed,
1804 const bool is_liboverride_allowed)
1811 if (
mod ==
nullptr && ob !=
nullptr) {
1818 if (obtype_flag && ((1 << ob->
type) & obtype_flag) == 0) {
1827 C,
"Cannot edit modifiers coming from linked data in a library override");
1854 ot->
srna,
"modifier",
nullptr,
MAX_NAME,
"Modifier",
"Name of the modifier to edit");
1861 ot->
srna,
"report",
false,
"Report",
"Create a notification after the operation");
1880 if (ctx_ptr.
data !=
nullptr) {
1911 if (ctx_ptr.
data !=
nullptr) {
1943 if (md && type != 0 && md->
type != type) {
1965 bool changed =
false;
1969 if (md ==
nullptr) {
1973 int mode_orig = ob->
mode;
2015 ot->
name =
"Remove Modifier";
2016 ot->
description =
"Remove a modifier from the active object";
2017 ot->
idname =
"OBJECT_OT_modifier_remove";
2058 ot->
name =
"Clear Object Modifiers";
2059 ot->
description =
"Clear all modifiers from the selected objects";
2060 ot->
idname =
"OBJECT_OT_modifiers_clear";
2100 ot->
name =
"Move Up Modifier";
2102 ot->
idname =
"OBJECT_OT_modifier_move_up";
2145 ot->
name =
"Move Down Modifier";
2147 ot->
idname =
"OBJECT_OT_modifier_move_down";
2171 bool changed =
false;
2203 ot->
name =
"Move Active Modifier to Index";
2205 "Change the modifier's index in the stack so it evaluates after the set number of others";
2206 ot->
idname =
"OBJECT_OT_modifier_move_to_index";
2216 ot->
srna,
"index", 0, 0, INT_MAX,
"Index",
"The index to move the modifier to", 0, INT_MAX);
2241 if (md !=
nullptr) {
2246 C,
"Constructive modifier cannot be applied to multi-res data in sculpt mode");
2276 bool changed =
false;
2280 if (md ==
nullptr) {
2354 IFACE_(
"Apply Modifier"),
2355 IFACE_(
"Make data single-user, apply modifier, and remove it from the list."),
2370 ot->
name =
"Apply Modifier";
2371 ot->
description =
"Apply modifier and remove from the stack";
2372 ot->
idname =
"OBJECT_OT_modifier_apply";
2388 "For mesh objects, merge UV coordinates that share a vertex to account for "
2389 "imprecision in some modifiers");
2393 "Make Data Single User",
2394 "Make the object's data single user if needed");
2399 "Apply to all keyframes",
2400 "For Grease Pencil objects, apply the modifier to all the keyframes");
2438 return TIP_(
"Apply modifier as a new shapekey and keep it in the stack");
2446 ot->
name =
"Apply Modifier as Shape Key";
2447 ot->
description =
"Apply modifier as a new shape key and remove from the stack";
2448 ot->
idname =
"OBJECT_OT_modifier_apply_as_shapekey";
2459 ot->
srna,
"keep_modifier",
false,
"Keep Modifier",
"Do not remove the modifier from stack");
2500 ot->
name =
"Convert Particles to Mesh";
2502 ot->
idname =
"OBJECT_OT_modifier_convert";
2526 bool changed =
false;
2561 ot->
name =
"Copy Modifier";
2562 ot->
description =
"Duplicate modifier at the same position in the stack";
2563 ot->
idname =
"OBJECT_OT_modifier_copy";
2605 ot->
name =
"Set Active Modifier";
2606 ot->
description =
"Activate the modifier to use as the context";
2607 ot->
idname =
"OBJECT_OT_modifier_set_active";
2652 if (num_copied > 0) {
2698 bool found_supported_objects =
false;
2707 found_supported_objects =
true;
2712 found_supported_objects =
true;
2718 if (!found_supported_objects) {
2727 ot->
name =
"Copy Modifier to Selected";
2728 ot->
description =
"Copy the modifier from the active object to all selected objects";
2729 ot->
idname =
"OBJECT_OT_modifier_copy_to_selected";
2749 if (
object == active_object) {
2787 ot->
name =
"Copy Modifiers to Selected Objects";
2788 ot->
idname =
"OBJECT_OT_modifiers_copy_to_selected";
2789 ot->
description =
"Copy modifiers to other selected objects";
2806 if (
BMEditMesh *em = mesh->runtime->edit_mesh.get()) {
2822 return (ob !=
nullptr &&
2839 vs->
flag &= ~MVERT_SKIN_ROOT;
2883 ot->
name =
"Skin Root Mark";
2885 ot->
idname =
"OBJECT_OT_skin_root_mark";
2922 vs->
flag &= ~MVERT_SKIN_LOOSE;
2937 {
SKIN_LOOSE_MARK,
"MARK", 0,
"Mark",
"Mark selected vertices as loose"},
2938 {
SKIN_LOOSE_CLEAR,
"CLEAR", 0,
"Clear",
"Set selected vertices as not loose"},
2939 {0,
nullptr, 0,
nullptr,
nullptr},
2942 ot->
name =
"Skin Mark/Clear Loose";
2944 ot->
idname =
"OBJECT_OT_skin_loose_mark_clear";
2985 ot->
name =
"Skin Radii Equalize";
2986 ot->
description =
"Make skin radii of selected vertices equal on each axis";
2987 ot->
idname =
"OBJECT_OT_skin_radii_equalize";
3005 for (
int i = 0; i < emap[parent_v].
size(); i++) {
3006 int endx = emap[parent_v][i];
3007 const int2 &edge = edges[endx];
3015 int v = bke::mesh::edge_other_vert(edge, parent_v);
3019 bone->
parent = parent_bone;
3020 if (parent_bone !=
nullptr) {
3031 if (dg !=
nullptr) {
3043 const Span<float3> me_positions = mesh->vert_positions();
3051 const Span<float3> positions_eval = me_eval_deform->vert_positions();
3064 arm->
edbo = MEM_cnew<ListBase>(
"edbo armature");
3072 me_edges, mesh->verts_num, vert_to_edge_offsets, vert_to_edge_indices);
3078 for (
int v = 0;
v < mesh->verts_num;
v++) {
3085 if (emap[
v].
size() > 1) {
3091 bone->
head[1] = 1.0f;
3095 if (emap[
v].
size() >= 1) {
3097 skin_ob, positions_eval, me_edges.
data(), arm, edges_visited, emap, bone,
v);
3154 ot->
name =
"Skin Armature Create";
3155 ot->
description =
"Create an armature that parallels the skin layout";
3156 ot->
idname =
"OBJECT_OT_skin_armature_create";
3195 const bool is_bind = (csmd->
bind_coords !=
nullptr);
3232 ot->
name =
"Corrective Smooth Bind";
3233 ot->
description =
"Bind base pose in Corrective Smooth modifier";
3234 ot->
idname =
"OBJECT_OT_correctivesmooth_bind";
3264 if (mmd ==
nullptr) {
3307 ot->
name =
"Mesh Deform Bind";
3308 ot->
description =
"Bind mesh to cage in mesh deform modifier";
3309 ot->
idname =
"OBJECT_OT_meshdeform_bind";
3360 ot->
name =
"Explode Refresh";
3362 ot->
idname =
"OBJECT_OT_explode_refresh";
3410 return (
G.is_break);
3439 worker_status->
stop =
false;
3448 oj->
ocean =
nullptr;
3490 int cfra = scene->r.cfra;
3519 scene->r.cfra = cfra;
3527 scene->r.cfra = cfra;
3536 OceanBakeJob *oj = MEM_cnew<OceanBakeJob>(
"ocean bake job");
3563 ot->
idname =
"OBJECT_OT_ocean_bake";
3594 if (lmd ==
nullptr) {
3599 lmd->
flag &= ~MOD_LAPLACIANDEFORM_BIND;
3616 if (lmd_eval->
vertexco ==
nullptr) {
3639 ot->
name =
"Laplacian Deform Bind";
3640 ot->
description =
"Bind mesh to system in laplacian deform modifier";
3641 ot->
idname =
"OBJECT_OT_laplaciandeform_bind";
3671 if (smd ==
nullptr) {
3676 smd->
flags &= ~MOD_SDEF_BIND;
3706 ot->
name =
"Surface Deform Bind";
3707 ot->
description =
"Bind mesh to target in surface deform modifier";
3708 ot->
idname =
"OBJECT_OT_surfacedeform_bind";
3737 if (nmd ==
nullptr) {
3745 nmd->
settings.
properties, std::string(input_name + std::string(
"_use_attribute")).c_str());
3746 if (!use_attribute) {
3767 ot->
name =
"Input Attribute Toggle";
3769 "Switch between an attribute and a single value to define the data for every element";
3770 ot->
idname =
"OBJECT_OT_geometry_nodes_input_attribute_toggle";
3798 if (
tree ==
nullptr) {
3805 nmd->
flag &= ~NODES_MODIFIER_HIDE_DATABLOCK_SELECTOR;
3807 if (new_tree ==
nullptr) {
3822 ot->
name =
"Copy Geometry Node Group";
3823 ot->
description =
"Copy the active geometry node group and assign it to the active modifier";
3824 ot->
idname =
"OBJECT_OT_geometry_node_tree_copy_assign";
3849 if (dmd ==
nullptr) {
3856 const int new_active_index = std::clamp(dmd->segment_active_index + 1, 0, dmd->segments_num);
3857 if (dmd->segments_num != 0) {
3859 memcpy(new_segments,
3860 dmd->segments_array,
3863 memcpy(new_segments + new_active_index + 1,
3864 dmd->segments_array + new_active_index,
3886 dmd->segments_array = new_segments;
3887 dmd->segments_num++;
3888 dmd->segment_active_index = new_active_index;
3907 ot->
name =
"Add Segment";
3909 ot->
idname =
"OBJECT_OT_grease_pencil_dash_modifier_segment_add";
3929 if (dmd ==
nullptr) {
3933 if (!dmd->segments().index_range().contains(dmd->segment_active_index)) {
3937 dna::array::remove_index(&dmd->segments_array,
3939 &dmd->segment_active_index,
3940 dmd->segment_active_index,
3962 ot->
name =
"Remove Dash Segment";
3963 ot->
description =
"Remove the active segment from the dash modifier";
3964 ot->
idname =
"OBJECT_OT_grease_pencil_dash_modifier_segment_remove";
3976 ot->
srna,
"index", 0, 0, INT_MAX,
"Index",
"Index of the segment to remove", 0, INT_MAX);
3990 if (dmd ==
nullptr) {
3994 if (dmd->segments_num < 2) {
4000 switch (direction) {
4001 case DashSegmentMoveDirection::Up:
4002 if (dmd->segment_active_index == 0) {
4006 std::swap(dmd->segments_array[dmd->segment_active_index],
4007 dmd->segments_array[dmd->segment_active_index - 1]);
4009 dmd->segment_active_index--;
4011 case DashSegmentMoveDirection::Down:
4012 if (dmd->segment_active_index == dmd->segments_num - 1) {
4016 std::swap(dmd->segments_array[dmd->segment_active_index],
4017 dmd->segments_array[dmd->segment_active_index + 1]);
4019 dmd->segment_active_index++;
4044 {
int(DashSegmentMoveDirection::Up),
"UP", 0,
"Up",
""},
4045 {
int(DashSegmentMoveDirection::Down),
"DOWN", 0,
"Down",
""},
4046 {0,
nullptr, 0,
nullptr,
nullptr},
4050 ot->
name =
"Move Dash Segment";
4051 ot->
description =
"Move the active dash segment up or down";
4052 ot->
idname =
"OBJECT_OT_grease_pencil_dash_modifier_segment_move";
4083 if (tmd ==
nullptr) {
4090 const int new_active_index = std::clamp(tmd->segment_active_index + 1, 0, tmd->segments_num);
4091 if (tmd->segments_num != 0) {
4093 memcpy(new_segments,
4094 tmd->segments_array,
4097 memcpy(new_segments + new_active_index + 1,
4098 tmd->segments_array + new_active_index,
4110 if (
STREQ(segment.name, name.data())) {
4120 tmd->segments_array = new_segments;
4121 tmd->segments_num++;
4122 tmd->segment_active_index++;
4141 ot->
name =
"Add Segment";
4143 ot->
idname =
"OBJECT_OT_grease_pencil_time_modifier_segment_add";
4163 if (tmd ==
nullptr) {
4167 if (!tmd->segments().index_range().contains(tmd->segment_active_index)) {
4171 dna::array::remove_index(&tmd->segments_array,
4173 &tmd->segment_active_index,
4174 tmd->segment_active_index,
4196 ot->
name =
"Remove Segment";
4197 ot->
description =
"Remove the active segment from the time modifier";
4198 ot->
idname =
"OBJECT_OT_grease_pencil_time_modifier_segment_remove";
4210 ot->
srna,
"index", 0, 0, INT_MAX,
"Index",
"Index of the segment to remove", 0, INT_MAX);
4224 if (tmd ==
nullptr) {
4228 if (tmd->segments_num < 2) {
4234 switch (direction) {
4235 case TimeSegmentMoveDirection::Up:
4236 if (tmd->segment_active_index == 0) {
4240 std::swap(tmd->segments_array[tmd->segment_active_index],
4241 tmd->segments_array[tmd->segment_active_index - 1]);
4243 tmd->segment_active_index--;
4245 case TimeSegmentMoveDirection::Down:
4246 if (tmd->segment_active_index == tmd->segments_num - 1) {
4250 std::swap(tmd->segments_array[tmd->segment_active_index],
4251 tmd->segments_array[tmd->segment_active_index + 1]);
4253 tmd->segment_active_index++;
4278 {
int(TimeSegmentMoveDirection::Up),
"UP", 0,
"Up",
""},
4279 {
int(TimeSegmentMoveDirection::Down),
"DOWN", 0,
"Down",
""},
4280 {0,
nullptr, 0,
nullptr,
nullptr},
4284 ot->
name =
"Move Segment";
4285 ot->
description =
"Move the active time segment up or down";
4286 ot->
idname =
"OBJECT_OT_grease_pencil_time_modifier_segment_move";
C++ functions to deal with Armature collections (i.e. the successor of bone layers).
void ANIM_armature_bonecoll_show_all(bArmature *armature)
AnimationEvalContext BKE_animsys_eval_context_construct(struct Depsgraph *depsgraph, float eval_time) ATTR_WARN_UNUSED_RESULT
void BKE_animsys_evaluate_animdata(struct ID *id, struct AnimData *adt, const struct AnimationEvalContext *anim_eval_context, eAnimData_Recalc recalc, bool flush_to_original)
#define ATTR_DOMAIN_MASK_COLOR
#define ATTR_DOMAIN_AS_MASK(domain)
#define CTX_DATA_BEGIN(C, Type, instance, member)
PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type)
void CTX_wm_operator_poll_msg_set(bContext *C, const char *msg)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Object * CTX_data_edit_object(const bContext *C)
bool CTX_data_selected_objects(const bContext *C, blender::Vector< PointerRNA > *list)
Main * CTX_data_main(const bContext *C)
bool CTX_data_selected_editable_objects(const bContext *C, blender::Vector< PointerRNA > *list)
wmWindowManager * CTX_wm_manager(const bContext *C)
View3D * CTX_wm_view3d(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
void BKE_curve_nurbs_vert_coords_apply(ListBase *lb, const float(*vert_coords)[3], bool constrain_2d)
float(* BKE_curve_nurbs_vert_coords_alloc(const ListBase *lb, int *r_vert_len))[3]
Low-level operations for curves that cannot be defined in the C++ header yet.
void BKE_curves_data_update(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *object)
Low-level operations for curves.
int CustomData_get_offset(const CustomData *data, eCustomDataType type)
int CustomData_get_layer_index_n(const CustomData *data, eCustomDataType type, int n)
void * CustomData_add_layer_named(CustomData *data, eCustomDataType type, eCDAllocType alloctype, int totelem, blender::StringRef name)
bool CustomData_free_layer_active(CustomData *data, eCustomDataType type, int totelem)
void * CustomData_bmesh_get(const CustomData *data, void *block, eCustomDataType type)
const CustomData_MeshMasks CD_MASK_BAREMESH
void * CustomData_get_layer_for_write(CustomData *data, eCustomDataType type, int totelem)
const void * CustomData_add_layer_with_data(CustomData *data, eCustomDataType type, void *layer_data, int totelem, const blender::ImplicitSharingInfo *sharing_info)
bool CustomData_has_layer(const CustomData *data, eCustomDataType type)
void * CustomData_add_layer(CustomData *data, eCustomDataType type, eCDAllocType alloctype, int totelem)
const CustomData_MeshMasks CD_MASK_DERIVEDMESH
#define CD_TYPE_AS_MASK(_type)
display list (or rather multi purpose list) stuff.
void BKE_displist_make_curveTypes(struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *ob, bool for_render)
BMEditMesh * BKE_editmesh_from_object(Object *ob)
Return the BMEditMesh for a given object.
struct PartDeflect * BKE_partdeflect_new(int type)
Low-level operations for grease pencil.
IDProperty * IDP_GetPropertyFromGroup(const IDProperty *prop, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Key * BKE_key_add(Main *bmain, ID *id)
KeyBlock * BKE_keyblock_add(Key *key, const char *name)
void BKE_keyblock_convert_to_mesh(const KeyBlock *kb, float(*vert_positions)[3], int totvert)
void BKE_keyblock_convert_from_mesh(const Mesh *mesh, const Key *key, KeyBlock *kb)
void BKE_lattice_vert_coords_apply(Lattice *lt, const float(*vert_coords)[3])
float(* BKE_lattice_vert_coords_alloc(const Lattice *lt, int *r_vert_len))[3]
void BKE_lattice_modifiers_calc(Depsgraph *depsgraph, Scene *scene, Object *ob)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
bool BKE_id_is_editable(const Main *bmain, const ID *id)
void BKE_id_free(Main *bmain, void *idv)
void BKE_main_id_newptr_and_tag_clear(Main *bmain)
ID * BKE_id_copy_ex(Main *bmain, const ID *id, ID **new_id_p, int flag)
General operations, lookup, etc. for materials.
void BKE_object_material_from_eval_data(struct Main *bmain, struct Object *ob_orig, const struct ID *data_eval)
void BKE_mball_data_update(Depsgraph *depsgraph, Scene *scene, Object *ob)
void BKE_mesh_ensure_skin_customdata(Mesh *mesh)
void BKE_mesh_nomain_to_meshkey(Mesh *mesh_src, Mesh *mesh_dst, KeyBlock *kb)
void BKE_mesh_nomain_to_mesh(Mesh *mesh_src, Mesh *mesh_dst, Object *ob)
void BKE_mesh_merge_customdata_for_apply_modifier(Mesh *mesh)
bool BKE_modifier_is_enabled(const Scene *scene, ModifierData *md, int required_mode)
ModifierData * BKE_modifiers_findby_type(const Object *ob, ModifierType type)
const ModifierTypeInfo * BKE_modifier_get_info(ModifierType type)
void BKE_modifiers_persistent_uid_init(const Object &object, ModifierData &md)
@ eModifierTypeFlag_Single
@ eModifierTypeFlag_NoUserAdd
@ eModifierTypeFlag_RequiresOriginalData
ModifierData * BKE_modifier_get_original(const Object *object, ModifierData *md)
ModifierData * BKE_modifiers_findby_name(const Object *ob, const char *name)
const char * BKE_modifier_path_relbase(Main *bmain, Object *ob)
bool BKE_modifier_is_same_topology(ModifierData *md)
void BKE_modifier_unique_name(ListBase *modifiers, ModifierData *md)
void BKE_modifier_free(ModifierData *md)
bool BKE_modifier_is_nonlocal_in_liboverride(const Object *ob, const ModifierData *md)
void BKE_modifier_remove_from_list(Object *ob, ModifierData *md)
ModifierData * BKE_modifier_get_evaluated(Depsgraph *depsgraph, Object *object, ModifierData *md)
ModifierData * BKE_modifiers_get_virtual_modifierlist(const Object *ob, VirtualModifierData *data)
ModifierData * BKE_modifier_new(int type)
void BKE_modifier_copydata(const ModifierData *md, ModifierData *target)
void multires_customdata_delete(Mesh *mesh)
bool multiresModifier_reshapeFromDeformModifier(Depsgraph *depsgraph, Object *ob, MultiresModifierData *mmd, ModifierData *deform_md)
MultiresModifierData * find_multires_modifier_before(Scene *scene, ModifierData *lastmd)
void multiresModifier_set_levels_from_disps(MultiresModifierData *mmd, Object *ob)
void multires_force_sculpt_rebuild(Object *object)
void multires_set_tot_level(Object *ob, MultiresModifierData *mmd, int lvl)
General operations, lookup, etc. for blender objects.
void BKE_object_eval_reset(Object *ob_eval)
void BKE_object_modifier_set_active(Object *ob, ModifierData *md)
bool BKE_object_is_in_editmode(const Object *ob)
bool BKE_object_supports_modifiers(const Object *ob)
Object * BKE_object_add(Main *bmain, Scene *scene, ViewLayer *view_layer, int type, const char *name) ATTR_NONNULL(1
ModifierData * BKE_object_active_modifier(const Object *ob)
void BKE_object_link_modifiers(Object *ob_dst, const Object *ob_src)
bool BKE_object_support_modifier_type_check(const Object *ob, int modifier_type)
bool BKE_object_copy_modifier(Main *bmain, const Scene *scene, Object *ob_dst, const Object *ob_src, const ModifierData *md)
void BKE_object_transform_copy(Object *ob_tar, const Object *ob_src)
void BKE_object_free_derived_caches(Object *ob)
struct Ocean * BKE_ocean_add(void)
void BKE_ocean_bake(struct Ocean *o, struct OceanCache *och, void(*update_cb)(void *, float progress, int *cancel), void *update_cb_data)
void BKE_ocean_free_modifier_cache(struct OceanModifierData *omd)
bool BKE_ocean_init_from_modifier(struct Ocean *ocean, struct OceanModifierData const *omd, int resolution)
void BKE_ocean_free(struct Ocean *oc)
struct OceanCache * BKE_ocean_init_cache(const char *bakepath, const char *relbase, int start, int end, float wave_scale, float chop_amount, float foam_coverage, float foam_fade, int resolution)
void BKE_sculpt_mask_layers_ensure(Depsgraph *depsgraph, Main *bmain, Object *ob, MultiresModifierData *mmd)
struct ModifierData * object_add_particle_system(struct Main *bmain, const struct Scene *scene, struct Object *ob, const char *name)
void object_remove_particle_system(struct Main *bmain, struct Scene *scene, struct Object *ob, struct ParticleSystem *psys)
struct ParticleSystem * psys_eval_get(struct Depsgraph *depsgraph, struct Object *object, struct ParticleSystem *psys)
void psys_apply_hair_lattice(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct ParticleSystem *psys)
struct ModifierData * object_copy_particle_system(struct Main *bmain, const struct Scene *scene, struct Object *ob, const struct ParticleSystem *psys_orig)
General operations for point clouds.
void BKE_pointcloud_nomain_to_pointcloud(PointCloud *pointcloud_src, PointCloud *pointcloud_dst)
void BKE_pointcloud_data_update(Depsgraph *depsgraph, Scene *scene, Object *object)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
void BKE_scene_graph_update_for_newframe(Depsgraph *depsgraph)
struct SoftBody * sbNew(void)
void sbFree(struct Object *ob)
void BKE_volume_data_update(Depsgraph *depsgraph, Scene *scene, Object *object)
#define BLI_assert_unreachable()
#define BLI_BITMAP_NEW(_num, _alloc_string)
#define BLI_BITMAP_TEST(_bitmap, _index)
#define BLI_BITMAP_ENABLE(_bitmap, _index)
GSet * BLI_gset_ptr_new(const char *info)
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
bool BLI_gset_add(GSet *gs, void *key)
void BLI_kdtree_nd_ free(KDTree *tree)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_BACKWARD(type, var, list)
void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH_INDEX(type, var, list, index_var)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_listbase_swaplinks(struct ListBase *listbase, void *vlinka, void *vlinkb) ATTR_NONNULL(1
MINLINE void copy_v3_v3(float r[3], const float a[3])
#define SNPRINTF(dst, format,...)
#define STRNCPY_UTF8(dst, src)
size_t void BLI_uniquename_cb(UniquenameCheckCallback unique_check, void *arg, const char *defname, char delim, char *name, size_t name_maxncpy) ATTR_NONNULL(1
#define CLOG_ERROR(clg_ref,...)
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_disable_visibility_optimization(Depsgraph *depsgraph)
Depsgraph * DEG_graph_new(Main *bmain, Scene *scene, ViewLayer *view_layer, eEvaluationMode mode)
void DEG_evaluate_on_refresh(Depsgraph *graph, DepsgraphEvaluateSyncWriteback sync_writeback=DEG_EVALUATE_SYNC_WRITEBACK_NO)
void DEG_graph_free(Depsgraph *graph)
void DEG_relations_tag_update(Main *bmain)
void DEG_graph_build_from_ids(Depsgraph *graph, blender::Span< ID * > ids)
float DEG_get_ctime(const Depsgraph *graph)
Scene * DEG_get_evaluated_scene(const Depsgraph *graph)
ViewLayer * DEG_get_input_view_layer(const Depsgraph *graph)
Main * DEG_get_bmain(const Depsgraph *graph)
Scene * DEG_get_input_scene(const Depsgraph *graph)
Object * DEG_get_evaluated_object(const Depsgraph *depsgraph, Object *object)
#define ID_IS_EDITABLE(_id)
#define ID_REAL_USERS(id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
#define CD_MASK_COLOR_ALL
#define DNA_struct_default_get(struct_name)
@ eModifierFlag_OverrideLibrary_Local
@ eModifierType_ParticleSystem
@ eModifierType_MeshDeform
@ eModifierType_GreasePencilTime
@ eModifierType_LaplacianDeform
@ eModifierType_GreasePencilDash
@ eModifierType_SurfaceDeform
@ eModifierType_CorrectiveSmooth
@ eModifierType_Collision
@ MOD_LAPLACIANDEFORM_BIND
bool ED_operator_object_active_local_editable(bContext *C)
bool ED_operator_object_active(bContext *C)
bool ED_operator_object_active_editable(bContext *C)
Read Guarded memory(de)allocation.
PointerRNA * UI_region_panel_custom_data_under_cursor(const bContext *C, const wmEvent *event)
@ WM_JOB_TYPE_OBJECT_SIM_OCEAN
EditBone * ED_armature_ebone_add(bArmature *arm, const char *name)
void ED_armature_edit_free(bArmature *arm)
void ED_armature_from_edit(Main *bmain, bArmature *arm)
#define BM_ELEM_CD_GET_VOID_P(ele, offset)
#define BM_elem_flag_test(ele, hflag)
void BM_data_layer_free(BMesh *bm, CustomData *data, int type)
#define BM_ITER_ELEM(ele, iter, data, itype)
#define BM_ITER_MESH(ele, iter, bm, itype)
ATTR_WARN_UNUSED_RESULT BMesh * bm
BLI_INLINE BMVert * BM_edge_other_vert(BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert * v
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
const CPPType & type() const
bool add(const Key &key, const Value &value)
const Value & lookup(const Key &key) const
Value & lookup_or_add_cb(const Key &key, const CreateValueF &create_value)
auto add_or_modify(const Key &key, const CreateValueF &create_value, const ModifyValueF &modify_value) -> decltype(create_value(nullptr))
Value & lookup_or_add(const Key &key, const Value &value)
bool contains(const Key &key) const
bool remove(const Key &key)
constexpr const T * data() const
void add_new(const Key &key)
int64_t index_of_try(const Key &key) const
bool contains(const Key &key) const
void append(const T &value)
int64_t append_and_get_index_as(ForwardValue &&...value)
eCustomDataType data_type
GAttributeReader get() const
MutableAttributeAccessor attributes_for_write()
GSpanAttributeWriter lookup_or_add_for_write_span(StringRef attribute_id, AttrDomain domain, eCustomDataType data_type, const AttributeInit &initializer=AttributeInitDefaultValue())
bke::CurvesGeometry & strokes_for_write()
const bke::CurvesGeometry & strokes() const
void tag_topology_changed()
void set_local_transform(const float4x4 &transform)
float4x4 local_transform() const
const TreeNode & as_node() const
void foreach_index(Fn &&fn) const
const Depsgraph * depsgraph
Set< ComponentNode * > visited
DEGForeachIDComponentCallback callback
draw_view in_light_buf[] float
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
static const char * modifier_name[LS_MODIFIER_NUM]
void *(* MEM_mallocN)(size_t len, const char *str)
void *(* MEM_malloc_arrayN)(size_t len, size_t size, const char *str)
void *(* MEM_calloc_arrayN)(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
void ED_mesh_deform_bind_callback(Object *object, MeshDeformModifierData *mmd, Mesh *cagemesh, float *vertexcos, int verts_num, float cagemat[4][4])
bool indices_are_range(Span< int > indices, IndexRange range)
Mesh * mesh_get_eval_deform(Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask)
Mesh * mesh_create_eval_final(Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask)
static int modifier_apply_exec(bContext *C, wmOperator *op)
void modifier_register_use_selected_objects_prop(wmOperatorType *ot)
static void skin_armature_bone_create(Object *skin_ob, const Span< float3 > positions, const int2 *edges, bArmature *arm, BLI_bitmap *edges_visited, const GroupedSpan< int > emap, EditBone *parent_bone, int parent_v)
ModifierData * modifier_add(ReportList *reports, Main *bmain, Scene *scene, Object *ob, const char *name, int type)
static int modifier_convert_exec(bContext *C, wmOperator *op)
void single_obdata_user_make(Main *bmain, Scene *scene, Object *ob)
static int modifier_copy_to_selected_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int skin_radii_equalize_exec(bContext *C, wmOperator *)
bool modifier_apply(Main *bmain, ReportList *reports, Depsgraph *depsgraph, Scene *scene, Object *ob, ModifierData *md, int mode, bool keep_modifier, bool do_all_keyframes)
static int modifier_copy_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void apply_eval_grease_pencil_data(const GreasePencil &src_grease_pencil, const int eval_frame, const IndexMask &orig_layers, GreasePencil &orig_grease_pencil)
static int modifier_move_up_exec(bContext *C, wmOperator *op)
static bool object_modifier_remove(Main *bmain, Scene *scene, Object *ob, ModifierData *md, bool *r_sort_depsgraph)
static int oceanbake_breakjob(void *)
static int surfacedeform_bind_exec(bContext *C, wmOperator *op)
static int modifier_set_active_exec(bContext *C, wmOperator *op)
static int time_modifier_segment_remove_invoke(bContext *C, wmOperator *op, const wmEvent *)
static bool modifier_apply_shape(Main *bmain, ReportList *reports, Depsgraph *depsgraph, Scene *scene, Object *ob, ModifierData *md_eval)
void OBJECT_OT_geometry_node_tree_copy_assign(wmOperatorType *ot)
bool modifier_copy_to_object(Main *bmain, const Scene *scene, const Object *ob_src, const ModifierData *md, Object *ob_dst, ReportList *reports)
static bool object_modifier_safe_to_delete(Main *bmain, Object *ob, ModifierData *exclude, ModifierType type)
static int meshdeform_bind_invoke(bContext *C, wmOperator *op, const wmEvent *)
static std::string modifier_apply_as_shapekey_get_description(bContext *, wmOperatorType *, PointerRNA *ptr)
static bool correctivesmooth_poll(bContext *C)
static bool object_modifier_check_move_after(ReportList *reports, eReportType error_type, ModifierData *md, ModifierData *md_next)
static const EnumPropertyItem * modifier_add_itemf(bContext *C, PointerRNA *, PropertyRNA *, bool *r_free)
static bool edit_modifier_poll(bContext *C)
static void oceanbake_startjob(void *customdata, wmJobWorkerStatus *worker_status)
bool edit_modifier_invoke_properties(bContext *C, wmOperator *op)
static void edit_modifier_report_property(wmOperatorType *ot)
static int modifier_set_active_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void OBJECT_OT_grease_pencil_dash_modifier_segment_add(wmOperatorType *ot)
static int time_modifier_segment_add_exec(bContext *C, wmOperator *op)
static int modifier_move_up_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void oceanbake_endjob(void *customdata)
bool iter_other(Main *bmain, Object *orig_ob, bool include_orig, bool(*callback)(Object *ob, void *callback_data), void *callback_data)
static bool ocean_bake_poll(bContext *C)
static int modifier_copy_to_selected_exec(bContext *C, wmOperator *op)
bool modifier_move_up(ReportList *reports, eReportType error_type, Object *ob, ModifierData *md)
static int dash_modifier_segment_add_invoke(bContext *C, wmOperator *op, const wmEvent *)
void OBJECT_OT_meshdeform_bind(wmOperatorType *ot)
static int time_modifier_segment_add_invoke(bContext *C, wmOperator *op, const wmEvent *)
void OBJECT_OT_modifier_move_to_index(wmOperatorType *ot)
static void object_force_modifier_bind_simple_options(Depsgraph *depsgraph, Object *object, ModifierData *md)
bool multires_update_totlevels(Object *ob, void *totlevel_v)
static int modifier_add_exec(bContext *C, wmOperator *op)
void OBJECT_OT_explode_refresh(wmOperatorType *ot)
void OBJECT_OT_ocean_bake(wmOperatorType *ot)
void OBJECT_OT_skin_root_mark(wmOperatorType *ot)
static int meshdeform_bind_exec(bContext *C, wmOperator *op)
static bool apply_grease_pencil_for_modifier(Depsgraph *depsgraph, Object *ob, GreasePencil &grease_pencil_orig, ModifierData *md_eval)
static int geometry_nodes_input_attribute_toggle_exec(bContext *C, wmOperator *op)
static int laplaciandeform_bind_invoke(bContext *C, wmOperator *op, const wmEvent *)
static int modifiers_clear_exec(bContext *C, wmOperator *)
static int skin_armature_create_invoke(bContext *C, wmOperator *op, const wmEvent *)
static bool edit_modifier_liboverride_allowed_poll(bContext *C)
static void skin_root_clear(BMVert *bm_vert, GSet *visited, const int cd_vert_skin_offset)
static int skin_armature_create_exec(bContext *C, wmOperator *op)
static bool modifier_apply_as_shapekey_poll(bContext *C)
void OBJECT_OT_modifier_move_down(wmOperatorType *ot)
static bool surfacedeform_bind_poll(bContext *C)
static int modifier_apply_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void OBJECT_OT_modifier_remove(wmOperatorType *ot)
void OBJECT_OT_grease_pencil_dash_modifier_segment_remove(wmOperatorType *ot)
static int modifier_remove_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int correctivesmooth_bind_exec(bContext *C, wmOperator *op)
void OBJECT_OT_modifier_apply(wmOperatorType *ot)
static void oceanbake_update(void *customdata, float progress, int *cancel)
bool edit_modifier_poll_generic(bContext *C, StructRNA *rna_type, int obtype_flag, bool is_editmode_allowed, bool is_liboverride_allowed)
static int dash_modifier_segment_move_exec(bContext *C, wmOperator *op)
static void dash_modifier_segment_free(GreasePencilDashModifierSegment *)
static Mesh * create_applied_mesh_for_modifier(Depsgraph *depsgraph, Scene *scene, Object *ob_eval, ModifierData *md_eval, const bool use_virtual_modifiers, const bool build_shapekey_layers, ReportList *reports)
void OBJECT_OT_modifier_apply_as_shapekey(wmOperatorType *ot)
static bool modifier_apply_obdata(ReportList *reports, Depsgraph *depsgraph, Scene *scene, Object *ob, ModifierData *md_eval, const bool do_all_keyframes)
static int modifier_add_invoke(bContext *C, wmOperator *op, const wmEvent *event)
ModifierData * edit_modifier_property_get(wmOperator *op, Object *ob, int type)
static bool time_modifier_segment_poll(bContext *C)
static bool skin_edit_poll(bContext *C)
void OBJECT_OT_modifier_convert(wmOperatorType *ot)
void OBJECT_OT_grease_pencil_time_modifier_segment_move(wmOperatorType *ot)
bool modifier_copy(ReportList *reports, Main *bmain, Scene *scene, Object *ob, ModifierData *md)
static bool meshdeform_poll(bContext *C)
static bool apply_grease_pencil_for_modifier_all_keyframes(Depsgraph *depsgraph, Scene *scene, Object *ob, GreasePencil &grease_pencil_orig, ModifierData *md)
static bool modifiers_copy_to_selected_poll(bContext *C)
Object * context_active_object(const bContext *C)
static bool modifiers_clear_poll(bContext *C)
static int explode_refresh_exec(bContext *C, wmOperator *op)
static int modifier_remove_exec(bContext *C, wmOperator *op)
bool modifier_move_down(ReportList *reports, eReportType error_type, Object *ob, ModifierData *md)
static int object_modifiers_copy_exec(bContext *C, wmOperator *op)
static void add_shapekey_layers(Mesh &mesh_dest, const Mesh &mesh_src)
static int dash_modifier_segment_move_invoke(bContext *C, wmOperator *op, const wmEvent *)
static Object * modifier_skin_armature_create(Depsgraph *depsgraph, Main *bmain, Object *skin_ob)
static int correctivesmooth_bind_invoke(bContext *C, wmOperator *op, const wmEvent *)
static int dash_modifier_segment_remove_exec(bContext *C, wmOperator *op)
void OBJECT_OT_modifier_move_up(wmOperatorType *ot)
void OBJECT_OT_geometry_nodes_input_attribute_toggle(wmOperatorType *ot)
static int skin_root_mark_exec(bContext *C, wmOperator *)
static int surfacedeform_bind_invoke(bContext *C, wmOperator *op, const wmEvent *)
void OBJECT_OT_modifiers_copy_to_selected(wmOperatorType *ot)
static bool laplaciandeform_poll(bContext *C)
static bool object_modifier_check_move_before(ReportList *reports, eReportType error_type, ModifierData *md, ModifierData *md_prev)
static bool skin_poll(bContext *C)
static void oceanbake_free(void *customdata)
static int laplaciandeform_bind_exec(bContext *C, wmOperator *op)
static int modifier_move_down_exec(bContext *C, wmOperator *op)
static int modifier_move_to_index_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int time_modifier_segment_remove_exec(bContext *C, wmOperator *op)
static int ocean_bake_exec(bContext *C, wmOperator *op)
void OBJECT_OT_correctivesmooth_bind(wmOperatorType *ot)
static void remove_invalid_attribute_strings(Mesh &mesh)
static int dash_modifier_segment_add_exec(bContext *C, wmOperator *op)
void OBJECT_OT_surfacedeform_bind(wmOperatorType *ot)
static int skin_loose_mark_clear_exec(bContext *C, wmOperator *op)
void OBJECT_OT_skin_radii_equalize(wmOperatorType *ot)
static int time_modifier_segment_move_invoke(bContext *C, wmOperator *op, const wmEvent *)
static bool modifier_apply_poll(bContext *C)
bool convert_psys_to_mesh(ReportList *reports, Main *bmain, Depsgraph *depsgraph, Scene *scene, ViewLayer *view_layer, Object *ob, ModifierData *md)
bool modifier_move_to_index(ReportList *reports, eReportType error_type, Object *ob, ModifierData *md, int index, bool allow_partial)
void OBJECT_OT_modifier_add(wmOperatorType *ot)
void OBJECT_OT_modifier_copy(wmOperatorType *ot)
void OBJECT_OT_laplaciandeform_bind(wmOperatorType *ot)
static bool object_has_modifier(const Object *ob, const ModifierData *exclude, ModifierType type)
void vgroup_vert_add(Object *ob, bDeformGroup *dg, int vertnum, float weight, int assignmode)
static int modifier_move_to_index_exec(bContext *C, wmOperator *op)
void OBJECT_OT_skin_loose_mark_clear(wmOperatorType *ot)
static bool meta_data_matches(const std::optional< bke::AttributeMetaData > meta_data, const AttrDomainMask domains, const eCustomDataMask types)
static bool object_has_modifier_cb(Object *ob, void *data)
static bool dash_modifier_segment_poll(bContext *C)
void OBJECT_OT_modifier_copy_to_selected(wmOperatorType *ot)
void OBJECT_OT_modifier_set_active(wmOperatorType *ot)
static int modifier_move_down_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int dash_modifier_segment_remove_invoke(bContext *C, wmOperator *op, const wmEvent *)
static int ocean_bake_invoke(bContext *C, wmOperator *op, const wmEvent *)
static void time_modifier_segment_free(GreasePencilTimeModifierSegment *)
static int geometry_node_tree_copy_assign_exec(bContext *C, wmOperator *)
void OBJECT_OT_modifiers_clear(wmOperatorType *ot)
static bool modifier_copy_to_selected_poll(bContext *C)
void OBJECT_OT_grease_pencil_time_modifier_segment_remove(wmOperatorType *ot)
static int modifier_copy_exec(bContext *C, wmOperator *op)
Vector< PointerRNA > modifier_get_edit_objects(const bContext &C, const wmOperator &op)
void modifier_link(bContext *C, Object *ob_dst, Object *ob_src)
static int modifier_apply_exec_ex(bContext *C, wmOperator *op, int apply_as, bool keep_modifier)
static int modifier_apply_as_shapekey_exec(bContext *C, wmOperator *op)
static int modifier_convert_invoke(bContext *C, wmOperator *op, const wmEvent *)
void modifiers_clear(Main *bmain, Scene *scene, Object *ob)
void OBJECT_OT_grease_pencil_time_modifier_segment_add(wmOperatorType *ot)
void OBJECT_OT_grease_pencil_dash_modifier_segment_move(wmOperatorType *ot)
static void object_force_modifier_update_for_bind(Depsgraph *depsgraph, Object *ob)
static int explode_refresh_invoke(bContext *C, wmOperator *op, const wmEvent *)
static int time_modifier_segment_move_exec(bContext *C, wmOperator *op)
void edit_modifier_properties(wmOperatorType *ot)
static void modifier_skin_customdata_delete(Object *ob)
static bool edit_modifier_invoke_properties_with_hover(bContext *C, wmOperator *op, const wmEvent *event, int *r_retval)
void OBJECT_OT_skin_armature_create(wmOperatorType *ot)
static bool explode_poll(bContext *C)
static int modifier_apply_as_shapekey_invoke(bContext *C, wmOperator *op, const wmEvent *event)
bool modifier_remove(ReportList *reports, Main *bmain, Scene *scene, Object *ob, ModifierData *md)
GreasePencil * merge_layers(const GreasePencil &src_grease_pencil, Span< Vector< int > > layers_to_merge, const bke::AttributeFilter &attribute_filter)
VecBase< int32_t, 2 > int2
float wrap(float value, float max, float min)
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
int RNA_int_get(PointerRNA *ptr, const char *name)
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, bool value)
bool RNA_pointer_is_null(const PointerRNA *ptr)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PointerRNA RNA_id_pointer_create(ID *id)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
const EnumPropertyItem rna_enum_object_modifier_type_items[]
unsigned int bind_coords_num
CorrectiveSmoothDeltaCache delta_cache
struct Material ** material_array
GreasePencilRuntimeHandle * runtime
struct ModifierData * next
struct ModifierData * prev
void(* modify_geometry_set)(ModifierData *md, const ModifierEvalContext *ctx, blender::bke::GeometrySet *geometry_set)
void(* deform_verts)(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh, blender::MutableSpan< blender::float3 > positions)
bool(* is_disabled)(const Scene *scene, ModifierData *md, bool use_render_params)
Mesh *(* modify_mesh)(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh)
struct bNodeTree * node_group
struct NodesModifierSettings settings
struct IDProperty * properties
ObjectRuntimeHandle * runtime
struct OceanCache * oceancache
struct ParticleCacheKey ** childcache
struct ParticleCacheKey ** pathcache
GeometryComponent & get_component_for_write(GeometryComponent::Type component_type)
bool has_pointcloud() const
static GeometrySet from_mesh(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
Curves * get_curves_for_write()
MutableVArraySpan< T > span
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
std::string(* get_description)(bContext *C, wmOperatorType *ot, PointerRNA *ptr)
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
ccl_device_inline int mod(int x, int m)
void WM_cursor_wait(bool val)
void WM_main_add_notifier(uint type, void *reference)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_jobs_timer(wmJob *wm_job, double time_step, uint note, uint endnote)
void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job)
wmJob * WM_jobs_get(wmWindowManager *wm, wmWindow *win, const void *owner, const char *name, const eWM_JobFlag flag, const eWM_JobType job_type)
void WM_jobs_callbacks(wmJob *wm_job, wm_jobs_start_callback startjob, void(*initjob)(void *), void(*update)(void *), void(*endjob)(void *))
void WM_jobs_customdata_set(wmJob *wm_job, void *customdata, void(*free)(void *customdata))
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)
int WM_operator_confirm_ex(bContext *C, wmOperator *op, const char *title, const char *message, const char *confirm_text, int icon, bool cancel_default)