forked from bartvdbraak/blender
style cleanup: indent/whitespace
This commit is contained in:
parent
2060bb114a
commit
47c23750e8
@ -1110,7 +1110,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
|
||||
event = processWindowEvent(LOWORD(wParam) ? GHOST_kEventWindowActivate : GHOST_kEventWindowDeactivate, window);
|
||||
/* WARNING: Let DefWindowProc handle WM_ACTIVATE, otherwise WM_MOUSEWHEEL
|
||||
* will not be dispatched to OUR active window if we minimize one of OUR windows. */
|
||||
if(LOWORD(wParam)==WA_INACTIVE)
|
||||
if (LOWORD(wParam)==WA_INACTIVE)
|
||||
window->lostMouseCapture();
|
||||
|
||||
lResult = ::DefWindowProc(hwnd, msg, wParam, lParam);
|
||||
@ -1136,10 +1136,9 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
|
||||
* function when the application obtains a WM_PAINT message by using the GetMessage or
|
||||
* PeekMessage function.
|
||||
*/
|
||||
if(!window->m_inLiveResize)
|
||||
{
|
||||
event = processWindowEvent(GHOST_kEventWindowUpdate, window);
|
||||
::ValidateRect(hwnd, NULL);
|
||||
if (!window->m_inLiveResize) {
|
||||
event = processWindowEvent(GHOST_kEventWindowUpdate, window);
|
||||
::ValidateRect(hwnd, NULL);
|
||||
}
|
||||
else {
|
||||
eventHandled = true;
|
||||
@ -1163,15 +1162,13 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
|
||||
* message without calling DefWindowProc.
|
||||
*/
|
||||
/* we get first WM_SIZE before we fully init. So, do not dispatch before we continiously resizng */
|
||||
if(window->m_inLiveResize)
|
||||
{
|
||||
system->pushEvent(processWindowEvent(GHOST_kEventWindowSize, window));
|
||||
system->dispatchEvents();
|
||||
}
|
||||
else
|
||||
{
|
||||
event = processWindowEvent(GHOST_kEventWindowSize, window);
|
||||
}
|
||||
if(window->m_inLiveResize) {
|
||||
system->pushEvent(processWindowEvent(GHOST_kEventWindowSize, window));
|
||||
system->dispatchEvents();
|
||||
}
|
||||
else {
|
||||
event = processWindowEvent(GHOST_kEventWindowSize, window);
|
||||
}
|
||||
break;
|
||||
case WM_CAPTURECHANGED:
|
||||
window->lostMouseCapture();
|
||||
@ -1187,16 +1184,14 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
|
||||
* to perform any move or size change processing during the WM_WINDOWPOSCHANGED
|
||||
* message without calling DefWindowProc.
|
||||
*/
|
||||
/* see WM_SIZE comment*/
|
||||
if(window->m_inLiveResize)
|
||||
{
|
||||
system->pushEvent(processWindowEvent(GHOST_kEventWindowMove, window));
|
||||
system->dispatchEvents();
|
||||
}
|
||||
else
|
||||
{
|
||||
event = processWindowEvent(GHOST_kEventWindowMove, window);
|
||||
}
|
||||
/* see WM_SIZE comment*/
|
||||
if (window->m_inLiveResize) {
|
||||
system->pushEvent(processWindowEvent(GHOST_kEventWindowMove, window));
|
||||
system->dispatchEvents();
|
||||
}
|
||||
else {
|
||||
event = processWindowEvent(GHOST_kEventWindowMove, window);
|
||||
}
|
||||
|
||||
break;
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
@ -56,7 +56,7 @@ using namespace OCIO_NAMESPACE;
|
||||
#endif
|
||||
|
||||
#define MEM_NEW(type) new(MEM_mallocN(sizeof(type), __func__)) type()
|
||||
#define MEM_DELETE(what, type) if(what) { ((type*)(what))->~type(); MEM_freeN(what); } (void)0
|
||||
#define MEM_DELETE(what, type) if (what) { ((type*)(what))->~type(); MEM_freeN(what); } (void)0
|
||||
|
||||
static const int LUT3D_EDGE_SIZE = 32;
|
||||
|
||||
|
@ -5443,10 +5443,10 @@ static void direct_link_scene(FileData *fd, Scene *sce)
|
||||
link_list(fd, &(sce->transform_spaces));
|
||||
link_list(fd, &(sce->r.layers));
|
||||
|
||||
for(srl = sce->r.layers.first; srl; srl = srl->next) {
|
||||
for (srl = sce->r.layers.first; srl; srl = srl->next) {
|
||||
link_list(fd, &(srl->freestyleConfig.modules));
|
||||
}
|
||||
for(srl = sce->r.layers.first; srl; srl = srl->next) {
|
||||
for (srl = sce->r.layers.first; srl; srl = srl->next) {
|
||||
link_list(fd, &(srl->freestyleConfig.linesets));
|
||||
}
|
||||
|
||||
@ -7033,16 +7033,16 @@ static void direct_link_linestyle(FileData *fd, FreestyleLineStyle *linestyle)
|
||||
linestyle->adt= newdataadr(fd, linestyle->adt);
|
||||
direct_link_animdata(fd, linestyle->adt);
|
||||
link_list(fd, &linestyle->color_modifiers);
|
||||
for(modifier = linestyle->color_modifiers.first; modifier; modifier = modifier->next)
|
||||
for (modifier = linestyle->color_modifiers.first; modifier; modifier = modifier->next)
|
||||
direct_link_linestyle_color_modifier(fd, modifier);
|
||||
link_list(fd, &linestyle->alpha_modifiers);
|
||||
for(modifier = linestyle->alpha_modifiers.first; modifier; modifier = modifier->next)
|
||||
for (modifier = linestyle->alpha_modifiers.first; modifier; modifier = modifier->next)
|
||||
direct_link_linestyle_alpha_modifier(fd, modifier);
|
||||
link_list(fd, &linestyle->thickness_modifiers);
|
||||
for(modifier = linestyle->thickness_modifiers.first; modifier; modifier = modifier->next)
|
||||
for (modifier = linestyle->thickness_modifiers.first; modifier; modifier = modifier->next)
|
||||
direct_link_linestyle_thickness_modifier(fd, modifier);
|
||||
link_list(fd, &linestyle->geometry_modifiers);
|
||||
for(modifier = linestyle->geometry_modifiers.first; modifier; modifier = modifier->next)
|
||||
for (modifier = linestyle->geometry_modifiers.first; modifier; modifier = modifier->next)
|
||||
direct_link_linestyle_geometry_modifier(fd, modifier);
|
||||
}
|
||||
|
||||
@ -9455,12 +9455,12 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
SceneRenderLayer *srl;
|
||||
FreestyleLineStyle *linestyle;
|
||||
|
||||
for(sce = main->scene.first; sce; sce = sce->id.next) {
|
||||
for (sce = main->scene.first; sce; sce = sce->id.next) {
|
||||
if (sce->r.line_thickness_mode == 0) {
|
||||
sce->r.line_thickness_mode = R_LINE_THICKNESS_ABSOLUTE;
|
||||
sce->r.unit_line_thickness = 1.0f;
|
||||
}
|
||||
for(srl = sce->r.layers.first; srl; srl = srl->next) {
|
||||
for (srl = sce->r.layers.first; srl; srl = srl->next) {
|
||||
if (srl->freestyleConfig.mode == 0)
|
||||
srl->freestyleConfig.mode = FREESTYLE_CONTROL_EDITOR_MODE;
|
||||
if (srl->freestyleConfig.raycasting_algorithm == FREESTYLE_ALGO_CULLED_ADAPTIVE_CUMULATIVE ||
|
||||
@ -9490,7 +9490,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
}
|
||||
|
||||
}
|
||||
for(linestyle = main->linestyle.first; linestyle; linestyle = linestyle->id.next) {
|
||||
for (linestyle = main->linestyle.first; linestyle; linestyle = linestyle->id.next) {
|
||||
#if 1
|
||||
/* disable the Misc panel for now */
|
||||
if (linestyle->panel == LS_PANEL_MISC) {
|
||||
@ -9578,11 +9578,11 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
for (brush = main->brush.first; brush; brush = brush->id.next) {
|
||||
brush->flag &= ~BRUSH_FIXED;
|
||||
|
||||
if(brush->cursor_overlay_alpha < 2)
|
||||
if (brush->cursor_overlay_alpha < 2)
|
||||
brush->cursor_overlay_alpha = 33;
|
||||
if(brush->texture_overlay_alpha < 2)
|
||||
if (brush->texture_overlay_alpha < 2)
|
||||
brush->texture_overlay_alpha = 33;
|
||||
if(brush->mask_overlay_alpha <2)
|
||||
if (brush->mask_overlay_alpha <2)
|
||||
brush->mask_overlay_alpha = 33;
|
||||
}
|
||||
#undef BRUSH_FIXED
|
||||
|
@ -1714,14 +1714,14 @@ bool BM_face_exists_overlap(BMVert **varr, const int len, BMFace **r_f_overlap)
|
||||
|
||||
#ifdef DEBUG
|
||||
/* check flag isn't already set */
|
||||
for(i = 0; i < len; i++) {
|
||||
for (i = 0; i < len; i++) {
|
||||
BM_ITER_ELEM (f, &viter, varr[i], BM_FACES_OF_VERT) {
|
||||
BLI_assert(BM_ELEM_API_FLAG_TEST(f, _FLAG_OVERLAP) == 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for(i = 0; i < len; i++) {
|
||||
for (i = 0; i < len; i++) {
|
||||
BM_ITER_ELEM (f, &viter, varr[i], BM_FACES_OF_VERT) {
|
||||
if (BM_ELEM_API_FLAG_TEST(f, _FLAG_OVERLAP) == 0) {
|
||||
if (len <= BM_verts_in_face_count(f, varr, len)) {
|
||||
@ -1764,7 +1764,7 @@ bool BM_face_exists_overlap_subset(BMVert **varr, const int len)
|
||||
|
||||
#ifdef DEBUG
|
||||
/* check flag isn't already set */
|
||||
for(i = 0; i < len; i++) {
|
||||
for (i = 0; i < len; i++) {
|
||||
BLI_assert(BM_ELEM_API_FLAG_TEST(varr[i], _FLAG_OVERLAP) == 0);
|
||||
BM_ITER_ELEM (f, &viter, varr[i], BM_FACES_OF_VERT) {
|
||||
BLI_assert(BM_ELEM_API_FLAG_TEST(f, _FLAG_OVERLAP) == 0);
|
||||
@ -1772,7 +1772,7 @@ bool BM_face_exists_overlap_subset(BMVert **varr, const int len)
|
||||
}
|
||||
#endif
|
||||
|
||||
for(i = 0; i < len; i++) {
|
||||
for (i = 0; i < len; i++) {
|
||||
BM_ITER_ELEM (f, &viter, varr[i], BM_FACES_OF_VERT) {
|
||||
if ((f->len <= len) && (BM_ELEM_API_FLAG_TEST(f, _FLAG_OVERLAP) == 0)) {
|
||||
/* check if all vers in this face are flagged*/
|
||||
@ -1780,7 +1780,7 @@ bool BM_face_exists_overlap_subset(BMVert **varr, const int len)
|
||||
|
||||
if (is_init == false) {
|
||||
is_init = true;
|
||||
for(i = 0; i < len; i++) {
|
||||
for (i = 0; i < len; i++) {
|
||||
BM_ELEM_API_FLAG_ENABLE(varr[i], _FLAG_OVERLAP);
|
||||
}
|
||||
}
|
||||
@ -1805,7 +1805,7 @@ bool BM_face_exists_overlap_subset(BMVert **varr, const int len)
|
||||
}
|
||||
|
||||
if (is_init == true) {
|
||||
for(i = 0; i < len; i++) {
|
||||
for (i = 0; i < len; i++) {
|
||||
BM_ELEM_API_FLAG_DISABLE(varr[i], _FLAG_OVERLAP);
|
||||
}
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ class Stroke;
|
||||
* \endcode
|
||||
* Here is a C++ code example of such an iteration:
|
||||
* \code
|
||||
* for(StrokeInternal::StrokeVertexIterator v = ioStroke.strokeVerticesBegin(), vend = ioStroke.strokeVerticesEnd();
|
||||
* for (StrokeInternal::StrokeVertexIterator v = ioStroke.strokeVerticesBegin(), vend = ioStroke.strokeVerticesEnd();
|
||||
* v != vend;
|
||||
* ++v)
|
||||
* {
|
||||
|
@ -87,7 +87,7 @@ void SCA_IScene::AddDebugProperty(class CValue* debugprop,
|
||||
void SCA_IScene::RemoveObjectDebugProperties(class CValue* gameobj)
|
||||
{
|
||||
vector<SCA_DebugProp*>::iterator it = m_debugList.begin();
|
||||
while(it != m_debugList.end()) {
|
||||
while (it != m_debugList.end()) {
|
||||
CValue* debugobj = (*it)->m_obj;
|
||||
|
||||
if (debugobj == gameobj) {
|
||||
|
@ -445,7 +445,7 @@ void KX_Scene::AddObjectDebugProperties(class KX_GameObject* gameobj)
|
||||
Object* blenderobject = gameobj->GetBlenderObject();
|
||||
bProperty* prop = (bProperty*)blenderobject->prop.first;
|
||||
|
||||
while(prop) {
|
||||
while (prop) {
|
||||
if (prop->flag & PROP_DEBUG)
|
||||
AddDebugProperty(gameobj,STR_String(prop->name));
|
||||
prop = prop->next;
|
||||
|
Loading…
Reference in New Issue
Block a user