svn merge -r40075:40104 https://svn.blender.org/svnroot/bf-blender/trunk/blender
authorCampbell Barton <ideasman42@gmail.com>
Sat, 10 Sep 2011 23:49:39 +0000 (23:49 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 10 Sep 2011 23:49:39 +0000 (23:49 +0000)
26 files changed:
1  2 
release/scripts/startup/bl_ui/properties_data_modifier.py
source/blender/blenkernel/intern/customdata.c
source/blender/blenkernel/intern/object.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/include/ED_object.h
source/blender/editors/object/CMakeLists.txt
source/blender/editors/object/SConscript
source/blender/editors/object/object_intern.h
source/blender/editors/object/object_ops.c
source/blender/editors/util/CMakeLists.txt
source/blender/editors/util/SConscript
source/blender/makesdna/DNA_customdata_types.h
source/blender/makesdna/DNA_meshdata_types.h
source/blender/makesdna/DNA_modifier_types.h
source/blender/makesdna/DNA_object_types.h
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_scene.c
source/blender/modifiers/CMakeLists.txt
source/blender/modifiers/MOD_modifiertypes.h
source/blender/modifiers/SConscript
source/blender/modifiers/intern/MOD_util.c
source/creator/CMakeLists.txt
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp

@@@ -1089,49 -863,38 +1089,53 @@@ static const LayerTypeInfo LAYERTYPEINF
        /* 21: CD_ID_MCOL */
        {sizeof(MCol)*4, "MCol", 4, "IDCol", NULL, NULL, layerInterp_mcol,
         layerSwap_mcol, layerDefault_mcol},
 -      /* 22: CD_TEXTURE_MCOL */
 -      {sizeof(MCol)*4, "MCol", 4, "TexturedCol", NULL, NULL, layerInterp_mcol,
 +      {sizeof(MCol)*4, "MCol", 4, "TextureCol", NULL, NULL, layerInterp_mcol,
         layerSwap_mcol, layerDefault_mcol},
 -      /* 23: CD_CLOTH_ORCO */
 -      {sizeof(float)*3, "", 0, NULL, NULL, NULL, NULL, NULL, NULL},
 +      {sizeof(int), "", 0, NULL, NULL, NULL, NULL, NULL, NULL},
 +      {sizeof(float)*3, "", 0, "ShapeKey", NULL, NULL, layerInterp_shapekey},
 +      {sizeof(float), "", 0, "BevelWeight", NULL, NULL, layerInterp_bweight},
 +      {sizeof(float), "", 0, "SubSurfCrease", NULL, NULL, layerInterp_bweight},
 +      {sizeof(MLoopCol), "MLoopCol", 1, "WeightLoopCol", NULL, NULL, layerInterp_mloopcol, NULL,
 +       layerDefault_mloopcol, layerEqual_mloopcol, layerMultiply_mloopcol, layerInitMinMax_mloopcol,
 +       layerAdd_mloopcol, layerDoMinMax_mloopcol, layerCopyValue_mloopcol},
+       /* 24: CD_RECAST */
+       {sizeof(MRecast), "MRecast", 1,"Recast",NULL,NULL,NULL,NULL}
  };
  
++/* note, numbers are from trunk and need updating for bmesh */
++
  static const char *LAYERTYPENAMES[CD_NUMTYPES] = {
-       "CDMVert", "CDMSticky", "CDMDeformVert", "CDMEdge", "CDMFace", "CDMTFace",
-       "CDMCol", "CDOrigIndex", "CDNormal", "CDFlags","CDMFloatProperty",
-       "CDMIntProperty","CDMStringProperty", "CDOrigSpace", "CDOrco", "CDMTexPoly", "CDMLoopUV",
-       "CDMloopCol", "CDTangent", "CDMDisps", "CDWeightMCol", "CDMPoly", 
-       "CDMLoop", "CDMClothOrco", "CDMLoopCol", "CDIDCol", "CDTextureCol",
-       "CDShapeKeyIndex", "CDShapeKey", "CDBevelWeight", "CDSubSurfCrease"
 -      /*   0-4 */ "CDMVert", "CDMSticky", "CDMDeformVert", "CDMEdge", "CDMFace",
 -      /*   5-9 */ "CDMTFace", "CDMCol", "CDOrigIndex", "CDNormal", "CDFlags",
 -      /* 10-14 */ "CDMFloatProperty", "CDMIntProperty","CDMStringProperty", "CDOrigSpace", "CDOrco",
 -      /* 15-19 */ "CDMTexPoly", "CDMLoopUV", "CDMloopCol", "CDTangent", "CDMDisps",
 -      /* 20-24 */"CDWeightMCol", "CDIDMCol", "CDTextureMCol", "CDClothOrco", "CDMRecast"
++      /*   0-4 */ "CDMVert", "CDMSticky", "CDMDeformVert", "CDMEdge", "CDMFace", "CDMTFace",
++      /*   5-9 */ "CDMCol", "CDOrigIndex", "CDNormal", "CDFlags","CDMFloatProperty",
++      /* 10-14 */ "CDMIntProperty","CDMStringProperty", "CDOrigSpace", "CDOrco", "CDMTexPoly", "CDMLoopUV",
++      /* 15-19 */ "CDMloopCol", "CDTangent", "CDMDisps", "CDWeightMCol", "CDMPoly", 
++      /* 20-24 */ "CDMLoop", "CDMClothOrco", "CDMLoopCol", "CDIDCol", "CDTextureCol",
++      /* ?-? */ "CDShapeKeyIndex", "CDShapeKey", "CDBevelWeight", "CDSubSurfCrease", "CDMRecast"
  };
  
 +
  const CustomDataMask CD_MASK_BAREMESH =
 -      CD_MASK_MVERT | CD_MASK_MEDGE | CD_MASK_MFACE;
 +      CD_MASK_MVERT | CD_MASK_MEDGE | CD_MASK_MFACE | CD_MASK_MLOOP | CD_MASK_MPOLY | CD_MASK_BWEIGHT;
  const CustomDataMask CD_MASK_MESH =
        CD_MASK_MVERT | CD_MASK_MEDGE | CD_MASK_MFACE |
        CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_MTFACE | CD_MASK_MCOL |
 -      CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR | CD_MASK_MDISPS | CD_MASK_RECAST;
 +      CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR | CD_MASK_MDISPS |
 +      CD_MASK_MLOOPUV | CD_MASK_MLOOPCOL | CD_MASK_MPOLY | CD_MASK_MLOOP |
-       CD_MASK_MTEXPOLY | CD_MASK_NORMAL | CD_MASK_MDISPS;
++      CD_MASK_MTEXPOLY | CD_MASK_NORMAL | CD_MASK_MDISPS | CD_MASK_RECAST;
  const CustomDataMask CD_MASK_EDITMESH =
 -      CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_MTFACE |
 -      CD_MASK_MCOL|CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR | CD_MASK_MDISPS | CD_MASK_RECAST;
 +      CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_MTFACE | CD_MASK_MLOOPUV |
 +      CD_MASK_MLOOPCOL | CD_MASK_MTEXPOLY | CD_MASK_SHAPE_KEYINDEX |
 +      CD_MASK_MCOL|CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR |
-       CD_MASK_MDISPS | CD_MASK_SHAPEKEY;
++      CD_MASK_MDISPS | CD_MASK_SHAPEKEY | CD_MASK_RECAST;
  const CustomDataMask CD_MASK_DERIVEDMESH =
        CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_MTFACE |
        CD_MASK_MCOL | CD_MASK_ORIGINDEX | CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_CLOTH_ORCO |
 -      CD_MASK_PROP_STR | CD_MASK_ORIGSPACE | CD_MASK_ORCO | CD_MASK_TANGENT | CD_MASK_WEIGHT_MCOL | CD_MASK_RECAST;
 -const CustomDataMask CD_MASK_BMESH = 
 -      CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR;
 +      CD_MASK_MLOOPUV | CD_MASK_MLOOPCOL | CD_MASK_MTEXPOLY | CD_MASK_WEIGHT_MLOOPCOL |
 +      CD_MASK_PROP_STR | CD_MASK_ORIGSPACE | CD_MASK_ORCO | CD_MASK_TANGENT | 
-       CD_MASK_WEIGHT_MCOL | CD_MASK_NORMAL | CD_MASK_SHAPEKEY;
++      CD_MASK_WEIGHT_MCOL | CD_MASK_NORMAL | CD_MASK_SHAPEKEY | CD_MASK_RECAST;
 +const CustomDataMask CD_MASK_BMESH = CD_MASK_MLOOPUV | CD_MASK_MLOOPCOL | CD_MASK_MTEXPOLY |
 +      CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_PROP_FLT | CD_MASK_PROP_INT | 
 +      CD_MASK_PROP_STR | CD_MASK_SHAPEKEY | CD_MASK_SHAPE_KEYINDEX | CD_MASK_MDISPS;
  const CustomDataMask CD_MASK_FACECORNERS =
        CD_MASK_MTFACE | CD_MASK_MCOL | CD_MASK_MTEXPOLY | CD_MASK_MLOOPUV |
        CD_MASK_MLOOPCOL;
@@@ -5,8 -5,9 +5,9 @@@ sources = env.Glob('*.c') + env.Glob('*
  
  incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
  incs += ' ../../windowmanager #/intern/guardedalloc ../../blenloader'
 -incs += ' ../../makesrna ../../python ../../ikplugin'
 +incs += ' ../../makesrna ../../python ../../ikplugin ../../bmesh'
  incs += ' ../../render/extern/include ../../gpu' # for object_bake.c
+ incs += ' #extern/recastnavigation/Recast/Include'
  
  defs = []
  
@@@ -213,10 -213,14 +213,15 @@@ void ED_operatortypes_object(void
        WM_operatortype_append(OBJECT_OT_bake_image);
        WM_operatortype_append(OBJECT_OT_drop_named_material);
  
 +      WM_operatortype_append(OBJECT_OT_test_multires);
 +
+ #ifdef WITH_GAMEENGINE
+       WM_operatortype_append(OBJECT_OT_create_navmesh);
+       WM_operatortype_append(OBJECT_OT_assign_navpolygon);
+       WM_operatortype_append(OBJECT_OT_assign_new_navpolygon);
+ #endif
  }
  
 -
  void ED_operatormacros_object(void)
  {
        wmOperatorType *ot;
@@@ -24,7 -24,7 +24,8 @@@ set(IN
        ../../blenkernel
        ../../blenlib
        ../../blenloader
+       ../../../../extern/recastnavigation/Recast/Include
 +      ../../bmesh
        ../../makesdna
        ../../makesrna
        ../../windowmanager
@@@ -5,7 -5,11 +5,11 @@@ sources = env.Glob('*.c') + env.Glob('*
  
  incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
  incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
 -incs += ' ../../makesrna'
 +incs += ' ../../makesrna ../../bmesh'
+ incs += ' #extern/recastnavigation/Recast/Include'
  incs += ' ../../blenloader'
  
- env.BlenderLib ( 'bf_editors_util', sources, Split(incs), [], libtype=['core'], priority=[130] )
+ if not env['WITH_BF_GAMEENGINE']:
+     sources.remove('navmesh_conversion.cpp')
+ env.BlenderLib ( 'bf_editors_util', sources, Split(incs), [], libtype=['core','player'], priority=[330,210] )
@@@ -90,17 -89,11 +90,18 @@@ typedef struct CustomData 
  #define CD_TANGENT            18
  #define CD_MDISPS             19
  #define CD_WEIGHT_MCOL        20 /* for displaying weightpaint colors */
 -#define CD_ID_MCOL            21
 -#define CD_TEXTURE_MCOL       22
 +#define CD_MPOLY              21
 +#define CD_MLOOP              22
  #define CD_CLOTH_ORCO 23
 -#define CD_RECAST             24
 -#define CD_NUMTYPES           25
 +#define CD_ID_MCOL            24
 +#define CD_TEXTURE_MCOL               25
 +#define CD_SHAPE_KEYINDEX     26
 +#define CD_SHAPEKEY           27
 +#define CD_BWEIGHT            28
 +#define CD_CREASE             29
 +#define CD_WEIGHT_MLOOPCOL    30
- #define CD_NUMTYPES           31
++#define CD_RECAST             31
++#define CD_NUMTYPES           32
  
  /* Bits for CustomDataMask */
  #define CD_MASK_MVERT         (1 << CD_MVERT)
  #define CD_MASK_TANGENT               (1 << CD_TANGENT)
  #define CD_MASK_MDISPS                (1 << CD_MDISPS)
  #define CD_MASK_WEIGHT_MCOL   (1 << CD_WEIGHT_MCOL)
 +#define CD_MASK_MPOLY         (1 << CD_MPOLY)
 +#define CD_MASK_MLOOP         (1 << CD_MLOOP)
 +#define CD_MASK_WEIGHT_MLOOPCOL (1 << CD_WEIGHT_MLOOPCOL)
 +#define CD_MASK_SHAPE_KEYINDEX        (1 << CD_SHAPE_KEYINDEX)
 +#define CD_MASK_SHAPEKEY      (1 << CD_SHAPEKEY)
  #define CD_MASK_CLOTH_ORCO    (1 << CD_CLOTH_ORCO)
+ #define CD_MASK_RECAST                (1 << CD_RECAST)
  
 +/* derivedmesh wants CustomDataMask for weightpaint too, is not customdata though */
 +#define CD_MASK_WEIGHTPAINT   (1 << CD_WEIGHTPAINT)
 +#define CD_MASK_BWEIGHT               (1 << CD_BWEIGHT)
 +#define CD_MASK_CREASE                (1 << CD_CREASE)
 +
  /* CustomData.flag */
  
  /* indicates layer should not be copied by CustomData_from_template or
@@@ -74,7 -74,7 +74,10 @@@ typedef enum ModifierType 
        eModifierType_WeightVGEdit,
        eModifierType_WeightVGMix,
        eModifierType_WeightVGProximity,
+       eModifierType_NavMesh,
++
++      /* BMESH ONLY - keeps getting bumped by new modifiers in trunk */
 +      eModifierType_NgonInterp,
        NUM_MODIFIER_TYPES
  } ModifierType;
  
@@@ -751,13 -750,13 +754,17 @@@ typedef struct ScrewModifierData 
  #define MOD_SCREW_OBJECT_OFFSET       (1<<2)
  // #define MOD_SCREW_OBJECT_ANGLE     (1<<4)
  
 +typedef struct NgonInterpModifierData {
 +      ModifierData modifier;
 +      int             resolution, pad0;
 +} NgonInterpModifierData;
 +
+ typedef struct NavMeshModifierData {
+       ModifierData modifier;
+ } NavMeshModifierData;
  typedef struct WarpModifierData {
        ModifierData modifier;
 -
        /* keep in sync with MappingInfoModifierData */
        struct Tex *texture;
        struct Object *map_object;
  #include "DNA_particle_types.h"
  #include "DNA_scene_types.h"
  #include "DNA_userdef_types.h"
+ #include "BLI_math.h"
  
 +#include "BKE_tessmesh.h"
 +
  /* Include for Bake Options */
  #include "RE_pipeline.h"
  
@@@ -33,14 -33,17 +33,18 @@@ set(IN
        ../blenloader
        ../makesdna
        ../makesrna
 +      ../bmesh
        ../render/extern/include
+       ../editors/include
+       ../gpu
        ../../../intern/elbeem/extern
        ../../../intern/guardedalloc
+       ../../../extern/recastnavigation/Recast/Include
  )
  
  set(INC_SYS
        ${ZLIB_INCLUDE_DIRS}
 -        ${GLEW_INCLUDE_PATH}
++      ${GLEW_INCLUDE_PATH}
  )
  
  set(SRC
@@@ -65,7 -68,7 +69,8 @@@
        intern/MOD_meshdeform.c
        intern/MOD_mirror.c
        intern/MOD_multires.c
 +      intern/MOD_ngoninterp.c
+       intern/MOD_navmesh.cpp
        intern/MOD_none.c
        intern/MOD_particleinstance.c
        intern/MOD_particlesystem.c
@@@ -1,12 -1,14 +1,14 @@@
  #!/usr/bin/python
  Import ('env')
  
- sources = env.Glob('intern/*.c')
+ sources = env.Glob('intern/*.c') + env.Glob('intern/*.cpp')
  
  incs = '. ./intern'
- incs += ' #/intern/guardedalloc #/intern/decimation/extern #/intern/bsp/extern #/intern/elbeem/extern'
+ incs += ' #/intern/guardedalloc #/intern/decimation/extern #/intern/bsp/extern #/intern/elbeem/extern #/extern/glew/include'
 -incs += ' ../render/extern/include ../blenloader'
 +incs += ' ../render/extern/include ../blenloader ../bmesh'
  incs += ' ../include ../blenlib ../makesdna ../makesrna ../blenkernel ../blenkernel/intern'
+ incs += ' ../editors/include ../gpu'
+ incs += ' #extern/recastnavigation/Recast/Include'
  
  incs += ' ' + env['BF_ZLIB_INC']
  
Simple merge