From f52dc2f371923c22a974df7105245f7e0b8148ee Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 12 Jun 2017 20:59:54 +1000 Subject: Rename probe to light-probe Probe is a real general term, the new name is used often in docs online. --- source/blender/makesrna/intern/CMakeLists.txt | 2 +- source/blender/makesrna/intern/makesrna.c | 2 +- source/blender/makesrna/intern/rna_ID.c | 6 +- source/blender/makesrna/intern/rna_internal.h | 4 +- source/blender/makesrna/intern/rna_lightprobe.c | 159 ++++++++++++++++++++++++ source/blender/makesrna/intern/rna_main.c | 6 +- source/blender/makesrna/intern/rna_main_api.c | 26 ++-- source/blender/makesrna/intern/rna_object.c | 4 +- source/blender/makesrna/intern/rna_probe.c | 159 ------------------------ source/blender/makesrna/intern/rna_space.c | 2 +- source/blender/makesrna/intern/rna_texture.c | 2 +- 11 files changed, 186 insertions(+), 186 deletions(-) create mode 100644 source/blender/makesrna/intern/rna_lightprobe.c delete mode 100644 source/blender/makesrna/intern/rna_probe.c (limited to 'source/blender/makesrna/intern') diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 262c229c5e6..c602521f0db 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -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 diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 46b0d6e82ad..f501f6cbf7e 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -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}, diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index f4ecde913b5..14d95d4fb1e 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -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; diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h index 2ace1a10a9c..e7636d492c4 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -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 */ diff --git a/source/blender/makesrna/intern/rna_lightprobe.c b/source/blender/makesrna/intern/rna_lightprobe.c new file mode 100644 index 00000000000..6b9751f293a --- /dev/null +++ b/source/blender/makesrna/intern/rna_lightprobe.c @@ -0,0 +1,159 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributor(s): Blender Foundation. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/makesrna/intern/rna_lightprobe.c + * \ingroup RNA + */ + +#include + +#include "RNA_define.h" +#include "RNA_enum_types.h" + +#include "rna_internal.h" + +#include "DNA_lightprobe_types.h" + +#include "WM_types.h" + +#ifdef RNA_RUNTIME + +#include "DNA_object_types.h" + +#include "MEM_guardedalloc.h" + +#include "BKE_main.h" +#include "DEG_depsgraph.h" + +#include "DNA_object_types.h" + +#include "WM_api.h" +#include "WM_types.h" + +static void rna_LightProbe_recalc(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +{ + DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); +} + +#else + +static EnumPropertyItem parallax_type_items[] = { + {LIGHTPROBE_SHAPE_ELIPSOID, "ELIPSOID", ICON_NONE, "Sphere", ""}, + {LIGHTPROBE_SHAPE_BOX, "BOX", ICON_NONE, "Box", ""}, + {0, NULL, 0, NULL, NULL} +}; + +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_lightprobe(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + 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, 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, "Clip Start", + "Probe clip start, below which objects will not appear in reflections"); + 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, "Clip End", + "Probe clip end, beyond which objects will not appear in reflections"); + 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", 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); + + prop = RNA_def_property(srna, "influence_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "attenuation_type"); + RNA_def_property_enum_items(prop, parallax_type_items); + RNA_def_property_ui_text(prop, "Type", "Type of parallax volume"); + 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", 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); + + prop = RNA_def_property(srna, "influence_distance", PROP_FLOAT, PROP_DISTANCE); + RNA_def_property_float_sdna(prop, NULL, "distinf"); + RNA_def_property_range(prop, 0.0f, 99999.f); + RNA_def_property_ui_text(prop, "Influence Distance", "Influence distance of the probe"); + RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, NULL); + + prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Falloff", "Control how fast the probe influence decreases"); + 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", 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", 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); + + prop = RNA_def_property(srna, "parallax_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, parallax_type_items); + RNA_def_property_ui_text(prop, "Type", "Type of parallax volume"); + RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, NULL); + + prop = RNA_def_property(srna, "parallax_distance", PROP_FLOAT, PROP_DISTANCE); + RNA_def_property_float_sdna(prop, NULL, "distpar"); + RNA_def_property_range(prop, 0.0f, 99999.f); + RNA_def_property_ui_text(prop, "Parallax Radius", "Lowest corner of the parallax bounding box"); + RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, NULL); + + /* common */ + rna_def_animdata_common(srna); +} + + +void RNA_def_lightprobe(BlenderRNA *brna) +{ + rna_def_lightprobe(brna); +} + +#endif + diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index 3509205e727..6479826b7b3 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -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} }; diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 536e65c6e2a..5b898d7fd40 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -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 diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index c799bfc749c..ea55b5e3083 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -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; } } diff --git a/source/blender/makesrna/intern/rna_probe.c b/source/blender/makesrna/intern/rna_probe.c deleted file mode 100644 index dae84a51494..00000000000 --- a/source/blender/makesrna/intern/rna_probe.c +++ /dev/null @@ -1,159 +0,0 @@ -/* - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Contributor(s): Blender Foundation. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/makesrna/intern/rna_probe.c - * \ingroup RNA - */ - -#include - -#include "RNA_define.h" -#include "RNA_enum_types.h" - -#include "rna_internal.h" - -#include "DNA_probe_types.h" - -#include "WM_types.h" - -#ifdef RNA_RUNTIME - -#include "DNA_object_types.h" - -#include "MEM_guardedalloc.h" - -#include "BKE_main.h" -#include "DEG_depsgraph.h" - -#include "DNA_object_types.h" - -#include "WM_api.h" -#include "WM_types.h" - -static void rna_Probe_recalc(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) -{ - DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); -} - -#else - -static EnumPropertyItem parallax_type_items[] = { - {PROBE_ELIPSOID, "ELIPSOID", ICON_NONE, "Sphere", ""}, - {PROBE_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", ""}, - {0, NULL, 0, NULL, NULL} -}; - -static void rna_def_probe(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"); - 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_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", - "Probe clip start, below which objects will not appear in reflections"); - RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, "rna_Probe_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", - "Probe clip end, beyond which objects will not appear in reflections"); - RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, "rna_Probe_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_ui_text(prop, "Clipping", "Show the clipping distances in the 3D view"); - RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, NULL); - - prop = RNA_def_property(srna, "influence_type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_sdna(prop, NULL, "attenuation_type"); - RNA_def_property_enum_items(prop, parallax_type_items); - RNA_def_property_ui_text(prop, "Type", "Type of parallax volume"); - 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_ui_text(prop, "Influence", "Show the influence volume in the 3D view"); - RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, NULL); - - prop = RNA_def_property(srna, "influence_distance", PROP_FLOAT, PROP_DISTANCE); - RNA_def_property_float_sdna(prop, NULL, "distinf"); - RNA_def_property_range(prop, 0.0f, 99999.f); - RNA_def_property_ui_text(prop, "Influence Distance", "Influence distance of the probe"); - RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, NULL); - - prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_FACTOR); - RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Falloff", "Control how fast the probe influence decreases"); - 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_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_ui_text(prop, "Parallax", "Show the parallax correction volume in the 3D view"); - RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, NULL); - - prop = RNA_def_property(srna, "parallax_type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, parallax_type_items); - RNA_def_property_ui_text(prop, "Type", "Type of parallax volume"); - RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, NULL); - - prop = RNA_def_property(srna, "parallax_distance", PROP_FLOAT, PROP_DISTANCE); - RNA_def_property_float_sdna(prop, NULL, "distpar"); - RNA_def_property_range(prop, 0.0f, 99999.f); - RNA_def_property_ui_text(prop, "Parallax Radius", "Lowest corner of the parallax bounding box"); - RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, NULL); - - /* common */ - rna_def_animdata_common(srna); -} - - -void RNA_def_probe(BlenderRNA *brna) -{ - rna_def_probe(brna); -} - -#endif - diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 392361ac6d2..dbd74a0c0c0 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -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"}, diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index 8a8fcb8d119..1c7b750fbe1 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -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", -- cgit v1.2.3