[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22437] branches/soc-2009-yukishiro: minor fixes
Jingyuan Huang
jingyuan.huang at gmail.com
Thu Aug 13 21:30:33 CEST 2009
Revision: 22437
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22437
Author: yukishiro
Date: 2009-08-13 21:30:31 +0200 (Thu, 13 Aug 2009)
Log Message:
-----------
minor fixes
Modified Paths:
--------------
branches/soc-2009-yukishiro/release/ui/buttons_lightenv.py
branches/soc-2009-yukishiro/source/blender/blenkernel/intern/lightenv.c
branches/soc-2009-yukishiro/source/blender/sh/intern/compute.c
Modified: branches/soc-2009-yukishiro/release/ui/buttons_lightenv.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_lightenv.py 2009-08-13 18:26:15 UTC (rev 22436)
+++ branches/soc-2009-yukishiro/release/ui/buttons_lightenv.py 2009-08-13 19:30:31 UTC (rev 22437)
@@ -48,11 +48,11 @@
row = layout.row()
row.itemR(lightenv, "degree", text="Degree")
- row.itemR(lightenv, "num_samples", text="# Samples")
+ #row.itemR(lightenv, "num_samples", text="# Samples")
row = layout.row()
- row.itemO("PAINT_OT_light_paint_recompute", text="Recompute LightEnv")
- row.itemO("LIGHTENV_OT_reset", text="Reset LightEnv")
+ row.itemO("PAINT_OT_light_paint_recompute", text="Recompute")
+ row.itemO("LIGHTENV_OT_reset", text="Reset")
class LIGHT_PT_save(LightButtonsPanel):
Modified: branches/soc-2009-yukishiro/source/blender/blenkernel/intern/lightenv.c
===================================================================
--- branches/soc-2009-yukishiro/source/blender/blenkernel/intern/lightenv.c 2009-08-13 18:26:15 UTC (rev 22436)
+++ branches/soc-2009-yukishiro/source/blender/blenkernel/intern/lightenv.c 2009-08-13 19:30:31 UTC (rev 22437)
@@ -88,6 +88,7 @@
env->num_samples = 10;
env->output_width = env->output_height = 512;
env->Y = SH_allocate_Y();
+ memset(env->shcoeffs, 0, sizeof(float) * 75);
SH_computeLightCoefficients(env);
}
@@ -182,6 +183,5 @@
void reset_lightenv(LightEnv *env)
{
- memset(env->shcoeffs, 0, sizeof(float) * 75);
init(env);
}
Modified: branches/soc-2009-yukishiro/source/blender/sh/intern/compute.c
===================================================================
--- branches/soc-2009-yukishiro/source/blender/sh/intern/compute.c 2009-08-13 18:26:15 UTC (rev 22436)
+++ branches/soc-2009-yukishiro/source/blender/sh/intern/compute.c 2009-08-13 19:30:31 UTC (rev 22437)
@@ -789,7 +789,7 @@
int k, m, i, j;
float phi, theta, *y_val, l_val[3];
float u, v, r, deltau, deltav, dA, d_omega;
- int num_sh = (env->degree + 1) * (env->degree + 1);
+ int num_sh = (L + 1) * (L + 1); // compute all degrees
ImBuf *ibuf;
Vec3 pnt;
@@ -846,7 +846,7 @@
void SH_ComputeLightCoefficient(LightEnv *env, float u, float v, float xsize, float ysize, float *val)
{
float r, deltau, deltav, dA, phi, theta, d_omega, *y_val;
- int m, num_sh = (env->degree + 1) * (env->degree + 1);
+ int m, num_sh = (L + 1) * (L + 1); // compute all degrees
Vec3 pnt;
r = sqrt(u * u + v * v);
More information about the Bf-blender-cvs
mailing list