95#include "RNA_prototypes.hh"
217 ot->
name =
"Add Material Slot";
218 ot->
idname =
"OBJECT_OT_material_slot_add";
268 ot->
name =
"Remove Material Slot";
269 ot->
idname =
"OBJECT_OT_material_slot_remove";
270 ot->
description =
"Remove the selected material slot";
289 bool changed_multi =
false;
295 for (
Object *ob : objects) {
296 short mat_nr_active = -1;
298 if (ob->totcol == 0) {
301 if (obact && (obact->
actcol >= 1 && obact->
actcol <= ob->totcol) &&
306 mat_nr_active = obact->
actcol - 1;
311 for (
int i = 0;
i < ob->totcol;
i++) {
313 if (mat_active == mat) {
318 if (mat_nr_active == -1) {
323 bool changed =
false;
333 efa->
mat_nr = mat_nr_active;
345 nu->mat_nr = mat_nr_active;
350 else if (ob->type ==
OB_FONT) {
351 const Curve *cu =
static_cast<const Curve *
>(ob->data);
353 int i, selstart, selend;
356 for (
i = selstart;
i <= selend;
i++) {
364 changed_multi =
true;
376 ot->
name =
"Assign Material Slot";
377 ot->
idname =
"OBJECT_OT_material_slot_assign";
378 ot->
description =
"Assign active material slot to selection";
396 bool changed_multi =
false;
401 for (
Object *ob : objects) {
402 if (ob->totcol == 0) {
407 ob, mat_active, obact ? obact->
actcol - 1 : -1);
409 if (mat_nr_active == -1) {
413 bool changed =
false;
430 if (nu->mat_nr == mat_nr_active) {
435 if (bezt->
hide == 0) {
452 a = nu->pntsu * nu->pntsv;
473 changed_multi =
true;
490 ot->
name =
"Select Material Slot";
491 ot->
idname =
"OBJECT_OT_material_slot_select";
492 ot->
description =
"Select by active material slot";
509 ot->
name =
"Deselect Material Slot";
510 ot->
idname =
"OBJECT_OT_material_slot_deselect";
511 ot->
description =
"Deselect by active material slot";
543 matar[
i] = ob->
matbits[
i] ? (*matar_object)[
i] : (*matar_obdata)[
i];
550 const bool is_same_obdata = ob->
data == ob_iter->data;
555 if (is_same_obdata) {
565 if (ob_iter->totcol == ob->
totcol) {
566 ob_iter->actcol = ob->
actcol;
582 ot->
name =
"Copy Material to Selected";
583 ot->
idname =
"OBJECT_OT_material_slot_copy";
584 ot->
description =
"Copy material to selected objects";
608 if (!ob || ob->
totcol < 2) {
613 if (dir == 1 && ob->
actcol > 1) {
614 index_pair[0] = ob->
actcol - 2;
615 index_pair[1] = ob->
actcol - 1;
620 index_pair[0] = ob->
actcol - 1;
621 index_pair[1] = ob->
actcol - 0;
632 slot_remap[index_pair[0]] = index_pair[1];
633 slot_remap[index_pair[1]] = index_pair[0];
649 {1,
"UP", 0,
"Up",
""},
650 {-1,
"DOWN", 0,
"Down",
""},
651 {0,
nullptr, 0,
nullptr,
nullptr},
655 ot->
name =
"Move Material";
656 ot->
idname =
"OBJECT_OT_material_slot_move";
657 ot->
description =
"Move the active material up/down in the list";
671 "Direction to move the active material towards");
693 for (
Object *ob : objects) {
694 int actcol = ob->actcol;
695 for (
int slot = 1; slot <= ob->totcol; slot++) {
700 if (actcol >= slot) {
734 ot->
name =
"Remove Unused Slots";
735 ot->
idname =
"OBJECT_OT_material_slot_remove_unused";
758 for (
Object *ob : objects) {
759 int actcol = ob->actcol;
760 for (
int slot = 1; slot <= ob->totcol; slot++) {
761 while (slot <= ob->totcol) {
765 if (actcol >= slot) {
799 ot->
name =
"Remove All Materials";
800 ot->
idname =
"OBJECT_OT_material_slot_remove_all";
838 const char *name =
DATA_(
"Material");
879 ot->
name =
"New Material";
880 ot->
idname =
"MATERIAL_OT_new";
915 bool linked_id_created =
false;
931 if (!linked_id_created) {
943 ot->
name =
"New Texture";
944 ot->
idname =
"TEXTURE_OT_new";
1004 ot->
name =
"New World";
1005 ot->
idname =
"WORLD_OT_new";
1006 ot->
description =
"Create a new world Data-Block";
1030 if (view_layer_current ==
nullptr) {
1035 scene, view_layer_current ? view_layer_current->
name :
nullptr, view_layer_current, type);
1052 {
VIEWLAYER_ADD_COPY,
"COPY", 0,
"Copy Settings",
"Copy settings of current view layer"},
1057 "Add a new view layer with all collections disabled"},
1058 {0,
nullptr, 0,
nullptr,
nullptr},
1062 ot->
name =
"Add View Layer";
1063 ot->
idname =
"SCENE_OT_view_layer_add";
1107 ot->
name =
"Remove View Layer";
1108 ot->
idname =
"SCENE_OT_view_layer_remove";
1109 ot->
description =
"Remove the selected view layer";
1156 ot->
name =
"Add AOV";
1157 ot->
idname =
"SCENE_OT_view_layer_add_aov";
1208 ot->
name =
"Remove AOV";
1209 ot->
idname =
"SCENE_OT_view_layer_remove_aov";
1238 if (
STREQ(lightgroup->name, name)) {
1260 ot->
name =
"Add Lightgroup";
1261 ot->
idname =
"SCENE_OT_view_layer_add_lightgroup";
1276 "Name of newly created lightgroup");
1310 ot->
name =
"Remove Lightgroup";
1311 ot->
idname =
"SCENE_OT_view_layer_remove_lightgroup";
1332 if (ob->lightgroup && ob->lightgroup->name[0]) {
1333 used_lightgroups.
add_as(ob->lightgroup->name);
1342 return used_lightgroups;
1353 used_lightgroup.c_str(),
1374 ot->
name =
"Add Used Lightgroups";
1375 ot->
idname =
"SCENE_OT_view_layer_add_used_lightgroups";
1398 if (!used_lightgroups.
contains_as(lightgroup->name)) {
1417 ot->
name =
"Remove Unused Lightgroups";
1418 ot->
idname =
"SCENE_OT_view_layer_remove_unused_lightgroups";
1419 ot->
description =
"Remove all unused Light Groups";
1446 auto is_irradiance_volume = [](
Object *ob) ->
bool {
1453 auto irradiance_volume_setup = [&](
Object *ob) {
1464 if (is_irradiance_volume(ob)) {
1465 irradiance_volume_setup(ob);
1476 view_layer,
nullptr, ¶meters);
1477 for (
Object *ob : objects) {
1478 if (is_irradiance_volume(ob)) {
1479 irradiance_volume_setup(ob);
1486 if (is_irradiance_volume(active_ob)) {
1487 irradiance_volume_setup(active_ob);
1525 data->scene = scene;
1529 wm, win, bmain, view_layer, scene, probes,
data->report, scene->
r.
cfra, 0);
1530 if (wm_job ==
nullptr) {
1556 std::string report =
data->report;
1561 if (!report.empty()) {
1569 switch (event->
type) {
1601 bmain, view_layer, scene, probes, report, scene->
r.
cfra);
1603 wmJobWorkerStatus worker_status = {};
1609 if (!report.empty()) {
1625 "Only bake selected light probe volumes"},
1630 "Only bake the active light probe volume"},
1631 {0,
nullptr, 0,
nullptr,
nullptr},
1635 ot->
name =
"Bake Light Cache";
1636 ot->
idname =
"OBJECT_OT_lightprobe_cache_bake";
1637 ot->
description =
"Bake irradiance volume light cache";
1646 ot->
srna,
"subset", light_cache_subset_items, 0,
"Subset",
"Subset of probes to update");
1666 for (
Object *
object : probes) {
1667 if (object->lightprobe_cache ==
nullptr) {
1686 "Delete all light probes' baked lighting data"},
1691 "Only delete selected light probes' baked lighting data"},
1696 "Only delete the active light probe's baked lighting data"},
1697 {0,
nullptr, 0,
nullptr,
nullptr},
1701 ot->
name =
"Delete Light Cache";
1702 ot->
idname =
"OBJECT_OT_lightprobe_cache_free";
1703 ot->
description =
"Delete cached indirect lighting";
1711 lightprobe_subset_items,
1714 "Subset of probes to update");
1750 ot->
name =
"Add Render View";
1751 ot->
idname =
"SCENE_OT_render_view_add";
1789 ot->
name =
"Remove Render View";
1790 ot->
idname =
"SCENE_OT_render_view_remove";
1791 ot->
description =
"Remove the selected render view";
1803#ifdef WITH_FREESTYLE
1814 "No active lineset and associated line style to manipulate the modifier");
1820 "The active lineset does not have a line style (indicating data corruption)");
1827static bool freestyle_active_module_poll(
bContext *
C)
1832 return module != nullptr;
1850 ot->
name =
"Add Freestyle Module";
1851 ot->
idname =
"SCENE_OT_freestyle_module_add";
1852 ot->
description =
"Add a style module into the list of modules";
1855 ot->
exec = freestyle_module_add_exec;
1885 ot->
name =
"Remove Freestyle Module";
1886 ot->
idname =
"SCENE_OT_freestyle_module_remove";
1887 ot->
description =
"Remove the style module from the stack";
1890 ot->
poll = freestyle_active_module_poll;
1891 ot->
exec = freestyle_module_remove_exec;
1922 {-1,
"UP", 0,
"Up",
""},
1923 {1,
"DOWN", 0,
"Down",
""},
1924 {0,
nullptr, 0,
nullptr,
nullptr},
1928 ot->
name =
"Move Freestyle Module";
1929 ot->
idname =
"SCENE_OT_freestyle_module_move";
1930 ot->
description =
"Change the position of the style module within in the list of style modules";
1933 ot->
poll = freestyle_active_module_poll;
1934 ot->
exec = freestyle_module_move_exec;
1945 "Direction to move the chosen style module towards");
1971 ot->
name =
"Add Line Set";
1972 ot->
idname =
"SCENE_OT_freestyle_lineset_add";
1973 ot->
description =
"Add a line set into the list of line sets";
1976 ot->
exec = freestyle_lineset_add_exec;
1988static bool freestyle_active_lineset_poll(
bContext *
C)
2011 ot->
name =
"Copy Line Set";
2012 ot->
idname =
"SCENE_OT_freestyle_lineset_copy";
2013 ot->
description =
"Copy the active line set to the internal clipboard";
2016 ot->
exec = freestyle_lineset_copy_exec;
2017 ot->
poll = freestyle_active_lineset_poll;
2045 ot->
name =
"Paste Line Set";
2046 ot->
idname =
"SCENE_OT_freestyle_lineset_paste";
2047 ot->
description =
"Paste the internal clipboard content to the active line set";
2050 ot->
exec = freestyle_lineset_paste_exec;
2051 ot->
poll = freestyle_active_lineset_poll;
2079 ot->
name =
"Remove Line Set";
2080 ot->
idname =
"SCENE_OT_freestyle_lineset_remove";
2081 ot->
description =
"Remove the active line set from the list of line sets";
2084 ot->
exec = freestyle_lineset_remove_exec;
2085 ot->
poll = freestyle_active_lineset_poll;
2114 {-1,
"UP", 0,
"Up",
""},
2115 {1,
"DOWN", 0,
"Down",
""},
2116 {0,
nullptr, 0,
nullptr,
nullptr},
2120 ot->
name =
"Move Line Set";
2121 ot->
idname =
"SCENE_OT_freestyle_lineset_move";
2122 ot->
description =
"Change the position of the active line set within the list of line sets";
2125 ot->
exec = freestyle_lineset_move_exec;
2126 ot->
poll = freestyle_active_lineset_poll;
2137 "Direction to move the active line set towards");
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)) {
2213 ot->
name =
"Add Line Color Modifier";
2214 ot->
idname =
"SCENE_OT_freestyle_color_modifier_add";
2216 "Add a line color modifier to the line style associated with the active lineset";
2220 ot->
exec = freestyle_color_modifier_add_exec;
2221 ot->
poll = freestyle_active_lineset_poll;
2243 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2260 ot->
name =
"Add Alpha Transparency Modifier";
2261 ot->
idname =
"SCENE_OT_freestyle_alpha_modifier_add";
2263 "Add an alpha transparency modifier to the line style associated with the active lineset";
2267 ot->
exec = freestyle_alpha_modifier_add_exec;
2268 ot->
poll = freestyle_active_lineset_poll;
2290 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2304void SCENE_OT_freestyle_thickness_modifier_add(
wmOperatorType *ot)
2307 ot->
name =
"Add Line Thickness Modifier";
2308 ot->
idname =
"SCENE_OT_freestyle_thickness_modifier_add";
2310 "Add a line thickness modifier to the line style associated with the active lineset";
2314 ot->
exec = freestyle_thickness_modifier_add_exec;
2315 ot->
poll = freestyle_active_lineset_poll;
2337 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2354 ot->
name =
"Add Stroke Geometry Modifier";
2355 ot->
idname =
"SCENE_OT_freestyle_geometry_modifier_add";
2357 "Add a stroke geometry modifier to the line style associated with the active lineset";
2361 ot->
exec = freestyle_geometry_modifier_add_exec;
2362 ot->
poll = freestyle_active_lineset_poll;
2378static int freestyle_get_modifier_type(
PointerRNA *ptr)
2402 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2406 switch (freestyle_get_modifier_type(&ptr)) {
2421 op->
reports,
RPT_ERROR,
"The object the data pointer refers to is not a valid modifier");
2433 ot->
name =
"Remove Modifier";
2434 ot->
idname =
"SCENE_OT_freestyle_modifier_remove";
2435 ot->
description =
"Remove the modifier from the list of modifiers";
2438 ot->
exec = freestyle_modifier_remove_exec;
2439 ot->
poll = freestyle_active_lineset_poll;
2458 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2462 switch (freestyle_get_modifier_type(&ptr)) {
2477 op->
reports,
RPT_ERROR,
"The object the data pointer refers to is not a valid modifier");
2489 ot->
name =
"Copy Modifier";
2490 ot->
idname =
"SCENE_OT_freestyle_modifier_copy";
2491 ot->
description =
"Duplicate the modifier within the list of modifiers";
2494 ot->
exec = freestyle_modifier_copy_exec;
2495 ot->
poll = freestyle_active_lineset_poll;
2514 bool changed =
false;
2516 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2520 switch (freestyle_get_modifier_type(&ptr)) {
2535 op->
reports,
RPT_ERROR,
"The object the data pointer refers to is not a valid modifier");
2550 {-1,
"UP", 0,
"Up",
""},
2551 {1,
"DOWN", 0,
"Down",
""},
2552 {0,
nullptr, 0,
nullptr,
nullptr},
2556 ot->
name =
"Move Modifier";
2557 ot->
idname =
"SCENE_OT_freestyle_modifier_move";
2558 ot->
description =
"Move the modifier within the list of modifiers";
2561 ot->
exec = freestyle_modifier_move_exec;
2562 ot->
poll = freestyle_active_lineset_poll;
2573 "Direction to move the chosen modifier towards");
2598void SCENE_OT_freestyle_stroke_material_create(
wmOperatorType *ot)
2601 ot->
name =
"Create Freestyle Stroke Material";
2602 ot->
idname =
"SCENE_OT_freestyle_stroke_material_create";
2603 ot->
description =
"Create Freestyle stroke material for testing";
2606 ot->
exec = freestyle_stroke_material_create_exec;
2625 MTex **mtex_ar, *mtexswap;
2634 mtexswap = mtex_ar[act];
2635 mtex_ar[act] = mtex_ar[act - 1];
2636 mtex_ar[act - 1] = mtexswap;
2639 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, act - 1, -1,
false);
2641 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, act, act - 1,
false);
2643 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, -1, act,
false);
2650 mtexswap = mtex_ar[act];
2651 mtex_ar[act] = mtex_ar[act + 1];
2652 mtex_ar[act + 1] = mtexswap;
2655 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, act + 1, -1,
false);
2657 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, act, act + 1,
false);
2659 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, -1, act,
false);
2675 {-1,
"UP", 0,
"Up",
""},
2676 {1,
"DOWN", 0,
"Down",
""},
2677 {0,
nullptr, 0,
nullptr,
nullptr},
2681 ot->
name =
"Move Texture Slot";
2682 ot->
idname =
"TEXTURE_OT_slot_move";
2683 ot->
description =
"Move texture slots up and down";
2707 if (ma ==
nullptr) {
2718 PartialWriteContext::IDAddOperations::SET_CLIPBOARD_MARK |
2719 PartialWriteContext::IDAddOperations::ADD_DEPENDENCIES)},
2735 ot->
name =
"Copy Material";
2736 ot->
idname =
"MATERIAL_OT_copy";
2737 ot->
description =
"Copy the material settings and nodes";
2777 ID *id_local =
static_cast<ID *
>(
2797 if (ma ==
nullptr) {
2844 if (ma_from ==
nullptr) {
2874#define SWAP_MEMBER(member) std::swap(ma->member, ma_from->member)
2946 ot->
name =
"Paste Material";
2947 ot->
idname =
"MATERIAL_OT_paste";
2948 ot->
description =
"Paste the material settings and nodes";
2974 MTex **mtex =
nullptr;
2976 switch (
GS(
id->name)) {
2987 if (mtex && *mtex) {
2998 MTex **mtex =
nullptr;
3004 switch (
GS(
id->name)) {
3017 if (*mtex ==
nullptr) {
3020 else if ((*mtex)->tex) {
3035 (*mtex)->tex =
nullptr;
3038 (*mtex)->object =
nullptr;
3055 if (
id ==
nullptr) {
3070 return (
id !=
nullptr);
3076 ot->
name =
"Copy Texture Slot Settings";
3077 ot->
idname =
"TEXTURE_OT_slot_copy";
3078 ot->
description =
"Copy the material texture settings and nodes";
3099 if (
id ==
nullptr) {
3121 else if (linestyle) {
3122 id = &linestyle->
id;
3125 if (
id ==
nullptr) {
3140 ot->
name =
"Paste Texture Slot Settings";
3141 ot->
idname =
"TEXTURE_OT_slot_paste";
3142 ot->
description =
"Copy the texture settings and nodes";
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)
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, LibraryForeachIDFlag 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)
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()
void BKE_main_ensure_invariants(Main &bmain, std::optional< blender::Span< ID * > > modified_ids=std::nullopt)
General operations, lookup, etc. for materials.
short * BKE_object_material_len_p(Object *ob)
Material ** BKE_object_material_get_p(Object *ob, short act)
void BKE_object_material_remap(Object *ob, const unsigned int *remap)
Material * BKE_gpencil_material_add(Main *bmain, const char *name)
bool BKE_object_material_slot_add(Main *bmain, Object *ob, bool set_active=true)
void BKE_object_material_array_assign(Main *bmain, Object *ob, Material ***matar, int totcol, bool to_object_only)
Material * BKE_material_add(Main *bmain, const char *name)
bool BKE_object_material_slot_used(Object *object, short actcol)
Material * BKE_object_material_get(Object *ob, short act)
int BKE_object_material_index_get_with_hint(Object *ob, const Material *ma, int hint_index)
Material *** BKE_object_material_array_p(Object *ob)
bool BKE_object_material_slot_remove(Main *bmain, Object *ob)
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(const Curve *cu, 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)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void * BLI_findstring(const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
int BLI_listbase_count(const 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(...)
char * STRNCPY(char(&dst)[N], const char *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.
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_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)
void ED_render_clear_mtex_copybuf()
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)
void ED_undo_push_op(bContext *C, wmOperator *op)
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)
BMesh const char void * data
unsigned long long int uint64_t
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, blender::FunctionRef< IDAddOperations(LibraryIDLinkCallbackData *cb_data, IDAddOptions options)> dependencies_filter_cb=nullptr)
bool write(const char *write_filepath, int write_flags, int remap_mode, ReportList &reports)
bool ED_curve_nurb_select_check(const View3D *v3d, const Nurb *nu)
void * EEVEE_lightbake_job_data_alloc(Main *bmain, ViewLayer *view_layer, Scene *scene, blender::Vector< Object * > original_probes, std::string &report, int frame)
void EEVEE_lightbake_job(void *job_data, wmJobWorkerStatus *worker_status)
void EEVEE_lightbake_job_data_free(void *job_data)
wmJob * EEVEE_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_lightbake_update(void *job_data)
#define ID_IS_LINKED(_id)
#define ID_IS_EDITABLE(_id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
RenderEngineType * RE_engines_find(const char *idname)
RenderEngine * RE_engine_create(RenderEngineType *type)
void RE_engine_free(RenderEngine *engine)
void * MEM_callocN(size_t len, const char *str)
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
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)
void OBJECT_OT_material_slot_remove_all(wmOperatorType *ot)
void OBJECT_OT_material_slot_add(wmOperatorType *ot)
void OBJECT_OT_material_slot_deselect(wmOperatorType *ot)
void OBJECT_OT_lightprobe_cache_free(wmOperatorType *ot)
void OBJECT_OT_material_slot_copy(wmOperatorType *ot)
void SCENE_OT_view_layer_remove_unused_lightgroups(wmOperatorType *ot)
void OBJECT_OT_lightprobe_cache_bake(wmOperatorType *ot)
void OBJECT_OT_material_slot_select(wmOperatorType *ot)
void WORLD_OT_new(wmOperatorType *ot)
void OBJECT_OT_material_slot_remove_unused(wmOperatorType *ot)
void OBJECT_OT_material_slot_assign(wmOperatorType *ot)
void MATERIAL_OT_paste(wmOperatorType *ot)
void MATERIAL_OT_new(wmOperatorType *ot)
void SCENE_OT_view_layer_add(wmOperatorType *ot)
void OBJECT_OT_material_slot_move(wmOperatorType *ot)
void SCENE_OT_view_layer_add_used_lightgroups(wmOperatorType *ot)
void TEXTURE_OT_new(wmOperatorType *ot)
void MATERIAL_OT_copy(wmOperatorType *ot)
void SCENE_OT_view_layer_remove_lightgroup(wmOperatorType *ot)
void TEXTURE_OT_slot_paste(wmOperatorType *ot)
void SCENE_OT_view_layer_add_aov(wmOperatorType *ot)
void TEXTURE_OT_slot_copy(wmOperatorType *ot)
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)
void SCENE_OT_view_layer_add_lightgroup(wmOperatorType *ot)
void SCENE_OT_render_view_remove(wmOperatorType *ot)
static wmOperatorStatus material_slot_assign_exec(bContext *C, wmOperator *)
static wmOperatorStatus render_view_remove_exec(bContext *C, wmOperator *)
static wmOperatorStatus paste_mtex_exec(bContext *C, wmOperator *)
@ LIGHTCACHE_SUBSET_ACTIVE
@ LIGHTCACHE_SUBSET_SELECTED
static wmOperatorStatus copy_material_exec(bContext *C, wmOperator *op)
static wmOperatorStatus material_slot_remove_all_exec(bContext *C, wmOperator *op)
static wmOperatorStatus lightprobe_cache_bake_invoke(bContext *C, wmOperator *op, const wmEvent *)
static blender::Vector< Object * > lightprobe_cache_irradiance_volume_subset_get(bContext *C, wmOperator *op)
static wmOperatorStatus view_layer_remove_unused_lightgroups_exec(bContext *C, wmOperator *)
static wmOperatorStatus lightprobe_cache_bake_modal(bContext *C, wmOperator *op, const wmEvent *event)
static bool object_array_for_shading_edit_mode_enabled_filter(const Object *ob, void *user_data)
static wmOperatorStatus new_material_exec(bContext *C, wmOperator *)
static bool view_layer_remove_poll(bContext *C)
static void paste_mtex_copybuf(ID *id)
static wmOperatorStatus material_slot_remove_unused_exec(bContext *C, wmOperator *op)
static wmOperatorStatus material_slot_copy_exec(bContext *C, wmOperator *)
static void copy_mtex_copybuf(ID *id)
static wmOperatorStatus material_slot_select_exec(bContext *C, wmOperator *)
static wmOperatorStatus lightprobe_cache_free_exec(bContext *C, wmOperator *op)
static wmOperatorStatus new_world_exec(bContext *C, wmOperator *)
static bool object_array_for_shading_edit_mode_disabled_filter(const Object *ob, void *user_data)
static wmOperatorStatus lightprobe_cache_bake_exec(bContext *C, wmOperator *op)
static wmOperatorStatus material_slot_deselect_exec(bContext *C, wmOperator *)
static wmOperatorStatus view_layer_add_exec(bContext *C, wmOperator *op)
static wmOperatorStatus view_layer_add_lightgroup_exec(bContext *C, wmOperator *op)
static wmOperatorStatus view_layer_add_aov_exec(bContext *C, wmOperator *)
static bool render_view_remove_poll(bContext *C)
static bool object_materials_supported_poll(bContext *C)
static wmOperatorStatus material_slot_move_exec(bContext *C, wmOperator *op)
static wmOperatorStatus material_slot_remove_exec(bContext *C, wmOperator *op)
static wmOperatorStatus new_texture_exec(bContext *C, wmOperator *op)
static int paste_material_nodetree_ids_decref(LibraryIDLinkCallbackData *cb_data)
static wmOperatorStatus render_view_add_exec(bContext *C, wmOperator *)
static Vector< Object * > object_array_for_shading_edit_mode_enabled(bContext *C)
static wmOperatorStatus view_layer_remove_lightgroup_exec(bContext *C, wmOperator *)
static wmOperatorStatus view_layer_remove_exec(bContext *C, wmOperator *)
static int paste_material_nodetree_ids_relink_or_clear(LibraryIDLinkCallbackData *cb_data)
static wmOperatorStatus view_layer_remove_aov_exec(bContext *C, wmOperator *)
static wmOperatorStatus paste_material_exec(bContext *C, wmOperator *op)
static wmOperatorStatus copy_mtex_exec(bContext *C, wmOperator *)
static wmOperatorStatus material_slot_add_exec(bContext *C, wmOperator *)
static blender::Set< blender::StringRefNull > get_used_lightgroups(Scene *scene)
static void material_copybuffer_filepath_get(char filepath[FILE_MAX], size_t filepath_maxncpy)
static wmOperatorStatus material_slot_de_select(bContext *C, bool select)
static void lightprobe_cache_bake_cancel(bContext *C, wmOperator *op)
#define SWAP_MEMBER(member)
static wmOperatorStatus view_layer_add_used_lightgroups_exec(bContext *C, wmOperator *)
static bool object_materials_supported_poll_ex(bContext *C, const Object *ob)
static bool copy_mtex_poll(bContext *C)
static wmOperatorStatus texture_slot_move_exec(bContext *C, wmOperator *op)
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[]
struct EditFont * editfont
struct FreestyleLineStyle * linestyle
LibraryForeachIDCallbackFlag cb_flag
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 bNodeTree * nodetree
struct FreestyleConfig freestyle_config
ViewLayerLightgroup * active_lightgroup
ViewLayerAOV * active_aov
struct LightgroupMembership * lightgroup
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) modal(bContext *C, wmOperator *op, const wmEvent *event) 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)
wmOperatorStatus 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)