fix for struct definition building with msvc2008 and some style cleanup.
This commit is contained in:
@@ -54,7 +54,7 @@ typedef enum {
|
||||
} eCbEvent;
|
||||
|
||||
|
||||
typedef struct {
|
||||
typedef struct bCallbackFuncStore {
|
||||
struct bCallbackFuncStore *next, *prev;
|
||||
void (*func)(struct Main *, struct ID *, void *arg);
|
||||
void *arg;
|
||||
|
@@ -1019,7 +1019,7 @@ static int fd_read_gzip_from_memory(FileData *filedata, void *buffer, unsigned i
|
||||
if (err == Z_STREAM_END) {
|
||||
return 0;
|
||||
}
|
||||
else if (err != Z_OK) {
|
||||
else if (err != Z_OK) {
|
||||
printf("fd_read_gzip_from_memory: zlib error\n");
|
||||
return 0;
|
||||
}
|
||||
|
@@ -171,7 +171,7 @@ void ArmatureExporter::add_bone_node(Bone *bone, Object *ob_arm, Scene *sce,
|
||||
if (bone->childbase.first == NULL || BLI_countlist(&(bone->childbase)) >= 2) {
|
||||
add_blender_leaf_bone( bone, ob_arm, node);
|
||||
}
|
||||
else{
|
||||
else {
|
||||
#endif
|
||||
node.start();
|
||||
|
||||
|
@@ -111,7 +111,7 @@ void UnitConverter::mat4_to_dae_double(double out[4][4], float in[4][4])
|
||||
|
||||
float(&UnitConverter::get_rotation())[4][4]
|
||||
{
|
||||
switch(up_axis) {
|
||||
switch (up_axis) {
|
||||
case COLLADAFW::FileInfo::X_UP:
|
||||
return x_up_mat4;
|
||||
break;
|
||||
|
@@ -31,9 +31,9 @@
|
||||
*/
|
||||
class SocketProxyNode : public Node {
|
||||
private:
|
||||
bool m_buffer;
|
||||
bool m_buffer;
|
||||
public:
|
||||
SocketProxyNode(bNode *editorNode, bNodeSocket *editorInput, bNodeSocket *editorOutput, bool buffer);
|
||||
SocketProxyNode(bNode *editorNode, bNodeSocket *editorInput, bNodeSocket *editorOutput, bool buffer);
|
||||
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
||||
|
||||
virtual bool isProxyNode() const { return true; }
|
||||
|
@@ -119,7 +119,7 @@ void CropImageOperation::determineResolution(unsigned int resolution[2], unsigne
|
||||
|
||||
void CropImageOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
|
||||
{
|
||||
if (x >= 0 && x < getWidth() && y >= 0 && y < getHeight()) {
|
||||
if (x >= 0 && x < getWidth() && y >= 0 && y < getHeight()) {
|
||||
this->m_inputOperation->read(output, (x + this->m_xmin), (y + this->m_ymin), sampler);
|
||||
}
|
||||
else {
|
||||
|
@@ -166,7 +166,7 @@ OutputOpenExrLayer::OutputOpenExrLayer(const char *name_, DataType datatype_)
|
||||
}
|
||||
|
||||
OutputOpenExrMultiLayerOperation::OutputOpenExrMultiLayerOperation(
|
||||
const RenderData *rd, const bNodeTree *tree, const char *path, char exr_codec)
|
||||
const RenderData *rd, const bNodeTree *tree, const char *path, char exr_codec)
|
||||
{
|
||||
this->m_rd = rd;
|
||||
this->m_tree = tree;
|
||||
|
@@ -79,9 +79,9 @@ BLI_INLINE unsigned char f_to_char(const float val)
|
||||
} (void)0
|
||||
|
||||
#define IMAPAINT_CHAR_RGB_TO_FLOAT(f, c) { \
|
||||
(f)[0] = IMAPAINT_CHAR_TO_FLOAT((c)[0]); \
|
||||
(f)[1] = IMAPAINT_CHAR_TO_FLOAT((c)[1]); \
|
||||
(f)[2] = IMAPAINT_CHAR_TO_FLOAT((c)[2]); \
|
||||
(f)[0] = IMAPAINT_CHAR_TO_FLOAT((c)[0]); \
|
||||
(f)[1] = IMAPAINT_CHAR_TO_FLOAT((c)[1]); \
|
||||
(f)[2] = IMAPAINT_CHAR_TO_FLOAT((c)[2]); \
|
||||
} (void)0
|
||||
|
||||
#define IMAPAINT_FLOAT_RGB_COPY(a, b) copy_v3_v3(a, b)
|
||||
|
@@ -116,10 +116,10 @@ BLI_INLINE unsigned char f_to_char(const float val)
|
||||
} (void)0
|
||||
|
||||
#define IMAPAINT_CHAR_RGBA_TO_FLOAT(f, c) { \
|
||||
(f)[0] = IMAPAINT_CHAR_TO_FLOAT((c)[0]); \
|
||||
(f)[1] = IMAPAINT_CHAR_TO_FLOAT((c)[1]); \
|
||||
(f)[2] = IMAPAINT_CHAR_TO_FLOAT((c)[2]); \
|
||||
(f)[3] = IMAPAINT_CHAR_TO_FLOAT((c)[3]); \
|
||||
(f)[0] = IMAPAINT_CHAR_TO_FLOAT((c)[0]); \
|
||||
(f)[1] = IMAPAINT_CHAR_TO_FLOAT((c)[1]); \
|
||||
(f)[2] = IMAPAINT_CHAR_TO_FLOAT((c)[2]); \
|
||||
(f)[3] = IMAPAINT_CHAR_TO_FLOAT((c)[3]); \
|
||||
} (void)0
|
||||
|
||||
#define IMAPAINT_FLOAT_RGB_TO_CHAR(c, f) { \
|
||||
|
@@ -2811,14 +2811,14 @@ void ED_init_custom_node_socket_type(bNodeSocketType *stype)
|
||||
|
||||
/* maps standard socket integer type to a color */
|
||||
static const float std_node_socket_colors[][4] = {
|
||||
{0.63, 0.63, 0.63, 1.0}, /* SOCK_FLOAT */
|
||||
{0.39, 0.39, 0.78, 1.0}, /* SOCK_VECTOR */
|
||||
{0.78, 0.78, 0.16, 1.0}, /* SOCK_RGBA */
|
||||
{0.39, 0.78, 0.39, 1.0}, /* SOCK_SHADER */
|
||||
{0.70, 0.65, 0.19, 1.0}, /* SOCK_BOOLEAN */
|
||||
{0.0, 0.0, 0.0, 1.0}, /*__SOCK_MESH (deprecated) */
|
||||
{0.06, 0.52, 0.15, 1.0}, /* SOCK_INT */
|
||||
{1.0, 1.0, 1.0, 1.0}, /* SOCK_STRING */
|
||||
{0.63, 0.63, 0.63, 1.0}, /* SOCK_FLOAT */
|
||||
{0.39, 0.39, 0.78, 1.0}, /* SOCK_VECTOR */
|
||||
{0.78, 0.78, 0.16, 1.0}, /* SOCK_RGBA */
|
||||
{0.39, 0.78, 0.39, 1.0}, /* SOCK_SHADER */
|
||||
{0.70, 0.65, 0.19, 1.0}, /* SOCK_BOOLEAN */
|
||||
{0.0, 0.0, 0.0, 1.0}, /*__SOCK_MESH (deprecated) */
|
||||
{0.06, 0.52, 0.15, 1.0}, /* SOCK_INT */
|
||||
{1.0, 1.0, 1.0, 1.0}, /* SOCK_STRING */
|
||||
};
|
||||
|
||||
/* common color callbacks for standard types */
|
||||
|
@@ -69,15 +69,15 @@ EnumPropertyItem node_socket_in_out_items[] = {
|
||||
};
|
||||
|
||||
EnumPropertyItem node_socket_type_items[] = {
|
||||
{SOCK_CUSTOM, "CUSTOM", 0, "Custom", ""},
|
||||
{SOCK_FLOAT, "VALUE", 0, "Value", ""},
|
||||
{SOCK_INT, "INT", 0, "Int", ""},
|
||||
{SOCK_BOOLEAN, "BOOLEAN", 0, "Boolean", ""},
|
||||
{SOCK_VECTOR, "VECTOR", 0, "Vector", ""},
|
||||
{SOCK_STRING, "STRING", 0, "String", ""},
|
||||
{SOCK_RGBA, "RGBA", 0, "RGBA", ""},
|
||||
{SOCK_SHADER, "SHADER", 0, "Shader", ""},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
{SOCK_CUSTOM, "CUSTOM", 0, "Custom", ""},
|
||||
{SOCK_FLOAT, "VALUE", 0, "Value", ""},
|
||||
{SOCK_INT, "INT", 0, "Int", ""},
|
||||
{SOCK_BOOLEAN, "BOOLEAN", 0, "Boolean", ""},
|
||||
{SOCK_VECTOR, "VECTOR", 0, "Vector", ""},
|
||||
{SOCK_STRING, "STRING", 0, "String", ""},
|
||||
{SOCK_RGBA, "RGBA", 0, "RGBA", ""},
|
||||
{SOCK_SHADER, "SHADER", 0, "Shader", ""},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
|
||||
EnumPropertyItem node_quality_items[] = {
|
||||
|
@@ -41,7 +41,7 @@ void cmp_node_update_default(bNodeTree *UNUSED(ntree), bNode *node)
|
||||
{
|
||||
bNodeSocket *sock;
|
||||
for (sock= node->outputs.first; sock; sock= sock->next) {
|
||||
if(sock->cache) {
|
||||
if (sock->cache) {
|
||||
//free_compbuf(sock->cache);
|
||||
//sock->cache= NULL;
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@
|
||||
|
||||
/* **************** VALUE ******************** */
|
||||
static bNodeSocketTemplate sh_node_value_out[] = {
|
||||
{ SOCK_FLOAT, 0, N_("Value"), 0.5f, 0, 0, 0, -FLT_MAX, FLT_MAX, PROP_NONE},
|
||||
{ SOCK_FLOAT, 0, N_("Value"), 0.5f, 0, 0, 0, -FLT_MAX, FLT_MAX, PROP_NONE},
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
|
@@ -877,7 +877,7 @@ static void *do_render_thread(void *thread_v)
|
||||
do_part_thread(pa);
|
||||
BLI_thread_queue_push(thread->donequeue, pa);
|
||||
|
||||
if(R.test_break(R.tbh))
|
||||
if (R.test_break(R.tbh))
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -1092,7 +1092,7 @@ ImBuf *render_result_rect_to_ibuf(RenderResult *rr, RenderData *rd)
|
||||
if (BKE_imtype_valid_depths(rd->im_format.imtype) & (R_IMF_CHAN_DEPTH_12 | R_IMF_CHAN_DEPTH_16 | R_IMF_CHAN_DEPTH_24 | R_IMF_CHAN_DEPTH_32)) {
|
||||
IMB_float_from_rect(ibuf);
|
||||
}
|
||||
else {
|
||||
else {
|
||||
/* ensure no float buffer remained from previous frame */
|
||||
ibuf->rect_float = NULL;
|
||||
}
|
||||
|
@@ -215,8 +215,8 @@ bool KX_ObjectActuator::Update()
|
||||
m_previous_error = e;
|
||||
m_error_accumulator = I;
|
||||
parent->ApplyForce(m_force,(m_bitLocalFlag.LinearVelocity) != 0);
|
||||
} else if(m_bitLocalFlag.CharacterMotion)
|
||||
{
|
||||
}
|
||||
else if (m_bitLocalFlag.CharacterMotion) {
|
||||
MT_Vector3 dir = m_dloc;
|
||||
|
||||
if (m_bitLocalFlag.AddOrSetCharLoc) {
|
||||
|
@@ -1172,9 +1172,8 @@ void KX_Scene::ReplaceMesh(class CValue* obj,void* meshobj, bool use_gfx, bool u
|
||||
);
|
||||
}
|
||||
newobj->SetDeformer(modifierDeformer);
|
||||
}
|
||||
else if (bHasShapeKey)
|
||||
{
|
||||
}
|
||||
else if (bHasShapeKey) {
|
||||
BL_ShapeDeformer* shapeDeformer;
|
||||
if (bHasArmature)
|
||||
{
|
||||
|
@@ -1576,7 +1576,7 @@ struct OcclusionBuffer
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (width == 1) {
|
||||
else if (width == 1) {
|
||||
// Degenerated in at least 2 vertical lines
|
||||
// The algorithm below doesn't work when face has a single pixel width
|
||||
// We cannot use general formulas because the plane is degenerated.
|
||||
|
Reference in New Issue
Block a user