36 const int frame = scene->
r.
cfra;
64 ot->name =
"Insert Shape Key";
65 ot->description =
"Insert mask shape keyframe for active mask layer at the current frame";
66 ot->idname =
"MASK_OT_shape_key_insert";
79 const int frame = scene->
r.
cfra;
92 if (mask_layer_shape) {
110 ot->name =
"Clear Shape Key";
111 ot->description =
"Remove mask shape keyframe for active mask layer at the current frame";
112 ot->idname =
"MASK_OT_shape_key_clear";
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];
192 ot->name =
"Feather Reset Animation";
193 ot->description =
"Reset feather weights on all selected points animation values";
194 ot->idname =
"MASK_OT_shape_key_feather_reset";
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];
359 ot->name =
"Re-Key Points of Selected Shapes";
361 "Recalculate animation data on selected points for frames selected in the dopesheet";
362 ot->idname =
"MASK_OT_shape_key_rekey";
388 bool changed =
false;
400 bool changed =
false;
Mask * CTX_data_edit_mask(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
#define MASKPOINT_ISSEL_ANY(p)
void BKE_mask_layer_shape_unlink(struct MaskLayer *masklay, struct MaskLayerShape *masklay_shape)
struct MaskLayerShape * BKE_mask_layer_shape_alloc(struct MaskLayer *masklay, int frame)
void BKE_mask_layer_evaluate(struct MaskLayer *masklay, float ctime, bool do_newframe)
void BKE_mask_layer_shape_from_mask(struct MaskLayer *masklay, struct MaskLayerShape *masklay_shape)
void BKE_mask_layer_shape_free(struct MaskLayerShape *masklay_shape)
struct MaskLayerShape * BKE_mask_layer_shape_verify_frame(struct MaskLayer *masklay, int frame)
struct MaskLayerShape * BKE_mask_layer_shape_find_frame(struct MaskLayer *masklay, int frame)
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void DEG_id_tag_update(ID *id, unsigned int flags)
Object is a sort of wrapper for general info.
bool ED_maskedit_mask_visible_splines_poll(bContext *C)
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a point
bool ED_mask_layer_select_check(const MaskLayer *mask_layer)
static int mask_shape_key_clear_exec(bContext *C, wmOperator *)
void MASK_OT_shape_key_insert(wmOperatorType *ot)
void MASK_OT_shape_key_feather_reset(wmOperatorType *ot)
void MASK_OT_shape_key_rekey(wmOperatorType *ot)
void MASK_OT_shape_key_clear(wmOperatorType *ot)
static int mask_shape_key_insert_exec(bContext *C, wmOperator *)
static int mask_shape_key_feather_reset_exec(bContext *C, wmOperator *)
bool ED_mask_layer_shape_auto_key_select(Mask *mask, const int frame)
void ED_mask_layer_shape_auto_key(MaskLayer *mask_layer, const int frame)
bool ED_mask_layer_shape_auto_key_all(Mask *mask, const int frame)
static int mask_shape_key_rekey_exec(bContext *C, wmOperator *op)
ccl_device_inline float4 mask(const int4 mask, const float4 a)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
float value[MASK_OBJECT_SHAPE_ELEM_SIZE]
struct MaskLayerShape * next
void WM_event_add_notifier(const bContext *C, uint type, void *reference)