style cleanup

This commit is contained in:
Campbell Barton 2013-03-18 11:44:56 +00:00
parent b19155e76c
commit 655ed9cc7f
28 changed files with 64 additions and 64 deletions

@ -165,7 +165,7 @@ extern "C" {
void MEM_printmemlist(void);
/** calls the function on all allocated memory blocks. */
void MEM_callbackmemlist(void (*func)(void*));
void MEM_callbackmemlist(void (*func)(void *));
/** Print statistics about memory usage */
void MEM_printmemlist_stats(void);

@ -170,7 +170,7 @@ bool Armature::popQ(CacheTS timestamp)
{
if (m_qCCh >= 0) {
double* item;
item = (double*)m_cache->getPreviousCacheItem(this, m_qCCh, &timestamp);
item = (double *)m_cache->getPreviousCacheItem(this, m_qCCh, &timestamp);
if (item && m_qCTs != timestamp) {
double* q = m_qKdl(0);
memcpy(q, item, m_qKdl.rows()*sizeof(double));
@ -698,8 +698,8 @@ void Armature::updateControlOutput(const Timestamp& timestamp)
JointConstraint_struct* pConstraint = *it;
unsigned int nr, i;
for (i=0, nr = pConstraint->segment->second.q_nr; i<pConstraint->v_nr; i++, nr++) {
*(double*)&pConstraint->value[i].y = m_qKdl[nr];
*(double*)&pConstraint->value[i].ydot = m_qdotKdl[nr];
*(double *)&pConstraint->value[i].y = m_qKdl[nr];
*(double *)&pConstraint->value[i].ydot = m_qdotKdl[nr];
}
if (pConstraint->function && (pConstraint->substep || (!timestamp.reiterate && !timestamp.substep))) {
(*pConstraint->function)(timestamp, pConstraint->values, pConstraint->v_nr, pConstraint->param);

@ -1288,14 +1288,14 @@ void pbvh_bmesh_print(PBVH *bvh)
fprintf(stderr, "bm_face_to_node:\n");
GHASH_ITER (gh_iter, bvh->bm_face_to_node) {
fprintf(stderr, " %d -> %d\n",
BM_elem_index_get((BMFace*)BLI_ghashIterator_getKey(&gh_iter)),
BM_elem_index_get((BMFace *)BLI_ghashIterator_getKey(&gh_iter)),
GET_INT_FROM_POINTER(BLI_ghashIterator_getValue(&gh_iter)));
}
fprintf(stderr, "bm_vert_to_node:\n");
GHASH_ITER (gh_iter, bvh->bm_vert_to_node) {
fprintf(stderr, " %d -> %d\n",
BM_elem_index_get((BMVert*)BLI_ghashIterator_getKey(&gh_iter)),
BM_elem_index_get((BMVert *)BLI_ghashIterator_getKey(&gh_iter)),
GET_INT_FROM_POINTER(BLI_ghashIterator_getValue(&gh_iter)));
}
@ -1307,15 +1307,15 @@ void pbvh_bmesh_print(PBVH *bvh)
fprintf(stderr, "node %d\n faces:\n", n);
GHASH_ITER (gh_iter, node->bm_faces)
fprintf(stderr, " %d\n",
BM_elem_index_get((BMFace*)BLI_ghashIterator_getKey(&gh_iter)));
BM_elem_index_get((BMFace *)BLI_ghashIterator_getKey(&gh_iter)));
fprintf(stderr, " unique verts:\n");
GHASH_ITER (gh_iter, node->bm_unique_verts)
fprintf(stderr, " %d\n",
BM_elem_index_get((BMVert*)BLI_ghashIterator_getKey(&gh_iter)));
BM_elem_index_get((BMVert *)BLI_ghashIterator_getKey(&gh_iter)));
fprintf(stderr, " other verts:\n");
GHASH_ITER (gh_iter, node->bm_other_verts)
fprintf(stderr, " %d\n",
BM_elem_index_get((BMVert*)BLI_ghashIterator_getKey(&gh_iter)));
BM_elem_index_get((BMVert *)BLI_ghashIterator_getKey(&gh_iter)));
}
}

@ -756,7 +756,7 @@ void BM_mesh_remap(BMesh *bm, int *vert_idx, int *edge_idx, int *face_idx)
BM_ITER_MESH (ed, &iter, bm, BM_EDGES_OF_MESH) {
if (vptr_map) {
/* printf("Edge v1: %p -> %p\n", ed->v1, BLI_ghash_lookup(vptr_map, (const void *)ed->v1));*/
/* printf("Edge v2: %p -> %p\n", ed->v2, BLI_ghash_lookup(vptr_map, (const void* )ed->v2));*/
/* printf("Edge v2: %p -> %p\n", ed->v2, BLI_ghash_lookup(vptr_map, (const void *)ed->v2));*/
ed->v1 = BLI_ghash_lookup(vptr_map, (const void *)ed->v1);
ed->v2 = BLI_ghash_lookup(vptr_map, (const void *)ed->v2);
}

@ -1087,7 +1087,7 @@ void BM_face_legal_splits(BMesh *bm, BMFace *f, BMLoop *(*loops)[2], int len)
* Small utility functions for fast access
*
* faster alternative to:
* BM_iter_as_array(bm, BM_VERTS_OF_FACE, f, (void**)v, 3);
* BM_iter_as_array(bm, BM_VERTS_OF_FACE, f, (void **)v, 3);
*/
void BM_face_as_array_vert_tri(BMFace *f, BMVert *r_verts[3])
{
@ -1102,7 +1102,7 @@ void BM_face_as_array_vert_tri(BMFace *f, BMVert *r_verts[3])
/**
* faster alternative to:
* BM_iter_as_array(bm, BM_VERTS_OF_FACE, f, (void**)v, 4);
* BM_iter_as_array(bm, BM_VERTS_OF_FACE, f, (void **)v, 4);
*/
void BM_face_as_array_vert_quad(BMFace *f, BMVert *r_verts[4])
{

@ -184,7 +184,7 @@ void AnimationExporter::make_anim_frames_from_targets(Object *ob, std::vector<fl
ListBase *conlist = get_active_constraints(ob);
if (conlist == NULL) return;
bConstraint *con;
for (con = (bConstraint*)conlist->first; con; con = con->next) {
for (con = (bConstraint *)conlist->first; con; con = con->next) {
ListBase targets = {NULL, NULL};
bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con);
@ -200,7 +200,7 @@ void AnimationExporter::make_anim_frames_from_targets(Object *ob, std::vector<fl
*/
cti->get_constraint_targets(con, &targets);
if (cti) {
for (ct = (bConstraintTarget*)targets.first; ct; ct = ct->next) {
for (ct = (bConstraintTarget *)targets.first; ct; ct = ct->next) {
obtar = ct->tar;
find_frames(obtar, frames);
}
@ -544,7 +544,7 @@ void AnimationExporter::dae_baked_object_animation(std::vector<float> &fra, Obje
if (!fra.size())
return;
BLI_snprintf(anim_id, sizeof(anim_id), "%s_%s", (char*)translate_id(ob_name).c_str(),
BLI_snprintf(anim_id, sizeof(anim_id), "%s_%s", (char *)translate_id(ob_name).c_str(),
"object_matrix");
openAnimation(anim_id, COLLADABU::Utils::EMPTY_STRING);
@ -1535,7 +1535,7 @@ void AnimationExporter::calc_ob_mat_at_time(Object *ob, float ctime , float mat[
{
ListBase *conlist = get_active_constraints(ob);
bConstraint *con;
for (con = (bConstraint*)conlist->first; con; con = con->next) {
for (con = (bConstraint *)conlist->first; con; con = con->next) {
ListBase targets = {NULL, NULL};
bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con);
@ -1544,7 +1544,7 @@ void AnimationExporter::calc_ob_mat_at_time(Object *ob, float ctime , float mat[
bConstraintTarget *ct;
Object *obtar;
cti->get_constraint_targets(con, &targets);
for (ct = (bConstraintTarget*)targets.first; ct; ct = ct->next) {
for (ct = (bConstraintTarget *)targets.first; ct; ct = ct->next) {
obtar = ct->tar;
BKE_animsys_evaluate_animdata(scene, &obtar->id, obtar->adt, ctime, ADT_RECALC_ANIM);
BKE_object_where_is_calc_time(scene, obtar, ctime);

@ -674,7 +674,7 @@ void ArmatureImporter::make_shape_keys()
if (source_ob) {
Mesh *source_me = (Mesh*) source_ob->data;
Mesh *source_me = (Mesh *)source_ob->data;
//insert key to source mesh
Key *key = source_me->key = BKE_key_add((ID *)source_me);
key->type = KEY_RELATIVE;

@ -352,7 +352,7 @@ std::string ControllerExporter::add_morph_targets(Key *key, Object *ob)
source.prepareToAppendValues();
KeyBlock * kb = (KeyBlock*)key->block.first;
KeyBlock *kb = (KeyBlock *)key->block.first;
//skip the basis
kb = kb->next;
for (; kb; kb = kb->next) {
@ -381,7 +381,7 @@ std::string ControllerExporter::add_morph_weights(Key *key, Object *ob)
source.prepareToAppendValues();
KeyBlock * kb = (KeyBlock*)key->block.first;
KeyBlock *kb = (KeyBlock *)key->block.first;
//skip the basis
kb = kb->next;
for (; kb; kb = kb->next) {
@ -399,7 +399,7 @@ void ControllerExporter::add_weight_extras(Key *key)
// can also try the base element and param alternative
COLLADASW::BaseExtraTechnique extra;
KeyBlock * kb = (KeyBlock*)key->block.first;
KeyBlock * kb = (KeyBlock *)key->block.first;
//skip the basis
kb = kb->next;
for (; kb; kb = kb->next) {

@ -155,7 +155,7 @@ void GeometryExporter::operator()(Object *ob)
if (this->export_settings->include_shapekeys) {
Key * key = BKE_key_from_object(ob);
if (key) {
KeyBlock * kb = (KeyBlock*)key->block.first;
KeyBlock * kb = (KeyBlock *)key->block.first;
//skip the basis
kb = kb->next;
for (; kb; kb = kb->next) {

@ -190,7 +190,7 @@ void SceneExporter::writeNodes(Object *ob, Scene *sce)
}
if (ob->constraints.first != NULL ) {
bConstraint *con = (bConstraint*) ob->constraints.first;
bConstraint *con = (bConstraint *) ob->constraints.first;
while (con) {
std::string con_name(id_name(con));
std::string con_tag = con_name + "_constraint";
@ -216,7 +216,7 @@ void SceneExporter::writeNodes(Object *ob, Scene *sce)
cti->get_constraint_targets(con, &targets);
if (cti) {
for (ct = (bConstraintTarget*)targets.first; ct; ct = ct->next) {
for (ct = (bConstraintTarget *)targets.first; ct; ct = ct->next) {
obtar = ct->tar;
std::string tar_id(id_name(obtar));
colladaNode.addExtraTechniqueChildParameter("blender",con_tag,"target_id",tar_id);

@ -614,8 +614,8 @@ void PAINT_OT_image_paint(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING;
RNA_def_enum(ot->srna, "mode", stroke_mode_items, BRUSH_STROKE_NORMAL,
"Paint Stroke Mode",
"Action taken when a paint stroke is made");
"Paint Stroke Mode",
"Action taken when a paint stroke is made");
RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", "");
}

@ -1129,7 +1129,7 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
if (snode->nodetree) {
bNode *node;
/* void** highlights = 0; */ /* UNUSED */
/* void **highlights = 0; */ /* UNUSED */
node_uiblocks_init(C, snode->nodetree);

@ -2247,7 +2247,7 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (*func)(void *), boo
/* Setting these temporarily is not nice */
v3d->flag &= ~V3D_SELECT_OUTLINE;
U.glalphaclip = alphaoverride ? 0.5 : glalphaclip; /* not that nice but means we wont zoom into billboards */
U.glalphaclip = alphaoverride ? 0.5f : glalphaclip; /* not that nice but means we wont zoom into billboards */
U.obcenter_dia = 0;
setwinmatrixview3d(ar, v3d, NULL);

@ -104,7 +104,7 @@ typedef struct IDProperty {
/* 2 characters for ID code and 64 for actual name */
#define MAX_ID_NAME 66
/* There's a nasty circular dependency here.... void* to the rescue! I
/* There's a nasty circular dependency here.... 'void *' to the rescue! I
* really wonder why this is needed. */
typedef struct ID {
void *next, *prev;

@ -341,7 +341,7 @@ static StructRNA *rna_NodeSocket_refine(PointerRNA *ptr)
#define SUBTYPE(socktype, stypename, id, idname) \
{ \
bNodeSocketValue##stypename * value = (bNodeSocketValue##stypename *)sock->default_value; \
bNodeSocketValue##stypename *value = (bNodeSocketValue##stypename *)sock->default_value; \
if (value->subtype == PROP_##id) \
return &RNA_NodeSocket##stypename##idname; \
}

@ -295,8 +295,8 @@ static OSStatus AudioConverterInputCallback(AudioConverterRef inAudioConverter,
qtexport->audioTotalExportedFrames += *ioNumberDataPackets;
AUD_readDevice(qtexport->audioInputDevice, (UInt8*)qtexport->audioInputBuffer,
qtexport->audioInputFormat.mFramesPerPacket * *ioNumberDataPackets);
AUD_readDevice(qtexport->audioInputDevice, (UInt8 *)qtexport->audioInputBuffer,
qtexport->audioInputFormat.mFramesPerPacket * *ioNumberDataPackets);
ioData->mBuffers[0].mDataByteSize = qtexport->audioInputFormat.mBytesPerPacket * *ioNumberDataPackets;
ioData->mBuffers[0].mData = qtexport->audioInputBuffer;
@ -357,7 +357,7 @@ int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, R
tmpnam(name);
strcat(name, extension);
outputFileURL = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault,(UInt8*) name, strlen(name), false);
outputFileURL = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault,(UInt8 *)name, strlen(name), false);
if (outputFileURL) {

@ -103,12 +103,12 @@ int RE_rayobjectcontrol_test_break(RayObjectControl *c);
#define RE_rayobject_isVlakPrimitive(o) ((((intptr_t)o)&3) == 3)
/* used to align a given ray object */
#define RE_rayobject_align(o) ((RayObject*)(((intptr_t)o)&(~3)))
#define RE_rayobject_align(o) ((RayObject *)(((intptr_t)o)&(~3)))
/* used to unalign a given ray object */
#define RE_rayobject_unalignRayFace(o) ((RayObject*)(((intptr_t)o)|1))
#define RE_rayobject_unalignRayAPI(o) ((RayObject*)(((intptr_t)o)|2))
#define RE_rayobject_unalignVlakPrimitive(o) ((RayObject*)(((intptr_t)o)|3))
#define RE_rayobject_unalignRayFace(o) ((RayObject *)(((intptr_t)o)|1))
#define RE_rayobject_unalignRayAPI(o) ((RayObject *)(((intptr_t)o)|2))
#define RE_rayobject_unalignVlakPrimitive(o) ((RayObject *)(((intptr_t)o)|3))
/*
* This rayobject represents a generic object. With it's own callbacks for raytrace operations.

@ -1484,7 +1484,7 @@ static void tag_scenes_for_render(Render *re)
if (node->id) {
if (!MAIN_VERSION_ATLEAST(re->main, 265, 5)) {
if (rlayer_node_uses_alpha(re->scene->nodetree, node)) {
Scene *scene = (Scene*) node->id;
Scene *scene = (Scene *)node->id;
if (scene->r.alphamode != R_ALPHAPREMUL) {
BKE_reportf(re->reports, RPT_WARNING, "Setting scene %s alpha mode to Premul", scene->id.name + 2);

@ -938,7 +938,7 @@ HaloRen *RE_findOrAddHalo(ObjectRen *obr, int nr)
// TABLEINITSIZE, obr->blohalen+TABLEINITSIZE );
temp=obr->bloha;
obr->bloha = (HaloRen**)MEM_callocN(sizeof(void *) * (obr->blohalen + TABLEINITSIZE), "Bloha");
obr->bloha = (HaloRen **)MEM_callocN(sizeof(void *) * (obr->blohalen + TABLEINITSIZE), "Bloha");
if (temp) memcpy(obr->bloha, temp, obr->blohalen*sizeof(void *));
memset(&(obr->bloha[obr->blohalen]), 0, TABLEINITSIZE * sizeof(void *));
obr->blohalen+=TABLEINITSIZE; /*Does this really need to be power of 2?*/

@ -497,8 +497,8 @@ void WM_operator_properties_free(struct PointerRNA *ptr) {}
void WM_operator_properties_create(struct PointerRNA *ptr, const char *opstring) {}
void WM_operator_properties_create_ptr(struct PointerRNA *ptr, struct wmOperatorType *ot) {}
void WM_operator_properties_sanitize(struct PointerRNA *ptr, const short no_context) {};
void WM_operatortype_append_ptr(void (*opfunc)(struct wmOperatorType*, void*), void *userdata) {}
void WM_operatortype_append_macro_ptr(void (*opfunc)(struct wmOperatorType*, void*), void *userdata) {}
void WM_operatortype_append_ptr(void (*opfunc)(struct wmOperatorType*, void *), void *userdata) {}
void WM_operatortype_append_macro_ptr(void (*opfunc)(struct wmOperatorType*, void *), void *userdata) {}
void WM_operator_bl_idname(char *to, const char *from) {}
void WM_operator_py_idname(char *to, const char *from) {}
void WM_operator_ui_popup(struct bContext *C, struct wmOperator *op, int width, int height) {}

@ -130,10 +130,10 @@ void BL_ArmatureConstraint::ReParent(BL_ArmatureObject* armature)
m_constraint = NULL;
m_posechannel = NULL;
// and locate the constraint
for (pchan = (bPoseChannel*)newpose->chanbase.first; pchan; pchan=(bPoseChannel*)pchan->next) {
for (pchan = (bPoseChannel*)newpose->chanbase.first; pchan; pchan = (bPoseChannel*)pchan->next) {
if (!strcmp(pchan->name, posechannel)) {
// now locate the constraint
for (pcon = (bConstraint*)pchan->constraints.first; pcon; pcon=(bConstraint*)pcon->next) {
for (pcon = (bConstraint *)pchan->constraints.first; pcon; pcon = (bConstraint *)pcon->next) {
if (!strcmp(pcon->name, constraint)) {
m_constraint = pcon;
m_posechannel = pchan;

@ -100,14 +100,14 @@ void game_copy_pose(bPose **dst, bPose *src, int copy_constraint)
/* remap pointers */
ghash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "game_copy_pose gh");
pchan= (bPoseChannel*)src->chanbase.first;
outpchan= (bPoseChannel*)out->chanbase.first;
pchan= (bPoseChannel *)src->chanbase.first;
outpchan= (bPoseChannel *)out->chanbase.first;
for (; pchan; pchan=pchan->next, outpchan=outpchan->next)
BLI_ghash_insert(ghash, pchan, outpchan);
for (pchan = (bPoseChannel*)out->chanbase.first; pchan; pchan = pchan->next) {
pchan->parent= (bPoseChannel*)BLI_ghash_lookup(ghash, pchan->parent);
pchan->child= (bPoseChannel*)BLI_ghash_lookup(ghash, pchan->child);
for (pchan = (bPoseChannel *)out->chanbase.first; pchan; pchan = pchan->next) {
pchan->parent= (bPoseChannel *)BLI_ghash_lookup(ghash, pchan->parent);
pchan->child= (bPoseChannel *)BLI_ghash_lookup(ghash, pchan->child);
if (copy_constraint) {
ListBase listb;
@ -158,8 +158,8 @@ void game_blend_poses(bPose *dst, bPose *src, float srcweight/*, short mode*/)
dstweight = 1.0F;
}
schan= (bPoseChannel*)src->chanbase.first;
for (dchan = (bPoseChannel*)dst->chanbase.first; dchan; dchan=(bPoseChannel*)dchan->next, schan= (bPoseChannel*)schan->next) {
schan= (bPoseChannel *)src->chanbase.first;
for (dchan = (bPoseChannel *)dst->chanbase.first; dchan; dchan=(bPoseChannel *)dchan->next, schan= (bPoseChannel *)schan->next) {
// always blend on all channels since we don't know which one has been set
/* quat interpolation done separate */
if (schan->rotmode == ROT_MODE_QUAT) {
@ -376,7 +376,7 @@ void BL_ArmatureObject::LoadChannels()
BL_ArmatureChannel* proxy;
m_channelNumber = 0;
for (pchan = (bPoseChannel*)m_pose->chanbase.first; pchan; pchan=(bPoseChannel*)pchan->next) {
for (pchan = (bPoseChannel *)m_pose->chanbase.first; pchan; pchan=(bPoseChannel *)pchan->next) {
proxy = new BL_ArmatureChannel(this, pchan);
m_poseChannels.AddBack(proxy);
m_channelNumber++;

@ -2140,7 +2140,7 @@ static void UNUSED_FUNCTION(RBJconstraints)(Object *ob)//not used
conlist = get_active_constraints2(ob);
if (conlist) {
for (curcon = (bConstraint *)conlist->first; curcon; curcon=(bConstraint *)curcon->next) {
for (curcon = (bConstraint *)conlist->first; curcon; curcon = (bConstraint *)curcon->next) {
printf("%i\n",curcon->type);
}
@ -2785,7 +2785,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
continue;
if (conlist) {
for (curcon = (bConstraint *)conlist->first; curcon; curcon=(bConstraint *)curcon->next) {
for (curcon = (bConstraint *)conlist->first; curcon; curcon = (bConstraint *)curcon->next) {
if (curcon->type==CONSTRAINT_TYPE_RIGIDBODYJOINT) {
bRigidBodyJointConstraint *dat=(bRigidBodyJointConstraint *)curcon->data;

@ -94,7 +94,7 @@ bool BL_DeformableGameObject::GetShape(vector<float> &shape)
if (key && key->type==KEY_RELATIVE)
{
KeyBlock *kb;
for (kb = (KeyBlock*)key->block.first; kb; kb = (KeyBlock*)kb->next)
for (kb = (KeyBlock *)key->block.first; kb; kb = (KeyBlock *)kb->next)
{
shape.push_back(kb->curval);
}

@ -176,9 +176,9 @@ void BL_ShapeActionActuator::BlendShape(Key* key, float srcweight)
dstweight = 1.0F - srcweight;
for (it=m_blendshape.begin(), kb = (KeyBlock*)key->block.first;
for (it=m_blendshape.begin(), kb = (KeyBlock *)key->block.first;
kb && it != m_blendshape.end();
kb = (KeyBlock*)kb->next, it++)
kb = (KeyBlock *)kb->next, it++)
{
kb->curval = kb->curval * dstweight + (*it) * srcweight;
}
@ -439,7 +439,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
KeyBlock *kb;
// We go through and clear out the keyblocks so there isn't any interference
// from other shape actions
for (kb=(KeyBlock*)key->block.first; kb; kb=(KeyBlock*)kb->next)
for (kb=(KeyBlock *)key->block.first; kb; kb=(KeyBlock *)kb->next)
kb->curval = 0.f;
animsys_evaluate_action(m_idptr, m_action, NULL, m_localtime);

@ -239,7 +239,7 @@ bool BL_Action::Play(const char* name,
// Now that we have the previous blend shape saved, we can clear out the key to avoid any
// further interference.
KeyBlock *kb;
for (kb=(KeyBlock*)shape_deformer->GetKey()->block.first; kb; kb=(KeyBlock*)kb->next)
for (kb=(KeyBlock *)shape_deformer->GetKey()->block.first; kb; kb=(KeyBlock *)kb->next)
kb->curval = 0.f;
}
}
@ -358,9 +358,9 @@ void BL_Action::BlendShape(Key* key, float srcweight, std::vector<float>& blends
dstweight = 1.0F - srcweight;
//printf("Dst: %f\tSrc: %f\n", srcweight, dstweight);
for (it=blendshape.begin(), kb = (KeyBlock*)key->block.first;
for (it=blendshape.begin(), kb = (KeyBlock *)key->block.first;
kb && it != blendshape.end();
kb = (KeyBlock*)kb->next, it++)
kb = (KeyBlock *)kb->next, it++)
{
//printf("OirgKeys: %f\t%f\n", kb->curval, (*it));
kb->curval = kb->curval * dstweight + (*it) * srcweight;
@ -478,7 +478,7 @@ void BL_Action::Update(float curtime)
// We go through and clear out the keyblocks so there isn't any interference
// from other shape actions
KeyBlock *kb;
for (kb=(KeyBlock*)key->block.first; kb; kb=(KeyBlock*)kb->next)
for (kb=(KeyBlock *)key->block.first; kb; kb=(KeyBlock *)kb->next)
kb->curval = 0.f;
// Now blend the shape

@ -80,7 +80,7 @@ void KX_ArmatureSensor::FindConstraint()
for (pchan = (bPoseChannel*)pose->chanbase.first; pchan; pchan=(bPoseChannel*)pchan->next) {
if (!strcmp(pchan->name, m_posechannel)) {
// now locate the constraint
for (pcon = (bConstraint*)pchan->constraints.first; pcon; pcon=(bConstraint*)pcon->next) {
for (pcon = (bConstraint *)pchan->constraints.first; pcon; pcon = (bConstraint *)pcon->next) {
if (!strcmp(pcon->name, m_constraintname)) {
if (pcon->flag & CONSTRAINT_DISABLE)
/* this constraint is not valid, can't use it */

@ -115,7 +115,7 @@ RAS_MeshObject::RAS_MeshObject(Mesh* mesh)
int count=0;
// initialize weight cache for shape objects
// count how many keys in this mesh
for (kb= (KeyBlock*)m_mesh->key->block.first; kb; kb= (KeyBlock*)kb->next)
for (kb= (KeyBlock *)m_mesh->key->block.first; kb; kb= (KeyBlock *)kb->next)
count++;
m_cacheWeightIndex.resize(count,-1);
}
@ -129,7 +129,7 @@ RAS_MeshObject::~RAS_MeshObject()
{
KeyBlock *kb;
// remove the weight cache to avoid memory leak
for (kb= (KeyBlock*)m_mesh->key->block.first; kb; kb= (KeyBlock*)kb->next) {
for (kb = (KeyBlock *)m_mesh->key->block.first; kb; kb = (KeyBlock *)kb->next) {
if (kb->weights)
MEM_freeN(kb->weights);
kb->weights= NULL;