125 const int frame = scene->r.cfra;
127 bool changed =
false;
135 if (mask_layer->splines_shapes.first) {
144 if (mask_layer_shape_reset->
tot_vert == mask_layer_shape->tot_vert) {
153 for (
int i = 0; i < spline->tot_point; i++) {
158 shape_ele_dst->
value[6] = shape_ele_src->
value[6];
215 const int frame = scene->r.cfra;
217 bool changed =
false;
232 if (mask_layer->splines_shapes.first) {
236 for (mask_layer_shape =
static_cast<MaskLayerShape *
>(mask_layer->splines_shapes.first);
238 mask_layer_shape = mask_layer_shape_next)
243 mask_layer_shape_next = mask_layer_shape->
next;
247 if (mask_layer_shape_lastsel ==
nullptr) {
248 mask_layer_shape_lastsel = mask_layer_shape;
250 if ((mask_layer_shape->
next ==
nullptr) ||
253 mask_layer_shape_a = mask_layer_shape_lastsel;
254 mask_layer_shape_b = mask_layer_shape;
255 mask_layer_shape_lastsel =
nullptr;
258 mask_layer_shape_next = mask_layer_shape->
next;
263 if (mask_layer_shape_a && mask_layer_shape_b) {
264 ListBase shapes_tmp = {
nullptr,
nullptr};
271 for (mask_layer_shape_tmp = mask_layer_shape_a;
272 mask_layer_shape_tmp && (mask_layer_shape_tmp != mask_layer_shape_tmp_last);
273 mask_layer_shape_tmp = mask_layer_shape_tmp_next)
275 mask_layer_shape_tmp_next = mask_layer_shape_tmp->
next;
276 BLI_remlink(&mask_layer->splines_shapes, mask_layer_shape_tmp);
282 mask_layer_shape_tmp;
283 mask_layer_shape_tmp = mask_layer_shape_tmp->
next)
287 mask_layer, mask_layer_shape_tmp->
frame);
294 mask_layer_shape_tmp;
295 mask_layer_shape_tmp = mask_layer_shape_tmp_next)
302 mask_layer_shape_tmp_next = mask_layer_shape_tmp->
next;
306 mask_layer, mask_layer_shape_tmp->
frame);
312 for (
int i = 0; i < spline->tot_point; i++) {
316 std::swap(*shape_ele_src, *shape_ele_dst);
320 memcpy(shape_ele_dst->
value, shape_ele_src->
value,
sizeof(
float[6]));
323 shape_ele_dst->
value[6] = shape_ele_src->
value[6];
Mask * CTX_data_edit_mask(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)