Merge branch 'master' into blender2.8
authorBastien Montagne <montagne29@wanadoo.fr>
Mon, 3 Sep 2018 15:44:36 +0000 (17:44 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Mon, 3 Sep 2018 15:44:36 +0000 (17:44 +0200)
Conflicts:
source/blender/blenkernel/intern/collision.c

40 files changed:
1  2 
CMakeLists.txt
doc/python_api/rst/info_tips_and_tricks.rst
doc/python_api/rst_from_bmesh_opdefines.py
doc/python_api/sphinx_doc_gen.py
doc/python_api/sphinx_doc_gen.sh
release/scripts/modules/addon_utils.py
release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
release/scripts/startup/bl_operators/object.py
release/scripts/startup/bl_operators/uvcalc_follow_active.py
release/scripts/startup/bl_operators/uvcalc_lightmap.py
release/scripts/startup/bl_operators/uvcalc_smart_project.py
release/scripts/startup/bl_operators/wm.py
release/scripts/startup/bl_ui/space_clip.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/templates_py/background_job.py
source/blender/alembic/intern/abc_curves.cc
source/blender/alembic/intern/abc_nurbs.cc
source/blender/alembic/intern/abc_util.h
source/blender/alembic/intern/alembic_capi.cc
source/blender/blenkernel/intern/collision.c
source/blender/collada/DocumentImporter.h
source/blender/editors/animation/keyingsets.c
source/blender/imbuf/IMB_imbuf_types.h
source/blender/imbuf/intern/thumbs.c
source/blender/modifiers/intern/MOD_array.c
source/blender/modifiers/intern/MOD_laplaciandeform.c
source/blender/modifiers/intern/MOD_laplaciansmooth.c
source/blender/modifiers/intern/MOD_mirror.c
source/blender/modifiers/intern/MOD_screw.c
source/blender/modifiers/intern/MOD_simpledeform.c
source/blender/modifiers/intern/MOD_solidify.c
source/blender/modifiers/intern/MOD_surfacedeform.c
source/blender/modifiers/intern/MOD_weightvgproximity.c
source/blender/nodes/shader/node_shader_util.c
source/blender/python/bmesh/bmesh_py_ops_call.c
source/blender/python/bmesh/bmesh_py_types.c
source/blender/python/bmesh/bmesh_py_types_meshdata.c
source/blender/python/mathutils/mathutils.h
source/blender/python/mathutils/mathutils_Matrix.c
source/blender/python/mathutils/mathutils_bvhtree.c

diff --cc CMakeLists.txt
Simple merge
Simple merge
Simple merge
index d3aa52509557f33482a950467052076353ee5b9c,1df749ee8420bdecb55faac3f403d6ec8f91f4e9..d7fab317105d1dc41eb24a9de5b200e71de137ed
@@@ -1347,6 -1339,14 +1347,14 @@@ void cloth_find_point_contacts(Depsgrap
        // static collisions
        ////////////////////////////////////////////////////////////
  
 -      collobjs = get_collisionobjects(clmd->scene, ob, clmd->coll_parms->group, &numcollobj, eModifierType_Collision);
+       /* Check we do have collision objects to test against, before doing anything else. */
++      collobjs = BKE_collision_objects_create(depsgraph, ob, clmd->coll_parms->group, &numcollobj, eModifierType_Collision);
+       if (!collobjs) {
+               *r_collider_contacts = NULL;
+               *r_totcolliders = 0;
+               return;
+       }
        // create temporary cloth points bvh
        cloth_bvh = BLI_bvhtree_new(mvert_num, max_ff(clmd->coll_parms->epsilon, clmd->coll_parms->distance_repel), 4, 6);
        /* fill tree */
Simple merge
index 085f21fe13899d68c58854a4c9261e1742619751,d7f6c263906478033648fab0641bc9a1b2438644..3daf8c53f205c450fd217f14e8179a7c853a6291
@@@ -500,22 -546,23 +500,22 @@@ static Mesh *arrayModifier_doArray
        }
  
        /* copy customdata to original geometry */
 -      DM_copy_vert_data(dm, result, 0, 0, chunk_nverts);
 -      DM_copy_edge_data(dm, result, 0, 0, chunk_nedges);
 -      DM_copy_loop_data(dm, result, 0, 0, chunk_nloops);
 -      DM_copy_poly_data(dm, result, 0, 0, chunk_npolys);
 +      CustomData_copy_data(&mesh->vdata, &result->vdata, 0, 0, chunk_nverts);
 +      CustomData_copy_data(&mesh->edata, &result->edata, 0, 0, chunk_nedges);
 +      CustomData_copy_data(&mesh->ldata, &result->ldata, 0, 0, chunk_nloops);
 +      CustomData_copy_data(&mesh->pdata, &result->pdata, 0, 0, chunk_npolys);
  
-       /* Subsurf for eg wont have mesh data in the custom data arrays.
+       /* Subsurf for eg won't have mesh data in the custom data arrays.
         * now add mvert/medge/mpoly layers. */
 -
 -      if (!CustomData_has_layer(&dm->vertData, CD_MVERT)) {
 -              dm->copyVertArray(dm, result_dm_verts);
 +      if (!CustomData_has_layer(&mesh->vdata, CD_MVERT)) {
 +              memcpy(result->mvert, mesh->mvert, sizeof(*result->mvert) * mesh->totvert);
        }
 -      if (!CustomData_has_layer(&dm->edgeData, CD_MEDGE)) {
 -              dm->copyEdgeArray(dm, CDDM_get_edges(result));
 +      if (!CustomData_has_layer(&mesh->edata, CD_MEDGE)) {
 +              memcpy(result->medge, mesh->medge, sizeof(*result->medge) * mesh->totedge);
        }
 -      if (!CustomData_has_layer(&dm->polyData, CD_MPOLY)) {
 -              dm->copyLoopArray(dm, CDDM_get_loops(result));
 -              dm->copyPolyArray(dm, CDDM_get_polys(result));
 +      if (!CustomData_has_layer(&mesh->pdata, CD_MPOLY)) {
 +              memcpy(result->mloop, mesh->mloop, sizeof(*result->mloop) * mesh->totloop);
 +              memcpy(result->mpoly, mesh->mpoly, sizeof(*result->mpoly) * mesh->totpoly);
        }
  
        /* Remember first chunk, in case of cap merge */
index 4b16f165a125edbac3df3b43ff227ca9130e6b0a,aeb28b3ecb0b6ac1afe8dd67cc1e739b8d95d367..132280e7f15b3af8215ac66e76e4ccab07b85497
@@@ -125,26 -135,27 +125,26 @@@ static Mesh *doMirrorOnAxis
                mul_m4_m4m4(mtx, itmp, mtx);
        }
  
 -      result = CDDM_from_template(dm, maxVerts * 2, maxEdges * 2, 0, maxLoops * 2, maxPolys * 2);
 +      result = BKE_mesh_new_nomain_from_template(
 +              mesh, maxVerts * 2, maxEdges * 2, 0, maxLoops * 2, maxPolys * 2);
  
        /*copy customdata to original geometry*/
 -      DM_copy_vert_data(dm, result, 0, 0, maxVerts);
 -      DM_copy_edge_data(dm, result, 0, 0, maxEdges);
 -      DM_copy_loop_data(dm, result, 0, 0, maxLoops);
 -      DM_copy_poly_data(dm, result, 0, 0, maxPolys);
 -
 +      CustomData_copy_data(&mesh->vdata, &result->vdata, 0, 0, maxVerts);
 +      CustomData_copy_data(&mesh->edata, &result->edata, 0, 0, maxEdges);
 +      CustomData_copy_data(&mesh->ldata, &result->ldata, 0, 0, maxLoops);
 +      CustomData_copy_data(&mesh->pdata, &result->pdata, 0, 0, maxPolys);
  
-       /* Subsurf for eg wont have mesh data in the custom data arrays.
+       /* Subsurf for eg won't have mesh data in the custom data arrays.
         * now add mvert/medge/mpoly layers. */
 -
 -      if (!CustomData_has_layer(&dm->vertData, CD_MVERT)) {
 -              dm->copyVertArray(dm, CDDM_get_verts(result));
 +      if (!CustomData_has_layer(&mesh->vdata, CD_MVERT)) {
 +              memcpy(result->mvert, mesh->mvert, sizeof(*result->mvert) * mesh->totvert);
        }
 -      if (!CustomData_has_layer(&dm->edgeData, CD_MEDGE)) {
 -              dm->copyEdgeArray(dm, CDDM_get_edges(result));
 +      if (!CustomData_has_layer(&mesh->edata, CD_MEDGE)) {
 +              memcpy(result->medge, mesh->medge, sizeof(*result->medge) * mesh->totedge);
        }
 -      if (!CustomData_has_layer(&dm->polyData, CD_MPOLY)) {
 -              dm->copyLoopArray(dm, CDDM_get_loops(result));
 -              dm->copyPolyArray(dm, CDDM_get_polys(result));
 +      if (!CustomData_has_layer(&mesh->pdata, CD_MPOLY)) {
 +              memcpy(result->mloop, mesh->mloop, sizeof(*result->mloop) * mesh->totloop);
 +              memcpy(result->mpoly, mesh->mpoly, sizeof(*result->mpoly) * mesh->totpoly);
        }
  
        /* copy customdata to new geometry,
index 756ce3c83a9b03a181dce14347107199c89c046b,d14310d9199fe9a928cc3423fddb289f50bbf334..f9da939b21bd0fbd64353d5c2221cd1da4de9282
  #include "BKE_modifier.h"
  #include "BKE_deform.h"
  
 -
 -#include "depsgraph_private.h"
 -
  #include "MOD_util.h"
  
 +#include "bmesh.h"
 +
  #define BEND_EPS 0.000001f
  
- /* Re-maps the indicies for X Y Z by shifting them up and wrapping, such that
+ /* Re-maps the indices for X Y Z by shifting them up and wrapping, such that
   * X = Y, Y = Z, Z = X (for X axis), and X = Z, Y = X, Z = Y (for Y axis). This
   * exists because the deformations (excluding bend) are based on the Z axis.
   * Having this helps avoid long, drawn out switches. */