svn merge -r 16060:16222 https://svn.blender.org/svnroot/bf-blender/trunk/blender
authorDaniel Genrich <daniel.genrich@gmx.net>
Fri, 22 Aug 2008 09:31:32 +0000 (09:31 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Fri, 22 Aug 2008 09:31:32 +0000 (09:31 +0000)
13 files changed:
1  2 
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/ipo.c
source/blender/blenkernel/intern/modifier.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/makesdna/DNA_ipo_types.h
source/blender/makesdna/DNA_modifier_types.h
source/blender/src/buttons_editing.c
source/blender/src/buttons_object.c
source/blender/src/editipo.c
source/blender/src/editipo_lib.c
source/blender/src/gpencil.c

  #include "BKE_main.h"
  #include "BKE_anim.h"
  #include "BKE_bad_level_calls.h"
 +#include "BKE_bmesh.h"
 +#include "BKE_booleanops.h"
  #include "BKE_cloth.h"
  #include "BKE_collision.h"
 +#include "BKE_cdderivedmesh.h"
  #include "BKE_curve.h"
  #include "BKE_customdata.h"
 -#include "BKE_global.h"
 -#include "BKE_cdderivedmesh.h"
  #include "BKE_DerivedMesh.h"
 -#include "BKE_booleanops.h"
  #include "BKE_displist.h"
 -#include "BKE_modifier.h"
 +#include "BKE_fluidsim.h"
 +#include "BKE_global.h"
  #include "BKE_lattice.h"
  #include "BKE_library.h"
 -#include "BKE_subsurf.h"
 -#include "BKE_object.h"
 -#include "BKE_mesh.h"
 -#include "BKE_softbody.h"
 -#include "BKE_cloth.h"
  #include "BKE_material.h"
 +#include "BKE_mesh.h"
 +#include "BKE_modifier.h"
 +#include "BKE_object.h"
  #include "BKE_particle.h"
  #include "BKE_pointcache.h"
 +#include "BKE_softbody.h"
 +#include "BKE_subsurf.h"
  #include "BKE_texture.h"
  #include "BKE_utildefines.h"
 +
  #include "depsgraph_private.h"
 -#include "BKE_bmesh.h"
+ #include "BKE_deform.h"
+ #include "BKE_shrinkwrap.h"
  
  #include "LOD_DependKludge.h"
  #include "LOD_decimation.h"
@@@ -7644,18 -7662,22 +7750,33 @@@ ModifierTypeInfo *modifierType_getInfo(
                mti->dependsOnTime = explodeModifier_dependsOnTime;
                mti->requiredDataMask = explodeModifier_requiredDataMask;
                mti->applyModifier = explodeModifier_applyModifier;
 +              
 +              mti = INIT_TYPE(Fluidsim);
 +              mti->type = eModifierTypeType_Nonconstructive
 +                              | eModifierTypeFlag_RequiresOriginalData;
 +              mti->flags = eModifierTypeFlag_AcceptsMesh;
 +              mti->initData = fluidsimModifier_initData;
 +              mti->freeData = fluidsimModifier_freeData;
 +              mti->copyData = fluidsimModifier_copyData;
 +              mti->dependsOnTime = fluidsimModifier_dependsOnTime;
 +              mti->applyModifier = fluidsimModifier_applyModifier;
 +              mti->updateDepgraph = fluidsimModifier_updateDepgraph;
  
+               mti = INIT_TYPE(Shrinkwrap);
+               mti->type = eModifierTypeType_OnlyDeform;
+               mti->flags = eModifierTypeFlag_AcceptsMesh
+                               | eModifierTypeFlag_AcceptsCVs
+                               | eModifierTypeFlag_SupportsEditmode
+                               | eModifierTypeFlag_EnableInEditmode;
+               mti->initData = shrinkwrapModifier_initData;
+               mti->copyData = shrinkwrapModifier_copyData;
+               mti->requiredDataMask = shrinkwrapModifier_requiredDataMask;
+               mti->isDisabled = shrinkwrapModifier_isDisabled;
+               mti->foreachObjectLink = shrinkwrapModifier_foreachObjectLink;
+               mti->deformVerts = shrinkwrapModifier_deformVerts;
+               mti->deformVertsEM = shrinkwrapModifier_deformVertsEM;
+               mti->updateDepgraph = shrinkwrapModifier_updateDepgraph;
                typeArrInit = 0;
  #undef INIT_TYPE
        }
@@@ -352,15 -352,10 +352,15 @@@ typedef short IPO_Channel
  
  #define FLUIDSIM_ACTIVE 9
  
 +#define FLUIDSIM_ATTR_FORCE_STR       10
 +#define FLUIDSIM_ATTR_FORCE_RADIUS    11
 +#define FLUIDSIM_VEL_FORCE_STR                12
 +#define FLUIDSIM_VEL_FORCE_RADIUS     13
 +
  /* ******************** */
  /* particle ipos */
- #define PART_TOTIPO           19
- #define PART_TOTNAM           19
+ #define PART_TOTIPO           25
+ #define PART_TOTNAM           25
  
  #define PART_EMIT_FREQ        1
  #define PART_EMIT_LIFE        2
@@@ -35,7 -35,7 +35,11 @@@ typedef enum ModifierType 
        eModifierType_Cloth,
        eModifierType_Collision,
        eModifierType_Bevel,
++<<<<<<< .working
 +      eModifierType_Fluidsim,
++=======
+       eModifierType_Shrinkwrap,
++>>>>>>> .merge-rechts.r16222
        NUM_MODIFIER_TYPES
  } ModifierType;
  
@@@ -491,11 -492,45 +496,55 @@@ typedef struct ExplodeModifierData 
        float protect;
  } ExplodeModifierData;
  
++<<<<<<< .working
 +typedef struct FluidsimModifierData {
 +      ModifierData modifier;
 +      
 +      struct FluidsimSettings *fss; /* definition is is DNA_object_fluidsim.h */
 +      struct PointCache *point_cache; /* definition is in DNA_object_force.h */
 +} FluidsimModifierData;
 +
++=======
+ typedef struct ShrinkwrapModifierData {
+       ModifierData modifier;
+       struct Object *target;  /* shrink target */
+       struct Object *auxTarget; /* additional shrink target */
+       char vgroup_name[32];   /* optional vertexgroup name */
+       float keepDist;                 /* distance offset to keep from mesh/projection point */
+       short shrinkType;               /* shrink type projection */
+       short shrinkOpts;               /* shrink options */
+       char projAxis;                  /* axis to project over */
+       /*
+        * if using projection over vertex normal this controls the
+        * the level of subsurface that must be done before getting the
+        * vertex coordinates and normal
+        */
+       char subsurfLevels;
+       char pad[6];
+ } ShrinkwrapModifierData;
+ /* Shrinkwrap->shrinkType */
+ #define MOD_SHRINKWRAP_NEAREST_SURFACE        0
+ #define MOD_SHRINKWRAP_PROJECT                        1
+ #define MOD_SHRINKWRAP_NEAREST_VERTEX 2
+ /* Shrinkwrap->shrinkOpts */
+ #define MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR  (1<<0)  /* allow shrinkwrap to move the vertex in the positive direction of axis */
+ #define MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR  (1<<1)  /* allow shrinkwrap to move the vertex in the negative direction of axis */
+ #define MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE  (1<<3)  /* ignore vertex moves if a vertex ends projected on a front face of the target */
+ #define MOD_SHRINKWRAP_CULL_TARGET_BACKFACE           (1<<4)  /* ignore vertex moves if a vertex ends projected on a back face of the target */
+ #define MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE             (1<<5)  /* distance is measure to the front face of the target */
+ #define MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS            (1<<0)
+ #define MOD_SHRINKWRAP_PROJECT_OVER_Y_AXIS            (1<<1)
+ #define MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS            (1<<2)
+ #define MOD_SHRINKWRAP_PROJECT_OVER_NORMAL                    0       /* projection over normal is used if no axis is selected */
++>>>>>>> .merge-rechts.r16222
  #endif
Simple merge
Simple merge
Simple merge
@@@ -100,10 -100,11 +100,11 @@@ char *snd_ic_names[SND_TOTNAM] = { "Vol
  char *ac_ic_names[AC_TOTNAM] = {"LocX", "LocY", "LocZ", "ScaleX", "ScaleY",
        "ScaleZ", "QuatW", "QuatX", "QuatY", "QuatZ"};
  char *ic_name_empty[1] ={ "" };
 -char *fluidsim_ic_names[FLUIDSIM_TOTNAM] = { "Fac-Visc", "Fac-Time",  "GravX","GravY","GravZ",  "VelX","VelY","VelZ", "Active"  };
 +char *fluidsim_ic_names[FLUIDSIM_TOTNAM] = { "Fac-Visc", "Fac-Time",  "GravX","GravY","GravZ",  "VelX","VelY","VelZ", "Active", "AttrForceStr", "AttrForceRad", "VelForceStr", "VelForceRad" };
  char *part_ic_names[PART_TOTNAM] = { "E_Freq", "E_Life", "E_Speed", "E_Angular", "E_Size",
  "Angular", "Size", "Drag", "Brown", "Damp", "Length", "Clump",
- "GravX", "GravY", "GravZ", "KinkAmp", "KinkFreq", "KinkShape", "BBTilt"};
+ "GravX", "GravY", "GravZ", "KinkAmp", "KinkFreq", "KinkShape", "BBTilt",
+ "FStreng", "FFall", "FMaxD", "F2Streng", "F2Fall", "F2MaxD"};
  
  /* gets the appropriate icon for the given blocktype */
  int geticon_ipo_blocktype(short blocktype)
@@@ -800,6 -821,16 +821,16 @@@ static void gp_session_initpaint (tGPsd
                        }
                }
                        break;  
 -              case SPACE_IMAGE:
++              case SPACE_SIMA:
+               {
+                       SpaceImage *sima= curarea->spacedata.first;
+                       
+                       /* set the current area */
+                       p->sa= curarea;
+                       p->v2d= &sima->v2d;
 -                      //p->ibuf= BKE_image_get_ibuf(sima->image, &sima->iuser);
++                      p->ibuf= BKE_image_get_ibuf(sima->image, &sima->iuser);
+               }
+                       break;
                /* unsupported views */
                default:
                {