95#include "RNA_prototypes.hh"
187 if (ob_active ==
nullptr) {
190 return ob_active->
actcol > 0;
225 ot->name =
"Add Material Slot";
226 ot->idname =
"OBJECT_OT_material_slot_add";
227 ot->description =
"Add a new material slot";
290 ot->name =
"Remove Material Slot";
291 ot->idname =
"OBJECT_OT_material_slot_remove";
292 ot->description =
"Remove the selected material slot";
311 bool changed_multi =
false;
317 for (
Object *ob : objects) {
318 short mat_nr_active = -1;
320 if (ob->totcol == 0) {
326 mat_nr_active = obact->
actcol - 1;
331 for (
int i = 0;
i < ob->totcol;
i++) {
333 if (mat_active == mat) {
338 if (mat_nr_active == -1) {
343 bool changed =
false;
353 efa->
mat_nr = mat_nr_active;
365 nu->mat_nr = mat_nr_active;
370 else if (ob->type ==
OB_FONT) {
371 const Curve *cu =
static_cast<const Curve *
>(ob->data);
373 int i, selstart, selend;
376 for (
i = selstart;
i <= selend;
i++) {
384 changed_multi =
true;
396 ot->name =
"Assign Material Slot";
397 ot->idname =
"OBJECT_OT_material_slot_assign";
398 ot->description =
"Assign active material slot to selection";
416 bool changed_multi =
false;
421 for (
Object *ob : objects) {
422 if (ob->totcol == 0) {
427 ob, mat_active, obact ? obact->
actcol - 1 : -1);
429 if (mat_nr_active == -1) {
433 bool changed =
false;
450 if (nu->mat_nr == mat_nr_active) {
455 if (bezt->
hide == 0) {
472 a = nu->pntsu * nu->pntsv;
493 changed_multi =
true;
510 ot->name =
"Select Material Slot";
511 ot->idname =
"OBJECT_OT_material_slot_select";
512 ot->description =
"Select by active material slot";
529 ot->name =
"Deselect Material Slot";
530 ot->idname =
"OBJECT_OT_material_slot_deselect";
531 ot->description =
"Deselect by active material slot";
563 matar[
i] = ob->
matbits[
i] ? (*matar_object)[
i] : (*matar_obdata)[
i];
570 const bool is_same_obdata = ob->
data == ob_iter->data;
575 if (is_same_obdata) {
585 if (ob_iter->totcol == ob->
totcol) {
586 ob_iter->actcol = ob->
actcol;
602 ot->name =
"Copy Material to Selected";
603 ot->idname =
"OBJECT_OT_material_slot_copy";
604 ot->description =
"Copy material to selected objects";
629 if (!ob || ob->
totcol < 2) {
634 if (dir == 1 && ob->
actcol > 1) {
635 index_pair[0] = ob->
actcol - 2;
636 index_pair[1] = ob->
actcol - 1;
641 index_pair[0] = ob->
actcol - 1;
642 index_pair[1] = ob->
actcol - 0;
653 slot_remap[index_pair[0]] = index_pair[1];
654 slot_remap[index_pair[1]] = index_pair[0];
670 {1,
"UP", 0,
"Up",
""},
671 {-1,
"DOWN", 0,
"Down",
""},
672 {0,
nullptr, 0,
nullptr,
nullptr},
676 ot->name =
"Move Material";
677 ot->idname =
"OBJECT_OT_material_slot_move";
678 ot->description =
"Move the active material up/down in the list";
692 "Direction to move the active material towards");
707 for (
Object *ob : objects) {
708 int actcol = ob->actcol;
709 for (
int slot = 1; slot <= ob->totcol; slot++) {
714 if (actcol >= slot) {
749 ot->name =
"Remove Unused Slots";
750 ot->idname =
"OBJECT_OT_material_slot_remove_unused";
751 ot->description =
"Remove unused material slots";
769 for (
Object *ob : objects) {
770 int actcol = ob->actcol;
771 for (
int slot = 1; slot <= ob->totcol; slot++) {
772 while (slot <= ob->totcol) {
776 if (actcol >= slot) {
810 ot->name =
"Remove All Materials";
811 ot->idname =
"OBJECT_OT_material_slot_remove_all";
812 ot->description =
"Remove all materials";
889 ot->name =
"New Material";
890 ot->idname =
"MATERIAL_OT_new";
891 ot->description =
"Add a new material";
925 bool linked_id_created =
false;
941 if (!linked_id_created) {
953 ot->name =
"New Texture";
954 ot->idname =
"TEXTURE_OT_new";
955 ot->description =
"Add a new texture";
1013 ot->name =
"New World";
1014 ot->idname =
"WORLD_OT_new";
1015 ot->description =
"Create a new world Data-Block";
1039 if (view_layer_current ==
nullptr) {
1044 scene, view_layer_current ? view_layer_current->
name :
nullptr, view_layer_current, type);
1061 {
VIEWLAYER_ADD_COPY,
"COPY", 0,
"Copy Settings",
"Copy settings of current view layer"},
1066 "Add a new view layer with all collections disabled"},
1067 {0,
nullptr, 0,
nullptr,
nullptr},
1071 ot->name =
"Add View Layer";
1072 ot->idname =
"SCENE_OT_view_layer_add";
1073 ot->description =
"Add a view layer";
1116 ot->name =
"Remove View Layer";
1117 ot->idname =
"SCENE_OT_view_layer_remove";
1118 ot->description =
"Remove the selected view layer";
1165 ot->name =
"Add AOV";
1166 ot->idname =
"SCENE_OT_view_layer_add_aov";
1167 ot->description =
"Add a Shader AOV";
1217 ot->name =
"Remove AOV";
1218 ot->idname =
"SCENE_OT_view_layer_remove_aov";
1219 ot->description =
"Remove Active AOV";
1269 ot->name =
"Add Lightgroup";
1270 ot->idname =
"SCENE_OT_view_layer_add_lightgroup";
1271 ot->description =
"Add a Light Group";
1285 "Name of newly created lightgroup");
1319 ot->name =
"Remove Lightgroup";
1320 ot->idname =
"SCENE_OT_view_layer_remove_lightgroup";
1321 ot->description =
"Remove Active Lightgroup";
1341 if (ob->lightgroup && ob->lightgroup->name[0]) {
1342 used_lightgroups.
add_as(ob->lightgroup->name);
1351 return used_lightgroups;
1362 used_lightgroup.c_str(),
1383 ot->name =
"Add Used Lightgroups";
1384 ot->idname =
"SCENE_OT_view_layer_add_used_lightgroups";
1385 ot->description =
"Add all used Light Groups";
1407 if (!used_lightgroups.
contains_as(lightgroup->name)) {
1426 ot->name =
"Remove Unused Lightgroups";
1427 ot->idname =
"SCENE_OT_view_layer_remove_unused_lightgroups";
1428 ot->description =
"Remove all unused Light Groups";
1455 auto is_irradiance_volume = [](
Object *ob) ->
bool {
1462 auto irradiance_volume_setup = [&](
Object *ob) {
1473 if (is_irradiance_volume(ob)) {
1474 irradiance_volume_setup(ob);
1485 view_layer,
nullptr, ¶meters);
1486 for (
Object *ob : objects) {
1487 if (is_irradiance_volume(ob)) {
1488 irradiance_volume_setup(ob);
1495 if (is_irradiance_volume(active_ob)) {
1496 irradiance_volume_setup(active_ob);
1534 data->scene = scene;
1538 wm, win, bmain, view_layer, scene, probes,
data->report, scene->
r.
cfra, 0);
1539 if (wm_job ==
nullptr) {
1565 std::string report =
data->report;
1570 if (!report.empty()) {
1578 switch (event->
type) {
1610 bmain, view_layer, scene, probes, report, scene->
r.
cfra);
1618 if (!report.empty()) {
1634 "Only bake selected light probe volumes"},
1639 "Only bake the active light probe volume"},
1640 {0,
nullptr, 0,
nullptr,
nullptr},
1644 ot->name =
"Bake Light Cache";
1645 ot->idname =
"OBJECT_OT_lightprobe_cache_bake";
1646 ot->description =
"Bake irradiance volume light cache";
1655 ot->srna,
"subset", light_cache_subset_items, 0,
"Subset",
"Subset of probes to update");
1675 for (
Object *
object : probes) {
1676 if (object->lightprobe_cache ==
nullptr) {
1695 "Delete all light probes' baked lighting data"},
1700 "Only delete selected light probes' baked lighting data"},
1705 "Only delete the active light probe's baked lighting data"},
1706 {0,
nullptr, 0,
nullptr,
nullptr},
1710 ot->name =
"Delete Light Cache";
1711 ot->idname =
"OBJECT_OT_lightprobe_cache_free";
1712 ot->description =
"Delete cached indirect lighting";
1720 lightprobe_subset_items,
1723 "Subset of probes to update");
1759 ot->name =
"Add Render View";
1760 ot->idname =
"SCENE_OT_render_view_add";
1761 ot->description =
"Add a render view";
1798 ot->name =
"Remove Render View";
1799 ot->idname =
"SCENE_OT_render_view_remove";
1800 ot->description =
"Remove the selected render view";
1812#ifdef WITH_FREESTYLE
1823 "No active lineset and associated line style to manipulate the modifier");
1829 "The active lineset does not have a line style (indicating data corruption)");
1836static bool freestyle_active_module_poll(
bContext *
C)
1841 return module != nullptr;
1859 ot->name =
"Add Freestyle Module";
1860 ot->idname =
"SCENE_OT_freestyle_module_add";
1861 ot->description =
"Add a style module into the list of modules";
1864 ot->exec = freestyle_module_add_exec;
1894 ot->name =
"Remove Freestyle Module";
1895 ot->idname =
"SCENE_OT_freestyle_module_remove";
1896 ot->description =
"Remove the style module from the stack";
1899 ot->poll = freestyle_active_module_poll;
1900 ot->exec = freestyle_module_remove_exec;
1931 {-1,
"UP", 0,
"Up",
""},
1932 {1,
"DOWN", 0,
"Down",
""},
1933 {0,
nullptr, 0,
nullptr,
nullptr},
1937 ot->name =
"Move Freestyle Module";
1938 ot->idname =
"SCENE_OT_freestyle_module_move";
1939 ot->description =
"Change the position of the style module within in the list of style modules";
1942 ot->poll = freestyle_active_module_poll;
1943 ot->exec = freestyle_module_move_exec;
1954 "Direction to move the chosen style module towards");
1980 ot->name =
"Add Line Set";
1981 ot->idname =
"SCENE_OT_freestyle_lineset_add";
1982 ot->description =
"Add a line set into the list of line sets";
1985 ot->exec = freestyle_lineset_add_exec;
1997static bool freestyle_active_lineset_poll(
bContext *
C)
2020 ot->name =
"Copy Line Set";
2021 ot->idname =
"SCENE_OT_freestyle_lineset_copy";
2022 ot->description =
"Copy the active line set to the internal clipboard";
2025 ot->exec = freestyle_lineset_copy_exec;
2026 ot->poll = freestyle_active_lineset_poll;
2054 ot->name =
"Paste Line Set";
2055 ot->idname =
"SCENE_OT_freestyle_lineset_paste";
2056 ot->description =
"Paste the internal clipboard content to the active line set";
2059 ot->exec = freestyle_lineset_paste_exec;
2060 ot->poll = freestyle_active_lineset_poll;
2088 ot->name =
"Remove Line Set";
2089 ot->idname =
"SCENE_OT_freestyle_lineset_remove";
2090 ot->description =
"Remove the active line set from the list of line sets";
2093 ot->exec = freestyle_lineset_remove_exec;
2094 ot->poll = freestyle_active_lineset_poll;
2123 {-1,
"UP", 0,
"Up",
""},
2124 {1,
"DOWN", 0,
"Down",
""},
2125 {0,
nullptr, 0,
nullptr,
nullptr},
2129 ot->name =
"Move Line Set";
2130 ot->idname =
"SCENE_OT_freestyle_lineset_move";
2131 ot->description =
"Change the position of the active line set within the list of line sets";
2134 ot->exec = freestyle_lineset_move_exec;
2135 ot->poll = freestyle_active_lineset_poll;
2146 "Direction to move the active line set towards");
2181 ot->name =
"New Line Style";
2182 ot->idname =
"SCENE_OT_freestyle_linestyle_new";
2183 ot->description =
"Create a new line style, reusable by multiple line sets";
2186 ot->exec = freestyle_linestyle_new_exec;
2187 ot->poll = freestyle_active_lineset_poll;
2205 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2222 ot->name =
"Add Line Color Modifier";
2223 ot->idname =
"SCENE_OT_freestyle_color_modifier_add";
2225 "Add a line color modifier to the line style associated with the active lineset";
2229 ot->exec = freestyle_color_modifier_add_exec;
2230 ot->poll = freestyle_active_lineset_poll;
2252 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2269 ot->name =
"Add Alpha Transparency Modifier";
2270 ot->idname =
"SCENE_OT_freestyle_alpha_modifier_add";
2272 "Add an alpha transparency modifier to the line style associated with the active lineset";
2276 ot->exec = freestyle_alpha_modifier_add_exec;
2277 ot->poll = freestyle_active_lineset_poll;
2299 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2316 ot->name =
"Add Line Thickness Modifier";
2317 ot->idname =
"SCENE_OT_freestyle_thickness_modifier_add";
2319 "Add a line thickness modifier to the line style associated with the active lineset";
2323 ot->exec = freestyle_thickness_modifier_add_exec;
2324 ot->poll = freestyle_active_lineset_poll;
2346 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2363 ot->name =
"Add Stroke Geometry Modifier";
2364 ot->idname =
"SCENE_OT_freestyle_geometry_modifier_add";
2366 "Add a stroke geometry modifier to the line style associated with the active lineset";
2370 ot->exec = freestyle_geometry_modifier_add_exec;
2371 ot->poll = freestyle_active_lineset_poll;
2411 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2415 switch (freestyle_get_modifier_type(&
ptr)) {
2430 op->
reports,
RPT_ERROR,
"The object the data pointer refers to is not a valid modifier");
2442 ot->name =
"Remove Modifier";
2443 ot->idname =
"SCENE_OT_freestyle_modifier_remove";
2444 ot->description =
"Remove the modifier from the list of modifiers";
2447 ot->exec = freestyle_modifier_remove_exec;
2448 ot->poll = freestyle_active_lineset_poll;
2467 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2471 switch (freestyle_get_modifier_type(&
ptr)) {
2486 op->
reports,
RPT_ERROR,
"The object the data pointer refers to is not a valid modifier");
2498 ot->name =
"Copy Modifier";
2499 ot->idname =
"SCENE_OT_freestyle_modifier_copy";
2500 ot->description =
"Duplicate the modifier within the list of modifiers";
2503 ot->exec = freestyle_modifier_copy_exec;
2504 ot->poll = freestyle_active_lineset_poll;
2523 bool changed =
false;
2525 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2529 switch (freestyle_get_modifier_type(&
ptr)) {
2544 op->
reports,
RPT_ERROR,
"The object the data pointer refers to is not a valid modifier");
2559 {-1,
"UP", 0,
"Up",
""},
2560 {1,
"DOWN", 0,
"Down",
""},
2561 {0,
nullptr, 0,
nullptr,
nullptr},
2565 ot->name =
"Move Modifier";
2566 ot->idname =
"SCENE_OT_freestyle_modifier_move";
2567 ot->description =
"Move the modifier within the list of modifiers";
2570 ot->exec = freestyle_modifier_move_exec;
2571 ot->poll = freestyle_active_lineset_poll;
2582 "Direction to move the chosen modifier towards");
2610 ot->name =
"Create Freestyle Stroke Material";
2611 ot->idname =
"SCENE_OT_freestyle_stroke_material_create";
2612 ot->description =
"Create Freestyle stroke material for testing";
2615 ot->exec = freestyle_stroke_material_create_exec;
2634 MTex **mtex_ar, *mtexswap;
2643 mtexswap = mtex_ar[act];
2644 mtex_ar[act] = mtex_ar[act - 1];
2645 mtex_ar[act - 1] = mtexswap;
2648 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, act - 1, -1,
false);
2650 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, act, act - 1,
false);
2652 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, -1, act,
false);
2659 mtexswap = mtex_ar[act];
2660 mtex_ar[act] = mtex_ar[act + 1];
2661 mtex_ar[act + 1] = mtexswap;
2664 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, act + 1, -1,
false);
2666 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, act, act + 1,
false);
2668 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, -1, act,
false);
2684 {-1,
"UP", 0,
"Up",
""},
2685 {1,
"DOWN", 0,
"Down",
""},
2686 {0,
nullptr, 0,
nullptr,
nullptr},
2690 ot->name =
"Move Texture Slot";
2691 ot->idname =
"TEXTURE_OT_slot_move";
2692 ot->description =
"Move texture slots up and down";
2716 if (ma ==
nullptr) {
2732 PartialWriteContext::IDAddOperations::SET_CLIPBOARD_MARK |
2733 PartialWriteContext::IDAddOperations::ADD_DEPENDENCIES)},
2749 ot->name =
"Copy Material";
2750 ot->idname =
"MATERIAL_OT_copy";
2751 ot->description =
"Copy the material settings and nodes";
2792 ID *id_local =
static_cast<ID *
>(
2812 if (ma ==
nullptr) {
2859 if (ma_from ==
nullptr) {
2889#define SWAP_MEMBER(member) std::swap(ma->member, ma_from->member)
2960 ot->name =
"Paste Material";
2961 ot->idname =
"MATERIAL_OT_paste";
2962 ot->description =
"Paste the material settings and nodes";
2988 MTex **mtex =
nullptr;
2990 switch (
GS(
id->name)) {
3001 if (mtex && *mtex) {
3012 MTex **mtex =
nullptr;
3018 switch (
GS(
id->name)) {
3031 if (*mtex ==
nullptr) {
3034 else if ((*mtex)->tex) {
3049 (*mtex)->tex =
nullptr;
3052 (*mtex)->object =
nullptr;
3069 if (
id ==
nullptr) {
3084 return (
id !=
nullptr);
3090 ot->name =
"Copy Texture Slot Settings";
3091 ot->idname =
"TEXTURE_OT_slot_copy";
3092 ot->description =
"Copy the material texture settings and nodes";
3113 if (
id ==
nullptr) {
3135 else if (linestyle) {
3136 id = &linestyle->
id;
3139 if (
id ==
nullptr) {
3154 ot->name =
"Paste Texture Slot Settings";
3155 ot->idname =
"TEXTURE_OT_slot_paste";
3156 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)
void CTX_wm_operator_poll_msg_set(bContext *C, const char *msg)
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)
void void BKE_libblock_remap(Main *bmain, void *old_idv, void *new_idv, int remap_flags) ATTR_NONNULL(1
@ ID_REMAP_FORCE_UI_POINTERS
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_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.
#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)
bool EDBM_deselect_by_material(BMEditMesh *em, short index, bool select)
void ED_node_shader_default(const bContext *C, Main *bmain, 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)
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)
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)
static struct PyModuleDef module
void ED_render_clear_mtex_copybuf()
static wmOperatorStatus material_slot_assign_exec(bContext *C, wmOperator *)
void OBJECT_OT_material_slot_remove_all(wmOperatorType *ot)
@ LIGHTCACHE_SUBSET_ACTIVE
@ LIGHTCACHE_SUBSET_SELECTED
static wmOperatorStatus render_view_remove_exec(bContext *C, wmOperator *)
void OBJECT_OT_material_slot_add(wmOperatorType *ot)
static wmOperatorStatus paste_mtex_exec(bContext *C, wmOperator *)
void OBJECT_OT_material_slot_deselect(wmOperatorType *ot)
static bool material_slot_remove_poll(bContext *C)
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)
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)
static wmOperatorStatus new_material_exec(bContext *C, wmOperator *)
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 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)
void OBJECT_OT_lightprobe_cache_bake(wmOperatorType *ot)
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 *)
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)
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_remove_exec(bContext *C, wmOperator *)
void MATERIAL_OT_paste(wmOperatorType *ot)
static wmOperatorStatus material_slot_deselect_exec(bContext *C, wmOperator *)
static wmOperatorStatus view_layer_add_exec(bContext *C, wmOperator *op)
void MATERIAL_OT_new(wmOperatorType *ot)
void SCENE_OT_view_layer_add(wmOperatorType *ot)
static wmOperatorStatus view_layer_add_lightgroup_exec(bContext *C, wmOperator *op)
void OBJECT_OT_material_slot_move(wmOperatorType *ot)
static wmOperatorStatus view_layer_add_aov_exec(bContext *C, wmOperator *)
void SCENE_OT_view_layer_add_used_lightgroups(wmOperatorType *ot)
void TEXTURE_OT_new(wmOperatorType *ot)
static bool render_view_remove_poll(bContext *C)
static bool object_materials_supported_poll(bContext *C)
void MATERIAL_OT_copy(wmOperatorType *ot)
static wmOperatorStatus material_slot_move_exec(bContext *C, wmOperator *op)
static wmOperatorStatus new_texture_exec(bContext *C, wmOperator *op)
void SCENE_OT_view_layer_remove_lightgroup(wmOperatorType *ot)
static int paste_material_nodetree_ids_decref(LibraryIDLinkCallbackData *cb_data)
static wmOperatorStatus render_view_add_exec(bContext *C, wmOperator *)
void TEXTURE_OT_slot_paste(wmOperatorType *ot)
static Vector< Object * > object_array_for_shading_edit_mode_enabled(bContext *C)
static wmOperatorStatus view_layer_remove_lightgroup_exec(bContext *C, wmOperator *)
void SCENE_OT_view_layer_add_aov(wmOperatorType *ot)
static wmOperatorStatus view_layer_remove_exec(bContext *C, wmOperator *)
void TEXTURE_OT_slot_copy(wmOperatorType *ot)
static int paste_material_nodetree_ids_relink_or_clear(LibraryIDLinkCallbackData *cb_data)
static wmOperatorStatus view_layer_remove_aov_exec(bContext *C, wmOperator *)
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 wmOperatorStatus paste_material_exec(bContext *C, wmOperator *op)
static bool material_slot_populated_poll(bContext *C)
void SCENE_OT_view_layer_add_lightgroup(wmOperatorType *ot)
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)
void SCENE_OT_render_view_remove(wmOperatorType *ot)
#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)
std::string RNA_string_get(PointerRNA *ptr, const char *name)
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 * compositing_node_group
struct FreestyleConfig freestyle_config
ViewLayerLightgroup * active_lightgroup
ViewLayerAOV * active_aov
struct LightgroupMembership * lightgroup
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)