diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-01-02 20:03:58 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-01-02 20:03:58 +0400 |
commit | dadb1ccd9298688addf811dd62e6dcc6b4f49a45 (patch) | |
tree | 3823fb516b4bd217c99778032aea3221a2c41faa /source/blender/modifiers | |
parent | 55f33619246d60050cf94fcb4ed026d5e306e10e (diff) |
Fix [#33189] AFTER 2.65 - Units in doc strings in ocean modifier.
Also:
* Fixes a (op prop) bug which prevented, once you had baked and freed ocean once, to bake again.
* Fixed infinite values of acumulated foam when baking with foam_fade values above 1.0, now simply clipping accumulated foam value to 1.0, as already done for the "instantaneaous" foam value returned by BKE_ocean_jminus_to_foam().
* Added missing RNA descriptions.
* Made foam_fade unanimatable!
* Added in UI some missing properties that are imho useful: random seed, size (kindof 'surface scaling'), and foam_fade (baking only).
* Removed custom lerp() func from bke's ocean.c, BLI's interpf does exactly the same thing (the first two args are just in reversed order). Note: this could most certainly be done in other parts of the code, bpy's mathutils for e.g. has its own linear interpolation code for vectors and matrices :/).
* Did some general code cleanup (mostly line length and no C++ -> C comments)...
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_ocean.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c index 564fa696c2a..c0e529f1eae 100644 --- a/source/blender/modifiers/intern/MOD_ocean.c +++ b/source/blender/modifiers/intern/MOD_ocean.c @@ -139,10 +139,10 @@ static void initData(ModifierData *md) omd->ocean = BKE_add_ocean(); init_ocean_modifier(omd); simulate_ocean_modifier(omd); -#else // WITH_OCEANSIM +#else /* WITH_OCEANSIM */ /* unused */ (void)md; -#endif // WITH_OCEANSIM +#endif /* WITH_OCEANSIM */ } static void freeData(ModifierData *md) @@ -153,10 +153,10 @@ static void freeData(ModifierData *md) BKE_free_ocean(omd->ocean); if (omd->oceancache) BKE_free_ocean_cache(omd->oceancache); -#else // WITH_OCEANSIM +#else /* WITH_OCEANSIM */ /* unused */ (void)md; -#endif // WITH_OCEANSIM +#endif /* WITH_OCEANSIM */ } static void copyData(ModifierData *md, ModifierData *target) @@ -201,11 +201,11 @@ static void copyData(ModifierData *md, ModifierData *target) tomd->ocean = BKE_add_ocean(); init_ocean_modifier(tomd); simulate_ocean_modifier(tomd); -#else // WITH_OCEANSIM +#else /* WITH_OCEANSIM */ /* unused */ (void)md; (void)target; -#endif // WITH_OCEANSIM +#endif /* WITH_OCEANSIM */ } #ifdef WITH_OCEANSIM @@ -219,14 +219,14 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) return dataMask; } -#else // WITH_OCEANSIM +#else /* WITH_OCEANSIM */ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) { /* unused */ (void)md; return 0; } -#endif // WITH_OCEANSIM +#endif /* WITH_OCEANSIM */ #if 0 static void dm_get_bounds(DerivedMesh *dm, float *sx, float *sy, float *ox, float *oy) @@ -302,11 +302,7 @@ static DerivedMesh *generate_ocean_geometry(OceanModifierData *omd) mpolys = CDDM_get_polys(result); mloops = CDDM_get_loops(result); -#if 0 // trunk - origindex = result->getFaceDataArray(result, CD_ORIGINDEX); -#else // bmesh origindex = CustomData_get_layer(&result->polyData, CD_ORIGINDEX); -#endif /* create vertices */ #pragma omp parallel for private(x, y) if (rx > OMP_MIN_RES) @@ -443,7 +439,7 @@ static DerivedMesh *doOcean(ModifierData *md, Object *ob, cfra = md->scene->r.cfra; CLAMP(cfra, omd->bakestart, omd->bakeend); - cfra -= omd->bakestart; // shift to 0 based + cfra -= omd->bakestart; /* shift to 0 based */ num_verts = dm->getNumVerts(dm); num_faces = dm->getNumPolys(dm); @@ -500,7 +496,7 @@ static DerivedMesh *doOcean(ModifierData *md, Object *ob, /* displace the geometry */ - //#pragma omp parallel for private(i, ocr) if (omd->resolution > OMP_MIN_RES) + /* #pragma omp parallel for private(i, ocr) if (omd->resolution > OMP_MIN_RES) */ for (i = 0, mv = mverts; i < num_verts; i++, mv++) { const float u = OCEAN_CO(size_co_inv, mv->co[0]); const float v = OCEAN_CO(size_co_inv, mv->co[1]); @@ -522,7 +518,7 @@ static DerivedMesh *doOcean(ModifierData *md, Object *ob, return dm; } -#else // WITH_OCEANSIM +#else /* WITH_OCEANSIM */ static DerivedMesh *doOcean(ModifierData *md, Object *UNUSED(ob), DerivedMesh *derivedData, int UNUSED(useRenderParams)) @@ -531,7 +527,7 @@ static DerivedMesh *doOcean(ModifierData *md, Object *UNUSED(ob), (void)md; return derivedData; } -#endif // WITH_OCEANSIM +#endif /* WITH_OCEANSIM */ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *derivedData, |