[Bf-blender-cvs] [18d87e79e92] blender2.8: Merge branch 'master' into blender2.8

Campbell Barton noreply at git.blender.org
Fri Jun 29 09:26:33 CEST 2018


Commit: 18d87e79e92e0cb4792ba3cb42c4ea84fcd29d90
Author: Campbell Barton
Date:   Fri Jun 29 09:25:40 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB18d87e79e92e0cb4792ba3cb42c4ea84fcd29d90

Merge branch 'master' into blender2.8

===================================================================



===================================================================

diff --cc source/CMakeLists.txt
index f9260ecebc5,1c7801fb59e..acc354a9d0a
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@@ -23,9 -23,8 +23,8 @@@
  #
  # ***** END GPL LICENSE BLOCK *****
  
 -add_subdirectory(blender)
 -
 -if(WITH_GAMEENGINE)
 -	add_subdirectory(gameengine)
 +if(WITH_LEGACY_OPENGL)
 +	add_definitions(-DWITH_LEGACY_OPENGL)
  endif()
 +
 +add_subdirectory(blender)
- 
diff --cc source/blender/blenkernel/BKE_mesh_tangent.h
index cb3100c1c2f,00000000000..6d359a0653c
mode 100644,000000..100644
--- a/source/blender/blenkernel/BKE_mesh_tangent.h
+++ b/source/blender/blenkernel/BKE_mesh_tangent.h
@@@ -1,61 -1,0 +1,60 @@@
 +/*
 + * ***** BEGIN GPL LICENSE BLOCK *****
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License
 + * as published by the Free Software Foundation; either version 2
 + * of the License, or (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software Foundation,
 + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 + *
 + * ***** END GPL LICENSE BLOCK *****
 + */
 +#ifndef __BKE_MESH_TANGENT_H__
 +#define __BKE_MESH_TANGENT_H__
 +
 +void BKE_mesh_calc_loop_tangent_single_ex(
 +        const struct MVert *mverts, const int numVerts, const struct MLoop *mloops,
 +        float (*r_looptangent)[4], float (*loopnors)[3], const struct MLoopUV *loopuv,
 +        const int numLoops, const struct MPoly *mpolys, const int numPolys,
 +        struct ReportList *reports);
 +void BKE_mesh_calc_loop_tangent_single(
 +        struct Mesh *mesh, const char *uvmap, float (*r_looptangents)[4], struct ReportList *reports);
 +
 +void BKE_mesh_calc_loop_tangent_ex(
 +        const struct MVert *mvert,
 +        const struct MPoly *mpoly, const uint mpoly_len,
 +        const struct MLoop *mloop,
 +        const struct MLoopTri *looptri, const uint looptri_len,
 +
 +        struct CustomData *loopdata,
 +        bool calc_active_tangent,
 +        const char (*tangent_names)[64], int tangent_names_len,
 +        const float (*poly_normals)[3],
 +        const float (*loop_normals)[3],
 +        const float (*vert_orco)[3],
 +        /* result */
 +        struct CustomData *loopdata_out,
 +        const uint  loopdata_out_len,
 +        short *tangent_mask_curr_p);
 +
 +/* Helpers */
 +void BKE_mesh_add_loop_tangent_named_layer_for_uv(
 +        struct CustomData *uv_data, struct CustomData *tan_data, int numLoopData,
 +        const char *layer_name);
 +
 +#define DM_TANGENT_MASK_ORCO (1 << 9)
 +void BKE_mesh_calc_loop_tangent_step_0(
 +        const struct CustomData *loopData, bool calc_active_tangent,
 +        const char (*tangent_names)[64], int tangent_names_count,
 +        bool *rcalc_act, bool *rcalc_ren, int *ract_uv_n, int *rren_uv_n,
 +        char *ract_uv_name, char *rren_uv_name, short *rtangent_mask);
 +
 +#endif /* __BKE_MESH_TANGENT_H__ */
- 
diff --cc source/blender/blenkernel/BKE_modifier.h
index b5d81bfe375,2d39ac4d102..c9f724a9bc4
--- a/source/blender/blenkernel/BKE_modifier.h
+++ b/source/blender/blenkernel/BKE_modifier.h
@@@ -490,75 -457,4 +490,74 @@@ void modwrap_deformVertsEM
          struct BMEditMesh *em, struct DerivedMesh *dm,
          float (*vertexCos)[3], int numVerts);
  
 +/* wrappers for modifier callbacks that accept Mesh and select the proper implementation
 + * depending on if the modifier has been ported to Mesh or is still using DerivedMesh
 + */
 +
 +void modifier_deformVerts(
 +        struct ModifierData *md, const struct ModifierEvalContext *ctx,
 +        struct Mesh *mesh, float (*vertexCos)[3], int numVerts);
 +
 +void modifier_deformVerts_ensure_normals(
 +        struct ModifierData *md, const struct ModifierEvalContext *ctx,
 +        struct Mesh *mesh, float (*vertexCos)[3], int numVerts);
 +
 +void modifier_deformMatrices(
 +        struct ModifierData *md, const struct ModifierEvalContext *ctx,
 +        struct Mesh *mesh, float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
 +
 +void modifier_deformVertsEM(
 +        struct ModifierData *md, const struct ModifierEvalContext *ctx,
 +        struct BMEditMesh *editData, struct Mesh *mesh,
 +        float (*vertexCos)[3], int numVerts);
 +
 +void modifier_deformMatricesEM(
 +        struct ModifierData *md, const struct ModifierEvalContext *ctx,
 +        struct BMEditMesh *editData, struct Mesh *mesh,
 +        float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
 +
 +struct Mesh *modifier_applyModifier(
 +        struct ModifierData *md, const struct ModifierEvalContext *ctx,
 +        struct Mesh *mesh);
 +
 +struct Mesh *modifier_applyModifier_ensure_normals(
 +        struct ModifierData *md, const struct ModifierEvalContext *ctx,
 +        struct Mesh *mesh);
 +
 +struct Mesh *modifier_applyModifierEM(
 +        struct ModifierData *md, const struct ModifierEvalContext *ctx,
 +        struct BMEditMesh *editData, struct Mesh *mesh);
 +
 +/* depricated variants of above that accept DerivedMesh */
 +
 +void modifier_deformVerts_DM_deprecated(
 +        struct ModifierData *md, const struct ModifierEvalContext *ctx,
 +        struct DerivedMesh *dm, float (*vertexCos)[3], int numVerts);
 +
 +void modifier_deformMatrices_DM_deprecated(
 +        struct ModifierData *md, const struct ModifierEvalContext *ctx,
 +        struct DerivedMesh *dm,
 +        float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
 +
 +void modifier_deformVertsEM_DM_deprecated(
 +        struct ModifierData *md, const struct ModifierEvalContext *ctx,
 +        struct BMEditMesh *editData, struct DerivedMesh *dm,
 +        float (*vertexCos)[3], int numVerts);
 +
 +void modifier_deformMatricesEM_DM_deprecated(
 +        struct ModifierData *md, const struct ModifierEvalContext *ctx,
 +        struct BMEditMesh *editData, struct DerivedMesh *dm,
 +        float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
 +
 +struct DerivedMesh *modifier_applyModifier_DM_deprecated(
 +        struct ModifierData *md, const struct ModifierEvalContext *ctx,
 +        struct DerivedMesh *dm);
 +
 +struct DerivedMesh *modifier_applyModifierEM_DM_deprecated(
 +        struct ModifierData *md, const struct ModifierEvalContext *ctx,
 +        struct BMEditMesh *editData, struct DerivedMesh *dm);
 +
 +struct Mesh *BKE_modifier_get_evaluated_mesh_from_evaluated_object(
 +        struct Object *ob_eval, bool *r_free_mesh);
 +
  #endif
- 
diff --cc source/blender/blenkernel/BKE_world.h
index fe8aa8694af,b28bac08727..f703fefec97
--- a/source/blender/blenkernel/BKE_world.h
+++ b/source/blender/blenkernel/BKE_world.h
@@@ -44,11 -44,4 +44,10 @@@ struct World *BKE_world_copy(struct Mai
  struct World *BKE_world_localize(struct World *wrld);
  void BKE_world_make_local(struct Main *bmain, struct World *wrld, const bool lib_local);
  
 -#endif  /* __BKE_WORLD_H__ */
 +/* Evaluation. */
 +
 +struct Depsgraph;
 +
 +void BKE_world_eval(struct Depsgraph *depsgraph, struct World *world);
 +
 +#endif
- 
diff --cc source/blender/blenkernel/intern/action.c
index 9f5b81a8915,e6848876425..cbdabe2c440
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@@ -1456,7 -1498,6 +1456,6 @@@ void what_does_obaction(Object *ob, Obj
  		adt.action = act;
  
  		/* execute effects of Action on to workob (or it's PoseChannels) */
 -		BKE_animsys_evaluate_animdata(NULL, &workob->id, &adt, cframe, ADT_RECALC_ANIM);
 +		BKE_animsys_evaluate_animdata(NULL, NULL, &workob->id, &adt, cframe, ADT_RECALC_ANIM);
  	}
  }
- 
diff --cc source/blender/blenkernel/intern/cloth.c
index 680c6860f4c,26f998b3cb4..ccef747a31c
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@@ -1506,6 -1505,5 +1506,5 @@@ static int cloth_build_springs ( ClothM
  
  } /* cloth_build_springs */
  /***************************************************************************************
 - * SPRING NETWORK BUILDING IMPLEMENTATION END
 + * SPRING NETWORK GWN_BATCH_BUILDING IMPLEMENTATION END
   ***************************************************************************************/
- 
diff --cc source/blender/blenkernel/intern/icons.c
index 37f53e81236,071c10acaa5..1c2575dfa52
--- a/source/blender/blenkernel/intern/icons.c
+++ b/source/blender/blenkernel/intern/icons.c
@@@ -696,128 -649,21 +696,127 @@@ void BKE_icon_id_delete(struct ID *id
  /**
   * Remove icon and free data.
   */
 -void BKE_icon_delete(const int icon_id)
 +bool BKE_icon_delete(const int icon_id)
  {
 -	Icon *icon;
 +	if (icon_id == 0) {
 +		/* no icon defined for library object */
 +		return false;
 +	}
  
 -	if (!icon_id) return;  /* no icon defined for library object */
 +	Icon *icon = BLI_ghash_popkey(gIcons, SET_INT_IN_POINTER(icon_id), NULL);
 +	if (icon) {
 +		icon_free_data(icon_id, icon);
 +		icon_free(icon);
 +		return true;
 +	}
 +	else {
 +		return false;
 +	}
 +}
  
 -	icon = BLI_ghash_popkey(gIcons, SET_INT_IN_POINTER(icon_id), NULL);
 +bool BKE_icon_delete_unmanaged(const int icon_id)
 +{
 +	if (icon_id == 0) {
 +		/* no icon defined for library object */
 +		return false;
 +	}
  
 +	Icon *icon = BLI_ghash_popkey(gIcons, SET_INT_IN_POINTER(icon_id), NULL);
  	if (icon) {
 -		if (icon->id_type != 0) {
 -			((ID *)(icon->obj))->icon_id = 0;
 +		if (UNLIKELY(icon->flag & ICON_FLAG_MANAGED)) {
 +			BLI_ghash_insert(gIcons, SET_INT_IN_POINTER(icon_id), icon);
 +			return false;
  		}
  		else {
 -			((PreviewImage *)(icon->obj))->icon_id = 0;
 +			icon_free_data(icon_id, icon);
 +			icon_free(icon);
 +			return true;
  		}
 -		icon_free(icon);
  	}
 +	else {
 +		return false;
 +	}
 +}
 +
 +/* -------------------------------------------------------------------- */
 +/** \name Geometry Icon
 + * \{ */
 +
 +int BKE_icon_geom_ensure(struct Icon_Geom *geom)
 +{
 +	BLI_assert(BLI_th

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list