97#include "RNA_prototypes.hh"
189 if (ob_active ==
nullptr) {
192 return ob_active->
actcol > 0;
227 ot->
name =
"Add Material Slot";
228 ot->
idname =
"OBJECT_OT_material_slot_add";
292 ot->
name =
"Remove Material Slot";
293 ot->
idname =
"OBJECT_OT_material_slot_remove";
294 ot->
description =
"Remove the selected material slot";
313 bool changed_multi =
false;
319 for (
Object *ob : objects) {
320 short mat_nr_active = -1;
322 if (ob->totcol == 0) {
325 if (obact && (obact->
actcol >= 1 && obact->
actcol <= ob->totcol) &&
330 mat_nr_active = obact->
actcol - 1;
335 for (
int i = 0; i < ob->totcol; i++) {
337 if (mat_active == mat) {
342 if (mat_nr_active == -1) {
347 bool changed =
false;
356 efa->
mat_nr = mat_nr_active;
365 for (
Nurb &nu : *nurbs) {
368 nu.mat_nr = mat_nr_active;
373 else if (ob->type ==
OB_FONT) {
374 const Curve *cu = id_cast<const Curve *>(ob->data);
376 int i, selstart, selend;
379 for (i = selstart; i <= selend; i++) {
387 changed_multi =
true;
399 ot->
name =
"Assign Material Slot";
400 ot->
idname =
"OBJECT_OT_material_slot_assign";
401 ot->
description =
"Assign active material slot to selection";
419 bool changed_multi =
false;
424 for (
Object *ob : objects) {
425 if (ob->totcol == 0) {
430 ob, mat_active, obact ? obact->
actcol - 1 : -1);
432 if (mat_nr_active == -1) {
436 bool changed =
false;
453 for (
Nurb &nu : *nurbs) {
454 if (nu.mat_nr == mat_nr_active) {
459 if (bezt->
hide == 0) {
476 a = nu.pntsu * nu.pntsv;
497 changed_multi =
true;
514 ot->
name =
"Select Material Slot";
515 ot->
idname =
"OBJECT_OT_material_slot_select";
516 ot->
description =
"Select by active material slot";
533 ot->
name =
"Deselect Material Slot";
534 ot->
idname =
"OBJECT_OT_material_slot_deselect";
535 ot->
description =
"Deselect by active material slot";
565 for (
int i = ob->
totcol; i--;) {
566 matar[i] = ob->
matbits[i] ? (*matar_object)[i] : (*matar_obdata)[i];
573 const bool is_same_obdata = ob->
data == ob_iter->data;
578 if (is_same_obdata) {
579 for (
int i = ob->
totcol; i--;) {
581 ob_iter->matbits[i] = ob->
matbits[i];
588 if (ob_iter->totcol == ob->
totcol) {
589 ob_iter->actcol = ob->
actcol;
605 ot->
name =
"Copy Material to Selected";
606 ot->
idname =
"OBJECT_OT_material_slot_copy";
607 ot->
description =
"Copy material to selected objects";
632 if (!ob || ob->
totcol < 2) {
639 if (dir == 1 && ob->
actcol > 1) {
640 index_pair[0] = ob->
actcol - 2;
641 index_pair[1] = ob->
actcol - 1;
646 index_pair[0] = ob->
actcol - 1;
647 index_pair[1] = ob->
actcol - 0;
658 slot_remap[index_pair[0]] = index_pair[1];
659 slot_remap[index_pair[1]] = index_pair[0];
663 MEM_delete(slot_remap);
675 {1,
"UP", 0,
"Up",
""},
676 {-1,
"DOWN", 0,
"Down",
""},
677 {0,
nullptr, 0,
nullptr,
nullptr},
681 ot->
name =
"Move Material";
682 ot->
idname =
"OBJECT_OT_material_slot_move";
683 ot->
description =
"Move the active material up/down in the list";
697 "Direction to move the active material towards");
712 for (
Object *ob : objects) {
740 ot->
name =
"Remove Unused Slots";
741 ot->
idname =
"OBJECT_OT_material_slot_remove_unused";
760 for (
Object *ob : objects) {
787 ot->
name =
"Remove All Materials";
788 ot->
idname =
"OBJECT_OT_material_slot_remove_all";
821 Material *new_ma = id_cast<Material *>(
826 const char *name =
DATA_(
"Material");
866 ot->
name =
"New Material";
867 ot->
idname =
"MATERIAL_OT_new";
902 bool linked_id_created =
false;
918 if (!linked_id_created) {
930 ot->
name =
"New Texture";
931 ot->
idname =
"TEXTURE_OT_new";
956 World *new_wo = id_cast<World *>(
990 ot->
name =
"New World";
991 ot->
idname =
"WORLD_OT_new";
1024 if (view_layer_current ==
nullptr) {
1030 view_layer_current ? view_layer_current->
name :
1050 {
VIEWLAYER_ADD_COPY,
"COPY", 0,
"Copy Settings",
"Copy settings of current view layer"},
1055 "Add a new view layer with all collections disabled"},
1056 {0,
nullptr, 0,
nullptr,
nullptr},
1060 ot->
name =
"Add View Layer";
1061 ot->
idname =
"SCENE_OT_view_layer_add";
1105 ot->
name =
"Remove View Layer";
1106 ot->
idname =
"SCENE_OT_view_layer_remove";
1107 ot->
description =
"Remove the selected view layer";
1154 ot->
name =
"Add AOV";
1155 ot->
idname =
"SCENE_OT_view_layer_add_aov";
1206 ot->
name =
"Remove AOV";
1207 ot->
idname =
"SCENE_OT_view_layer_remove_aov";
1258 ot->
name =
"Add Lightgroup";
1259 ot->
idname =
"SCENE_OT_view_layer_add_lightgroup";
1274 "Name of newly created lightgroup");
1308 ot->
name =
"Remove Lightgroup";
1309 ot->
idname =
"SCENE_OT_view_layer_remove_lightgroup";
1330 if (ob->lightgroup && ob->lightgroup->name[0]) {
1331 used_lightgroups.
add_as(ob->lightgroup->name);
1336 if (scene->
world && scene->
world->lightgroup && scene->
world->lightgroup->name[0]) {
1337 used_lightgroups.
add_as(scene->
world->lightgroup->name);
1340 return used_lightgroups;
1349 for (
const StringRefNull used_lightgroup : used_lightgroups) {
1351 used_lightgroup.c_str(),
1372 ot->
name =
"Add Used Lightgroups";
1373 ot->
idname =
"SCENE_OT_view_layer_add_used_lightgroups";
1396 if (!used_lightgroups.
contains_as(lightgroup.name)) {
1415 ot->
name =
"Remove Unused Lightgroups";
1416 ot->
idname =
"SCENE_OT_view_layer_remove_unused_lightgroups";
1417 ot->
description =
"Remove all unused Light Groups";
1444 auto is_irradiance_volume = [](
Object *ob) ->
bool {
1451 auto irradiance_volume_setup = [&](
Object *ob) {
1462 if (is_irradiance_volume(ob)) {
1463 irradiance_volume_setup(ob);
1474 view_layer,
nullptr, ¶meters);
1475 for (
Object *ob : objects) {
1476 if (is_irradiance_volume(ob)) {
1477 irradiance_volume_setup(ob);
1484 if (is_irradiance_volume(active_ob)) {
1485 irradiance_volume_setup(active_ob);
1524 data->scene = scene;
1528 wm, win, bmain, view_layer, scene, probes,
data->report, scene->
r.
cfra, 0);
1529 if (wm_job ==
nullptr) {
1555 std::string report =
data->report;
1560 if (!report.empty()) {
1568 switch (event->
type) {
1600 bmain, view_layer, scene, probes, report, scene->
r.
cfra);
1608 if (!report.empty()) {
1624 "Only bake selected light probe volumes"},
1629 "Only bake the active light probe volume"},
1630 {0,
nullptr, 0,
nullptr,
nullptr},
1634 ot->
name =
"Bake Light Cache";
1635 ot->
idname =
"OBJECT_OT_lightprobe_cache_bake";
1636 ot->
description =
"Bake irradiance volume light cache";
1645 ot->
srna,
"subset", light_cache_subset_items, 0,
"Subset",
"Subset of probes to update");
1665 for (
Object *
object : probes) {
1666 if (
object->lightprobe_cache ==
nullptr) {
1685 "Delete all light probes' baked lighting data"},
1690 "Only delete selected light probes' baked lighting data"},
1695 "Only delete the active light probe's baked lighting data"},
1696 {0,
nullptr, 0,
nullptr,
nullptr},
1700 ot->
name =
"Delete Light Cache";
1701 ot->
idname =
"OBJECT_OT_lightprobe_cache_free";
1702 ot->
description =
"Delete cached indirect lighting";
1710 lightprobe_subset_items,
1713 "Subset of probes to update");
1749 ot->
name =
"Add Render View";
1750 ot->
idname =
"SCENE_OT_render_view_add";
1788 ot->
name =
"Remove Render View";
1789 ot->
idname =
"SCENE_OT_render_view_remove";
1790 ot->
description =
"Remove the selected render view";
1802#ifdef WITH_FREESTYLE
1808static bool freestyle_linestyle_check_report(FreestyleLineSet *lineset, ReportList *reports)
1813 "No active lineset and associated line style to manipulate the modifier");
1816 if (!lineset->linestyle) {
1819 "The active lineset does not have a line style (indicating data corruption)");
1826static bool freestyle_active_module_poll(
bContext *
C)
1831 return module != nullptr;
1849 ot->name =
"Add Freestyle Module";
1850 ot->idname =
"SCENE_OT_freestyle_module_add";
1851 ot->description =
"Add a style module into the list of modules";
1854 ot->exec = freestyle_module_add_exec;
1884 ot->name =
"Remove Freestyle Module";
1885 ot->idname =
"SCENE_OT_freestyle_module_remove";
1886 ot->description =
"Remove the style module from the stack";
1889 ot->poll = freestyle_active_module_poll;
1890 ot->exec = freestyle_module_remove_exec;
1921 {-1,
"UP", 0,
"Up",
""},
1922 {1,
"DOWN", 0,
"Down",
""},
1923 {0,
nullptr, 0,
nullptr,
nullptr},
1927 ot->
name =
"Move Freestyle Module";
1928 ot->idname =
"SCENE_OT_freestyle_module_move";
1929 ot->description =
"Change the position of the style module within in the list of style modules";
1932 ot->poll = freestyle_active_module_poll;
1933 ot->exec = freestyle_module_move_exec;
1944 "Direction to move the chosen style module towards");
1970 ot->name =
"Add Line Set";
1971 ot->idname =
"SCENE_OT_freestyle_lineset_add";
1972 ot->description =
"Add a line set into the list of line sets";
1975 ot->exec = freestyle_lineset_add_exec;
1987static bool freestyle_active_lineset_poll(
bContext *
C)
2010 ot->name =
"Copy Line Set";
2011 ot->idname =
"SCENE_OT_freestyle_lineset_copy";
2012 ot->description =
"Copy the active line set to the internal clipboard";
2015 ot->exec = freestyle_lineset_copy_exec;
2016 ot->poll = freestyle_active_lineset_poll;
2044 ot->name =
"Paste Line Set";
2045 ot->idname =
"SCENE_OT_freestyle_lineset_paste";
2046 ot->description =
"Paste the internal clipboard content to the active line set";
2049 ot->exec = freestyle_lineset_paste_exec;
2050 ot->poll = freestyle_active_lineset_poll;
2078 ot->name =
"Remove Line Set";
2079 ot->idname =
"SCENE_OT_freestyle_lineset_remove";
2080 ot->description =
"Remove the active line set from the list of line sets";
2083 ot->exec = freestyle_lineset_remove_exec;
2084 ot->poll = freestyle_active_lineset_poll;
2113 {-1,
"UP", 0,
"Up",
""},
2114 {1,
"DOWN", 0,
"Down",
""},
2115 {0,
nullptr, 0,
nullptr,
nullptr},
2119 ot->
name =
"Move Line Set";
2120 ot->idname =
"SCENE_OT_freestyle_lineset_move";
2121 ot->description =
"Change the position of the active line set within the list of line sets";
2124 ot->exec = freestyle_lineset_move_exec;
2125 ot->poll = freestyle_active_lineset_poll;
2136 "Direction to move the active line set towards");
2155 if (lineset->linestyle) {
2157 lineset->linestyle = id_cast<FreestyleLineStyle *>(
2172 ot->name =
"New Line Style";
2173 ot->idname =
"SCENE_OT_freestyle_linestyle_new";
2174 ot->description =
"Create a new line style, reusable by multiple line sets";
2177 ot->exec = freestyle_linestyle_new_exec;
2178 ot->poll = freestyle_active_lineset_poll;
2196 if (!freestyle_linestyle_check_report(lineset, op->reports)) {
2215 ot->name =
"Add Line Color Modifier";
2216 ot->idname =
"SCENE_OT_freestyle_color_modifier_add";
2218 "Add a line color modifier to the line style associated with the active lineset";
2222 ot->exec = freestyle_color_modifier_add_exec;
2223 ot->poll = freestyle_active_lineset_poll;
2245 if (!freestyle_linestyle_check_report(lineset, op->reports)) {
2264 ot->name =
"Add Alpha Transparency Modifier";
2265 ot->idname =
"SCENE_OT_freestyle_alpha_modifier_add";
2267 "Add an alpha transparency modifier to the line style associated with the active lineset";
2271 ot->exec = freestyle_alpha_modifier_add_exec;
2272 ot->poll = freestyle_active_lineset_poll;
2294 if (!freestyle_linestyle_check_report(lineset, op->reports)) {
2310void SCENE_OT_freestyle_thickness_modifier_add(
wmOperatorType *ot)
2313 ot->name =
"Add Line Thickness Modifier";
2314 ot->idname =
"SCENE_OT_freestyle_thickness_modifier_add";
2316 "Add a line thickness modifier to the line style associated with the active lineset";
2320 ot->exec = freestyle_thickness_modifier_add_exec;
2321 ot->poll = freestyle_active_lineset_poll;
2343 if (!freestyle_linestyle_check_report(lineset, op->reports)) {
2362 ot->name =
"Add Stroke Geometry Modifier";
2363 ot->idname =
"SCENE_OT_freestyle_geometry_modifier_add";
2365 "Add a stroke geometry modifier to the line style associated with the active lineset";
2369 ot->exec = freestyle_geometry_modifier_add_exec;
2370 ot->poll = freestyle_active_lineset_poll;
2386static int freestyle_get_modifier_type(
PointerRNA *ptr)
2410 if (!freestyle_linestyle_check_report(lineset, op->reports)) {
2414 switch (freestyle_get_modifier_type(&ptr)) {
2429 op->reports,
RPT_ERROR,
"The object the data pointer refers to is not a valid modifier");
2441 ot->name =
"Remove Modifier";
2442 ot->idname =
"SCENE_OT_freestyle_modifier_remove";
2443 ot->description =
"Remove the modifier from the list of modifiers";
2446 ot->exec = freestyle_modifier_remove_exec;
2447 ot->poll = freestyle_active_lineset_poll;
2466 if (!freestyle_linestyle_check_report(lineset, op->reports)) {
2470 switch (freestyle_get_modifier_type(&ptr)) {
2485 op->reports,
RPT_ERROR,
"The object the data pointer refers to is not a valid modifier");
2497 ot->name =
"Copy Modifier";
2498 ot->idname =
"SCENE_OT_freestyle_modifier_copy";
2499 ot->description =
"Duplicate the modifier within the list of modifiers";
2502 ot->exec = freestyle_modifier_copy_exec;
2503 ot->poll = freestyle_active_lineset_poll;
2522 bool changed =
false;
2524 if (!freestyle_linestyle_check_report(lineset, op->reports)) {
2528 switch (freestyle_get_modifier_type(&ptr)) {
2543 op->reports,
RPT_ERROR,
"The object the data pointer refers to is not a valid modifier");
2558 {-1,
"UP", 0,
"Up",
""},
2559 {1,
"DOWN", 0,
"Down",
""},
2560 {0,
nullptr, 0,
nullptr,
nullptr},
2564 ot->
name =
"Move Modifier";
2565 ot->idname =
"SCENE_OT_freestyle_modifier_move";
2566 ot->description =
"Move the modifier within the list of modifiers";
2569 ot->exec = freestyle_modifier_move_exec;
2570 ot->poll = freestyle_active_lineset_poll;
2581 "Direction to move the chosen modifier towards");
2606void SCENE_OT_freestyle_stroke_material_create(
wmOperatorType *ot)
2609 ot->name =
"Create Freestyle Stroke Material";
2610 ot->idname =
"SCENE_OT_freestyle_stroke_material_create";
2611 ot->description =
"Create Freestyle stroke material for testing";
2614 ot->exec = freestyle_stroke_material_create_exec;
2633 MTex **mtex_ar, *mtexswap;
2641 mtexswap = mtex_ar[act];
2642 mtex_ar[act] = mtex_ar[act - 1];
2643 mtex_ar[act - 1] = mtexswap;
2669 mtexswap = mtex_ar[act];
2670 mtex_ar[act] = mtex_ar[act + 1];
2671 mtex_ar[act + 1] = mtexswap;
2706 {-1,
"UP", 0,
"Up",
""},
2707 {1,
"DOWN", 0,
"Down",
""},
2708 {0,
nullptr, 0,
nullptr,
nullptr},
2712 ot->
name =
"Move Texture Slot";
2713 ot->
idname =
"TEXTURE_OT_slot_move";
2714 ot->
description =
"Move texture slots up and down";
2738 if (ma ==
nullptr) {
2746 "Cannot copy the linked material '%s' to the internal clipboard",
2757 "Cannot copy the linked packed material '%s' to the internal clipboard",
2769 PartialWriteContext::IDAddOperations::SET_CLIPBOARD_MARK |
2770 PartialWriteContext::IDAddOperations::ADD_DEPENDENCIES)},
2786 ot->
name =
"Copy Material";
2787 ot->
idname =
"MATERIAL_OT_copy";
2788 ot->
description =
"Copy the material settings and nodes";
2828 ListBaseT<ID> *lb =
which_libbase(bmain, (*id_p)->id_type());
2829 ID *id_local =
static_cast<ID *
>(
2849 if (ma ==
nullptr) {
2892 if (ma_from ==
nullptr) {
2899 if (ma->nodetree && ma_from->nodetree) {
2900 BLI_assert(ma_from->nodetree->adt ==
nullptr);
2901 std::swap(ma->nodetree->adt, ma_from->nodetree->adt);
2916 MEM_delete(nodetree);
2917 ma->nodetree =
nullptr;
2922#define SWAP_MEMBER(member) std::swap(ma->member, ma_from->member)
2963 ma->nodetree->owner_id =
nullptr;
2969 ma->nodetree->owner_id = &ma->id;
2993 ot->
name =
"Paste Material";
2994 ot->
idname =
"MATERIAL_OT_paste";
2995 ot->
description =
"Paste the material settings and nodes";
3021 MTex **mtex =
nullptr;
3023 switch (
id->id_type()) {
3026 (id_cast<ParticleSettings *>(
id))->mtex[int((id_cast<ParticleSettings *>(
id))->texact)]);
3029 mtex = &((id_cast<FreestyleLineStyle *>(
id))
3030 ->mtex[int((id_cast<FreestyleLineStyle *>(
id))->texact)]);
3036 if (mtex && *mtex) {
3047 MTex **mtex =
nullptr;
3053 switch (
id->id_type()) {
3056 (id_cast<ParticleSettings *>(
id))->mtex[int((id_cast<ParticleSettings *>(
id))->texact)]);
3059 mtex = &((id_cast<FreestyleLineStyle *>(
id))
3060 ->mtex[int((id_cast<FreestyleLineStyle *>(
id))->texact)]);
3068 if (*mtex ==
nullptr) {
3069 *mtex = MEM_new<MTex>(
"mtex copy");
3071 else if ((*mtex)->tex) {
3086 (*mtex)->tex =
nullptr;
3089 (*mtex)->object =
nullptr;
3106 if (
id ==
nullptr) {
3121 return (
id !=
nullptr);
3127 ot->
name =
"Copy Texture Slot Settings";
3128 ot->
idname =
"TEXTURE_OT_slot_copy";
3129 ot->
description =
"Copy the material texture settings and nodes";
3150 if (
id ==
nullptr) {
3172 else if (linestyle) {
3173 id = &linestyle->
id;
3176 if (
id ==
nullptr) {
3191 ot->
name =
"Paste Texture Slot Settings";
3192 ot->
idname =
"TEXTURE_OT_slot_paste";
3193 ot->
description =
"Paste the texture settings and nodes";
#define FOREACH_SCENE_OBJECT_END
#define FOREACH_SCENE_OBJECT_BEGIN(scene, _instance)
#define CTX_DATA_BEGIN(C, Type, instance, member)
#define FOREACH_OBJECT_END
#define FOREACH_OBJECT_BEGIN(_bmain, _scene, _view_layer, _instance)
General operations for probes.
Blender kernel freestyle line style functionality.
#define LS_MODIFIER_TYPE_COLOR
#define LS_MODIFIER_TYPE_ALPHA
#define LS_MODIFIER_TYPE_GEOMETRY
#define LS_MODIFIER_TYPE_THICKNESS
General operations, lookup, etc. for materials.
General operations, lookup, etc. for blender objects.
#define BLI_path_join(...)
#define BLT_I18NCONTEXT_ID_WORLD
#define CTX_DATA_(context, msgid)
ID and Library types, which are fundamental for SDNA.
#define ID_IS_PACKED(_id)
#define ID_IS_LINKED(_id)
#define ID_IS_EDITABLE(_id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
Object is a sort of wrapper for general info.
#define OB_TYPE_SUPPORT_MATERIAL(_type)
Read Blender memory allocation and freeing.
#define ND_RENDER_OPTIONS
#define ND_SHADING_PREVIEW
#define BLI_assert_unreachable()
#define BLI_assert_msg(a, msg)
#define BM_elem_flag_test(ele, hflag)
#define BM_ITER_MESH(ele, iter, bm, itype)
bool add_as(ForwardKey &&key)
bool contains_as(const ForwardKey &key) const
void append(const T &value)
ID * id_add(const ID *id, IDAddOptions options, FunctionRef< IDAddOperations(LibraryIDLinkCallbackData *cb_data, IDAddOptions options)> dependencies_filter_cb=nullptr)
bool write_as_copypaste_buffer(const char *write_filepath, ReportList &reports)
void fill_index_range(MutableSpan< T > span, const T start=0)
void node_tree_free_embedded_tree(bNodeTree *ntree)
internal::ShallowDataConstRef< T > shallow_copy(const T &other)
Object * context_object(const bContext *C)
Vector< Object * > objects_in_mode_or_selected(bContext *C, bool(*filter_fn)(const Object *ob, void *user_data), void *filter_user_data)
void node_tree_shader_default(const bContext *C, Main *bmain, ID *id)
void context_active_but_prop_get_templateID(const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop)
void SCENE_OT_view_layer_remove_lightgroup(wmOperatorType *ot)
LineStyleModifier * BKE_linestyle_geometry_modifier_add(FreestyleLineStyle *linestyle, const char *name, eLineStyleModifier_Type type)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
static bool copy_mtex_poll(bContext *C)
void id_lib_extern(ID *id, bool enforce_fix=false)
bool EDBM_deselect_by_material(BMesh *bm, short index, bool select)
void FRS_delete_active_lineset(struct FreestyleConfig *config)
wmOperatorStatus WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)
unsigned __int64 uint64_t
void OBJECT_OT_material_slot_remove(wmOperatorType *ot)
int RNA_enum_get(PointerRNA *ptr, const char *name)
static wmOperatorStatus material_slot_de_select(bContext *C, bool select)
void BKE_object_material_remap(Object *ob, const unsigned int *remap)
LineStyleModifier * BKE_linestyle_thickness_modifier_copy(FreestyleLineStyle *linestyle, const LineStyleModifier *m, int flag)
void BKE_ntree_update(Main &bmain, std::optional< Span< bNodeTree * > > modified_trees=std::nullopt, const NodeTreeUpdateExtraParams ¶ms={})
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
Main * BKE_copybuffer_read(Main &reference_bmain, const char *libname, ReportList *reports, uint64_t id_types_mask)
static wmOperatorStatus view_layer_remove_lightgroup_exec(bContext *C, wmOperator *)
void EEVEE_lightbake_update(void *job_data)
static bool object_array_for_shading_edit_mode_enabled_filter(const Object *ob, void *user_data)
static wmOperatorStatus new_texture_exec(bContext *C, wmOperator *op)
void OBJECT_OT_material_slot_move(wmOperatorType *ot)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
BMesh * BKE_editmesh_bmesh_get_for_write(Mesh *mesh)
void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr_value, ReportList *reports)
static wmOperatorStatus lightprobe_cache_bake_exec(bContext *C, wmOperator *op)
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
static void paste_mtex_copybuf(ID *id)
int BKE_object_material_remove_unused(Main *bmain, Object *ob)
void * MEM_new_array_uninitialized(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
bool BKE_object_material_slot_remove(Main *bmain, Object *ob)
short * BKE_object_material_len_p(Object *ob)
void BKE_ntree_update_tag_id_changed(Main *bmain, ID *id)
static bool view_layer_remove_poll(bContext *C)
static bool object_materials_supported_poll_ex(bContext *C, const Object *ob)
Material *** BKE_object_material_array_p(Object *ob)
bool ED_operator_object_active_local_editable_ex(bContext *C, const Object *ob)
ViewLayerLightgroup * BKE_view_layer_add_lightgroup(ViewLayer *view_layer, const char *name)
static Set< StringRefNull > get_used_lightgroups(Scene *scene)
Material * BKE_gpencil_material_add(Main *bmain, const char *name)
PointerRNA RNA_id_pointer_create(ID *id)
static wmOperatorStatus view_layer_add_aov_exec(bContext *C, wmOperator *)
static wmOperatorStatus paste_mtex_exec(bContext *C, wmOperator *)
bool BKE_object_material_slot_add(Main *bmain, Object *ob, bool set_active=true)
static Vector< Object * > object_array_for_shading_edit_mode_enabled(bContext *C)
Material * BKE_object_material_get(Object *ob, short act)
std::string RNA_path_number_to_infix(const int number)
static wmOperatorStatus view_layer_remove_aov_exec(bContext *C, wmOperator *)
int BKE_linestyle_thickness_modifier_remove(FreestyleLineStyle *linestyle, LineStyleModifier *modifier)
void BLI_string_replace_char(char *str, char src, char dst) ATTR_NONNULL(1)
void void BKE_libblock_remap(Main *bmain, void *old_idv, void *new_idv, int remap_flags) ATTR_NONNULL(1
static wmOperatorStatus lightprobe_cache_free_exec(bContext *C, wmOperator *op)
void MATERIAL_OT_paste(wmOperatorType *ot)
void OBJECT_OT_lightprobe_cache_bake(wmOperatorType *ot)
bool FRS_move_active_lineset(struct FreestyleConfig *config, int direction)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void * BLI_findstring(const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
static wmOperatorStatus view_layer_remove_exec(bContext *C, wmOperator *)
int BKE_object_material_index_get_with_hint(Object *ob, const Material *ma, int hint_index)
const EnumPropertyItem rna_enum_linestyle_thickness_modifier_type_items[]
static wmOperatorStatus material_slot_assign_exec(bContext *C, wmOperator *)
void SCENE_OT_render_view_remove(wmOperatorType *ot)
static wmOperatorStatus new_material_exec(bContext *C, wmOperator *)
wmWindow * CTX_wm_window(const bContext *C)
void BKE_object_material_active_index_sanitize(Object *ob)
@ ID_REMAP_FORCE_UI_POINTERS
void MATERIAL_OT_copy(wmOperatorType *ot)
const EnumPropertyItem rna_enum_linestyle_geometry_modifier_type_items[]
void SCENE_OT_view_layer_remove_aov(wmOperatorType *ot)
void BKE_view_layer_remove_aov(ViewLayer *view_layer, ViewLayerAOV *aov)
static bool render_view_remove_poll(bContext *C)
void TEXTURE_OT_new(wmOperatorType *ot)
bool ED_scene_view_layer_delete(Main *bmain, Scene *scene, ViewLayer *layer, ReportList *reports) ATTR_NONNULL(1
const char * BKE_id_name(const ID &id)
struct FreestyleLineSet * BKE_freestyle_lineset_add(struct Main *bmain, struct FreestyleConfig *config, const char *name)
void ED_undo_push_op(bContext *C, wmOperator *op)
static wmOperatorStatus lightprobe_cache_bake_invoke(bContext *C, wmOperator *op, const wmEvent *)
ViewLayer * WM_window_get_active_view_layer(const wmWindow *win)
static wmOperatorStatus lightprobe_cache_bake_modal(bContext *C, wmOperator *op, const wmEvent *event)
void SCENE_OT_view_layer_remove(wmOperatorType *ot)
static bool material_slot_populated_poll(bContext *C)
int BKE_linestyle_alpha_modifier_remove(FreestyleLineStyle *linestyle, LineStyleModifier *modifier)
static bool material_slot_remove_poll(bContext *C)
static wmOperatorStatus texture_slot_move_exec(bContext *C, wmOperator *op)
ViewLayer * CTX_data_view_layer(const bContext *C)
@ LIGHTCACHE_SUBSET_SELECTED
@ LIGHTCACHE_SUBSET_ACTIVE
void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job)
void BKE_animdata_fix_paths(ID &id, StringRef prefix, StringRef old_infix, StringRef new_infix, bool verify_paths, const DriverMap &driver_map)
static bool object_array_for_shading_edit_mode_disabled_filter(const Object *ob, void *user_data)
void RE_engine_free(RenderEngine *engine)
ViewLayerAOV * BKE_view_layer_add_aov(ViewLayer *view_layer)
static wmOperatorStatus material_slot_select_exec(bContext *C, wmOperator *)
LineStyleModifier * BKE_linestyle_color_modifier_copy(FreestyleLineStyle *linestyle, const LineStyleModifier *m, int flag)
bool BKE_linestyle_color_modifier_move(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
static int paste_material_nodetree_ids_relink_or_clear(LibraryIDLinkCallbackData *cb_data)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
bool ED_curve_nurb_select_check(const View3D *v3d, const Nurb *nu)
void CTX_wm_operator_poll_msg_set(bContext *C, const char *msg)
Scene * WM_window_get_active_scene(const wmWindow *win)
static wmOperatorStatus material_slot_add_exec(bContext *C, wmOperator *)
void SCENE_OT_view_layer_remove_unused_lightgroups(wmOperatorType *ot)
static wmOperatorStatus material_slot_remove_all_exec(bContext *C, wmOperator *op)
void OBJECT_OT_material_slot_add(wmOperatorType *ot)
const EnumPropertyItem rna_enum_linestyle_alpha_modifier_type_items[]
void DEG_id_tag_update(ID *id, unsigned int flags)
void BKE_report(ReportList *reports, eReportType type, const char *message)
bool give_active_mtex(struct ID *id, struct MTex ***mtex_ar, short *act)
BMesh const char void * data
bool WM_jobs_has_running(const wmWindowManager *window_manager, const void *owner, const eWM_JobType type, const eWM_JobFlag exclude_flags)
bool BKE_freestyle_module_move(struct FreestyleConfig *config, struct FreestyleModuleConfig *module_conf, int direction)
struct FreestyleLineSet * BKE_freestyle_lineset_get_active(struct FreestyleConfig *config)
wmWindowManager * CTX_wm_manager(const bContext *C)
static wmOperatorStatus material_slot_remove_exec(bContext *C, wmOperator *)
bool BKE_freestyle_module_delete(struct FreestyleConfig *config, struct FreestyleModuleConfig *module_conf)
static wmOperatorStatus paste_material_exec(bContext *C, wmOperator *op)
static void copy_mtex_copybuf(ID *id)
void BKE_view_layer_verify_aov(RenderEngine *engine, Scene *scene, ViewLayer *view_layer)
void BKE_main_ensure_invariants(Main &bmain, std::optional< Span< ID * > > modified_ids=std::nullopt)
static wmOperatorStatus material_slot_copy_exec(bContext *C, wmOperator *)
static wmOperatorStatus copy_material_exec(bContext *C, wmOperator *op)
static wmOperatorStatus view_layer_add_lightgroup_exec(bContext *C, wmOperator *op)
void MATERIAL_OT_new(wmOperatorType *ot)
static wmOperatorStatus render_view_add_exec(bContext *C, wmOperator *)
static wmOperatorStatus new_world_exec(bContext *C, wmOperator *)
wmJob * EEVEE_lightbake_job_create(wmWindowManager *wm, wmWindow *win, Main *bmain, ViewLayer *view_layer, Scene *scene, Vector< Object * > original_probes, std::string &report, int delay_ms, int frame)
void TEXTURE_OT_slot_paste(wmOperatorType *ot)
DriverMap BKE_animdata_build_driver_target_map(Main &bmain)
void OBJECT_OT_material_slot_remove_unused(wmOperatorType *ot)
FreestyleLineStyle * BKE_linestyle_new(struct Main *bmain, const char *name)
static Vector< Object * > object_array_for_shading_edit_mode_disabled(bContext *C)
static wmOperatorStatus copy_mtex_exec(bContext *C, wmOperator *)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
bool ED_paint_proj_mesh_data_check(Scene &scene, Object &ob, bool *r_has_uvs, bool *r_has_mat, bool *r_has_tex, bool *r_has_stencil)
static wmOperatorStatus render_view_remove_exec(bContext *C, wmOperator *)
void EEVEE_lightbake_job_data_free(void *job_data)
void BKE_lightprobe_cache_free(struct Object *object)
static void lightprobe_cache_bake_cancel(bContext *C, wmOperator *op)
void OBJECT_OT_material_slot_assign(wmOperatorType *ot)
void OBJECT_OT_material_slot_copy(wmOperatorType *ot)
void BKE_ntree_update_tag_all(bNodeTree *ntree)
const char * BKE_tempdir_base() ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
LineStyleModifier * BKE_linestyle_alpha_modifier_add(FreestyleLineStyle *linestyle, const char *name, eLineStyleModifier_Type type)
void TEXTURE_OT_slot_copy(wmOperatorType *ot)
static wmOperatorStatus material_slot_move_exec(bContext *C, wmOperator *op)
int BKE_vfont_select_get(const Curve *cu, int *r_start, int *r_end)
void ED_render_clear_mtex_copybuf()
void BKE_object_material_array_assign(Main *bmain, Object *ob, Material ***matar, int totcol, bool to_object_only)
void SCENE_OT_view_layer_add_lightgroup(wmOperatorType *ot)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
RenderEngineType * RE_engines_find(const char *idname)
Vector< Object * > BKE_view_layer_array_selected_objects_params(ViewLayer *view_layer, const View3D *v3d, const ObjectsInViewLayerParams *params)
void BKE_main_free(Main *bmain)
BMEditMesh * BKE_editmesh_from_object(Object *ob)
Return the BMEditMesh for a given object.
struct World * BKE_world_add(struct Main *bmain, const char *name)
bool BKE_object_is_in_editmode(const Object *ob)
static void material_copybuffer_filepath_get(char filepath[FILE_MAX], size_t filepath_maxncpy)
void BKE_view_layer_remove_lightgroup(ViewLayer *view_layer, ViewLayerLightgroup *lightgroup)
SceneRenderView * BKE_scene_add_render_view(Scene *sce, const char *name)
void id_us_ensure_real(ID *id)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
int BKE_object_material_remove_all(Main *bmain, Object *ob)
void WM_jobs_kill_type(wmWindowManager *wm, const void *owner, int job_type)
void OBJECT_OT_material_slot_select(wmOperatorType *ot)
RenderEngine * RE_engine_create(RenderEngineType *type)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void WORLD_OT_new(wmOperatorType *ot)
Main * CTX_data_main(const bContext *C)
void * EEVEE_lightbake_job_data_alloc(Main *bmain, ViewLayer *view_layer, Scene *scene, Vector< Object * > original_probes, std::string &report, int frame)
bool BKE_linestyle_thickness_modifier_move(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction)
void set_active_mtex(struct ID *id, short act)
Material ** BKE_object_material_get_p(Object *ob, short act)
LineStyleModifier * BKE_linestyle_thickness_modifier_add(FreestyleLineStyle *linestyle, const char *name, eLineStyleModifier_Type type)
FreestyleLineStyle * BKE_linestyle_active_from_view_layer(struct ViewLayer *view_layer)
void SCENE_OT_view_layer_add(wmOperatorType *ot)
struct FreestyleModuleConfig * BKE_freestyle_module_add(struct FreestyleConfig *config)
bool BKE_scene_remove_render_view(Scene *scene, SceneRenderView *srv)
struct Tex * BKE_texture_add(struct Main *bmain, const char *name)
const EnumPropertyItem rna_enum_linestyle_color_modifier_type_items[]
void SCENE_OT_view_layer_add_used_lightgroups(wmOperatorType *ot)
void BKE_id_move_to_same_lib(Main &bmain, ID &id, const ID &owner_id)
static int paste_material_nodetree_ids_decref(LibraryIDLinkCallbackData *cb_data)
ListBaseT< Nurb > * BKE_curve_editNurbs_get(Curve *cu)
void DEG_relations_tag_update(Main *bmain)
static wmOperatorStatus material_slot_deselect_exec(bContext *C, wmOperator *)
ViewLayer * BKE_view_layer_add(const Main *bmain, Scene *scene, const char *name, ViewLayer *view_layer_source, int type)
Scene * CTX_data_scene(const bContext *C)
Map< ID *, Vector< DriverTarget * > > DriverMap
bool BKE_linestyle_geometry_modifier_move(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction)
void OBJECT_OT_material_slot_remove_all(wmOperatorType *ot)
void OBJECT_OT_material_slot_deselect(wmOperatorType *ot)
void SCENE_OT_view_layer_add_aov(wmOperatorType *ot)
void FRS_copy_active_lineset(struct FreestyleConfig *config)
bool BKE_linestyle_alpha_modifier_move(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction)
void FRS_paste_active_lineset(struct FreestyleConfig *config)
void SCENE_OT_render_view_add(wmOperatorType *ot)
std::string RNA_string_get(PointerRNA *ptr, const char *name)
ID * BKE_id_copy_ex(Main *bmain, const ID *id, ID **new_id_p, int flag)
LineStyleModifier * BKE_linestyle_color_modifier_add(FreestyleLineStyle *linestyle, const char *name, eLineStyleModifier_Type type)
Material * BKE_material_add(Main *bmain, const char *name)
static wmOperatorStatus view_layer_add_exec(bContext *C, wmOperator *op)
void TEXTURE_OT_slot_move(wmOperatorType *ot)
int BKE_linestyle_color_modifier_remove(FreestyleLineStyle *linestyle, LineStyleModifier *modifier)
static wmOperatorStatus material_slot_remove_unused_exec(bContext *C, wmOperator *op)
static wmOperatorStatus view_layer_add_used_lightgroups_exec(bContext *C, wmOperator *)
struct Material * FRS_create_stroke_material(struct Main *bmain, struct FreestyleLineStyle *linestyle)
LineStyleModifier * BKE_linestyle_geometry_modifier_copy(FreestyleLineStyle *linestyle, const LineStyleModifier *m, int flag)
void EEVEE_lightbake_job(void *job_data, wmJobWorkerStatus *worker_status)
void WM_cursor_wait(bool val)
ID * BKE_id_copy(Main *bmain, const ID *id)
static wmOperatorStatus view_layer_remove_unused_lightgroups_exec(bContext *C, wmOperator *)
void OBJECT_OT_lightprobe_cache_free(wmOperatorType *ot)
Object * CTX_data_active_object(const bContext *C)
LineStyleModifier * BKE_linestyle_alpha_modifier_copy(FreestyleLineStyle *linestyle, const LineStyleModifier *m, int flag)
void BKE_library_foreach_ID_link(Main *bmain, ID *id, FunctionRef< LibraryIDLinkCallback > callback, void *user_data, LibraryForeachIDFlag flag)
PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type)
View3D * CTX_wm_view3d(const bContext *C)
void BKE_lightprobe_cache_create(struct Object *object)
void WM_window_set_active_view_layer(wmWindow *win, ViewLayer *view_layer)
void * MEM_new_array_zeroed(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
ListBaseT< ID > * which_libbase(Main *bmain, short type)
int BKE_linestyle_geometry_modifier_remove(FreestyleLineStyle *linestyle, LineStyleModifier *modifier)
static bool object_materials_supported_poll(bContext *C)
static Vector< Object * > lightprobe_cache_irradiance_volume_subset_get(bContext *C, wmOperator *op)
#define SWAP_MEMBER(member)
struct EditFont * editfont
LibraryForeachIDCallbackFlag cb_flag
ListBaseT< Material > materials
bool(*) filter_fn(const Object *ob, void *user_data)
ListBaseT< SceneRenderView > views
void(*) update_render_passes(struct RenderEngine *engine, struct Scene *scene, struct ViewLayer *view_layer)
ListBaseT< ViewLayer > view_layers
ListBaseT< ViewLayerLightgroup > lightgroups
ViewLayerAOV * active_aov
ViewLayerLightgroup * active_lightgroup
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void(*) cancel(bContext *C, wmOperator *op)
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) modal(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports