Blender  V3.3
render_shading.cc File Reference
#include <cstdlib>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "DNA_curve_types.h"
#include "DNA_light_types.h"
#include "DNA_lightprobe_types.h"
#include "DNA_material_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
#include "DNA_space_types.h"
#include "DNA_world_types.h"
#include "BLI_listbase.h"
#include "BLI_math_vector.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
#include "BKE_anim_data.h"
#include "BKE_animsys.h"
#include "BKE_brush.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_editmesh.h"
#include "BKE_global.h"
#include "BKE_image.h"
#include "BKE_layer.h"
#include "BKE_lib_id.h"
#include "BKE_linestyle.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_node.h"
#include "BKE_object.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_texture.h"
#include "BKE_vfont.h"
#include "BKE_workspace.h"
#include "BKE_world.h"
#include "NOD_composite.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "RNA_access.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_curve.h"
#include "ED_mesh.h"
#include "ED_node.h"
#include "ED_object.h"
#include "ED_paint.h"
#include "ED_render.h"
#include "ED_scene.h"
#include "ED_screen.h"
#include "RNA_define.h"
#include "RNA_prototypes.h"
#include "UI_interface.h"
#include "RE_engine.h"
#include "RE_pipeline.h"
#include "engines/eevee/eevee_lightcache.h"
#include "render_intern.hh"

Go to the source code of this file.

Functions

Shared Operator Poll Functions
static bool object_materials_supported_poll_ex (bContext *C, const Object *ob)
 
static bool object_materials_supported_poll (bContext *C)
 
Local Utilities
static bool object_array_for_shading_edit_mode_enabled_filter (const Object *ob, void *user_data)
 
static Object ** object_array_for_shading_edit_mode_enabled (bContext *C, uint *r_objects_len)
 
static bool object_array_for_shading_edit_mode_disabled_filter (const Object *ob, void *user_data)
 
static Object ** object_array_for_shading_edit_mode_disabled (bContext *C, uint *r_objects_len)
 
Material Slot Add Operator
static int material_slot_add_exec (bContext *C, wmOperator *UNUSED(op))
 
void OBJECT_OT_material_slot_add (wmOperatorType *ot)
 
Material Slot Remove Operator
static int material_slot_remove_exec (bContext *C, wmOperator *op)
 
void OBJECT_OT_material_slot_remove (wmOperatorType *ot)
 
Material Slot Assign Operator
static int material_slot_assign_exec (bContext *C, wmOperator *UNUSED(op))
 
void OBJECT_OT_material_slot_assign (wmOperatorType *ot)
 
Material Slot (De)Select Operator
static int material_slot_de_select (bContext *C, bool select)
 
static int material_slot_select_exec (bContext *C, wmOperator *UNUSED(op))
 
void OBJECT_OT_material_slot_select (wmOperatorType *ot)
 
static int material_slot_deselect_exec (bContext *C, wmOperator *UNUSED(op))
 
void OBJECT_OT_material_slot_deselect (wmOperatorType *ot)
 
Material Slot Copy Operator
static int material_slot_copy_exec (bContext *C, wmOperator *UNUSED(op))
 
void OBJECT_OT_material_slot_copy (wmOperatorType *ot)
 
Material Slot Move Operator
static int material_slot_move_exec (bContext *C, wmOperator *op)
 
void OBJECT_OT_material_slot_move (wmOperatorType *ot)
 
Material Slot Remove Unused Operator
static int material_slot_remove_unused_exec (bContext *C, wmOperator *op)
 
void OBJECT_OT_material_slot_remove_unused (wmOperatorType *ot)
 
New Material Operator
static int new_material_exec (bContext *C, wmOperator *UNUSED(op))
 
void MATERIAL_OT_new (wmOperatorType *ot)
 
New Texture Operator
static int new_texture_exec (bContext *C, wmOperator *UNUSED(op))
 
void TEXTURE_OT_new (wmOperatorType *ot)
 
new world operator
static int new_world_exec (bContext *C, wmOperator *UNUSED(op))
 
void WORLD_OT_new (wmOperatorType *ot)
 
Render Layer Add Operator
static int view_layer_add_exec (bContext *C, wmOperator *op)
 
void SCENE_OT_view_layer_add (wmOperatorType *ot)
 
Render Layer Remove Operator
static bool view_layer_remove_poll (bContext *C)
 
static int view_layer_remove_exec (bContext *C, wmOperator *UNUSED(op))
 
void SCENE_OT_view_layer_remove (wmOperatorType *ot)
 
View Layer Add AOV Operator
static int view_layer_add_aov_exec (bContext *C, wmOperator *UNUSED(op))
 
void SCENE_OT_view_layer_add_aov (wmOperatorType *ot)
 
View Layer Remove AOV Operator
static int view_layer_remove_aov_exec (bContext *C, wmOperator *UNUSED(op))
 
void SCENE_OT_view_layer_remove_aov (wmOperatorType *ot)
 
View Layer Add Lightgroup Operator
static int view_layer_add_lightgroup_exec (bContext *C, wmOperator *op)
 
void SCENE_OT_view_layer_add_lightgroup (wmOperatorType *ot)
 
View Layer Remove Lightgroup Operator
static int view_layer_remove_lightgroup_exec (bContext *C, wmOperator *UNUSED(op))
 
void SCENE_OT_view_layer_remove_lightgroup (wmOperatorType *ot)
 
View Layer Add Used Lightgroups Operator
static GSetget_used_lightgroups (Scene *scene)
 
static int view_layer_add_used_lightgroups_exec (bContext *C, wmOperator *UNUSED(op))
 
void SCENE_OT_view_layer_add_used_lightgroups (wmOperatorType *ot)
 
View Layer Remove Unused Lightgroups Operator
static int view_layer_remove_unused_lightgroups_exec (bContext *C, wmOperator *UNUSED(op))
 
void SCENE_OT_view_layer_remove_unused_lightgroups (wmOperatorType *ot)
 
Light Cache Free Operator
static bool light_cache_free_poll (bContext *C)
 
static int light_cache_free_exec (bContext *C, wmOperator *UNUSED(op))
 
void SCENE_OT_light_cache_free (wmOperatorType *ot)
 
Render View Remove Operator
static bool render_view_remove_poll (bContext *C)
 
static int render_view_add_exec (bContext *C, wmOperator *UNUSED(op))
 
void SCENE_OT_render_view_add (wmOperatorType *ot)
 
Render View Add Operator
static int render_view_remove_exec (bContext *C, wmOperator *UNUSED(op))
 
void SCENE_OT_render_view_remove (wmOperatorType *ot)
 
Texture Slot Move Operator
static int texture_slot_move_exec (bContext *C, wmOperator *op)
 
void TEXTURE_OT_slot_move (wmOperatorType *ot)
 
Material Copy Operator
static int copy_material_exec (bContext *C, wmOperator *UNUSED(op))
 
void MATERIAL_OT_copy (wmOperatorType *ot)
 
Material Paste Operator
static int paste_material_exec (bContext *C, wmOperator *UNUSED(op))
 
void MATERIAL_OT_paste (wmOperatorType *ot)
 
Texture Slot Copy Operator
static int copy_mtex_exec (bContext *C, wmOperator *UNUSED(op))
 
static bool copy_mtex_poll (bContext *C)
 
void TEXTURE_OT_slot_copy (wmOperatorType *ot)
 
Texture Slot Paste Operator
static int paste_mtex_exec (bContext *C, wmOperator *UNUSED(op))
 
void TEXTURE_OT_slot_paste (wmOperatorType *ot)
 

Light Cache Bake Operator

enum  { LIGHTCACHE_SUBSET_ALL = 0 , LIGHTCACHE_SUBSET_DIRTY , LIGHTCACHE_SUBSET_CUBE }
 
static void light_cache_bake_tag_cache (Scene *scene, wmOperator *op)
 
static int light_cache_bake_modal (bContext *C, wmOperator *op, const wmEvent *event)
 
static void light_cache_bake_cancel (bContext *C, wmOperator *op)
 
static int light_cache_bake_exec (bContext *C, wmOperator *op)
 
static int light_cache_bake_invoke (bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
 
void SCENE_OT_light_cache_bake (wmOperatorType *ot)
 

#MTex Copy/Paste Utilities

static short mtexcopied = 0
 
static MTex mtexcopybuf
 
void ED_render_clear_mtex_copybuf ()
 
static void copy_mtex_copybuf (ID *id)
 
static void paste_mtex_copybuf (ID *id)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
LIGHTCACHE_SUBSET_ALL 
LIGHTCACHE_SUBSET_DIRTY 
LIGHTCACHE_SUBSET_CUBE 

Definition at line 1331 of file render_shading.cc.

Function Documentation

◆ copy_material_exec()

static int copy_material_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ copy_mtex_copybuf()

static void copy_mtex_copybuf ( ID id)
static

Definition at line 2600 of file render_shading.cc.

References GS, id, ID_LS, ID_PA, mtexcopied, mtexcopybuf, and ID::name.

Referenced by copy_mtex_exec().

◆ copy_mtex_exec()

static int copy_mtex_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ copy_mtex_poll()

static bool copy_mtex_poll ( bContext C)
static

Definition at line 2679 of file render_shading.cc.

References C, CTX_data_pointer_get_type(), and PointerRNA::owner_id.

Referenced by TEXTURE_OT_slot_copy().

◆ ED_render_clear_mtex_copybuf()

void ED_render_clear_mtex_copybuf ( void  )

Definition at line 2595 of file render_shading.cc.

References mtexcopied.

Referenced by copy_mtex_exec(), and WM_init().

◆ get_used_lightgroups()

static GSet* get_used_lightgroups ( Scene scene)
static

◆ light_cache_bake_cancel()

static void light_cache_bake_cancel ( bContext C,
wmOperator op 
)
static

◆ light_cache_bake_exec()

static int light_cache_bake_exec ( bContext C,
wmOperator op 
)
static

◆ light_cache_bake_invoke()

static int light_cache_bake_invoke ( bContext C,
wmOperator op,
const wmEvent UNUSEDevent 
)
static

◆ light_cache_bake_modal()

static int light_cache_bake_modal ( bContext C,
wmOperator op,
const wmEvent event 
)
static

◆ light_cache_bake_tag_cache()

static void light_cache_bake_tag_cache ( Scene scene,
wmOperator op 
)
static

◆ light_cache_free_exec()

static int light_cache_free_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ light_cache_free_poll()

static bool light_cache_free_poll ( bContext C)
static

◆ MATERIAL_OT_copy()

void MATERIAL_OT_copy ( wmOperatorType ot)

◆ MATERIAL_OT_new()

void MATERIAL_OT_new ( wmOperatorType ot)

◆ MATERIAL_OT_paste()

void MATERIAL_OT_paste ( wmOperatorType ot)

◆ material_slot_add_exec()

static int material_slot_add_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ material_slot_assign_exec()

static int material_slot_assign_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ material_slot_copy_exec()

static int material_slot_copy_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ material_slot_de_select()

static int material_slot_de_select ( bContext C,
bool  select 
)
static

◆ material_slot_deselect_exec()

static int material_slot_deselect_exec ( bContext C,
wmOperator UNUSEDop 
)
static

Definition at line 497 of file render_shading.cc.

References C, and material_slot_de_select().

Referenced by OBJECT_OT_material_slot_deselect().

◆ material_slot_move_exec()

static int material_slot_move_exec ( bContext C,
wmOperator op 
)
static

◆ material_slot_remove_exec()

static int material_slot_remove_exec ( bContext C,
wmOperator op 
)
static

◆ material_slot_remove_unused_exec()

static int material_slot_remove_unused_exec ( bContext C,
wmOperator op 
)
static

◆ material_slot_select_exec()

static int material_slot_select_exec ( bContext C,
wmOperator UNUSEDop 
)
static

Definition at line 478 of file render_shading.cc.

References C, and material_slot_de_select().

Referenced by OBJECT_OT_material_slot_select().

◆ new_material_exec()

static int new_material_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ new_texture_exec()

static int new_texture_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ new_world_exec()

static int new_world_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ object_array_for_shading_edit_mode_disabled()

static Object** object_array_for_shading_edit_mode_disabled ( bContext C,
uint r_objects_len 
)
static

◆ object_array_for_shading_edit_mode_disabled_filter()

static bool object_array_for_shading_edit_mode_disabled_filter ( const Object ob,
void user_data 
)
static

◆ object_array_for_shading_edit_mode_enabled()

static Object** object_array_for_shading_edit_mode_enabled ( bContext C,
uint r_objects_len 
)
static

◆ object_array_for_shading_edit_mode_enabled_filter()

static bool object_array_for_shading_edit_mode_enabled_filter ( const Object ob,
void user_data 
)
static

◆ object_materials_supported_poll()

static bool object_materials_supported_poll ( bContext C)
static

◆ object_materials_supported_poll_ex()

static bool object_materials_supported_poll_ex ( bContext C,
const Object ob 
)
static

◆ OBJECT_OT_material_slot_add()

void OBJECT_OT_material_slot_add ( wmOperatorType ot)

◆ OBJECT_OT_material_slot_assign()

void OBJECT_OT_material_slot_assign ( wmOperatorType ot)

◆ OBJECT_OT_material_slot_copy()

void OBJECT_OT_material_slot_copy ( wmOperatorType ot)

◆ OBJECT_OT_material_slot_deselect()

void OBJECT_OT_material_slot_deselect ( wmOperatorType ot)

◆ OBJECT_OT_material_slot_move()

void OBJECT_OT_material_slot_move ( wmOperatorType ot)

◆ OBJECT_OT_material_slot_remove()

void OBJECT_OT_material_slot_remove ( wmOperatorType ot)

◆ OBJECT_OT_material_slot_remove_unused()

void OBJECT_OT_material_slot_remove_unused ( wmOperatorType ot)

◆ OBJECT_OT_material_slot_select()

void OBJECT_OT_material_slot_select ( wmOperatorType ot)

◆ paste_material_exec()

static int paste_material_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ paste_mtex_copybuf()

static void paste_mtex_copybuf ( ID id)
static

◆ paste_mtex_exec()

static int paste_mtex_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ render_view_add_exec()

static int render_view_add_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ render_view_remove_exec()

static int render_view_remove_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ render_view_remove_poll()

static bool render_view_remove_poll ( bContext C)
static

Definition at line 1550 of file render_shading.cc.

References RenderData::actview, C, CTX_data_scene(), Scene::r, and scene.

Referenced by SCENE_OT_render_view_remove().

◆ SCENE_OT_light_cache_bake()

void SCENE_OT_light_cache_bake ( wmOperatorType ot)

◆ SCENE_OT_light_cache_free()

void SCENE_OT_light_cache_free ( wmOperatorType ot)

◆ SCENE_OT_render_view_add()

void SCENE_OT_render_view_add ( wmOperatorType ot)

◆ SCENE_OT_render_view_remove()

void SCENE_OT_render_view_remove ( wmOperatorType ot)

◆ SCENE_OT_view_layer_add()

void SCENE_OT_view_layer_add ( wmOperatorType ot)

◆ SCENE_OT_view_layer_add_aov()

void SCENE_OT_view_layer_add_aov ( wmOperatorType ot)

◆ SCENE_OT_view_layer_add_lightgroup()

void SCENE_OT_view_layer_add_lightgroup ( wmOperatorType ot)

◆ SCENE_OT_view_layer_add_used_lightgroups()

void SCENE_OT_view_layer_add_used_lightgroups ( wmOperatorType ot)

◆ SCENE_OT_view_layer_remove()

void SCENE_OT_view_layer_remove ( wmOperatorType ot)

◆ SCENE_OT_view_layer_remove_aov()

void SCENE_OT_view_layer_remove_aov ( wmOperatorType ot)

◆ SCENE_OT_view_layer_remove_lightgroup()

void SCENE_OT_view_layer_remove_lightgroup ( wmOperatorType ot)

◆ SCENE_OT_view_layer_remove_unused_lightgroups()

void SCENE_OT_view_layer_remove_unused_lightgroups ( wmOperatorType ot)

◆ TEXTURE_OT_new()

void TEXTURE_OT_new ( wmOperatorType ot)

◆ TEXTURE_OT_slot_copy()

void TEXTURE_OT_slot_copy ( wmOperatorType ot)

◆ TEXTURE_OT_slot_move()

void TEXTURE_OT_slot_move ( wmOperatorType ot)

◆ TEXTURE_OT_slot_paste()

void TEXTURE_OT_slot_paste ( wmOperatorType ot)

◆ texture_slot_move_exec()

static int texture_slot_move_exec ( bContext C,
wmOperator op 
)
static

◆ view_layer_add_aov_exec()

static int view_layer_add_aov_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ view_layer_add_exec()

static int view_layer_add_exec ( bContext C,
wmOperator op 
)
static

◆ view_layer_add_lightgroup_exec()

static int view_layer_add_lightgroup_exec ( bContext C,
wmOperator op 
)
static

◆ view_layer_add_used_lightgroups_exec()

static int view_layer_add_used_lightgroups_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ view_layer_remove_aov_exec()

static int view_layer_remove_aov_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ view_layer_remove_exec()

static int view_layer_remove_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ view_layer_remove_lightgroup_exec()

static int view_layer_remove_lightgroup_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ view_layer_remove_poll()

static bool view_layer_remove_poll ( bContext C)
static

◆ view_layer_remove_unused_lightgroups_exec()

static int view_layer_remove_unused_lightgroups_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ WORLD_OT_new()

void WORLD_OT_new ( wmOperatorType ot)

Variable Documentation

◆ mtexcopied

short mtexcopied = 0
static

◆ mtexcopybuf

MTex mtexcopybuf
static

Definition at line 2593 of file render_shading.cc.

Referenced by copy_mtex_copybuf(), and paste_mtex_copybuf().