11#include <fmt/format.h>
72#include "RNA_prototypes.hh"
89 int old_flag = fcu->
flag;
91 if ((
ptr->owner_id ==
nullptr) && (
ptr->data ==
nullptr)) {
92 BKE_report(reports,
RPT_ERROR,
"No RNA pointer available to retrieve values for this F-curve");
99 const char *idname = (
ptr->owner_id) ?
ptr->owner_id->name :
RPT_(
"<No ID pointer>");
103 "Could not update flags for this F-curve, as RNA path is invalid for the given ID "
104 "(ID = %s, path = %s)",
113 if (old_flag != fcu->
flag) {
123 BLI_assert_msg(num_keys_to_add >= 0,
"cannot remove keyframes with this function");
125 if (num_keys_to_add == 0) {
133 fcu->
totvert += num_keys_to_add;
136 while (num_keys_to_add--) {
165 if (
ELEM(
nullptr, area, scene)) {
183 bool ob_edit_mode =
false;
201 "Keying set '%s' - successfully added %d keyframes",
212 if (num_channels < 0) {
217 if (num_channels > 0) {
225 if (num_channels > 0) {
228 "Successfully added %d keyframes for keying set '%s'",
248 paths.
append({
"transform.offset_x"});
249 paths.
append({
"transform.offset_y"});
252 paths.
append({
"transform.rotation"});
255 paths.
append({
"transform.scale_x"});
256 paths.
append({
"transform.scale_y"});
264 if (
ptr->type == &RNA_PoseBone) {
268 else if (
ptr->type == &RNA_Object) {
279 paths.
append({
"location"});
282 switch (rotation_mode) {
284 paths.
append({
"rotation_quaternion"});
287 paths.
append({
"rotation_axis_angle"});
295 paths.
append({
"rotation_euler"});
304 paths.
append({
"rotation_mode"});
321 for (
Strip *strip : strips) {
329 switch (context_mode) {
351 if (!found_selection) {
375 ID *selected_id = id_ptr.owner_id;
376 ids.
add(selected_id);
380 "Could not insert keyframe, as this type does not support animation data (ID = "
446 ot->name =
"Insert Keyframe";
447 ot->idname =
"ANIM_OT_keyframe_insert";
449 "Insert keyframes on the current frame using either the active keying set, or the user "
450 "preferences if no keying set is active";
489 ot->name =
"Insert Keyframe (by name)";
490 ot->idname =
"ANIM_OT_keyframe_insert_by_name";
491 ot->description =
"Alternate access to 'Insert Keyframe' for keymaps to use";
502 ot->srna,
"type",
nullptr,
MAX_ID_NAME - 2,
"Keying Set",
"The Keying Set to use");
550 for (
int i = 0;
i < totitem;
i++) {
579 ot->name =
"Insert Keyframe Menu";
580 ot->idname =
"ANIM_OT_keyframe_insert_menu";
582 "Insert Keyframes for specified Keying Set, with menu of available Keying Sets if undefined";
603 prop =
RNA_def_boolean(
ot->srna,
"always_prompt",
false,
"Always Show Menu",
"");
639 printf(
"KeyingSet '%s' - Successfully removed %d Keyframes\n", ks->
name, num_channels);
643 if (num_channels < 0) {
648 if (num_channels > 0) {
658 if (num_channels > 0) {
661 "Successfully removed %d keyframes for keying set '%s'",
677 ot->name =
"Delete Keying-Set Keyframe";
678 ot->idname =
"ANIM_OT_keyframe_delete";
680 "Delete keyframes on the current frame for all properties in the specified Keying Set";
702 ot->name =
"Delete Keying-Set Keyframe (by name)";
703 ot->idname =
"ANIM_OT_keyframe_delete_by_name";
704 ot->description =
"Alternate access to 'Delete Keyframe' for keymaps to use";
715 ot->srna,
"type",
nullptr,
MAX_ID_NAME - 2,
"Keying Set",
"The Keying Set to use");
730 bool can_delete =
false;
736 char bone_name[
sizeof(pchan->
name)];
740 if ((pchan) && (pchan->
bone)) {
761 bool changed =
false;
765 if ((ob->adt) && (ob->adt->action)) {
770 Action &action = dna_action->wrap();
774 if (can_delete_fcurve(&fcurve, ob)) {
775 fcurves_to_delete.append(&fcurve);
778 for (
FCurve *fcurve : fcurves_to_delete) {
786 for (fcu =
static_cast<FCurve *
>(dna_action->curves.first); fcu; fcu = fcn) {
822 IFACE_(
"Remove animation from selected objects?"),
834 ot->name =
"Remove Animation";
835 ot->description =
"Remove all keyframe animation for selected objects";
836 ot->idname =
"ANIM_OT_keyframe_clear_v3d";
856 selected_strips_rna_paths.
append(*rna_path);
859 return selected_strips_rna_paths;
875 std::strncmp(fcurve.
rna_path, strip_path.c_str(), strip_path.length()) == 0;
881 bool changed =
false;
890 if (selected_strips_rna_paths.
is_empty()) {
903 Action &action = dna_action->wrap();
906 for (const std::string &strip_path : selected_strips_rna_paths) {
907 if (fcurve_belongs_to_strip(fcurve, strip_path)) {
908 fcurves_to_delete.append(&fcurve);
913 for (
FCurve *fcurve : fcurves_to_delete) {
922 if (scene->adt->action) {
939 IFACE_(
"Remove animation from selected strips?"),
950 ot->name =
"Remove Animation";
951 ot->description =
"Remove all keyframe animation for selected strips";
952 ot->idname =
"ANIM_OT_keyframe_clear_vse";
971 "Not deleting keyframe for locked F-Curve '%s', object '%s'",
987 char bone_name[
sizeof(pchan->
name)];
994 if ((pchan) && (pchan->
bone)) {
1013 "Not deleting keyframe for locked F-Curve '%s', scene '%s'",
1032 if (selected_strips_rna_paths.
is_empty()) {
1045 Action &action = act->wrap();
1053 std::string changed_strip;
1054 for (const std::string &strip_path : selected_strips_rna_paths) {
1055 if (fcurve_belongs_to_strip(fcurve, strip_path)) {
1056 changed_strip = strip_path;
1064 modified_fcurves.
append(&fcurve);
1065 modified_strips.
add(changed_strip);
1069 for (
FCurve *fcurve : modified_fcurves) {
1075 if (scene->adt->action) {
1081 if (!modified_strips.is_empty()) {
1091 if (modified_strips.is_empty()) {
1092 const std::string msg = fmt::format(
1093 fmt::runtime(
RPT_(
"No keyframes removed from {} strip(s)")),
1094 selected_strips_rna_paths.size());
1099 const std::string msg = fmt::format(
1100 fmt::runtime(
RPT_(
"{} strip(s) successfully had {} keyframes removed")),
1101 modified_strips.size(),
1102 modified_fcurves.size());
1114 if (ks ==
nullptr) {
1128 IFACE_(
"Delete keyframes from selected strips?"),
1140 ot->name =
"Delete Keyframe";
1141 ot->description =
"Remove keyframes on current frame for selected strips";
1142 ot->idname =
"ANIM_OT_keyframe_delete_vse";
1161 int selected_objects_len = 0;
1162 int selected_objects_success_len = 0;
1163 int success_multi = 0;
1170 selected_objects_len += 1;
1173 if ((ob->adt) && (ob->adt->action)) {
1178 Action &action = act->wrap();
1182 if (!can_delete_key(&fcurve, ob, op->reports)) {
1186 modified_fcurves.
append(&fcurve);
1190 success += modified_fcurves.size();
1191 for (
FCurve *fcurve : modified_fcurves) {
1199 for (
FCurve *fcu =
static_cast<FCurve *
>(act->curves.first); fcu; fcu = fcn) {
1211 if (ob->adt->action) {
1220 selected_objects_success_len += 1;
1221 success_multi += success;
1228 if (selected_objects_success_len) {
1235 if (selected_objects_success_len) {
1238 "%d object(s) successfully had %d keyframes removed",
1239 selected_objects_success_len,
1244 op->reports,
RPT_ERROR,
"No keyframes removed from %d object(s)", selected_objects_len);
1255 if (ks ==
nullptr) {
1269 IFACE_(
"Delete keyframes from selected objects?"),
1281 ot->name =
"Delete Keyframe";
1282 ot->description =
"Remove keyframes on current frame for selected objects and bones";
1283 ot->idname =
"ANIM_OT_keyframe_delete_v3d";
1313 bool changed =
false;
1326 if (
ptr.type == &RNA_NlaStrip) {
1347 "This property cannot be animated as it will not get updated correctly");
1353 bool driven, special;
1356 C, &
ptr, prop, index,
nullptr,
nullptr, &driven, &special);
1358 if (fcu && driven) {
1360 &anim_eval_context, &
ptr, prop, fcu);
1384 const std::optional<int> array_index = (
all || index < 0) ? std::nullopt :
1385 std::optional(index);
1390 {{*path, {}, array_index}},
1400 "Failed to resolve path to property, "
1401 "try manually specifying this using a Keying Set instead");
1409 "\"%s\" property cannot be animated",
1415 "Button does not appear to have any property information attached (ptr.data = "
1423 ID *
id =
ptr.owner_id;
1425 if (adt->
action !=
nullptr) {
1443 ot->name =
"Insert Keyframe (Buttons)";
1444 ot->idname =
"ANIM_OT_keyframe_insert_button";
1445 ot->description =
"Insert a keyframe for current UI-active property";
1455 RNA_def_boolean(
ot->srna,
"all",
true,
"All",
"Insert a keyframe for all element of the array");
1471 bool changed =
false;
1480 if (
ptr.owner_id &&
ptr.data && prop) {
1486 ID *
id =
ptr.owner_id;
1495 "Not deleting keyframe for locked F-Curve for NLA Strip influence on %s - %s '%s'",
1522 RNAPath rna_path = {*path, std::nullopt, index};
1525 rna_path.
index = std::nullopt;
1529 bmain, op->
reports,
ptr.owner_id, rna_path, cfra) != 0;
1532 printf(
"Button Delete-Key: no path to property\n");
1537 printf(
"ptr.data = %p, prop = %p\n",
ptr.data, (
void *)prop);
1554 ot->name =
"Delete Keyframe (Buttons)";
1555 ot->idname =
"ANIM_OT_keyframe_delete_button";
1556 ot->description =
"Delete current keyframe of current UI-active property";
1566 RNA_def_boolean(
ot->srna,
"all",
true,
"All",
"Delete keyframes from all elements of the array");
1576 bool changed =
false;
1585 if (
ptr.owner_id &&
ptr.data && prop) {
1587 RNAPath rna_path = {*path, std::nullopt, index};
1590 rna_path.
index = std::nullopt;
1597 printf(
"Button Clear-Key: no path to property\n");
1601 printf(
"ptr.data = %p, prop = %p\n",
ptr.data, (
void *)prop);
1618 ot->name =
"Clear Keyframe (Buttons)";
1619 ot->idname =
"ANIM_OT_keyframe_clear_button";
1620 ot->description =
"Clear all keyframes on the currently active property";
1630 RNA_def_boolean(
ot->srna,
"all",
true,
"All",
"Clear keyframes from all elements of the array");
1645 anim_rna.
prop = prop;
1652 float cur_val = (index >= 0 && index < values.
size()) ? values[index] : 0.0f;
1669 if (ks ==
nullptr) {
1677 if (
STREQ(type_id,
"__ACTIVE__")) {
1684 if (ks ==
nullptr) {
Functions and classes to work with Actions.
Functionality to iterate an Action in various ways.
Functions to work with AnimData.
Functions to deal with Armatures.
C++ functions to deal with Armature collections (i.e. the successor of bone layers).
Functions to work with drivers.
Functions to modify FCurves.
Functions to insert, delete or modify keyframes.
Functionality to interact with keying sets.
Helper functions for animation to interact with the RNA system.
Blender kernel action and pose functionality.
bPoseChannel * BKE_pose_channel_find_name(const bPose *pose, const char *name)
bool id_can_have_animdata(const ID *id)
AnimData * BKE_animdata_from_id(const ID *id)
AnimationEvalContext BKE_animsys_eval_context_construct(struct Depsgraph *depsgraph, float eval_time) ATTR_WARN_UNUSED_RESULT
#define CTX_DATA_BEGIN(C, Type, instance, member)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
ScrArea * CTX_wm_area(const bContext *C)
Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
SpaceSeq * CTX_wm_space_seq(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_pose_bones(const bContext *C, blender::Vector< PointerRNA > *list)
Scene * CTX_data_sequencer_scene(const bContext *C)
enum eContextObjectMode CTX_data_mode_enum(const bContext *C)
int BKE_fcurve_bezt_binarysearch_index(const BezTriple array[], float frame, int arraylen, bool *r_replace)
void BKE_fcurve_handles_recalc(FCurve *fcu)
FCurve * BKE_fcurve_find_by_rna_context_ui(bContext *C, const PointerRNA *ptr, PropertyRNA *prop, int rnaindex, AnimData **r_animdata, bAction **r_action, bool *r_driven, bool *r_special)
FCurve * BKE_fcurve_find(ListBase *list, const char rna_path[], int array_index)
bool BKE_fcurve_is_empty(const FCurve *fcu)
bool BKE_fcurve_is_protected(const FCurve *fcu)
float calculate_fcurve(PathResolvedRNA *anim_rna, FCurve *fcu, const AnimationEvalContext *anim_eval_context)
void BKE_fcurve_delete_key(FCurve *fcu, int index)
const char * BKE_idtype_idcode_to_name(short idcode)
bool BKE_id_is_editable(const Main *bmain, const ID *id)
bool BKE_nlastrip_has_curves_for_property(const PointerRNA *ptr, const PropertyRNA *prop)
float BKE_nla_tweakedit_remap(AnimData *adt, float cframe, eNlaTime_ConvertModes mode)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
float BKE_scene_frame_get(const Scene *scene)
#define BLI_assert_msg(a, msg)
void BLI_kdtree_nd_ free(KDTree *tree)
MINLINE int compare_ff_relative(float a, float b, float max_diff, int max_ulps)
bool bool BLI_str_quoted_substr(const char *__restrict str, const char *__restrict prefix, char *result, size_t result_maxncpy)
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
void DEG_id_tag_update(ID *id, unsigned int flags)
ID and Library types, which are fundamental for SDNA.
@ ID_RECALC_ANIMATION_NO_FLUSH
@ USER_ANIM_KEY_CHANNEL_ROTATION_MODE
@ USER_ANIM_KEY_CHANNEL_SCALE
@ USER_ANIM_KEY_CHANNEL_ROTATION
@ USER_ANIM_KEY_CHANNEL_LOCATION
@ USER_ANIM_KEY_CHANNEL_CUSTOM_PROPERTIES
bool ED_operator_sequencer_scene_editable(bContext *C)
bool ED_operator_areaactive(bContext *C)
Read Guarded memory(de)allocation.
#define MEM_recallocN(vmemh, len)
@ PROP_STRING_SEARCH_SUGGESTION
void UI_context_update_anim_flag(const bContext *C)
void UI_popup_menu_end(bContext *C, uiPopupMenu *pup)
uiPopupMenu * UI_popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
uiBut * UI_context_active_but_prop_get(const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index)
uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
bool UI_but_flag_is_set(uiBut *but, int flag)
void ANIM_deselect_keys_in_animation_editors(bContext *C)
BPy_StructRNA * depsgraph
Span< T > as_span() const
void append(const T &value)
void extend(Span< T > array)
bool is_action_layered() const
void merge(const CombinedKeyingResult &other)
int get_count(const SingleKeyingResult result) const
void generate_reports(ReportList *reports, eReportType report_level=RPT_ERROR)
static constexpr slot_handle_t unassigned
static wmOperatorStatus delete_key_using_keying_set(bContext *C, wmOperator *op, KeyingSet *ks)
void ANIM_OT_keyframe_insert_menu(wmOperatorType *ot)
bool fcurve_is_changed(PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, const AnimationEvalContext *anim_eval_context)
Lesser Keyframe Checking API call.
static wmOperatorStatus insert_key(bContext *C, wmOperator *op)
static wmOperatorStatus delete_key_v3d_invoke(bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus clear_anim_vse_exec(bContext *C, wmOperator *op)
static wmOperatorStatus delete_key_vse_invoke(bContext *C, wmOperator *op, const wmEvent *)
void ANIM_OT_keyframe_delete_vse(wmOperatorType *ot)
static wmOperatorStatus delete_key_button_exec(bContext *C, wmOperator *op)
static wmOperatorStatus insert_key_invoke(bContext *C, wmOperator *op, const wmEvent *)
void ANIM_OT_keyframe_insert(wmOperatorType *ot)
static bool can_delete_scene_key(FCurve *fcu, Scene *scene, wmOperator *op)
static wmOperatorStatus clear_anim_v3d_exec(bContext *C, wmOperator *)
void ANIM_OT_keyframe_clear_button(wmOperatorType *ot)
void ANIM_OT_keyframe_insert_by_name(wmOperatorType *ot)
static wmOperatorStatus delete_key_vse_without_keying_set(bContext *C, wmOperator *op)
static wmOperatorStatus clear_anim_vse_invoke(bContext *C, wmOperator *op, const wmEvent *)
void ANIM_OT_keyframe_delete(wmOperatorType *ot)
void ED_keyframes_add(FCurve *fcu, int num_keys_to_add)
static bool fcurve_belongs_to_strip(const FCurve &fcurve, const std::string &strip_path)
static wmOperatorStatus insert_key_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)
void ANIM_OT_keyframe_clear_v3d(wmOperatorType *ot)
static bool can_delete_key(FCurve *fcu, Object *ob, ReportList *reports)
void ANIM_OT_keyframe_insert_button(wmOperatorType *ot)
static wmOperatorStatus clear_key_button_exec(bContext *C, wmOperator *op)
static wmOperatorStatus delete_key_vse_exec(bContext *C, wmOperator *op)
static void invalidate_strip_caches(blender::Vector< PointerRNA > selection, Scene *scene)
static KeyingSet * keyingset_get_from_op_with_error(wmOperator *op, PropertyRNA *prop, Scene *scene)
void update_autoflags_fcurve(FCurve *fcu, bContext *C, ReportList *reports, PointerRNA *ptr)
Lesser Key-framing API call.
static wmOperatorStatus delete_key_v3d_without_keying_set(bContext *C, wmOperator *op)
static bool get_selection(bContext *C, blender::Vector< PointerRNA > *r_selection)
static blender::Vector< std::string > get_selected_strips_rna_paths(blender::Vector< PointerRNA > &selection)
static bool modify_key_op_poll(bContext *C)
static wmOperatorStatus delete_key_v3d_exec(bContext *C, wmOperator *op)
static wmOperatorStatus insert_key_with_keyingset(bContext *C, wmOperator *op, KeyingSet *ks)
void ANIM_OT_keyframe_delete_v3d(wmOperatorType *ot)
static blender::Vector< RNAPath > construct_rna_paths(PointerRNA *ptr)
static wmOperatorStatus insert_key_exec(bContext *C, wmOperator *op)
static wmOperatorStatus clear_anim_v3d_invoke(bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus insert_key_button_exec(bContext *C, wmOperator *op)
static bool can_delete_fcurve(FCurve *fcu, Object *ob)
void ANIM_OT_keyframe_delete_button(wmOperatorType *ot)
static wmOperatorStatus delete_key_exec(bContext *C, wmOperator *op)
void ANIM_OT_keyframe_delete_by_name(wmOperatorType *ot)
void ANIM_OT_keyframe_clear_vse(wmOperatorType *ot)
static wmOperatorStatus keyframe_insert_with_keyingset_exec(bContext *C, wmOperator *op)
void ANIM_keyingset_visit_for_search_no_poll(const bContext *C, PointerRNA *, PropertyRNA *, const char *, blender::FunctionRef< void(StringPropertySearchVisitParams)> visit_fn)
KeyingSet * ANIM_keyingset_get_from_idname(Scene *scene, const char *idname)
KeyingSet * ANIM_keyingset_get_from_enum_type(Scene *scene, int type)
const EnumPropertyItem * ANIM_keying_sets_enum_itemf(bContext *C, PointerRNA *, PropertyRNA *, bool *r_free)
bool all(VecOp< bool, D >) RET
void MEM_freeN(void *vmemh)
void foreach_fcurve_in_action_slot(Action &action, slot_handle_t handle, FunctionRef< void(FCurve &fcurve)> callback)
bool action_fcurve_remove(Action &action, FCurve &fcu)
std::optional< StringRefNull > default_channel_group_for_path(const PointerRNA *animated_struct, StringRef prop_rna_path)
void animdata_fcurve_delete(AnimData *adt, FCurve *fcu)
void update_autoflags_fcurve_direct(FCurve *fcu, PropertyType prop_type)
KeyingSet * scene_get_active_keyingset(const Scene *scene)
Vector< RNAPath > get_keyable_id_property_paths(const PointerRNA &ptr)
Vector< float > get_rna_values(PointerRNA *ptr, PropertyRNA *prop)
bool bone_is_selected(const bArmature *armature, const Bone *bone)
int clear_keyframe(Main *bmain, ReportList *reports, ID *id, const RNAPath &rna_path)
int delete_keyframe(Main *bmain, ReportList *reports, ID *id, const RNAPath &rna_path, float cfra)
Main Delete Key-Framing API call.
bool fcurve_delete_keyframe_at_time(FCurve *fcurve, float time)
CombinedKeyingResult insert_keyframes(Main *bmain, PointerRNA *struct_pointer, std::optional< StringRefNull > channel_group, const blender::Span< RNAPath > rna_paths, std::optional< float > scene_frame, const AnimationEvalContext &anim_eval_context, eBezTriple_KeyframeType key_type, eInsertKeyFlags insert_key_flags)
Main key-frame insertion API.
bool keyingset_find_id(KeyingSet *keyingset, ID *id)
bool delete_keyframe_fcurve_legacy(AnimData *adt, FCurve *fcu, float cfra)
bool animdata_remove_empty_action(AnimData *adt)
bool insert_keyframe_direct(ReportList *reports, PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, const AnimationEvalContext *anim_eval_context, eBezTriple_KeyframeType keytype, NlaKeyframingContext *nla_context, eInsertKeyFlags flag)
Secondary Insert Key-framing API call.
int apply_keyingset(bContext *C, blender::Vector< PointerRNA > *sources, KeyingSet *keyingset, ModifyKeyMode mode, float cfra)
eInsertKeyFlags get_keyframing_flags(Scene *scene)
float evaluate_driver_from_rna_pointer(const AnimationEvalContext *anim_eval_context, PointerRNA *ptr, PropertyRNA *prop, const FCurve *fcu)
bool mode_set(bContext *C, eObjectMode mode)
blender::VectorSet< Strip * > selected_strips_from_context(bContext *C)
void relations_invalidate_cache(Scene *scene, Strip *strip)
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)
PropertyType RNA_property_type(PropertyRNA *prop)
void RNA_property_enum_items_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
bool RNA_property_anim_editable(const PointerRNA *ptr, PropertyRNA *prop_orig)
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
std::string RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
int RNA_enum_get(PointerRNA *ptr, const char *name)
const char * RNA_property_identifier(const PropertyRNA *prop)
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)
void RNA_def_property_string_search_func_runtime(PropertyRNA *prop, StringPropertySearchFunc search_fn, const eStringPropertySearchFlag search_flag)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
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)
std::optional< std::string > RNA_path_from_ID_to_struct(const PointerRNA *ptr)
std::optional< std::string > RNA_path_from_ID_to_property(const PointerRNA *ptr, PropertyRNA *prop)
bool RNA_path_resolve_property(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop)
const EnumPropertyItem rna_enum_dummy_DEFAULT_items[]
std::optional< int > index
struct ToolSettings * toolsettings
void separator(float factor=1.0f, LayoutSeparatorType type=LayoutSeparatorType::Auto)
PointerRNA op(wmOperatorType *ot, std::optional< blender::StringRef > name, int icon, blender::wm::OpCallContext context, eUI_Item_Flag flag)
wmOperatorStatus(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
struct wmOperatorType * type
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_operator_properties_confirm_or_exec(wmOperatorType *ot)
std::string WM_operatortype_name(wmOperatorType *ot, PointerRNA *properties)
wmOperatorStatus WM_operator_confirm_ex(bContext *C, wmOperator *op, const char *title, const char *message, const char *confirm_text, int icon, bool cancel_default)