[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47005] branches/soc-2011-tomato: svn merge ^/trunk/blender -r46979:47003
Campbell Barton
ideasman42 at gmail.com
Fri May 25 11:42:59 CEST 2012
Revision: 47005
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47005
Author: campbellbarton
Date: 2012-05-25 09:42:58 +0000 (Fri, 25 May 2012)
Log Message:
-----------
svn merge ^/trunk/blender -r46979:47003
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46979
Modified Paths:
--------------
branches/soc-2011-tomato/intern/smoke/intern/FLUID_3D.cpp
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d.py
branches/soc-2011-tomato/source/blender/blenkernel/BKE_blender.h
branches/soc-2011-tomato/source/blender/blenkernel/intern/object.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/smoke.c
branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
branches/soc-2011-tomato/source/blender/editors/armature/editarmature.c
branches/soc-2011-tomato/source/blender/editors/curve/editcurve.c
branches/soc-2011-tomato/source/blender/editors/include/ED_armature.h
branches/soc-2011-tomato/source/blender/editors/include/ED_curve.h
branches/soc-2011-tomato/source/blender/editors/include/ED_mball.h
branches/soc-2011-tomato/source/blender/editors/include/ED_mesh.h
branches/soc-2011-tomato/source/blender/editors/include/ED_object.h
branches/soc-2011-tomato/source/blender/editors/include/ED_particle.h
branches/soc-2011-tomato/source/blender/editors/mesh/editface.c
branches/soc-2011-tomato/source/blender/editors/mesh/editmesh_select.c
branches/soc-2011-tomato/source/blender/editors/metaball/mball_edit.c
branches/soc-2011-tomato/source/blender/editors/object/object_lattice.c
branches/soc-2011-tomato/source/blender/editors/physics/particle_edit.c
branches/soc-2011-tomato/source/blender/editors/space_view3d/drawobject.c
branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_draw.c
branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_ops.c
branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_select.c
branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
branches/soc-2011-tomato/source/blender/gpu/intern/gpu_draw.c
branches/soc-2011-tomato/source/blender/makesdna/DNA_smoke_types.h
branches/soc-2011-tomato/source/blender/makesdna/DNA_view3d_types.h
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_space.c
branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_skin.c
branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_solidify.c
Property Changed:
----------------
branches/soc-2011-tomato/
branches/soc-2011-tomato/source/blender/editors/interface/interface.c
branches/soc-2011-tomato/source/blender/editors/space_outliner/
Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-46979
+ /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-47003
Modified: branches/soc-2011-tomato/intern/smoke/intern/FLUID_3D.cpp
===================================================================
--- branches/soc-2011-tomato/intern/smoke/intern/FLUID_3D.cpp 2012-05-25 09:40:56 UTC (rev 47004)
+++ branches/soc-2011-tomato/intern/smoke/intern/FLUID_3D.cpp 2012-05-25 09:42:58 UTC (rev 47005)
@@ -249,7 +249,6 @@
// set vorticity from RNA value
_vorticityEps = (*_vorticityRNA)/_constantScaling;
-
#if PARALLEL==1
int threadval = 1;
threadval = omp_get_max_threads();
Modified: branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d.py 2012-05-25 09:40:56 UTC (rev 47004)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d.py 2012-05-25 09:42:58 UTC (rev 47005)
@@ -2391,6 +2391,8 @@
col.prop(gs, "material_mode", text="")
col.prop(view, "show_textured_solid")
+ col.prop(view, "show_backface_culling")
+
layout.separator()
region = view.region_quadview
Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_blender.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_blender.h 2012-05-25 09:40:56 UTC (rev 47004)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_blender.h 2012-05-25 09:42:58 UTC (rev 47005)
@@ -42,7 +42,7 @@
* and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */
#define BLENDER_VERSION 263
-#define BLENDER_SUBVERSION 6
+#define BLENDER_SUBVERSION 7
#define BLENDER_MINVERSION 250
#define BLENDER_MINSUBVERSION 0
Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/object.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/object.c 2012-05-25 09:40:56 UTC (rev 47004)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/object.c 2012-05-25 09:42:58 UTC (rev 47005)
@@ -2258,8 +2258,15 @@
{
Curve *cu = ob->data;
- if (cu->bb == NULL) BKE_curve_texspace_calc(cu);
- bb = *(cu->bb);
+ /* Use the object bounding box so that modifier output
+ gets taken into account */
+ if (ob->bb)
+ bb = *(ob->bb);
+ else {
+ if (cu->bb == NULL)
+ BKE_curve_texspace_calc(cu);
+ bb = *(cu->bb);
+ }
for (a = 0; a < 8; a++) {
mul_m4_v3(ob->obmat, bb.vec[a]);
Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/smoke.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/smoke.c 2012-05-25 09:40:56 UTC (rev 47004)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/smoke.c 2012-05-25 09:42:58 UTC (rev 47005)
@@ -198,8 +198,6 @@
// calc other res with max_res provided
sub_v3_v3v3(size, max, min);
- // printf("size: %f, %f, %f\n", size[0], size[1], size[2]);
-
// prevent crash when initializing a plane as domain
if((size[0] < FLT_EPSILON) || (size[1] < FLT_EPSILON) || (size[2] < FLT_EPSILON))
return 0;
@@ -209,14 +207,16 @@
if(size[0] > size[2])
{
scale = res / size[0];
- smd->domain->dx = size[0] / res; // dx is in global coords
+ smd->domain->scale = size[0];
+ smd->domain->dx = 1.0f / res;
smd->domain->res[0] = res;
smd->domain->res[1] = (int)(size[1] * scale + 0.5);
smd->domain->res[2] = (int)(size[2] * scale + 0.5);
}
else {
scale = res / size[2];
- smd->domain->dx = size[2] / res; // dx is in global coords
+ smd->domain->scale = size[2];
+ smd->domain->dx = 1.0f / res;
smd->domain->res[2] = res;
smd->domain->res[0] = (int)(size[0] * scale + 0.5);
smd->domain->res[1] = (int)(size[1] * scale + 0.5);
@@ -226,25 +226,24 @@
if(size[1] > size[2])
{
scale = res / size[1];
- smd->domain->dx = size[1] / res; // dx is in global coords
+ smd->domain->scale = size[1];
+ smd->domain->dx = 1.0f / res;
smd->domain->res[1] = res;
smd->domain->res[0] = (int)(size[0] * scale + 0.5);
smd->domain->res[2] = (int)(size[2] * scale + 0.5);
}
else {
scale = res / size[2];
- smd->domain->dx = size[2] / res;
+ smd->domain->scale = size[2];
+ smd->domain->dx = 1.0f / res;
smd->domain->res[2] = res;
smd->domain->res[0] = (int)(size[0] * scale + 0.5);
smd->domain->res[1] = (int)(size[1] * scale + 0.5);
}
}
- // printf("smd->domain->dx: %f\n", smd->domain->dx);
-
// TODO: put in failsafe if res<=0 - dg
- // printf("res[0]: %d, res[1]: %d, res[2]: %d\n", smd->domain->res[0], smd->domain->res[1], smd->domain->res[2]);
// dt max is 0.1
smd->domain->fluid = smoke_init(smd->domain->res, smd->domain->p0, DT_DEFAULT);
smd->time = scene->r.cfra;
@@ -256,8 +255,6 @@
smd->domain->res_wt[1] = smd->domain->res[1] * (smd->domain->amplify + 1);
smd->domain->res_wt[2] = smd->domain->res[2] * (smd->domain->amplify + 1);
smd->domain->dx_wt = smd->domain->dx / (smd->domain->amplify + 1);
- // printf("smd->domain->amplify: %d\n", smd->domain->amplify);
- // printf("(smd->domain->flags & MOD_SMOKE_HIGHRES)\n");
}
if(!smd->domain->shadow)
@@ -268,7 +265,6 @@
if(smd->domain->wt)
{
smoke_initWaveletBlenderRNA(smd->domain->wt, &(smd->domain->strength));
- // printf("smoke_initWaveletBlenderRNA\n");
}
return 1;
}
@@ -303,8 +299,6 @@
DM_ensure_tessface(dm);
fill_scs_points(ob, dm, scs);
-
- // DEBUG printf("scs->dx: %f\n", scs->dx);
}
if(!smd->coll->bvhtree)
@@ -1184,7 +1178,7 @@
// DG TODO: cap velocity to maxVelMag (or maxvel)
// oldpos + velocity * dt = newpos
- get_cell(sds->p0, sds->res, sds->dx, cOldpos /* use current position here instead of "pos" */, cell, 0);
+ get_cell(sds->p0, sds->res, sds->dx*sds->scale, cOldpos /* use current position here instead of "pos" */, cell, 0);
// check if cell is valid (in the domain boundary)
for(j = 0; j < 3; j++)
@@ -1329,7 +1323,7 @@
// copy_v3_v3(pos, pa->state.co);
// mul_m4_v3(ob->imat, pos);
// 1. get corresponding cell
- get_cell(sds->p0, sds->res, sds->dx, state.co, cell, 0);
+ get_cell(sds->p0, sds->res, sds->dx*sds->scale, state.co, cell, 0);
// check if cell is valid (in the domain boundary)
for(i = 0; i < 3; i++)
{
@@ -1555,9 +1549,9 @@
vel[1] = velocity_y[index];
vel[2] = velocity_z[index];
- voxelCenter[0] = sds->p0[0] + sds->dx * x + sds->dx * 0.5;
- voxelCenter[1] = sds->p0[1] + sds->dx * y + sds->dx * 0.5;
- voxelCenter[2] = sds->p0[2] + sds->dx * z + sds->dx * 0.5;
+ voxelCenter[0] = sds->p0[0] + sds->dx * sds->scale * x + sds->dx * sds->scale * 0.5;
+ voxelCenter[1] = sds->p0[1] + sds->dx * sds->scale * y + sds->dx * sds->scale * 0.5;
+ voxelCenter[2] = sds->p0[2] + sds->dx * sds->scale * z + sds->dx * sds->scale * 0.5;
pd_point_from_loc(scene, voxelCenter, vel, index, &epoint);
pdDoEffectors(effectors, NULL, sds->effector_weights, &epoint, retvel, NULL);
@@ -1598,8 +1592,8 @@
/* adapt timestep for different framerates, dt = 0.1 is at 25fps */
dt *= (25.0f / fps);
- // printf("test maxVel: %f\n", (sds->dx * 1.5) / dt); // gives 0.9
- maxVel = (sds->dx * 1.5);
+ // maximum timestep/"CFL" constraint: dt < dx * maxVel
+ maxVel = (sds->dx * 1.0);
for(i = 0; i < size; i++)
{
@@ -1667,6 +1661,7 @@
Base *base = scene->base.first;
int changed = 0;
float dx = FLT_MAX;
+ float scale = 1.0f;
int haveDomain = 0;
for ( ; base; base = base->next)
@@ -1677,9 +1672,10 @@
{
SmokeDomainSettings *sds = smd2->domain;
- if(sds->dx < dx)
+ if(sds->dx * sds->scale < dx)
{
dx = sds->dx;
+ scale = sds->scale;
changed = 1;
}
@@ -1692,9 +1688,9 @@
if(changed)
{
- if(dx != scs->dx)
+ if(dx*scale != scs->dx)
{
- scs->dx = dx;
+ scs->dx = dx*scale;
smokeModifier_reset(smd);
}
}
@@ -1813,7 +1809,7 @@
if((int)smd->time == startframe && (cache->flag & PTCACHE_OUTDATED || cache->last_exact==0)) {
// create shadows straight after domain initialization so we get nice shadows for startframe, too
if(get_lamp(scene, light))
- smoke_calc_transparency(sds->shadow, smoke_get_density(sds->fluid), sds->p0, sds->p1, sds->res, sds->dx, light, calc_voxel_transp, -7.0*sds->dx);
+ smoke_calc_transparency(sds->shadow, smoke_get_density(sds->fluid), sds->p0, sds->p1, sds->res, sds->dx * sds->scale, light, calc_voxel_transp, -7.0*sds->dx * sds->scale);
if(sds->wt)
{
@@ -1844,7 +1840,7 @@
// create shadows before writing cache so they get stored
if(get_lamp(scene, light))
- smoke_calc_transparency(sds->shadow, smoke_get_density(sds->fluid), sds->p0, sds->p1, sds->res, sds->dx, light, calc_voxel_transp, -7.0*sds->dx);
+ smoke_calc_transparency(sds->shadow, smoke_get_density(sds->fluid), sds->p0, sds->p1, sds->res, sds->dx * sds->scale, light, calc_voxel_transp, -7.0*sds->dx * sds->scale);
if(sds->wt)
{
Modified: branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c 2012-05-25 09:40:56 UTC (rev 47004)
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list