Rename probe to light-probe

Probe is a real general term, the new name is used often in docs online.
This commit is contained in:
Campbell Barton 2017-06-12 20:59:54 +10:00
parent 12bd960df9
commit f52dc2f371
61 changed files with 337 additions and 337 deletions

View File

@ -40,7 +40,7 @@ _modules = [
"properties_data_mesh",
"properties_data_metaball",
"properties_data_modifier",
"properties_data_probe",
"properties_data_lightprobe",
"properties_data_speaker",
"properties_game",
"properties_mask_common",

View File

@ -29,10 +29,10 @@ class DataButtonsPanel:
@classmethod
def poll(cls, context):
engine = context.scene.render.engine
return context.probe and (engine in cls.COMPAT_ENGINES)
return context.lightprobe and (engine in cls.COMPAT_ENGINES)
class DATA_PT_context_probe(DataButtonsPanel, Panel):
class DATA_PT_context_lightprobe(DataButtonsPanel, Panel):
bl_label = ""
bl_options = {'HIDE_HEADER'}
COMPAT_ENGINES = {'BLENDER_CLAY', 'BLENDER_EEVEE'}
@ -41,7 +41,7 @@ class DATA_PT_context_probe(DataButtonsPanel, Panel):
layout = self.layout
ob = context.object
probe = context.probe
probe = context.lightprobe
space = context.space_data
if ob:
@ -50,7 +50,7 @@ class DATA_PT_context_probe(DataButtonsPanel, Panel):
layout.template_ID(space, "pin_id")
class DATA_PT_probe(DataButtonsPanel, Panel):
class DATA_PT_lightprobe(DataButtonsPanel, Panel):
bl_label = "Probe"
COMPAT_ENGINES = {'BLENDER_CLAY', 'BLENDER_EEVEE'}
@ -58,7 +58,7 @@ class DATA_PT_probe(DataButtonsPanel, Panel):
layout = self.layout
ob = context.object
probe = context.probe
probe = context.lightprobe
layout.prop(probe, "type", expand=True)
@ -81,7 +81,7 @@ class DATA_PT_probe(DataButtonsPanel, Panel):
col.prop(probe, "clip_end", text="End")
class DATA_PT_parallax(DataButtonsPanel, Panel):
class DATA_PT_lightprobe_parallax(DataButtonsPanel, Panel):
bl_label = "Parallax"
COMPAT_ENGINES = {'BLENDER_CLAY', 'BLENDER_EEVEE'}
@ -89,7 +89,7 @@ class DATA_PT_parallax(DataButtonsPanel, Panel):
layout = self.layout
ob = context.object
probe = context.probe
probe = context.lightprobe
layout.prop(probe, "use_custom_parallax")
@ -105,7 +105,7 @@ class DATA_PT_parallax(DataButtonsPanel, Panel):
col.prop(probe, "parallax_distance", "Size")
class DATA_PT_display(DataButtonsPanel, Panel):
class DATA_PT_lightprobe_display(DataButtonsPanel, Panel):
bl_label = "Display"
COMPAT_ENGINES = {'BLENDER_CLAY', 'BLENDER_EEVEE'}
@ -113,7 +113,7 @@ class DATA_PT_display(DataButtonsPanel, Panel):
layout = self.layout
ob = context.object
probe = context.probe
probe = context.lightprobe
split = layout.split()
@ -128,10 +128,10 @@ class DATA_PT_display(DataButtonsPanel, Panel):
classes = (
DATA_PT_context_probe,
DATA_PT_probe,
DATA_PT_parallax,
DATA_PT_display,
DATA_PT_context_lightprobe,
DATA_PT_lightprobe,
DATA_PT_lightprobe_parallax,
DATA_PT_lightprobe_display,
)
if __name__ == "__main__": # only for live edit.

View File

@ -459,7 +459,7 @@ def texture_filter_common(tex, layout):
layout.prop(tex, "filter_type", text="")
if tex.use_mipmap and tex.filter_type in {'AREA', 'EWA', 'FELINE'}:
if tex.filter_type == 'FELINE':
layout.prop(tex, "filter_probes", text="Probes")
layout.prop(tex, "filter_lightprobes", text="Light Probes")
else:
layout.prop(tex, "filter_eccentricity", text="Eccentricity")

View File

@ -1205,15 +1205,15 @@ class INFO_MT_lamp_add(Menu):
layout.operator_enum("object.lamp_add", "type")
class INFO_MT_probe_add(Menu):
bl_idname = "INFO_MT_probe_add"
bl_label = "Probe"
class INFO_MT_lightprobe_add(Menu):
bl_idname = "INFO_MT_lightprobe_add"
bl_label = "Light Probe"
def draw(self, context):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator_enum("object.probe_add", "type")
layout.operator_enum("object.lightprobe_add", "type")
class INFO_MT_camera_add(Menu):
@ -1263,7 +1263,7 @@ class INFO_MT_add(Menu):
INFO_MT_camera_add.draw(self, context)
layout.menu("INFO_MT_lamp_add", icon='OUTLINER_OB_LAMP')
layout.menu("INFO_MT_probe_add")
layout.menu("INFO_MT_lightprobe_add")
layout.separator()
layout.operator_menu_enum("object.effector_add", "type", text="Force Field", icon='OUTLINER_OB_EMPTY')
@ -3787,7 +3787,7 @@ classes = (
INFO_MT_edit_armature_add,
INFO_MT_armature_add,
INFO_MT_lamp_add,
INFO_MT_probe_add,
INFO_MT_lightprobe_add,
INFO_MT_camera_add,
INFO_MT_add,
VIEW3D_MT_object,

View File

@ -55,6 +55,7 @@ set(SRC_DNA_INC
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_lamp_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_lattice_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_layer_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_lightprobe_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_linestyle_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_listBase.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_manipulator_types.h
@ -71,7 +72,6 @@ set(SRC_DNA_INC
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_outliner_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_packedFile_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_particle_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_probe_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_property_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_rigidbody_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_scene_types.h

View File

@ -25,21 +25,21 @@
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef __BKE_PROBE_H__
#define __BKE_PROBE_H__
#ifndef __BKE_LIGHTPROBE_H__
#define __BKE_LIGHTPROBE_H__
/** \file BKE_probe.h
/** \file BKE_lightprobe.h
* \ingroup bke
* \brief General operations for probes.
*/
struct Main;
struct Probe;
struct LightProbe;
void BKE_probe_init(struct Probe *probe);
void *BKE_probe_add(struct Main *bmain, const char *name);
struct Probe *BKE_probe_copy(struct Main *bmain, struct Probe *probe);
void BKE_probe_make_local(struct Main *bmain, struct Probe *probe, const bool lib_local);
void BKE_probe_free(struct Probe *probe);
void BKE_lightprobe_init(struct LightProbe *probe);
void *BKE_lightprobe_add(struct Main *bmain, const char *name);
struct LightProbe *BKE_lightprobe_copy(struct Main *bmain, struct LightProbe *probe);
void BKE_lightprobe_make_local(struct Main *bmain, struct LightProbe *probe, const bool lib_local);
void BKE_lightprobe_free(struct LightProbe *probe);
#endif /* __BKE_PROBE_H__ */
#endif /* __BKE_LIGHTPROBE_H__ */

View File

@ -108,7 +108,7 @@ typedef struct Main {
ListBase vfont;
ListBase text;
ListBase speaker;
ListBase probe;
ListBase lightprobe;
ListBase sound;
ListBase group;
ListBase armature;

View File

@ -159,9 +159,9 @@ set(SRC
intern/pbvh.c
intern/pbvh_bmesh.c
intern/pointcache.c
intern/probe.c
intern/property.c
intern/layer.c
intern/lightprobe.c
intern/report.c
intern/rigidbody.c
intern/sca.c
@ -281,9 +281,9 @@ set(SRC
BKE_particle.h
BKE_pbvh.h
BKE_pointcache.h
BKE_probe.h
BKE_property.h
BKE_layer.h
BKE_lightprobe.h
BKE_report.h
BKE_rigidbody.h
BKE_sca.h

View File

@ -94,7 +94,7 @@ bool id_type_can_have_animdata(const short id_type)
case ID_MA: case ID_TE: case ID_NT:
case ID_LA: case ID_CA: case ID_WO:
case ID_LS:
case ID_PRB:
case ID_LP:
case ID_SPK:
case ID_SCE:
case ID_MC:

View File

@ -81,7 +81,7 @@ static IDType idtypes[] = {
{ ID_PA, "ParticleSettings", "particles", BLT_I18NCONTEXT_ID_PARTICLESETTINGS, IDTYPE_FLAGS_ISLINKABLE },
{ ID_PAL, "Palettes", "palettes", BLT_I18NCONTEXT_ID_PALETTE, IDTYPE_FLAGS_ISLINKABLE },
{ ID_PC, "PaintCurve", "paint_curves", BLT_I18NCONTEXT_ID_PAINTCURVE, IDTYPE_FLAGS_ISLINKABLE },
{ ID_PRB, "Probe", "probes", BLT_I18NCONTEXT_ID_PROBE, IDTYPE_FLAGS_ISLINKABLE },
{ ID_LP, "LightProbe", "light_probes", BLT_I18NCONTEXT_ID_LIGHTPROBE, IDTYPE_FLAGS_ISLINKABLE },
{ ID_SCE, "Scene", "scenes", BLT_I18NCONTEXT_ID_SCENE, IDTYPE_FLAGS_ISLINKABLE },
{ ID_SCR, "Screen", "screens", BLT_I18NCONTEXT_ID_SCREEN, IDTYPE_FLAGS_ISLINKABLE },
{ ID_SEQ, "Sequence", "sequences", BLT_I18NCONTEXT_ID_SEQUENCE, 0 }, /* not actually ID data */
@ -205,7 +205,7 @@ int BKE_idcode_to_idfilter(const short idcode)
CASE_IDFILTER(PA);
CASE_IDFILTER(PAL);
CASE_IDFILTER(PC);
CASE_IDFILTER(PRB);
CASE_IDFILTER(LP);
CASE_IDFILTER(SCE);
CASE_IDFILTER(SPK);
CASE_IDFILTER(SO);
@ -251,7 +251,7 @@ short BKE_idcode_from_idfilter(const int idfilter)
CASE_IDFILTER(PA);
CASE_IDFILTER(PAL);
CASE_IDFILTER(PC);
CASE_IDFILTER(PRB);
CASE_IDFILTER(LP);
CASE_IDFILTER(SCE);
CASE_IDFILTER(SPK);
CASE_IDFILTER(SO);
@ -299,7 +299,7 @@ int BKE_idcode_to_index(const short idcode)
CASE_IDINDEX(PA);
CASE_IDINDEX(PAL);
CASE_IDINDEX(PC);
CASE_IDINDEX(PRB);
CASE_IDINDEX(LP);
CASE_IDINDEX(SCE);
CASE_IDINDEX(SCR);
CASE_IDINDEX(SPK);

View File

@ -62,7 +62,7 @@
#include "DNA_mask_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_probe_types.h"
#include "DNA_lightprobe_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_speaker_types.h"
@ -118,7 +118,7 @@
#include "BKE_paint.h"
#include "BKE_particle.h"
#include "BKE_packedFile.h"
#include "BKE_probe.h"
#include "BKE_lightprobe.h"
#include "BKE_sound.h"
#include "BKE_speaker.h"
#include "BKE_scene.h"
@ -421,8 +421,8 @@ bool id_make_local(Main *bmain, ID *id, const bool test, const bool lib_local)
case ID_SPK:
if (!test) BKE_speaker_make_local(bmain, (Speaker *)id, lib_local);
return true;
case ID_PRB:
if (!test) BKE_probe_make_local(bmain, (Probe *)id, lib_local);
case ID_LP:
if (!test) BKE_lightprobe_make_local(bmain, (LightProbe *)id, lib_local);
return true;
case ID_WO:
if (!test) BKE_world_make_local(bmain, (World *)id, lib_local);
@ -537,8 +537,8 @@ bool id_copy(Main *bmain, ID *id, ID **newid, bool test)
case ID_SPK:
if (!test) *newid = (ID *)BKE_speaker_copy(bmain, (Speaker *)id);
return true;
case ID_PRB:
if (!test) *newid = (ID *)BKE_probe_copy(bmain, (Probe *)id);
case ID_LP:
if (!test) *newid = (ID *)BKE_lightprobe_copy(bmain, (LightProbe *)id);
return true;
case ID_CA:
if (!test) *newid = (ID *)BKE_camera_copy(bmain, (Camera *)id);
@ -677,8 +677,8 @@ ListBase *which_libbase(Main *mainlib, short type)
return &(mainlib->text);
case ID_SPK:
return &(mainlib->speaker);
case ID_PRB:
return &(mainlib->probe);
case ID_LP:
return &(mainlib->lightprobe);
case ID_SO:
return &(mainlib->sound);
case ID_GR:
@ -849,7 +849,7 @@ int set_listbasepointers(Main *main, ListBase **lb)
lb[INDEX_ID_BR] = &(main->brush);
lb[INDEX_ID_PA] = &(main->particle);
lb[INDEX_ID_SPK] = &(main->speaker);
lb[INDEX_ID_PRB] = &(main->probe);
lb[INDEX_ID_LP] = &(main->lightprobe);
lb[INDEX_ID_WO] = &(main->world);
lb[INDEX_ID_MC] = &(main->movieclip);
@ -942,8 +942,8 @@ void *BKE_libblock_alloc_notest(short type)
case ID_SPK:
id = MEM_callocN(sizeof(Speaker), "speaker");
break;
case ID_PRB:
id = MEM_callocN(sizeof(Probe), "probe");
case ID_LP:
id = MEM_callocN(sizeof(LightProbe), "probe");
break;
case ID_SO:
id = MEM_callocN(sizeof(bSound), "sound");
@ -1071,8 +1071,8 @@ void BKE_libblock_init_empty(ID *id)
case ID_SPK:
BKE_speaker_init((Speaker *)id);
break;
case ID_PRB:
BKE_probe_init((Probe *)id);
case ID_LP:
BKE_lightprobe_init((LightProbe *)id);
break;
case ID_CA:
BKE_camera_init((Camera *)id);

View File

@ -52,7 +52,7 @@
#include "DNA_mask_types.h"
#include "DNA_node_types.h"
#include "DNA_object_force.h"
#include "DNA_probe_types.h"
#include "DNA_lightprobe_types.h"
#include "DNA_rigidbody_types.h"
#include "DNA_scene_types.h"
#include "DNA_sensor_types.h"
@ -772,9 +772,9 @@ void BKE_library_foreach_ID_link(Main *bmain, ID *id, LibraryIDLinkCallback call
break;
}
case ID_PRB:
case ID_LP:
{
Probe *probe = (Probe *) id;
LightProbe *probe = (LightProbe *) id;
CALLBACK_INVOKE(probe->image, IDWALK_CB_USER);
break;
}
@ -1142,7 +1142,7 @@ bool BKE_library_id_can_use_idtype(ID *id_owner, const short id_type_used)
return ELEM(id_type_used, ID_MC); /* WARNING! mask->parent.id, not typed. */
case ID_LS:
return (ELEM(id_type_used, ID_TE, ID_OB));
case ID_PRB:
case ID_LP:
return ELEM(id_type_used, ID_IM);
case ID_WS:
case ID_IM:

View File

@ -53,7 +53,7 @@
#include "DNA_mask_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_probe_types.h"
#include "DNA_lightprobe_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_speaker_types.h"
@ -100,7 +100,7 @@
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_particle.h"
#include "BKE_probe.h"
#include "BKE_lightprobe.h"
#include "BKE_sca.h"
#include "BKE_speaker.h"
#include "BKE_sound.h"
@ -840,8 +840,8 @@ void BKE_libblock_free_ex(Main *bmain, void *idv, const bool do_id_user, const b
case ID_SPK:
BKE_speaker_free((Speaker *)id);
break;
case ID_PRB:
BKE_probe_free((Probe *)id);
case ID_LP:
BKE_lightprobe_free((LightProbe *)id);
break;
case ID_SO:
BKE_sound_free((bSound *)id);

View File

@ -30,7 +30,7 @@
*/
#include "DNA_object_types.h"
#include "DNA_probe_types.h"
#include "DNA_lightprobe_types.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
@ -38,9 +38,9 @@
#include "BKE_animsys.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_probe.h"
#include "BKE_lightprobe.h"
void BKE_probe_init(Probe *probe)
void BKE_lightprobe_init(LightProbe *probe)
{
BLI_assert(MEMCMP_STRUCT_OFS_IS_ZERO(probe, id));
@ -51,20 +51,20 @@ void BKE_probe_init(Probe *probe)
probe->clipend = 40.0f;
}
void *BKE_probe_add(Main *bmain, const char *name)
void *BKE_lightprobe_add(Main *bmain, const char *name)
{
Probe *probe;
LightProbe *probe;
probe = BKE_libblock_alloc(bmain, ID_PRB, name);
probe = BKE_libblock_alloc(bmain, ID_LP, name);
BKE_probe_init(probe);
BKE_lightprobe_init(probe);
return probe;
}
Probe *BKE_probe_copy(Main *bmain, Probe *probe)
LightProbe *BKE_lightprobe_copy(Main *bmain, LightProbe *probe)
{
Probe *probe_new;
LightProbe *probe_new;
probe_new = BKE_libblock_copy(bmain, &probe->id);
@ -73,12 +73,12 @@ Probe *BKE_probe_copy(Main *bmain, Probe *probe)
return probe_new;
}
void BKE_probe_make_local(Main *bmain, Probe *probe, const bool lib_local)
void BKE_lightprobe_make_local(Main *bmain, LightProbe *probe, const bool lib_local)
{
BKE_id_make_local_generic(bmain, &probe->id, true, lib_local);
}
void BKE_probe_free(Probe *probe)
void BKE_lightprobe_free(LightProbe *probe)
{
BKE_animdata_free((ID *)probe, false);
}

View File

@ -58,7 +58,7 @@
#include "DNA_view3d_types.h"
#include "DNA_world_types.h"
#include "DNA_object_types.h"
#include "DNA_probe_types.h"
#include "DNA_lightprobe_types.h"
#include "DNA_property_types.h"
#include "DNA_rigidbody_types.h"
@ -108,7 +108,7 @@
#include "BKE_paint.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
#include "BKE_probe.h"
#include "BKE_lightprobe.h"
#include "BKE_property.h"
#include "BKE_rigidbody.h"
#include "BKE_sca.h"
@ -604,7 +604,7 @@ void *BKE_object_obdata_add_from_type(Main *bmain, int type, const char *name)
case OB_LATTICE: return BKE_lattice_add(bmain, name);
case OB_ARMATURE: return BKE_armature_add(bmain, name);
case OB_SPEAKER: return BKE_speaker_add(bmain, name);
case OB_PROBE: return BKE_probe_add(bmain, name);
case OB_LIGHTPROBE:return BKE_lightprobe_add(bmain, name);
case OB_EMPTY: return NULL;
default:
printf("%s: Internal error, bad type: %d\n", __func__, type);

View File

@ -89,7 +89,7 @@
#include "DNA_object_types.h"
#include "DNA_packedFile_types.h"
#include "DNA_particle_types.h"
#include "DNA_probe_types.h"
#include "DNA_lightprobe_types.h"
#include "DNA_property_types.h"
#include "DNA_rigidbody_types.h"
#include "DNA_text_types.h"
@ -7648,9 +7648,9 @@ static void fix_relpaths_library(const char *basepath, Main *main)
/* ************ READ PROBE ***************** */
static void lib_link_probe(FileData *fd, Main *main)
static void lib_link_lightprobe(FileData *fd, Main *main)
{
for (Probe *prb = main->speaker.first; prb; prb = prb->id.next) {
for (LightProbe *prb = main->speaker.first; prb; prb = prb->id.next) {
if (prb->id.tag & LIB_TAG_NEED_LINK) {
IDP_LibLinkProperty(prb->id.properties, fd);
lib_link_animdata(fd, &prb->id, prb->adt);
@ -7660,7 +7660,7 @@ static void lib_link_probe(FileData *fd, Main *main)
}
}
static void direct_link_probe(FileData *fd, Probe *prb)
static void direct_link_lightprobe(FileData *fd, LightProbe *prb)
{
prb->adt = newdataadr(fd, prb->adt);
direct_link_animdata(fd, prb->adt);
@ -8281,7 +8281,7 @@ static const char *dataname(short id_code)
case ID_VF: return "Data from VF";
case ID_TXT : return "Data from TXT";
case ID_SPK: return "Data from SPK";
case ID_PRB: return "Data from PRB";
case ID_LP: return "Data from LP";
case ID_SO: return "Data from SO";
case ID_NT: return "Data from NT";
case ID_BR: return "Data from BR";
@ -8514,8 +8514,8 @@ static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, const short
case ID_SO:
direct_link_sound(fd, (bSound *)id);
break;
case ID_PRB:
direct_link_probe(fd, (Probe *)id);
case ID_LP:
direct_link_lightprobe(fd, (LightProbe *)id);
break;
case ID_GR:
direct_link_group(fd, (Group *)id);
@ -8722,7 +8722,7 @@ static void lib_link_all(FileData *fd, Main *main)
lib_link_text(fd, main);
lib_link_camera(fd, main);
lib_link_speaker(fd, main);
lib_link_probe(fd, main);
lib_link_lightprobe(fd, main);
lib_link_sound(fd, main);
lib_link_group(fd, main);
lib_link_armature(fd, main);
@ -9908,7 +9908,7 @@ static void expand_sound(FileData *fd, Main *mainvar, bSound *snd)
expand_doit(fd, mainvar, snd->ipo); // XXX deprecated - old animation system
}
static void expand_probe(FileData *fd, Main *mainvar, Probe *prb)
static void expand_lightprobe(FileData *fd, Main *mainvar, LightProbe *prb)
{
if (prb->adt)
expand_animdata(fd, mainvar, prb->adt);
@ -10074,8 +10074,8 @@ void BLO_expand_main(void *fdhandle, Main *mainvar)
case ID_SO:
expand_sound(fd, mainvar, (bSound *)id);
break;
case ID_PRB:
expand_probe(fd, mainvar, (Probe *)id);
case ID_LP:
expand_lightprobe(fd, mainvar, (LightProbe *)id);
break;
case ID_AR:
expand_armature(fd, mainvar, (bArmature *)id);

View File

@ -135,7 +135,7 @@
#include "DNA_object_force.h"
#include "DNA_packedFile_types.h"
#include "DNA_particle_types.h"
#include "DNA_probe_types.h"
#include "DNA_lightprobe_types.h"
#include "DNA_property_types.h"
#include "DNA_rigidbody_types.h"
#include "DNA_scene_types.h"
@ -3202,11 +3202,11 @@ static void write_sound(WriteData *wd, bSound *sound)
}
}
static void write_probe(WriteData *wd, Probe *prb)
static void write_probe(WriteData *wd, LightProbe *prb)
{
if (prb->id.us > 0 || wd->current) {
/* write LibData */
writestruct(wd, ID_PRB, Probe, 1, prb);
writestruct(wd, ID_LP, LightProbe, 1, prb);
write_iddata(wd, &prb->id);
if (prb->adt) {
@ -3998,8 +3998,8 @@ static bool write_file_handle(
case ID_SPK:
write_speaker(wd, (Speaker *)id);
break;
case ID_PRB:
write_probe(wd, (Probe *)id);
case ID_LP:
write_probe(wd, (LightProbe *)id);
break;
case ID_SO:
write_sound(wd, (bSound *)id);

View File

@ -140,7 +140,7 @@ bool BLT_lang_is_ime_supported(void);
#define BLT_I18NCONTEXT_ID_PAINTCURVE "PaintCurve"
#define BLT_I18NCONTEXT_ID_PALETTE "Palette"
#define BLT_I18NCONTEXT_ID_PARTICLESETTINGS "ParticleSettings"
#define BLT_I18NCONTEXT_ID_PROBE "Probe"
#define BLT_I18NCONTEXT_ID_LIGHTPROBE "LightProbe"
#define BLT_I18NCONTEXT_ID_SCENE "Scene"
#define BLT_I18NCONTEXT_ID_SCREEN "Screen"
#define BLT_I18NCONTEXT_ID_SEQUENCE "Sequence"
@ -196,7 +196,7 @@ typedef struct {
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_PAINTCURVE, "id_paintcurve"), \
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_PALETTE, "id_palette"), \
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_PARTICLESETTINGS, "id_particlesettings"), \
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_PROBE, "id_probe"), \
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_LIGHTPROBE, "id_lightprobe"), \
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_SCENE, "id_scene"), \
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_SCREEN, "id_screen"), \
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_SEQUENCE, "id_sequence"), \

View File

@ -62,7 +62,7 @@ extern "C" {
#include "DNA_node_types.h"
#include "DNA_particle_types.h"
#include "DNA_object_types.h"
#include "DNA_probe_types.h"
#include "DNA_lightprobe_types.h"
#include "DNA_rigidbody_types.h"
#include "DNA_scene_types.h"
#include "DNA_texture_types.h"
@ -385,8 +385,8 @@ void DepsgraphNodeBuilder::build_object(Scene *scene, Object *ob)
build_camera(ob);
break;
case OB_PROBE:
build_probe(ob);
case OB_LIGHTPROBE:
build_lightprobe(ob);
break;
default:
@ -1112,9 +1112,9 @@ void DepsgraphNodeBuilder::build_movieclip(MovieClip *clip)
build_animdata(clip_id);
}
void DepsgraphNodeBuilder::build_probe(Object *object)
void DepsgraphNodeBuilder::build_lightprobe(Object *object)
{
Probe *probe = (Probe *)object->data;
LightProbe *probe = (LightProbe *)object->data;
ID *probe_id = &probe->id;
if (probe_id->tag & LIB_TAG_DOIT) {
return;
@ -1125,13 +1125,13 @@ void DepsgraphNodeBuilder::build_probe(Object *object)
DEG_NODE_TYPE_PARAMETERS,
NULL,
DEG_OPCODE_PLACEHOLDER,
"Probe Eval");
"LightProbe Eval");
add_operation_node(&object->id,
DEG_NODE_TYPE_PARAMETERS,
NULL,
DEG_OPCODE_PLACEHOLDER,
"Probe Eval");
"LightProbe Eval");
build_animdata(probe_id);
}

View File

@ -157,7 +157,7 @@ struct DepsgraphNodeBuilder {
void build_cachefile(CacheFile *cache_file);
void build_mask(Mask *mask);
void build_movieclip(MovieClip *clip);
void build_probe(Object *object);
void build_lightprobe(Object *object);
struct LayerCollectionState {
int index;

View File

@ -61,7 +61,7 @@ extern "C" {
#include "DNA_movieclip_types.h"
#include "DNA_node_types.h"
#include "DNA_particle_types.h"
#include "DNA_probe_types.h"
#include "DNA_lightprobe_types.h"
#include "DNA_object_types.h"
#include "DNA_rigidbody_types.h"
#include "DNA_scene_types.h"
@ -535,8 +535,8 @@ void DepsgraphRelationBuilder::build_object(Main *bmain, Scene *scene, Object *o
build_camera(ob);
break;
case OB_PROBE:
build_probe(ob);
case OB_LIGHTPROBE:
build_lightprobe(ob);
break;
}
@ -1741,9 +1741,9 @@ void DepsgraphRelationBuilder::build_movieclip(MovieClip *clip)
build_animdata(&clip->id);
}
void DepsgraphRelationBuilder::build_probe(Object *object)
void DepsgraphRelationBuilder::build_lightprobe(Object *object)
{
Probe *probe = (Probe *)object->data;
LightProbe *probe = (LightProbe *)object->data;
ID *probe_id = &probe->id;
if (probe_id->tag & LIB_TAG_DOIT) {
return;
@ -1754,12 +1754,12 @@ void DepsgraphRelationBuilder::build_probe(Object *object)
OperationKey probe_key(probe_id,
DEG_NODE_TYPE_PARAMETERS,
DEG_OPCODE_PLACEHOLDER,
"Probe Eval");
"LightProbe Eval");
OperationKey object_key(&object->id,
DEG_NODE_TYPE_PARAMETERS,
DEG_OPCODE_PLACEHOLDER,
"Probe Eval");
add_relation(probe_key, object_key, "Probe Update");
"LightProbe Eval");
add_relation(probe_key, object_key, "LightProbe Update");
}
} // namespace DEG

View File

@ -227,7 +227,7 @@ struct DepsgraphRelationBuilder
void build_cachefile(CacheFile *cache_file);
void build_mask(Mask *mask);
void build_movieclip(MovieClip *clip);
void build_probe(Object *object);
void build_lightprobe(Object *object);
void add_collision_relations(const OperationKey &key, Scene *scene, Object *ob, Group *group, bool dupli, const char *name);
void add_forcefield_relations(const OperationKey &key, Scene *scene, Object *ob, ParticleSystem *psys, EffectorWeights *eff, bool add_absorption, const char *name);

View File

@ -83,8 +83,8 @@ set(SRC
engines/eevee/eevee_data.c
engines/eevee/eevee_engine.c
engines/eevee/eevee_lights.c
engines/eevee/eevee_lightprobes.c
engines/eevee/eevee_materials.c
engines/eevee/eevee_probes.c
engines/eevee/eevee_effects.c
engines/external/external_engine.c
@ -117,6 +117,10 @@ data_to_c_simple(engines/clay/shaders/ssao_groundtruth.glsl SRC)
data_to_c_simple(engines/eevee/shaders/default_frag.glsl SRC)
data_to_c_simple(engines/eevee/shaders/default_world_frag.glsl SRC)
data_to_c_simple(engines/eevee/shaders/background_vert.glsl SRC)
data_to_c_simple(engines/eevee/shaders/lightprobe_filter_frag.glsl SRC)
data_to_c_simple(engines/eevee/shaders/lightprobe_sh_frag.glsl SRC)
data_to_c_simple(engines/eevee/shaders/lightprobe_geom.glsl SRC)
data_to_c_simple(engines/eevee/shaders/lightprobe_vert.glsl SRC)
data_to_c_simple(engines/eevee/shaders/lit_surface_frag.glsl SRC)
data_to_c_simple(engines/eevee/shaders/lit_surface_vert.glsl SRC)
data_to_c_simple(engines/eevee/shaders/effect_bloom_frag.glsl SRC)
@ -124,10 +128,6 @@ data_to_c_simple(engines/eevee/shaders/effect_dof_vert.glsl SRC)
data_to_c_simple(engines/eevee/shaders/effect_dof_geom.glsl SRC)
data_to_c_simple(engines/eevee/shaders/effect_dof_frag.glsl SRC)
data_to_c_simple(engines/eevee/shaders/effect_motion_blur_frag.glsl SRC)
data_to_c_simple(engines/eevee/shaders/probe_filter_frag.glsl SRC)
data_to_c_simple(engines/eevee/shaders/probe_sh_frag.glsl SRC)
data_to_c_simple(engines/eevee/shaders/probe_geom.glsl SRC)
data_to_c_simple(engines/eevee/shaders/probe_vert.glsl SRC)
data_to_c_simple(engines/eevee/shaders/shadow_frag.glsl SRC)
data_to_c_simple(engines/eevee/shaders/shadow_geom.glsl SRC)
data_to_c_simple(engines/eevee/shaders/shadow_vert.glsl SRC)

View File

@ -277,7 +277,7 @@ static int matcap_to_index(int matcap)
}
/* Van der Corput sequence */
/* TODO this is duplicated code from eevee_probes.c */
/* TODO this is duplicated code from eevee_lightprobes.c */
/* From http://holger.dammertz.org/stuff/notes_HammersleyOnHemisphere.html */
static float radical_inverse(int i) {
unsigned int bits = (unsigned int)i;

View File

@ -70,9 +70,9 @@ static void eevee_lamp_data_free(void *storage)
BLI_freelistN(&led->shadow_caster_list);
}
static void eevee_probe_data_free(void *storage)
static void eevee_lightprobe_data_free(void *storage)
{
EEVEE_ProbeEngineData *ped = (EEVEE_ProbeEngineData *)storage;
EEVEE_LightProbeEngineData *ped = (EEVEE_LightProbeEngineData *)storage;
BLI_freelistN(&ped->captured_object_list);
}
@ -99,12 +99,12 @@ EEVEE_ObjectEngineData *EEVEE_object_data_get(Object *ob)
return *oedata;
}
EEVEE_ProbeEngineData *EEVEE_probe_data_get(Object *ob)
EEVEE_LightProbeEngineData *EEVEE_lightprobe_data_get(Object *ob)
{
EEVEE_ProbeEngineData **pedata = (EEVEE_ProbeEngineData **)DRW_object_engine_data_get(ob, &draw_engine_eevee_type, &eevee_probe_data_free);
EEVEE_LightProbeEngineData **pedata = (EEVEE_LightProbeEngineData **)DRW_object_engine_data_get(ob, &draw_engine_eevee_type, &eevee_lightprobe_data_free);
if (*pedata == NULL) {
*pedata = MEM_callocN(sizeof(**pedata), "EEVEE_ProbeEngineData");
*pedata = MEM_callocN(sizeof(**pedata), "EEVEE_LightProbeEngineData");
(*pedata)->need_update = true;
}

View File

@ -41,9 +41,9 @@
#include "eevee_private.h"
#include "GPU_texture.h"
typedef struct EEVEE_ProbeData {
typedef struct EEVEE_LightProbeData {
short probe_id, shadow_id;
} EEVEE_ProbeData;
} EEVEE_LightProbeData;
/* TODO Option */
#define ENABLE_EFFECT_MOTION_BLUR 1

View File

@ -57,7 +57,7 @@ static void EEVEE_engine_init(void *ved)
EEVEE_materials_init();
EEVEE_lights_init(sldata);
EEVEE_probes_init(sldata);
EEVEE_lightprobes_init(sldata);
EEVEE_effects_init(vedata);
}
@ -74,7 +74,7 @@ static void EEVEE_cache_init(void *vedata)
EEVEE_materials_cache_init(vedata);
EEVEE_lights_cache_init(sldata, psl);
EEVEE_probes_cache_init(sldata, psl);
EEVEE_lightprobes_cache_init(sldata, psl);
EEVEE_effects_cache_init(vedata);
}
@ -104,8 +104,8 @@ static void EEVEE_cache_populate(void *vedata, Object *ob)
oedata->need_update = ((ob->deg_update_flag & DEG_RUNTIME_DATA_UPDATE) != 0);
}
}
else if (ob->type == OB_PROBE) {
EEVEE_probes_cache_add(sldata, ob);
else if (ob->type == OB_LIGHTPROBE) {
EEVEE_lightprobes_cache_add(sldata, ob);
}
else if (ob->type == OB_LAMP) {
EEVEE_lights_cache_add(sldata, ob);
@ -118,7 +118,7 @@ static void EEVEE_cache_finish(void *vedata)
EEVEE_materials_cache_finish(vedata);
EEVEE_lights_cache_finish(sldata);
EEVEE_probes_cache_finish(sldata);
EEVEE_lightprobes_cache_finish(sldata);
}
static void EEVEE_draw_scene(void *vedata)
@ -134,7 +134,7 @@ static void EEVEE_draw_scene(void *vedata)
EEVEE_draw_shadows(sldata, psl);
/* Refresh Probes */
EEVEE_probes_refresh(sldata, psl);
EEVEE_lightprobes_refresh(sldata, psl);
/* Attach depth to the hdr buffer and bind it */
DRW_framebuffer_texture_detach(dtxl->depth);
@ -162,7 +162,7 @@ static void EEVEE_engine_free(void)
EEVEE_materials_free();
EEVEE_effects_free();
EEVEE_lights_free();
EEVEE_probes_free();
EEVEE_lightprobes_free();
}
static void EEVEE_layer_collection_settings_create(RenderEngine *UNUSED(engine), IDProperty *props)

View File

@ -26,7 +26,7 @@
#include "DNA_world_types.h"
#include "DNA_texture_types.h"
#include "DNA_image_types.h"
#include "DNA_probe_types.h"
#include "DNA_lightprobe_types.h"
#include "DNA_view3d_types.h"
#include "BKE_object.h"
@ -47,7 +47,7 @@
#include "eevee_private.h"
/* TODO Option */
#define PROBE_CUBE_SIZE 512
#define LIGHTPROBE_TYPE_CUBE_SIZE 512
#define PROBE_SIZE 1024
static struct {
@ -62,10 +62,10 @@ static struct {
} e_data = {NULL}; /* Engine data */
extern char datatoc_default_world_frag_glsl[];
extern char datatoc_probe_filter_frag_glsl[];
extern char datatoc_probe_sh_frag_glsl[];
extern char datatoc_probe_geom_glsl[];
extern char datatoc_probe_vert_glsl[];
extern char datatoc_lightprobe_filter_frag_glsl[];
extern char datatoc_lightprobe_sh_frag_glsl[];
extern char datatoc_lightprobe_geom_glsl[];
extern char datatoc_lightprobe_vert_glsl[];
extern char datatoc_bsdf_common_lib_glsl[];
extern char datatoc_bsdf_sampling_lib_glsl[];
@ -102,7 +102,7 @@ static struct GPUTexture *create_hammersley_sample_texture(int samples)
return tex;
}
void EEVEE_probes_init(EEVEE_SceneLayerData *sldata)
void EEVEE_lightprobes_init(EEVEE_SceneLayerData *sldata)
{
if (!e_data.probe_filter_sh) {
char *shader_str = NULL;
@ -110,17 +110,17 @@ void EEVEE_probes_init(EEVEE_SceneLayerData *sldata)
DynStr *ds_frag = BLI_dynstr_new();
BLI_dynstr_append(ds_frag, datatoc_bsdf_common_lib_glsl);
BLI_dynstr_append(ds_frag, datatoc_bsdf_sampling_lib_glsl);
BLI_dynstr_append(ds_frag, datatoc_probe_filter_frag_glsl);
BLI_dynstr_append(ds_frag, datatoc_lightprobe_filter_frag_glsl);
shader_str = BLI_dynstr_get_cstring(ds_frag);
BLI_dynstr_free(ds_frag);
e_data.probe_filter_sh = DRW_shader_create(
datatoc_probe_vert_glsl, datatoc_probe_geom_glsl, shader_str,
datatoc_lightprobe_vert_glsl, datatoc_lightprobe_geom_glsl, shader_str,
"#define HAMMERSLEY_SIZE 1024\n"
"#define NOISE_SIZE 64\n");
e_data.probe_default_sh = DRW_shader_create(
datatoc_probe_vert_glsl, datatoc_probe_geom_glsl, datatoc_default_world_frag_glsl, NULL);
datatoc_lightprobe_vert_glsl, datatoc_lightprobe_geom_glsl, datatoc_default_world_frag_glsl, NULL);
MEM_freeN(shader_str);
}
@ -128,24 +128,24 @@ void EEVEE_probes_init(EEVEE_SceneLayerData *sldata)
/* Shaders */
if (!e_data.hammersley) {
e_data.hammersley = create_hammersley_sample_texture(1024);
e_data.probe_spherical_harmonic_sh = DRW_shader_create_fullscreen(datatoc_probe_sh_frag_glsl, NULL);
e_data.probe_spherical_harmonic_sh = DRW_shader_create_fullscreen(datatoc_lightprobe_sh_frag_glsl, NULL);
}
if (!sldata->probes) {
sldata->probes = MEM_callocN(sizeof(EEVEE_ProbesInfo), "EEVEE_ProbesInfo");
sldata->probe_ubo = DRW_uniformbuffer_create(sizeof(EEVEE_Probe) * MAX_PROBE, NULL);
sldata->probes = MEM_callocN(sizeof(EEVEE_LightProbesInfo), "EEVEE_LightProbesInfo");
sldata->probe_ubo = DRW_uniformbuffer_create(sizeof(EEVEE_LightProbe) * MAX_PROBE, NULL);
}
/* Setup Render Target Cubemap */
if (!sldata->probe_rt) {
sldata->probe_rt = DRW_texture_create_cube(PROBE_CUBE_SIZE, DRW_TEX_RGBA_16, DRW_TEX_FILTER | DRW_TEX_MIPMAP, NULL);
sldata->probe_depth_rt = DRW_texture_create_cube(PROBE_CUBE_SIZE, DRW_TEX_DEPTH_24, DRW_TEX_FILTER, NULL);
sldata->probe_rt = DRW_texture_create_cube(LIGHTPROBE_TYPE_CUBE_SIZE, DRW_TEX_RGBA_16, DRW_TEX_FILTER | DRW_TEX_MIPMAP, NULL);
sldata->probe_depth_rt = DRW_texture_create_cube(LIGHTPROBE_TYPE_CUBE_SIZE, DRW_TEX_DEPTH_24, DRW_TEX_FILTER, NULL);
}
DRWFboTexture tex_probe[2] = {{&sldata->probe_depth_rt, DRW_TEX_DEPTH_24, DRW_TEX_FILTER},
{&sldata->probe_rt, DRW_TEX_RGBA_16, DRW_TEX_FILTER | DRW_TEX_MIPMAP}};
DRW_framebuffer_init(&sldata->probe_fb, &draw_engine_eevee_type, PROBE_CUBE_SIZE, PROBE_CUBE_SIZE, tex_probe, 2);
DRW_framebuffer_init(&sldata->probe_fb, &draw_engine_eevee_type, LIGHTPROBE_TYPE_CUBE_SIZE, LIGHTPROBE_TYPE_CUBE_SIZE, tex_probe, 2);
/* Spherical Harmonic Buffer */
DRWFboTexture tex_sh = {&sldata->probe_sh, DRW_TEX_RGBA_16, DRW_TEX_FILTER | DRW_TEX_MIPMAP};
@ -153,9 +153,9 @@ void EEVEE_probes_init(EEVEE_SceneLayerData *sldata)
DRW_framebuffer_init(&sldata->probe_sh_fb, &draw_engine_eevee_type, 9, 1, &tex_sh, 1);
}
void EEVEE_probes_cache_init(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl)
void EEVEE_lightprobes_cache_init(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl)
{
EEVEE_ProbesInfo *pinfo = sldata->probes;
EEVEE_LightProbesInfo *pinfo = sldata->probes;
pinfo->num_cube = 1; /* at least one for the world */
memset(pinfo->probes_ref, 0, sizeof(pinfo->probes_ref));
@ -178,7 +178,7 @@ void EEVEE_probes_cache_init(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl)
wo->update_flag = 0;
if (wo->use_nodes && wo->nodetree) {
struct GPUMaterial *gpumat = EEVEE_material_world_probe_get(scene, wo);
struct GPUMaterial *gpumat = EEVEE_material_world_lightprobe_get(scene, wo);
grp = DRW_shgroup_material_instance_create(gpumat, psl->probe_background, geom);
@ -208,11 +208,11 @@ void EEVEE_probes_cache_init(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl)
}
{
psl->probe_meshes = DRW_pass_create("Probe Meshes", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS);
psl->probe_meshes = DRW_pass_create("LightProbe Meshes", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS);
}
{
psl->probe_prefilter = DRW_pass_create("Probe Filtering", DRW_STATE_WRITE_COLOR);
psl->probe_prefilter = DRW_pass_create("LightProbe Filtering", DRW_STATE_WRITE_COLOR);
struct Batch *geom = DRW_cache_fullscreen_quad_get();
@ -233,7 +233,7 @@ void EEVEE_probes_cache_init(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl)
}
{
psl->probe_sh_compute = DRW_pass_create("Probe SH Compute", DRW_STATE_WRITE_COLOR);
psl->probe_sh_compute = DRW_pass_create("LightProbe SH Compute", DRW_STATE_WRITE_COLOR);
DRWShadingGroup *grp = DRW_shgroup_create(e_data.probe_spherical_harmonic_sh, psl->probe_sh_compute);
DRW_shgroup_uniform_int(grp, "probeSize", &sldata->probes->shres, 1);
@ -245,9 +245,9 @@ void EEVEE_probes_cache_init(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl)
}
}
void EEVEE_probes_cache_add(EEVEE_SceneLayerData *sldata, Object *ob)
void EEVEE_lightprobes_cache_add(EEVEE_SceneLayerData *sldata, Object *ob)
{
EEVEE_ProbesInfo *pinfo = sldata->probes;
EEVEE_LightProbesInfo *pinfo = sldata->probes;
/* Step 1 find all lamps in the scene and setup them */
if (pinfo->num_cube > MAX_PROBE) {
@ -255,7 +255,7 @@ void EEVEE_probes_cache_add(EEVEE_SceneLayerData *sldata, Object *ob)
pinfo->num_cube = MAX_PROBE;
}
else {
EEVEE_ProbeEngineData *ped = EEVEE_probe_data_get(ob);
EEVEE_LightProbeEngineData *ped = EEVEE_lightprobe_data_get(ob);
if ((ob->deg_update_flag & DEG_RUNTIME_DATA_UPDATE) != 0) {
ped->need_update = true;
@ -270,14 +270,14 @@ void EEVEE_probes_cache_add(EEVEE_SceneLayerData *sldata, Object *ob)
}
}
static void EEVEE_probes_updates(EEVEE_SceneLayerData *sldata)
static void EEVEE_lightprobes_updates(EEVEE_SceneLayerData *sldata)
{
EEVEE_ProbesInfo *pinfo = sldata->probes;
EEVEE_LightProbesInfo *pinfo = sldata->probes;
Object *ob;
for (int i = 1; (ob = pinfo->probes_ref[i]) && (i < MAX_PROBE); i++) {
Probe *probe = (Probe *)ob->data;
EEVEE_Probe *eprobe = &pinfo->probe_data[i];
LightProbe *probe = (LightProbe *)ob->data;
EEVEE_LightProbe *eprobe = &pinfo->probe_data[i];
/* Attenuation */
eprobe->attenuation_type = probe->attenuation_type;
@ -290,7 +290,7 @@ static void EEVEE_probes_updates(EEVEE_SceneLayerData *sldata)
/* Parallax */
float dist;
if ((probe->flag & PRB_CUSTOM_PARALLAX) != 0) {
if ((probe->flag & LIGHTPROBE_FLAG_CUSTOM_PARALLAX) != 0) {
eprobe->parallax_type = probe->parallax_type;
dist = probe->distpar;
}
@ -306,9 +306,9 @@ static void EEVEE_probes_updates(EEVEE_SceneLayerData *sldata)
}
}
void EEVEE_probes_cache_finish(EEVEE_SceneLayerData *sldata)
void EEVEE_lightprobes_cache_finish(EEVEE_SceneLayerData *sldata)
{
EEVEE_ProbesInfo *pinfo = sldata->probes;
EEVEE_LightProbesInfo *pinfo = sldata->probes;
Object *ob;
/* Setup enough layers. */
@ -332,7 +332,7 @@ void EEVEE_probes_cache_finish(EEVEE_SceneLayerData *sldata)
pinfo->cache_num_cube = pinfo->num_cube;
for (int i = 1; (ob = pinfo->probes_ref[i]) && (i < MAX_PROBE); i++) {
EEVEE_ProbeEngineData *ped = EEVEE_probe_data_get(ob);
EEVEE_LightProbeEngineData *ped = EEVEE_lightprobe_data_get(ob);
ped->need_update = true;
ped->ready_to_shade = false;
}
@ -342,14 +342,14 @@ void EEVEE_probes_cache_finish(EEVEE_SceneLayerData *sldata)
DRW_framebuffer_init(&sldata->probe_filter_fb, &draw_engine_eevee_type, PROBE_SIZE, PROBE_SIZE, &tex_filter, 1);
EEVEE_probes_updates(sldata);
EEVEE_lightprobes_updates(sldata);
DRW_uniformbuffer_update(sldata->probe_ubo, &sldata->probes->probe_data);
}
static void filter_probe(EEVEE_Probe *eprobe, EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl, int probe_idx)
static void filter_probe(EEVEE_LightProbe *eprobe, EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl, int probe_idx)
{
EEVEE_ProbesInfo *pinfo = sldata->probes;
EEVEE_LightProbesInfo *pinfo = sldata->probes;
/* 2 - Let gpu create Mipmaps for Filtered Importance Sampling. */
/* Bind next framebuffer to be able to gen. mips for probe_rt. */
@ -399,8 +399,8 @@ static void filter_probe(EEVEE_Probe *eprobe, EEVEE_SceneLayerData *sldata, EEVE
#endif
pinfo->invsamples_ct = 1.0f / pinfo->samples_ct;
pinfo->lodfactor = bias + 0.5f * log((float)(PROBE_CUBE_SIZE * PROBE_CUBE_SIZE) * pinfo->invsamples_ct) / log(2);
pinfo->lodmax = floorf(log2f(PROBE_CUBE_SIZE)) - 2.0f;
pinfo->lodfactor = bias + 0.5f * log((float)(LIGHTPROBE_TYPE_CUBE_SIZE * LIGHTPROBE_TYPE_CUBE_SIZE) * pinfo->invsamples_ct) / log(2);
pinfo->lodmax = floorf(log2f(LIGHTPROBE_TYPE_CUBE_SIZE)) - 2.0f;
DRW_framebuffer_texture_attach(sldata->probe_filter_fb, sldata->probe_pool, 0, i);
DRW_framebuffer_viewport_size(sldata->probe_filter_fb, mipsize, mipsize);
@ -429,10 +429,10 @@ static void filter_probe(EEVEE_Probe *eprobe, EEVEE_SceneLayerData *sldata, EEVE
* Renders the world probe if probe_idx = -1. */
static void render_one_probe(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl, int probe_idx)
{
EEVEE_ProbesInfo *pinfo = sldata->probes;
EEVEE_Probe *eprobe = &pinfo->probe_data[probe_idx];
EEVEE_LightProbesInfo *pinfo = sldata->probes;
EEVEE_LightProbe *eprobe = &pinfo->probe_data[probe_idx];
Object *ob = pinfo->probes_ref[probe_idx];
Probe *prb = (Probe *)ob->data;
LightProbe *prb = (LightProbe *)ob->data;
float winmat[4][4], posmat[4][4];
@ -460,7 +460,7 @@ static void render_one_probe(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl,
DRW_framebuffer_cubeface_attach(sldata->probe_fb, sldata->probe_rt, 0, i, 0);
DRW_framebuffer_cubeface_attach(sldata->probe_fb, sldata->probe_depth_rt, 0, i, 0);
DRW_framebuffer_viewport_size(sldata->probe_fb, PROBE_CUBE_SIZE, PROBE_CUBE_SIZE);
DRW_framebuffer_viewport_size(sldata->probe_fb, LIGHTPROBE_TYPE_CUBE_SIZE, LIGHTPROBE_TYPE_CUBE_SIZE);
DRW_framebuffer_clear(false, true, false, NULL, 1.0);
@ -502,10 +502,10 @@ static void render_one_probe(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl,
filter_probe(eprobe, sldata, psl, probe_idx);
}
static void render_world_probe(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl)
static void render_world_lightprobe(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl)
{
EEVEE_ProbesInfo *pinfo = sldata->probes;
EEVEE_Probe *eprobe = &pinfo->probe_data[0];
EEVEE_LightProbesInfo *pinfo = sldata->probes;
EEVEE_LightProbe *eprobe = &pinfo->probe_data[0];
/* 1 - Render to cubemap target using geometry shader. */
/* For world probe, we don't need to clear since we render the background directly. */
@ -517,16 +517,16 @@ static void render_world_probe(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl
filter_probe(eprobe, sldata, psl, 0);
}
void EEVEE_probes_refresh(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl)
void EEVEE_lightprobes_refresh(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl)
{
EEVEE_ProbesInfo *pinfo = sldata->probes;
EEVEE_LightProbesInfo *pinfo = sldata->probes;
Object *ob;
const DRWContextState *draw_ctx = DRW_context_state_get();
RegionView3D *rv3d = draw_ctx->rv3d;
/* Render world in priority */
if (e_data.update_world) {
render_world_probe(sldata, psl);
render_world_lightprobe(sldata, psl);
e_data.update_world = false;
if (!e_data.world_ready_to_shade) {
@ -549,7 +549,7 @@ void EEVEE_probes_refresh(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl)
}
for (int i = 1; (ob = pinfo->probes_ref[i]) && (i < MAX_PROBE); i++) {
EEVEE_ProbeEngineData *ped = EEVEE_probe_data_get(ob);
EEVEE_LightProbeEngineData *ped = EEVEE_lightprobe_data_get(ob);
if (ped->need_update) {
render_one_probe(sldata, psl, i);
@ -571,7 +571,7 @@ void EEVEE_probes_refresh(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl)
}
}
void EEVEE_probes_free(void)
void EEVEE_lightprobes_free(void)
{
DRW_SHADER_FREE_SAFE(e_data.probe_default_sh);
DRW_SHADER_FREE_SAFE(e_data.probe_filter_sh);

View File

@ -83,10 +83,10 @@ extern char datatoc_lit_surface_vert_glsl[];
extern char datatoc_shadow_frag_glsl[];
extern char datatoc_shadow_geom_glsl[];
extern char datatoc_shadow_vert_glsl[];
extern char datatoc_probe_filter_frag_glsl[];
extern char datatoc_probe_sh_frag_glsl[];
extern char datatoc_probe_geom_glsl[];
extern char datatoc_probe_vert_glsl[];
extern char datatoc_lightprobe_filter_frag_glsl[];
extern char datatoc_lightprobe_sh_frag_glsl[];
extern char datatoc_lightprobe_geom_glsl[];
extern char datatoc_lightprobe_vert_glsl[];
extern char datatoc_background_vert_glsl[];
extern Material defmaterial;
@ -111,12 +111,12 @@ static struct GPUTexture *create_ggx_lut_texture(int UNUSED(w), int UNUSED(h))
BLI_dynstr_free(ds_vert);
struct GPUShader *sh = DRW_shader_create_with_lib(
datatoc_probe_vert_glsl, datatoc_probe_geom_glsl, datatoc_bsdf_lut_frag_glsl, lib_str,
datatoc_lightprobe_vert_glsl, datatoc_lightprobe_geom_glsl, datatoc_bsdf_lut_frag_glsl, lib_str,
"#define HAMMERSLEY_SIZE 8192\n"
"#define BRDF_LUT_SIZE 64\n"
"#define NOISE_SIZE 64\n");
DRWPass *pass = DRW_pass_create("Probe Filtering", DRW_STATE_WRITE_COLOR);
DRWPass *pass = DRW_pass_create("LightProbe Filtering", DRW_STATE_WRITE_COLOR);
DRWShadingGroup *grp = DRW_shgroup_create(sh, pass);
DRW_shgroup_uniform_float(grp, "sampleCount", &samples_ct, 1);
DRW_shgroup_uniform_float(grp, "invSampleCount", &inv_samples_ct, 1);
@ -221,12 +221,12 @@ void EEVEE_materials_init(void)
}
}
struct GPUMaterial *EEVEE_material_world_probe_get(struct Scene *scene, World *wo)
struct GPUMaterial *EEVEE_material_world_lightprobe_get(struct Scene *scene, World *wo)
{
return GPU_material_from_nodetree(
scene, wo->nodetree, &wo->gpumaterial, &DRW_engine_viewport_eevee_type,
VAR_WORLD_PROBE,
datatoc_probe_vert_glsl, datatoc_probe_geom_glsl, e_data.frag_shader_lib,
datatoc_lightprobe_vert_glsl, datatoc_lightprobe_geom_glsl, e_data.frag_shader_lib,
SHADER_DEFINES "#define PROBE_CAPTURE\n");
}
@ -239,12 +239,12 @@ struct GPUMaterial *EEVEE_material_world_background_get(struct Scene *scene, Wor
SHADER_DEFINES "#define WORLD_BACKGROUND\n");
}
struct GPUMaterial *EEVEE_material_mesh_probe_get(struct Scene *scene, Material *ma)
struct GPUMaterial *EEVEE_material_mesh_lightprobe_get(struct Scene *scene, Material *ma)
{
return GPU_material_from_nodetree(
scene, ma->nodetree, &ma->gpumaterial, &DRW_engine_viewport_eevee_type,
VAR_MAT_MESH | VAR_MAT_PROBE,
datatoc_probe_vert_glsl, NULL, e_data.frag_shader_lib,
datatoc_lightprobe_vert_glsl, NULL, e_data.frag_shader_lib,
SHADER_DEFINES "#define MESH_SHADER\n" "#define PROBE_CAPTURE\n");
}

View File

@ -166,7 +166,7 @@ enum {
};
/* ************ PROBE UBO ************* */
typedef struct EEVEE_Probe {
typedef struct EEVEE_LightProbe {
float position[3], parallax_type;
float shcoefs[9][3], pad2;
float attenuation_fac;
@ -174,10 +174,10 @@ typedef struct EEVEE_Probe {
float pad3[2];
float attenuationmat[4][4];
float parallaxmat[4][4];
} EEVEE_Probe;
} EEVEE_LightProbe;
/* ************ PROBE DATA ************* */
typedef struct EEVEE_ProbesInfo {
typedef struct EEVEE_LightProbesInfo {
int num_cube, cache_num_cube;
int update_flag;
/* Actual number of probes that have datas. */
@ -199,10 +199,10 @@ typedef struct EEVEE_ProbesInfo {
/* XXX This is fragile, can get out of sync quickly. */
struct Object *probes_ref[MAX_PROBE];
/* UBO Storage : data used by UBO */
struct EEVEE_Probe probe_data[MAX_PROBE];
} EEVEE_ProbesInfo;
struct EEVEE_LightProbe probe_data[MAX_PROBE];
} EEVEE_LightProbesInfo;
/* EEVEE_ProbesInfo->update_flag */
/* EEVEE_LightProbesInfo->update_flag */
enum {
PROBE_UPDATE_CUBE = (1 << 0),
};
@ -270,7 +270,7 @@ typedef struct EEVEE_SceneLayerData {
struct ListBase shadow_casters; /* Shadow casters gathered during cache iteration */
/* Probes */
struct EEVEE_ProbesInfo *probes;
struct EEVEE_LightProbesInfo *probes;
struct GPUUniformBuffer *probe_ubo;
@ -293,11 +293,11 @@ typedef struct EEVEE_LampEngineData {
void *storage; /* either EEVEE_LightData, EEVEE_ShadowCubeData, EEVEE_ShadowCascadeData */
} EEVEE_LampEngineData;
typedef struct EEVEE_ProbeEngineData {
typedef struct EEVEE_LightProbeEngineData {
bool need_update;
bool ready_to_shade;
struct ListBase captured_object_list;
} EEVEE_ProbeEngineData;
} EEVEE_LightProbeEngineData;
typedef struct EEVEE_ObjectEngineData {
bool need_update;
@ -323,7 +323,7 @@ typedef struct EEVEE_PrivateData {
/* eevee_data.c */
EEVEE_SceneLayerData *EEVEE_scene_layer_data_get(void);
EEVEE_ObjectEngineData *EEVEE_object_data_get(Object *ob);
EEVEE_ProbeEngineData *EEVEE_probe_data_get(Object *ob);
EEVEE_LightProbeEngineData *EEVEE_lightprobe_data_get(Object *ob);
EEVEE_LampEngineData *EEVEE_lamp_data_get(Object *ob);
@ -332,9 +332,9 @@ void EEVEE_materials_init(void);
void EEVEE_materials_cache_init(EEVEE_Data *vedata);
void EEVEE_materials_cache_populate(EEVEE_Data *vedata, EEVEE_SceneLayerData *sldata, Object *ob, struct Batch *geom);
void EEVEE_materials_cache_finish(EEVEE_Data *vedata);
struct GPUMaterial *EEVEE_material_world_probe_get(struct Scene *scene, struct World *wo);
struct GPUMaterial *EEVEE_material_world_lightprobe_get(struct Scene *scene, struct World *wo);
struct GPUMaterial *EEVEE_material_world_background_get(struct Scene *scene, struct World *wo);
struct GPUMaterial *EEVEE_material_mesh_probe_get(struct Scene *scene, Material *ma);
struct GPUMaterial *EEVEE_material_mesh_lightprobe_get(struct Scene *scene, Material *ma);
struct GPUMaterial *EEVEE_material_mesh_get(struct Scene *scene, Material *ma);
void EEVEE_materials_free(void);
@ -348,13 +348,13 @@ void EEVEE_lights_update(EEVEE_SceneLayerData *sldata);
void EEVEE_draw_shadows(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl);
void EEVEE_lights_free(void);
/* eevee_probes.c */
void EEVEE_probes_init(EEVEE_SceneLayerData *sldata);
void EEVEE_probes_cache_init(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl);
void EEVEE_probes_cache_add(EEVEE_SceneLayerData *sldata, Object *ob);
void EEVEE_probes_cache_finish(EEVEE_SceneLayerData *sldata);
void EEVEE_probes_refresh(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl);
void EEVEE_probes_free(void);
/* eevee_lightprobes.c */
void EEVEE_lightprobes_init(EEVEE_SceneLayerData *sldata);
void EEVEE_lightprobes_cache_init(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl);
void EEVEE_lightprobes_cache_add(EEVEE_SceneLayerData *sldata, Object *ob);
void EEVEE_lightprobes_cache_finish(EEVEE_SceneLayerData *sldata);
void EEVEE_lightprobes_refresh(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl);
void EEVEE_lightprobes_free(void);
/* eevee_effects.c */
void EEVEE_effects_init(EEVEE_Data *vedata);

View File

@ -67,7 +67,7 @@ static struct DRWShapeCache {
Batch *drw_lamp_spot;
Batch *drw_lamp_spot_square;
Batch *drw_speaker;
Batch *drw_probe;
Batch *drw_lightprobe;
Batch *drw_bone_octahedral;
Batch *drw_bone_octahedral_wire;
Batch *drw_bone_box;
@ -117,7 +117,7 @@ void DRW_shape_cache_free(void)
BATCH_DISCARD_ALL_SAFE(SHC.drw_lamp_spot);
BATCH_DISCARD_ALL_SAFE(SHC.drw_lamp_spot_square);
BATCH_DISCARD_ALL_SAFE(SHC.drw_speaker);
BATCH_DISCARD_ALL_SAFE(SHC.drw_probe);
BATCH_DISCARD_ALL_SAFE(SHC.drw_lightprobe);
BATCH_DISCARD_ALL_SAFE(SHC.drw_bone_octahedral);
BATCH_DISCARD_ALL_SAFE(SHC.drw_bone_octahedral_wire);
BATCH_DISCARD_ALL_SAFE(SHC.drw_bone_box);
@ -1322,10 +1322,10 @@ Batch *DRW_cache_speaker_get(void)
/** \name Probe
* \{ */
Batch *DRW_cache_probe_get(void)
Batch *DRW_cache_lightprobe_get(void)
{
#define CIRCLE_RESOL 16
if (!SHC.drw_probe) {
if (!SHC.drw_lightprobe) {
int v_idx = 0;
float v[3] = {0.0f, 1.0f, 0.0f};
/* TODO something nicer than just a circle */
@ -1363,9 +1363,9 @@ Batch *DRW_cache_probe_get(void)
v[1] = 1.0f;
VertexBuffer_set_attrib(vbo, attr_id.pos, v_idx++, v);
SHC.drw_probe = Batch_create(PRIM_LINES, vbo, NULL);
SHC.drw_lightprobe = Batch_create(PRIM_LINES, vbo, NULL);
}
return SHC.drw_probe;
return SHC.drw_lightprobe;
#undef CIRCLE_RESOL
}

View File

@ -79,7 +79,7 @@ struct Batch *DRW_cache_camera_tria_get(void);
struct Batch *DRW_cache_speaker_get(void);
/* Probe */
struct Batch *DRW_cache_probe_get(void);
struct Batch *DRW_cache_lightprobe_get(void);
/* Bones */
struct Batch *DRW_cache_bone_octahedral_get(void);

View File

@ -32,7 +32,7 @@
#include "DNA_curve_types.h"
#include "DNA_mesh_types.h"
#include "DNA_object_force.h"
#include "DNA_probe_types.h"
#include "DNA_lightprobe_types.h"
#include "DNA_particle_types.h"
#include "DNA_view3d_types.h"
#include "DNA_world_types.h"
@ -908,7 +908,7 @@ static void OBJECT_cache_init(void *vedata)
/* Probe */
static float probeSize = 10.0f;
geom = DRW_cache_probe_get();
geom = DRW_cache_lightprobe_get();
stl->g_data->probe = shgroup_instance_screenspace(psl->non_meshes, geom, &probeSize);
/* Camera */
@ -1408,18 +1408,18 @@ static void DRW_shgroup_speaker(OBJECT_StorageList *stl, Object *ob, SceneLayer
DRW_shgroup_call_dynamic_add(stl->g_data->speaker, color, &one, ob->obmat);
}
static void DRW_shgroup_probe(OBJECT_StorageList *stl, Object *ob, SceneLayer *sl)
static void DRW_shgroup_lightprobe(OBJECT_StorageList *stl, Object *ob, SceneLayer *sl)
{
float *color;
Probe *prb = (Probe *)ob->data;
LightProbe *prb = (LightProbe *)ob->data;
DRW_object_wire_theme_get(ob, sl, &color);
prb->distfalloff = (1.0f - prb->falloff) * prb->distinf;
DRW_shgroup_call_dynamic_add(stl->g_data->probe, ob->obmat[3], color);
if ((prb->flag & PRB_SHOW_INFLUENCE) != 0) {
if (prb->attenuation_type == PROBE_BOX) {
if ((prb->flag & LIGHTPROBE_FLAG_SHOW_INFLUENCE) != 0) {
if (prb->attenuation_type == LIGHTPROBE_SHAPE_BOX) {
DRW_shgroup_call_dynamic_add(stl->g_data->cube, color, &prb->distinf, ob->obmat);
DRW_shgroup_call_dynamic_add(stl->g_data->cube, color, &prb->distfalloff, ob->obmat);
}
@ -1429,11 +1429,11 @@ static void DRW_shgroup_probe(OBJECT_StorageList *stl, Object *ob, SceneLayer *s
}
}
if ((prb->flag & PRB_SHOW_PARALLAX) != 0) {
if ((prb->flag & LIGHTPROBE_FLAG_SHOW_PARALLAX) != 0) {
float (*obmat)[4], *dist;
if ((prb->flag & PRB_CUSTOM_PARALLAX) != 0) {
if ((prb->flag & LIGHTPROBE_FLAG_CUSTOM_PARALLAX) != 0) {
dist = &prb->distpar;
/* TODO object parallax */
obmat = ob->obmat;
@ -1443,7 +1443,7 @@ static void DRW_shgroup_probe(OBJECT_StorageList *stl, Object *ob, SceneLayer *s
obmat = ob->obmat;
}
if (prb->parallax_type == PROBE_BOX) {
if (prb->parallax_type == LIGHTPROBE_SHAPE_BOX) {
DRW_shgroup_call_dynamic_add(stl->g_data->cube, color, &dist, obmat);
}
else {
@ -1451,7 +1451,7 @@ static void DRW_shgroup_probe(OBJECT_StorageList *stl, Object *ob, SceneLayer *s
}
}
if ((prb->flag & PRB_SHOW_CLIP_DIST) != 0) {
if ((prb->flag & LIGHTPROBE_FLAG_SHOW_CLIP_DIST) != 0) {
static const float cubefacemat[6][4][4] = {
{{0.0, 0.0, -1.0, 0.0}, {0.0, -1.0, 0.0, 0.0}, {-1.0, 0.0, 0.0, 0.0}, {0.0, 0.0, 0.0, 1.0}},
{{0.0, 0.0, 1.0, 0.0}, {0.0, -1.0, 0.0, 0.0}, {1.0, 0.0, 0.0, 0.0}, {0.0, 0.0, 0.0, 1.0}},
@ -1674,8 +1674,8 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
case OB_SPEAKER:
DRW_shgroup_speaker(stl, ob, sl);
break;
case OB_PROBE:
DRW_shgroup_probe(stl, ob, sl);
case OB_LIGHTPROBE:
DRW_shgroup_lightprobe(stl, ob, sl);
break;
case OB_ARMATURE:
{

View File

@ -1359,7 +1359,7 @@ int UI_idcode_icon_get(const int idcode)
return ICON_COLOR; /* TODO! this would need its own icon! */
case ID_PC:
return ICON_CURVE_BEZCURVE; /* TODO! this would need its own icon! */
case ID_PRB:
case ID_LP:
return ICON_RADIO;
case ID_SCE:
return ICON_SCENE_DATA;

View File

@ -451,7 +451,7 @@ static const char *template_id_browse_tip(const StructRNA *type)
case ID_PC: return N_("Browse Paint Curve Data to be linked");
case ID_CF: return N_("Browse Cache Files to be linked");
case ID_WS: return N_("Browse Workspace to be linked");
case ID_PRB: return N_("Browse Probe to be linked");
case ID_LP: return N_("Browse LightProbe to be linked");
}
}
return N_("Browse ID data to be linked");
@ -590,7 +590,7 @@ static void template_ID(
BLT_I18NCONTEXT_ID_GPENCIL,
BLT_I18NCONTEXT_ID_FREESTYLELINESTYLE,
BLT_I18NCONTEXT_ID_WORKSPACE,
BLT_I18NCONTEXT_ID_PROBE,
BLT_I18NCONTEXT_ID_LIGHTPROBE,
);
if (newop) {

View File

@ -45,7 +45,7 @@
#include "DNA_object_fluidsim.h"
#include "DNA_object_force.h"
#include "DNA_object_types.h"
#include "DNA_probe_types.h"
#include "DNA_lightprobe_types.h"
#include "DNA_scene_types.h"
#include "DNA_vfont_types.h"
#include "DNA_actuator_types.h"
@ -152,11 +152,11 @@ static EnumPropertyItem field_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
/* copy from rna_probe.c */
static EnumPropertyItem probe_type_items[] = {
{PROBE_CUBE, "CUBE", ICON_MESH_UVSPHERE, "Sphere", ""},
// {PROBE_PLANAR, "PLANAR", ICON_MESH_PLANE, "Planar", ""},
// {PROBE_IMAGE, "IMAGE", ICON_NONE, "Image", ""},
/* copy from rna_lightprobe.c */
static EnumPropertyItem lightprobe_type_items[] = {
{LIGHTPROBE_TYPE_CUBE, "CUBE", ICON_MESH_UVSPHERE, "Sphere", ""},
// {LIGHTPROBE_TYPE_PLANAR, "PLANAR", ICON_MESH_PLANE, "Planar", ""},
// {LIGHTPROBE_TYPE_IMAGE, "IMAGE", ICON_NONE, "Image", ""},
{0, NULL, 0, NULL, NULL}
};
@ -512,10 +512,10 @@ void OBJECT_OT_add(wmOperatorType *ot)
/********************** Add Probe Operator **********************/
/* for object add operator */
static int probe_add_exec(bContext *C, wmOperator *op)
static int lightprobe_add_exec(bContext *C, wmOperator *op)
{
Object *ob;
Probe *probe;
LightProbe *probe;
int type;
bool enter_editmode;
unsigned int layer;
@ -529,11 +529,11 @@ static int probe_add_exec(bContext *C, wmOperator *op)
type = RNA_enum_get(op->ptr, "type");
dia = RNA_float_get(op->ptr, "radius");
const char *name = CTX_DATA_(BLT_I18NCONTEXT_ID_OBJECT, "Probe");
ob = ED_object_add_type(C, OB_PROBE, name, loc, rot, false, layer);
const char *name = CTX_DATA_(BLT_I18NCONTEXT_ID_OBJECT, "LightProbe");
ob = ED_object_add_type(C, OB_LIGHTPROBE, name, loc, rot, false, layer);
BKE_object_obdata_size_init(ob, dia);
probe = (Probe *)ob->data;
probe = (LightProbe *)ob->data;
probe->type = type;
DEG_relations_tag_update(CTX_data_main(C));
@ -541,22 +541,22 @@ static int probe_add_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
void OBJECT_OT_probe_add(wmOperatorType *ot)
void OBJECT_OT_lightprobe_add(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Add Probe";
ot->description = "Add a probe object";
ot->idname = "OBJECT_OT_probe_add";
ot->name = "Add Light Probe";
ot->description = "Add a light probe object";
ot->idname = "OBJECT_OT_lightprobe_add";
/* api callbacks */
ot->exec = probe_add_exec;
ot->exec = lightprobe_add_exec;
ot->poll = ED_operator_objectmode;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_enum(ot->srna, "type", probe_type_items, 0, "Type", "");
ot->prop = RNA_def_enum(ot->srna, "type", lightprobe_type_items, 0, "Type", "");
ED_object_add_unit_props(ot);
ED_object_add_generic_props(ot, true);

View File

@ -112,7 +112,7 @@ void OBJECT_OT_metaball_add(struct wmOperatorType *ot);
void OBJECT_OT_text_add(struct wmOperatorType *ot);
void OBJECT_OT_armature_add(struct wmOperatorType *ot);
void OBJECT_OT_empty_add(struct wmOperatorType *ot);
void OBJECT_OT_probe_add(struct wmOperatorType *ot);
void OBJECT_OT_lightprobe_add(struct wmOperatorType *ot);
void OBJECT_OT_drop_named_image(struct wmOperatorType *ot);
void OBJECT_OT_lamp_add(struct wmOperatorType *ot);
void OBJECT_OT_effector_add(struct wmOperatorType *ot);

View File

@ -107,7 +107,7 @@ void ED_operatortypes_object(void)
WM_operatortype_append(OBJECT_OT_text_add);
WM_operatortype_append(OBJECT_OT_armature_add);
WM_operatortype_append(OBJECT_OT_empty_add);
WM_operatortype_append(OBJECT_OT_probe_add);
WM_operatortype_append(OBJECT_OT_lightprobe_add);
WM_operatortype_append(OBJECT_OT_drop_named_image);
WM_operatortype_append(OBJECT_OT_lamp_add);
WM_operatortype_append(OBJECT_OT_camera_add);

View File

@ -211,7 +211,7 @@ static int buttons_context_path_data(ButsContextPath *path, int type)
else if (RNA_struct_is_a(ptr->type, &RNA_Camera) && (type == -1 || type == OB_CAMERA)) return 1;
else if (RNA_struct_is_a(ptr->type, &RNA_Lamp) && (type == -1 || type == OB_LAMP)) return 1;
else if (RNA_struct_is_a(ptr->type, &RNA_Speaker) && (type == -1 || type == OB_SPEAKER)) return 1;
else if (RNA_struct_is_a(ptr->type, &RNA_Probe) && (type == -1 || type == OB_PROBE)) return 1;
else if (RNA_struct_is_a(ptr->type, &RNA_LightProbe) && (type == -1 || type == OB_LIGHTPROBE)) return 1;
/* try to get an object in the path, no pinning supported here */
else if (buttons_context_path_object(path)) {
ob = path->ptr[path->len - 1].data;
@ -779,7 +779,7 @@ void buttons_context_compute(const bContext *C, SpaceButs *sbuts)
const char *buttons_context_dir[] = {
"texture_slot", "scene", "world", "object", "mesh", "armature", "lattice", "curve",
"meta_ball", "lamp", "speaker", "probe", "camera", "material", "material_slot",
"meta_ball", "lamp", "speaker", "lightprobe", "camera", "material", "material_slot",
"texture", "texture_user", "texture_user_property", "bone", "edit_bone",
"pose_bone", "particle_system", "particle_system_editable", "particle_settings",
"cloth", "soft_body", "fluid", "smoke", "collision", "brush", "dynamic_paint",
@ -848,8 +848,8 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
set_pointer_type(path, result, &RNA_Speaker);
return 1;
}
else if (CTX_data_equals(member, "probe")) {
set_pointer_type(path, result, &RNA_Probe);
else if (CTX_data_equals(member, "lightprobe")) {
set_pointer_type(path, result, &RNA_LightProbe);
return 1;
}
else if (CTX_data_equals(member, "material")) {

View File

@ -216,7 +216,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
FILTER_ID_MB | FILTER_ID_MC | FILTER_ID_ME | FILTER_ID_MSK | FILTER_ID_NT | FILTER_ID_OB |
FILTER_ID_PA | FILTER_ID_PAL | FILTER_ID_PC | FILTER_ID_SCE | FILTER_ID_SPK | FILTER_ID_SO |
FILTER_ID_TE | FILTER_ID_TXT | FILTER_ID_VF | FILTER_ID_WO | FILTER_ID_CF | FILTER_ID_WS |
FILTER_ID_PRB;
FILTER_ID_LP;
if (U.uiflag & USER_HIDE_DOT) {
params->flag |= FILE_HIDE_DOT;

View File

@ -108,7 +108,7 @@ typedef struct TreeElement {
#define TREESTORE_ID_TYPE(_id) \
(ELEM(GS((_id)->name), ID_SCE, ID_LI, ID_OB, ID_ME, ID_CU, ID_MB, ID_NT, ID_MA, ID_TE, ID_IM, ID_LT, ID_LA, ID_CA) || \
ELEM(GS((_id)->name), ID_KE, ID_WO, ID_SPK, ID_GR, ID_AR, ID_AC, ID_BR, ID_PA, ID_GD, ID_LS, ID_PRB) || \
ELEM(GS((_id)->name), ID_KE, ID_WO, ID_SPK, ID_GR, ID_AR, ID_AC, ID_BR, ID_PA, ID_GD, ID_LS, ID_LP) || \
ELEM(GS((_id)->name), ID_SCR, ID_WM, ID_TXT, ID_VF, ID_SO, ID_CF, ID_PAL, ID_WS)) /* Only in 'blendfile' mode ... :/ */
/* TreeElement->flag */

View File

@ -46,7 +46,7 @@
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meta_types.h"
#include "DNA_probe_types.h"
#include "DNA_lightprobe_types.h"
#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
#include "DNA_world_types.h"
@ -731,9 +731,9 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
outliner_add_element(soops, &te->subtree, spk, te, TSE_ANIM_DATA, 0);
break;
}
case ID_PRB:
case ID_LP:
{
Probe *prb = (Probe *)id;
LightProbe *prb = (LightProbe *)id;
if (outliner_animdata_test(prb->adt))
outliner_add_element(soops, &te->subtree, prb, te, TSE_ANIM_DATA, 0);

View File

@ -266,7 +266,7 @@ typedef enum ID_Type {
ID_PC = MAKE_ID2('P', 'C'), /* PaintCurve */
ID_CF = MAKE_ID2('C', 'F'), /* CacheFile */
ID_WS = MAKE_ID2('W', 'S'), /* WorkSpace */
ID_PRB = MAKE_ID2('P', 'R'), /* Probe */
ID_LP = MAKE_ID2('L', 'P'), /* LightProbe */
} ID_Type;
/* Only used as 'placeholder' in .blend files for directly linked datablocks. */
@ -401,7 +401,7 @@ enum {
FILTER_ID_PA = (1 << 27),
FILTER_ID_CF = (1 << 28),
FILTER_ID_WS = (1 << 29),
FILTER_ID_PRB = (1 << 30),
FILTER_ID_LP = (1 << 31),
};
/* IMPORTANT: this enum matches the order currently use in set_listbasepointers,
@ -433,7 +433,7 @@ enum {
INDEX_ID_BR,
INDEX_ID_PA,
INDEX_ID_SPK,
INDEX_ID_PRB,
INDEX_ID_LP,
INDEX_ID_WO,
INDEX_ID_MC,
INDEX_ID_SCR,

View File

@ -21,12 +21,12 @@
*
*/
/** \file DNA_probe_types.h
/** \file DNA_lightprobe_types.h
* \ingroup DNA
*/
#ifndef __DNA_PROBE_TYPES_H__
#define __DNA_PROBE_TYPES_H__
#ifndef __DNA_LIGHTPROBE_TYPES_H__
#define __DNA_LIGHTPROBE_TYPES_H__
#include "DNA_defs.h"
#include "DNA_listBase.h"
@ -39,7 +39,7 @@ extern "C" {
struct Object;
struct AnimData;
typedef struct Probe {
typedef struct LightProbe {
ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
@ -60,39 +60,39 @@ typedef struct Probe {
/* Runtime display data */
float distfalloff, pad;
float clipmat[6][4][4];
} Probe;
} LightProbe;
/* Probe->type */
enum {
PROBE_CUBE = 0,
PROBE_PLANAR = 1,
PROBE_IMAGE = 2,
LIGHTPROBE_TYPE_CUBE = 0,
LIGHTPROBE_TYPE_PLANAR = 1,
LIGHTPROBE_TYPE_IMAGE = 2,
};
/* Probe->flag */
enum {
PRB_CUSTOM_PARALLAX = (1 << 0),
PRB_SHOW_INFLUENCE = (1 << 1),
PRB_SHOW_PARALLAX = (1 << 2),
PRB_SHOW_CLIP_DIST = (1 << 3),
LIGHTPROBE_FLAG_CUSTOM_PARALLAX = (1 << 0),
LIGHTPROBE_FLAG_SHOW_INFLUENCE = (1 << 1),
LIGHTPROBE_FLAG_SHOW_PARALLAX = (1 << 2),
LIGHTPROBE_FLAG_SHOW_CLIP_DIST = (1 << 3),
};
/* Probe->display */
enum {
PROBE_WIRE = 0,
PROBE_SHADED = 1,
PROBE_DIFFUSE = 2,
PROBE_REFLECTIVE = 3,
LIGHTPROBE_DISP_WIRE = 0,
LIGHTPROBE_DISP_SHADED = 1,
LIGHTPROBE_DISP_DIFFUSE = 2,
LIGHTPROBE_DISP_REFLECTIVE = 3,
};
/* Probe->parallax && Probe->attenuation_type*/
enum {
PROBE_ELIPSOID = 0,
PROBE_BOX = 1,
LIGHTPROBE_SHAPE_ELIPSOID = 0,
LIGHTPROBE_SHAPE_BOX = 1,
};
#ifdef __cplusplus
}
#endif
#endif /* __DNA_PROBE_TYPES_H__ */
#endif /* __DNA_LIGHTPROBE_TYPES_H__ */

View File

@ -385,7 +385,7 @@ enum {
OB_CAMERA = 11,
OB_SPEAKER = 12,
OB_PROBE = 13,
OB_LIGHTPROBE = 13,
/* OB_WAVE = 21, */
OB_LATTICE = 22,
@ -406,10 +406,10 @@ enum {
/* is this ID type used as object data */
#define OB_DATA_SUPPORT_ID(_id_type) \
(ELEM(_id_type, ID_ME, ID_CU, ID_MB, ID_LA, ID_SPK, ID_PRB, ID_CA, ID_LT, ID_AR))
(ELEM(_id_type, ID_ME, ID_CU, ID_MB, ID_LA, ID_SPK, ID_LP, ID_CA, ID_LT, ID_AR))
#define OB_DATA_SUPPORT_ID_CASE \
ID_ME: case ID_CU: case ID_MB: case ID_LA: case ID_SPK: case ID_PRB: case ID_CA: case ID_LT: case ID_AR
ID_ME: case ID_CU: case ID_MB: case ID_LA: case ID_SPK: case ID_LP: case ID_CA: case ID_LT: case ID_AR
/* partype: first 4 bits: type */
enum {

View File

@ -136,7 +136,7 @@ static const char *includefiles[] = {
"DNA_cachefile_types.h",
"DNA_layer_types.h",
"DNA_workspace_types.h",
"DNA_probe_types.h",
"DNA_lightprobe_types.h",
/* see comment above before editing! */
@ -1364,6 +1364,6 @@ int main(int argc, char **argv)
#include "DNA_cachefile_types.h"
#include "DNA_layer_types.h"
#include "DNA_workspace_types.h"
#include "DNA_probe_types.h"
#include "DNA_lightprobe_types.h"
/* end of list */

View File

@ -488,7 +488,7 @@ extern StructRNA RNA_PointLamp;
extern StructRNA RNA_PointerProperty;
extern StructRNA RNA_Pose;
extern StructRNA RNA_PoseBone;
extern StructRNA RNA_Probe;
extern StructRNA RNA_LightProbe;
extern StructRNA RNA_Property;
extern StructRNA RNA_PropertyGroup;
extern StructRNA RNA_PropertyGroupItem;

View File

@ -72,7 +72,7 @@ set(DEFSRC
rna_palette.c
rna_particle.c
rna_pose.c
rna_probe.c
rna_lightprobe.c
rna_property.c
rna_render.c
rna_rigidbody.c

View File

@ -3345,7 +3345,7 @@ static RNAProcessItem PROCESS_ITEMS[] = {
{"rna_palette.c", NULL, RNA_def_palette},
{"rna_particle.c", NULL, RNA_def_particle},
{"rna_pose.c", "rna_pose_api.c", RNA_def_pose},
{"rna_probe.c", NULL, RNA_def_probe},
{"rna_lightprobe.c", NULL, RNA_def_lightprobe},
{"rna_property.c", NULL, RNA_def_gameproperty},
{"rna_render.c", NULL, RNA_def_render},
{"rna_rigidbody.c", NULL, RNA_def_rigidbody},

View File

@ -74,7 +74,7 @@ EnumPropertyItem rna_enum_id_type_items[] = {
{ID_PC, "PAINTCURVE", ICON_CURVE_BEZCURVE, "Paint Curve", ""},
{ID_PAL, "PALETTE", ICON_COLOR, "Palette", ""},
{ID_PA, "PARTICLE", ICON_PARTICLE_DATA, "Particle", ""},
{ID_PRB, "PROBE", ICON_RADIO, "Probe", ""},
{ID_LT, "LIGHT_PROBE", ICON_RADIO, "Light Probe", ""},
{ID_SCE, "SCENE", ICON_SCENE_DATA, "Scene", ""},
{ID_SCR, "SCREEN", ICON_SPLITSCREEN, "Screen", ""},
{ID_SO, "SOUND", ICON_PLAY_AUDIO, "Sound", ""},
@ -166,7 +166,7 @@ short RNA_type_to_ID_code(const StructRNA *type)
if (RNA_struct_is_a(type, &RNA_ParticleSettings)) return ID_PA;
if (RNA_struct_is_a(type, &RNA_Palette)) return ID_PAL;
if (RNA_struct_is_a(type, &RNA_PaintCurve)) return ID_PC;
if (RNA_struct_is_a(type, &RNA_Probe)) return ID_PRB;
if (RNA_struct_is_a(type, &RNA_LightProbe)) return ID_LP;
if (RNA_struct_is_a(type, &RNA_Scene)) return ID_SCE;
if (RNA_struct_is_a(type, &RNA_Screen)) return ID_SCR;
if (RNA_struct_is_a(type, &RNA_Sound)) return ID_SO;
@ -208,7 +208,7 @@ StructRNA *ID_code_to_RNA_type(short idcode)
case ID_PA: return &RNA_ParticleSettings;
case ID_PAL: return &RNA_Palette;
case ID_PC: return &RNA_PaintCurve;
case ID_PRB: return &RNA_Probe;
case ID_LP: return &RNA_LightProbe;
case ID_SCE: return &RNA_Scene;
case ID_SCR: return &RNA_Screen;
case ID_SO: return &RNA_Sound;

View File

@ -166,7 +166,7 @@ void RNA_def_packedfile(struct BlenderRNA *brna);
void RNA_def_palette(struct BlenderRNA *brna);
void RNA_def_particle(struct BlenderRNA *brna);
void RNA_def_pose(struct BlenderRNA *brna);
void RNA_def_probe(struct BlenderRNA *brna);
void RNA_def_lightprobe(struct BlenderRNA *brna);
void RNA_def_render(struct BlenderRNA *brna);
void RNA_def_rigidbody(struct BlenderRNA *brna);
void RNA_def_rna(struct BlenderRNA *brna);
@ -338,7 +338,7 @@ void RNA_def_main_linestyles(BlenderRNA *brna, PropertyRNA *cprop);
void RNA_def_main_cachefiles(BlenderRNA *brna, PropertyRNA *cprop);
void RNA_def_main_paintcurves(BlenderRNA *brna, PropertyRNA *cprop);
void RNA_def_main_workspaces(BlenderRNA *brna, PropertyRNA *cprop);
void RNA_def_main_probes(BlenderRNA *brna, PropertyRNA *cprop);
void RNA_def_main_lightprobes(BlenderRNA *brna, PropertyRNA *cprop);
/* ID Properties */

View File

@ -20,7 +20,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
/** \file blender/makesrna/intern/rna_probe.c
/** \file blender/makesrna/intern/rna_lightprobe.c
* \ingroup RNA
*/
@ -31,7 +31,7 @@
#include "rna_internal.h"
#include "DNA_probe_types.h"
#include "DNA_lightprobe_types.h"
#include "WM_types.h"
@ -49,7 +49,7 @@
#include "WM_api.h"
#include "WM_types.h"
static void rna_Probe_recalc(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
static void rna_LightProbe_recalc(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA);
}
@ -57,48 +57,48 @@ static void rna_Probe_recalc(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR
#else
static EnumPropertyItem parallax_type_items[] = {
{PROBE_ELIPSOID, "ELIPSOID", ICON_NONE, "Sphere", ""},
{PROBE_BOX, "BOX", ICON_NONE, "Box", ""},
{LIGHTPROBE_SHAPE_ELIPSOID, "ELIPSOID", ICON_NONE, "Sphere", ""},
{LIGHTPROBE_SHAPE_BOX, "BOX", ICON_NONE, "Box", ""},
{0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem probe_type_items[] = {
{PROBE_CUBE, "CUBEMAP", ICON_NONE, "Cubemap", ""},
// {PROBE_PLANAR, "PLANAR", ICON_NONE, "Planar", ""},
// {PROBE_IMAGE, "IMAGE", ICON_NONE, "Image", ""},
static EnumPropertyItem lightprobe_type_items[] = {
{LIGHTPROBE_TYPE_CUBE, "CUBEMAP", ICON_NONE, "Cubemap", ""},
// {LIGHTPROBE_TYPE_PLANAR, "PLANAR", ICON_NONE, "Planar", ""},
// {LIGHTPROBE_TYPE_IMAGE, "IMAGE", ICON_NONE, "Image", ""},
{0, NULL, 0, NULL, NULL}
};
static void rna_def_probe(BlenderRNA *brna)
static void rna_def_lightprobe(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
srna = RNA_def_struct(brna, "Probe", "ID");
RNA_def_struct_ui_text(srna, "Probe", "Probe data-block for lighting capture objects");
srna = RNA_def_struct(brna, "LightProbe", "ID");
RNA_def_struct_ui_text(srna, "LightProbe", "Light Probe data-block for lighting capture objects");
RNA_def_struct_ui_icon(srna, ICON_RADIO);
prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, probe_type_items);
RNA_def_property_enum_items(prop, lightprobe_type_items);
RNA_def_property_ui_text(prop, "Type", "Type of probe");
RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, NULL);
prop = RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "clipsta");
RNA_def_property_range(prop, 0.0f, 999999.0f);
RNA_def_property_ui_text(prop, "Probe Clip Start",
RNA_def_property_ui_text(prop, "Clip Start",
"Probe clip start, below which objects will not appear in reflections");
RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, "rna_Probe_recalc");
RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, "rna_LightProbe_recalc");
prop = RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "clipend");
RNA_def_property_range(prop, 0.0f, 999999.0f);
RNA_def_property_ui_text(prop, "Probe Clip End",
RNA_def_property_ui_text(prop, "Clip End",
"Probe clip end, beyond which objects will not appear in reflections");
RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, "rna_Probe_recalc");
RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, "rna_LightProbe_recalc");
prop = RNA_def_property(srna, "show_clip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PRB_SHOW_CLIP_DIST);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIGHTPROBE_FLAG_SHOW_CLIP_DIST);
RNA_def_property_ui_text(prop, "Clipping", "Show the clipping distances in the 3D view");
RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, NULL);
@ -109,7 +109,7 @@ static void rna_def_probe(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, NULL);
prop = RNA_def_property(srna, "show_influence", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PRB_SHOW_INFLUENCE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIGHTPROBE_FLAG_SHOW_INFLUENCE);
RNA_def_property_ui_text(prop, "Influence", "Show the influence volume in the 3D view");
RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, NULL);
@ -125,12 +125,12 @@ static void rna_def_probe(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, NULL);
prop = RNA_def_property(srna, "use_custom_parallax", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PRB_CUSTOM_PARALLAX);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIGHTPROBE_FLAG_CUSTOM_PARALLAX);
RNA_def_property_ui_text(prop, "Use Custom Parallax", "Enable custom settings for the parallax correction volume");
RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, NULL);
prop = RNA_def_property(srna, "show_parallax", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PRB_SHOW_PARALLAX);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIGHTPROBE_FLAG_SHOW_PARALLAX);
RNA_def_property_ui_text(prop, "Parallax", "Show the parallax correction volume in the 3D view");
RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, NULL);
@ -150,9 +150,9 @@ static void rna_def_probe(BlenderRNA *brna)
}
void RNA_def_probe(BlenderRNA *brna)
void RNA_def_lightprobe(BlenderRNA *brna)
{
rna_def_probe(brna);
rna_def_lightprobe(brna);
}
#endif

View File

@ -299,10 +299,10 @@ static void rna_Main_workspaces_begin(CollectionPropertyIterator *iter, PointerR
rna_iterator_listbase_begin(iter, &bmain->workspaces, NULL);
}
static void rna_Main_probes_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
static void rna_Main_lightprobes_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Main *bmain = (Main *)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->probe, NULL);
rna_iterator_listbase_begin(iter, &bmain->lightprobe, NULL);
}
static void rna_Main_version_get(PointerRNA *ptr, int *value)
@ -381,7 +381,7 @@ void RNA_def_main(BlenderRNA *brna)
{"cache_files", "CacheFile", "rna_Main_cachefiles_begin", "Cache Files", "Cache Files data-blocks", RNA_def_main_cachefiles},
{"paint_curves", "PaintCurve", "rna_Main_paintcurves_begin", "Paint Curves", "Paint Curves data-blocks", RNA_def_main_paintcurves},
{"workspaces", "WorkSpace", "rna_Main_workspaces_begin", "Workspaces", "Workspace data-blocks", RNA_def_main_workspaces},
{"probes", "Probe", "rna_Main_probes_begin", "Probes", "Probe data-blocks", RNA_def_main_probes},
{"lightprobes", "LightProbe", "rna_Main_lightprobes_begin", "LightProbes", "LightProbe data-blocks", RNA_def_main_lightprobes},
{NULL, NULL, NULL, NULL, NULL, NULL}
};

View File

@ -79,7 +79,7 @@
#include "BKE_font.h"
#include "BKE_node.h"
#include "BKE_speaker.h"
#include "BKE_probe.h"
#include "BKE_lightprobe.h"
#include "BKE_movieclip.h"
#include "BKE_mask.h"
#include "BKE_gpencil.h"
@ -96,7 +96,7 @@
#include "DNA_mesh_types.h"
#include "DNA_speaker_types.h"
#include "DNA_sound_types.h"
#include "DNA_probe_types.h"
#include "DNA_lightprobe_types.h"
#include "DNA_text_types.h"
#include "DNA_texture_types.h"
#include "DNA_group_types.h"
@ -575,12 +575,12 @@ static FreestyleLineStyle *rna_Main_linestyles_new(Main *bmain, const char *name
return linestyle;
}
static Probe *rna_Main_probe_new(Main *bmain, const char *name)
static LightProbe *rna_Main_lightprobe_new(Main *bmain, const char *name)
{
char safe_name[MAX_ID_NAME - 2];
rna_idname_validate(name, safe_name);
Probe *probe = BKE_probe_add(bmain, safe_name);
LightProbe *probe = BKE_lightprobe_add(bmain, safe_name);
id_us_min(&probe->id);
return probe;
}
@ -628,7 +628,7 @@ RNA_MAIN_ID_TAG_FUNCS_DEF(linestyle, linestyle, ID_LS)
RNA_MAIN_ID_TAG_FUNCS_DEF(cachefiles, cachefiles, ID_CF)
RNA_MAIN_ID_TAG_FUNCS_DEF(paintcurves, paintcurves, ID_PC)
RNA_MAIN_ID_TAG_FUNCS_DEF(workspaces, workspaces, ID_WS)
RNA_MAIN_ID_TAG_FUNCS_DEF(probes, probe, ID_PRB)
RNA_MAIN_ID_TAG_FUNCS_DEF(lightprobes, lightprobe, ID_LP)
#undef RNA_MAIN_ID_TAG_FUNCS_DEF
@ -1859,7 +1859,7 @@ void RNA_def_main_workspaces(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_boolean_funcs(prop, "rna_Main_workspaces_is_updated_get", NULL);
}
void RNA_def_main_probes(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_main_lightprobes(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
FunctionRNA *func;
@ -1869,33 +1869,33 @@ void RNA_def_main_probes(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_srna(cprop, "BlendDataProbes");
srna = RNA_def_struct(brna, "BlendDataProbes", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Probes", "Collection of probes");
RNA_def_struct_ui_text(srna, "Main Light Probes", "Collection of light probes");
func = RNA_def_function(srna, "new", "rna_Main_probe_new");
func = RNA_def_function(srna, "new", "rna_Main_lightprobe_new");
RNA_def_function_ui_description(func, "Add a new probe to the main database");
parm = RNA_def_string(func, "name", "Probe", 0, "", "New name for the data-block");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
/* return type */
parm = RNA_def_pointer(func, "probe", "Probe", "", "New probe data-block");
parm = RNA_def_pointer(func, "lightprobe", "LightProbe", "", "New light probe data-block");
RNA_def_function_return(func, parm);
func = RNA_def_function(srna, "remove", "rna_Main_ID_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a probe from the current blendfile");
parm = RNA_def_pointer(func, "probe", "Probe", "", "Probe to remove");
parm = RNA_def_pointer(func, "lightprobe", "LightProbe", "", "Probe to remove");
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR);
RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0);
RNA_def_boolean(func, "do_unlink", true, "",
"Unlink all usages of this probe before deleting it "
"(WARNING: will also delete objects instancing that probe data)");
"(WARNING: will also delete objects instancing that light probe data)");
func = RNA_def_function(srna, "tag", "rna_Main_probes_tag");
func = RNA_def_function(srna, "tag", "rna_Main_lightprobes_tag");
parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_probes_is_updated_get", NULL);
RNA_def_property_boolean_funcs(prop, "rna_Main_lightprobes_is_updated_get", NULL);
}
#endif

View File

@ -148,7 +148,7 @@ EnumPropertyItem rna_enum_object_type_items[] = {
{OB_CAMERA, "CAMERA", 0, "Camera", ""},
{OB_LAMP, "LAMP", 0, "Lamp", ""},
{OB_SPEAKER, "SPEAKER", 0, "Speaker", ""},
{OB_PROBE, "PROBE", 0, "Probe", ""},
{OB_LIGHTPROBE, "LIGHT_PROBE", 0, "Probe", ""},
{0, NULL, 0, NULL, NULL}
};
@ -419,7 +419,7 @@ static StructRNA *rna_Object_data_typef(PointerRNA *ptr)
case OB_LATTICE: return &RNA_Lattice;
case OB_ARMATURE: return &RNA_Armature;
case OB_SPEAKER: return &RNA_Speaker;
case OB_PROBE: return &RNA_Probe;
case OB_LIGHTPROBE: return &RNA_LightProbe;
default: return &RNA_ID;
}
}

View File

@ -3906,7 +3906,7 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
"Particles Settings", "Show/hide Particle Settings data-blocks"},
{FILTER_ID_PAL, "PALETTE", ICON_COLOR, "Palettes", "Show/hide Palette data-blocks"},
{FILTER_ID_PC, "PAINT_CURVE", ICON_CURVE_BEZCURVE, "Paint Curves", "Show/hide Paint Curve data-blocks"},
{FILTER_ID_PRB, "PROBE", ICON_RADIO, "Probes", "Show/hide Probe data-blocks"},
{FILTER_ID_LP, "LIGHT_PROBE", ICON_RADIO, "Light Probes", "Show/hide Light Probe data-blocks"},
{FILTER_ID_SCE, "SCENE", ICON_SCENE_DATA, "Scenes", "Show/hide Scene data-blocks"},
{FILTER_ID_SPK, "SPEAKER", ICON_SPEAKER, "Speakers", "Show/hide Speaker data-blocks"},
{FILTER_ID_SO, "SOUND", ICON_SOUND, "Sounds", "Show/hide Sound data-blocks"},

View File

@ -746,7 +746,7 @@ static void rna_def_filter_common(StructRNA *srna)
RNA_def_property_ui_text(prop, "Filter", "Texture filter to use for sampling image");
RNA_def_property_update(prop, 0, "rna_Texture_update");
prop = RNA_def_property(srna, "filter_probes", PROP_INT, PROP_NONE);
prop = RNA_def_property(srna, "filter_lightprobes", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "afmax");
RNA_def_property_range(prop, 1, 256);
RNA_def_property_ui_text(prop, "Filter Probes",