Cleanup: style

This commit is contained in:
2017-04-24 21:58:28 +10:00
parent 50bfaffc6b
commit aff30aaf2d
15 changed files with 37 additions and 34 deletions

View File

@@ -978,6 +978,7 @@ void BKE_library_foreach_ID_link(Main *bmain, ID *id, LibraryIDLinkCallback call
for (bGPDlayer *gp_layer = gpencil->layers.first; gp_layer; gp_layer = gp_layer->next) {
CALLBACK_INVOKE(gp_layer->parent, IDWALK_CB_NOP);
}
break;
}
/* Nothing needed for those... */

View File

@@ -186,9 +186,10 @@ static DupliObject *make_dupli(const DupliContext *ctx,
dob->random_id = BLI_hash_string(dob->ob->id.name + 2);
if (dob->persistent_id[0] != INT_MAX) {
for(i = 0; i < MAX_DUPLI_RECUR*2; i++)
for (i = 0; i < MAX_DUPLI_RECUR * 2; i++) {
dob->random_id = BLI_hash_int_2d(dob->random_id, (unsigned int)dob->persistent_id[i]);
}
}
else {
dob->random_id = BLI_hash_int_2d(dob->random_id, 0);
}

View File

@@ -52,9 +52,9 @@ BLI_INLINE unsigned int BLI_hash_string(const char *str)
{
unsigned int i = 0, c;
while((c = *str++))
while ((c = *str++)) {
i = i * 37 + c;
}
return i;
}

View File

@@ -77,7 +77,6 @@
#include "ED_object.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "ED_screen.h"
#include "ED_space_api.h"
#include "gpencil_intern.h"

View File

@@ -1152,9 +1152,11 @@ static void surfacedeformModifier_do(ModifierData *md, float (*vertexCos)[3], un
}
/* Actual vertex location update starts here */
SDefDeformData data = {.bind_verts = smd->verts,
SDefDeformData data = {
.bind_verts = smd->verts,
.targetCos = MEM_mallocN(sizeof(float[3]) * tnumverts, "SDefTargetVertArray"),
.vertexCos = vertexCos};
.vertexCos = vertexCos,
};
if (data.targetCos != NULL) {
bool tdm_vert_alloc;

View File

@@ -48,7 +48,7 @@ static void node_shader_exec_object_info(void *data, int UNUSED(thread), bNode *
copy_v4_v4(out[0]->vec, RE_object_instance_get_matrix(scd->shi->obi, RE_OBJECT_INSTANCE_MATRIX_OB)[3]);
out[1]->vec[0] = RE_object_instance_get_object_pass_index(scd->shi->obi);
out[2]->vec[0] = scd->shi->mat->index;
out[3]->vec[0] = RE_object_instance_get_random_id(scd->shi->obi) * (1.0f/(float)0xFFFFFFFF);;
out[3]->vec[0] = RE_object_instance_get_random_id(scd->shi->obi) * (1.0f / (float)0xFFFFFFFF);
}
/* node type definition */