Cleanup: style
This commit is contained in:
@@ -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) {
|
for (bGPDlayer *gp_layer = gpencil->layers.first; gp_layer; gp_layer = gp_layer->next) {
|
||||||
CALLBACK_INVOKE(gp_layer->parent, IDWALK_CB_NOP);
|
CALLBACK_INVOKE(gp_layer->parent, IDWALK_CB_NOP);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Nothing needed for those... */
|
/* Nothing needed for those... */
|
||||||
|
@@ -186,9 +186,10 @@ static DupliObject *make_dupli(const DupliContext *ctx,
|
|||||||
dob->random_id = BLI_hash_string(dob->ob->id.name + 2);
|
dob->random_id = BLI_hash_string(dob->ob->id.name + 2);
|
||||||
|
|
||||||
if (dob->persistent_id[0] != INT_MAX) {
|
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]);
|
dob->random_id = BLI_hash_int_2d(dob->random_id, (unsigned int)dob->persistent_id[i]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
dob->random_id = BLI_hash_int_2d(dob->random_id, 0);
|
dob->random_id = BLI_hash_int_2d(dob->random_id, 0);
|
||||||
}
|
}
|
||||||
|
@@ -52,9 +52,9 @@ BLI_INLINE unsigned int BLI_hash_string(const char *str)
|
|||||||
{
|
{
|
||||||
unsigned int i = 0, c;
|
unsigned int i = 0, c;
|
||||||
|
|
||||||
while((c = *str++))
|
while ((c = *str++)) {
|
||||||
i = i * 37 + c;
|
i = i * 37 + c;
|
||||||
|
}
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -77,7 +77,6 @@
|
|||||||
#include "ED_object.h"
|
#include "ED_object.h"
|
||||||
#include "ED_screen.h"
|
#include "ED_screen.h"
|
||||||
#include "ED_view3d.h"
|
#include "ED_view3d.h"
|
||||||
#include "ED_screen.h"
|
|
||||||
#include "ED_space_api.h"
|
#include "ED_space_api.h"
|
||||||
|
|
||||||
#include "gpencil_intern.h"
|
#include "gpencil_intern.h"
|
||||||
|
@@ -1152,9 +1152,11 @@ static void surfacedeformModifier_do(ModifierData *md, float (*vertexCos)[3], un
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Actual vertex location update starts here */
|
/* 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"),
|
.targetCos = MEM_mallocN(sizeof(float[3]) * tnumverts, "SDefTargetVertArray"),
|
||||||
.vertexCos = vertexCos};
|
.vertexCos = vertexCos,
|
||||||
|
};
|
||||||
|
|
||||||
if (data.targetCos != NULL) {
|
if (data.targetCos != NULL) {
|
||||||
bool tdm_vert_alloc;
|
bool tdm_vert_alloc;
|
||||||
|
@@ -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]);
|
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[1]->vec[0] = RE_object_instance_get_object_pass_index(scd->shi->obi);
|
||||||
out[2]->vec[0] = scd->shi->mat->index;
|
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 */
|
/* node type definition */
|
||||||
|
Reference in New Issue
Block a user