[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21980] branches/soc-2009-yukishiro/source : clean up code
Jingyuan Huang
jingyuan.huang at gmail.com
Tue Jul 28 19:46:59 CEST 2009
Revision: 21980
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21980
Author: yukishiro
Date: 2009-07-28 19:46:59 +0200 (Tue, 28 Jul 2009)
Log Message:
-----------
clean up code
Modified Paths:
--------------
branches/soc-2009-yukishiro/source/blender/blenkernel/BKE_global.h
branches/soc-2009-yukishiro/source/blender/blenkernel/BKE_node.h
branches/soc-2009-yukishiro/source/blender/blenkernel/intern/cdderivedmesh.c
branches/soc-2009-yukishiro/source/blender/blenkernel/intern/node.c
branches/soc-2009-yukishiro/source/blender/editors/include/ED_sculpt.h
branches/soc-2009-yukishiro/source/blender/editors/sculpt_paint/paint_vertex.c
branches/soc-2009-yukishiro/source/blender/editors/space_buttons/buttons_header.c
branches/soc-2009-yukishiro/source/blender/editors/space_node/node_draw.c
branches/soc-2009-yukishiro/source/blender/editors/space_node/node_edit.c
branches/soc-2009-yukishiro/source/blender/editors/space_node/node_header.c
branches/soc-2009-yukishiro/source/blender/editors/space_view3d/view3d_header.c
branches/soc-2009-yukishiro/source/blender/makesdna/DNA_customdata_types.h
branches/soc-2009-yukishiro/source/blender/makesdna/DNA_scene_types.h
branches/soc-2009-yukishiro/source/blender/makesdna/DNA_space_types.h
branches/soc-2009-yukishiro/source/blender/makesdna/DNA_view3d_types.h
branches/soc-2009-yukishiro/source/blender/makesdna/DNA_windowmanager_types.h
branches/soc-2009-yukishiro/source/blender/makesdna/DNA_world_types.h
branches/soc-2009-yukishiro/source/blender/makesrna/intern/makesrna.c
branches/soc-2009-yukishiro/source/blender/render/intern/source/pipeline.c
branches/soc-2009-yukishiro/source/blender/render/intern/source/rendercore.c
branches/soc-2009-yukishiro/source/blender/windowmanager/WM_types.h
branches/soc-2009-yukishiro/source/gameengine/Expressions/PyObjectPlus.h
Modified: branches/soc-2009-yukishiro/source/blender/blenkernel/BKE_global.h
===================================================================
--- branches/soc-2009-yukishiro/source/blender/blenkernel/BKE_global.h 2009-07-28 17:23:45 UTC (rev 21979)
+++ branches/soc-2009-yukishiro/source/blender/blenkernel/BKE_global.h 2009-07-28 17:46:59 UTC (rev 21980)
@@ -64,7 +64,7 @@
short afbreek, moving;
short background;
short winpos, displaymode; /* used to be in Render */
- short rendering; /* to indicate render is busy, prevent renderwindow events etc */
+ short rendering; /* to indicate render is busy, prevent renderwindow events etc */
short rt;
int f;
@@ -112,19 +112,19 @@
/* also uses G_FILE_AUTOPLAY */
#define G_RENDER_SHADOW (1 << 3)
#define G_BACKBUFSEL (1 << 4)
-#define G_PICKSEL (1 << 5)
+#define G_PICKSEL (1 << 5)
#define G_FACESELECT (1 << 8)
#define G_VERTEXPAINT (1 << 10)
-#define G_DEBUG (1 << 12)
+#define G_DEBUG (1 << 12)
#define G_DOSCRIPTLINKS (1 << 13)
-#define G_WEIGHTPAINT (1 << 15)
+#define G_WEIGHTPAINT (1 << 15)
#define G_TEXTUREPAINT (1 << 16)
/* #define G_NOFROZEN (1 << 17) also removed */
-#define G_GREASEPENCIL (1 << 17)
+#define G_GREASEPENCIL (1 << 17)
#define G_LIGHTPAINT (1 << 19) // 18 is used, no?
#define G_SCULPTMODE (1 << 29)
@@ -140,28 +140,28 @@
/* G.fileflags */
-#define G_AUTOPACK (1 << 0)
-#define G_FILE_COMPRESS (1 << 1)
-#define G_FILE_AUTOPLAY (1 << 2)
-#define G_FILE_ENABLE_ALL_FRAMES (1 << 3)
-#define G_FILE_SHOW_DEBUG_PROPS (1 << 4)
-#define G_FILE_SHOW_FRAMERATE (1 << 5)
-#define G_FILE_SHOW_PROFILE (1 << 6)
-#define G_FILE_LOCK (1 << 7)
-#define G_FILE_SIGN (1 << 8)
-#define G_FIle_PUBLISH (1 << 9)
-#define G_FILE_NO_UI (1 << 10)
-#define G_FILE_GAME_TO_IPO (1 << 11)
-#define G_FILE_GAME_MAT (1 << 12)
-#define G_FILE_DISPLAY_LISTS (1 << 13)
-#define G_FILE_SHOW_PHYSICS (1 << 14)
-#define G_FILE_GAME_MAT_GLSL (1 << 15)
-#define G_FILE_GLSL_NO_LIGHTS (1 << 16)
-#define G_FILE_GLSL_NO_SHADERS (1 << 17)
-#define G_FILE_GLSL_NO_SHADOWS (1 << 18)
-#define G_FILE_GLSL_NO_RAMPS (1 << 19)
-#define G_FILE_GLSL_NO_NODES (1 << 20)
-#define G_FILE_GLSL_NO_EXTRA_TEX (1 << 21)
+#define G_AUTOPACK (1 << 0)
+#define G_FILE_COMPRESS (1 << 1)
+#define G_FILE_AUTOPLAY (1 << 2)
+#define G_FILE_ENABLE_ALL_FRAMES (1 << 3)
+#define G_FILE_SHOW_DEBUG_PROPS (1 << 4)
+#define G_FILE_SHOW_FRAMERATE (1 << 5)
+#define G_FILE_SHOW_PROFILE (1 << 6)
+#define G_FILE_LOCK (1 << 7)
+#define G_FILE_SIGN (1 << 8)
+#define G_FIle_PUBLISH (1 << 9)
+#define G_FILE_NO_UI (1 << 10)
+#define G_FILE_GAME_TO_IPO (1 << 11)
+#define G_FILE_GAME_MAT (1 << 12)
+#define G_FILE_DISPLAY_LISTS (1 << 13)
+#define G_FILE_SHOW_PHYSICS (1 << 14)
+#define G_FILE_GAME_MAT_GLSL (1 << 15)
+#define G_FILE_GLSL_NO_LIGHTS (1 << 16)
+#define G_FILE_GLSL_NO_SHADERS (1 << 17)
+#define G_FILE_GLSL_NO_SHADOWS (1 << 18)
+#define G_FILE_GLSL_NO_RAMPS (1 << 19)
+#define G_FILE_GLSL_NO_NODES (1 << 20)
+#define G_FILE_GLSL_NO_EXTRA_TEX (1 << 21)
#define G_FILE_IGNORE_DEPRECATION_WARNINGS (1 << 22)
/* G.windowstate */
@@ -176,9 +176,9 @@
extern short ENDIAN_ORDER;
/* G.moving, signals drawing in (3d) window to denote transform */
-#define G_TRANSFORM_OBJ 1
-#define G_TRANSFORM_EDIT 2
-#define G_TRANSFORM_MANIP 4
+#define G_TRANSFORM_OBJ 1
+#define G_TRANSFORM_EDIT 2
+#define G_TRANSFORM_MANIP 4
#define G_TRANSFORM_PARTICLE 8
/* G.special1 */
@@ -189,7 +189,7 @@
#ifdef __cplusplus
}
#endif
-
+
#endif
Modified: branches/soc-2009-yukishiro/source/blender/blenkernel/BKE_node.h
===================================================================
--- branches/soc-2009-yukishiro/source/blender/blenkernel/BKE_node.h 2009-07-28 17:23:45 UTC (rev 21979)
+++ branches/soc-2009-yukishiro/source/blender/blenkernel/BKE_node.h 2009-07-28 17:46:59 UTC (rev 21980)
@@ -435,6 +435,5 @@
void init_nodesystem(void);
void free_nodesystem(void);
-extern struct ListBase node_all_light;
#endif
Modified: branches/soc-2009-yukishiro/source/blender/blenkernel/intern/cdderivedmesh.c
===================================================================
--- branches/soc-2009-yukishiro/source/blender/blenkernel/intern/cdderivedmesh.c 2009-07-28 17:23:45 UTC (rev 21979)
+++ branches/soc-2009-yukishiro/source/blender/blenkernel/intern/cdderivedmesh.c 2009-07-28 17:46:59 UTC (rev 21980)
@@ -484,7 +484,7 @@
MFace *mf = cddm->mface;
MCol *mc;
float *nors= dm->getFaceDataArray(dm, CD_NORMAL);
- int i, orig, *index=0;
+ int i, orig, *index = 0;
if (!(G.f & G_LIGHTPAINT)) index = DM_get_face_data_layer(dm, CD_ORIGINDEX);
@@ -721,10 +721,11 @@
glEnd();
}
-static void cdDM_foreachMappedVert(DerivedMesh *dm,
- void (*func)(void *userData, int index, float *co,
- float *no_f, short *no_s),
- void *userData)
+static void cdDM_foreachMappedVert(
+ DerivedMesh *dm,
+ void (*func)(void *userData, int index, float *co,
+ float *no_f, short *no_s),
+ void *userData)
{
MVert *mv = CDDM_get_verts(dm);
int i, orig, *index = DM_get_vert_data_layer(dm, CD_ORIGINDEX);
@@ -740,10 +741,11 @@
}
}
-static void cdDM_foreachMappedEdge(DerivedMesh *dm,
- void (*func)(void *userData, int index,
- float *v0co, float *v1co),
- void *userData)
+static void cdDM_foreachMappedEdge(
+ DerivedMesh *dm,
+ void (*func)(void *userData, int index,
+ float *v0co, float *v1co),
+ void *userData)
{
CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
MVert *mv = cddm->mvert;
@@ -761,10 +763,11 @@
}
}
-static void cdDM_foreachMappedFaceCenter(DerivedMesh *dm,
- void (*func)(void *userData, int index,
- float *cent, float *no),
- void *userData)
+static void cdDM_foreachMappedFaceCenter(
+ DerivedMesh *dm,
+ void (*func)(void *userData, int index,
+ float *cent, float *no),
+ void *userData)
{
CDDerivedMesh *cddm = (CDDerivedMesh*)dm;
MVert *mv = cddm->mvert;
Modified: branches/soc-2009-yukishiro/source/blender/blenkernel/intern/node.c
===================================================================
--- branches/soc-2009-yukishiro/source/blender/blenkernel/intern/node.c 2009-07-28 17:23:45 UTC (rev 21979)
+++ branches/soc-2009-yukishiro/source/blender/blenkernel/intern/node.c 2009-07-28 17:46:59 UTC (rev 21980)
@@ -1058,9 +1058,9 @@
/* this helps RNA identify ID pointers as nodetree */
if(ntree->type==NTREE_SHADER)
- BLI_strncpy(ntree->id.name, "NTShader Nodetree", sizeof(ntree->id.name));
+ BLI_strncpy(ntree->id.name, "NTShader Nodetree", sizeof(ntree->id.name));
else if(ntree->type==NTREE_COMPOSIT)
- BLI_strncpy(ntree->id.name, "NTComposit Nodetree", sizeof(ntree->id.name));
+ BLI_strncpy(ntree->id.name, "NTComposit Nodetree", sizeof(ntree->id.name));
else if(ntree->type==NTREE_TEXTURE)
BLI_strncpy(ntree->id.name, "NTTexture Nodetree", sizeof(ntree->id.name));
Modified: branches/soc-2009-yukishiro/source/blender/editors/include/ED_sculpt.h
===================================================================
--- branches/soc-2009-yukishiro/source/blender/editors/include/ED_sculpt.h 2009-07-28 17:23:45 UTC (rev 21979)
+++ branches/soc-2009-yukishiro/source/blender/editors/include/ED_sculpt.h 2009-07-28 17:46:59 UTC (rev 21980)
@@ -42,8 +42,4 @@
void undo_imagepaint_step(int step);
void undo_imagepaint_clear(void);
-/* paint_light.c */
-void undo_lightpaint_step(struct bContext *C, int step);
-void undo_lightpaint_clear(void);
-
#endif
Modified: branches/soc-2009-yukishiro/source/blender/editors/sculpt_paint/paint_vertex.c
===================================================================
--- branches/soc-2009-yukishiro/source/blender/editors/sculpt_paint/paint_vertex.c 2009-07-28 17:23:45 UTC (rev 21979)
+++ branches/soc-2009-yukishiro/source/blender/editors/sculpt_paint/paint_vertex.c 2009-07-28 17:46:59 UTC (rev 21980)
@@ -28,7 +28,15 @@
*/
#include <math.h>
+#include <string.h>
+#ifdef WIN32
+#include <io.h>
+#else
+#include <unistd.h>
+#endif
+
+
#include "MEM_guardedalloc.h"
#include "IMB_imbuf.h"
@@ -71,6 +79,9 @@
#include "BKE_object.h"
#include "BKE_utildefines.h"
+#include "WM_api.h"
+#include "WM_types.h"
+
#include "BIF_gl.h"
#include "BIF_glutil.h"
@@ -80,20 +91,18 @@
#include "ED_util.h"
#include "ED_view3d.h"
-#include "WM_api.h"
-#include "WM_types.h"
-
#include "paint_intern.h"
-/* vp->mode */
-#define VP_MIX 0
-#define VP_ADD 1
-#define VP_SUB 2
-#define VP_MUL 3
-#define VP_BLUR 4
+ /* vp->mode */
+#define VP_MIX 0
+#define VP_ADD 1
+#define VP_SUB 2
+#define VP_MUL 3
+#define VP_BLUR 4
#define VP_LIGHTEN 5
#define VP_DARKEN 6
+#define MAXINDEX 512000
/* XXX */
static void error() {}
@@ -178,7 +187,7 @@
static VPaint *new_vpaint(int wpaint)
{
- VPaint *vp= MEM_callocN(sizeof(VPaint), "Vertex/Weight VPaint");
+ VPaint *vp= MEM_callocN(sizeof(VPaint), "VPaint");
vp->gamma= vp->mul= 1.0f;
Modified: branches/soc-2009-yukishiro/source/blender/editors/space_buttons/buttons_header.c
===================================================================
--- branches/soc-2009-yukishiro/source/blender/editors/space_buttons/buttons_header.c 2009-07-28 17:23:45 UTC (rev 21979)
+++ branches/soc-2009-yukishiro/source/blender/editors/space_buttons/buttons_header.c 2009-07-28 17:46:59 UTC (rev 21980)
@@ -106,7 +106,7 @@
uiBlockBeginAlign(block);
if(sbuts->pathflag & (1<<BCONTEXT_SCENE))
- uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_SCENE, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_SCENE, 0, 0, "Scene");
+ uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_SCENE, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_SCENE, 0, 0, "Scene");
if(sbuts->pathflag & (1<<BCONTEXT_WORLD))
uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_WORLD, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_WORLD, 0, 0, "World");
if(sbuts->pathflag & (1<<BCONTEXT_LIGHTENV))
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list