[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44598] branches/ge_harmony: Changing frustum_size to shadow_frustum_size and adding comments that it is a BGE value .
Daniel Stokes
kupomail at gmail.com
Fri Mar 2 05:33:48 CET 2012
Revision: 44598
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44598
Author: kupoman
Date: 2012-03-02 04:33:41 +0000 (Fri, 02 Mar 2012)
Log Message:
-----------
Changing frustum_size to shadow_frustum_size and adding comments that it is a BGE value.
Also removing some duplicate code from rna_lamp.c.
Modified Paths:
--------------
branches/ge_harmony/release/scripts/startup/bl_ui/properties_data_lamp.py
branches/ge_harmony/source/blender/blenkernel/intern/lamp.c
branches/ge_harmony/source/blender/blenloader/intern/readfile.c
branches/ge_harmony/source/blender/gpu/intern/gpu_material.c
branches/ge_harmony/source/blender/makesdna/DNA_lamp_types.h
branches/ge_harmony/source/blender/makesrna/intern/rna_lamp.c
Modified: branches/ge_harmony/release/scripts/startup/bl_ui/properties_data_lamp.py
===================================================================
--- branches/ge_harmony/release/scripts/startup/bl_ui/properties_data_lamp.py 2012-03-02 04:07:47 UTC (rev 44597)
+++ branches/ge_harmony/release/scripts/startup/bl_ui/properties_data_lamp.py 2012-03-02 04:33:41 UTC (rev 44598)
@@ -235,7 +235,7 @@
if lamp.type == 'SUN':
row = layout.row()
- row.prop(lamp, "frustum_size", text="Frustum Size")
+ row.prop(lamp, "shadow_frustum_size", text="Frustum Size")
layout.active = lamp.use_shadow
Modified: branches/ge_harmony/source/blender/blenkernel/intern/lamp.c
===================================================================
--- branches/ge_harmony/source/blender/blenkernel/intern/lamp.c 2012-03-02 04:07:47 UTC (rev 44597)
+++ branches/ge_harmony/source/blender/blenkernel/intern/lamp.c 2012-03-02 04:33:41 UTC (rev 44598)
@@ -96,7 +96,7 @@
la->skyblendfac= 1.0f;
la->sky_colorspace= BLI_XYZ_CIE;
la->sky_exposure= 1.0f;
- la->sun_shadow_frustum= 10.0f;
+ la->shadow_frustum_size= 10.0f;
curvemapping_initialize(la->curfalloff);
return la;
Modified: branches/ge_harmony/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/ge_harmony/source/blender/blenloader/intern/readfile.c 2012-03-02 04:07:47 UTC (rev 44597)
+++ branches/ge_harmony/source/blender/blenloader/intern/readfile.c 2012-03-02 04:33:41 UTC (rev 44598)
@@ -12922,8 +12922,8 @@
{
Lamp *la;
for (la= main->lamp.first; la; la= la->id.next) {
- if (la->sun_shadow_frustum == 0.0)
- la->sun_shadow_frustum= 10.0f;
+ if (la->shadow_frustum_size == 0.0)
+ la->shadow_frustum_size= 10.0f;
}
{
/* update use flags for node sockets (was only temporary before) */
Modified: branches/ge_harmony/source/blender/gpu/intern/gpu_material.c
===================================================================
--- branches/ge_harmony/source/blender/gpu/intern/gpu_material.c 2012-03-02 04:07:47 UTC (rev 44597)
+++ branches/ge_harmony/source/blender/gpu/intern/gpu_material.c 2012-03-02 04:33:41 UTC (rev 44598)
@@ -1603,7 +1603,7 @@
/* makeshadowbuf */
if (lamp->type == LA_SUN) {
- wsize = la->sun_shadow_frustum;
+ wsize = la->shadow_frustum_size;
orthographic_m4( lamp->winmat,-wsize, wsize, -wsize, wsize, lamp->d, lamp->clipend);
}
else {
Modified: branches/ge_harmony/source/blender/makesdna/DNA_lamp_types.h
===================================================================
--- branches/ge_harmony/source/blender/makesdna/DNA_lamp_types.h 2012-03-02 04:07:47 UTC (rev 44597)
+++ branches/ge_harmony/source/blender/makesdna/DNA_lamp_types.h 2012-03-02 04:33:41 UTC (rev 44598)
@@ -96,7 +96,7 @@
float atm_distance_factor;
float skyblendfac;
float sky_exposure;
- float sun_shadow_frustum;
+ float shadow_frustum_size; /* BGE Only */
short sky_colorspace;
char pad4[2];
Modified: branches/ge_harmony/source/blender/makesrna/intern/rna_lamp.c
===================================================================
--- branches/ge_harmony/source/blender/makesrna/intern/rna_lamp.c 2012-03-02 04:07:47 UTC (rev 44597)
+++ branches/ge_harmony/source/blender/makesrna/intern/rna_lamp.c 2012-03-02 04:33:41 UTC (rev 44598)
@@ -722,13 +722,6 @@
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_shadbuftype_items[] = {
- {LA_SHADBUF_REGULAR , "REGULAR", 0, "Classical", "Classic shadow buffer"},
- {LA_SHADBUF_HALFWAY, "HALFWAY", 0, "Classic-Halfway", "Regular buffer, averaging the closest and 2nd closest Z value to reducing bias artifacts"},
- {LA_SHADBUF_IRREGULAR, "IRREGULAR", 0, "Irregular", "Irregular buffer produces sharp shadow always, but it doesn't show up for raytracing"},
- {LA_SHADBUF_DEEP, "DEEP", 0, "Deep", "Deep shadow buffer supports transparency and better filtering, at the cost of more memory usage and processing time"},
- {0, NULL, 0, NULL, NULL}};
-
static EnumPropertyItem prop_shadbuffiltertype_items[] = {
{LA_SHADBUF_BOX , "BOX", 0, "Box", "Apply the Box filter to shadow buffer samples"},
{LA_SHADBUF_TENT, "TENT", 0, "Tent", "Apply the Tent Filter to shadow buffer samples"},
@@ -802,12 +795,6 @@
rna_def_lamp_shadow(srna, 0, 0);
- prop= RNA_def_property(srna, "frustum_size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "sun_shadow_frustum");
- RNA_def_property_ui_range(prop, 0.001, 100.0, 2, 1);
- RNA_def_property_ui_text(prop, "Frustum Size", "Size of the frustum used for creating the shadow map");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
-
/* sky */
prop= RNA_def_property(srna, "sky", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
@@ -816,6 +803,13 @@
RNA_def_property_ui_text(prop, "Sky Settings", "Sky related settings for sun lamps");
rna_def_lamp_sky_settings(brna);
+
+ /* BGE Only */
+ prop= RNA_def_property(srna, "shadow_frustum_size", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "shadow_frustum_size");
+ RNA_def_property_ui_range(prop, 0.001, 100.0, 2, 1);
+ RNA_def_property_ui_text(prop, "Frustum Size", "Size of the frustum used for creating the shadow map");
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
}
static void rna_def_hemi_lamp(BlenderRNA *brna)
More information about the Bf-blender-cvs
mailing list