58 # define NLASTRIP_MIN_LEN_THRESH 0.1f
60 static void rna_NlaStrip_name_set(
PointerRNA *
ptr,
const char *value)
84 for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->
next) {
88 char name_esc_nlt[
sizeof(nlt->
name) * 2];
89 char name_esc_strip[
sizeof(strip->
name) * 2];
94 "animation_data.nla_tracks[\"%s\"].strips[\"%s\"]", name_esc_nlt, name_esc_strip);
115 rna_NlaStrip_update(bmain,
scene,
ptr);
134 rna_NlaStrip_update(bmain,
scene,
ptr);
137 static void rna_NlaStrip_start_frame_set(
PointerRNA *
ptr,
float value)
152 value,
data->prev->start + NLASTRIP_MIN_LEN_THRESH,
data->end - NLASTRIP_MIN_LEN_THRESH);
155 data->prev->end = value;
158 CLAMP(value,
data->prev->end,
data->end - NLASTRIP_MIN_LEN_THRESH);
167 static void rna_NlaStrip_end_frame_set(
PointerRNA *
ptr,
float value)
182 value,
data->start + NLASTRIP_MIN_LEN_THRESH,
data->next->end - NLASTRIP_MIN_LEN_THRESH);
185 data->next->start = value;
188 CLAMP(value,
data->start + NLASTRIP_MIN_LEN_THRESH,
data->next->start);
201 actlen =
data->actend -
data->actstart;
202 if (
IS_EQF(actlen, 0.0f)) {
211 static void rna_NlaStrip_scale_set(
PointerRNA *
ptr,
float value)
218 CLAMP(value, 0.0001f, 1000.0f);
225 static void rna_NlaStrip_repeat_set(
PointerRNA *
ptr,
float value)
232 CLAMP(value, 0.01f, 1000.0f);
233 data->repeat = value;
239 static void rna_NlaStrip_blend_in_set(
PointerRNA *
ptr,
float value)
248 data->blendin = value;
251 static void rna_NlaStrip_blend_out_set(
PointerRNA *
ptr,
float value)
261 if ((
len - value) <
data->blendin) {
265 data->blendout = value;
268 static void rna_NlaStrip_use_auto_blend_set(
PointerRNA *
ptr,
bool value)
291 data->blendin = 0.0f;
292 data->blendout = 0.0f;
321 static void rna_NlaStrip_action_start_frame_set(
PointerRNA *
ptr,
float value)
327 data->actstart = value;
334 static void rna_NlaStrip_action_end_frame_set(
PointerRNA *
ptr,
float value)
340 data->actend = value;
346 static void rna_NlaStrip_animated_influence_set(
PointerRNA *
ptr,
bool value)
360 static void rna_NlaStrip_animated_time_set(
PointerRNA *
ptr,
bool value)
376 const char *data_path,
379 if (data_path[0] ==
'\0') {
404 strip->
end += (start - strip->
start);
405 strip->
start = start;
411 "Unable to add strip (the track does not have any space to accommodate this new strip)");
453 static void rna_NlaStrip_remove(
459 reports,
RPT_ERROR,
"NLA strip '%s' not found in track '%s'", strip->
name, track->
name);
475 static void rna_NlaTrack_solo_set(
PointerRNA *
ptr,
bool value)
486 for (nt =
data; nt; nt = nt->
next) {
489 for (nt =
data; nt; nt = nt->
prev) {
517 "The strip values replace the accumulated results by amount specified by influence"},
522 "The strip values are combined with accumulated results by appropriately using addition, "
523 "multiplication, or quaternion math, based on channel type"},
529 "Weighted result of strip is added to the accumulated results"},
534 "Weighted result of strip is removed from the accumulated results"},
539 "Weighted result of strip is multiplied with the accumulated results"},
549 "Hold the first frame if no previous strips in track, and always hold last frame"},
570 "Find an F-Curve. Note that this function performs a linear scan "
571 "of all F-Curves in the NLA strip.");
575 RNA_def_int(func,
"index", 0, 0, INT_MAX,
"Index",
"Array index", 0, INT_MAX);
578 func,
"fcurve",
"FCurve",
"",
"The found F-Curve, or None if it doesn't exist");
594 "NLA Strip 'transitions' between adjacent strips"},
595 {
NLASTRIP_TYPE_META,
"META", 0,
"Meta",
"NLA Strip acts as a container for adjacent strips"},
600 "NLA Strip representing a sound event for speakers"},
632 prop,
"Extrapolation",
"Action to take for gaps past the strip extents");
639 prop,
"Blending",
"Method used for combining strip's result with accumulated result");
662 prop,
"Blend In",
"Number of frames at start of strip to fade in influence");
676 "Number of frames for Blending In/Out is automatically determined from "
677 "overlapping strips");
731 prop,
"F-Curves",
"F-Curves for controlling the strip's influence and timing");
738 prop,
"Modifiers",
"Modifiers affecting all the F-Curves in the referenced Action");
746 "NLA Strips that this strip acts as a container for (if it is of type Meta)");
752 prop,
"Influence",
"Amount the strip contributes to the current result");
771 "Animated Influence",
772 "Influence setting is controlled by an F-Curve rather than automatically determined");
780 "Animated Strip Time",
781 "Strip time is controlled by an F-Curve rather than automatically determined");
787 prop,
"Cyclic Strip Time",
"Cycle the animated time within the action start and end");
814 "NLA Strip is played back in reverse order (only when timing is "
815 "automatically determined)");
821 "Sync Action Length",
822 "Update range of frames referenced from action "
823 "after tweaking strip and its keyframes");
844 parm =
RNA_def_string(func,
"name",
"NlaStrip", 0,
"",
"Name for the NLA Strips");
852 "Start frame for this strip",
856 parm =
RNA_def_pointer(func,
"action",
"Action",
"",
"Action to assign to this strip");
859 parm =
RNA_def_pointer(func,
"strip",
"NlaStrip",
"",
"New NLA Strip");
866 parm =
RNA_def_pointer(func,
"strip",
"NlaStrip",
"",
"NLA Strip to remove");
878 srna,
"NLA Track",
"A animation layer containing Actions referenced as NLA strips");
912 "NLA Track is evaluated itself (i.e. active Action and all other NLA Tracks in the "
913 "same AnimData block are disabled)");
struct AnimData * BKE_animdata_from_id(struct ID *id)
struct FCurve * BKE_fcurve_find(ListBase *list, const char rna_path[], const int array_index)
void BKE_nlastrip_validate_name(struct AnimData *adt, struct NlaStrip *strip)
void BKE_nlameta_flush_transforms(struct NlaStrip *mstrip)
void BKE_nlastrip_recalculate_bounds(struct NlaStrip *strip)
bool BKE_nlastrips_add_strip(ListBase *strips, struct NlaStrip *strip)
void BKE_nlastrip_validate_fcurves(struct NlaStrip *strip)
void BKE_nla_validate_state(struct AnimData *adt)
struct NlaStrip * BKE_nlastrip_new(struct bAction *act)
void BKE_nlastrip_free(ListBase *strips, struct NlaStrip *strip, bool do_id_user)
void BKE_report(ReportList *reports, ReportType type, const char *message)
void BKE_reportf(ReportList *reports, ReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
size_t size_t char * BLI_sprintfN(const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
size_t size_t char size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, const size_t dst_maxncpy) ATTR_NONNULL()
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
void DEG_id_tag_update_ex(struct Main *bmain, struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
@ ID_RECALC_COPY_ON_WRITE
@ NLASTRIP_FLAG_USR_INFLUENCE
@ NLASTRIP_FLAG_AUTO_BLENDS
@ NLASTRIP_FLAG_USR_TIME_CYCLIC
@ NLASTRIP_FLAG_TWEAKUSER
@ NLASTRIP_FLAG_SYNC_LENGTH
@ NLASTRIP_EXTEND_HOLD_FORWARD
@ NLASTRIP_EXTEND_NOTHING
@ NLASTRIP_TYPE_TRANSITION
Object is a sort of wrapper for general info.
Read Guarded memory(de)allocation.
Group RGB to Bright Vector Camera CLAMP
#define RNA_POINTER_INVALIDATE(ptr)
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
void ANIM_id_update(Main *bmain, ID *id)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_define_lib_overridable(const bool make_overridable)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_struct_name_property(struct StructRNA *srna, struct PropertyRNA *prop)
void RNA_def_function_flag(FunctionRNA *func, int flag)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_def_nla(BlenderRNA *brna)
static void rna_def_nlastrip(BlenderRNA *brna)
static void rna_def_nlatrack(BlenderRNA *brna)
const EnumPropertyItem rna_enum_nla_mode_blend_items[]
static void rna_api_nlatrack_strips(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_strip_fcurves(BlenderRNA *brna, PropertyRNA *cprop)
const EnumPropertyItem rna_enum_nla_mode_extend_items[]
void WM_event_add_notifier(const bContext *C, uint type, void *reference)