style cleanup: indentation, also quiet double promotion warnings for despeckle node.
This commit is contained in:
@@ -1487,10 +1487,10 @@ void nodeSocketSetType(bNodeSocket *sock, int type)
|
||||
* referene other pointers which need validation.
|
||||
*/
|
||||
typedef struct bNodeClipboardExtraInfo {
|
||||
struct bNodeClipboardExtraInfo *next, *prev;
|
||||
struct bNodeClipboardExtraInfo *next, *prev;
|
||||
ID *id;
|
||||
char id_name[MAX_ID_NAME];
|
||||
char library_name[FILE_MAX];
|
||||
char id_name[MAX_ID_NAME];
|
||||
char library_name[FILE_MAX];
|
||||
} bNodeClipboardExtraInfo;
|
||||
#endif /* USE_NODE_CB_VALIDATE */
|
||||
|
||||
@@ -1499,7 +1499,7 @@ typedef struct bNodeClipboard {
|
||||
ListBase nodes;
|
||||
|
||||
#ifdef USE_NODE_CB_VALIDATE
|
||||
ListBase nodes_extra_info;
|
||||
ListBase nodes_extra_info;
|
||||
#endif
|
||||
|
||||
ListBase links;
|
||||
@@ -1531,7 +1531,7 @@ void BKE_node_clipboard_clear(void)
|
||||
node_clipboard.nodes.first = node_clipboard.nodes.last = NULL;
|
||||
|
||||
#ifdef USE_NODE_CB_VALIDATE
|
||||
BLI_freelistN(&node_clipboard.nodes_extra_info);
|
||||
BLI_freelistN(&node_clipboard.nodes_extra_info);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1582,28 +1582,28 @@ int BKE_node_clipboard_validate(void)
|
||||
void BKE_node_clipboard_add_node(bNode *node)
|
||||
{
|
||||
#ifdef USE_NODE_CB_VALIDATE
|
||||
/* add extra info */
|
||||
bNodeClipboardExtraInfo *node_info = MEM_mallocN(sizeof(bNodeClipboardExtraInfo), STRINGIFY(bNodeClipboardExtraInfo));
|
||||
/* add extra info */
|
||||
bNodeClipboardExtraInfo *node_info = MEM_mallocN(sizeof(bNodeClipboardExtraInfo), STRINGIFY(bNodeClipboardExtraInfo));
|
||||
|
||||
node_info->id = node->id;
|
||||
if (node->id) {
|
||||
BLI_strncpy(node_info->id_name, node->id->name, sizeof(node_info->id_name));
|
||||
if (node->id->lib) {
|
||||
BLI_strncpy(node_info->library_name, node->id->lib->filepath, sizeof(node_info->library_name));
|
||||
}
|
||||
else {
|
||||
node_info->library_name[0] = '\0';
|
||||
}
|
||||
}
|
||||
else {
|
||||
node_info->id_name[0] = '\0';
|
||||
node_info->library_name[0] = '\0';
|
||||
}
|
||||
BLI_addtail(&node_clipboard.nodes_extra_info, node_info);
|
||||
if (node->id) {
|
||||
BLI_strncpy(node_info->id_name, node->id->name, sizeof(node_info->id_name));
|
||||
if (node->id->lib) {
|
||||
BLI_strncpy(node_info->library_name, node->id->lib->filepath, sizeof(node_info->library_name));
|
||||
}
|
||||
else {
|
||||
node_info->library_name[0] = '\0';
|
||||
}
|
||||
}
|
||||
else {
|
||||
node_info->id_name[0] = '\0';
|
||||
node_info->library_name[0] = '\0';
|
||||
}
|
||||
BLI_addtail(&node_clipboard.nodes_extra_info, node_info);
|
||||
/* end extra info */
|
||||
#endif /* USE_NODE_CB_VALIDATE */
|
||||
|
||||
/* add node */
|
||||
/* add node */
|
||||
BLI_addtail(&node_clipboard.nodes, node);
|
||||
|
||||
}
|
||||
|
@@ -1468,9 +1468,9 @@ static void ccgdm_getVertCos(DerivedMesh *dm, float (*cos)[3])
|
||||
}
|
||||
|
||||
static void ccgDM_foreachMappedVert(
|
||||
DerivedMesh *dm,
|
||||
void (*func)(void *userData, int index, const float co[3], const float no_f[3], const short no_s[3]),
|
||||
void *userData)
|
||||
DerivedMesh *dm,
|
||||
void (*func)(void *userData, int index, const float co[3], const float no_f[3], const short no_s[3]),
|
||||
void *userData)
|
||||
{
|
||||
CCGDerivedMesh *ccgdm = (CCGDerivedMesh *) dm;
|
||||
CCGVertIterator *vi;
|
||||
@@ -1490,9 +1490,9 @@ static void ccgDM_foreachMappedVert(
|
||||
}
|
||||
|
||||
static void ccgDM_foreachMappedEdge(
|
||||
DerivedMesh *dm,
|
||||
void (*func)(void *userData, int index, const float v0co[3], const float v1co[3]),
|
||||
void *userData)
|
||||
DerivedMesh *dm,
|
||||
void (*func)(void *userData, int index, const float v0co[3], const float v1co[3]),
|
||||
void *userData)
|
||||
{
|
||||
CCGDerivedMesh *ccgdm = (CCGDerivedMesh *) dm;
|
||||
CCGSubSurf *ss = ccgdm->ss;
|
||||
@@ -2492,9 +2492,9 @@ static void ccgDM_drawMappedEdgesInterp(DerivedMesh *dm,
|
||||
}
|
||||
|
||||
static void ccgDM_foreachMappedFaceCenter(
|
||||
DerivedMesh *dm,
|
||||
void (*func)(void *userData, int index, const float co[3], const float no[3]),
|
||||
void *userData)
|
||||
DerivedMesh *dm,
|
||||
void (*func)(void *userData, int index, const float co[3], const float no[3]),
|
||||
void *userData)
|
||||
{
|
||||
CCGDerivedMesh *ccgdm = (CCGDerivedMesh *) dm;
|
||||
CCGSubSurf *ss = ccgdm->ss;
|
||||
|
@@ -78,8 +78,8 @@ void DespeckleOperation::executePixel(float output[4], int x, int y, void *data)
|
||||
|
||||
this->m_inputOperation->read(color_org, x2, y2, NULL);
|
||||
|
||||
#define TOT_DIV_ONE 1.0
|
||||
#define TOT_DIV_CNR M_SQRT1_2
|
||||
#define TOT_DIV_ONE 1.0f
|
||||
#define TOT_DIV_CNR (float)M_SQRT1_2
|
||||
|
||||
#define WTOT (TOT_DIV_ONE * 4 + TOT_DIV_CNR * 4)
|
||||
|
||||
@@ -110,7 +110,7 @@ void DespeckleOperation::executePixel(float output[4], int x, int y, void *data)
|
||||
this->m_inputOperation->read(in1, x2, y3, NULL); COLOR_ADD(TOT_DIV_ONE)
|
||||
this->m_inputOperation->read(in1, x3, y3, NULL); COLOR_ADD(TOT_DIV_CNR)
|
||||
|
||||
mul_v4_fl(color_mid, 1.0f / (4.0f + (4.0f * M_SQRT1_2)));
|
||||
mul_v4_fl(color_mid, 1.0f / (4.0f + (4.0f * (float)M_SQRT1_2)));
|
||||
//mul_v4_fl(color_mid, 1.0f / w);
|
||||
|
||||
if ((w != 0.0f) &&
|
||||
|
@@ -2256,9 +2256,9 @@ void mesh_foreachScreenFace(
|
||||
}
|
||||
|
||||
void nurbs_foreachScreenVert(
|
||||
ViewContext *vc,
|
||||
void (*func)(void *userData, Nurb *nu, BPoint *bp, BezTriple *bezt, int beztindex, int x, int y),
|
||||
void *userData)
|
||||
ViewContext *vc,
|
||||
void (*func)(void *userData, Nurb *nu, BPoint *bp, BezTriple *bezt, int beztindex, int x, int y),
|
||||
void *userData)
|
||||
{
|
||||
Curve *cu = vc->obedit->data;
|
||||
short s[2] = {IS_CLIPPED, 0};
|
||||
|
@@ -221,7 +221,7 @@ struct anim_index *IMB_indexer_open(const char *name)
|
||||
}
|
||||
|
||||
unsigned long long IMB_indexer_get_seek_pos(
|
||||
struct anim_index *idx, int frame_index)
|
||||
struct anim_index *idx, int frame_index)
|
||||
{
|
||||
if (frame_index < 0) {
|
||||
frame_index = 0;
|
||||
@@ -233,7 +233,7 @@ unsigned long long IMB_indexer_get_seek_pos(
|
||||
}
|
||||
|
||||
unsigned long long IMB_indexer_get_seek_pos_dts(
|
||||
struct anim_index *idx, int frame_index)
|
||||
struct anim_index *idx, int frame_index)
|
||||
{
|
||||
if (frame_index < 0) {
|
||||
frame_index = 0;
|
||||
@@ -581,7 +581,7 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg(
|
||||
}
|
||||
|
||||
static int add_to_proxy_output_ffmpeg(
|
||||
struct proxy_output_ctx *ctx, AVFrame *frame)
|
||||
struct proxy_output_ctx *ctx, AVFrame *frame)
|
||||
{
|
||||
int outsize = 0;
|
||||
|
||||
|
@@ -294,7 +294,7 @@ struct ImBuf *IMB_double_y(struct ImBuf *ibuf1)
|
||||
/* result in ibuf2, scaling should be done correctly */
|
||||
void imb_onehalf_no_alloc(struct ImBuf *ibuf2, struct ImBuf *ibuf1)
|
||||
{
|
||||
int x, y;
|
||||
int x, y;
|
||||
const short do_rect = (ibuf1->rect != NULL);
|
||||
const short do_float = (ibuf1->rect_float != NULL) && (ibuf2->rect_float != NULL);
|
||||
|
||||
|
@@ -67,9 +67,9 @@ static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
|
||||
}
|
||||
|
||||
static void foreachObjectLink(
|
||||
ModifierData *md, Object *ob,
|
||||
void (*walk)(void *userData, Object *ob, Object **obpoin),
|
||||
void *userData)
|
||||
ModifierData *md, Object *ob,
|
||||
void (*walk)(void *userData, Object *ob, Object **obpoin),
|
||||
void *userData)
|
||||
{
|
||||
BooleanModifierData *bmd = (BooleanModifierData *) md;
|
||||
|
||||
|
@@ -127,8 +127,8 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
|
||||
}
|
||||
|
||||
static void sphere_do(
|
||||
CastModifierData *cmd, Object *ob, DerivedMesh *dm,
|
||||
float (*vertexCos)[3], int numVerts)
|
||||
CastModifierData *cmd, Object *ob, DerivedMesh *dm,
|
||||
float (*vertexCos)[3], int numVerts)
|
||||
{
|
||||
MDeformVert *dvert = NULL;
|
||||
|
||||
@@ -299,8 +299,8 @@ static void sphere_do(
|
||||
}
|
||||
|
||||
static void cuboid_do(
|
||||
CastModifierData *cmd, Object *ob, DerivedMesh *dm,
|
||||
float (*vertexCos)[3], int numVerts)
|
||||
CastModifierData *cmd, Object *ob, DerivedMesh *dm,
|
||||
float (*vertexCos)[3], int numVerts)
|
||||
{
|
||||
MDeformVert *dvert = NULL;
|
||||
Object *ctrl_ob = NULL;
|
||||
@@ -600,8 +600,8 @@ static void deformVerts(ModifierData *md, Object *ob,
|
||||
}
|
||||
|
||||
static void deformVertsEM(
|
||||
ModifierData *md, Object *ob, struct BMEditMesh *editData,
|
||||
DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
|
||||
ModifierData *md, Object *ob, struct BMEditMesh *editData,
|
||||
DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
|
||||
{
|
||||
DerivedMesh *dm = get_dm(ob, editData, derivedData, NULL, 0);
|
||||
CastModifierData *cmd = (CastModifierData *)md;
|
||||
|
@@ -166,8 +166,8 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
|
||||
|
||||
/* dm must be a CDDerivedMesh */
|
||||
static void displaceModifier_do(
|
||||
DisplaceModifierData *dmd, Object *ob,
|
||||
DerivedMesh *dm, float (*vertexCos)[3], int numVerts)
|
||||
DisplaceModifierData *dmd, Object *ob,
|
||||
DerivedMesh *dm, float (*vertexCos)[3], int numVerts)
|
||||
{
|
||||
int i;
|
||||
MVert *mvert;
|
||||
|
@@ -98,8 +98,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
|
||||
}
|
||||
|
||||
static void updateDepgraph(
|
||||
ModifierData *md, DagForest *forest, Scene *scene,
|
||||
Object *ob, DagNode *obNode)
|
||||
ModifierData *md, DagForest *forest, Scene *scene,
|
||||
Object *ob, DagNode *obNode)
|
||||
{
|
||||
FluidsimModifierData *fluidmd = (FluidsimModifierData *) md;
|
||||
Base *base;
|
||||
|
@@ -82,9 +82,9 @@ static int isDisabled(ModifierData *md, int UNUSED(userRenderParams))
|
||||
}
|
||||
|
||||
static void foreachObjectLink(
|
||||
ModifierData *md, Object *ob,
|
||||
void (*walk)(void *userData, Object *ob, Object **obpoin),
|
||||
void *userData)
|
||||
ModifierData *md, Object *ob,
|
||||
void (*walk)(void *userData, Object *ob, Object **obpoin),
|
||||
void *userData)
|
||||
{
|
||||
LatticeModifierData *lmd = (LatticeModifierData *) md;
|
||||
|
||||
|
@@ -104,9 +104,9 @@ static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
|
||||
}
|
||||
|
||||
static void foreachObjectLink(
|
||||
ModifierData *md, Object *ob,
|
||||
void (*walk)(void *userData, Object *ob, Object **obpoin),
|
||||
void *userData)
|
||||
ModifierData *md, Object *ob,
|
||||
void (*walk)(void *userData, Object *ob, Object **obpoin),
|
||||
void *userData)
|
||||
{
|
||||
MeshDeformModifierData *mmd = (MeshDeformModifierData *) md;
|
||||
|
||||
@@ -182,8 +182,8 @@ static float meshdeform_dynamic_bind(MeshDeformModifierData *mmd, float (*dco)[3
|
||||
}
|
||||
|
||||
static void meshdeformModifier_do(
|
||||
ModifierData *md, Object *ob, DerivedMesh *dm,
|
||||
float (*vertexCos)[3], int numVerts)
|
||||
ModifierData *md, Object *ob, DerivedMesh *dm,
|
||||
float (*vertexCos)[3], int numVerts)
|
||||
{
|
||||
MeshDeformModifierData *mmd = (MeshDeformModifierData *) md;
|
||||
struct Mesh *me = (mmd->object) ? mmd->object->data : NULL;
|
||||
|
@@ -199,8 +199,8 @@ static void deformVerts(ModifierData *md, Object *ob,
|
||||
* updates is coded */
|
||||
#if 0
|
||||
static void deformVertsEM(
|
||||
ModifierData *md, Object *ob, EditMesh *editData,
|
||||
DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
|
||||
ModifierData *md, Object *ob, EditMesh *editData,
|
||||
DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
|
||||
{
|
||||
DerivedMesh *dm = derivedData;
|
||||
|
||||
|
Reference in New Issue
Block a user