update to trunk r14104
blenderbuttons is good and it compiles
This commit is contained in:
commit
8787ad14a2
@ -4,9 +4,9 @@ LIBDIR = '${LCGDIR}'
|
||||
# enable ffmpeg support
|
||||
WITH_BF_FFMPEG = 'true' # -DWITH_FFMPEG
|
||||
BF_FFMPEG = LIBDIR +'/ffmpeg'
|
||||
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
|
||||
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB = 'avformat.a avcodec.a avutil.a'
|
||||
BF_FFMPEG_INC = '#extern/ffmpeg/include'
|
||||
#BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
#BF_FFMPEG_LIB = 'avformat.a avcodec.a avutil.a'
|
||||
|
||||
WITH_BF_VERSE = 'false'
|
||||
BF_VERSE = "#extern/verse/dist"
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 66 KiB |
@ -35,19 +35,23 @@
|
||||
#define BKE_CLOTH_H
|
||||
|
||||
#include "float.h"
|
||||
#include "BLI_editVert.h"
|
||||
#include "BLI_linklist.h"
|
||||
|
||||
#include "BKE_collision.h"
|
||||
#include "BLI_linklist.h"
|
||||
#include "BKE_customdata.h"
|
||||
#include "BKE_DerivedMesh.h"
|
||||
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_arithb.h"
|
||||
#include "BLI_edgehash.h"
|
||||
|
||||
#include "DNA_cloth_types.h"
|
||||
#include "DNA_customdata_types.h"
|
||||
#include "DNA_meshdata_types.h"
|
||||
#include "DNA_modifier_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
|
||||
#include "BKE_collision.h"
|
||||
|
||||
struct Object;
|
||||
struct Cloth;
|
||||
struct MFace;
|
||||
|
@ -28,52 +28,22 @@
|
||||
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
/* types */
|
||||
#include "DNA_curve_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_object_force.h"
|
||||
#include "BKE_cloth.h"
|
||||
|
||||
#include "DNA_cloth_types.h"
|
||||
#include "DNA_key_types.h"
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_meshdata_types.h"
|
||||
#include "DNA_lattice_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
#include "DNA_modifier_types.h"
|
||||
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_arithb.h"
|
||||
#include "BLI_editVert.h"
|
||||
#include "BLI_edgehash.h"
|
||||
#include "BLI_linklist.h"
|
||||
|
||||
#include "BKE_curve.h"
|
||||
#include "BKE_deform.h"
|
||||
#include "BKE_DerivedMesh.h"
|
||||
#include "BKE_cdderivedmesh.h"
|
||||
#include "BKE_displist.h"
|
||||
#include "BKE_effect.h"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_key.h"
|
||||
#include "BKE_mesh.h"
|
||||
#include "BKE_object.h"
|
||||
#include "BKE_cloth.h"
|
||||
#include "BKE_modifier.h"
|
||||
#include "BKE_utildefines.h"
|
||||
#include "BKE_DerivedMesh.h"
|
||||
#include "BIF_editdeform.h"
|
||||
#include "BIF_editkey.h"
|
||||
#include "DNA_screen_types.h"
|
||||
#include "BSE_headerbuttons.h"
|
||||
#include "BIF_screen.h"
|
||||
#include "BIF_space.h"
|
||||
#include "mydevice.h"
|
||||
|
||||
#include "BKE_pointcache.h"
|
||||
|
||||
@ -287,97 +257,6 @@ void bvh_update_from_cloth(ClothModifierData *clmd, int moving)
|
||||
bvh_update(bvh, moving);
|
||||
}
|
||||
|
||||
DerivedMesh *CDDM_create_tearing ( ClothModifierData *clmd, DerivedMesh *dm )
|
||||
{
|
||||
DerivedMesh *result = NULL;
|
||||
unsigned int i = 0, a = 0, j=0;
|
||||
int numverts = dm->getNumVerts ( dm );
|
||||
int numfaces = dm->getNumFaces ( dm );
|
||||
|
||||
MVert *mvert = CDDM_get_verts ( dm );
|
||||
MFace *mface = CDDM_get_faces ( dm );
|
||||
|
||||
MVert *mvert2;
|
||||
MFace *mface2;
|
||||
EdgeHash *edgehash = NULL;
|
||||
Cloth *cloth = clmd->clothObject;
|
||||
ClothSpring *springs = (ClothSpring *)cloth->springs;
|
||||
unsigned int numsprings = cloth->numsprings;
|
||||
|
||||
// create spring tearing hash
|
||||
edgehash = BLI_edgehash_new();
|
||||
|
||||
for ( i = 0; i < numsprings; i++ )
|
||||
{
|
||||
if ( ( springs[i].flags & CLOTH_SPRING_FLAG_DEACTIVATE )
|
||||
&& ( !BLI_edgehash_haskey ( edgehash, springs[i].ij, springs[i].kl ) ) )
|
||||
{
|
||||
BLI_edgehash_insert ( edgehash, springs[i].ij, springs[i].kl, NULL );
|
||||
BLI_edgehash_insert ( edgehash, springs[i].kl, springs[i].ij, NULL );
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
||||
// printf("found %d tears\n", j);
|
||||
|
||||
result = CDDM_from_template ( dm, numverts, 0, numfaces );
|
||||
|
||||
if ( !result )
|
||||
return NULL;
|
||||
|
||||
// do verts
|
||||
mvert2 = CDDM_get_verts ( result );
|
||||
for ( a=0; a<numverts; a++ )
|
||||
{
|
||||
MVert *inMV;
|
||||
MVert *mv = &mvert2[a];
|
||||
|
||||
inMV = &mvert[a];
|
||||
|
||||
DM_copy_vert_data ( dm, result, a, a, 1 );
|
||||
*mv = *inMV;
|
||||
}
|
||||
|
||||
|
||||
// do faces
|
||||
mface2 = CDDM_get_faces ( result );
|
||||
for ( a=0, i=0; a<numfaces; a++ )
|
||||
{
|
||||
MFace *mf = &mface2[i];
|
||||
MFace *inMF;
|
||||
inMF = &mface[a];
|
||||
|
||||
/*
|
||||
DM_copy_face_data(dm, result, a, i, 1);
|
||||
|
||||
*mf = *inMF;
|
||||
*/
|
||||
|
||||
if ( ( !BLI_edgehash_haskey ( edgehash, mface[a].v1, mface[a].v2 ) )
|
||||
&& ( !BLI_edgehash_haskey ( edgehash, mface[a].v2, mface[a].v3 ) )
|
||||
&& ( !BLI_edgehash_haskey ( edgehash, mface[a].v3, mface[a].v4 ) )
|
||||
&& ( !BLI_edgehash_haskey ( edgehash, mface[a].v4, mface[a].v1 ) ) )
|
||||
{
|
||||
mf->v1 = mface[a].v1;
|
||||
mf->v2 = mface[a].v2;
|
||||
mf->v3 = mface[a].v3;
|
||||
mf->v4 = mface[a].v4;
|
||||
|
||||
test_index_face ( mf, NULL, 0, 4 );
|
||||
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
CDDM_lower_num_faces ( result, i );
|
||||
CDDM_calc_edges ( result );
|
||||
CDDM_calc_normals ( result );
|
||||
|
||||
BLI_edgehash_free ( edgehash, NULL );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
int modifiers_indexInObject(Object *ob, ModifierData *md_seek);
|
||||
|
||||
int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr)
|
||||
|
@ -30,32 +30,17 @@
|
||||
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "MEM_guardedalloc.h"
|
||||
/* types */
|
||||
#include "DNA_curve_types.h"
|
||||
|
||||
#include "BKE_cloth.h"
|
||||
|
||||
#include "DNA_group_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_object_force.h"
|
||||
#include "DNA_cloth_types.h"
|
||||
#include "DNA_key_types.h"
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_meshdata_types.h"
|
||||
#include "DNA_lattice_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
#include "DNA_modifier_types.h"
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_arithb.h"
|
||||
#include "BLI_edgehash.h"
|
||||
#include "BLI_linklist.h"
|
||||
#include "BKE_curve.h"
|
||||
#include "BKE_deform.h"
|
||||
|
||||
#include "BKE_DerivedMesh.h"
|
||||
#include "BKE_cdderivedmesh.h"
|
||||
#include "BKE_displist.h"
|
||||
#include "BKE_effect.h"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_mesh.h"
|
||||
#include "BKE_object.h"
|
||||
@ -63,10 +48,6 @@
|
||||
#include "BKE_modifier.h"
|
||||
#include "BKE_utildefines.h"
|
||||
#include "BKE_DerivedMesh.h"
|
||||
#include "DNA_screen_types.h"
|
||||
#include "BSE_headerbuttons.h"
|
||||
#include "BIF_screen.h"
|
||||
#include "BIF_space.h"
|
||||
#include "mydevice.h"
|
||||
|
||||
#include "Bullet-C-Api.h"
|
||||
|
@ -522,6 +522,8 @@ void pdDoEffectors(ListBase *lb, float *opco, float *force, float *speed, float
|
||||
|
||||
if((pd->flag & PFIELD_USEMAX) && distance>pd->maxdist && pd->forcefield != PFIELD_GUIDE)
|
||||
; /* don't do anything */
|
||||
else if((pd->flag & PFIELD_USEMIN) && distance<pd->mindist && pd->forcefield != PFIELD_GUIDE)
|
||||
; /* don't do anything */
|
||||
else if(pd->forcefield == PFIELD_WIND) {
|
||||
VECCOPY(force_vec, ob->obmat[2]);
|
||||
|
||||
|
@ -29,38 +29,19 @@
|
||||
*
|
||||
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
*/
|
||||
#include "math.h"
|
||||
#include "float.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
/* types */
|
||||
#include "DNA_curve_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_object_force.h"
|
||||
|
||||
#include "BKE_cloth.h"
|
||||
|
||||
#include "DNA_cloth_types.h"
|
||||
#include "DNA_key_types.h"
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_modifier_types.h"
|
||||
#include "DNA_meshdata_types.h"
|
||||
#include "DNA_lattice_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
#include "DNA_modifier_types.h"
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_arithb.h"
|
||||
#include "BLI_threads.h"
|
||||
#include "BKE_curve.h"
|
||||
#include "BKE_displist.h"
|
||||
|
||||
|
||||
#include "BKE_effect.h"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_key.h"
|
||||
#include "BKE_object.h"
|
||||
#include "BKE_cloth.h"
|
||||
#include "BKE_modifier.h"
|
||||
#include "BKE_utildefines.h"
|
||||
#include "BKE_global.h"
|
||||
#include "BIF_editdeform.h"
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
@ -1446,6 +1427,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec
|
||||
VECADDS(lF[mfaces[i].v1], lF[mfaces[i].v1], wind_normalized, 1.0 / 3.0);
|
||||
}
|
||||
|
||||
speed[0] = speed[1] = speed[2] = 0.0;
|
||||
pdDoEffectors(effectors, lX[mfaces[i].v2], force, speed, (float)G.scene->r.cfra, 0.0f, PE_WIND_AS_SPEED);
|
||||
VECCOPY(wind_normalized, speed);
|
||||
Normalize(wind_normalized);
|
||||
@ -1459,6 +1441,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec
|
||||
VECADDS(lF[mfaces[i].v2], lF[mfaces[i].v2], wind_normalized, 1.0 / 3.0);
|
||||
}
|
||||
|
||||
speed[0] = speed[1] = speed[2] = 0.0;
|
||||
pdDoEffectors(effectors, lX[mfaces[i].v3], force, speed, (float)G.scene->r.cfra, 0.0f, PE_WIND_AS_SPEED);
|
||||
VECCOPY(wind_normalized, speed);
|
||||
Normalize(wind_normalized);
|
||||
@ -1472,6 +1455,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec
|
||||
VECADDS(lF[mfaces[i].v3], lF[mfaces[i].v3], wind_normalized, 1.0 / 3.0);
|
||||
}
|
||||
|
||||
speed[0] = speed[1] = speed[2] = 0.0;
|
||||
if(mfaces[i].v4)
|
||||
{
|
||||
pdDoEffectors(effectors, lX[i], force, speed, (float)G.scene->r.cfra, 0.0f, PE_WIND_AS_SPEED);
|
||||
|
@ -30,49 +30,22 @@
|
||||
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "MEM_guardedalloc.h"
|
||||
/* types */
|
||||
#include "DNA_curve_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_object_force.h"
|
||||
|
||||
#include "BKE_cloth.h"
|
||||
|
||||
#include "DNA_cloth_types.h"
|
||||
#include "DNA_key_types.h"
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_meshdata_types.h"
|
||||
#include "DNA_lattice_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
#include "DNA_modifier_types.h"
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_arithb.h"
|
||||
#include "BLI_edgehash.h"
|
||||
#include "BLI_linklist.h"
|
||||
#include "BKE_curve.h"
|
||||
|
||||
#include "BKE_deform.h"
|
||||
#include "BKE_DerivedMesh.h"
|
||||
#include "BKE_cdderivedmesh.h"
|
||||
#include "BKE_displist.h"
|
||||
#include "BKE_effect.h"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_key.h"
|
||||
#include "BKE_mesh.h"
|
||||
#include "BKE_object.h"
|
||||
#include "BKE_cloth.h"
|
||||
#include "BKE_modifier.h"
|
||||
#include "BKE_utildefines.h"
|
||||
#include "BKE_DerivedMesh.h"
|
||||
#include "BIF_editdeform.h"
|
||||
#include "BIF_editkey.h"
|
||||
#include "DNA_screen_types.h"
|
||||
#include "BSE_headerbuttons.h"
|
||||
#include "BIF_screen.h"
|
||||
#include "BIF_space.h"
|
||||
#include "mydevice.h"
|
||||
|
||||
#include "BKE_utildefines.h"
|
||||
|
||||
|
||||
#ifdef _OPENMP
|
||||
#include <omp.h>
|
||||
|
@ -7789,7 +7789,12 @@ static void expand_doit(FileData *fd, Main *mainvar, void *old)
|
||||
ptr->curlib->parent= mainvar->curlib;
|
||||
}
|
||||
else {
|
||||
//oldnewmap_insert(fd->libmap, bhead->old, id, 1);
|
||||
/* The line below was commented by Ton (I assume), when Hos did the merge from the orange branch. rev 6568
|
||||
* This line is NEEDED, the case is that you have 3 blend files...
|
||||
* user.blend, lib.blend and lib_indirect.blend - if user.blend alredy references a "tree" from
|
||||
* lib_indirect.blend but lib.blend does too, linking in a Scene or Group from lib.blend can result in an
|
||||
* empty without the dupli group referenced. Once you save and reload the group would appier. - Campbell */
|
||||
oldnewmap_insert(fd->libmap, bhead->old, id, 1);
|
||||
|
||||
change_idid_adr_fd(fd, bhead->old, id);
|
||||
if(G.f & G_DEBUG) printf("expand_doit: already linked: %s lib: %s\n", id->name, lib->name);
|
||||
|
@ -201,7 +201,7 @@ typedef struct UserDef {
|
||||
short smooth_viewtx; /* miliseconds to spend spinning the view */
|
||||
short glreslimit;
|
||||
short ndof_pan, ndof_rotate;
|
||||
// short pads[4];
|
||||
short pads[2];
|
||||
// char pad[8];
|
||||
char versemaster[160];
|
||||
char verseuser[160];
|
||||
|
@ -44,7 +44,6 @@
|
||||
|
||||
#include "DNA_armature_types.h"
|
||||
#include "DNA_camera_types.h"
|
||||
#include "DNA_cloth_types.h"
|
||||
#include "DNA_material_types.h"
|
||||
#include "DNA_curve_types.h"
|
||||
#include "DNA_effect_types.h"
|
||||
@ -67,7 +66,6 @@
|
||||
#include "BKE_anim.h"
|
||||
#include "BKE_armature.h"
|
||||
#include "BKE_action.h"
|
||||
#include "BKE_cloth.h"
|
||||
#include "BKE_curve.h"
|
||||
#include "BKE_customdata.h"
|
||||
#include "BKE_colortools.h"
|
||||
@ -5264,83 +5262,6 @@ static int load_fluidsimspeedvectors(Render *re, ObjectInstanceRen *obi, float *
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int load_clothsimspeedvectors(Render *re, ObjectInstanceRen *obi, float *vectors, int step)
|
||||
{
|
||||
ObjectRen *obr= obi->obr;
|
||||
VertRen *ver= NULL;
|
||||
float *speed, div, zco[2];
|
||||
float zmulx= re->winx/2, zmuly= re->winy/2, len;
|
||||
float winsq= re->winx*re->winy, winroot= sqrt(winsq);
|
||||
int a, j;
|
||||
float hoco[4], ho[4], csvec[4], camco[4];
|
||||
float mat[4][4], winmat[4][4];
|
||||
float imat[4][4];
|
||||
ClothModifierData *clmd = NULL;
|
||||
Cloth *cloth = NULL;
|
||||
|
||||
/* only one step needed */
|
||||
if(step) return 1;
|
||||
|
||||
Mat4CpyMat4(mat, re->viewmat);
|
||||
MTC_Mat4Invert(imat, mat);
|
||||
|
||||
/* set first vertex OK */
|
||||
clmd = (ClothModifierData *)modifiers_findByType(obr->ob, eModifierType_Cloth);
|
||||
if( !clmd || !(clmd->clothObject) ) return 0;
|
||||
|
||||
cloth = clmd->clothObject;
|
||||
|
||||
if( obr->totvert != cloth->numverts ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(obi->flag & R_TRANSFORMED)
|
||||
Mat4MulMat4(winmat, obi->mat, re->winmat);
|
||||
else
|
||||
Mat4CpyMat4(winmat, re->winmat);
|
||||
|
||||
for(a=0; a<obr->totvert; a++, vectors+=2) {
|
||||
if((a & 255)==0)
|
||||
ver= obr->vertnodes[a>>8].vert;
|
||||
else
|
||||
ver++;
|
||||
|
||||
// get cloth velocity
|
||||
csvec[3] = 0.;
|
||||
for(j=0;j<3;j++) csvec[j] = cloth->verts[a].v[j];
|
||||
|
||||
// transform (=rotate) to cam space
|
||||
camco[0]= imat[0][0]*csvec[0] + imat[0][1]*csvec[1] + imat[0][2]*csvec[2];
|
||||
camco[1]= imat[1][0]*csvec[0] + imat[1][1]*csvec[1] + imat[1][2]*csvec[2];
|
||||
camco[2]= imat[2][0]*csvec[0] + imat[2][1]*csvec[1] + imat[2][2]*csvec[2];
|
||||
|
||||
// get homogenous coordinates
|
||||
projectvert(camco, winmat, hoco);
|
||||
projectvert(ver->co, winmat, ho);
|
||||
|
||||
/* now map hocos to screenspace, uses very primitive clip still */
|
||||
// use ho[3] of original vertex, xy component of vel. direction
|
||||
if(ho[3]<0.1f) div= 10.0f;
|
||||
else div= 1.0f/ho[3];
|
||||
zco[0]= zmulx*hoco[0]*div;
|
||||
zco[1]= zmuly*hoco[1]*div;
|
||||
|
||||
// maximize speed as usual
|
||||
len= zco[0]*zco[0] + zco[1]*zco[1];
|
||||
if(len > winsq) {
|
||||
len= winroot/sqrt(len);
|
||||
zco[0]*= len; zco[1]*= len;
|
||||
}
|
||||
|
||||
speed= RE_vertren_get_winspeed(obi, ver, 1);
|
||||
// set both to the same value
|
||||
speed[0]= speed[2]= zco[0];
|
||||
speed[1]= speed[3]= zco[1];
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* makes copy per object of all vectors */
|
||||
/* result should be that we can free entire database */
|
||||
static void copy_dbase_object_vectors(Render *re, ListBase *lb)
|
||||
@ -5473,9 +5394,6 @@ void RE_Database_FromScene_Vectors(Render *re, Scene *sce)
|
||||
// NOTE/FIXME - velocities and meshes loaded unnecessarily often during the database_fromscene_vectors calls...
|
||||
load_fluidsimspeedvectors(re, obi, oldobi->vectors, step);
|
||||
}
|
||||
else if((md = modifiers_findByType(obi->ob, eModifierType_Cloth)) && (md->mode & eModifierMode_Render) ) {
|
||||
load_clothsimspeedvectors(re, obi, oldobi->vectors, step);
|
||||
}
|
||||
else {
|
||||
/* check if both have same amounts of vertices */
|
||||
if(obi->totvector==oldobi->totvector)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -194,7 +194,8 @@ void get_format_string(SpaceText *st)
|
||||
char *in_line;
|
||||
char format[2000], check[200], other[2];
|
||||
unsigned char c;
|
||||
int a, b, len, spot, letter, tabs, mem_amount;
|
||||
int spot, letter, tabs, mem_amount;
|
||||
size_t a, b, len;
|
||||
|
||||
if(!text) return;
|
||||
tmp = text->lines.first;
|
||||
@ -2149,7 +2150,8 @@ void convert_tabs (struct SpaceText *st, int tab)
|
||||
Text *text = st->text;
|
||||
TextLine *tmp;
|
||||
char *check_line, *new_line, *format;
|
||||
int a, j, extra, number; //unknown for now
|
||||
int extra, number; //unknown for now
|
||||
size_t a, j;
|
||||
|
||||
if (!text) return;
|
||||
|
||||
@ -2199,7 +2201,7 @@ void convert_tabs (struct SpaceText *st, int tab)
|
||||
extra = 0;
|
||||
for (a = 0; a < strlen(check_line); a++) {
|
||||
number = 0;
|
||||
for (j = 0; j < st->tabnumber; j++) {
|
||||
for (j = 0; j < (size_t)st->tabnumber; j++) {
|
||||
if ((a+j) <= strlen(check_line)) { //check to make sure we are not pass the end of the line
|
||||
if(check_line[a+j] != ' ') {
|
||||
number = 1;
|
||||
@ -2218,7 +2220,7 @@ void convert_tabs (struct SpaceText *st, int tab)
|
||||
extra = 0; //reuse vars
|
||||
for (a = 0; a < strlen(check_line); a++) {
|
||||
number = 0;
|
||||
for (j = 0; j < st->tabnumber; j++) {
|
||||
for (j = 0; j < (size_t)st->tabnumber; j++) {
|
||||
if ((a+j) <= strlen(check_line)) { //check to make sure we are not pass the end of the line
|
||||
if(check_line[a+j] != ' ') {
|
||||
number = 1;
|
||||
|
@ -328,7 +328,11 @@ int removedoublesflag(short flag, short automerge, float limit) /* return amoun
|
||||
if(eed->v2->f & 128) eed->v2 = eed->v2->tmp.v;
|
||||
e1= addedgelist(eed->v1, eed->v2, eed);
|
||||
|
||||
if(e1) e1->f2= 1;
|
||||
if(e1) {
|
||||
e1->f2= 1;
|
||||
if(eed->f & SELECT)
|
||||
e1->f |= SELECT;
|
||||
}
|
||||
if(e1!=eed) free_editedge(eed);
|
||||
}
|
||||
}
|
||||
@ -6438,11 +6442,11 @@ void pathselect(void)
|
||||
|
||||
pnindex = ((PathNode*)s->tmp.p)->u;
|
||||
cost[pnindex] = 0;
|
||||
BLI_heap_insert(heap, 0.0f, (void*)pnindex);
|
||||
BLI_heap_insert(heap, 0.0f, SET_INT_IN_POINTER(pnindex));
|
||||
|
||||
while( !BLI_heap_empty(heap) ){
|
||||
|
||||
pnindex = (int)BLI_heap_popmin(heap);
|
||||
pnindex = GET_INT_FROM_POINTER(BLI_heap_popmin(heap));
|
||||
currpn = &(Q[pnindex]);
|
||||
|
||||
if(currpn == (PathNode*)t->tmp.p) /*target has been reached....*/
|
||||
@ -6454,7 +6458,7 @@ void pathselect(void)
|
||||
cost[currpe->v] = cost[currpn->u] + currpe->w;
|
||||
previous[currpe->v] = currpn->u;
|
||||
Q[currpe->v].visited = 1;
|
||||
BLI_heap_insert(heap, cost[currpe->v], (void*)currpe->v);
|
||||
BLI_heap_insert(heap, cost[currpe->v], SET_INT_IN_POINTER(currpe->v));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user