92#include "RNA_prototypes.hh"
171 const ID *data =
static_cast<ID *
>(ob->
data);
214 ot->
name =
"Add Material Slot";
215 ot->
idname =
"OBJECT_OT_material_slot_add";
265 ot->
name =
"Remove Material Slot";
266 ot->
idname =
"OBJECT_OT_material_slot_remove";
286 bool changed_multi =
false;
292 for (
Object *ob : objects) {
293 short mat_nr_active = -1;
295 if (ob->totcol == 0) {
301 mat_nr_active = obact->
actcol - 1;
306 for (
int i = 0; i < ob->totcol; i++) {
308 if (mat_active == mat) {
313 if (mat_nr_active == -1) {
318 bool changed =
false;
328 efa->
mat_nr = mat_nr_active;
340 nu->mat_nr = mat_nr_active;
345 else if (ob->type ==
OB_FONT) {
347 int i, selstart, selend;
350 for (i = selstart; i <= selend; i++) {
358 changed_multi =
true;
370 ot->
name =
"Assign Material Slot";
371 ot->
idname =
"OBJECT_OT_material_slot_assign";
372 ot->
description =
"Assign active material slot to selection";
390 bool changed_multi =
false;
395 for (
Object *ob : objects) {
396 if (ob->totcol == 0) {
401 ob, mat_active, obact ? obact->
actcol - 1 : -1);
403 if (mat_nr_active == -1) {
407 bool changed =
false;
424 if (nu->mat_nr == mat_nr_active) {
429 if (bezt->
hide == 0) {
446 a = nu->pntsu * nu->pntsv;
467 changed_multi =
true;
484 ot->
name =
"Select Material Slot";
485 ot->
idname =
"OBJECT_OT_material_slot_select";
503 ot->
name =
"Deselect Material Slot";
504 ot->
idname =
"OBJECT_OT_material_slot_deselect";
536 for (
int i = ob->
totcol; i--;) {
537 matar[i] = ob->
matbits[i] ? (*matar_object)[i] : (*matar_obdata)[i];
544 const bool is_same_obdata = ob->
data == ob_iter->data;
549 if (is_same_obdata) {
550 for (
int i = ob->
totcol; i--;) {
552 ob_iter->matbits[i] = ob->
matbits[i];
559 if (ob_iter->totcol == ob->
totcol) {
560 ob_iter->actcol = ob->
actcol;
576 ot->
name =
"Copy Material to Selected";
577 ot->
idname =
"OBJECT_OT_material_slot_copy";
602 if (!ob || ob->
totcol < 2) {
607 if (dir == 1 && ob->
actcol > 1) {
608 index_pair[0] = ob->
actcol - 2;
609 index_pair[1] = ob->
actcol - 1;
614 index_pair[0] = ob->
actcol - 1;
615 index_pair[1] = ob->
actcol - 0;
626 slot_remap[index_pair[0]] = index_pair[1];
627 slot_remap[index_pair[1]] = index_pair[0];
643 {1,
"UP", 0,
"Up",
""},
644 {-1,
"DOWN", 0,
"Down",
""},
645 {0,
nullptr, 0,
nullptr,
nullptr},
649 ot->
name =
"Move Material";
650 ot->
idname =
"OBJECT_OT_material_slot_move";
651 ot->
description =
"Move the active material up/down in the list";
665 "Direction to move the active material towards");
687 for (
Object *ob : objects) {
688 int actcol = ob->actcol;
689 for (
int slot = 1; slot <= ob->totcol; slot++) {
694 if (actcol >= slot) {
728 ot->
name =
"Remove Unused Slots";
729 ot->
idname =
"OBJECT_OT_material_slot_remove_unused";
767 const char *name =
DATA_(
"Material");
808 ot->
name =
"New Material";
967 {
VIEWLAYER_ADD_COPY,
"COPY", 0,
"Copy Settings",
"Copy settings of current view layer"},
972 "Add a new view layer with all collections disabled"},
973 {0,
nullptr, 0,
nullptr,
nullptr},
977 ot->
name =
"Add View Layer";
978 ot->
idname =
"SCENE_OT_view_layer_add";
1001 return (scene->view_layers.first != scene->view_layers.last);
1022 ot->
name =
"Remove View Layer";
1023 ot->
idname =
"SCENE_OT_view_layer_remove";
1057 if (scene->nodetree) {
1072 ot->
idname =
"SCENE_OT_view_layer_add_aov";
1109 if (scene->nodetree) {
1124 ot->
idname =
"SCENE_OT_view_layer_remove_aov";
1153 if (
STREQ(lightgroup->name, name)) {
1161 if (scene->nodetree) {
1175 ot->
name =
"Add Lightgroup";
1176 ot->
idname =
"SCENE_OT_view_layer_add_lightgroup";
1191 "Name of newly created lightgroup");
1211 if (scene->nodetree) {
1225 ot->
name =
"Remove Lightgroup";
1226 ot->
idname =
"SCENE_OT_view_layer_remove_lightgroup";
1247 if (ob->lightgroup && ob->lightgroup->name[0]) {
1253 if (scene->world && scene->world->lightgroup && scene->world->lightgroup->name[0]) {
1254 BLI_gset_add(used_lightgroups, scene->world->lightgroup->name);
1257 return used_lightgroups;
1276 if (scene->nodetree) {
1290 ot->
name =
"Add Used Lightgroups";
1291 ot->
idname =
"SCENE_OT_view_layer_add_used_lightgroups";
1320 if (scene->nodetree) {
1334 ot->
name =
"Remove Unused Lightgroups";
1335 ot->
idname =
"SCENE_OT_view_layer_remove_unused_lightgroups";
1363 auto is_irradiance_volume = [](
Object *ob) ->
bool {
1370 auto irradiance_volume_setup = [&](
Object *ob) {
1381 if (is_irradiance_volume(ob)) {
1382 irradiance_volume_setup(ob);
1394 for (
Object *ob : objects) {
1395 if (is_irradiance_volume(ob)) {
1396 irradiance_volume_setup(ob);
1403 if (is_irradiance_volume(active_ob)) {
1404 irradiance_volume_setup(active_ob);
1440 data->scene =
scene;
1444 wm, win, bmain, view_layer, scene, probes, data->report, scene->r.cfra, 0);
1460 Scene *scene = data->scene;
1464 std::string report = data->report;
1469 if (!report.empty()) {
1477 switch (event->
type) {
1506 bmain, view_layer, scene, probes, report, scene->r.cfra);
1514 if (!report.empty()) {
1530 "Only bake selected light probe volumes"},
1535 "Only bake the active light probe volume"},
1536 {0,
nullptr, 0,
nullptr,
nullptr},
1540 ot->
name =
"Bake Light Cache";
1541 ot->
idname =
"OBJECT_OT_lightprobe_cache_bake";
1551 ot->
srna,
"subset", light_cache_subset_items, 0,
"Subset",
"Subset of probes to update");
1571 for (
Object *
object : probes) {
1572 if (object->lightprobe_cache ==
nullptr) {
1591 "Delete all light probes' baked lighting data"},
1596 "Only delete selected light probes' baked lighting data"},
1601 "Only delete the active light probe's baked lighting data"},
1602 {0,
nullptr, 0,
nullptr,
nullptr},
1606 ot->
name =
"Delete Light Cache";
1607 ot->
idname =
"OBJECT_OT_lightprobe_cache_free";
1616 lightprobe_subset_items,
1619 "Subset of probes to update");
1633 return scene->r.actview > 1;
1655 ot->
name =
"Add Render View";
1656 ot->
idname =
"SCENE_OT_render_view_add";
1694 ot->
name =
"Remove Render View";
1695 ot->
idname =
"SCENE_OT_render_view_remove";
1708#ifdef WITH_FREESTYLE
1719 "No active lineset and associated line style to manipulate the modifier");
1725 "The active lineset does not have a line style (indicating data corruption)");
1732static bool freestyle_active_module_poll(
bContext *C)
1737 return module != nullptr;
1755 ot->
name =
"Add Freestyle Module";
1756 ot->
idname =
"SCENE_OT_freestyle_module_add";
1757 ot->
description =
"Add a style module into the list of modules";
1760 ot->
exec = freestyle_module_add_exec;
1790 ot->
name =
"Remove Freestyle Module";
1791 ot->
idname =
"SCENE_OT_freestyle_module_remove";
1795 ot->
poll = freestyle_active_module_poll;
1796 ot->
exec = freestyle_module_remove_exec;
1827 {-1,
"UP", 0,
"Up",
""},
1828 {1,
"DOWN", 0,
"Down",
""},
1829 {0,
nullptr, 0,
nullptr,
nullptr},
1833 ot->
name =
"Move Freestyle Module";
1834 ot->
idname =
"SCENE_OT_freestyle_module_move";
1835 ot->
description =
"Change the position of the style module within in the list of style modules";
1838 ot->
poll = freestyle_active_module_poll;
1839 ot->
exec = freestyle_module_move_exec;
1850 "Direction to move the chosen style module towards");
1876 ot->
name =
"Add Line Set";
1877 ot->
idname =
"SCENE_OT_freestyle_lineset_add";
1878 ot->
description =
"Add a line set into the list of line sets";
1881 ot->
exec = freestyle_lineset_add_exec;
1893static bool freestyle_active_lineset_poll(
bContext *C)
1916 ot->
name =
"Copy Line Set";
1917 ot->
idname =
"SCENE_OT_freestyle_lineset_copy";
1918 ot->
description =
"Copy the active line set to the internal clipboard";
1921 ot->
exec = freestyle_lineset_copy_exec;
1922 ot->
poll = freestyle_active_lineset_poll;
1950 ot->
name =
"Paste Line Set";
1951 ot->
idname =
"SCENE_OT_freestyle_lineset_paste";
1952 ot->
description =
"Paste the internal clipboard content to the active line set";
1955 ot->
exec = freestyle_lineset_paste_exec;
1956 ot->
poll = freestyle_active_lineset_poll;
1984 ot->
name =
"Remove Line Set";
1985 ot->
idname =
"SCENE_OT_freestyle_lineset_remove";
1986 ot->
description =
"Remove the active line set from the list of line sets";
1989 ot->
exec = freestyle_lineset_remove_exec;
1990 ot->
poll = freestyle_active_lineset_poll;
2019 {-1,
"UP", 0,
"Up",
""},
2020 {1,
"DOWN", 0,
"Down",
""},
2021 {0,
nullptr, 0,
nullptr,
nullptr},
2025 ot->
name =
"Move Line Set";
2026 ot->
idname =
"SCENE_OT_freestyle_lineset_move";
2027 ot->
description =
"Change the position of the active line set within the list of line sets";
2030 ot->
exec = freestyle_lineset_move_exec;
2031 ot->
poll = freestyle_active_lineset_poll;
2042 "Direction to move the active line set towards");
2077 ot->
name =
"New Line Style";
2078 ot->
idname =
"SCENE_OT_freestyle_linestyle_new";
2079 ot->
description =
"Create a new line style, reusable by multiple line sets";
2082 ot->
exec = freestyle_linestyle_new_exec;
2083 ot->
poll = freestyle_active_lineset_poll;
2101 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2118 ot->
name =
"Add Line Color Modifier";
2119 ot->
idname =
"SCENE_OT_freestyle_color_modifier_add";
2121 "Add a line color modifier to the line style associated with the active lineset";
2125 ot->
exec = freestyle_color_modifier_add_exec;
2126 ot->
poll = freestyle_active_lineset_poll;
2148 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2165 ot->
name =
"Add Alpha Transparency Modifier";
2166 ot->
idname =
"SCENE_OT_freestyle_alpha_modifier_add";
2168 "Add an alpha transparency modifier to the line style associated with the active lineset";
2172 ot->
exec = freestyle_alpha_modifier_add_exec;
2173 ot->
poll = freestyle_active_lineset_poll;
2195 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2212 ot->
name =
"Add Line Thickness Modifier";
2213 ot->
idname =
"SCENE_OT_freestyle_thickness_modifier_add";
2215 "Add a line thickness modifier to the line style associated with the active lineset";
2219 ot->
exec = freestyle_thickness_modifier_add_exec;
2220 ot->
poll = freestyle_active_lineset_poll;
2242 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2259 ot->
name =
"Add Stroke Geometry Modifier";
2260 ot->
idname =
"SCENE_OT_freestyle_geometry_modifier_add";
2262 "Add a stroke geometry modifier to the line style associated with the active lineset";
2266 ot->
exec = freestyle_geometry_modifier_add_exec;
2267 ot->
poll = freestyle_active_lineset_poll;
2307 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2311 switch (freestyle_get_modifier_type(&
ptr)) {
2326 op->
reports,
RPT_ERROR,
"The object the data pointer refers to is not a valid modifier");
2338 ot->
name =
"Remove Modifier";
2339 ot->
idname =
"SCENE_OT_freestyle_modifier_remove";
2340 ot->
description =
"Remove the modifier from the list of modifiers";
2343 ot->
exec = freestyle_modifier_remove_exec;
2344 ot->
poll = freestyle_active_lineset_poll;
2363 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2367 switch (freestyle_get_modifier_type(&
ptr)) {
2382 op->
reports,
RPT_ERROR,
"The object the data pointer refers to is not a valid modifier");
2394 ot->
name =
"Copy Modifier";
2395 ot->
idname =
"SCENE_OT_freestyle_modifier_copy";
2396 ot->
description =
"Duplicate the modifier within the list of modifiers";
2399 ot->
exec = freestyle_modifier_copy_exec;
2400 ot->
poll = freestyle_active_lineset_poll;
2419 bool changed =
false;
2421 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2425 switch (freestyle_get_modifier_type(&
ptr)) {
2440 op->
reports,
RPT_ERROR,
"The object the data pointer refers to is not a valid modifier");
2455 {-1,
"UP", 0,
"Up",
""},
2456 {1,
"DOWN", 0,
"Down",
""},
2457 {0,
nullptr, 0,
nullptr,
nullptr},
2461 ot->
name =
"Move Modifier";
2462 ot->
idname =
"SCENE_OT_freestyle_modifier_move";
2463 ot->
description =
"Move the modifier within the list of modifiers";
2466 ot->
exec = freestyle_modifier_move_exec;
2467 ot->
poll = freestyle_active_lineset_poll;
2478 "Direction to move the chosen modifier towards");
2506 ot->
name =
"Create Freestyle Stroke Material";
2507 ot->
idname =
"SCENE_OT_freestyle_stroke_material_create";
2508 ot->
description =
"Create Freestyle stroke material for testing";
2511 ot->
exec = freestyle_stroke_material_create_exec;
2530 MTex **mtex_ar, *mtexswap;
2539 mtexswap = mtex_ar[act];
2540 mtex_ar[act] = mtex_ar[act - 1];
2541 mtex_ar[act - 1] = mtexswap;
2544 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, act - 1, -1,
false);
2546 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, act, act - 1,
false);
2548 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, -1, act,
false);
2555 mtexswap = mtex_ar[act];
2556 mtex_ar[act] = mtex_ar[act + 1];
2557 mtex_ar[act + 1] = mtexswap;
2560 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, act + 1, -1,
false);
2562 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, act, act + 1,
false);
2564 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, -1, act,
false);
2580 {-1,
"UP", 0,
"Up",
""},
2581 {1,
"DOWN", 0,
"Down",
""},
2582 {0,
nullptr, 0,
nullptr,
nullptr},
2586 ot->
name =
"Move Texture Slot";
2587 ot->
idname =
"TEXTURE_OT_slot_move";
2612 if (ma ==
nullptr) {
2622 PartialWriteContext::IDAddOperations::SET_FAKE_USER |
2623 PartialWriteContext::IDAddOperations::SET_CLIPBOARD_MARK |
2624 PartialWriteContext::IDAddOperations::ADD_DEPENDENCIES)},
2629 copybuffer.write(filepath, *op->
reports);
2640 ot->
name =
"Copy Material";
2682 ID *id_local =
static_cast<ID *
>(
2702 if (ma ==
nullptr) {
2749 if (ma_from ==
nullptr) {
2779#define SWAP_MEMBER(member) std::swap(ma->member, ma_from->member)
2851 ot->
name =
"Paste Material";
2879 MTex **mtex =
nullptr;
2881 switch (
GS(id->name)) {
2892 if (mtex && *mtex) {
2903 MTex **mtex =
nullptr;
2909 switch (
GS(id->name)) {
2922 if (*mtex ==
nullptr) {
2925 else if ((*mtex)->tex) {
2940 (*mtex)->tex =
nullptr;
2943 (*mtex)->object =
nullptr;
2960 if (
id ==
nullptr) {
2975 return (
id !=
nullptr);
2981 ot->
name =
"Copy Texture Slot Settings";
2982 ot->
idname =
"TEXTURE_OT_slot_copy";
2983 ot->
description =
"Copy the material texture settings and nodes";
3004 if (
id ==
nullptr) {
3030 if (
id ==
nullptr) {
3045 ot->
name =
"Paste Texture Slot Settings";
3046 ot->
idname =
"TEXTURE_OT_slot_paste";
AnimData * BKE_animdata_from_id(const ID *id)
void BKE_animdata_fix_paths_rename(struct ID *owner_id, struct AnimData *adt, struct ID *ref_id, const char *prefix, const char *oldName, const char *newName, int oldSubscript, int newSubscript, bool verify_paths)
const char * BKE_tempdir_base() ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
bool BKE_copybuffer_read(Main *bmain_dst, const char *libname, ReportList *reports, uint64_t id_types_mask)
#define FOREACH_SCENE_OBJECT_END
#define FOREACH_SCENE_OBJECT_BEGIN(scene, _instance)
#define CTX_DATA_BEGIN(C, Type, instance, member)
PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type)
wmWindow * CTX_wm_window(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Object * CTX_data_edit_object(const bContext *C)
Main * CTX_data_main(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
View3D * CTX_wm_view3d(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
ListBase * BKE_curve_editNurbs_get(Curve *cu)
BMEditMesh * BKE_editmesh_from_object(Object *ob)
Return the BMEditMesh for a given object.
struct FreestyleModuleConfig * BKE_freestyle_module_add(struct FreestyleConfig *config)
struct FreestyleLineSet * BKE_freestyle_lineset_add(struct Main *bmain, struct FreestyleConfig *config, const char *name)
struct FreestyleLineSet * BKE_freestyle_lineset_get_active(struct FreestyleConfig *config)
bool BKE_freestyle_module_move(struct FreestyleConfig *config, struct FreestyleModuleConfig *module_conf, int direction)
bool BKE_freestyle_module_delete(struct FreestyleConfig *config, struct FreestyleModuleConfig *module_conf)
ViewLayerLightgroup * BKE_view_layer_add_lightgroup(ViewLayer *view_layer, const char *name)
void BKE_view_layer_remove_aov(ViewLayer *view_layer, ViewLayerAOV *aov)
void BKE_view_layer_remove_lightgroup(ViewLayer *view_layer, ViewLayerLightgroup *lightgroup)
#define FOREACH_OBJECT_END
#define FOREACH_OBJECT_BEGIN(scene, view_layer, _instance)
void BKE_view_layer_verify_aov(RenderEngine *engine, Scene *scene, ViewLayer *view_layer)
blender::Vector< Object * > BKE_view_layer_array_selected_objects_params(ViewLayer *view_layer, const View3D *v3d, const ObjectsInViewLayerParams *params)
ViewLayer * BKE_view_layer_add(Scene *scene, const char *name, ViewLayer *view_layer_source, int type)
ViewLayerAOV * BKE_view_layer_add_aov(ViewLayer *view_layer)
void id_lib_extern(ID *id)
void BKE_id_move_to_same_lib(Main &bmain, ID &id, const ID &owner_id)
void id_us_ensure_real(ID *id)
ID * BKE_id_copy_ex(Main *bmain, const ID *id, ID **new_id_p, int flag)
ID * BKE_id_copy(Main *bmain, const ID *id)
void BKE_library_foreach_ID_link(Main *bmain, ID *id, blender::FunctionRef< LibraryIDLinkCallback > callback, void *user_data, int flag)
@ ID_REMAP_FORCE_UI_POINTERS
void void BKE_libblock_remap(Main *bmain, void *old_idv, void *new_idv, int remap_flags) ATTR_NONNULL(1
General operations for probes.
void BKE_lightprobe_cache_free(struct Object *object)
void BKE_lightprobe_cache_create(struct Object *object)
Blender kernel freestyle line style functionality.
FreestyleLineStyle * BKE_linestyle_new(struct Main *bmain, const char *name)
int BKE_linestyle_alpha_modifier_remove(FreestyleLineStyle *linestyle, LineStyleModifier *modifier)
int BKE_linestyle_color_modifier_remove(FreestyleLineStyle *linestyle, LineStyleModifier *modifier)
LineStyleModifier * BKE_linestyle_geometry_modifier_copy(FreestyleLineStyle *linestyle, const LineStyleModifier *m, int flag)
LineStyleModifier * BKE_linestyle_thickness_modifier_copy(FreestyleLineStyle *linestyle, const LineStyleModifier *m, int flag)
bool BKE_linestyle_thickness_modifier_move(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction)
LineStyleModifier * BKE_linestyle_geometry_modifier_add(FreestyleLineStyle *linestyle, const char *name, int type)
#define LS_MODIFIER_TYPE_COLOR
#define LS_MODIFIER_TYPE_ALPHA
bool BKE_linestyle_color_modifier_move(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction)
LineStyleModifier * BKE_linestyle_alpha_modifier_add(FreestyleLineStyle *linestyle, const char *name, int type)
FreestyleLineStyle * BKE_linestyle_active_from_view_layer(struct ViewLayer *view_layer)
LineStyleModifier * BKE_linestyle_color_modifier_add(FreestyleLineStyle *linestyle, const char *name, int type)
int BKE_linestyle_thickness_modifier_remove(FreestyleLineStyle *linestyle, LineStyleModifier *modifier)
#define LS_MODIFIER_TYPE_GEOMETRY
bool BKE_linestyle_alpha_modifier_move(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction)
bool BKE_linestyle_geometry_modifier_move(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction)
LineStyleModifier * BKE_linestyle_color_modifier_copy(FreestyleLineStyle *linestyle, const LineStyleModifier *m, int flag)
#define LS_MODIFIER_TYPE_THICKNESS
LineStyleModifier * BKE_linestyle_thickness_modifier_add(FreestyleLineStyle *linestyle, const char *name, int type)
LineStyleModifier * BKE_linestyle_alpha_modifier_copy(FreestyleLineStyle *linestyle, const LineStyleModifier *m, int flag)
int BKE_linestyle_geometry_modifier_remove(FreestyleLineStyle *linestyle, LineStyleModifier *modifier)
ListBase * which_libbase(Main *bmain, short type)
Main * BKE_main_new(void)
void BKE_main_free(Main *bmain)
const char * BKE_main_blendfile_path(const Main *bmain) ATTR_NONNULL()
const char * BKE_main_blendfile_path_from_global()
General operations, lookup, etc. for materials.
bool BKE_object_material_slot_remove(struct Main *bmain, struct Object *ob)
struct Material * BKE_gpencil_material_add(struct Main *bmain, const char *name)
struct Material * BKE_object_material_get(struct Object *ob, short act)
bool BKE_object_material_slot_used(struct Object *object, short actcol)
short * BKE_object_material_len_p(struct Object *ob)
struct Material *** BKE_object_material_array_p(struct Object *ob)
void BKE_object_material_array_assign(struct Main *bmain, struct Object *ob, struct Material ***matar, int totcol, bool to_object_only)
struct Material * BKE_material_add(struct Main *bmain, const char *name)
void BKE_object_material_remap(struct Object *ob, const unsigned int *remap)
bool BKE_object_material_slot_add(struct Main *bmain, struct Object *ob)
struct Material ** BKE_object_material_get_p(struct Object *ob, short act)
int BKE_object_material_index_get_with_hint(Object *ob, const Material *ma, int hint_index)
void BKE_ntree_update_tag_all(bNodeTree *ntree)
void BKE_ntree_update_tag_id_changed(Main *bmain, ID *id)
General operations, lookup, etc. for blender objects.
bool BKE_object_is_in_editmode(const Object *ob)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
bool BKE_scene_remove_render_view(Scene *scene, SceneRenderView *srv)
SceneRenderView * BKE_scene_add_render_view(Scene *sce, const char *name)
bool give_active_mtex(struct ID *id, struct MTex ***mtex_ar, short *act)
void set_active_mtex(struct ID *id, short act)
struct Tex * BKE_texture_add(struct Main *bmain, const char *name)
int BKE_vfont_select_get(Object *ob, int *r_start, int *r_end)
struct World * BKE_world_add(struct Main *bmain, const char *name)
#define BLI_assert_unreachable()
#define BLI_assert_msg(a, msg)
#define GSET_FOREACH_END()
bool BLI_gset_haskey(const GSet *gs, const void *key) ATTR_WARN_UNUSED_RESULT
GSet * BLI_gset_str_new(const char *info)
#define GSET_FOREACH_BEGIN(type, var, what)
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
bool BLI_gset_add(GSet *gs, void *key)
void * BLI_findstring(const struct ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void range_vn_u(unsigned int *array_tar, int size, unsigned int start)
#define BLI_path_join(...)
#define STRNCPY(dst, src)
void BLI_string_replace_char(char *str, char src, char dst) ATTR_NONNULL(1)
#define BLT_I18NCONTEXT_ID_WORLD
#define CTX_DATA_(context, msgid)
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
ID and Library types, which are fundamental for SDNA.
#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)
bool EDBM_deselect_by_material(BMEditMesh *em, short index, bool select)
void ED_node_tree_propagate_change(const bContext *C, Main *bmain, bNodeTree *ntree)
void ED_node_shader_default(const bContext *C, ID *id)
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)
bool ED_scene_view_layer_delete(Main *bmain, Scene *scene, ViewLayer *layer, ReportList *reports) ATTR_NONNULL(1
bool ED_operator_object_active_local_editable_ex(bContext *C, const Object *ob)
bool FRS_move_active_lineset(struct FreestyleConfig *config, int direction)
void FRS_paste_active_lineset(struct FreestyleConfig *config)
struct Material * FRS_create_stroke_material(struct Main *bmain, struct FreestyleLineStyle *linestyle)
void FRS_copy_active_lineset(struct FreestyleConfig *config)
void FRS_delete_active_lineset(struct FreestyleConfig *config)
Read Guarded memory(de)allocation.
void UI_context_active_but_prop_get_templateID(const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop)
#define ND_RENDER_OPTIONS
#define ND_SHADING_PREVIEW
#define BM_elem_flag_test(ele, hflag)
#define BM_ITER_MESH(ele, iter, bm, itype)
void append(const T &value)
ID * id_add(const ID *id, IDAddOptions options, blender::FunctionRef< IDAddOperations(LibraryIDLinkCallbackData *cb_data, IDAddOptions options)> dependencies_filter_cb=nullptr)
local_group_size(16, 16) .push_constant(Type b
FreestyleLineStyle linestyle
bool ED_curve_nurb_select_check(const View3D *v3d, const Nurb *nu)
void EEVEE_NEXT_lightbake_job(void *job_data, wmJobWorkerStatus *worker_status)
void EEVEE_NEXT_lightbake_update(void *job_data)
void EEVEE_NEXT_lightbake_job_data_free(void *job_data)
wmJob * EEVEE_NEXT_lightbake_job_create(wmWindowManager *wm, wmWindow *win, Main *bmain, ViewLayer *view_layer, Scene *scene, blender::Vector< Object * > original_probes, std::string &report, int delay_ms, int frame)
void * EEVEE_NEXT_lightbake_job_data_alloc(Main *bmain, ViewLayer *view_layer, Scene *scene, blender::Vector< Object * > original_probes, std::string &report, int frame)
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
RenderEngineType * RE_engines_find(const char *idname)
RenderEngine * RE_engine_create(RenderEngineType *type)
void RE_engine_free(RenderEngine *engine)
double parameters[NUM_PARAMETERS]
void *(* MEM_mallocN)(size_t len, const char *str)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
ccl_device_inline float4 select(const int4 mask, const float4 a, const float4 b)
void node_tree_free_embedded_tree(bNodeTree *ntree)
Object * context_object(const bContext *C)
blender::Vector< Object * > objects_in_mode_or_selected(bContext *C, bool(*filter_fn)(const Object *ob, void *user_data), void *filter_user_data)
void ntreeCompositUpdateRLayers(bNodeTree *ntree)
static struct PyModuleDef module
static int material_slot_copy_exec(bContext *C, wmOperator *)
void ED_render_clear_mtex_copybuf()
static GSet * get_used_lightgroups(Scene *scene)
void OBJECT_OT_material_slot_add(wmOperatorType *ot)
void OBJECT_OT_material_slot_deselect(wmOperatorType *ot)
static int material_slot_assign_exec(bContext *C, wmOperator *)
static int lightprobe_cache_free_exec(bContext *C, wmOperator *op)
static int view_layer_add_exec(bContext *C, wmOperator *op)
static int copy_mtex_exec(bContext *C, wmOperator *)
static int lightprobe_cache_bake_invoke(bContext *C, wmOperator *op, const wmEvent *)
static int paste_mtex_exec(bContext *C, wmOperator *)
static int view_layer_remove_aov_exec(bContext *C, wmOperator *)
static int material_slot_select_exec(bContext *C, wmOperator *)
static blender::Vector< Object * > lightprobe_cache_irradiance_volume_subset_get(bContext *C, wmOperator *op)
void OBJECT_OT_lightprobe_cache_free(wmOperatorType *ot)
void OBJECT_OT_material_slot_copy(wmOperatorType *ot)
static bool object_array_for_shading_edit_mode_enabled_filter(const Object *ob, void *user_data)
void SCENE_OT_view_layer_remove_unused_lightgroups(wmOperatorType *ot)
static bool view_layer_remove_poll(bContext *C)
static void paste_mtex_copybuf(ID *id)
static int material_slot_add_exec(bContext *C, wmOperator *)
static int paste_material_exec(bContext *C, wmOperator *op)
static void copy_mtex_copybuf(ID *id)
static int material_slot_de_select(bContext *C, bool select)
void OBJECT_OT_lightprobe_cache_bake(wmOperatorType *ot)
static int new_world_exec(bContext *C, wmOperator *)
void OBJECT_OT_material_slot_select(wmOperatorType *ot)
void WORLD_OT_new(wmOperatorType *ot)
void OBJECT_OT_material_slot_remove_unused(wmOperatorType *ot)
static int render_view_remove_exec(bContext *C, wmOperator *)
static int material_slot_remove_unused_exec(bContext *C, wmOperator *op)
void OBJECT_OT_material_slot_assign(wmOperatorType *ot)
static int material_slot_deselect_exec(bContext *C, wmOperator *)
static bool object_array_for_shading_edit_mode_disabled_filter(const Object *ob, void *user_data)
void MATERIAL_OT_paste(wmOperatorType *ot)
void MATERIAL_OT_new(wmOperatorType *ot)
static int material_slot_remove_exec(bContext *C, wmOperator *op)
void SCENE_OT_view_layer_add(wmOperatorType *ot)
static int render_view_add_exec(bContext *C, wmOperator *)
static int copy_material_exec(bContext *C, wmOperator *op)
void OBJECT_OT_material_slot_move(wmOperatorType *ot)
void SCENE_OT_view_layer_add_used_lightgroups(wmOperatorType *ot)
static int new_texture_exec(bContext *C, wmOperator *)
void TEXTURE_OT_new(wmOperatorType *ot)
static bool render_view_remove_poll(bContext *C)
static int view_layer_add_used_lightgroups_exec(bContext *C, wmOperator *)
static bool object_materials_supported_poll(bContext *C)
static int lightprobe_cache_bake_exec(bContext *C, wmOperator *op)
@ LIGHTCACHE_SUBSET_ACTIVE
@ LIGHTCACHE_SUBSET_SELECTED
static int material_slot_move_exec(bContext *C, wmOperator *op)
void MATERIAL_OT_copy(wmOperatorType *ot)
void SCENE_OT_view_layer_remove_lightgroup(wmOperatorType *ot)
static int paste_material_nodetree_ids_decref(LibraryIDLinkCallbackData *cb_data)
static int view_layer_remove_unused_lightgroups_exec(bContext *C, wmOperator *)
static int texture_slot_move_exec(bContext *C, wmOperator *op)
static int view_layer_remove_exec(bContext *C, wmOperator *)
void TEXTURE_OT_slot_paste(wmOperatorType *ot)
static Vector< Object * > object_array_for_shading_edit_mode_enabled(bContext *C)
static int view_layer_remove_lightgroup_exec(bContext *C, wmOperator *)
void SCENE_OT_view_layer_add_aov(wmOperatorType *ot)
void TEXTURE_OT_slot_copy(wmOperatorType *ot)
static int paste_material_nodetree_ids_relink_or_clear(LibraryIDLinkCallbackData *cb_data)
void SCENE_OT_render_view_add(wmOperatorType *ot)
void SCENE_OT_view_layer_remove_aov(wmOperatorType *ot)
void OBJECT_OT_material_slot_remove(wmOperatorType *ot)
void TEXTURE_OT_slot_move(wmOperatorType *ot)
void SCENE_OT_view_layer_remove(wmOperatorType *ot)
static int new_material_exec(bContext *C, wmOperator *)
void SCENE_OT_view_layer_add_lightgroup(wmOperatorType *ot)
static int lightprobe_cache_bake_modal(bContext *C, wmOperator *op, const wmEvent *event)
static void material_copybuffer_filepath_get(char filepath[FILE_MAX], size_t filepath_maxncpy)
static void lightprobe_cache_bake_cancel(bContext *C, wmOperator *op)
static int view_layer_add_lightgroup_exec(bContext *C, wmOperator *op)
void SCENE_OT_render_view_remove(wmOperatorType *ot)
#define SWAP_MEMBER(member)
static int view_layer_add_aov_exec(bContext *C, wmOperator *)
static bool object_materials_supported_poll_ex(bContext *C, const Object *ob)
static bool copy_mtex_poll(bContext *C)
static Vector< Object * > object_array_for_shading_edit_mode_disabled(bContext *C)
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr_value, ReportList *reports)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
int RNA_enum_get(PointerRNA *ptr, const char *name)
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)
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 RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
const EnumPropertyItem rna_enum_linestyle_thickness_modifier_type_items[]
const EnumPropertyItem rna_enum_linestyle_geometry_modifier_type_items[]
const EnumPropertyItem rna_enum_linestyle_color_modifier_type_items[]
const EnumPropertyItem rna_enum_linestyle_alpha_modifier_type_items[]
unsigned __int64 uint64_t
struct FreestyleLineStyle * linestyle
struct bNodeTree * nodetree
bool(* filter_fn)(const Object *ob, void *user_data)
void(* update_render_passes)(struct RenderEngine *engine, struct Scene *scene, struct ViewLayer *view_layer)
struct FreestyleConfig freestyle_config
ViewLayerLightgroup * active_lightgroup
ViewLayerAOV * active_aov
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* modal)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void(* cancel)(bContext *C, wmOperator *op)
struct ReportList * reports
void WM_cursor_wait(bool val)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job)
void WM_jobs_kill_type(wmWindowManager *wm, const void *owner, int job_type)
bool WM_jobs_test(const wmWindowManager *wm, const void *owner, int job_type)
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)
void WM_window_set_active_view_layer(wmWindow *win, ViewLayer *view_layer)
ViewLayer * WM_window_get_active_view_layer(const wmWindow *win)