forked from bartvdbraak/blender
code cleanup: also change BKE_blender.h BLENDER_VERSION_CHAR to 'a' so as not to confuse things.
This commit is contained in:
parent
6537771410
commit
f2bb536994
@ -50,7 +50,7 @@ extern "C" {
|
||||
|
||||
/* used by packaging tools */
|
||||
/* 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 */
|
||||
#define BLENDER_VERSION_CYCLE alpha
|
||||
|
||||
|
@ -783,10 +783,8 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm )
|
||||
|
||||
/* goalfac= 1.0f; */ /* UNUSED */
|
||||
|
||||
/*
|
||||
// Kicking goal factor to simplify things...who uses that anyway?
|
||||
// ABS ( clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal );
|
||||
*/
|
||||
|
||||
verts->goal = powf(verts->goal, 4.0f);
|
||||
if ( verts->goal >= SOFTGOALSNAP )
|
||||
|
@ -654,7 +654,7 @@ static void cloth_bvh_objcollisions_nearcheck ( ClothModifierData * clmd, Collis
|
||||
{
|
||||
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;
|
||||
|
||||
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)
|
||||
{
|
||||
unsigned int i;
|
||||
for (i = 0; i < nrentries; ++i)
|
||||
{
|
||||
for (i = 0; i < nrentries; ++i) {
|
||||
struct direntry * const entry = filelist + i;
|
||||
if (entry->image) {
|
||||
IMB_freeImBuf(entry->image);
|
||||
|
@ -5309,8 +5309,9 @@ static void direct_link_scene(FileData *fd, Scene *sce)
|
||||
/* link cache */
|
||||
direct_link_pointcache_list(fd, &rbw->ptcaches, &rbw->pointcache, FALSE);
|
||||
/* make sure simulation starts from the beginning after loading file */
|
||||
if (rbw->pointcache)
|
||||
rbw->ltime = rbw->pointcache->startframe;
|
||||
if (rbw->pointcache) {
|
||||
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)) {
|
||||
/* 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;
|
||||
|
||||
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... */
|
||||
/* 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) {
|
||||
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(&par->id, OB_RECALC_OB);
|
||||
|
||||
/** done once after import
|
||||
/** done once after import */
|
||||
#if 0
|
||||
DAG_relations_tag_update(bmain);
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -299,15 +299,17 @@ int bc_get_active_UVLayer(Object *ob)
|
||||
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.
|
||||
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");
|
||||
}
|
||||
|
||||
std::string bc_replace_string(std::string data, const std::string& pattern,
|
||||
const std::string& replacement) {
|
||||
const std::string& replacement)
|
||||
{
|
||||
size_t pos = 0;
|
||||
while((pos = data.find(pattern, pos)) != std::string::npos) {
|
||||
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
|
||||
is preserved. I.e. 1 meter in the import will also be
|
||||
1 meter in the current scene.
|
||||
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.
|
||||
*/
|
||||
* Calculate a rescale factor such that the imported scene's scale
|
||||
* is preserved. I.e. 1 meter in the import will also be
|
||||
* 1 meter in the current scene.
|
||||
* 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.
|
||||
*/
|
||||
void bc_match_scale(std::vector<Object *> *objects_done,
|
||||
Scene &sce,
|
||||
UnitConverter &bc_unit) {
|
||||
Scene &sce,
|
||||
UnitConverter &bc_unit) {
|
||||
|
||||
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 */
|
||||
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->alpha = 0.0f;
|
||||
}
|
||||
|
@ -822,10 +822,10 @@ static int ffmpeg_decode_video_frame(struct anim *anim)
|
||||
|
||||
if (rval == AVERROR_EOF) {
|
||||
/* this sets size and data fields to zero,
|
||||
which is necessary to decode the remaining data
|
||||
in the decoder engine after EOF. It also prevents a memory
|
||||
leak, since av_read_frame spills out a full size packet even
|
||||
on EOF... (and: it's save to call on NULL packets) */
|
||||
* which is necessary to decode the remaining data
|
||||
* in the decoder engine after EOF. It also prevents a memory
|
||||
* leak, since av_read_frame spills out a full size packet even
|
||||
* on EOF... (and: it's save to call on NULL packets) */
|
||||
|
||||
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) {
|
||||
/* 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");
|
||||
|
||||
|
@ -374,7 +374,7 @@ int logImageGetDataRGBA(LogImageFile *logImage, float *data, int dataIsLinearRGB
|
||||
LogImageElement mergedElement;
|
||||
|
||||
/* 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 *));
|
||||
hasAlpha = 0;
|
||||
|
||||
|
@ -517,7 +517,7 @@ void IMB_rectblend(struct ImBuf *dbuf, struct ImBuf *sbuf, int destx,
|
||||
dr = drect;
|
||||
sr = srect;
|
||||
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]);
|
||||
}
|
||||
|
||||
|
@ -622,7 +622,7 @@ static int get_next_bake_face(BakeShade *bs)
|
||||
continue;
|
||||
if (*origindex >= me->totpoly) {
|
||||
/* Small hack for Array modifier, which gives false
|
||||
original indices - z0r */
|
||||
* original indices - z0r */
|
||||
continue;
|
||||
}
|
||||
#if 0
|
||||
|
@ -3484,9 +3484,9 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset)
|
||||
|
||||
if (need_origindex) {
|
||||
/* Find original index of mpoly for this tessface. Options:
|
||||
- Modified mesh; two-step look up from tessface -> modified mpoly -> original mpoly
|
||||
- OR Tesselated mesh; look up from tessface -> mpoly
|
||||
- OR Failsafe; tessface == mpoly. Could probably assert(false) in this case? */
|
||||
* - Modified mesh; two-step look up from tessface -> modified mpoly -> original mpoly
|
||||
* - OR Tesselated mesh; look up from tessface -> mpoly
|
||||
* - OR Failsafe; tessface == mpoly. Could probably assert(false) in this case? */
|
||||
int *origindex;
|
||||
origindex = RE_vlakren_get_origindex(obr, vlr, 1);
|
||||
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...
|
||||
|
||||
// XXX - Currently not working with bullet intergration, see KX_BulletPhysicsController.cpp's getReactionForce
|
||||
/*
|
||||
#if 0
|
||||
if (GetPhysicsController())
|
||||
return PyObjectFrom(GetPhysicsController()->getReactionForce());
|
||||
return PyObjectFrom(dummy_point);
|
||||
*/
|
||||
#endif
|
||||
|
||||
return Py_BuildValue("fff", 0.0, 0.0, 0.0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user