Blender V2.61 - r43446
|
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_curve_types.h"
#include "DNA_lamp_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_blenlib.h"
#include "BLI_math.h"
#include "BLI_editVert.h"
#include "BLI_utildefines.h"
#include "BKE_animsys.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_depsgraph.h"
#include "BKE_font.h"
#include "BKE_global.h"
#include "BKE_icons.h"
#include "BKE_image.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_node.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_texture.h"
#include "BKE_world.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "GPU_material.h"
#include "RNA_access.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_object.h"
#include "ED_curve.h"
#include "ED_mesh.h"
#include "ED_node.h"
#include "ED_render.h"
#include "ED_screen.h"
#include "RNA_define.h"
#include "UI_interface.h"
#include "RE_pipeline.h"
#include "render_intern.h"
Go to the source code of this file.
Definition in file render_shading.c.
static int copy_material_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 827 of file render_shading.c.
References copy_matcopybuf(), CTX_data_pointer_get_type(), PointerRNA::data, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, and RNA_Material.
Referenced by MATERIAL_OT_copy().
static void copy_mtex_copybuf | ( | ID * | id | ) | [static] |
Definition at line 890 of file render_shading.c.
References GS, ID_LA, ID_MA, ID_PA, ID_WO, ID::name, and NULL.
Referenced by copy_mtex_exec().
static int copy_mtex_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 962 of file render_shading.c.
References copy_mtex_copybuf(), CTX_data_pointer_get_type(), PointerRNA::data, ED_render_clear_mtex_copybuf(), PointerRNA::id, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, and RNA_TextureSlot.
Referenced by TEXTURE_OT_slot_copy().
static int copy_mtex_poll | ( | bContext * | C | ) | [static] |
Definition at line 977 of file render_shading.c.
References CTX_data_pointer_get_type(), PointerRNA::data, PointerRNA::id, NULL, and RNA_TextureSlot.
Referenced by TEXTURE_OT_slot_copy().
void ED_render_clear_mtex_copybuf | ( | void | ) |
Definition at line 885 of file render_shading.c.
Referenced by copy_mtex_exec(), and WM_init().
static int envmap_clear_all_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 795 of file render_shading.c.
References BKE_free_envmapdata(), CTX_data_main(), Tex::env, ListBase::first, Tex::id, NA_EDITED, NC_TEXTURE, ID::next, OPERATOR_FINISHED, Main::tex, and WM_event_add_notifier().
Referenced by TEXTURE_OT_envmap_clear_all().
static int envmap_clear_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 755 of file render_shading.c.
References BKE_free_envmapdata(), CTX_data_pointer_get_type(), PointerRNA::data, Tex::env, NA_EDITED, NC_TEXTURE, OPERATOR_FINISHED, RNA_Texture, and WM_event_add_notifier().
Referenced by TEXTURE_OT_envmap_clear().
static int envmap_clear_poll | ( | bContext * | C | ) | [static] |
Definition at line 766 of file render_shading.c.
References CTX_data_pointer_get_type(), EnvMap::cube, PointerRNA::data, Tex::env, NULL, EnvMap::ok, and RNA_Texture.
Referenced by TEXTURE_OT_envmap_clear(), and TEXTURE_OT_envmap_clear_all().
static int envmap_save_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 679 of file render_shading.c.
References BKE_add_image_extension(), CTX_data_pointer_get_type(), CTX_data_scene(), PointerRNA::data, Tex::env, FILE_MAX, RenderData::im_format, ImageFormatData::imtype, NC_TEXTURE, OPERATOR_FINISHED, wmOperator::ptr, Scene::r, R_EXTENSION, RNA_string_get(), RNA_Texture, save_envmap(), RenderData::scemode, WM_cursor_wait(), and WM_event_add_notifier().
Referenced by envmap_save_invoke(), and TEXTURE_OT_envmap_save().
static int envmap_save_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 704 of file render_shading.c.
References envmap_save_exec(), G, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_string_set(), RNA_struct_property_is_set(), and WM_event_add_fileselect().
Referenced by TEXTURE_OT_envmap_save().
static int envmap_save_poll | ( | bContext * | C | ) | [static] |
Definition at line 718 of file render_shading.c.
References CTX_data_pointer_get_type(), EnvMap::cube, PointerRNA::data, Tex::env, NULL, EnvMap::ok, and RNA_Texture.
Referenced by TEXTURE_OT_envmap_save().
void MATERIAL_OT_copy | ( | wmOperatorType * | ot | ) |
Definition at line 839 of file render_shading.c.
References copy_material_exec(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, and OPTYPE_REGISTER.
Referenced by ED_operatortypes_render().
void MATERIAL_OT_new | ( | wmOperatorType * | ot | ) |
Definition at line 403 of file render_shading.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, new_material_exec(), OPTYPE_REGISTER, and OPTYPE_UNDO.
Referenced by ED_operatortypes_render().
void MATERIAL_OT_paste | ( | wmOperatorType * | ot | ) |
Definition at line 867 of file render_shading.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and paste_material_exec().
Referenced by ED_operatortypes_render().
static int material_slot_add_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 93 of file render_shading.c.
References ED_object_context(), NC_OBJECT, ND_DRAW, ND_OB_SHADING, object_add_material_slot(), OPERATOR_CANCELLED, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by OBJECT_OT_material_slot_add().
static int material_slot_assign_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 158 of file render_shading.c.
References Object::actcol, BKE_font_getselection(), Nurb::charidx, curve_editnurbs(), DAG_id_tag_update(), Object::data, ED_object_context(), ELEM, EditFace::f, EditMesh::faces, ListBase::first, i, Object::id, isNurbsel(), CharInfo::mat_nr, Nurb::mat_nr, EditFace::mat_nr, NC_GEOM, ND_DATA, Nurb::next, EditFace::next, OB_CURVE, OB_FONT, OB_MESH, OB_RECALC_DATA, OB_SURF, OPERATOR_CANCELLED, OPERATOR_FINISHED, SELECT, EditFont::textbufinfo, Object::type, and WM_event_add_notifier().
Referenced by OBJECT_OT_material_slot_assign().
static int material_slot_copy_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 324 of file render_shading.c.
References Object::actcol, assign_matarar(), CTX_DATA_BEGIN, CTX_DATA_END, Object::data, ED_object_context(), give_matarar(), NC_OBJECT, ND_DRAW, OPERATOR_CANCELLED, OPERATOR_FINISHED, Object::totcol, and WM_event_add_notifier().
Referenced by OBJECT_OT_material_slot_copy().
static int material_slot_de_select | ( | bContext * | C, |
int | select | ||
) | [static] |
Definition at line 218 of file render_shading.c.
References Object::actcol, Nurb::bezt, Nurb::bp, curve_editnurbs(), Object::data, ED_object_context(), ELEM, EM_deselect_by_material(), EM_select_by_material(), BPoint::f1, BezTriple::f1, BezTriple::f2, BezTriple::f3, ListBase::first, BPoint::hide, BezTriple::hide, Nurb::mat_nr, NC_GEOM, ND_SELECT, Nurb::next, OB_CURVE, OB_MESH, OB_SURF, OPERATOR_CANCELLED, OPERATOR_FINISHED, Nurb::pntsu, Nurb::pntsv, SELECT, Object::type, and WM_event_add_notifier().
Referenced by material_slot_deselect_exec(), and material_slot_select_exec().
static int material_slot_deselect_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 304 of file render_shading.c.
References material_slot_de_select().
Referenced by OBJECT_OT_material_slot_deselect().
static int material_slot_remove_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 122 of file render_shading.c.
References BKE_report(), CTX_data_edit_object(), DAG_id_tag_update(), ED_object_context(), Object::id, NC_OBJECT, ND_DRAW, ND_OB_SHADING, OB_RECALC_DATA, object_remove_material_slot(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, and WM_event_add_notifier().
Referenced by OBJECT_OT_material_slot_remove().
static int material_slot_select_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 285 of file render_shading.c.
References material_slot_de_select().
Referenced by OBJECT_OT_material_slot_select().
static int new_material_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 365 of file render_shading.c.
References add_material(), copy_material(), CTX_data_pointer_get_type(), CTX_data_scene(), PointerRNA::data, ED_node_shader_default(), Material::id, NA_ADDED, NC_MATERIAL, OPERATOR_FINISHED, RNA_id_pointer_create(), RNA_Material, RNA_property_pointer_set(), RNA_property_update(), scene_use_new_shading_nodes(), uiIDContextProperty(), ID::us, Material::use_nodes, and WM_event_add_notifier().
Referenced by MATERIAL_OT_new().
static int new_texture_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 419 of file render_shading.c.
References add_texture(), copy_texture(), CTX_data_pointer_get_type(), PointerRNA::data, Tex::id, NA_ADDED, NC_TEXTURE, OPERATOR_FINISHED, RNA_id_pointer_create(), RNA_property_pointer_set(), RNA_property_update(), RNA_Texture, uiIDContextProperty(), ID::us, and WM_event_add_notifier().
Referenced by TEXTURE_OT_new().
static int new_world_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 465 of file render_shading.c.
References add_world(), copy_world(), CTX_data_pointer_get_type(), CTX_data_scene(), PointerRNA::data, ED_node_shader_default(), World::id, NA_ADDED, NC_WORLD, OPERATOR_FINISHED, RNA_id_pointer_create(), RNA_property_pointer_set(), RNA_property_update(), RNA_World, scene_use_new_shading_nodes(), uiIDContextProperty(), ID::us, World::use_nodes, and WM_event_add_notifier().
Referenced by WORLD_OT_new().
void OBJECT_OT_material_slot_add | ( | wmOperatorType * | ot | ) |
Definition at line 107 of file render_shading.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, material_slot_add_exec(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_render().
void OBJECT_OT_material_slot_assign | ( | wmOperatorType * | ot | ) |
Definition at line 203 of file render_shading.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, material_slot_assign_exec(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_render().
void OBJECT_OT_material_slot_copy | ( | wmOperatorType * | ot | ) |
Definition at line 349 of file render_shading.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, material_slot_copy_exec(), wmOperatorType::name, OPTYPE_REGISTER, and OPTYPE_UNDO.
Referenced by ED_operatortypes_render().
void OBJECT_OT_material_slot_deselect | ( | wmOperatorType * | ot | ) |
Definition at line 309 of file render_shading.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, material_slot_deselect_exec(), wmOperatorType::name, OPTYPE_REGISTER, and OPTYPE_UNDO.
Referenced by ED_operatortypes_render().
void OBJECT_OT_material_slot_remove | ( | wmOperatorType * | ot | ) |
Definition at line 143 of file render_shading.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, material_slot_remove_exec(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_render().
void OBJECT_OT_material_slot_select | ( | wmOperatorType * | ot | ) |
Definition at line 290 of file render_shading.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, material_slot_select_exec(), wmOperatorType::name, OPTYPE_REGISTER, and OPTYPE_UNDO.
Referenced by ED_operatortypes_render().
static int paste_material_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 853 of file render_shading.c.
References CTX_data_pointer_get_type(), PointerRNA::data, NC_MATERIAL, ND_SHADING_DRAW, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, paste_matcopybuf(), RNA_Material, and WM_event_add_notifier().
Referenced by MATERIAL_OT_paste().
static void paste_mtex_copybuf | ( | ID * | id | ) | [static] |
Definition at line 920 of file render_shading.c.
References BLI_assert, GS, ID_LA, ID_MA, ID_PA, id_us_plus(), ID_WO, MEM_mallocN(), ID::name, NULL, and MTex::tex.
Referenced by paste_mtex_exec().
static int paste_mtex_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 999 of file render_shading.c.
References CTX_data_pointer_get_type(), PointerRNA::data, ParticleSettings::id, World::id, Lamp::id, Material::id, PointerRNA::id, NC_TEXTURE, ND_SHADING_DRAW, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, ParticleSystem::part, paste_mtex_copybuf(), RNA_Lamp, RNA_Material, RNA_ParticleSystem, RNA_TextureSlot, RNA_World, and WM_event_add_notifier().
Referenced by TEXTURE_OT_slot_paste().
static int render_layer_add_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 519 of file render_shading.c.
References RenderData::actlay, BLI_countlist(), CTX_data_scene(), RenderData::layers, NC_SCENE, ND_RENDER_OPTIONS, NULL, OPERATOR_FINISHED, Scene::r, scene_add_render_layer(), and WM_event_add_notifier().
Referenced by SCENE_OT_render_layer_add().
static int render_layer_remove_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 545 of file render_shading.c.
References RenderData::actlay, BLI_findlink(), CTX_data_main(), CTX_data_scene(), RenderData::layers, NC_SCENE, ND_RENDER_OPTIONS, OPERATOR_CANCELLED, OPERATOR_FINISHED, Scene::r, scene_remove_render_layer(), and WM_event_add_notifier().
Referenced by SCENE_OT_render_layer_remove().
static int save_envmap | ( | wmOperator * | op, |
Scene * | scene, | ||
EnvMap * | env, | ||
char * | path, | ||
const char | imtype | ||
) | [static] |
Definition at line 662 of file render_shading.c.
References default_envmap_layout, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RE_WriteEnvmapResult(), wmOperator::reports, RNA_float_get_array(), and RNA_struct_find_property().
Referenced by envmap_save_exec().
void SCENE_OT_render_layer_add | ( | wmOperatorType * | ot | ) |
Definition at line 531 of file render_shading.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and render_layer_add_exec().
Referenced by ED_operatortypes_render().
void SCENE_OT_render_layer_remove | ( | wmOperatorType * | ot | ) |
Definition at line 558 of file render_shading.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and render_layer_remove_exec().
Referenced by ED_operatortypes_render().
void TEXTURE_OT_envmap_clear | ( | wmOperatorType * | ot | ) |
Definition at line 780 of file render_shading.c.
References wmOperatorType::description, envmap_clear_exec(), envmap_clear_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_render().
void TEXTURE_OT_envmap_clear_all | ( | wmOperatorType * | ot | ) |
Definition at line 809 of file render_shading.c.
References wmOperatorType::description, envmap_clear_all_exec(), envmap_clear_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_render().
void TEXTURE_OT_envmap_save | ( | wmOperatorType * | ot | ) |
Definition at line 732 of file render_shading.c.
References default_envmap_layout, wmOperatorType::description, envmap_save_exec(), envmap_save_invoke(), envmap_save_poll(), wmOperatorType::exec, FILE_SAVE, FILE_SPECIAL, wmOperatorType::flag, FOLDERFILE, wmOperatorType::idname, IMAGEFILE, wmOperatorType::invoke, MOVIEFILE, wmOperatorType::name, OPTYPE_REGISTER, wmOperatorType::poll, PROP_HIDDEN, RNA_def_float_array(), RNA_def_property_flag(), wmOperatorType::srna, WM_FILESEL_FILEPATH, and WM_operator_properties_filesel().
Referenced by ED_operatortypes_render().
void TEXTURE_OT_new | ( | wmOperatorType * | ot | ) |
Definition at line 449 of file render_shading.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, new_texture_exec(), OPTYPE_REGISTER, and OPTYPE_UNDO.
Referenced by ED_operatortypes_render().
void TEXTURE_OT_slot_copy | ( | wmOperatorType * | ot | ) |
Definition at line 984 of file render_shading.c.
References copy_mtex_exec(), copy_mtex_poll(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, and wmOperatorType::poll.
Referenced by ED_operatortypes_render().
void TEXTURE_OT_slot_move | ( | wmOperatorType * | ot | ) |
Definition at line 636 of file render_shading.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, RNA_def_enum(), wmOperatorType::srna, and texture_slot_move().
Referenced by ED_operatortypes_render().
void TEXTURE_OT_slot_paste | ( | wmOperatorType * | ot | ) |
Definition at line 1029 of file render_shading.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and paste_mtex_exec().
Referenced by ED_operatortypes_render().
static int texture_slot_move | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 572 of file render_shading.c.
References BKE_animdata_fix_paths_rename(), BKE_animdata_from_id(), CTX_data_pointer_get_type(), CTX_data_scene(), DAG_id_tag_update(), PointerRNA::data, give_active_mtex(), GS, PointerRNA::id, ID_MA, MAX_MTEX, ID::name, NC_TEXTURE, NULL, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), RNA_TextureSlot, Material::septex, set_active_mtex(), and WM_event_add_notifier().
Referenced by TEXTURE_OT_slot_move().
void WORLD_OT_new | ( | wmOperatorType * | ot | ) |
Definition at line 503 of file render_shading.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, new_world_exec(), OPTYPE_REGISTER, and OPTYPE_UNDO.
Referenced by ED_operatortypes_render().
short mtexcopied = 0 [static] |
Definition at line 882 of file render_shading.c.
MTex mtexcopybuf [static] |
Definition at line 883 of file render_shading.c.