11#include <fmt/format.h>
54#include "RNA_prototypes.hh"
115 if (
ptr.owner_id &&
ptr.data && prop) {
138 std::optional<std::string> path;
139 if (
ptr.owner_id !=
nullptr) {
171 ot->name =
"Copy Data Path";
172 ot->idname =
"UI_OT_copy_data_path_button";
173 ot->description =
"Copy the RNA data path for this property to the clipboard";
183 prop =
RNA_def_boolean(
ot->srna,
"full_path",
false,
"full_path",
"Copy full data path");
201 if (
ptr.owner_id &&
ptr.data && prop &&
224 if (
ptr.owner_id &&
ptr.data && prop) {
228 bmain, &
ptr, prop, dim, index, &
id))
244 ot->name =
"Copy as New Driver";
245 ot->idname =
"UI_OT_copy_as_driver_button";
247 "Create a new driver with this property as input, and copy it to the "
248 "internal clipboard. Use Paste Driver to add it to the target property, "
249 "or Paste Driver Variables to extend an existing driver";
269 if (but && (but->
optype !=
nullptr)) {
280 if (but && (but->
optype !=
nullptr)) {
297 ot->name =
"Copy Python Command";
298 ot->idname =
"UI_OT_copy_python_command_button";
299 ot->description =
"Copy the Python command matching this button";
374 const int array_index = (
all) ? -1 : index;
380 C, scene, &
ptr, prop, array_index, scene->
r.
cfra,
true);
392 ot->name =
"Reset to Default Value";
393 ot->idname =
"UI_OT_reset_default_button";
394 ot->description =
"Reset this property's value to its default value";
407 ot->srna,
"all",
true,
"All",
"Reset to default values all elements of the array");
456 ot->name =
"Assign Value as Default";
457 ot->idname =
"UI_OT_assign_default_button";
458 ot->description =
"Set this property's current value as the new default";
498 ot->name =
"Unset Property";
499 ot->idname =
"UI_OT_unset_property_button";
500 ot->description =
"Clear the property and use default or generated value in operators";
531 "'No-Operation', place holder preventing automatic override to ever affect the property"},
536 "Completely replace value from linked data by local one"},
541 "Store difference to linked data value"},
546 "Store factor to linked data value (useful e.g. for scale)"},
547 {0,
nullptr, 0,
nullptr,
nullptr},
607 if (opop ==
nullptr) {
638 ot->name =
"Define Override Type";
639 ot->idname =
"UI_OT_override_type_set_button";
640 ot->description =
"Create an override operation, or set the type of an existing one";
652 ot->srna,
"all",
true,
"All",
"Reset to default values all elements of the array");
658 "Type of override operation");
687 ID *
id =
ptr.owner_id;
696 BLI_assert_msg(0,
"Failed to create matching source (linked data) RNA pointer");
699 if (!
all && index != -1) {
704 oprop,
nullptr,
nullptr, {}, {}, index, index,
false, &is_strict_find);
706 if (!is_strict_find) {
713 oprop, opop->
operation,
nullptr,
nullptr, {}, {}, idx, idx,
true,
nullptr,
nullptr);
738 ot->name =
"Remove Override";
739 ot->idname =
"UI_OT_override_remove_button";
740 ot->description =
"Remove an override operation";
751 ot->srna,
"all",
true,
"All",
"Reset to default values all elements of the array");
761 if (owner_ptr.
data ==
nullptr || prop ==
nullptr) {
762 *r_owner_id = *r_id =
nullptr;
763 if (r_owner_ptr !=
nullptr) {
766 if (r_prop !=
nullptr) {
774 *r_id =
static_cast<ID *
>(idptr.
data);
775 if (r_owner_ptr !=
nullptr) {
776 *r_owner_ptr = owner_ptr;
778 if (r_prop !=
nullptr) {
788 if (owner_id ==
nullptr ||
id ==
nullptr) {
817 if (
ELEM(
nullptr, owner_id,
id)) {
824 if (id_override ==
nullptr) {
854 ot->name =
"Make Library Override";
855 ot->idname =
"UI_OT_override_idtemplate_make";
857 "Create a local override of the selected linked data-block, and its hierarchy of "
879 if (
ELEM(
nullptr, owner_id,
id)) {
903 ot->name =
"Reset Library Override";
904 ot->idname =
"UI_OT_override_idtemplate_reset";
905 ot->description =
"Reset the selected local override to its linked reference values";
926 if (
ELEM(
nullptr, owner_id,
id)) {
941 bool do_remap_active =
false;
946 do_remap_active =
true;
949 if (do_remap_active) {
952 if (basact !=
nullptr) {
953 view_layer->
basact = basact;
981 ot->name =
"Clear Library Override";
982 ot->idname =
"UI_OT_override_idtemplate_clear";
984 "Delete the selected local override and relink its usages to the linked data-block if "
985 "possible, else reset it and mark it as non editable";
1001 if (owner_id ==
nullptr ||
id ==
nullptr) {
1014 layout->
op(
"UI_OT_override_idtemplate_make",
IFACE_(
"Make"), ICON_NONE);
1015 layout->
op(
"UI_OT_override_idtemplate_reset",
IFACE_(
"Reset"), ICON_NONE);
1016 layout->
op(
"UI_OT_override_idtemplate_clear",
IFACE_(
"Clear"), ICON_NONE);
1037#define NOT_RNA_NULL(assignment) ((assignment).data != nullptr)
1066 *r_lb = std::move(lb);
1095 bool *r_use_path_from_id,
1096 std::optional<std::string> *r_path)
1098 *r_use_path_from_id =
false;
1099 *r_path = std::nullopt;
1103 bool ensure_list_items_contain_prop =
false;
1115 std::optional<std::string> idpath;
1160 if (
STREQ(prop_id,
"lock")) {
1180 switch (
GS(
ptr->owner_id->name)) {
1200 printf(
"BoneColor is unexpectedly owned by %s '%s'\n",
1202 ptr->owner_id->name + 2);
1204 "expected BoneColor to be owned by the Armature "
1205 "(bone & edit bone) or the Object (pose bone)");
1215 *r_lb = list_of_things;
1221 if (
STREQ(prop_id,
"lock")) {
1230 ensure_list_items_contain_prop =
true;
1252 else if (
const std::optional<std::string> path_from_bone =
1257 *r_path = path_from_bone;
1261 std::optional<std::string> path;
1262 bNode *node =
nullptr;
1278 node =
static_cast<bNode *
>(
ptr->data);
1287 if (node_data->
idname != node_idname) {
1297 else if (
ptr->owner_id) {
1298 ID *
id =
ptr->owner_id;
1302 *r_use_path_from_id =
true;
1307 const short id_code =
GS(id->
name);
1315 if (
ID *id_data =
static_cast<ID *
>(ob->
data)) {
1323 ID *id_data =
static_cast<ID *
>(ob->
data);
1348 if (r_path->has_value()) {
1352 if (is_rna &&
STREQ(prop_id,
"lock")) {
1361 ensure_list_items_contain_prop =
true;
1365 return r_path->has_value();
1372 if (!r_path->has_value()) {
1377 ensure_list_items_contain_prop =
true;
1380 if (ensure_list_items_contain_prop) {
1384 if ((
ptr->type != link.
type) &&
1400 &link, r_path->has_value() ? r_path->value().c_str() :
nullptr, &lptr, &lprop);
1402 if (lprop ==
nullptr) {
1429 bool use_path_from_id,
1436 if (ptr_link->
data ==
ptr->data) {
1440 if (use_path_from_id) {
1464 if (lprop ==
nullptr) {
1490 ignore_prop_eq =
false;
1495 ignore_prop_eq =
true;
1499 if ((lprop != prop) && !ignore_prop_eq) {
1535 if (
ptr.data ==
nullptr || prop ==
nullptr) {
1539 bool success =
false;
1540 std::optional<std::string> path;
1541 bool use_path_from_id;
1546 if (link.data ==
ptr.data) {
1553 path.has_value() ? path->c_str() :
nullptr,
1594 ot->name =
"Copy to Selected";
1595 ot->idname =
"UI_OT_copy_to_selected_button";
1597 "Copy the property's value from the active item to the same property of all selected items "
1598 "if the same property exists";
1608 RNA_def_boolean(
ot->srna,
"all",
true,
"All",
"Copy to selected all elements of the array");
1628 if (!path.has_value()) {
1639 if (!is_array_prop) {
1651 for (
int i = 0;
i < drivers.
size();
i++) {
1652 if (get_all ||
i == index) {
1661 bool fetched_at_least_one =
false;
1662 for (
const FCurve *driver : drivers) {
1663 fetched_at_least_one |= driver !=
nullptr;
1665 if (!fetched_at_least_one) {
1669 if (r_is_array_prop) {
1670 *r_is_array_prop = is_array_prop;
1677 const bool is_array_prop,
1686 if (!dst_path.has_value()) {
1695 int paste_count = 0;
1696 for (
int i = 0;
i < src_drivers.
size();
i++) {
1697 if (!src_drivers[
i]) {
1700 const int dst_index = is_array_prop ?
i : -1;
1711 dst_ptr, dst_prop, dst_index,
nullptr,
nullptr, &driven,
nullptr);
1712 if (fcu && !driven) {
1776 if (!
ptr.data || !
ptr.owner_id || !prop) {
1779 copy_entire_array |= index == -1;
1782 bool is_array_prop =
false;
1784 &
ptr, prop, copy_entire_array, index, &is_array_prop);
1791 std::optional<std::string> path;
1792 bool use_path_from_id;
1795 C, &
ptr, prop, &target_properties, &use_path_from_id, &path))
1801 int total_copy_count = 0;
1802 for (
PointerRNA &target_prop : target_properties) {
1803 if (target_prop.data ==
ptr.data) {
1814 path.has_value() ? path->c_str() :
nullptr,
1832 src_drivers.
as_span(), is_array_prop, &dst_ptr, dst_prop);
1833 if (paste_count == 0) {
1838 total_copy_count += paste_count;
1841 return total_copy_count > 0;
1865 ot->name =
"Copy Driver to Selected";
1866 ot->idname =
"UI_OT_copy_driver_to_selected_button";
1868 "Copy the property's driver from the active item to the same property "
1869 "of all selected items, if the same property exists";
1880 ot->srna,
"all",
false,
"All",
"Copy to selected the drivers of all elements of the array");
1900 if (
ELEM(
ptr.type, &RNA_EditBone, &RNA_PoseBone, &RNA_Bone)) {
1902 if (bone_name[0] !=
'\0') {
1903 target_type = &RNA_Bone;
1907 target_type = &RNA_Object;
1910 if (target_type ==
nullptr) {
1917 Base *base =
nullptr;
1918 const short id_type =
GS(
ptr.owner_id->name);
1919 if (id_type ==
ID_OB) {
1936 const bool reveal_hidden =
true;
1938 if (target_type == &RNA_Bone) {
1941 else if (target_type == &RNA_Object) {
1967 if (
ptr.data && prop) {
1986 &
ptr, prop, str_buf,
sizeof(str_buf),
nullptr);
1996 if (str_ptr != str_buf) {
2025 ot->name =
"Jump to Target";
2026 ot->idname =
"UI_OT_jump_to_target_button";
2027 ot->description =
"Switch to the target object or bone";
2049struct uiEditSourceStore {
2054struct uiEditSourceButStore {
2056 int py_dbg_line_number;
2060static uiEditSourceStore *ui_editsource_info =
nullptr;
2064 return (ui_editsource_info !=
nullptr);
2067static void ui_editsource_active_but_set(
uiBut *but)
2071 ui_editsource_info = MEM_new<uiEditSourceStore>(__func__);
2072 ui_editsource_info->but_orig = *but;
2077static void ui_editsource_active_but_clear()
2080 MEM_delete(ui_editsource_info);
2081 ui_editsource_info =
nullptr;
2084static bool ui_editsource_uibut_match(
uiBut *but_a,
uiBut *but_b)
2110 int line_number = -1;
2113 printf(
"comparing buttons: '%s' == '%s'\n", but->
drawstr, ui_editsource_info->but_orig.drawstr);
2118 if (line_number != -1) {
2120 but_store->py_dbg_line_number = line_number;
2123 but_store->py_dbg_fn[0] =
'\0';
2124 but_store->py_dbg_line_number = -1;
2132 uiEditSourceButStore *but_store =
static_cast<uiEditSourceButStore *
>(
2165 uiEditSourceButStore *but_store =
nullptr;
2176 ui_editsource_active_but_set(but);
2185 uiBlock *block_pair[2] = {block_base, block_base->oldblock};
2187 for (
int i = 0;
i < block->buttons.size();
i++) {
2188 const uiBut *but = block->buttons[
i].get();
2189 valid_buttons_in_region.
add(but);
2199 if (but_key ==
nullptr) {
2203 if (!valid_buttons_in_region.
contains(but_key)) {
2207 if (ui_editsource_uibut_match(&ui_editsource_info->but_orig, but_key)) {
2214 if (but_store->py_dbg_line_number != -1) {
2215 ret = editsource_text_edit(
C, op, but_store->py_dbg_fn, but_store->py_dbg_line_number);
2219 op->
reports,
RPT_ERROR,
"Active button is not from a script, cannot edit source");
2228 ui_editsource_active_but_clear();
2242 ot->name =
"Edit Source";
2243 ot->idname =
"UI_OT_editsource";
2244 ot->description =
"Edit UI source code of the active button";
2247 ot->exec = editsource_exec;
2270 ot->name =
"Reload Translation";
2271 ot->idname =
"UI_OT_reloadtranslation";
2272 ot->description =
"Force a full reload of UI translation";
2291 if (region ==
nullptr) {
2292 region = region_prev;
2295 if (region ==
nullptr) {
2303 if (but ==
nullptr) {
2312 void *but_optype = but->
optype;
2325 ot->name =
"Press Button";
2326 ot->idname =
"UI_OT_button_execute";
2327 ot->description =
"Presses active button";
2354 ot->name =
"Clear Button String";
2355 ot->idname =
"UI_OT_button_string_clear";
2356 ot->description =
"Unsets the text of the active button";
2403 uiBut *but =
nullptr;
2454 ot->name =
"Drop Color";
2455 ot->idname =
"UI_OT_drop_color";
2456 ot->description =
"Drop colors to buttons";
2464 ot->srna,
"color", 4,
nullptr, 0.0,
FLT_MAX,
"Color",
"Source color", 0.0, 1.0);
2466 ot->srna,
"gamma",
false,
"Gamma Corrected",
"The source color is gamma corrected");
2468 ot->srna,
"has_alpha",
false,
"Has Alpha",
"The source color contains an Alpha component");
2510 ot->name =
"Drop Name";
2511 ot->idname =
"UI_OT_drop_name";
2512 ot->description =
"Drop name to button";
2519 ot->srna,
"string",
nullptr, 0,
"String",
"The string value to drop into the button");
2537 return list !=
nullptr;
2577 ot->name =
"List Filter";
2578 ot->idname =
"UI_OT_list_start_filter";
2579 ot->description =
"Start entering filter text for the list in focus";
2608 return view !=
nullptr;
2627 ot->name =
"View Filter";
2628 ot->idname =
"UI_OT_view_start_filter";
2629 ot->description =
"Start entering filter text for the data-set in focus";
2650 if (region ==
nullptr) {
2678 ot->name =
"View Drop";
2679 ot->idname =
"UI_OT_view_drop";
2680 ot->description =
"Drag and drop onto a data-set or item within the data-set";
2701 return view->supports_scrolling();
2709 int type =
event->type;
2710 bool invert_direction =
false;
2718 invert_direction =
true;
2723 std::optional<ViewScrollDirection> direction =
2724 [type, invert_direction]() -> std::optional<ViewScrollDirection> {
2731 return std::nullopt;
2739 if (
view->is_fully_visible()) {
2744 view->scroll(*direction);
2752 ot->name =
"View Scroll";
2753 ot->idname =
"UI_OT_view_scroll";
2775 if (region ==
nullptr) {
2795 ot->name =
"Rename View Item";
2796 ot->idname =
"UI_OT_view_item_rename";
2797 ot->description =
"Rename the active item in the data-set view";
2817 if (ob ==
nullptr) {
2835 if (ma ==
nullptr) {
2845 const int target_slot =
RNA_int_get(&mat_slot,
"slot_index") + 1;
2864 ot->name =
"Drop Material in Material slots";
2865 ot->description =
"Drag material to Material slots in Properties";
2866 ot->idname =
"UI_OT_drop_material";
Functions to insert, delete or modify keyframes.
AnimData * BKE_animdata_ensure_id(ID *id)
AnimData * BKE_animdata_from_id(const ID *id)
blender::Vector< PointerRNA > CTX_data_collection_get(const bContext *C, const char *member)
PointerRNA CTX_data_pointer_get_type_silent(const bContext *C, const char *member, StructRNA *type)
SpaceImage * CTX_wm_space_image(const bContext *C)
bScreen * CTX_wm_screen(const bContext *C)
PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type)
wmWindow * CTX_wm_window(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
void CTX_data_collection_remap_property(blender::MutableSpan< PointerRNA > collection_pointers, const char *propname)
void CTX_wm_region_set(bContext *C, ARegion *region)
ARegion * CTX_wm_region(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
FCurve * BKE_fcurve_copy(const FCurve *fcu)
FCurve * BKE_fcurve_find(ListBase *list, const char rna_path[], int array_index)
FCurve * BKE_fcurve_find_by_rna(PointerRNA *ptr, PropertyRNA *prop, int rnaindex, AnimData **r_adt, bAction **r_action, bool *r_driven, bool *r_special)
void BKE_fcurve_rnapath_set(FCurve &fcu, blender::StringRef rna_path)
void BKE_fcurve_free(FCurve *fcu)
const char * BKE_idtype_idcode_to_name(short idcode)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
Base * BKE_view_layer_base_find(ViewLayer *view_layer, Object *ob)
void BKE_id_delete(Main *bmain, void *idv) ATTR_NONNULL()
void BKE_lib_override_library_property_operation_delete(IDOverrideLibraryProperty *liboverride_property, IDOverrideLibraryPropertyOperation *liboverride_property_operation)
IDOverrideLibraryPropertyOperation * BKE_lib_override_library_property_operation_get(IDOverrideLibraryProperty *liboverride_property, short operation, const char *subitem_refname, const char *subitem_locname, const std::optional< ID * > &subitem_refid, const std::optional< ID * > &subitem_locid, int subitem_refindex, int subitem_locindex, bool strict, bool *r_strict, bool *r_created)
IDOverrideLibraryPropertyOperation * BKE_lib_override_library_property_operation_find(IDOverrideLibraryProperty *liboverride_property, const char *subitem_refname, const char *subitem_locname, const std::optional< const ID * > &subitem_refid, const std::optional< const ID * > &subitem_locid, int subitem_refindex, int subitem_locindex, bool strict, bool *r_strict)
void BKE_lib_override_library_id_reset(Main *bmain, ID *id_root, bool do_reset_system_override)
bool BKE_lib_override_library_is_hierarchy_leaf(Main *bmain, ID *id)
void BKE_lib_override_library_property_delete(IDOverrideLibrary *liboverride, IDOverrideLibraryProperty *liboverride_property)
@ ID_REMAP_SKIP_INDIRECT_USAGE
void void BKE_libblock_remap(Main *bmain, void *old_idv, void *new_idv, int remap_flags) ATTR_NONNULL(1
General operations, lookup, etc. for materials.
@ BKE_MAT_ASSIGN_USERPREF
void BKE_object_material_assign(Main *bmain, Object *ob, Material *ma, short act, int assign_type)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
ARegion * BKE_screen_find_region_xy(const bScreen *screen, int regiontype, const int xy[2]) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
#define BLI_assert_msg(a, msg)
BLI_INLINE void * BLI_ghashIterator_getKey(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
void BLI_ghashIterator_step(GHashIterator *ghi)
BLI_INLINE void * BLI_ghashIterator_getValue(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
GHash * BLI_ghash_ptr_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
bool BLI_ghash_remove(GHash *gh, const void *key, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void * BLI_ghash_lookup(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
void BLI_ghash_insert(GHash *gh, void *key, void *val)
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void BLI_ghashIterator_init(GHashIterator *ghi, GHash *gh)
BLI_INLINE bool BLI_ghashIterator_done(const GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void linearrgb_to_srgb_v3_v3(float srgb[3], const float linear[3])
bool BLI_rctf_compare(const struct rctf *rect_a, const struct rctf *rect_b, float limit)
char * STRNCPY(char(&dst)[N], const char *src)
void BLT_lang_set(const char *)
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
@ LIBOVERRIDE_OP_MULTIPLY
Object is a sort of wrapper for general info.
#define OB_DATA_SUPPORT_ID(_id_type)
void ED_imapaint_bucket_fill(bContext *C, const float color[3], wmOperator *op, const int mouse[2])
bool ED_operator_regionactive(bContext *C)
void ED_region_do_layout(bContext *C, ARegion *region)
void ED_region_do_draw(bContext *C, ARegion *region)
void ED_region_tag_redraw(ARegion *region)
void ED_undo_push(bContext *C, const char *str)
BLI_INLINE void IMB_colormanagement_srgb_to_scene_linear_v3(float scene_linear[3], const float srgb[3])
BLI_INLINE void IMB_colormanagement_scene_linear_to_srgb_v3(float srgb[3], const float scene_linear[3])
Read Guarded memory(de)allocation.
@ RNA_OVERRIDE_STATUS_OVERRIDABLE
@ RNA_OVERRIDE_STATUS_OVERRIDDEN
bool UI_view_item_can_rename(const blender::ui::AbstractViewItem &item)
bool UI_textbutton_activate_rna(const bContext *C, ARegion *region, const void *rna_poin_data, const char *rna_prop_id)
uiList * UI_list_find_mouse_over(const ARegion *region, const wmEvent *event)
blender::ui::AbstractView * UI_region_view_find_at(const ARegion *region, const int xy[2], int pad)
bool UI_editsource_enable_check()
uiBut * UI_context_active_but_get(const bContext *C)
void UI_editsource_but_replace(const uiBut *old_but, uiBut *new_but)
void UI_but_execute(const bContext *C, ARegion *region, uiBut *but)
void UI_view_item_begin_rename(blender::ui::AbstractViewItem &item)
void UI_editsource_active_but_test(uiBut *but)
blender::ui::AbstractViewItem * UI_region_views_find_active_item(const ARegion *region)
uiBut * UI_context_active_but_prop_get(const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index)
PointerRNA * UI_but_operator_ptr_ensure(uiBut *but)
uiBut * UI_but_active_drop_name_button(const bContext *C)
uiBut * UI_context_active_but_get_respect_popup(const bContext *C)
void UI_context_active_but_prop_get_templateID(const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop)
void UI_context_active_but_prop_handle(bContext *C, bool handle_undo)
bool UI_but_active_drop_color(bContext *C)
void UI_screen_free_active_but_highlight(const bContext *C, bScreen *screen)
bool UI_but_flag_is_set(uiBut *but, int flag)
#define ND_LIB_OVERRIDE_CHANGED
bool contains(const Key &key) const
constexpr int64_t size() const
int64_t remove_if(Predicate &&predicate)
void append(const T &value)
void resize(const int64_t new_size)
Span< T > as_span() const
virtual bool begin_filtering(const bContext &C) const
void ANIM_copy_as_driver(ID *target_id, const char *target_path, const char *var_name)
void UI_OT_eyedropper_color(wmOperatorType *ot)
void UI_OT_eyedropper_id(wmOperatorType *ot)
void UI_OT_eyedropper_depth(wmOperatorType *ot)
void UI_OT_eyedropper_driver(wmOperatorType *ot)
void UI_OT_eyedropper_grease_pencil_color(wmOperatorType *ot)
VecBase< float, D > constexpr mod(VecOp< float, D >, VecOp< float, D >) RET
bool all(VecOp< bool, D >) RET
#define ID_IS_OVERRIDE_LIBRARY_REAL(_id)
#define ID_CHECK_UNDO(id)
#define ID_IS_LINKED(_id)
#define ID_IS_EDITABLE(_id)
static bool ui_drop_material_poll(bContext *C, wmDrag *drag, const wmEvent *)
static bool ui_view_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
wmKeyMap * eyedropper_colorband_modal_keymap(wmKeyConfig *keyconf)
wmKeyMap * eyedropper_modal_keymap(wmKeyConfig *keyconf)
void ui_but_active_string_clear_and_exit(bContext *C, uiBut *but)
void ui_pan_to_scroll(const wmEvent *event, int *type, int *val)
void ui_but_set_string_interactive(bContext *C, uiBut *but, const char *value)
ID * ui_template_id_liboverride_hierarchy_make(bContext *C, Main *bmain, ID *owner_id, ID *id, const char **r_undo_push_label)
bool ui_jump_to_target_button_poll(bContext *C)
uiBut * ui_region_find_active_but(ARegion *region) ATTR_WARN_UNUSED_RESULT
void ui_rna_collection_search_update_fn(const bContext *C, void *arg, const char *str, uiSearchItems *items, bool is_first)
static wmOperatorStatus ui_drop_material_exec(bContext *C, wmOperator *op)
static wmOperatorStatus drop_name_invoke(bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus copy_to_selected_button_exec(bContext *C, wmOperator *op)
static bool ui_list_unhide_filter_options(uiList *list)
static void UI_OT_override_type_set_button(wmOperatorType *ot)
static bool override_type_set_button_poll(bContext *C)
static void UI_OT_override_idtemplate_reset(wmOperatorType *ot)
static void override_idtemplate_ids_get(bContext *C, ID **r_owner_id, ID **r_id, PointerRNA *r_owner_ptr, PropertyRNA **r_prop)
static void UI_OT_unset_property_button(wmOperatorType *ot)
static wmOperatorStatus reloadtranslation_exec(bContext *, wmOperator *)
static bool ui_view_focused_poll(bContext *C)
static wmOperatorStatus override_remove_button_exec(bContext *C, wmOperator *op)
static wmOperatorStatus ui_button_press_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static bool ui_list_focused_poll(bContext *C)
static void UI_OT_button_execute(wmOperatorType *ot)
static bool override_remove_button_poll(bContext *C)
static bool ui_view_drop_poll(bContext *C)
static void ui_region_redraw_immediately(bContext *C, ARegion *region)
static wmOperatorStatus jump_to_target_button_exec(bContext *C, wmOperator *)
static PointerRNA rnapointer_pchan_to_bone(const PointerRNA &pchan_ptr)
static wmOperatorStatus operator_button_property_finish(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
static wmOperatorStatus copy_as_driver_button_exec(bContext *C, wmOperator *op)
static bool reset_default_button_poll(bContext *C)
static bool override_idtemplate_menu_poll(const bContext *C_const, MenuType *)
static bool copy_driver_to_selected_button_poll(bContext *C)
static void UI_OT_copy_data_path_button(wmOperatorType *ot)
static void UI_OT_reloadtranslation(wmOperatorType *ot)
bool ui_jump_to_target_button_poll(bContext *C)
static wmOperatorStatus operator_button_property_finish_with_undo(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
static wmOperatorStatus ui_view_item_rename_exec(bContext *C, wmOperator *)
static bool copy_data_path_button_poll(bContext *C)
static void UI_OT_copy_python_command_button(wmOperatorType *ot)
static void UI_OT_assign_default_button(wmOperatorType *ot)
static bool ui_view_scroll_poll(bContext *C)
static wmOperatorStatus override_idtemplate_make_exec(bContext *C, wmOperator *)
static void UI_OT_override_idtemplate_clear(wmOperatorType *ot)
static wmOperatorStatus override_idtemplate_clear_exec(bContext *C, wmOperator *)
void ED_operatortypes_ui()
bool UI_drop_color_poll(bContext *C, wmDrag *drag, const wmEvent *)
static void UI_OT_list_start_filter(wmOperatorType *ot)
static bool copy_driver_to_selected_button(bContext *C, bool copy_entire_array, const bool poll)
static bool copy_to_selected_button_poll(bContext *C)
static wmOperatorStatus reset_default_button_exec(bContext *C, wmOperator *op)
static wmOperatorStatus button_string_clear_exec(bContext *C, wmOperator *)
static bool copy_to_selected_button(bContext *C, bool all, bool poll)
static wmOperatorStatus override_type_set_button_invoke(bContext *C, wmOperator *op, const wmEvent *)
void UI_drop_color_copy(bContext *, wmDrag *drag, wmDropBox *drop)
static wmOperatorStatus override_type_set_button_exec(bContext *C, wmOperator *op)
static AbstractView * get_view_focused(bContext *C)
static void UI_OT_view_start_filter(wmOperatorType *ot)
static void UI_OT_jump_to_target_button(wmOperatorType *ot)
static void UI_OT_drop_name(wmOperatorType *ot)
static void UI_OT_copy_to_selected_button(wmOperatorType *ot)
static wmOperatorStatus ui_view_drop_invoke(bContext *C, wmOperator *, const wmEvent *event)
static void UI_OT_copy_driver_to_selected_button(wmOperatorType *ot)
static void override_idtemplate_menu_draw(const bContext *, Menu *menu)
static void UI_OT_drop_material(wmOperatorType *ot)
static void UI_OT_view_scroll(wmOperatorType *ot)
static bool override_idtemplate_reset_poll(bContext *C)
static wmOperatorStatus override_idtemplate_reset_exec(bContext *C, wmOperator *)
static bool jump_to_target_button(bContext *C, bool poll)
static void UI_OT_override_remove_button(wmOperatorType *ot)
static void UI_OT_button_string_clear(wmOperatorType *ot)
@ UIOverride_Type_Replace
@ UIOverride_Type_Difference
static bool drop_name_poll(bContext *C)
bool UI_context_copy_to_selected_list(bContext *C, PointerRNA *ptr, PropertyRNA *prop, blender::Vector< PointerRNA > *r_lb, bool *r_use_path_from_id, std::optional< std::string > *r_path)
#define NOT_RNA_NULL(assignment)
static bool copy_python_command_button_poll(bContext *C)
static wmOperatorStatus copy_driver_to_selected_button_exec(bContext *C, wmOperator *op)
static wmOperatorStatus copy_python_command_button_exec(bContext *C, wmOperator *)
static void UI_OT_reset_default_button(wmOperatorType *ot)
static wmOperatorStatus unset_property_button_exec(bContext *C, wmOperator *)
void ED_keymap_ui(wmKeyConfig *keyconf)
User Interface Keymap.
static void UI_OT_override_idtemplate_make(wmOperatorType *ot)
static wmOperatorStatus ui_list_start_filter_invoke(bContext *C, wmOperator *, const wmEvent *event)
static bool assign_default_button_poll(bContext *C)
static void UI_OT_view_drop(wmOperatorType *ot)
static void UI_OT_copy_as_driver_button(wmOperatorType *ot)
static bool jump_to_target_ptr(bContext *C, PointerRNA ptr, const bool poll)
static bool override_idtemplate_clear_poll(bContext *C)
static EnumPropertyItem override_type_items[]
static wmOperatorStatus ui_view_start_filter_invoke(bContext *C, wmOperator *, const wmEvent *event)
static void ui_context_fcurve_modifiers_via_fcurve(bContext *C, blender::Vector< PointerRNA > *r_lb, FModifier *source)
static wmOperatorStatus ui_view_scroll_invoke(bContext *C, wmOperator *, const wmEvent *event)
static bool ui_drop_material_poll(bContext *C)
static wmOperatorStatus assign_default_button_exec(bContext *C, wmOperator *)
static bool copy_as_driver_button_poll(bContext *C)
static wmOperatorStatus drop_color_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void override_idtemplate_menu()
static void UI_OT_drop_color(wmOperatorType *ot)
bool UI_context_copy_to_selected_check(PointerRNA *ptr, PointerRNA *ptr_link, PropertyRNA *prop, const char *path, bool use_path_from_id, PointerRNA *r_ptr, PropertyRNA **r_prop)
static bool ui_view_item_rename_poll(bContext *C)
static void UI_OT_view_item_rename(wmOperatorType *ot)
static bool override_idtemplate_make_poll(bContext *C)
static wmOperatorStatus copy_data_path_button_exec(bContext *C, wmOperator *op)
static bool override_idtemplate_poll(bContext *C, const bool is_create_op)
static void ui_context_selected_bones_via_pose(bContext *C, blender::Vector< PointerRNA > *r_lb)
void * MEM_callocN(size_t len, const char *str)
void MEM_freeN(void *vmemh)
bool autokeyframe_property(bContext *C, Scene *scene, PointerRNA *ptr, PropertyRNA *prop, int rnaindex, float cfra, bool only_if_property_keyed)
bNode & node_find_node(bNodeTree &ntree, bNodeSocket &socket)
bool jump_to_object(bContext *C, Object *ob, bool reveal_hidden)
Base * find_first_by_data_id(const Scene *scene, ViewLayer *view_layer, ID *id)
bool jump_to_bone(bContext *C, Object *ob, const char *bone_name, bool reveal_hidden)
blender::Vector< FCurve * > get_property_drivers(PointerRNA *ptr, PropertyRNA *prop, bool get_all, int index, bool *r_is_array_prop)
int paste_property_drivers(blender::Span< FCurve * > src_drivers, bool is_array_prop, PointerRNA *dst_ptr, PropertyRNA *dst_prop)
void UI_OT_eyedropper_colorramp(wmOperatorType *ot)
void UI_OT_eyedropper_colorramp_point(wmOperatorType *ot)
bool drop_target_apply_drop(bContext &C, const ARegion ®ion, const wmEvent &event, const DropTargetInterface &drop_target, const ListBase &drags)
void UI_OT_eyedropper_bone(wmOperatorType *ot)
std::unique_ptr< DropTargetInterface > region_views_find_drop_target_at(const ARegion *region, const int xy[2])
void PyC_FileAndNum_Safe(const char **r_filename, int *r_lineno)
PropertyRNA * RNA_struct_type_find_property(StructRNA *srna, const char *identifier)
bool RNA_property_array_check(PropertyRNA *prop)
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
bool RNA_property_assign_default(PointerRNA *ptr, PropertyRNA *prop)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
bool RNA_property_reset(PointerRNA *ptr, PropertyRNA *prop, int index)
void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr_value, ReportList *reports)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
PropertyType RNA_property_type(PropertyRNA *prop)
const PointerRNA PointerRNA_NULL
char * RNA_property_string_get_alloc(PointerRNA *ptr, PropertyRNA *prop, char *fixedbuf, int fixedlen, int *r_len)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_float_set_array_at_most(PointerRNA *ptr, PropertyRNA *prop, const float *values, int values_num)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
int RNA_int_get(PointerRNA *ptr, const char *name)
int RNA_property_array_dimension(const PointerRNA *ptr, PropertyRNA *prop, int length[])
char * RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, int fixedlen, int *r_len)
bool RNA_pointer_is_null(const PointerRNA *ptr)
int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
const char * RNA_property_ui_name(const PropertyRNA *prop)
bool RNA_property_is_idprop(const PropertyRNA *prop)
bool RNA_property_editable(const PointerRNA *ptr, PropertyRNA *prop)
PropertySubType RNA_property_subtype(PropertyRNA *prop)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
bool RNA_property_collection_lookup_string(PointerRNA *ptr, PropertyRNA *prop, const char *key, PointerRNA *r_ptr)
bool RNA_property_driver_editable(const PointerRNA *ptr, PropertyRNA *prop)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
void RNA_float_set_array(PointerRNA *ptr, const char *name, const float *values)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
int RNA_enum_get(PointerRNA *ptr, const char *name)
void RNA_property_unset(PointerRNA *ptr, PropertyRNA *prop)
const char * RNA_property_identifier(const PropertyRNA *prop)
PointerRNA RNA_id_pointer_create(ID *id)
IDOverrideLibraryPropertyOperation * RNA_property_override_property_operation_get(Main *bmain, PointerRNA *ptr, PropertyRNA *prop, const short operation, const int index, const bool strict, bool *r_strict, bool *r_created)
IDOverrideLibraryProperty * RNA_property_override_property_find(Main *bmain, PointerRNA *ptr, PropertyRNA *prop, ID **r_owner_id)
eRNAOverrideStatus RNA_property_override_library_status(Main *bmain, PointerRNA *ptr, PropertyRNA *prop, const int index)
bool RNA_property_copy(Main *bmain, PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop, int index)
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_float_color(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
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)
StructRNA RNA_PropertyGroup
std::optional< std::string > RNA_path_from_struct_to_idproperty(PointerRNA *ptr, const IDProperty *needle)
std::optional< std::string > RNA_path_from_real_ID_to_property_index(Main *bmain, const PointerRNA *ptr, PropertyRNA *prop, int index_dim, int index, ID **r_real_id)
std::optional< std::string > RNA_path_full_property_py_ex(const PointerRNA *ptr, PropertyRNA *prop, int index, bool use_fallback)
std::optional< std::string > RNA_path_resolve_from_type_to_property(const PointerRNA *ptr, PropertyRNA *prop, const StructRNA *type)
std::optional< std::string > RNA_path_full_struct_py(const PointerRNA *ptr)
std::optional< std::string > RNA_path_from_ID_to_property_index(const PointerRNA *ptr, PropertyRNA *prop, int index_dim, int index)
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)
std::string RNA_path_from_ptr_to_property_index(const PointerRNA *ptr, PropertyRNA *prop, int index_dim, int index)
ARegionRuntimeHandle * runtime
IDOverrideLibrary * override_library
struct MaterialGPencilStyle * gp_style
struct bNodeTree * node_group
uiButSearchUpdateFn items_update_fn
PointerRNA op(wmOperatorType *ot, std::optional< blender::StringRef > name, int icon, wmOperatorCallContext context, eUI_Item_Flag flag)
PropertyRNA * search_prop
struct ReportList * reports
struct wmEvent * eventstate
void WM_draw_region_viewport_unbind(ARegion *region)
void WM_draw_region_viewport_bind(ARegion *region)
void WM_main_add_notifier(uint type, void *reference)
wmOperatorStatus WM_operator_name_call_ptr(bContext *C, wmOperatorType *ot, wmOperatorCallContext context, PointerRNA *properties, const wmEvent *event)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_event_add_mousemove(wmWindow *win)
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
ID * WM_operator_properties_id_lookup_from_name_or_session_uid(Main *bmain, PointerRNA *ptr, const ID_Type type)
void WM_operator_properties_id_lookup(wmOperatorType *ot, const bool add_name_prop)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
std::string WM_operator_pystring_ex(bContext *C, wmOperator *op, const bool all_args, const bool macro_args, wmOperatorType *ot, PointerRNA *opptr)
void WM_operator_properties_create_ptr(PointerRNA *ptr, wmOperatorType *ot)
wmOperatorStatus WM_menu_invoke_ex(bContext *C, wmOperator *op, wmOperatorCallContext opcontext)
void WM_operator_properties_free(PointerRNA *ptr)
void WM_clipboard_text_set(const char *buf, bool selection)