diff options
-rw-r--r-- | source/blender/blenkernel/depsgraph_private.h | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/depsgraph.c | 16 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/modifier.c | 18 | ||||
-rw-r--r-- | source/blender/python/api2_2x/BezTriple.c | 1 | ||||
-rw-r--r-- | source/blender/src/drawdeps.c | 2 | ||||
-rw-r--r-- | source/blender/src/drawtext.c | 2 | ||||
-rw-r--r-- | source/blender/src/editface.c | 2 | ||||
-rw-r--r-- | source/blender/src/interface.c | 5 | ||||
-rw-r--r-- | source/blender/src/interface_draw.c | 3 | ||||
-rw-r--r-- | source/blender/src/renderwin.c | 4 |
10 files changed, 36 insertions, 21 deletions
diff --git a/source/blender/blenkernel/depsgraph_private.h b/source/blender/blenkernel/depsgraph_private.h index 6b29de2d5b4..527b78bcbe3 100644 --- a/source/blender/blenkernel/depsgraph_private.h +++ b/source/blender/blenkernel/depsgraph_private.h @@ -35,8 +35,8 @@ #include "BKE_constraint.h" -#define DEPSX 5.0 -#define DEPSY 1.8 +#define DEPSX 5.0f +#define DEPSY 1.8f #define DAGQUEUEALLOC 50 diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 58d72b89394..f23a30fba7f 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -670,7 +670,7 @@ void graph_bfs(void) if((itA->node->color == DAG_WHITE) ) { itA->node->color = DAG_GRAY; itA->node->BFS_dist = node->BFS_dist + 1; - itA->node->k = minheight; + itA->node->k = (float) minheight; push_queue(nqueue,itA->node); } @@ -683,11 +683,11 @@ void graph_bfs(void) } if (pos[node->BFS_dist] > node->k ) { pos[node->BFS_dist] += 1; - node->k = pos[node->BFS_dist]; + node->k = (float) pos[node->BFS_dist]; } else { - pos[node->BFS_dist] = node->k +1; + pos[node->BFS_dist] = (int) node->k +1; } - set_node_xy(node, DEPSX*2*node->BFS_dist, pos[node->BFS_dist]*DEPSY*2); + set_node_xy(node, node->BFS_dist*DEPSX*2, pos[node->BFS_dist]*DEPSY*2); node->color = DAG_BLACK; /* fprintf(stderr,"BFS node : %20s %i %5.0f %5.0f\n",((ID *) node->ob)->name,node->BFS_dist, node->x, node->y); @@ -820,7 +820,7 @@ DagNodeQueue * graph_dfs(void) time++; itA->node->DFS_dist = node->DFS_dist + 1; - itA->node->k = minheight; + itA->node->k = (float) minheight; push_stack(nqueue,itA->node); skip = 1; break; @@ -860,11 +860,11 @@ DagNodeQueue * graph_dfs(void) maxpos = node->DFS_dist; if (pos[node->DFS_dist] > node->k ) { pos[node->DFS_dist] += 1; - node->k = pos[node->DFS_dist]; + node->k = (float) pos[node->DFS_dist]; } else { - pos[node->DFS_dist] = node->k +1; + pos[node->DFS_dist] = (int) node->k +1; } - set_node_xy(node, DEPSX*2*node->DFS_dist, pos[node->DFS_dist]*DEPSY*2); + set_node_xy(node, node->DFS_dist*DEPSX*2, pos[node->DFS_dist]*DEPSY*2); /* fprintf(stderr,"DFS node : %20s %i %i %i %i\n",((ID *) node->ob)->name,node->BFS_dist, node->DFS_dist, node->DFS_dvtm, node->DFS_fntm ); diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index f5fe534c0b3..f8769dd6ece 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -726,6 +726,14 @@ static void decimateModifier_initData(ModifierData *md) dmd->percent = 1.0; } +static void decimateModifier_copyData(ModifierData *md, ModifierData *target) +{ + DecimateModifierData *dmd = (DecimateModifierData*) md; + DecimateModifierData *tdmd = (DecimateModifierData*) target; + + tdmd->percent = dmd->percent; +} + static void *decimateModifier_applyModifier(ModifierData *md, Object *ob, void *derivedData, float (*vertexCos)[3], int useRenderParams, int isFinalCalc) { DecimateModifierData *dmd = (DecimateModifierData*) md; @@ -1109,6 +1117,14 @@ static void softbodyModifier_deformVerts(ModifierData *md, Object *ob, void *der /* Boolean */ +static void booleanModifier_copyData(ModifierData *md, ModifierData *target) +{ + BooleanModifierData *bmd = (BooleanModifierData*) md; + BooleanModifierData *tbmd = (BooleanModifierData*) target; + + tbmd->object = bmd->object; +} + static int booleanModifier_isDisabled(ModifierData *md) { BooleanModifierData *bmd = (BooleanModifierData*) md; @@ -1223,6 +1239,7 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type) mti->type = eModifierTypeType_Nonconstructive; mti->flags = eModifierTypeFlag_AcceptsMesh; mti->initData = decimateModifier_initData; + mti->copyData = decimateModifier_copyData; mti->applyModifier = decimateModifier_applyModifier; mti = INIT_TYPE(Wave); @@ -1264,6 +1281,7 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type) mti = INIT_TYPE(Boolean); mti->type = eModifierTypeType_Nonconstructive; mti->flags = eModifierTypeFlag_AcceptsMesh; + mti->copyData = booleanModifier_copyData; mti->isDisabled = booleanModifier_isDisabled; mti->applyModifier = booleanModifier_applyModifier; mti->foreachObjectLink = booleanModifier_foreachObjectLink; diff --git a/source/blender/python/api2_2x/BezTriple.c b/source/blender/python/api2_2x/BezTriple.c index 13280c9e8c5..46ea67728d6 100644 --- a/source/blender/python/api2_2x/BezTriple.c +++ b/source/blender/python/api2_2x/BezTriple.c @@ -460,7 +460,6 @@ PyObject *newBezTriple( PyObject *args) return EXPP_ReturnPyObjError( PyExc_AttributeError, "wrong number of points"); { - int i; if (length == 9) status = PyArg_ParseTuple( args, "fffffffff", &numbuf[0], diff --git a/source/blender/src/drawdeps.c b/source/blender/src/drawdeps.c index 5942173bda4..d948f31009b 100644 --- a/source/blender/src/drawdeps.c +++ b/source/blender/src/drawdeps.c @@ -152,7 +152,7 @@ static void draw_deps(DagNode *node) glRectf(x1, y1, x2, y2); v1[0]= x1; - v1[1]= (y1+y2)/2 -0.3; + v1[1]= (y1+y2)/2 -0.3f; sprintf(str, " %s", ((ID *) node->ob)->name+2); calc_oopstext(str, v1); diff --git a/source/blender/src/drawtext.c b/source/blender/src/drawtext.c index 4de5cf5a048..f726b87ad71 100644 --- a/source/blender/src/drawtext.c +++ b/source/blender/src/drawtext.c @@ -747,7 +747,7 @@ static void calc_text_rcts(SpaceText *st) CLAMP(st->txtbar.ymax, 2, curarea->winy-2); st->pix_per_line= (float) ltexth/curarea->winy; - if (st->pix_per_line<.1) st->pix_per_line=.1; + if (st->pix_per_line<.1) st->pix_per_line=.1f; lbarstart= MIN2(txt_get_span(st->text->lines.first, st->text->curl), txt_get_span(st->text->lines.first, st->text->sell)); diff --git a/source/blender/src/editface.c b/source/blender/src/editface.c index 0871505f2ea..1a9e4b9ac21 100644 --- a/source/blender/src/editface.c +++ b/source/blender/src/editface.c @@ -955,7 +955,7 @@ int face_pick(Mesh *me, short x, short y, unsigned int *index) } /* Convert the color back to a face index */ *index = framebuffer_to_index(col); - if (col==0 || (*index)<=0 || (*index)>me->totface) + if (col==0 || (*index)<=0 || (*index)>(unsigned) me->totface) return 0; (*index)--; diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c index 7327398c099..78b94c42564 100644 --- a/source/blender/src/interface.c +++ b/source/blender/src/interface.c @@ -85,6 +85,7 @@ #include "BIF_mywindow.h" #include "BIF_space.h" #include "BIF_glutil.h" +#include "BIF_editfont.h" #include "BIF_interface.h" #include "BIF_butspace.h" @@ -2698,9 +2699,7 @@ static int ui_do_but_CHARTAB(uiBut *but) float sx, sy, ex, ey; float width, height; float butw, buth; - int x, y; - unsigned long cs; - unsigned long che; + int x, y, cs, che; /* Check the position */ uiGetMouse(mywinget(), mval); diff --git a/source/blender/src/interface_draw.c b/source/blender/src/interface_draw.c index d4be70f8759..84f200a490d 100644 --- a/source/blender/src/interface_draw.c +++ b/source/blender/src/interface_draw.c @@ -1713,8 +1713,7 @@ static void ui_draw_but_CHARTAB(uiBut *but) float sx, sy, ex, ey; float width, height; float butw, buth; - int x, y; - unsigned long cs; + int x, y, cs; wchar_t wstr[2]; unsigned char ustr[16]; PackedFile *pf; diff --git a/source/blender/src/renderwin.c b/source/blender/src/renderwin.c index 95ff209fc90..46e59e8aacb 100644 --- a/source/blender/src/renderwin.c +++ b/source/blender/src/renderwin.c @@ -248,8 +248,8 @@ static void renderwin_reset_view(RenderWin *rw) /* crop option makes image smaller */ if ((G.scene->r.mode & R_BORDER) && (G.scene->r.mode & R_MOVIECROP)) { if(!(G.scene->r.scemode & R_OGL)) { - rectx*= (G.scene->r.border.xmax-G.scene->r.border.xmin); - recty*= (G.scene->r.border.ymax-G.scene->r.border.ymin); + rectx= (int) (rectx*(G.scene->r.border.xmax-G.scene->r.border.xmin)); + recty= (int) (recty*(G.scene->r.border.ymax-G.scene->r.border.ymin)); } } |