95#include "RNA_prototypes.hh"
217 ot->name =
"Add Material Slot";
218 ot->idname =
"OBJECT_OT_material_slot_add";
219 ot->description =
"Add a new material slot";
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) {
304 mat_nr_active = obact->
actcol - 1;
309 for (
int i = 0;
i < ob->totcol;
i++) {
311 if (mat_active == mat) {
316 if (mat_nr_active == -1) {
321 bool changed =
false;
331 efa->
mat_nr = mat_nr_active;
343 nu->mat_nr = mat_nr_active;
348 else if (ob->type ==
OB_FONT) {
349 const Curve *cu =
static_cast<const Curve *
>(ob->data);
351 int i, selstart, selend;
354 for (
i = selstart;
i <= selend;
i++) {
362 changed_multi =
true;
374 ot->name =
"Assign Material Slot";
375 ot->idname =
"OBJECT_OT_material_slot_assign";
376 ot->description =
"Assign active material slot to selection";
394 bool changed_multi =
false;
399 for (
Object *ob : objects) {
400 if (ob->totcol == 0) {
405 ob, mat_active, obact ? obact->
actcol - 1 : -1);
407 if (mat_nr_active == -1) {
411 bool changed =
false;
428 if (nu->mat_nr == mat_nr_active) {
433 if (bezt->
hide == 0) {
450 a = nu->pntsu * nu->pntsv;
471 changed_multi =
true;
488 ot->name =
"Select Material Slot";
489 ot->idname =
"OBJECT_OT_material_slot_select";
490 ot->description =
"Select by active material slot";
507 ot->name =
"Deselect Material Slot";
508 ot->idname =
"OBJECT_OT_material_slot_deselect";
509 ot->description =
"Deselect by active material slot";
541 matar[
i] = ob->
matbits[
i] ? (*matar_object)[
i] : (*matar_obdata)[
i];
548 const bool is_same_obdata = ob->
data == ob_iter->data;
553 if (is_same_obdata) {
563 if (ob_iter->totcol == ob->
totcol) {
564 ob_iter->actcol = ob->
actcol;
580 ot->name =
"Copy Material to Selected";
581 ot->idname =
"OBJECT_OT_material_slot_copy";
582 ot->description =
"Copy material to selected objects";
606 if (!ob || ob->
totcol < 2) {
611 if (dir == 1 && ob->
actcol > 1) {
612 index_pair[0] = ob->
actcol - 2;
613 index_pair[1] = ob->
actcol - 1;
618 index_pair[0] = ob->
actcol - 1;
619 index_pair[1] = ob->
actcol - 0;
630 slot_remap[index_pair[0]] = index_pair[1];
631 slot_remap[index_pair[1]] = index_pair[0];
647 {1,
"UP", 0,
"Up",
""},
648 {-1,
"DOWN", 0,
"Down",
""},
649 {0,
nullptr, 0,
nullptr,
nullptr},
653 ot->name =
"Move Material";
654 ot->idname =
"OBJECT_OT_material_slot_move";
655 ot->description =
"Move the active material up/down in the list";
669 "Direction to move the active material towards");
691 for (
Object *ob : objects) {
692 int actcol = ob->actcol;
693 for (
int slot = 1; slot <= ob->totcol; slot++) {
698 if (actcol >= slot) {
732 ot->name =
"Remove Unused Slots";
733 ot->idname =
"OBJECT_OT_material_slot_remove_unused";
734 ot->description =
"Remove unused material slots";
756 for (
Object *ob : objects) {
757 int actcol = ob->actcol;
758 for (
int slot = 1; slot <= ob->totcol; slot++) {
759 while (slot <= ob->totcol) {
763 if (actcol >= slot) {
797 ot->name =
"Remove All Materials";
798 ot->idname =
"OBJECT_OT_material_slot_remove_all";
799 ot->description =
"Remove all materials";
836 const char *name =
DATA_(
"Material");
877 ot->name =
"New Material";
878 ot->idname =
"MATERIAL_OT_new";
879 ot->description =
"Add a new material";
913 bool linked_id_created =
false;
929 if (!linked_id_created) {
941 ot->name =
"New Texture";
942 ot->idname =
"TEXTURE_OT_new";
943 ot->description =
"Add a new texture";
1002 ot->name =
"New World";
1003 ot->idname =
"WORLD_OT_new";
1004 ot->description =
"Create a new world Data-Block";
1028 if (view_layer_current ==
nullptr) {
1033 scene, view_layer_current ? view_layer_current->
name :
nullptr, view_layer_current, type);
1050 {
VIEWLAYER_ADD_COPY,
"COPY", 0,
"Copy Settings",
"Copy settings of current view layer"},
1055 "Add a new view layer with all collections disabled"},
1056 {0,
nullptr, 0,
nullptr,
nullptr},
1060 ot->name =
"Add View Layer";
1061 ot->idname =
"SCENE_OT_view_layer_add";
1062 ot->description =
"Add a view layer";
1105 ot->name =
"Remove View Layer";
1106 ot->idname =
"SCENE_OT_view_layer_remove";
1107 ot->description =
"Remove the selected view layer";
1154 ot->name =
"Add AOV";
1155 ot->idname =
"SCENE_OT_view_layer_add_aov";
1156 ot->description =
"Add a Shader AOV";
1206 ot->name =
"Remove AOV";
1207 ot->idname =
"SCENE_OT_view_layer_remove_aov";
1208 ot->description =
"Remove Active AOV";
1236 if (
STREQ(lightgroup->name, name)) {
1258 ot->name =
"Add Lightgroup";
1259 ot->idname =
"SCENE_OT_view_layer_add_lightgroup";
1260 ot->description =
"Add a Light Group";
1274 "Name of newly created lightgroup");
1308 ot->name =
"Remove Lightgroup";
1309 ot->idname =
"SCENE_OT_view_layer_remove_lightgroup";
1310 ot->description =
"Remove Active Lightgroup";
1330 if (ob->lightgroup && ob->lightgroup->name[0]) {
1331 used_lightgroups.
add_as(ob->lightgroup->name);
1340 return used_lightgroups;
1351 used_lightgroup.c_str(),
1372 ot->name =
"Add Used Lightgroups";
1373 ot->idname =
"SCENE_OT_view_layer_add_used_lightgroups";
1374 ot->description =
"Add all used Light Groups";
1396 if (!used_lightgroups.
contains_as(lightgroup->name)) {
1415 ot->name =
"Remove Unused Lightgroups";
1416 ot->idname =
"SCENE_OT_view_layer_remove_unused_lightgroups";
1417 ot->description =
"Remove all unused Light Groups";
1444 auto is_irradiance_volume = [](
Object *ob) ->
bool {
1451 auto irradiance_volume_setup = [&](
Object *ob) {
1462 if (is_irradiance_volume(ob)) {
1463 irradiance_volume_setup(ob);
1474 view_layer,
nullptr, ¶meters);
1475 for (
Object *ob : objects) {
1476 if (is_irradiance_volume(ob)) {
1477 irradiance_volume_setup(ob);
1484 if (is_irradiance_volume(active_ob)) {
1485 irradiance_volume_setup(active_ob);
1523 data->scene = scene;
1527 wm, win, bmain, view_layer, scene, probes,
data->report, scene->
r.
cfra, 0);
1528 if (wm_job ==
nullptr) {
1554 std::string report =
data->report;
1559 if (!report.empty()) {
1567 switch (event->
type) {
1599 bmain, view_layer, scene, probes, report, scene->
r.
cfra);
1601 wmJobWorkerStatus worker_status = {};
1607 if (!report.empty()) {
1623 "Only bake selected light probe volumes"},
1628 "Only bake the active light probe volume"},
1629 {0,
nullptr, 0,
nullptr,
nullptr},
1633 ot->name =
"Bake Light Cache";
1634 ot->idname =
"OBJECT_OT_lightprobe_cache_bake";
1635 ot->description =
"Bake irradiance volume light cache";
1644 ot->srna,
"subset", light_cache_subset_items, 0,
"Subset",
"Subset of probes to update");
1664 for (
Object *
object : probes) {
1665 if (object->lightprobe_cache ==
nullptr) {
1684 "Delete all light probes' baked lighting data"},
1689 "Only delete selected light probes' baked lighting data"},
1694 "Only delete the active light probe's baked lighting data"},
1695 {0,
nullptr, 0,
nullptr,
nullptr},
1699 ot->name =
"Delete Light Cache";
1700 ot->idname =
"OBJECT_OT_lightprobe_cache_free";
1701 ot->description =
"Delete cached indirect lighting";
1709 lightprobe_subset_items,
1712 "Subset of probes to update");
1748 ot->name =
"Add Render View";
1749 ot->idname =
"SCENE_OT_render_view_add";
1750 ot->description =
"Add a render view";
1787 ot->name =
"Remove Render View";
1788 ot->idname =
"SCENE_OT_render_view_remove";
1789 ot->description =
"Remove the selected render view";
1801#ifdef WITH_FREESTYLE
1812 "No active lineset and associated line style to manipulate the modifier");
1818 "The active lineset does not have a line style (indicating data corruption)");
1825static bool freestyle_active_module_poll(
bContext *
C)
1830 return module != nullptr;
1848 ot->name =
"Add Freestyle Module";
1849 ot->idname =
"SCENE_OT_freestyle_module_add";
1850 ot->description =
"Add a style module into the list of modules";
1853 ot->exec = freestyle_module_add_exec;
1883 ot->name =
"Remove Freestyle Module";
1884 ot->idname =
"SCENE_OT_freestyle_module_remove";
1885 ot->description =
"Remove the style module from the stack";
1888 ot->poll = freestyle_active_module_poll;
1889 ot->exec = freestyle_module_remove_exec;
1920 {-1,
"UP", 0,
"Up",
""},
1921 {1,
"DOWN", 0,
"Down",
""},
1922 {0,
nullptr, 0,
nullptr,
nullptr},
1926 ot->name =
"Move Freestyle Module";
1927 ot->idname =
"SCENE_OT_freestyle_module_move";
1928 ot->description =
"Change the position of the style module within in the list of style modules";
1931 ot->poll = freestyle_active_module_poll;
1932 ot->exec = freestyle_module_move_exec;
1943 "Direction to move the chosen style module towards");
1969 ot->name =
"Add Line Set";
1970 ot->idname =
"SCENE_OT_freestyle_lineset_add";
1971 ot->description =
"Add a line set into the list of line sets";
1974 ot->exec = freestyle_lineset_add_exec;
1986static bool freestyle_active_lineset_poll(
bContext *
C)
2009 ot->name =
"Copy Line Set";
2010 ot->idname =
"SCENE_OT_freestyle_lineset_copy";
2011 ot->description =
"Copy the active line set to the internal clipboard";
2014 ot->exec = freestyle_lineset_copy_exec;
2015 ot->poll = freestyle_active_lineset_poll;
2043 ot->name =
"Paste Line Set";
2044 ot->idname =
"SCENE_OT_freestyle_lineset_paste";
2045 ot->description =
"Paste the internal clipboard content to the active line set";
2048 ot->exec = freestyle_lineset_paste_exec;
2049 ot->poll = freestyle_active_lineset_poll;
2077 ot->name =
"Remove Line Set";
2078 ot->idname =
"SCENE_OT_freestyle_lineset_remove";
2079 ot->description =
"Remove the active line set from the list of line sets";
2082 ot->exec = freestyle_lineset_remove_exec;
2083 ot->poll = freestyle_active_lineset_poll;
2112 {-1,
"UP", 0,
"Up",
""},
2113 {1,
"DOWN", 0,
"Down",
""},
2114 {0,
nullptr, 0,
nullptr,
nullptr},
2118 ot->name =
"Move Line Set";
2119 ot->idname =
"SCENE_OT_freestyle_lineset_move";
2120 ot->description =
"Change the position of the active line set within the list of line sets";
2123 ot->exec = freestyle_lineset_move_exec;
2124 ot->poll = freestyle_active_lineset_poll;
2135 "Direction to move the active line set towards");
2170 ot->name =
"New Line Style";
2171 ot->idname =
"SCENE_OT_freestyle_linestyle_new";
2172 ot->description =
"Create a new line style, reusable by multiple line sets";
2175 ot->exec = freestyle_linestyle_new_exec;
2176 ot->poll = freestyle_active_lineset_poll;
2194 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2211 ot->name =
"Add Line Color Modifier";
2212 ot->idname =
"SCENE_OT_freestyle_color_modifier_add";
2214 "Add a line color modifier to the line style associated with the active lineset";
2218 ot->exec = freestyle_color_modifier_add_exec;
2219 ot->poll = freestyle_active_lineset_poll;
2241 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2258 ot->name =
"Add Alpha Transparency Modifier";
2259 ot->idname =
"SCENE_OT_freestyle_alpha_modifier_add";
2261 "Add an alpha transparency modifier to the line style associated with the active lineset";
2265 ot->exec = freestyle_alpha_modifier_add_exec;
2266 ot->poll = freestyle_active_lineset_poll;
2288 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2305 ot->name =
"Add Line Thickness Modifier";
2306 ot->idname =
"SCENE_OT_freestyle_thickness_modifier_add";
2308 "Add a line thickness modifier to the line style associated with the active lineset";
2312 ot->exec = freestyle_thickness_modifier_add_exec;
2313 ot->poll = freestyle_active_lineset_poll;
2335 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2352 ot->name =
"Add Stroke Geometry Modifier";
2353 ot->idname =
"SCENE_OT_freestyle_geometry_modifier_add";
2355 "Add a stroke geometry modifier to the line style associated with the active lineset";
2359 ot->exec = freestyle_geometry_modifier_add_exec;
2360 ot->poll = freestyle_active_lineset_poll;
2400 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2404 switch (freestyle_get_modifier_type(&
ptr)) {
2419 op->
reports,
RPT_ERROR,
"The object the data pointer refers to is not a valid modifier");
2431 ot->name =
"Remove Modifier";
2432 ot->idname =
"SCENE_OT_freestyle_modifier_remove";
2433 ot->description =
"Remove the modifier from the list of modifiers";
2436 ot->exec = freestyle_modifier_remove_exec;
2437 ot->poll = freestyle_active_lineset_poll;
2456 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2460 switch (freestyle_get_modifier_type(&
ptr)) {
2475 op->
reports,
RPT_ERROR,
"The object the data pointer refers to is not a valid modifier");
2487 ot->name =
"Copy Modifier";
2488 ot->idname =
"SCENE_OT_freestyle_modifier_copy";
2489 ot->description =
"Duplicate the modifier within the list of modifiers";
2492 ot->exec = freestyle_modifier_copy_exec;
2493 ot->poll = freestyle_active_lineset_poll;
2512 bool changed =
false;
2514 if (!freestyle_linestyle_check_report(lineset, op->
reports)) {
2518 switch (freestyle_get_modifier_type(&
ptr)) {
2533 op->
reports,
RPT_ERROR,
"The object the data pointer refers to is not a valid modifier");
2548 {-1,
"UP", 0,
"Up",
""},
2549 {1,
"DOWN", 0,
"Down",
""},
2550 {0,
nullptr, 0,
nullptr,
nullptr},
2554 ot->name =
"Move Modifier";
2555 ot->idname =
"SCENE_OT_freestyle_modifier_move";
2556 ot->description =
"Move the modifier within the list of modifiers";
2559 ot->exec = freestyle_modifier_move_exec;
2560 ot->poll = freestyle_active_lineset_poll;
2571 "Direction to move the chosen modifier towards");
2599 ot->name =
"Create Freestyle Stroke Material";
2600 ot->idname =
"SCENE_OT_freestyle_stroke_material_create";
2601 ot->description =
"Create Freestyle stroke material for testing";
2604 ot->exec = freestyle_stroke_material_create_exec;
2623 MTex **mtex_ar, *mtexswap;
2632 mtexswap = mtex_ar[act];
2633 mtex_ar[act] = mtex_ar[act - 1];
2634 mtex_ar[act - 1] = mtexswap;
2637 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, act - 1, -1,
false);
2639 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, act, act - 1,
false);
2641 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, -1, act,
false);
2648 mtexswap = mtex_ar[act];
2649 mtex_ar[act] = mtex_ar[act + 1];
2650 mtex_ar[act + 1] = mtexswap;
2653 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, act + 1, -1,
false);
2655 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, act, act + 1,
false);
2657 id, adt,
nullptr,
"texture_slots",
nullptr,
nullptr, -1, act,
false);
2673 {-1,
"UP", 0,
"Up",
""},
2674 {1,
"DOWN", 0,
"Down",
""},
2675 {0,
nullptr, 0,
nullptr,
nullptr},
2679 ot->name =
"Move Texture Slot";
2680 ot->idname =
"TEXTURE_OT_slot_move";
2681 ot->description =
"Move texture slots up and down";
2705 if (ma ==
nullptr) {
2716 PartialWriteContext::IDAddOperations::SET_CLIPBOARD_MARK |
2717 PartialWriteContext::IDAddOperations::ADD_DEPENDENCIES)},
2733 ot->name =
"Copy Material";
2734 ot->idname =
"MATERIAL_OT_copy";
2735 ot->description =
"Copy the material settings and nodes";
2775 ID *id_local =
static_cast<ID *
>(
2795 if (ma ==
nullptr) {
2842 if (ma_from ==
nullptr) {
2872#define SWAP_MEMBER(member) std::swap(ma->member, ma_from->member)
2944 ot->name =
"Paste Material";
2945 ot->idname =
"MATERIAL_OT_paste";
2946 ot->description =
"Paste the material settings and nodes";
2972 MTex **mtex =
nullptr;
2974 switch (
GS(
id->name)) {
2985 if (mtex && *mtex) {
2996 MTex **mtex =
nullptr;
3002 switch (
GS(
id->name)) {
3015 if (*mtex ==
nullptr) {
3018 else if ((*mtex)->tex) {
3033 (*mtex)->tex =
nullptr;
3036 (*mtex)->object =
nullptr;
3053 if (
id ==
nullptr) {
3068 return (
id !=
nullptr);
3074 ot->name =
"Copy Texture Slot Settings";
3075 ot->idname =
"TEXTURE_OT_slot_copy";
3076 ot->description =
"Copy the material texture settings and nodes";
3097 if (
id ==
nullptr) {
3119 else if (linestyle) {
3120 id = &linestyle->
id;
3123 if (
id ==
nullptr) {
3138 ot->name =
"Paste Texture Slot Settings";
3139 ot->idname =
"TEXTURE_OT_slot_paste";
3140 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)
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)
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)
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 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)
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)
@ LIGHTCACHE_SUBSET_ACTIVE
@ LIGHTCACHE_SUBSET_SELECTED
void MATERIAL_OT_copy(wmOperatorType *ot)
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)
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)
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)
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
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)