Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2019-04-26 18:20:45 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-04-26 18:21:10 +0300
commit0fddc48fb2b518a4aa031a08ad4f39233c2c6f3c (patch)
tree6ec6093113cde87ce40304ffe7fa78c794dd020a /source/blender/blenkernel/intern/data_transfer.c
parent8973d1e7697c8272ba15aa7ecb79f0de66930086 (diff)
Minor cleanup in data transfer code.
Diffstat (limited to 'source/blender/blenkernel/intern/data_transfer.c')
-rw-r--r--source/blender/blenkernel/intern/data_transfer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/data_transfer.c b/source/blender/blenkernel/intern/data_transfer.c
index a57db5a7cbe..09b71db5ce9 100644
--- a/source/blender/blenkernel/intern/data_transfer.c
+++ b/source/blender/blenkernel/intern/data_transfer.c
@@ -340,6 +340,10 @@ static void data_transfer_dtdata_type_postprocess(Object *UNUSED(ob_src),
const bool changed)
{
if (dtdata_type == DT_TYPE_LNOR) {
+ if (!changed) {
+ return;
+ }
+
/* Bake edited destination loop normals into custom normals again. */
MVert *verts_dst = me_dst->mvert;
const int num_verts_dst = me_dst->totvert;
@@ -358,10 +362,6 @@ static void data_transfer_dtdata_type_postprocess(Object *UNUSED(ob_src),
BLI_assert(poly_nors_dst);
- if (!changed) {
- return;
- }
-
if (!custom_nors_dst) {
custom_nors_dst = CustomData_add_layer(
ldata_dst, CD_CUSTOMLOOPNORMAL, CD_CALLOC, NULL, num_loops_dst);