Blender
V3.3
|
Go to the source code of this file.
Classes | |
struct | StudioLightImage |
struct | StudioLight |
Typedefs | |
typedef void | StudioLightFreeFunction(struct StudioLight *, void *data) |
typedef struct StudioLightImage | StudioLightImage |
typedef struct StudioLight | StudioLight |
Enumerations | |
enum | StudioLightFlag { STUDIOLIGHT_SPHERICAL_HARMONICS_COEFFICIENTS_CALCULATED = (1 << 0) , STUDIOLIGHT_INTERNAL = (1 << 2) , STUDIOLIGHT_EXTERNAL_FILE = (1 << 3) , STUDIOLIGHT_TYPE_STUDIO = (1 << 4) , STUDIOLIGHT_TYPE_WORLD = (1 << 5) , STUDIOLIGHT_TYPE_MATCAP = (1 << 6) , STUDIOLIGHT_EXTERNAL_IMAGE_LOADED = (1 << 7) , STUDIOLIGHT_EQUIRECT_IRRADIANCE_IMAGE_CALCULATED = (1 << 8) , STUDIOLIGHT_EQUIRECT_RADIANCE_GPUTEXTURE = (1 << 9) , STUDIOLIGHT_EQUIRECT_IRRADIANCE_GPUTEXTURE = (1 << 10) , STUDIOLIGHT_RADIANCE_BUFFERS_CALCULATED = (1 << 11) , STUDIOLIGHT_USER_DEFINED = (1 << 12) , STUDIOLIGHT_UI_EXPANDED = (1 << 13) , STUDIOLIGHT_MATCAP_DIFFUSE_GPUTEXTURE = (1 << 14) , STUDIOLIGHT_MATCAP_SPECULAR_GPUTEXTURE = (1 << 15) , STUDIOLIGHT_SPECULAR_HIGHLIGHT_PASS = (1 << 16) } |
Studio lighting for the 3dview
Definition in file BKE_studiolight.h.
#define STUDIOLIGHT_FLAG_ALL (STUDIOLIGHT_INTERNAL | STUDIOLIGHT_EXTERNAL_FILE) |
Definition at line 83 of file BKE_studiolight.h.
#define STUDIOLIGHT_FLAG_ORIENTATIONS (STUDIOLIGHT_TYPE_STUDIO | STUDIOLIGHT_TYPE_WORLD | STUDIOLIGHT_TYPE_MATCAP) |
Definition at line 84 of file BKE_studiolight.h.
#define STUDIOLIGHT_ICON_ID_TYPE_IRRADIANCE (1 << 1) |
Definition at line 37 of file BKE_studiolight.h.
#define STUDIOLIGHT_ICON_ID_TYPE_MATCAP (1 << 2) |
Definition at line 38 of file BKE_studiolight.h.
#define STUDIOLIGHT_ICON_ID_TYPE_MATCAP_FLIPPED (1 << 3) |
Definition at line 39 of file BKE_studiolight.h.
#define STUDIOLIGHT_ICON_ID_TYPE_RADIANCE (1 << 0) |
Definition at line 36 of file BKE_studiolight.h.
#define STUDIOLIGHT_ICON_SIZE 96 |
Definition at line 43 of file BKE_studiolight.h.
#define STUDIOLIGHT_MAX_LIGHT 4 |
Definition at line 41 of file BKE_studiolight.h.
#define STUDIOLIGHT_ORIENTATIONS_MATERIAL_MODE (STUDIOLIGHT_TYPE_WORLD) |
Definition at line 86 of file BKE_studiolight.h.
#define STUDIOLIGHT_ORIENTATIONS_SOLID (STUDIOLIGHT_INTERNAL | STUDIOLIGHT_TYPE_STUDIO) |
Definition at line 87 of file BKE_studiolight.h.
#define STUDIOLIGHT_SH_BANDS 2 |
Definition at line 46 of file BKE_studiolight.h.
#define STUDIOLIGHT_SH_COEFS_LEN (STUDIOLIGHT_SH_BANDS * STUDIOLIGHT_SH_BANDS) |
Definition at line 48 of file BKE_studiolight.h.
#define STUDIOLIGHT_SH_EFFECTIVE_COEFS_LEN STUDIOLIGHT_SH_COEFS_LEN |
Definition at line 54 of file BKE_studiolight.h.
#define STUDIOLIGHT_X_NEG 1 |
Definition at line 30 of file BKE_studiolight.h.
#define STUDIOLIGHT_X_POS 0 |
Definition at line 29 of file BKE_studiolight.h.
#define STUDIOLIGHT_Y_NEG 3 |
Definition at line 32 of file BKE_studiolight.h.
#define STUDIOLIGHT_Y_POS 2 |
Definition at line 31 of file BKE_studiolight.h.
#define STUDIOLIGHT_Z_NEG 5 |
Definition at line 34 of file BKE_studiolight.h.
#define STUDIOLIGHT_Z_POS 4 |
Definition at line 33 of file BKE_studiolight.h.
typedef struct StudioLight StudioLight |
typedef void StudioLightFreeFunction(struct StudioLight *, void *data) |
Definition at line 89 of file BKE_studiolight.h.
typedef struct StudioLightImage StudioLightImage |
enum StudioLightFlag |
Definition at line 61 of file BKE_studiolight.h.
StudioLight* BKE_studiolight_create | ( | const char * | path, |
const SolidLight | light[4], | ||
const float | light_ambient[3] | ||
) |
Definition at line 1571 of file studiolight.c.
References BLI_addtail(), BLI_split_file_part(), FILE_MAXFILE, StudioLight::light, StudioLight::light_ambient, StudioLight::name, StudioLight::path, STRNCPY, studiolight_create(), STUDIOLIGHT_EXTERNAL_FILE, STUDIOLIGHT_SPECULAR_HIGHLIGHT_PASS, STUDIOLIGHT_TYPE_STUDIO, STUDIOLIGHT_USER_DEFINED, studiolight_write_solid_light(), and studiolights.
void BKE_studiolight_default | ( | SolidLight | lights[4], |
float | light_ambient[3] | ||
) |
Definition at line 1335 of file studiolight.c.
References SolidLight::col, copy_v3_fl3(), SolidLight::flag, SolidLight::smooth, SolidLight::spec, and SolidLight::vec.
Referenced by BKE_blendfile_userdef_from_defaults(), and BKE_studiolight_init().
void BKE_studiolight_ensure_flag | ( | StudioLight * | sl, |
int | flag | ||
) |
Ensure state of studio-lights.
Definition at line 1517 of file studiolight.c.
References StudioLight::flag, studiolight_calculate_diffuse_light(), studiolight_calculate_irradiance_equirect_image(), studiolight_calculate_radiance_cubemap_buffers(), studiolight_create_equirect_irradiance_gputexture(), studiolight_create_equirect_radiance_gputexture(), studiolight_create_matcap_diffuse_gputexture(), studiolight_create_matcap_specular_gputexture(), STUDIOLIGHT_EQUIRECT_IRRADIANCE_GPUTEXTURE, STUDIOLIGHT_EQUIRECT_IRRADIANCE_IMAGE_CALCULATED, STUDIOLIGHT_EQUIRECT_RADIANCE_GPUTEXTURE, STUDIOLIGHT_EXTERNAL_IMAGE_LOADED, studiolight_load_equirect_image(), studiolight_load_irradiance_equirect_image(), studiolight_load_spherical_harmonics_coefficients(), STUDIOLIGHT_MATCAP_DIFFUSE_GPUTEXTURE, STUDIOLIGHT_MATCAP_SPECULAR_GPUTEXTURE, STUDIOLIGHT_RADIANCE_BUFFERS_CALCULATED, and STUDIOLIGHT_SPHERICAL_HARMONICS_COEFFICIENTS_CALCULATED.
Referenced by EEVEE_lookdev_cache_init(), studiolight_calculate_diffuse_light(), studiolight_calculate_irradiance_equirect_image(), studiolight_calculate_radiance_cubemap_buffers(), studiolight_create_equirect_irradiance_gputexture(), studiolight_create_equirect_radiance_gputexture(), studiolight_create_matcap_diffuse_gputexture(), studiolight_create_matcap_specular_gputexture(), studiolight_matcap_preview(), studiolight_radiance_preview(), workbench_opaque_cache_init(), and workbench_transparent_lighting_uniforms().
struct StudioLight* BKE_studiolight_find | ( | const char * | name, |
int | flag | ||
) |
Definition at line 1462 of file studiolight.c.
References BKE_studiolight_find_default(), FILE_MAXFILE, StudioLight::flag, LISTBASE_FOREACH, StudioLight::name, STREQLEN, and studiolights.
Referenced by blo_do_versions_280(), EEVEE_lookdev_cache_init(), and workbench_private_data_init().
struct StudioLight* BKE_studiolight_find_default | ( | int | flag | ) |
Definition at line 1437 of file studiolight.c.
References StudioLight::flag, LISTBASE_FOREACH, StudioLight::name, NULL, STREQ, STUDIOLIGHT_MATCAP_DEFAULT, STUDIOLIGHT_TYPE_MATCAP, STUDIOLIGHT_TYPE_WORLD, STUDIOLIGHT_WORLD_DEFAULT, and studiolights.
Referenced by BKE_studiolight_find(), BKE_studiolight_findindex(), and blo_do_versions_280().
struct StudioLight* BKE_studiolight_findindex | ( | int | index, |
int | flag | ||
) |
Definition at line 1478 of file studiolight.c.
References BKE_studiolight_find_default(), StudioLight::flag, StudioLight::index, LISTBASE_FOREACH, and studiolights.
Definition at line 1429 of file studiolight.c.
References BLI_pophead(), studiolight_free(), and studiolights.
Referenced by BKE_blender_free(), and BKE_studiolight_refresh().
Definition at line 1388 of file studiolight.c.
References BKE_appdir_app_is_portable_install(), BKE_studiolight_default(), BLENDER_SYSTEM_DATAFILES, BLENDER_USER_DATAFILES, BLI_addtail(), BLI_listbase_sort(), BLI_strncpy(), FILE_MAXFILE, StudioLight::light, StudioLight::light_ambient, StudioLight::name, studiolight_add_files_from_datafolder(), studiolight_cmp(), studiolight_create(), STUDIOLIGHT_INTERNAL, STUDIOLIGHT_LIGHTS_FOLDER, STUDIOLIGHT_MATCAP_FOLDER, STUDIOLIGHT_SPECULAR_HIGHLIGHT_PASS, STUDIOLIGHT_SPHERICAL_HARMONICS_COEFFICIENTS_CALCULATED, STUDIOLIGHT_TYPE_MATCAP, STUDIOLIGHT_TYPE_STUDIO, STUDIOLIGHT_TYPE_WORLD, STUDIOLIGHT_USER_DEFINED, STUDIOLIGHT_WORLD_FOLDER, and studiolights.
Referenced by BKE_studiolight_refresh(), and WM_init().
Definition at line 1489 of file studiolight.c.
References studiolights.
StudioLight* BKE_studiolight_load | ( | const char * | path, |
int | type | ||
) |
Definition at line 1565 of file studiolight.c.
References studiolight_add_file(), STUDIOLIGHT_USER_DEFINED, and type.
void BKE_studiolight_preview | ( | uint * | icon_buffer, |
StudioLight * | sl, | ||
int | icon_id_type | ||
) |
Definition at line 1494 of file studiolight.c.
References STUDIOLIGHT_ICON_ID_TYPE_IRRADIANCE, STUDIOLIGHT_ICON_ID_TYPE_MATCAP, STUDIOLIGHT_ICON_ID_TYPE_MATCAP_FLIPPED, STUDIOLIGHT_ICON_ID_TYPE_RADIANCE, studiolight_irradiance_preview(), studiolight_matcap_preview(), and studiolight_radiance_preview().
Referenced by ui_studiolight_icon_job_exec().
Definition at line 1604 of file studiolight.c.
References BKE_studiolight_free(), and BKE_studiolight_init().
void BKE_studiolight_remove | ( | StudioLight * | sl | ) |
Definition at line 1557 of file studiolight.c.
References BLI_remlink(), StudioLight::flag, studiolight_free(), STUDIOLIGHT_USER_DEFINED, and studiolights.
void BKE_studiolight_set_free_function | ( | StudioLight * | sl, |
StudioLightFreeFunction * | free_function, | ||
void * | data | ||
) |
Definition at line 1610 of file studiolight.c.
References data, StudioLight::free_function, and StudioLight::free_function_data.
Referenced by ui_icon_ensure_deferred(), and ui_studiolight_icon_job_end().
StudioLight* BKE_studiolight_studio_edit_get | ( | void | ) |
Only useful for workbench while editing the user-preferences.
Definition at line 1593 of file studiolight.c.
References StudioLight::flag, StudioLight::light, StudioLight::light_ambient, STUDIOLIGHT_SPECULAR_HIGHLIGHT_PASS, and STUDIOLIGHT_TYPE_STUDIO.
Referenced by workbench_studiolight_data_update().
void BKE_studiolight_unset_icon_id | ( | StudioLight * | sl, |
int | icon_id | ||
) |
Definition at line 1618 of file studiolight.c.
References BLI_assert, StudioLight::icon_id_irradiance, StudioLight::icon_id_matcap, StudioLight::icon_id_matcap_flipped, StudioLight::icon_id_radiance, and NULL.
Referenced by icon_free_data().