code cleanup: also change BKE_blender.h BLENDER_VERSION_CHAR to 'a' so as not to confuse things.

This commit is contained in:
Campbell Barton 2013-03-05 14:47:49 +00:00
parent 6537771410
commit f2bb536994
15 changed files with 39 additions and 39 deletions

@ -50,7 +50,7 @@ extern "C" {
/* used by packaging tools */ /* used by packaging tools */
/* can be left blank, otherwise a,b,c... etc with no quotes */ /* can be left blank, otherwise a,b,c... etc with no quotes */
#define BLENDER_VERSION_CHAR #define BLENDER_VERSION_CHAR a
/* alpha/beta/rc/release, docs use this */ /* alpha/beta/rc/release, docs use this */
#define BLENDER_VERSION_CYCLE alpha #define BLENDER_VERSION_CYCLE alpha

@ -783,10 +783,8 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm )
/* goalfac= 1.0f; */ /* UNUSED */ /* goalfac= 1.0f; */ /* UNUSED */
/*
// Kicking goal factor to simplify things...who uses that anyway? // Kicking goal factor to simplify things...who uses that anyway?
// ABS ( clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal ); // ABS ( clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal );
*/
verts->goal = powf(verts->goal, 4.0f); verts->goal = powf(verts->goal, 4.0f);
if ( verts->goal >= SOFTGOALSNAP ) if ( verts->goal >= SOFTGOALSNAP )

@ -654,7 +654,7 @@ static void cloth_bvh_objcollisions_nearcheck ( ClothModifierData * clmd, Collis
{ {
int i; int i;
*collisions = (CollPair *) MEM_mallocN(sizeof(CollPair) * numresult * 64, "collision array" ); //*4 since cloth_collision_static can return more than 1 collision *collisions = (CollPair *) MEM_mallocN(sizeof(CollPair) * numresult * 64, "collision array" ); // * 4 since cloth_collision_static can return more than 1 collision
*collisions_index = *collisions; *collisions_index = *collisions;
for ( i = 0; i < numresult; i++ ) { for ( i = 0; i < numresult; i++ ) {

@ -453,8 +453,7 @@ unsigned int BLI_dir_contents(const char *dirname, struct direntry **filelist)
void BLI_free_filelist(struct direntry *filelist, unsigned int nrentries) void BLI_free_filelist(struct direntry *filelist, unsigned int nrentries)
{ {
unsigned int i; unsigned int i;
for (i = 0; i < nrentries; ++i) for (i = 0; i < nrentries; ++i) {
{
struct direntry * const entry = filelist + i; struct direntry * const entry = filelist + i;
if (entry->image) { if (entry->image) {
IMB_freeImBuf(entry->image); IMB_freeImBuf(entry->image);

@ -5309,8 +5309,9 @@ static void direct_link_scene(FileData *fd, Scene *sce)
/* link cache */ /* link cache */
direct_link_pointcache_list(fd, &rbw->ptcaches, &rbw->pointcache, FALSE); direct_link_pointcache_list(fd, &rbw->ptcaches, &rbw->pointcache, FALSE);
/* make sure simulation starts from the beginning after loading file */ /* make sure simulation starts from the beginning after loading file */
if (rbw->pointcache) if (rbw->pointcache) {
rbw->ltime = rbw->pointcache->startframe; rbw->ltime = (float)rbw->pointcache->startframe;
}
} }
} }
@ -8721,7 +8722,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
} }
else if (main->versionfile < 266 || (main->versionfile == 266 && main->subversionfile < 1)) { else if (main->versionfile < 266 || (main->versionfile == 266 && main->subversionfile < 1)) {
/* texture use alpha was removed for 2.66 but added back again for 2.66a, /* texture use alpha was removed for 2.66 but added back again for 2.66a,
* for compatibility all textures assumed it to be enabled */ * for compatibility all textures assumed it to be enabled */
Tex *tex; Tex *tex;
for (tex = main->tex.first; tex; tex = tex->id.next) for (tex = main->tex.first; tex; tex = tex->id.next)

@ -2575,7 +2575,7 @@ static void write_libraries(WriteData *wd, Main *main)
/* to be able to restore quit.blend and temp saves, the packed blend has to be in undo buffers... */ /* to be able to restore quit.blend and temp saves, the packed blend has to be in undo buffers... */
/* XXX needs rethink, just like save UI in undo files now - would be nice to append things only for the] /* XXX needs rethink, just like save UI in undo files now - would be nice to append things only for the]
quit.blend and temp saves */ * quit.blend and temp saves */
if (foundone) { if (foundone) {
writestruct(wd, ID_LI, "Library", 1, main->curlib); writestruct(wd, ID_LI, "Library", 1, main->curlib);

@ -116,11 +116,11 @@ int bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space)
DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA); DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA);
DAG_id_tag_update(&par->id, OB_RECALC_OB); DAG_id_tag_update(&par->id, OB_RECALC_OB);
/** done once after import /** done once after import */
#if 0
DAG_relations_tag_update(bmain); DAG_relations_tag_update(bmain);
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
*/ #endif
return true; return true;
} }
@ -299,15 +299,17 @@ int bc_get_active_UVLayer(Object *ob)
return CustomData_get_active_layer_index(&me->fdata, CD_MTFACE); return CustomData_get_active_layer_index(&me->fdata, CD_MTFACE);
} }
std::string bc_url_encode(std::string data) { std::string bc_url_encode(std::string data)
{
/* XXX We probably do not need to do a full encoding. /* XXX We probably do not need to do a full encoding.
But in case that is necessary,then it can be added here. * But in case that is necessary,then it can be added here.
*/ */
return bc_replace_string(data,"#", "%23"); return bc_replace_string(data,"#", "%23");
} }
std::string bc_replace_string(std::string data, const std::string& pattern, std::string bc_replace_string(std::string data, const std::string& pattern,
const std::string& replacement) { const std::string& replacement)
{
size_t pos = 0; size_t pos = 0;
while((pos = data.find(pattern, pos)) != std::string::npos) { while((pos = data.find(pattern, pos)) != std::string::npos) {
data.replace(pos, pattern.length(), replacement); data.replace(pos, pattern.length(), replacement);
@ -317,15 +319,15 @@ std::string bc_replace_string(std::string data, const std::string& pattern,
} }
/** /**
Calculate a rescale factor such that the imported scene's scale * Calculate a rescale factor such that the imported scene's scale
is preserved. I.e. 1 meter in the import will also be * is preserved. I.e. 1 meter in the import will also be
1 meter in the current scene. * 1 meter in the current scene.
XXX : I am not sure if it is correct to map 1 Blender Unit * XXX : I am not sure if it is correct to map 1 Blender Unit
to 1 Meter for unit type NONE. But it looks reasonable to me. * to 1 Meter for unit type NONE. But it looks reasonable to me.
*/ */
void bc_match_scale(std::vector<Object *> *objects_done, void bc_match_scale(std::vector<Object *> *objects_done,
Scene &sce, Scene &sce,
UnitConverter &bc_unit) { UnitConverter &bc_unit) {
Object *ob = NULL; Object *ob = NULL;

@ -431,7 +431,7 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
/* show alpha in this case */ /* show alpha in this case */
if (tex == NULL || (tex->flag & TEX_PRV_ALPHA)) { if (tex == NULL || (tex->flag & TEX_PRV_ALPHA)) {
if (!(tex && tex->type == TEX_IMAGE && (tex->imaflag & (TEX_USEALPHA|TEX_CALCALPHA)) == 0)) { if (!(tex && tex->type == TEX_IMAGE && (tex->imaflag & (TEX_USEALPHA | TEX_CALCALPHA)) == 0)) {
mat->mtex[0]->mapto |= MAP_ALPHA; mat->mtex[0]->mapto |= MAP_ALPHA;
mat->alpha = 0.0f; mat->alpha = 0.0f;
} }

@ -822,10 +822,10 @@ static int ffmpeg_decode_video_frame(struct anim *anim)
if (rval == AVERROR_EOF) { if (rval == AVERROR_EOF) {
/* this sets size and data fields to zero, /* this sets size and data fields to zero,
which is necessary to decode the remaining data * which is necessary to decode the remaining data
in the decoder engine after EOF. It also prevents a memory * in the decoder engine after EOF. It also prevents a memory
leak, since av_read_frame spills out a full size packet even * leak, since av_read_frame spills out a full size packet even
on EOF... (and: it's save to call on NULL packets) */ * on EOF... (and: it's save to call on NULL packets) */
av_free_packet(&anim->next_packet); av_free_packet(&anim->next_packet);

@ -141,7 +141,7 @@ static int imb_save_dpx_cineon(ImBuf *ibuf, const char *filename, int use_cineon
if (ibuf->rect_float != 0 && bitspersample != 8) { if (ibuf->rect_float != 0 && bitspersample != 8) {
/* don't use the float buffer to save 8 bpp picture to prevent color banding /* don't use the float buffer to save 8 bpp picture to prevent color banding
(there's no dithering algorithm behing the logImageSetDataRGBA function) */ * (there's no dithering algorithm behing the logImageSetDataRGBA function) */
fbuf = (float *)MEM_mallocN(ibuf->x * ibuf->y * 4 * sizeof(float), "fbuf in imb_save_dpx_cineon"); fbuf = (float *)MEM_mallocN(ibuf->x * ibuf->y * 4 * sizeof(float), "fbuf in imb_save_dpx_cineon");

@ -374,7 +374,7 @@ int logImageGetDataRGBA(LogImageFile *logImage, float *data, int dataIsLinearRGB
LogImageElement mergedElement; LogImageElement mergedElement;
/* Determine the depth of the picture and if there's a separate alpha element. /* Determine the depth of the picture and if there's a separate alpha element.
If the element is supported, load it into an unsigned ints array. */ * If the element is supported, load it into an unsigned ints array. */
memset(&elementData, 0, 8 * sizeof(float *)); memset(&elementData, 0, 8 * sizeof(float *));
hasAlpha = 0; hasAlpha = 0;

@ -517,7 +517,7 @@ void IMB_rectblend(struct ImBuf *dbuf, struct ImBuf *sbuf, int destx,
dr = drect; dr = drect;
sr = srect; sr = srect;
for (x = width; x > 0; x--, dr++, sr++) { for (x = width; x > 0; x--, dr++, sr++) {
if(*sr & IB_ALPHA_MASK) if (*sr & IB_ALPHA_MASK)
func((char *)dr, (char *)dr, (char *)sr, ((char *)sr)[3]); func((char *)dr, (char *)dr, (char *)sr, ((char *)sr)[3]);
} }

@ -622,7 +622,7 @@ static int get_next_bake_face(BakeShade *bs)
continue; continue;
if (*origindex >= me->totpoly) { if (*origindex >= me->totpoly) {
/* Small hack for Array modifier, which gives false /* Small hack for Array modifier, which gives false
original indices - z0r */ * original indices - z0r */
continue; continue;
} }
#if 0 #if 0

@ -3484,9 +3484,9 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset)
if (need_origindex) { if (need_origindex) {
/* Find original index of mpoly for this tessface. Options: /* Find original index of mpoly for this tessface. Options:
- Modified mesh; two-step look up from tessface -> modified mpoly -> original mpoly * - Modified mesh; two-step look up from tessface -> modified mpoly -> original mpoly
- OR Tesselated mesh; look up from tessface -> mpoly * - OR Tesselated mesh; look up from tessface -> mpoly
- OR Failsafe; tessface == mpoly. Could probably assert(false) in this case? */ * - OR Failsafe; tessface == mpoly. Could probably assert(false) in this case? */
int *origindex; int *origindex;
origindex = RE_vlakren_get_origindex(obr, vlr, 1); origindex = RE_vlakren_get_origindex(obr, vlr, 1);
if (index_mf_to_mpoly && index_mp_to_orig) if (index_mf_to_mpoly && index_mp_to_orig)

@ -2742,11 +2742,11 @@ PyObject *KX_GameObject::PyGetReactionForce()
// only can get the velocity if we have a physics object connected to us... // only can get the velocity if we have a physics object connected to us...
// XXX - Currently not working with bullet intergration, see KX_BulletPhysicsController.cpp's getReactionForce // XXX - Currently not working with bullet intergration, see KX_BulletPhysicsController.cpp's getReactionForce
/* #if 0
if (GetPhysicsController()) if (GetPhysicsController())
return PyObjectFrom(GetPhysicsController()->getReactionForce()); return PyObjectFrom(GetPhysicsController()->getReactionForce());
return PyObjectFrom(dummy_point); return PyObjectFrom(dummy_point);
*/ #endif
return Py_BuildValue("fff", 0.0, 0.0, 0.0); return Py_BuildValue("fff", 0.0, 0.0, 0.0);