diff options
author | Jacques Lucke <jacques@blender.org> | 2020-03-12 13:16:44 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-03-12 13:16:44 +0300 |
commit | 4a8a7cc3cafba9fa00db0c66aae73f43be923a28 (patch) | |
tree | 2428bc6dd3b291e80f06de78831932e60c148956 /source/blender/modifiers | |
parent | 78d8e9f962f619c07fe5704cb1cc108f760b84e9 (diff) | |
parent | 6c707aad6a2e0cc6f5d3b561c32fabc2663cdb0e (diff) |
Merge branch 'master' into functions
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_bevel.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_cloth.c | 6 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_correctivesmooth.c | 5 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_datatransfer.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_hook.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_normal_edit.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_ocean.c | 4 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_weighted_normal.c | 2 |
8 files changed, 17 insertions, 8 deletions
diff --git a/source/blender/modifiers/intern/MOD_bevel.c b/source/blender/modifiers/intern/MOD_bevel.c index 9ec4d58eb61..de08533753e 100644 --- a/source/blender/modifiers/intern/MOD_bevel.c +++ b/source/blender/modifiers/intern/MOD_bevel.c @@ -206,7 +206,7 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes Object *ob = ctx->object; if (harden_normals && (ob->type == OB_MESH) && !(((Mesh *)ob->data)->flag & ME_AUTOSMOOTH)) { - modifier_setError(md, "Enable 'Auto Smooth' option in mesh settings for hardening"); + modifier_setError(md, "Enable 'Auto Smooth' in Object Data Properties"); harden_normals = false; } diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c index 953b1b460c8..63c1b6f1ef0 100644 --- a/source/blender/modifiers/intern/MOD_cloth.c +++ b/source/blender/modifiers/intern/MOD_cloth.c @@ -179,7 +179,11 @@ static void copyData(const ModifierData *md, ModifierData *target, const int fla } else { tclmd->point_cache = BKE_ptcache_add(&tclmd->ptcaches); - tclmd->point_cache->step = 1; + if (clmd->point_cache != NULL) { + tclmd->point_cache->step = clmd->point_cache->step; + tclmd->point_cache->startframe = clmd->point_cache->startframe; + tclmd->point_cache->endframe = clmd->point_cache->endframe; + } } tclmd->sim_parms = MEM_dupallocN(clmd->sim_parms); diff --git a/source/blender/modifiers/intern/MOD_correctivesmooth.c b/source/blender/modifiers/intern/MOD_correctivesmooth.c index 0afe95a3ca3..d35873728db 100644 --- a/source/blender/modifiers/intern/MOD_correctivesmooth.c +++ b/source/blender/modifiers/intern/MOD_correctivesmooth.c @@ -64,6 +64,7 @@ static void initData(ModifierData *md) csmd->bind_coords_num = 0; csmd->lambda = 0.5f; + csmd->scale = 1.0f; csmd->repeat = 5; csmd->flag = 0; csmd->smooth_type = MOD_CORRECTIVESMOOTH_SMOOTH_SIMPLE; @@ -696,7 +697,7 @@ static void correctivesmooth_modifier_do(ModifierData *md, uint i; float(*tangent_spaces)[3][3]; - + const float scale = csmd->scale; /* calloc, since values are accumulated */ tangent_spaces = MEM_calloc_arrayN(numVerts, sizeof(float[3][3]), __func__); @@ -710,7 +711,7 @@ static void correctivesmooth_modifier_do(ModifierData *md, #endif mul_v3_m3v3(delta, tangent_spaces[i], csmd->delta_cache.deltas[i]); - add_v3_v3(vertexCos[i], delta); + madd_v3_v3fl(vertexCos[i], delta, scale); } MEM_freeN(tangent_spaces); diff --git a/source/blender/modifiers/intern/MOD_datatransfer.c b/source/blender/modifiers/intern/MOD_datatransfer.c index 3e79dd91d2b..72cbe197251 100644 --- a/source/blender/modifiers/intern/MOD_datatransfer.c +++ b/source/blender/modifiers/intern/MOD_datatransfer.c @@ -220,7 +220,7 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes modifier_setError(md, "%s", BKE_reports_string(&reports, RPT_ERROR)); } else if ((dtmd->data_types & DT_TYPE_LNOR) && !(me->flag & ME_AUTOSMOOTH)) { - modifier_setError((ModifierData *)dtmd, "Enable 'Auto Smooth' option in mesh settings"); + modifier_setError((ModifierData *)dtmd, "Enable 'Auto Smooth' in Object Data Properties"); } else if (result->totvert > HIGH_POLY_WARNING || ((Mesh *)(ob_source->data))->totvert > HIGH_POLY_WARNING) { diff --git a/source/blender/modifiers/intern/MOD_hook.c b/source/blender/modifiers/intern/MOD_hook.c index 720ca4ffa13..78d29edfd98 100644 --- a/source/blender/modifiers/intern/MOD_hook.c +++ b/source/blender/modifiers/intern/MOD_hook.c @@ -316,7 +316,7 @@ static void deformVerts_do(HookModifierData *hmd, * This should always be true and I don't generally like * "paranoid" style code like this, but old files can have * indices that are out of range because old blender did - * not correct them on exit editmode. - zr + * not correct them on exit edit-mode. - zr */ if (hmd->force == 0.0f) { diff --git a/source/blender/modifiers/intern/MOD_normal_edit.c b/source/blender/modifiers/intern/MOD_normal_edit.c index 572d9505e4e..ace0c1b5eaf 100644 --- a/source/blender/modifiers/intern/MOD_normal_edit.c +++ b/source/blender/modifiers/intern/MOD_normal_edit.c @@ -494,7 +494,7 @@ static Mesh *normalEditModifier_do(NormalEditModifierData *enmd, if (!(((Mesh *)ob->data)->flag & ME_AUTOSMOOTH)) #endif { - modifier_setError((ModifierData *)enmd, "Enable 'Auto Smooth' option in mesh settings"); + modifier_setError((ModifierData *)enmd, "Enable 'Auto Smooth' in Object Data Properties"); return mesh; } diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c index 62a5dd45e68..fec04e9916d 100644 --- a/source/blender/modifiers/intern/MOD_ocean.c +++ b/source/blender/modifiers/intern/MOD_ocean.c @@ -92,6 +92,10 @@ static void initData(ModifierData *md) omd->seed = 0; omd->time = 1.0; + omd->spectrum = MOD_OCEAN_SPECTRUM_PHILLIPS; + omd->sharpen_peak_jonswap = 0.0f; + omd->fetch_jonswap = 120.0f; + omd->size = 1.0; omd->repeat_x = 1; omd->repeat_y = 1; diff --git a/source/blender/modifiers/intern/MOD_weighted_normal.c b/source/blender/modifiers/intern/MOD_weighted_normal.c index d9c05d8d4b4..04b503e588b 100644 --- a/source/blender/modifiers/intern/MOD_weighted_normal.c +++ b/source/blender/modifiers/intern/MOD_weighted_normal.c @@ -562,7 +562,7 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes if (!(((Mesh *)ob->data)->flag & ME_AUTOSMOOTH)) #endif { - modifier_setError((ModifierData *)wnmd, "Enable 'Auto Smooth' option in mesh settings"); + modifier_setError((ModifierData *)wnmd, "Enable 'Auto Smooth' in Object Data Properties"); return mesh; } |