style cleanup: whitespace/indentation

This commit is contained in:
Campbell Barton 2012-05-19 13:55:54 +00:00
parent af3e348430
commit ed679693c9
44 changed files with 101 additions and 99 deletions

@ -103,8 +103,8 @@ enable_testing()
#-----------------------------------------------------------------------------
# Redirect output files
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE INTERNAL "" FORCE )
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL "" FORCE )
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE INTERNAL "" FORCE)
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL "" FORCE)
#-----------------------------------------------------------------------------
# Set default config options
@ -1187,13 +1187,13 @@ elseif(APPLE)
endif()
if(${XCODE_VERSION} VERSION_LESS 4.3)
SET(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk CACHE PATH "" FORCE ) # use guaranteed existing sdk
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk CACHE PATH "" FORCE) # use guaranteed existing sdk
else()
# note: i don't use xcode-select path on purpose, cause also /Applications/Xcode.app would be allowed
# absolute pathes are more foolproof here !
SET(OSX_SYSROOT_PREFIX /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform)
SET(OSX_DEVELOPER_PREFIX /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk) # use guaranteed existing sdk
SET(CMAKE_OSX_SYSROOT ${OSX_SYSROOT_PREFIX}/${OSX_DEVELOPER_PREFIX} CACHE PATH "" FORCE)
set(OSX_SYSROOT_PREFIX /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform)
set(OSX_DEVELOPER_PREFIX /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk) # use guaranteed existing sdk
set(CMAKE_OSX_SYSROOT ${OSX_SYSROOT_PREFIX}/${OSX_DEVELOPER_PREFIX} CACHE PATH "" FORCE)
endif()
if(WITH_LIBS10.5)
@ -1365,7 +1365,7 @@ elseif(APPLE)
)
set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
set(OPENCOLLADA_LIBRARIES "OpenCOLLADASaxFrameworkLoader -lOpenCOLLADAFramework -lOpenCOLLADABaseUtils -lOpenCOLLADAStreamWriter -lMathMLSolver -lGeneratedSaxParser -lUTF -lxml2 -lbuffer -lftoa" )
set(OPENCOLLADA_LIBRARIES "OpenCOLLADASaxFrameworkLoader -lOpenCOLLADAFramework -lOpenCOLLADABaseUtils -lOpenCOLLADAStreamWriter -lMathMLSolver -lGeneratedSaxParser -lUTF -lxml2 -lbuffer -lftoa")
#pcre is bundled with openCollada
#set(PCRE ${LIBDIR}/pcre)
#set(PCRE_LIBPATH ${PCRE}/lib)

@ -637,7 +637,7 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
if (index) {
orig = *index++;
if (orig == ORIGINDEX_NONE) { if (nors) nors += 3; continue; }
if (drawParamsMapped) draw_option = drawParamsMapped(userData, orig);
if (drawParamsMapped) { draw_option = drawParamsMapped(userData, orig); }
else { if (nors) nors += 3; continue; }
}
else

@ -57,6 +57,6 @@ public:
*/
void deinitExecution();
void setAlpha(float alpha){this->alpha = alpha;}
void setAlpha(float alpha) { this->alpha = alpha; }
};
#endif

@ -1,6 +1,7 @@
/// This file contains all opencl kernels for node-operation implementations
__kernel void testKernel(__global __write_only image2d_t output){
__kernel void testKernel(__global __write_only image2d_t output)
{
int x = get_global_id(0);
int y = get_global_id(1);
int2 coords = {x, y};

@ -3,7 +3,8 @@
const char *sourcecode = "/// This file contains all opencl kernels for node-operation implementations \n" \
"\n" \
"__kernel void testKernel(__global __write_only image2d_t output) {\n" \
"__kernel void testKernel(__global __write_only image2d_t output)\n" \
"{\n" \
" int x = get_global_id(0);\n" \
" int y = get_global_id(1);\n" \
" int2 coords = {x, y}; \n" \

@ -241,7 +241,7 @@ static int file_border_select_modal(bContext *C, wmOperator *op, wmEvent *event)
result= WM_border_select_modal(C, op, event);
if (result==OPERATOR_RUNNING_MODAL) {
if (result == OPERATOR_RUNNING_MODAL) {
rect.xmin = RNA_int_get(op->ptr, "xmin");
rect.ymin = RNA_int_get(op->ptr, "ymin");

@ -2312,7 +2312,7 @@ int handleEventWarp(TransInfo *t, wmEvent *event)
if (event->type == MIDDLEMOUSE && event->val == KM_PRESS) {
// Use customData pointer to signal warp direction
if (t->customData == NULL)
t->customData = (void*)1;
t->customData = (void *)1;
else
t->customData = NULL;

@ -3757,40 +3757,40 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
/* *** Extend Transform *** */
Scene * scene= t->scene;
Scene *scene = t->scene;
int cfra= CFRA;
int left= seq_tx_get_final_left(seq, 1);
int right= seq_tx_get_final_right(seq, 1);
if (seq->depth == 0 && ((seq->flag & SELECT) == 0 || (seq->flag & SEQ_LOCK))) {
*recursive= 0;
*count= 0;
*flag= 0;
*recursive = FALSE;
*count = 0;
*flag = 0;
}
else if (seq->type ==SEQ_META) {
else if (seq->type == SEQ_META) {
/* for meta's we only ever need to extend their children, no matter what depth
* just check the meta's are in the bounds */
if (t->frame_side=='R' && right <= cfra) *recursive= 0;
else if (t->frame_side=='L' && left >= cfra) *recursive= 0;
else *recursive= 1;
if (t->frame_side=='R' && right <= cfra) *recursive = FALSE;
else if (t->frame_side=='L' && left >= cfra) *recursive = FALSE;
else *recursive = TRUE;
*count= 1;
*flag= (seq->flag | SELECT) & ~(SEQ_LEFTSEL|SEQ_RIGHTSEL);
}
else {
*recursive= 0; /* not a meta, so no thinking here */
*count= 1; /* unless its set to 0, extend will never set 2 handles at once */
*flag= (seq->flag | SELECT) & ~(SEQ_LEFTSEL|SEQ_RIGHTSEL);
*recursive = FALSE; /* not a meta, so no thinking here */
*count = 1; /* unless its set to 0, extend will never set 2 handles at once */
*flag = (seq->flag | SELECT) & ~(SEQ_LEFTSEL|SEQ_RIGHTSEL);
if (t->frame_side=='R') {
if (right <= cfra) *count= *flag= 0; /* ignore */
if (right <= cfra) *count = *flag= 0; /* ignore */
else if (left > cfra) ; /* keep the selection */
else *flag |= SEQ_RIGHTSEL;
}
else {
if (left >= cfra) *count= *flag= 0; /* ignore */
if (left >= cfra) *count = *flag= 0; /* ignore */
else if (right < cfra) ; /* keep the selection */
else *flag |= SEQ_LEFTSEL;
}
@ -3808,9 +3808,9 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
/* Non nested strips (resect selection and handles) */
if ((seq->flag & SELECT) == 0 || (seq->flag & SEQ_LOCK)) {
*recursive= 0;
*count= 0;
*flag= 0;
*recursive = FALSE;
*count = 0;
*flag = 0;
}
else {
if ((seq->flag & (SEQ_LEFTSEL|SEQ_RIGHTSEL)) == (SEQ_LEFTSEL|SEQ_RIGHTSEL)) {
@ -3826,10 +3826,10 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
if ((seq->type == SEQ_META) && ((seq->flag & (SEQ_LEFTSEL|SEQ_RIGHTSEL)) == 0)) {
/* if any handles are selected, don't recurse */
*recursive = 1;
*recursive = TRUE;
}
else {
*recursive = 0;
*recursive = FALSE;
}
}
}
@ -3837,9 +3837,9 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
/* Nested, different rules apply */
#ifdef SEQ_TX_NESTED_METAS
*flag= (seq->flag | SELECT) & ~(SEQ_LEFTSEL|SEQ_RIGHTSEL);
*count= 1; /* ignore the selection for nested */
*recursive = (seq->type == SEQ_META );
*flag = (seq->flag | SELECT) & ~(SEQ_LEFTSEL|SEQ_RIGHTSEL);
*count = 1; /* ignore the selection for nested */
*recursive = (seq->type == SEQ_META);
#else
if (seq->type == SEQ_META) {
/* Meta's can only directly be moved between channels since they
@ -3848,12 +3848,12 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
* calc_sequence() will update its settings when run on the toplevel meta */
*flag= 0;
*count= 0;
*recursive = 1;
*recursive = TRUE;
}
else {
*flag= (seq->flag | SELECT) & ~(SEQ_LEFTSEL|SEQ_RIGHTSEL);
*count= 1; /* ignore the selection for nested */
*recursive = 0;
*recursive = FALSE;
}
#endif
}

@ -748,7 +748,7 @@ static void defocus_blur(bNode *node, CompBuf *new, CompBuf *img, CompBuf *zbuf,
p4 = p * new->type;
if (nqd->bktype==0) // Disk
lwt = ((u*u + v*v)<=cR2) ? wcor : 0.f;
else // AA not needed here
else /* AA not needed here */
lwt = wcor * getWeight(BKH, len_bkh, u, v, ct_crad, inradsq);
// prevent background bleeding onto in-focus pixels, user-option
if (ct_crad > nqd->bthresh) { // if center blur > threshold