diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-21 09:46:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-21 09:46:41 +0400 |
commit | f3ece5a108db0bdbefb4663ef4ebd9a7e039e263 (patch) | |
tree | cb6329453be169ef1ec49ef8b8d50a6b14364880 | |
parent | a1a0c8da13a7b91b0264c7535752864379f3d852 (diff) |
style cleanup: trailing tabs & expand some non prefix tabs into spaces.
379 files changed, 1768 insertions, 1770 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c4d0dda945a..584e8f63776 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -297,11 +297,11 @@ if(APPLE) if(${CMAKE_GENERATOR} MATCHES "Xcode") - ##### workaround for actual official cmake incompatibility with xcode 4.3 ##### + ##### workaround for actual official cmake incompatibility with xcode 4.3 ##### if(${XCODE_VERSION} MATCHES '') # cmake fails due looking for xcode in the wrong path, thus will be empty var message("Official cmake does not yet support Xcode 4.3, get a patched version here: http://www.jensverwiebe.de/Blender/CMake%202.8-7patched.zip") endif() - ### end workaround for actual official cmake incompatibility with xcode 4.3 ### + ### end workaround for actual official cmake incompatibility with xcode 4.3 ### if(${XCODE_VERSION} VERSION_EQUAL 4 OR ${XCODE_VERSION} VERSION_GREATER 4 AND ${XCODE_VERSION} VERSION_LESS 4.3) # Xcode 4 defaults to the Apple LLVM Compiler. @@ -863,7 +863,7 @@ elseif(WIN32) if(CMAKE_COMPILER_IS_GNUCC) set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw32) - # Setup 64bit and 64bit windows systems + # Setup 64bit and 64bit windows systems if(WITH_MINGW64) message("Set 64 bit compiler for MinGW.") set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw64) @@ -989,7 +989,7 @@ elseif(WIN32) if(WITH_MOD_CLOTH_ELTOPO) set(LAPACK ${LIBDIR}/lapack) # set(LAPACK_INCLUDE_DIR ${LAPACK}/include) - set(LAPACK_LIBPATH ${LAPACK}/lib) + set(LAPACK_LIBPATH ${LAPACK}/lib) set(LAPACK_LIBRARIES ${LIBDIR}/lapack/lib/libf2c.lib ${LIBDIR}/lapack/lib/clapack_nowrap.lib @@ -1129,7 +1129,7 @@ elseif(WIN32) else() set(BOOST_LIBPATH ${BOOST}/lib) set(BOOST_POSTFIX "vc90-mt-s-1_49.lib") - set(BOOST_DEBUG_POSTFIX "vc90-mt-sgd-1_49.lib") + set(BOOST_DEBUG_POSTFIX "vc90-mt-sgd-1_49.lib") endif() set(BOOST_LIBRARIES optimized libboost_date_time-${BOOST_POSTFIX} optimized libboost_filesystem-${BOOST_POSTFIX} @@ -1178,7 +1178,7 @@ elseif(WIN32) blender_include_dirs_sys("${PTHREADS_INCLUDE_DIRS}") elseif(CMAKE_COMPILER_IS_GNUCC) - # keep GCC specific stuff here + # keep GCC specific stuff here set(PLATFORM_LINKLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi") set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing") @@ -1316,7 +1316,7 @@ elseif(WIN32) else() set(BOOST_POSTFIX "mgw46-mt-s-1_49") set(BOOST_DEBUG_POSTFIX "mgw46-mt-sd-1_49") - endif() + endif() set(BOOST_LIBRARIES optimized boost_date_time-${BOOST_POSTFIX} boost_filesystem-${BOOST_POSTFIX} boost_regex-${BOOST_POSTFIX} @@ -1372,7 +1372,7 @@ elseif(APPLE) 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() + endif() if(WITH_LIBS10.5) set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-9.x.universal) diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 750903b12d7..3c321cc60be 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -525,7 +525,7 @@ macro(remove_strict_flags_file # TODO endif() - endforeach() + endforeach() unset(_SOURCE) diff --git a/intern/cycles/bvh/bvh_node.h b/intern/cycles/bvh/bvh_node.h index 5c00f7b7a38..a0d10a46bfc 100644 --- a/intern/cycles/bvh/bvh_node.h +++ b/intern/cycles/bvh/bvh_node.h @@ -54,7 +54,7 @@ public: // Subtree functions int getSubtreeSize(BVH_STAT stat=BVH_STAT_NODE_COUNT) const; - float computeSubtreeSAHCost(const BVHParams& p, float probability = 1.0f) const; + float computeSubtreeSAHCost(const BVHParams& p, float probability = 1.0f) const; void deleteSubtree(); uint update_visibility(); diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index c80adba1795..930fffa3f40 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -413,7 +413,7 @@ typedef struct ShaderData { /* view/incoming direction */ float3 I; /* shader id */ - int shader; + int shader; /* booleans describing shader, see ShaderDataFlag */ int flag; diff --git a/intern/cycles/subd/subd_build.cpp b/intern/cycles/subd/subd_build.cpp index 312980f1fa2..8e84da7f019 100644 --- a/intern/cycles/subd/subd_build.cpp +++ b/intern/cycles/subd/subd_build.cpp @@ -333,7 +333,7 @@ void SubdAccBuilder::computeEdgeStencil(SubdFaceRing *ring, GregoryAccStencil *s /* @@ this probably does not provide watertight results!! (1/3 + 1/3 + 1/3 != 1) */ /* distribute weight to all verts */ - stencil->get(eid1, vert) += beta * costerm1_b / 3.0f; + stencil->get(eid1, vert) += beta * costerm1_b / 3.0f; stencil->get(eid1, edge->to()) += beta * costerm1_b / 3.0f; stencil->get(eid1, edge->next->to()) += beta * costerm1_b / 3.0f; diff --git a/intern/ghost/GHOST_IEventConsumer.h b/intern/ghost/GHOST_IEventConsumer.h index 5682d04d434..5b6fa7ba046 100644 --- a/intern/ghost/GHOST_IEventConsumer.h +++ b/intern/ghost/GHOST_IEventConsumer.h @@ -42,8 +42,8 @@ * they want to receive events. The system will call the processEvent() method * for every installed event consumer to pass events. * \see GHOST_ISystem#addEventConsumer - * \author Maarten Gribnau - * \date May 14, 2001 + * \author Maarten Gribnau + * \date May 14, 2001 */ class GHOST_IEventConsumer { @@ -58,15 +58,14 @@ public: /** * This method is called by the system when it has events to dispatch. * \see GHOST_ISystem#dispatchEvents - * \param event The event that can be handled or ignored. - * \return Indication as to whether the event was handled. + * \param event The event that can be handled or ignored. + * \return Indication as to whether the event was handled. */ virtual bool processEvent(GHOST_IEvent *event) = 0; - + #ifdef WITH_CXX_GUARDEDALLOC MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_IEventConsumer") #endif }; -#endif // _GHOST_EVENT_CONSUMER_H_ - +#endif /* __GHOST_IEVENTCONSUMER_H__ */ diff --git a/intern/ghost/GHOST_ISystem.h b/intern/ghost/GHOST_ISystem.h index 8aef81bb762..ad5d2379787 100644 --- a/intern/ghost/GHOST_ISystem.h +++ b/intern/ghost/GHOST_ISystem.h @@ -47,14 +47,14 @@ class GHOST_IEventConsumer; * \section intro Introduction * * GHOST is yet another acronym. It stands for "Generic Handy Operating System - * Toolkit". It has been created to replace the OpenGL utility tool kit + * Toolkit". It has been created to replace the OpenGL utility tool kit * <a href="http://www.opengl.org/developers/documentation/glut.html">GLUT</a>. * GLUT was used in <a href="http://www.blender3d.com">Blender</a> until the * point that Blender needed to be ported to Apple's Mac OSX. Blender needed a * number of modifications in GLUT to work but the GLUT sources for OSX were * unavailable at the time. The decision was made to build our own replacement - * for GLUT. In those days, NaN Technologies BV was the company that developed - * Blender. + * for GLUT. In those days, NaN Technologies BV was the company that developed + * Blender. * <br><br> * Enough history. What does GHOST have to offer?<br> * In short: everything that Blender needed from GLUT to run on all it's supported @@ -96,7 +96,7 @@ class GHOST_IEventConsumer; * <li>The C-API. For programs written in C.</li> * <li>The C++-API. For programs written in C++.</li> * </ul> - * GHOST itself is writtem in C++ and the C-API is a wrapper around the C++ + * GHOST itself is writtem in C++ and the C-API is a wrapper around the C++ * API. * * \subsection cplusplus_api The C++ API consists of the following files: @@ -113,7 +113,7 @@ class GHOST_IEventConsumer; * program in the ?/ghost/test/gears/ directory. * * \subsection c_api The C-API - * To use GHOST in programs written in C, include the file GHOST_C-API.h in + * To use GHOST in programs written in C, include the file GHOST_C-API.h in * your program. This file includes the GHOST_Types.h file for all GHOST types * and defines functions that give you access to the same functionality present * in the C++ API.<br> @@ -123,7 +123,7 @@ class GHOST_IEventConsumer; * \section work Work in progress * \todo write WIP section */ - + /** \interface GHOST_ISystem * Interface for classes that provide access to the operating system. * There should be only one system class in an application. @@ -136,8 +136,8 @@ class GHOST_IEventConsumer; * -# Access to the state of the mouse buttons and the keyboard. * -# Menus for windows with events generated when they are accessed (this is * work in progress). - * \author Maarten Gribnau - * \date May 30, 2001 + * \author Maarten Gribnau + * \date May 30, 2001 */ class GHOST_ISystem { @@ -190,12 +190,12 @@ public: /** * Installs a timer. - * Note that, on most operating systems, messages need to be processed in order + * Note that, on most operating systems, messages need to be processed in order * for the timer callbacks to be invoked. - * \param delay The time to wait for the first call to the timerProc (in milliseconds) - * \param interval The interval between calls to the timerProc (in milliseconds) - * \param timerProc The callback invoked when the interval expires, - * \param userData Placeholder for user data. + * \param delay The time to wait for the first call to the timerProc (in milliseconds) + * \param interval The interval between calls to the timerProc (in milliseconds) + * \param timerProc The callback invoked when the interval expires, + * \param userData Placeholder for user data. * \return A timer task (0 if timer task installation failed). */ virtual GHOST_ITimerTask *installTimer(GHOST_TUns64 delay, @@ -225,22 +225,22 @@ public: * \return The dimension of the main display. */ virtual void getMainDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const = 0; - + /** * Create a new window. - * The new window is added to the list of windows managed. + * The new window is added to the list of windows managed. * Never explicitly delete the window, use disposeWindow() instead. - * \param title The name of the window (displayed in the title bar of the window if the OS supports it). - * \param left The coordinate of the left edge of the window. - * \param top The coordinate of the top edge of the window. - * \param width The width the window. - * \param height The height the window. - * \param state The state of the window when opened. - * \param type The type of drawing context installed in this window. - * \param stereoVisual Create a stereo visual for quad buffered stereo. - * \param numOfAASamples Number of samples used for AA (zero if no AA) - * \param parentWindow Parent (embedder) window - * \return The new window (or 0 if creation failed). + * \param title The name of the window (displayed in the title bar of the window if the OS supports it). + * \param left The coordinate of the left edge of the window. + * \param top The coordinate of the top edge of the window. + * \param width The width the window. + * \param height The height the window. + * \param state The state of the window when opened. + * \param type The type of drawing context installed in this window. + * \param stereoVisual Create a stereo visual for quad buffered stereo. + * \param numOfAASamples Number of samples used for AA (zero if no AA) + * \param parentWindow Parent (embedder) window + * \return The new window (or 0 if creation failed). */ virtual GHOST_IWindow *createWindow( const STR_String& title, @@ -252,40 +252,40 @@ public: /** * Dispose a window. - * \param window Pointer to the window to be disposed. - * \return Indication of success. + * \param window Pointer to the window to be disposed. + * \return Indication of success. */ virtual GHOST_TSuccess disposeWindow(GHOST_IWindow *window) = 0; /** * Returns whether a window is valid. - * \param window Pointer to the window to be checked. - * \return Indication of validity. + * \param window Pointer to the window to be checked. + * \return Indication of validity. */ virtual bool validWindow(GHOST_IWindow *window) = 0; /** * Begins full screen mode. - * \param setting The new setting of the display. - * \param window Window displayed in full screen. - * This window is invalid after full screen has been ended. - * \return Indication of success. + * \param setting The new setting of the display. + * \param window Window displayed in full screen. + * This window is invalid after full screen has been ended. + * \return Indication of success. */ virtual GHOST_TSuccess beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow **window, const bool stereoVisual, const GHOST_TUns16 numOfAASamples = 0) = 0; - + /** * Updates the resolution while in fullscreen mode. - * \param setting The new setting of the display. - * \param window Window displayed in full screen. + * \param setting The new setting of the display. + * \param window Window displayed in full screen. * - * \return Indication of success. + * \return Indication of success. */ virtual GHOST_TSuccess updateFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow **window) = 0; /** * Ends full screen mode. - * \return Indication of success. + * \return Indication of success. */ virtual GHOST_TSuccess endFullScreen(void) = 0; @@ -305,7 +305,7 @@ public: * \return Indication of the presence of events. */ virtual bool processEvents(bool waitForEvent) = 0; - + /** * Retrieves events from the queue and send them to the event consumers. * \return Indication of the presence of events. @@ -332,18 +332,18 @@ public: /** * Returns the current location of the cursor (location in screen coordinates) - * \param x The x-coordinate of the cursor. - * \param y The y-coordinate of the cursor. - * \return Indication of success. + * \param x The x-coordinate of the cursor. + * \param y The y-coordinate of the cursor. + * \return Indication of success. */ virtual GHOST_TSuccess getCursorPosition(GHOST_TInt32& x, GHOST_TInt32& y) const = 0; /** * Updates the location of the cursor (location in screen coordinates). * Not all operating systems allow the cursor to be moved (without the input device being moved). - * \param x The x-coordinate of the cursor. - * \param y The y-coordinate of the cursor. - * \return Indication of success. + * \param x The x-coordinate of the cursor. + * \param y The y-coordinate of the cursor. + * \return Indication of success. */ virtual GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) = 0; @@ -353,17 +353,17 @@ public: /** * Returns the state of a modifier key (ouside the message queue). - * \param mask The modifier key state to retrieve. - * \param isDown The state of a modifier key (true == pressed). - * \return Indication of success. + * \param mask The modifier key state to retrieve. + * \param isDown The state of a modifier key (true == pressed). + * \return Indication of success. */ virtual GHOST_TSuccess getModifierKeyState(GHOST_TModifierKeyMask mask, bool& isDown) const = 0; /** * Returns the state of a mouse button (ouside the message queue). - * \param mask The button state to retrieve. - * \param isDown Button state. - * \return Indication of success. + * \param mask The button state to retrieve. + * \param isDown Button state. + * \return Indication of success. */ virtual GHOST_TSuccess getButtonState(GHOST_TButtonMask mask, bool& isDown) const = 0; @@ -378,11 +378,11 @@ public: * \return current status (1 -visible, 0 - hidden) */ virtual int toggleConsole(int action) = 0; - + /*************************************************************************************** * Access to clipboard. ***************************************************************************************/ - + /** * Returns the selection buffer * \return Returns "unsinged char" from X11 XA_CUT_BUFFER0 buffer diff --git a/intern/ghost/GHOST_IWindow.h b/intern/ghost/GHOST_IWindow.h index 7ec6417ca4f..88f130aabe8 100644 --- a/intern/ghost/GHOST_IWindow.h +++ b/intern/ghost/GHOST_IWindow.h @@ -41,20 +41,20 @@ /** * Interface for GHOST windows. * - * You can create a window with the system's GHOST_ISystem::createWindow + * You can create a window with the system's GHOST_ISystem::createWindow * method. * \see GHOST_ISystem#createWindow * * There are two coordinate systems: * <ul> * <li>The screen coordinate system. The origin of the screen is located in the - * upper left corner of the screen.</li> + * upper left corner of the screen.</li> * <li>The client rectangle coordinate system. The client rectangle of a window * is the area that is drawable by the application (excluding title bars etc.). - * </li> + * </li> * </ul> - * \author Maarten Gribnau - * \date May 31, 2001 + * \author Maarten Gribnau + * \date May 31, 2001 */ class GHOST_IWindow { @@ -86,20 +86,20 @@ public: /** * Tries to install a rendering context in this window. - * \param type The type of rendering context installed. + * \param type The type of rendering context installed. * \return Indication as to whether installation has succeeded. */ virtual GHOST_TSuccess setDrawingContextType(GHOST_TDrawingContextType type) = 0; /** * Sets the title displayed in the title bar. - * \param title The title to display in the title bar. + * \param title The title to display in the title bar. */ virtual void setTitle(const STR_String& title) = 0; /** * Returns the title displayed in the title bar. - * \param title The title displayed in the title bar. + * \param title The title displayed in the title bar. */ virtual void getTitle(STR_String& title) const = 0; @@ -109,7 +109,7 @@ public: * \param bounds The bounding rectangle of the window. */ virtual void getWindowBounds(GHOST_Rect& bounds) const = 0; - + /** * Returns the client rectangle dimensions. * The left and top members of the rectangle are always zero. @@ -131,26 +131,26 @@ public: /** * Resizes client rectangle. - * \param width The new width of the client area of the window. - * \param height The new height of the client area of the window. + * \param width The new width of the client area of the window. + * \param height The new height of the client area of the window. */ virtual GHOST_TSuccess setClientSize(GHOST_TUns32 width, GHOST_TUns32 height) = 0; /** * Converts a point in screen coordinates to client rectangle coordinates - * \param inX The x-coordinate on the screen. - * \param inY The y-coordinate on the screen. - * \param outX The x-coordinate in the client rectangle. - * \param outY The y-coordinate in the client rectangle. + * \param inX The x-coordinate on the screen. + * \param inY The y-coordinate on the screen. + * \param outX The x-coordinate in the client rectangle. + * \param outY The y-coordinate in the client rectangle. */ virtual void screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const = 0; /** * Converts a point in screen coordinates to client rectangle coordinates - * \param inX The x-coordinate in the client rectangle. - * \param inY The y-coordinate in the client rectangle. - * \param outX The x-coordinate on the screen. - * \param outY The y-coordinate on the screen. + * \param inX The x-coordinate in the client rectangle. + * \param inY The y-coordinate in the client rectangle. + * \param outX The x-coordinate on the screen. + * \param outY The y-coordinate on the screen. */ virtual void clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const = 0; @@ -158,13 +158,13 @@ public: * Tells if the ongoing drag'n'drop object can be accepted upon mouse drop */ virtual void setAcceptDragOperation(bool canAccept) = 0; - + /** * Returns acceptance of the dropped object * Usually called by the "object dropped" event handling function */ virtual bool canAcceptDragOperation() const = 0; - + /** * Returns the state of the window (normal, minimized, maximized). * \return The state of the window. @@ -184,13 +184,13 @@ public: * \return Indication of success. */ virtual GHOST_TSuccess setModifiedState(bool isUnsavedChanges) = 0; - + /** * Gets the window "modified" status, indicating unsaved changes * \return True if there are unsaved changes */ virtual bool getModifiedState() = 0; - + /** * Sets the order of the window (bottom, top). * \param order The order of the window. @@ -200,13 +200,13 @@ public: /** * Swaps front and back buffers of a window. - * \return A boolean success indicator. + * \return A boolean success indicator. */ virtual GHOST_TSuccess swapBuffers() = 0; /** * Activates the drawing context of this window. - * \return A boolean success indicator. + * \return A boolean success indicator. */ virtual GHOST_TSuccess activateDrawingContext() = 0; @@ -215,71 +215,71 @@ public: * \return Indication of success. */ virtual GHOST_TSuccess invalidate() = 0; - + /** * Returns the window user data. * \return The window user data. */ virtual GHOST_TUserDataPtr getUserData() const = 0; - + /** * Changes the window user data. * \param data The window user data. */ virtual void setUserData(const GHOST_TUserDataPtr userData) = 0; - + /** * Returns the tablet data (pressure etc). * \return The tablet data (pressure etc). */ virtual const GHOST_TabletData *GetTabletData() = 0; - + /*************************************************************************************** * Progress bar functionality ***************************************************************************************/ - + /** * Sets the progress bar value displayed in the window/application icon * \param progress The progress % */ virtual GHOST_TSuccess setProgressBar(float progress) = 0; - + /** * Hides the progress bar in the icon */ virtual GHOST_TSuccess endProgressBar() = 0; - + /*************************************************************************************** * Cursor management functionality ***************************************************************************************/ /** * Returns the current cursor shape. - * \return The current cursor shape. + * \return The current cursor shape. */ virtual GHOST_TStandardCursor getCursorShape() const = 0; /** * Set the shape of the cursor. - * \param cursor The new cursor shape type id. - * \return Indication of success. + * \param cursor The new cursor shape type id. + * \return Indication of success. */ virtual GHOST_TSuccess setCursorShape(GHOST_TStandardCursor cursorShape) = 0; /** * Set the shape of the cursor to a custom cursor. - * \param bitmap The bitmap data for the cursor. - * \param mask The mask data for the cursor. - * \param hotX The X coordinate of the cursor hotspot. - * \param hotY The Y coordinate of the cursor hotspot. - * \return Indication of success. + * \param bitmap The bitmap data for the cursor. + * \param mask The mask data for the cursor. + * \param hotX The X coordinate of the cursor hotspot. + * \param hotY The Y coordinate of the cursor hotspot. + * \return Indication of success. */ - virtual GHOST_TSuccess setCustomCursorShape(GHOST_TUns8 bitmap[16][2], + virtual GHOST_TSuccess setCustomCursorShape(GHOST_TUns8 bitmap[16][2], GHOST_TUns8 mask[16][2], int hotX, int hotY) = 0; - virtual GHOST_TSuccess setCustomCursorShape(GHOST_TUns8 *bitmap, + virtual GHOST_TSuccess setCustomCursorShape(GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, int sizex, int sizey, int hotX, int hotY, @@ -287,21 +287,21 @@ public: /** * Returns the visibility state of the cursor. - * \return The visibility state of the cursor. + * \return The visibility state of the cursor. */ virtual bool getCursorVisibility() const = 0; /** * Shows or hides the cursor. - * \param visible The new visibility state of the cursor. - * \return Indication of success. + * \param visible The new visibility state of the cursor. + * \return Indication of success. */ virtual GHOST_TSuccess setCursorVisibility(bool visible) = 0; /** * Grabs the cursor for a modal operation. - * \param grab The new grab state of the cursor. - * \return Indication of success. + * \param grab The new grab state of the cursor. + * \return Indication of success. */ virtual GHOST_TSuccess setCursorGrab(GHOST_TGrabCursorMode mode, GHOST_Rect *bounds, GHOST_TInt32 mouse_ungrab_xy[2]) { return GHOST_kSuccess; } diff --git a/intern/ghost/GHOST_Rect.h b/intern/ghost/GHOST_Rect.h index aa7969d68ad..a055b6f7f0d 100644 --- a/intern/ghost/GHOST_Rect.h +++ b/intern/ghost/GHOST_Rect.h @@ -41,8 +41,8 @@ * The four extreme coordinates are stored as left, top, right and bottom. * To be valid, a rectangle should have a left coordinate smaller than or equal to right. * To be valid, a rectangle should have a top coordinate smaller than or equal to bottom. - * \author Maarten Gribnau - * \date May 10, 2001 + * \author Maarten Gribnau + * \date May 10, 2001 */ class GHOST_Rect { @@ -50,10 +50,10 @@ public: /** * Constructs a rectangle with the given values. - * \param l requested left coordinate of the rectangle - * \param t requested top coordinate of the rectangle - * \param r requested right coordinate of the rectangle - * \param b requested bottom coordinate of the rectangle + * \param l requested left coordinate of the rectangle + * \param t requested top coordinate of the rectangle + * \param r requested right coordinate of the rectangle + * \param b requested bottom coordinate of the rectangle */ GHOST_Rect(GHOST_TInt32 l = 0, GHOST_TInt32 t = 0, GHOST_TInt32 r = 0, GHOST_TInt32 b = 0) : m_l(l), m_t(t), m_r(r), m_b(b) @@ -61,12 +61,12 @@ public: /** * Copy constructor. - * \param r rectangle to copy + * \param r rectangle to copy */ GHOST_Rect(const GHOST_Rect& r) : m_l(r.m_l), m_t(r.m_t), m_r(r.m_r), m_b(r.m_b) {} - + /** * Destructor. */ @@ -74,71 +74,71 @@ public: /** * Access to rectangle width. - * \return width of the rectangle + * \return width of the rectangle */ virtual inline GHOST_TInt32 getWidth() const; /** * Access to rectangle height. - * \return height of the rectangle + * \return height of the rectangle */ virtual inline GHOST_TInt32 getHeight() const; /** * Sets all members of the rectangle. - * \param l requested left coordinate of the rectangle - * \param t requested top coordinate of the rectangle - * \param r requested right coordinate of the rectangle - * \param b requested bottom coordinate of the rectangle + * \param l requested left coordinate of the rectangle + * \param t requested top coordinate of the rectangle + * \param r requested right coordinate of the rectangle + * \param b requested bottom coordinate of the rectangle */ virtual inline void set(GHOST_TInt32 l, GHOST_TInt32 t, GHOST_TInt32 r, GHOST_TInt32 b); /** * Returns whether this rectangle is empty. * Empty rectangles are rectangles that have width==0 and/or height==0. - * \return boolean value (true==empty rectangle) + * \return boolean value (true==empty rectangle) */ virtual inline bool isEmpty() const; /** * Returns whether this rectangle is valid. * Valid rectangles are rectangles that have m_l <= m_r and m_t <= m_b. Thus, emapty rectangles are valid. - * \return boolean value (true==valid rectangle) + * \return boolean value (true==valid rectangle) */ virtual inline bool isValid() const; /** * Grows (or shrinks the rectangle). * The method avoids negative insets making the rectangle invalid - * \param i The amount of offset given to each extreme (negative values shrink the rectangle). + * \param i The amount of offset given to each extreme (negative values shrink the rectangle). */ virtual void inset(GHOST_TInt32 i); /** * Does a union of the rectangle given and this rectangle. * The result is stored in this rectangle. - * \param r The rectangle that is input for the union operation. + * \param r The rectangle that is input for the union operation. */ virtual inline void unionRect(const GHOST_Rect& r); /** * Grows the rectangle to included a point. - * \param x The x-coordinate of the point. - * \param y The y-coordinate of the point. + * \param x The x-coordinate of the point. + * \param y The y-coordinate of the point. */ virtual inline void unionPoint(GHOST_TInt32 x, GHOST_TInt32 y); /** * Grows the rectangle to included a point. - * \param x The x-coordinate of the point. - * \param y The y-coordinate of the point. + * \param x The x-coordinate of the point. + * \param y The y-coordinate of the point. */ virtual inline void wrapPoint(GHOST_TInt32 &x, GHOST_TInt32 &y, GHOST_TInt32 ofs); /** * Returns whether the point is inside this rectangle. * Point on the boundary is considered inside. - * \param x x-coordinate of point to test. + * \param x x-coordinate of point to test. * \param y y-coordinate of point to test. * \return boolean value (true if point is inside). */ @@ -146,16 +146,16 @@ public: /** * Returns whether the rectangle is inside this rectangle. - * \param r rectangle to test. - * \return visibility (not, partially or fully visible). + * \param r rectangle to test. + * \return visibility (not, partially or fully visible). */ virtual GHOST_TVisibility getVisibility(GHOST_Rect& r) const; /** * Sets rectangle members. * Sets rectangle members such that it is centered at the given location. - * \param cx requested center x-coordinate of the rectangle - * \param cy requested center y-coordinate of the rectangle + * \param cx requested center x-coordinate of the rectangle + * \param cy requested center y-coordinate of the rectangle */ virtual void setCenter(GHOST_TInt32 cx, GHOST_TInt32 cy); @@ -163,10 +163,10 @@ public: * Sets rectangle members. * Sets rectangle members such that it is centered at the given location, * with the width requested. - * \param cx requested center x-coordinate of the rectangle - * \param cy requested center y-coordinate of the rectangle - * \param w requested width of the rectangle - * \param h requested height of the rectangle + * \param cx requested center x-coordinate of the rectangle + * \param cy requested center y-coordinate of the rectangle + * \param w requested width of the rectangle + * \param h requested height of the rectangle */ virtual void setCenter(GHOST_TInt32 cx, GHOST_TInt32 cy, GHOST_TInt32 w, GHOST_TInt32 h); @@ -174,8 +174,8 @@ public: * Clips a rectangle. * Updates the rectangle given such that it will fit within this one. * This can result in an empty rectangle. - * \param r the rectangle to clip - * \return whether clipping has occurred + * \param r the rectangle to clip + * \return whether clipping has occurred */ virtual bool clip(GHOST_Rect& r) const; diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index 9b563ef7e55..868d787b5f9 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -388,7 +388,7 @@ typedef struct { typedef struct { /** Displacement of a mouse wheel. */ - GHOST_TInt32 z; + GHOST_TInt32 z; } GHOST_TEventWheelData; typedef enum { diff --git a/intern/ghost/intern/GHOST_DisplayManagerCocoa.mm b/intern/ghost/intern/GHOST_DisplayManagerCocoa.mm index c5a2fecd3b8..555f883cbf2 100644 --- a/intern/ghost/intern/GHOST_DisplayManagerCocoa.mm +++ b/intern/ghost/intern/GHOST_DisplayManagerCocoa.mm @@ -102,7 +102,7 @@ GHOST_TSuccess GHOST_DisplayManagerCocoa::getCurrentDisplaySetting(GHOST_TUns8 d GHOST_ASSERT((display==kMainDisplay), "GHOST_DisplayManagerCocoa::getCurrentDisplaySetting(): only main display is supported"); - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; if (display == kMainDisplay) //Screen #0 may not be the main one askedDisplay = [NSScreen mainScreen]; diff --git a/intern/ghost/intern/GHOST_DisplayManagerX11.cpp b/intern/ghost/intern/GHOST_DisplayManagerX11.cpp index 3d702c02b0f..754218191a5 100644 --- a/intern/ghost/intern/GHOST_DisplayManagerX11.cpp +++ b/intern/ghost/intern/GHOST_DisplayManagerX11.cpp @@ -88,7 +88,7 @@ getNumDisplaySettings( #else /* We only have one X11 setting at the moment. */ - GHOST_ASSERT(display < 1, "Only single display systems are currently supported.\n"); + GHOST_ASSERT(display < 1, "Only single display systems are currently supported.\n"); numSettings = 1; #endif @@ -130,8 +130,8 @@ getDisplaySetting( setting.bpp = DefaultDepth(dpy, DefaultScreen(dpy)); #else - GHOST_ASSERT(display < 1, "Only single display systems are currently supported.\n"); - GHOST_ASSERT(index < 1, "Requested setting outside of valid range.\n"); + GHOST_ASSERT(display < 1, "Only single display systems are currently supported.\n"); + GHOST_ASSERT(index < 1, "Requested setting outside of valid range.\n"); Display *x_display = m_system->getXDisplay(); diff --git a/intern/ghost/intern/GHOST_EventDragnDrop.h b/intern/ghost/intern/GHOST_EventDragnDrop.h index cef9bb0a34a..c51f9568087 100644 --- a/intern/ghost/intern/GHOST_EventDragnDrop.h +++ b/intern/ghost/intern/GHOST_EventDragnDrop.h @@ -72,13 +72,13 @@ class GHOST_EventDragnDrop : public GHOST_Event public: /** * Constructor. - * \param time The time this event was generated. - * \param type The type of this event. - * \param dataType The type of the drop candidate object - * \param window The window where the event occurred - * \param x The x-coordinate of the location the cursor was at at the time of the event. - * \param y The y-coordinate of the location the cursor was at at the time of the event. - * \param data The "content" dropped in the window + * \param time The time this event was generated. + * \param type The type of this event. + * \param dataType The type of the drop candidate object + * \param window The window where the event occurred + * \param x The x-coordinate of the location the cursor was at at the time of the event. + * \param y The y-coordinate of the location the cursor was at at the time of the event. + * \param data The "content" dropped in the window */ GHOST_EventDragnDrop(GHOST_TUns64 time, GHOST_TEventType type, diff --git a/intern/ghost/intern/GHOST_Rect.cpp b/intern/ghost/intern/GHOST_Rect.cpp index dc30b3eb220..9af4f30ebc1 100644 --- a/intern/ghost/intern/GHOST_Rect.cpp +++ b/intern/ghost/intern/GHOST_Rect.cpp @@ -75,7 +75,7 @@ GHOST_TVisibility GHOST_Rect::getVisibility(GHOST_Rect& r) const GHOST_TVisibility v; if (lt && rt && lb && rb) { // All points inside, rectangle is inside this - v = GHOST_kFullyVisible; + v = GHOST_kFullyVisible; } else if (!(lt || rt || lb || rb)) { // None of the points inside diff --git a/intern/ghost/intern/GHOST_System.h b/intern/ghost/intern/GHOST_System.h index 070bf914dda..d2e3377f6ce 100644 --- a/intern/ghost/intern/GHOST_System.h +++ b/intern/ghost/intern/GHOST_System.h @@ -206,7 +206,7 @@ public: ***************************************************************************************/ /** Inherited from GHOST_ISystem but left pure virtual - * GHOST_TSuccess getCursorPosition(GHOST_TInt32& x, GHOST_TInt32& y) const = 0; + * GHOST_TSuccess getCursorPosition(GHOST_TInt32& x, GHOST_TInt32& y) const = 0; * GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) */ diff --git a/intern/ghost/intern/GHOST_SystemCarbon.cpp b/intern/ghost/intern/GHOST_SystemCarbon.cpp index bb68ce8889c..f5784c7d451 100644 --- a/intern/ghost/intern/GHOST_SystemCarbon.cpp +++ b/intern/ghost/intern/GHOST_SystemCarbon.cpp @@ -126,7 +126,7 @@ static GHOST_TKey convertKey(int rawCode) */ static UInt32 dummy = 0; Handle transData = (Handle) GetScriptManagerVariable(smKCHRCache); - unsigned char vk = KeyTranslate(transData, rawCode, &dummy); + unsigned char vk = KeyTranslate(transData, rawCode, &dummy); /* Map numpad based on rawcodes first, otherwise they * look like non-numpad events. * Added too: mapping the number keys, for french keyboards etc (ton) diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index fed3bdbc8f0..351675a4130 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -966,7 +966,7 @@ bool GHOST_SystemCocoa::processEvents(bool waitForEvent) //Resend event to NSApp to ensure Mac wide events are handled [NSApp sendEvent:event]; [pool drain]; - } while (event!= nil); + } while (event != nil); #if 0 } while (waitForEvent && !anyProcessed); // Needed only for timer implementation #endif @@ -1052,7 +1052,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleWindowEvent(GHOST_TEventType eventType, case GHOST_kEventWindowSize: if (!m_ignoreWindowSizedMessages) { - //Enforce only one resize message per event loop (coalescing all the live resize messages) + //Enforce only one resize message per event loop (coalescing all the live resize messages) window->updateDrawingContext(); pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowSize, window) ); //Mouse up event is trapped by the resizing event loop, so send it anyway to the window manager @@ -1089,7 +1089,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType GHOST_TUns8 * temp_buff; GHOST_TStringArray *strArray; NSArray *droppedArray; - size_t pastedTextSize; + size_t pastedTextSize; NSString *droppedStr; GHOST_TEventDataPtr eventData; int i; @@ -1126,7 +1126,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType strArray->strings[i] = temp_buff; } - eventData = (GHOST_TEventDataPtr) strArray; + eventData = (GHOST_TEventDataPtr) strArray; break; case GHOST_kDragnDropTypeString: @@ -1326,7 +1326,7 @@ bool GHOST_SystemCocoa::handleOpenDocumentRequest(void *filepathStr) int confirmOpen = NSAlertAlternateReturn; NSArray *windowsList; char * temp_buff; - size_t filenameTextSize; + size_t filenameTextSize; GHOST_Window* window= (GHOST_Window*)m_windowManager->getActiveWindow(); if (!window) { @@ -1475,7 +1475,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr) case NSLeftMouseDragged: case NSRightMouseDragged: - case NSOtherMouseDragged: + case NSOtherMouseDragged: //Handle tablet events combined with mouse events handleTabletEvent(event); @@ -1743,7 +1743,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleKeyEvent(void *eventPtr) GHOST_TUns8* GHOST_SystemCocoa::getClipboard(bool selection) const { GHOST_TUns8 * temp_buff; - size_t pastedTextSize; + size_t pastedTextSize; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index 3ba84e157ed..c9953c80a52 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -858,7 +858,7 @@ GHOST_SystemX11::processEvent(XEvent *xe) } case DestroyNotify: - ::exit(-1); + ::exit(-1); /* We're not interested in the following things.(yet...) */ case NoExpose: case GraphicsExpose: @@ -1171,7 +1171,7 @@ generateWindowExposeEvents() *w_start ); - (*w_start)->validate(); + (*w_start)->validate(); if (g_event) { pushEvent(g_event); @@ -1603,7 +1603,7 @@ void GHOST_SystemX11::putClipboard(GHOST_TInt8 *buffer, bool selection) const { Window m_window, owner; - vector<GHOST_IWindow *> & win_vec = m_windowManager->getWindows(); + vector<GHOST_IWindow *> & win_vec = m_windowManager->getWindows(); vector<GHOST_IWindow *>::iterator win_it = win_vec.begin(); GHOST_WindowX11 *window = static_cast<GHOST_WindowX11 *>(*win_it); m_window = window->getXWindow(); diff --git a/intern/ghost/intern/GHOST_SystemX11.h b/intern/ghost/intern/GHOST_SystemX11.h index bc556490d12..02c0109085a 100644 --- a/intern/ghost/intern/GHOST_SystemX11.h +++ b/intern/ghost/intern/GHOST_SystemX11.h @@ -230,7 +230,7 @@ public: /** * Puts buffer to system clipboard - * \param buffer The buffer to copy to the clipboard + * \param buffer The buffer to copy to the clipboard * \param selection Set the selection into the clipboard, X11 only feature */ void putClipboard(GHOST_TInt8 *buffer, bool selection) const; diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index c9c902fca8b..dded7dc256d 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -720,7 +720,7 @@ GHOST_TSuccess GHOST_WindowWin32::initMultisample(PIXELFORMATDESCRIPTOR pfd) }; // Get the function - PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB = (PFNWGLCHOOSEPIXELFORMATARBPROC)wglGetProcAddress("wglChoosePixelFormatARB"); + PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB = (PFNWGLCHOOSEPIXELFORMATARBPROC)wglGetProcAddress("wglChoosePixelFormatARB"); if (!wglChoosePixelFormatARB) { diff --git a/source/blender/avi/intern/avi.c b/source/blender/avi/intern/avi.c index 15d8702a5ec..e1732b0caae 100644 --- a/source/blender/avi/intern/avi.c +++ b/source/blender/avi/intern/avi.c @@ -94,7 +94,7 @@ char *fcc_to_char(unsigned int fcc) DEBUG_FCC[2] = (fcc >> 16) & 127; DEBUG_FCC[3] = (fcc >> 24) & 127; - return DEBUG_FCC; + return DEBUG_FCC; } char *tcc_to_char(unsigned int tcc) @@ -104,7 +104,7 @@ char *tcc_to_char(unsigned int tcc) DEBUG_FCC[2] = 0; DEBUG_FCC[3] = 0; - return DEBUG_FCC; + return DEBUG_FCC; } int AVI_get_stream(AviMovie *movie, int avist_type, int stream_num) @@ -302,7 +302,7 @@ int AVI_is_avi(const char *name) MEM_freeN(movie.streams); fclose(movie.fp); - return 0; + return 0; } movie.streams[temp].sh.Type = GET_FCC(movie.fp); @@ -401,12 +401,12 @@ int AVI_is_avi(const char *name) } } - } + } if (j > 0) fseek(movie.fp, j, SEEK_CUR); } else fseek(movie.fp, movie.streams[temp].sf_size, SEEK_CUR); - /* Walk to the next LIST */ + /* Walk to the next LIST */ while (GET_FCC(movie.fp) != FCC("LIST")) { temp = GET_FCC(movie.fp); if (temp < 0 || ftell(movie.fp) > movie.size) { @@ -414,9 +414,9 @@ int AVI_is_avi(const char *name) MEM_freeN(movie.streams); fclose(movie.fp); - return 0; + return 0; } - fseek(movie.fp, temp, SEEK_CUR); + fseek(movie.fp, temp, SEEK_CUR); } fseek(movie.fp, -4L, SEEK_CUR); @@ -592,12 +592,12 @@ AviError AVI_open_movie(const char *name, AviMovie *movie) } } - } + } if (j > 0) fseek(movie->fp, j, SEEK_CUR); } else fseek(movie->fp, movie->streams[temp].sf_size, SEEK_CUR); - /* Walk to the next LIST */ + /* Walk to the next LIST */ while (GET_FCC(movie->fp) != FCC("LIST")) { temp = GET_FCC(movie->fp); if (temp < 0 || ftell(movie->fp) > movie->size) { @@ -827,7 +827,7 @@ AviError AVI_open_compress(char *name, AviMovie *movie, int streams, ...) movie->streams[i].sh.right = 0; movie->streams[i].sh.bottom = 0; - if (movie->streams[i].sh.Type == FCC("vids")) { + if (movie->streams[i].sh.Type == FCC("vids")) { #if 0 if (movie->streams[i].format == AVI_FORMAT_MJPEG) { movie->streams[i].sf = MEM_mallocN(sizeof(AviBitmapInfoHeader) + diff --git a/source/blender/avi/intern/avi_mjpeg.c b/source/blender/avi/intern/avi_mjpeg.c index b98e03d6a19..396f1199cd9 100644 --- a/source/blender/avi/intern/avi_mjpeg.c +++ b/source/blender/avi/intern/avi_mjpeg.c @@ -73,7 +73,7 @@ static void std_huff_tables(j_decompress_ptr dinfo) 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }; static const UINT8 val_dc_luminance[] = - { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; @@ -82,7 +82,7 @@ static void std_huff_tables(j_decompress_ptr dinfo) 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }; static const UINT8 val_dc_chrominance[] = - { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; @@ -91,7 +91,7 @@ static void std_huff_tables(j_decompress_ptr dinfo) 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d }; static const UINT8 val_ac_luminance[] = - { + { 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08, @@ -119,7 +119,7 @@ static void std_huff_tables(j_decompress_ptr dinfo) 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 }; static const UINT8 val_ac_chrominance[] = - { + { 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, @@ -393,7 +393,7 @@ void *avi_converter_to_mjpeg(AviMovie *movie, int stream, unsigned char *buffer, numbytes = 0; check_and_compress_jpeg(movie->streams[stream].sh.Quality / 100, buf + *size, buffer + (movie->header->Height / 2) * movie->header->Width * 3, movie->header->Width, movie->header->Height / 2, bufsize / 2); } - *size += numbytes; + *size += numbytes; MEM_freeN(buffer); return buf; diff --git a/source/blender/avi/intern/avi_rgb.c b/source/blender/avi/intern/avi_rgb.c index 61587e15e61..11d9bdf8612 100644 --- a/source/blender/avi/intern/avi_rgb.c +++ b/source/blender/avi/intern/avi_rgb.c @@ -86,7 +86,7 @@ void *avi_converter_from_avi_rgb(AviMovie *movie, int stream, unsigned char *buf *(to++) = ((*pxl >> 10) & 0x1f) * 8; *(to++) = ((*pxl >> 5) & 0x1f) * 8; *(to++) = (*pxl & 0x1f) * 8; - pxl++; + pxl++; } } diff --git a/source/blender/blenkernel/depsgraph_private.h b/source/blender/blenkernel/depsgraph_private.h index 512b799aeed..12c111f5f16 100644 --- a/source/blender/blenkernel/depsgraph_private.h +++ b/source/blender/blenkernel/depsgraph_private.h @@ -61,7 +61,7 @@ typedef struct DagAdjList { typedef struct DagNode { int color; short type; - float x, y, k; + float x, y, k; void *ob; void *first_ancestor; int ancestor_count; diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c index 82ac0736b07..cc20470b4d5 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf.c +++ b/source/blender/blenkernel/intern/CCGSubSurf.c @@ -868,7 +868,7 @@ CCGSubSurf *ccgSubSurf_new(CCGMeshIFC *ifc, int subdivLevels, CCGAllocatorIFC *a ss->oldVMap = ss->oldEMap = ss->oldFMap = NULL; ss->lenTempArrays = 0; ss->tempVerts = NULL; - ss->tempEdges = NULL; + ss->tempEdges = NULL; return ss; } diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 30804518e1d..9eae8c44776 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -1270,7 +1270,7 @@ static void shapekey_layers_to_keyblocks(DerivedMesh *dm, Mesh *me, int actshape int i, j, tot; if (!me->key) - return; + return; tot = CustomData_number_of_layers(&dm->vertData, CD_SHAPEKEY); for (i = 0; i < tot; i++) { diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 66df7eccbd0..aee7714538f 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -224,7 +224,7 @@ bActionGroup *get_active_actiongroup(bAction *act) { bActionGroup *agrp = NULL; - if (act && act->groups.first) { + if (act && act->groups.first) { for (agrp = act->groups.first; agrp; agrp = agrp->next) { if (agrp->flag & AGRP_ACTIVE) break; @@ -301,7 +301,7 @@ bActionGroup *action_groups_add_new(bAction *act, const char name[]) /* add to action, and validate */ BLI_addtail(&act->groups, agrp); - BLI_uniquename(&act->groups, agrp, "Group", '.', offsetof(bActionGroup, name), sizeof(agrp->name)); + BLI_uniquename(&act->groups, agrp, "Group", '.', offsetof(bActionGroup, name), sizeof(agrp->name)); /* return the new group */ return agrp; @@ -380,7 +380,7 @@ void action_groups_add_channel(bAction *act, bActionGroup *agrp, FCurve *fcurve) void action_groups_remove_channel(bAction *act, FCurve *fcu) { /* sanity checks */ - if (ELEM(NULL, act, fcu)) + if (ELEM(NULL, act, fcu)) return; /* check if any group used this directly */ @@ -955,7 +955,7 @@ void calc_action_range(const bAction *act, float *start, float *end, short incl_ foundmod = 1; } } - } + } if (foundvert || foundmod) { if (min == max) max += 1.0f; diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index 622658e0a49..0a403c3a79e 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -824,7 +824,7 @@ static void frames_duplilist(ListBase *lb, Scene *scene, Object *ob, int par_ind ok = (ok < ob->dupon); } - if (ok) { + if (ok) { DupliObject *dob; /* WARNING: doing animation updates in this way is not terribly accurate, as the dependencies @@ -970,7 +970,7 @@ static void vertex_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, fl } /* Start looping on Scene OR Group objects */ - while (base || go) { + while (base || go) { if (sce) { ob_iter = base->object; oblay = base->lay; @@ -1104,7 +1104,7 @@ static void face_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, floa } /* Start looping on Scene OR Group objects */ - while (base || go) { + while (base || go) { if (sce) { ob_iter = base->object; oblay = base->lay; diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 5dae2035ab0..b4c5747ff7b 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -419,7 +419,7 @@ void action_move_fcurves_by_basepath(bAction *srcAct, bAction *dstAct, const cha /* should F-Curve be moved over? * - we only need the start of the path to match basepath */ - if (animpath_matches_basepath(fcu->rna_path, basepath)) { + if (animpath_matches_basepath(fcu->rna_path, basepath)) { bActionGroup *agrp = NULL; /* if grouped... */ @@ -574,7 +574,7 @@ static char *rna_path_rename_fix(ID *owner_id, const char *prefix, const char *o */ if ( (prefixPtr && oldNamePtr) && (prefixPtr + prefixLen == oldNamePtr) ) { /* if we haven't aren't able to resolve the path now, try again after fixing it */ - if (!verify_paths || check_rna_path_is_valid(owner_id, oldpath) == 0) { + if (!verify_paths || check_rna_path_is_valid(owner_id, oldpath) == 0) { DynStr *ds = BLI_dynstr_new(); char *postfixPtr = oldNamePtr + oldNameLen; char *newPath = NULL; @@ -724,7 +724,7 @@ void BKE_animdata_fix_paths_rename(ID *owner_id, AnimData *adt, ID *ref_id, cons /* pad the names with [" "] so that only exact matches are made */ oldN = BLI_sprintfN("[\"%s\"]", oldName); newN = BLI_sprintfN("[\"%s\"]", newName); - } + } else { oldN = BLI_sprintfN("[%d]", oldSubscript); newN = BLI_sprintfN("[%d]", newSubscript); @@ -1239,7 +1239,7 @@ static short animsys_write_rna_setting(PointerRNA *ptr, char *path, int array_in if (new_ptr.type == &RNA_PoseBone) { /* bone transforms - update pose (i.e. tag depsgraph) */ skip_updates_hack = 1; - } + } if (skip_updates_hack == 0) RNA_property_update_cache_add(&new_ptr, prop); diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 197e38ac778..a5b90c0fe8d 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -119,7 +119,7 @@ void free_blender(void) BKE_sequencer_cache_destruct(); IMB_moviecache_destruct(); - free_nodesystem(); + free_nodesystem(); } void initglobals(void) @@ -237,7 +237,7 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath /* free G.main Main database */ // CTX_wm_manager_set(C, NULL); - clear_global(); + clear_global(); /* clear old property update cache, in case some old references are left dangling */ RNA_property_update_cache_free(); @@ -407,7 +407,7 @@ int BKE_read_file(bContext *C, const char *filepath, ReportList *reports) } else setup_app_data(C, bfd, filepath); // frees BFD - } + } else BKE_reports_prependf(reports, "Loading %s failed: ", filepath); diff --git a/source/blender/blenkernel/intern/bmfont.c b/source/blender/blenkernel/intern/bmfont.c index a7d90f09160..df7fb2c1807 100644 --- a/source/blender/blenkernel/intern/bmfont.c +++ b/source/blender/blenkernel/intern/bmfont.c @@ -102,7 +102,7 @@ void readBitmapFontVersion0(ImBuf * ibuf, unsigned char * rect, int step) buffer = MEM_mallocN(bytes, "readBitmapFontVersion0:buffer"); - index = 0; + index = 0; for (i = 0; i < bytes; i++) { buffer[i] = rect[index]; index += step; diff --git a/source/blender/blenkernel/intern/booleanops_mesh.c b/source/blender/blenkernel/intern/booleanops_mesh.c index be79077bb58..f1169950acd 100644 --- a/source/blender/blenkernel/intern/booleanops_mesh.c +++ b/source/blender/blenkernel/intern/booleanops_mesh.c @@ -180,7 +180,7 @@ CSG_PerformOp( if ((mesh1 == NULL) || (mesh2 == NULL) || (output == NULL)) { return 0; - } + } if ((int_op_type < 1) || (int_op_type > 3)) return 0; switch (int_op_type) { @@ -203,8 +203,8 @@ CSG_PerformOp( mesh1->m_face_iterator, mesh1->m_vertex_iterator, mesh2->m_face_iterator, - mesh2->m_vertex_iterator, - InterpFaceVertexData + mesh2->m_vertex_iterator, + InterpFaceVertexData ); } else { @@ -215,8 +215,8 @@ CSG_PerformOp( mesh1->m_face_iterator, mesh1->m_vertex_iterator, mesh2->m_face_iterator, - mesh2->m_vertex_iterator, - InterpNoUserData + mesh2->m_vertex_iterator, + InterpNoUserData ); } diff --git a/source/blender/blenkernel/intern/bullet.c b/source/blender/blenkernel/intern/bullet.c index 7defa7e1be3..088031e16a7 100644 --- a/source/blender/blenkernel/intern/bullet.c +++ b/source/blender/blenkernel/intern/bullet.c @@ -54,7 +54,7 @@ BulletSoftBody *bsbNew(void) bsb->viterations = 0; - bsb->piterations = 2; + bsb->piterations = 2; bsb->diterations = 0; bsb->citerations = 4; diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c index 8b4099a8a8c..ad828a70dd8 100644 --- a/source/blender/blenkernel/intern/bvhutils.c +++ b/source/blender/blenkernel/intern/bvhutils.c @@ -728,7 +728,7 @@ static void bvhcacheitem_set_if_match(void *_cached, void *_search) BVHCacheItem *search = (BVHCacheItem *)_search; if (search->type == cached->type) { - search->tree = cached->tree; + search->tree = cached->tree; } } diff --git a/source/blender/blenkernel/intern/camera.c b/source/blender/blenkernel/intern/camera.c index ed7ac0e1a32..9eea4bb5231 100644 --- a/source/blender/blenkernel/intern/camera.c +++ b/source/blender/blenkernel/intern/camera.c @@ -151,7 +151,7 @@ float BKE_camera_object_dof_distance(Object *ob) Camera *cam = (Camera *)ob->data; if (ob->type != OB_CAMERA) return 0.0f; - if (cam->dof_ob) { + if (cam->dof_ob) { /* too simple, better to return the distance on the view axis only * return len_v3v3(ob->obmat[3], cam->dof_ob->obmat[3]); */ float mat[4][4], imat[4][4], obmat[4][4]; diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index b176ed429f8..8934f556425 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -379,7 +379,7 @@ static void cdDM_drawUVEdges(DerivedMesh *dm) for (i = 0; i < dm->numTessFaceData; i++, mf++) { if (!(mf->flag & ME_HIDE)) { draw = 1; - } + } else { draw = 0; } @@ -438,7 +438,7 @@ static void cdDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int drawAllEdges (drawLooseEdges || !(medge->flag & ME_LOOSEEDGE))) { draw = TRUE; - } + } else { draw = FALSE; } @@ -486,7 +486,7 @@ static void cdDM_drawLooseEdges(DerivedMesh *dm) for (i = 0; i < dm->numEdgeData; i++, medge++) { if (medge->flag & ME_LOOSEEDGE) { draw = 1; - } + } else { draw = 0; } @@ -552,7 +552,7 @@ static void cdDM_drawFacesSolid(DerivedMesh *dm, glShadeModel(shademodel = new_shademodel); glBegin(glmode = new_glmode); - } + } if (drawCurrentMat) { if (shademodel == GL_FLAT) { @@ -1176,13 +1176,13 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, datatypes[numdata].size = 2; datatypes[numdata].type = GL_FLOAT; numdata++; - } + } for (b = 0; b < attribs.totmcol; b++) { datatypes[numdata].index = attribs.mcol[b].gl_index; datatypes[numdata].size = 4; datatypes[numdata].type = GL_UNSIGNED_BYTE; numdata++; - } + } if (attribs.tottang) { datatypes[numdata].index = attribs.tang.gl_index; datatypes[numdata].size = 4; @@ -1242,7 +1242,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a; copy_v4_v4_char((char *)&varray[elementsize * curface * 3 + offset + elementsize * 2], (char *)col); offset += sizeof(unsigned char) * 4; - } + } if (attribs.tottang) { float *tang = attribs.tang.array[a * 4 + 0]; copy_v4_v4((float *)&varray[elementsize * curface * 3 + offset], tang); @@ -1283,7 +1283,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a; copy_v4_v4_char((char *)&varray[elementsize * curface * 3 + offset + elementsize * 2], (char *)col); offset += sizeof(unsigned char) * 4; - } + } if (attribs.tottang) { float *tang = attribs.tang.array[a * 4 + 2]; copy_v4_v4((float *)&varray[elementsize * curface * 3 + offset], tang); @@ -2339,7 +2339,7 @@ DerivedMesh *CDDM_merge_verts(DerivedMesh *dm, const int *vtargetmap) BLI_array_append(oldp, i); } - /*create new cddm*/ + /*create new cddm*/ cddm2 = (CDDerivedMesh *) CDDM_from_template((DerivedMesh *)cddm, BLI_array_count(mvert), BLI_array_count(medge), 0, BLI_array_count(mloop), BLI_array_count(mpoly)); /*update edge indices and copy customdata*/ @@ -2364,7 +2364,7 @@ DerivedMesh *CDDM_merge_verts(DerivedMesh *dm, const int *vtargetmap) CustomData_copy_data(&dm->loopData, &cddm2->dm.loopData, oldl[i], i, 1); } - /*copy vertex customdata*/ + /*copy vertex customdata*/ mv = mvert; for (i = 0; i < cddm2->dm.numVertData; i++, mv++) { CustomData_copy_data(&dm->vertData, &cddm2->dm.vertData, oldv[i], i, 1); diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index da162ab37d0..1d23c374852 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -331,7 +331,7 @@ static int do_init_cloth(Object *ob, ClothModifierData *clmd, DerivedMesh *resul cache= clmd->point_cache; /* initialize simulation data if it didn't exist already */ - if (clmd->clothObject == NULL) { + if (clmd->clothObject == NULL) { if (!cloth_from_object(ob, clmd, result, framenr, 1)) { BKE_ptcache_invalidate(cache); return 0; diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 05c916f9362..ed22ad27811 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -515,7 +515,7 @@ static void add_collision_object(Object ***objs, unsigned int *numobj, unsigned if (((modifier_type == eModifierType_Collision) && ob->pd && ob->pd->deflect) || (modifier_type != eModifierType_Collision)) cmd= (CollisionModifierData *)modifiers_findByType(ob, modifier_type); - if (cmd) { + if (cmd) { /* extend array */ if (*numobj >= *maxobj) { *maxobj *= 2; @@ -534,7 +534,7 @@ static void add_collision_object(Object ***objs, unsigned int *numobj, unsigned /* add objects */ for (go= group->gobject.first; go; go= go->next) add_collision_object(objs, numobj, maxobj, go->ob, self, level+1, modifier_type); - } + } } // return all collision objects in scene @@ -580,7 +580,7 @@ static void add_collider_cache_object(ListBase **objs, Object *ob, Object *self, if (ob->pd && ob->pd->deflect) cmd =(CollisionModifierData *)modifiers_findByType(ob, eModifierType_Collision); - if (cmd && cmd->bvhtree) { + if (cmd && cmd->bvhtree) { if (*objs == NULL) *objs = MEM_callocN(sizeof(ListBase), "ColliderCache array"); @@ -738,8 +738,7 @@ int cloth_bvh_objcollision(Object *ob, ClothModifierData * clmd, float step, flo collision_move_object ( collmd, step + dt, step ); } - do - { + do { CollPair **collisions, **collisions_index; ret2 = 0; diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index d5d6d31b1e1..a1fa9f85577 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -85,7 +85,7 @@ void curvemapping_set_defaults(CurveMapping *cumap, int tot, float minx, float m cumap->cm[a].curve[0].y = miny; cumap->cm[a].curve[1].x = maxx; cumap->cm[a].curve[1].y = maxy; - } + } cumap->changed_timestamp = 0; } @@ -555,7 +555,7 @@ static void curvemap_make_table(CurveMap *cuma, const rctf *clipr) sub_v3_v3v3(bezt[a].vec[2], bezt[a].vec[1], vec); } } - } + } /* make the bezier curve */ if (cuma->table) MEM_freeN(cuma->table); @@ -731,7 +731,7 @@ void curvemapping_changed(CurveMapping *cumap, int rem_doubles) } if (a != cuma->totpoint - 1) curvemap_remove(cuma, 2); - } + } curvemap_make_table(cuma, clipr); } diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index e3f7ae1b1c7..a44f519e8c0 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -347,13 +347,13 @@ void constraint_mat_convertspace(Object *ob, bPoseChannel *pchan, float mat[][4] if (ELEM(to, CONSTRAINT_SPACE_WORLD, CONSTRAINT_SPACE_PARLOCAL)) { /* call self with slightly different values */ constraint_mat_convertspace(ob, pchan, mat, CONSTRAINT_SPACE_POSE, to); - } + } } break; case CONSTRAINT_SPACE_PARLOCAL: /* -------------- FROM LOCAL WITH PARENT ---------- */ { /* local + parent to pose */ - if (pchan->bone) { + if (pchan->bone) { copy_m4_m4(diff_mat, pchan->bone->arm_mat); mult_m4_m4m4(mat, mat, diff_mat); } @@ -604,15 +604,15 @@ static void constraint_target_to_mat4(Object *ob, const char *substring, float m float tempmat[4][4], loc[3]; /* interpolate along length of bone */ - interp_v3_v3v3(loc, pchan->pose_head, pchan->pose_tail, headtail); + interp_v3_v3v3(loc, pchan->pose_head, pchan->pose_tail, headtail); /* use interpolated distance for subtarget */ - copy_m4_m4(tempmat, pchan->pose_mat); + copy_m4_m4(tempmat, pchan->pose_mat); copy_v3_v3(tempmat[3], loc); mult_m4_m4m4(mat, ob->obmat, tempmat); } - } + } else copy_m4_m4(mat, ob->obmat); @@ -976,11 +976,11 @@ static void vectomat(const float vec[3], const float target_up[3], short axis, s else negate_v3(n); /* n specifies the transformation of the track axis */ - if (flags & TARGET_Z_UP) { + if (flags & TARGET_Z_UP) { /* target Z axis is the global up axis */ copy_v3_v3(u, target_up); } - else { + else { /* world Z axis is the global up axis */ u[0] = 0; u[1] = 0; @@ -1034,7 +1034,7 @@ static void trackto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *tar /* Get size property, since ob->size is only the object's own relative size, not its global one */ mat4_to_size(size, cob->matrix); - /* Clear the object's rotation */ + /* Clear the object's rotation */ cob->matrix[0][0] = size[0]; cob->matrix[0][1] = 0; cob->matrix[0][2] = 0; @@ -1468,7 +1468,7 @@ static void sizelimit_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *U if (data->flag & LIMIT_XMIN) { if (size[0] < data->xmin) - size[0] = data->xmin; + size[0] = data->xmin; } if (data->flag & LIMIT_XMAX) { if (size[0] > data->xmax) @@ -1476,7 +1476,7 @@ static void sizelimit_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *U } if (data->flag & LIMIT_YMIN) { if (size[1] < data->ymin) - size[1] = data->ymin; + size[1] = data->ymin; } if (data->flag & LIMIT_YMAX) { if (size[1] > data->ymax) @@ -1484,7 +1484,7 @@ static void sizelimit_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *U } if (data->flag & LIMIT_ZMIN) { if (size[2] < data->zmin) - size[2] = data->zmin; + size[2] = data->zmin; } if (data->flag & LIMIT_ZMAX) { if (size[2] > data->zmax) @@ -2002,7 +2002,7 @@ static void pycon_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstraintTa /* this check is to make sure curve objects get updated on file load correctly.*/ if (cu->path == NULL || cu->path->data == NULL) /* only happens on reload file, but violates depsgraph still... fix! */ - BKE_displist_make_curveTypes(cob->scene, ct->tar, 0); + BKE_displist_make_curveTypes(cob->scene, ct->tar, 0); } /* firstly calculate the matrix the normal way, then let the py-function override @@ -2937,7 +2937,7 @@ static void minmax_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targ if (data->flag & MINMAX_STICKY) { if (data->flag & MINMAX_STUCK) { copy_v3_v3(obmat[3], data->cache); - } + } else { copy_v3_v3(data->cache, obmat[3]); data->flag |= MINMAX_STUCK; @@ -2947,11 +2947,11 @@ static void minmax_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targ /* get out of localspace */ mult_m4_m4m4(tmat, ct->matrix, obmat); copy_m4_m4(cob->matrix, tmat); - } - else { + } + else { copy_v3_v3(cob->matrix[3], obmat[3]); } - } + } else { data->flag &= ~MINMAX_STUCK; } @@ -3291,7 +3291,7 @@ static void transform_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t /* extract components of owner's matrix */ copy_v3_v3(loc, cob->matrix[3]); mat4_to_eulO(eul, cob->rotOrder, cob->matrix); - mat4_to_size(size, cob->matrix); + mat4_to_size(size, cob->matrix); /* determine where in range current transforms lie */ if (data->expo) { @@ -4663,7 +4663,7 @@ short proxylocked_constraints_owner(Object *ob, bPoseChannel *pchan) else { /* FIXME: constraints on object-level are not handled well yet */ return 1; - } + } } return 0; @@ -4703,7 +4703,7 @@ void get_constraint_target_matrix(struct Scene *scene, bConstraint *con, int n, unit_m4(cob->matrix); unit_m4(cob->startmat); } - } + } break; case CONSTRAINT_OBTYPE_BONE: /* this may occur in some cases */ { diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 2c9ad38c305..0eacd78a72f 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -1076,7 +1076,7 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = { layerEqual_mloopuv, layerMultiply_mloopuv, layerInitMinMax_mloopuv, layerAdd_mloopuv, layerDoMinMax_mloopuv, layerCopyValue_mloopuv}, /* 17: CD_MLOOPCOL */ - {sizeof(MLoopCol), "MLoopCol", 1, "Col", NULL, NULL, layerInterp_mloopcol, NULL, + {sizeof(MLoopCol), "MLoopCol", 1, "Col", NULL, NULL, layerInterp_mloopcol, NULL, layerDefault_mloopcol, layerEqual_mloopcol, layerMultiply_mloopcol, layerInitMinMax_mloopcol, layerAdd_mloopcol, layerDoMinMax_mloopcol, layerCopyValue_mloopcol}, /* 18: CD_TANGENT */ diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index c96e3c01fef..950a0ca3d60 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -150,8 +150,8 @@ void queue_delete(DagNodeQueue *queue) MEM_freeN(temp); } - MEM_freeN(queue->freenodes); - MEM_freeN(queue); + MEM_freeN(queue->freenodes); + MEM_freeN(queue); } /* insert in queue, remove in front */ @@ -190,8 +190,8 @@ void push_queue(DagNodeQueue *queue, DagNode *node) } queue->freenodes->count = DAGQUEUEALLOC; - elem = queue->freenodes->first; - queue->freenodes->first = elem->next; + elem = queue->freenodes->first; + queue->freenodes->first = elem->next; } elem->next = NULL; elem->node = node; @@ -211,7 +211,7 @@ void push_stack(DagNodeQueue *queue, DagNode *node) DagNodeQueueElem *elem; int i; - elem = queue->freenodes->first; + elem = queue->freenodes->first; if (elem != NULL) { queue->freenodes->first = elem->next; if (queue->freenodes->last == elem) { @@ -235,8 +235,8 @@ void push_stack(DagNodeQueue *queue, DagNode *node) } queue->freenodes->count = DAGQUEUEALLOC; - elem = queue->freenodes->first; - queue->freenodes->first = elem->next; + elem = queue->freenodes->first; + queue->freenodes->first = elem->next; } elem->next = queue->first; elem->node = node; @@ -412,7 +412,7 @@ static void dag_add_collision_field_relation(DagForest *dag, Scene *scene, Objec if ((ob1->pd->deflect || ob1->pd->forcefield) && (ob1 != ob)) { if (skip_forcefield && ob1->pd->forcefield == skip_forcefield) continue; - node2 = dag_get_node(dag, ob1); + node2 = dag_get_node(dag, ob1); dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Field Collision"); } } @@ -464,7 +464,7 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O if (ct->tar->type == OB_MESH) node3->customdata_mask |= CD_MASK_MDEFORMVERT; } - else if (ELEM3(con->type, CONSTRAINT_TYPE_FOLLOWPATH, CONSTRAINT_TYPE_CLAMPTO, CONSTRAINT_TYPE_SPLINEIK)) + else if (ELEM3(con->type, CONSTRAINT_TYPE_FOLLOWPATH, CONSTRAINT_TYPE_CLAMPTO, CONSTRAINT_TYPE_SPLINEIK)) dag_add_relation(dag, node3, node, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, cti->name); else dag_add_relation(dag, node3, node, DAG_RL_OB_DATA, cti->name); @@ -818,7 +818,7 @@ DagForest *build_dag(Main *bmain, Scene *sce, short mask) tag_main_idcode(bmain, ID_MA, FALSE); /* add base node for scene. scene is always the first node in DAG */ - scenenode = dag_add_node(dag, sce); + scenenode = dag_add_node(dag, sce); /* add current scene objects */ for (base = sce->base.first; base; base = base->next) { @@ -872,7 +872,7 @@ DagForest *build_dag(Main *bmain, Scene *sce, short mask) } /* cycle detection and solving */ - // solve_cycles(dag); + // solve_cycles(dag); return dag; } @@ -881,23 +881,23 @@ DagForest *build_dag(Main *bmain, Scene *sce, short mask) void free_forest(DagForest *Dag) { /* remove all nodes and deps */ DagNode *tempN; - DagAdjList *tempA; + DagAdjList *tempA; DagAdjList *itA; DagNode *itN = Dag->DagNode.first; while (itN) { - itA = itN->child; + itA = itN->child; while (itA) { tempA = itA; itA = itA->next; - MEM_freeN(tempA); + MEM_freeN(tempA); } - itA = itN->parent; + itA = itN->parent; while (itA) { tempA = itA; itA = itA->next; - MEM_freeN(tempA); + MEM_freeN(tempA); } tempN = itN; @@ -1153,7 +1153,7 @@ static void dag_check_cycle(DagForest *dag) for (node = dag->DagNode.first; node; node = node->next) { while (node->parent) { itA = node->parent->next; - MEM_freeN(node->parent); + MEM_freeN(node->parent); node->parent = itA; } } @@ -1242,7 +1242,7 @@ void graph_bfs(void) itA = itA->next; } if (pos[node->BFS_dist] > node->k) { - pos[node->BFS_dist] += 1; + pos[node->BFS_dist] += 1; node->k = (float) pos[node->BFS_dist]; } else { @@ -1334,7 +1334,7 @@ DagNodeQueue *graph_dfs(void) /* int is_cycle = 0; */ /* UNUSED */ /* *fprintf(stderr, "starting DFS\n ------------\n"); - */ + */ nqueue = queue_create(DAGQUEUEALLOC); retqueue = queue_create(MainDag->numNodes); for (i = 0; i < 50; i++) @@ -1464,7 +1464,7 @@ int pre_and_post_source_DFS(DagForest *dag, short mask, DagNode *source, graph_a int retval = 0; /* * fprintf(stderr, "starting DFS\n ------------\n"); - */ + */ nqueue = queue_create(DAGQUEUEALLOC); /* Init @@ -1518,7 +1518,7 @@ int pre_and_post_source_DFS(DagForest *dag, short mask, DagNode *source, graph_a // } } itA = itA->next; - } + } if (!skip) { node = pop_queue(nqueue); @@ -1585,7 +1585,7 @@ DagNodeQueue *get_first_ancestors(struct DagForest *dag, void *ob) node1 = dag->DagNode.first; do { - if (node1->DFS_fntm > node->DFS_fntm) { + if (node1->DFS_fntm > node->DFS_fntm) { itA = node->child; while (itA != NULL) { if (itA->node == node) { @@ -1597,7 +1597,7 @@ DagNodeQueue *get_first_ancestors(struct DagForest *dag, void *ob) node1 = node1->next; } while (node1); - return nqueue; + return nqueue; } /* standard DFS list */ @@ -1643,9 +1643,9 @@ DagNodeQueue *get_all_childs(struct DagForest *dag, void *ob) push_stack(nqueue, itA->node); skip = 1; break; - } + } itA = itA->next; - } + } if (!skip) { node = pop_queue(nqueue); @@ -1673,7 +1673,7 @@ short are_obs_related(struct DagForest *dag, void *ob1, void *ob2) while (itA != NULL) { if (itA->node->ob == ob2) { return itA->node->type; - } + } itA = itA->next; } return DAG_NO_RELATION; @@ -1701,7 +1701,7 @@ void graph_print_queue(DagNodeQueue *nqueue) queueElem = nqueue->first; while (queueElem) { fprintf(stderr, "** %s %i %i-%i ", ((ID *) queueElem->node->ob)->name, queueElem->node->color, queueElem->node->DFS_dvtm, queueElem->node->DFS_fntm); - queueElem = queueElem->next; + queueElem = queueElem->next; } fprintf(stderr, "\n"); } @@ -1721,7 +1721,7 @@ void graph_print_queue_dist(DagNodeQueue *nqueue) fputc('|', stderr); fputc('\n', stderr); count = 0; - queueElem = queueElem->next; + queueElem = queueElem->next; } fprintf(stderr, "\n"); } @@ -1859,9 +1859,9 @@ void DAG_scene_sort(Main *bmain, Scene *sce) push_stack(nqueue, itA->node); skip = 1; break; - } + } itA = itA->next; - } + } if (!skip) { if (node) { @@ -1878,7 +1878,7 @@ void DAG_scene_sort(Main *bmain, Scene *sce) BLI_remlink(&sce->base, base); BLI_addhead(&tempbase, base); } - } + } } } @@ -2380,7 +2380,7 @@ static void dag_object_time_update_flags(Object *ob) } } } - } + } if (ob->recalc & OB_RECALC_OB) lib_id_recalc_tag(G.main, &ob->id); @@ -3020,9 +3020,9 @@ void DAG_pose_sort(Object *ob) push_stack(nqueue, itA->node); skip = 1; break; - } + } itA = itA->next; - } + } if (!skip) { if (node) { @@ -3034,7 +3034,7 @@ void DAG_pose_sort(Object *ob) /* put node in new list */ BLI_remlink(&pose->chanbase, node->ob); BLI_addhead(&tempbase, node->ob); - } + } } } diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index d55848514cc..ec4e25ade82 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -569,7 +569,7 @@ static void scene_setSubframe(Scene *scene, float subframe) static int surface_getBrushFlags(DynamicPaintSurface *surface, Scene *scene) { Base *base = NULL; - GroupObject *go = NULL; + GroupObject *go = NULL; Object *brushObj = NULL; ModifierData *md = NULL; @@ -4811,7 +4811,7 @@ static int dynamicPaint_doStep(Scene *scene, Object *ob, DynamicPaintSurface *su */ { Base *base = NULL; - GroupObject *go = NULL; + GroupObject *go = NULL; Object *brushObj = NULL; ModifierData *md = NULL; diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c index 7c0b43c24df..9b2439d285a 100644 --- a/source/blender/blenkernel/intern/effect.c +++ b/source/blender/blenkernel/intern/effect.c @@ -205,7 +205,7 @@ static void precalculate_effector(EffectorCache *eff) float old_vel[3]; BKE_object_where_is_calc_time(eff->scene, eff->ob, cfra - 1.0f); - copy_v3_v3(old_vel, eff->ob->obmat[3]); + copy_v3_v3(old_vel, eff->ob->obmat[3]); BKE_object_where_is_calc_time(eff->scene, eff->ob, cfra); sub_v3_v3v3(eff->velocity, eff->ob->obmat[3], old_vel); } @@ -718,8 +718,8 @@ static void get_effector_tot(EffectorCache *eff, EffectorData *efd, EffectedPoin if (eff->pd->forcefield == PFIELD_CHARGE) { /* Only the charge of the effected particle is used for - * interaction, not fall-offs. If the fall-offs aren't the - * same this will be unphysical, but for animation this + * interaction, not fall-offs. If the fall-offs aren't the + * same this will be unphysical, but for animation this * could be the wanted behavior. If you want physical * correctness the fall-off should be spherical 2.0 anyways. */ diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 2dbc63e6944..0533262666b 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -511,7 +511,7 @@ short calc_fcurve_bounds(FCurve *fcu, float *xmin, float *xmax, float *ymin, flo } /* only loop over keyframes to find extents for values if needed */ - if (ymin || ymax) { + if (ymin || ymax) { BezTriple *bezt; for (bezt = fcu->bezt, i = 0; i < fcu->totvert; bezt++, i++) { @@ -1039,7 +1039,7 @@ static float dtar_get_prop_val(ChannelDriver *driver, DriverTarget *dtar) if (RNA_path_resolve_full(&id_ptr, dtar->rna_path, &ptr, &prop, &index)) { if (RNA_property_array_check(prop)) { /* array */ - if (index < RNA_property_array_length(&ptr, prop)) { + if (index < RNA_property_array_length(&ptr, prop)) { switch (RNA_property_type(prop)) { case PROP_BOOLEAN: value = (float)RNA_property_boolean_get_index(&ptr, prop, index); @@ -1143,7 +1143,7 @@ static float dvar_eval_rotDiff(ChannelDriver *driver, DriverVar *dvar) /* stop here... */ return 0.0f; - } + } /* use the final posed locations */ mat4_to_quat(q1, pchan->pose_mat); @@ -1549,7 +1549,7 @@ ChannelDriver *fcurve_copy_driver(ChannelDriver *driver) for (dvar = ndriver->variables.first; dvar; dvar = dvar->next) { /* need to go over all targets so that we don't leave any dangling paths */ DRIVER_TARGETS_LOOPER(dvar) - { + { /* make a copy of target's rna path if available */ if (dtar->rna_path) dtar->rna_path = MEM_dupallocN(dtar->rna_path); @@ -1832,7 +1832,7 @@ static int findzero(float x, float q0, float q1, float q2, float q3, float *o) return 1; } - return 0; + return 0; } } @@ -1916,7 +1916,7 @@ static float fcurve_eval_keyframes(FCurve *fcu, BezTriple *bezts, float evaltime cvalue = prevbezt->vec[1][1]; } } - } + } else { /* Use the first handle (earlier) of first BezTriple to calculate the * gradient and thus the value of the curve at evaltime @@ -1968,7 +1968,7 @@ static float fcurve_eval_keyframes(FCurve *fcu, BezTriple *bezts, float evaltime cvalue = lastbezt->vec[1][1]; } } - } + } else { /* Use the gradient of the second handle (later) of last BezTriple to calculate the * gradient and thus the value of the curve at evaltime diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c index 1e6eb77f666..dbdf7986fb1 100644 --- a/source/blender/blenkernel/intern/fmodifier.c +++ b/source/blender/blenkernel/intern/fmodifier.c @@ -156,7 +156,7 @@ static void fcm_generator_verify(FModifier *fcm) /* free the old data */ MEM_freeN(data->coefficients); - } + } /* set the new data */ data->coefficients = nc; @@ -182,7 +182,7 @@ static void fcm_generator_verify(FModifier *fcm) /* free the old data */ MEM_freeN(data->coefficients); - } + } /* set the new data */ data->coefficients = nc; @@ -316,7 +316,7 @@ static void fcm_fn_generator_evaluate(FCurve *UNUSED(fcu), FModifier *fcm, float * WARNING: must perform special argument validation hereto guard against crashes */ switch (data->type) { - /* simple ones */ + /* simple ones */ case FCM_GENERATOR_FN_SIN: /* sine wave */ fn = sin; break; @@ -1022,7 +1022,7 @@ FModifier *add_fmodifier(ListBase *modifiers, int type) fcm->data = MEM_callocN(fmi->size, fmi->structName); /* init custom settings if necessary */ - if (fmi->new_data) + if (fmi->new_data) fmi->new_data(fcm->data); /* return modifier for further editing */ @@ -1099,7 +1099,7 @@ int remove_fmodifier(ListBase *modifiers, FModifier *fcm) if (modifiers) { BLI_freelinkN(modifiers, fcm); return 1; - } + } else { /* XXX this case can probably be removed some day, as it shouldn't happen... */ printf("remove_fmodifier() - no modifier stack given\n"); diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 06b21fbbd29..a7805d1f19a 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -177,7 +177,7 @@ static VFontData *vfont_get_data(Main *bmain, VFont *vfont) } } - return vfont->data; + return vfont->data; } VFont *BKE_vfont_load(Main *bmain, const char *name) @@ -306,23 +306,23 @@ static void build_underline(Curve *cu, float x1, float y1, float x2, float y2, i nu2->bp = bp; nu2->bp[0].vec[0] = x1; - nu2->bp[0].vec[1] = y1; + nu2->bp[0].vec[1] = y1; nu2->bp[0].vec[2] = 0; nu2->bp[0].vec[3] = 1.0f; nu2->bp[1].vec[0] = x2; nu2->bp[1].vec[1] = y1; - nu2->bp[1].vec[2] = 0; + nu2->bp[1].vec[2] = 0; nu2->bp[1].vec[3] = 1.0f; nu2->bp[2].vec[0] = x2; - nu2->bp[2].vec[1] = y2; + nu2->bp[2].vec[1] = y2; nu2->bp[2].vec[2] = 0; nu2->bp[2].vec[3] = 1.0f; nu2->bp[3].vec[0] = x1; nu2->bp[3].vec[1] = y2; - nu2->bp[3].vec[2] = 0; + nu2->bp[3].vec[2] = 0; nu2->bp[3].vec[3] = 1.0f; - BLI_addtail(&(cu->nurb), nu2); + BLI_addtail(&(cu->nurb), nu2); } @@ -545,7 +545,7 @@ struct CharTrans *BKE_vfont_to_curve(Main *bmain, Scene *scene, Object *ob, int /* The VFont Data can not be found */ if (!vfd) { if (mem) - MEM_freeN(mem); + MEM_freeN(mem); return NULL; } @@ -731,7 +731,7 @@ makebreak: if (ascii == 32) { wsfac = cu->wordspace; wsnr++; - } + } else { wsfac = 1.0f; } @@ -754,7 +754,7 @@ makebreak: for (i = 0; i <= slen; i++, tmp++, ct++) { ascii = *tmp; if (ascii == '\n' || ascii == '\r' || ct->dobreak) cu->lines++; - } + } /* linedata is now: width of line * linedata2 is now: number of characters @@ -792,7 +792,7 @@ makebreak: // } ct++; } - } + } else if ((cu->spacemode == CU_JUSTIFY) && (cu->tb[0].w != 0.0f)) { float curofs = 0.0f; for (i = 0; i <= slen; i++) { diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index 76b00ffdb1c..a7d0152a799 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -517,7 +517,7 @@ void gpencil_layer_delete(bGPdata *gpd, bGPDlayer *gpl) if (ELEM(NULL, gpd, gpl)) return; - /* free layer */ + /* free layer */ free_gpencil_frames(gpl); BLI_freelinkN(&gpd->layers, gpl); } diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c index 634428d9194..20d874e7243 100644 --- a/source/blender/blenkernel/intern/group.c +++ b/source/blender/blenkernel/intern/group.c @@ -98,7 +98,7 @@ void BKE_group_unlink(Group *group) base->object->flag &= ~OB_FROMGROUP; base->flag &= ~OB_FROMGROUP; } - } + } for (srl = sce->r.layers.first; srl; srl = srl->next) { if (srl->light_override == group) diff --git a/source/blender/blenkernel/intern/image_gen.c b/source/blender/blenkernel/intern/image_gen.c index 37572eebed6..468a88775c6 100644 --- a/source/blender/blenkernel/intern/image_gen.c +++ b/source/blender/blenkernel/intern/image_gen.c @@ -244,7 +244,7 @@ static void checker_board_color_tint(unsigned char *rect, float *rect_float, int } } - } + } } static void checker_board_grid_fill(unsigned char *rect, float *rect_float, int width, int height, float blend) diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 235d7858e17..787d5c65e9d 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -590,7 +590,7 @@ DO_INLINE void mul_bfmatrix_lfvector( float (*to)[3], fmatrix3x3 *from, lfVector for (i = from[0].vcount; i < from[0].vcount+from[0].scount; i++) { muladd_fmatrix_fvector(to[from[i].c], from[i].m, fLongVector[from[i].r]); } - } + } #pragma omp section { for (i = 0; i < from[0].vcount+from[0].scount; i++) { @@ -623,7 +623,7 @@ DO_INLINE void add_bfmatrix_bfmatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmatrix /* process diagonal elements */ for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++) { - add_fmatrix_fmatrix(to[i].m, from[i].m, matrix[i].m); + add_fmatrix_fmatrix(to[i].m, from[i].m, matrix[i].m); } } @@ -634,7 +634,7 @@ DO_INLINE void addadd_bfmatrix_bfmatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmat /* process diagonal elements */ for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++) { - addadd_fmatrix_fmatrix(to[i].m, from[i].m, matrix[i].m); + addadd_fmatrix_fmatrix(to[i].m, from[i].m, matrix[i].m); } } @@ -645,7 +645,7 @@ DO_INLINE void subadd_bfmatrix_bfmatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmat /* process diagonal elements */ for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++) { - subadd_fmatrix_fmatrix(to[i].m, from[i].m, matrix[i].m); + subadd_fmatrix_fmatrix(to[i].m, from[i].m, matrix[i].m); } } @@ -656,7 +656,7 @@ DO_INLINE void sub_bfmatrix_bfmatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmatrix /* process diagonal elements */ for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++) { - sub_fmatrix_fmatrix(to[i].m, from[i].m, matrix[i].m); + sub_fmatrix_fmatrix(to[i].m, from[i].m, matrix[i].m); } } @@ -667,7 +667,7 @@ DO_INLINE void sub_bfmatrix_Smatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmatrix3 /* process diagonal elements */ for (i = 0; i < matrix[0].vcount; i++) { - sub_fmatrix_fmatrix(to[matrix[i].c].m, from[matrix[i].c].m, matrix[i].m); + sub_fmatrix_fmatrix(to[matrix[i].c].m, from[matrix[i].c].m, matrix[i].m); } } @@ -678,7 +678,7 @@ DO_INLINE void addsub_bfmatrix_bfmatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmat /* process diagonal elements */ for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++) { - addsub_fmatrix_fmatrix(to[i].m, from[i].m, matrix[i].m); + addsub_fmatrix_fmatrix(to[i].m, from[i].m, matrix[i].m); } } @@ -691,7 +691,7 @@ DO_INLINE void subadd_bfmatrixS_bfmatrixS( fmatrix3x3 *to, fmatrix3x3 *from, flo /* process diagonal elements */ for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++) { - subadd_fmatrixS_fmatrixS(to[i].m, from[i].m, aS, matrix[i].m, bS); + subadd_fmatrixS_fmatrixS(to[i].m, from[i].m, aS, matrix[i].m, bS); } } @@ -749,7 +749,7 @@ int implicit_init(Object *UNUSED(ob), ClothModifierData *clmd) id = (Implicit_Data *)MEM_callocN(sizeof(Implicit_Data), "implicit vecmat"); cloth->implicit = id; - /* process diagonal elements */ + /* process diagonal elements */ id->A = create_bfmatrix(cloth->numverts, cloth->numsprings); id->dFdV = create_bfmatrix(cloth->numverts, cloth->numsprings); id->dFdX = create_bfmatrix(cloth->numverts, cloth->numsprings); @@ -876,8 +876,8 @@ DO_INLINE float fbstar_jacobi(float length, float L, float kb, float cb) return cb; } else { - return kb * fbderiv(length, L); - } + return kb * fbderiv(length, L); + } } DO_INLINE void filter(lfVector *V, fmatrix3x3 *S) @@ -1148,7 +1148,7 @@ DO_INLINE void dfdx_spring_type1(float to[3][3], float extent[3], float length, // dir is unit length direction, rest is spring's restlength, k is spring constant. // return (outerprod(dir, dir)*k + (I - outerprod(dir, dir))*(k - ((k*L)/length))); float temp[3][3]; - float temp1 = k*(1.0 - (L/length)); + float temp1 = k*(1.0 - (L/length)); mul_fvectorT_fvectorS(temp, extent, extent, 1.0 / dot); sub_fmatrix_fmatrix(to, I, temp); @@ -1246,7 +1246,7 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, s->flags |= CSPRING_FLAG_DEACTIVATE; return; } - } + } */ mul_fvector_S(dir, extent, 1.0f/length); } @@ -1318,9 +1318,9 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, if (length < L) { s->flags |= CLOTH_SPRING_FLAG_NEEDED; - k = clmd->sim_parms->bending; + k = clmd->sim_parms->bending; - scaling = k + s->stiffness * ABS(clmd->sim_parms->max_bend-k); + scaling = k + s->stiffness * ABS(clmd->sim_parms->max_bend-k); cb = k = scaling / (20.0*(clmd->sim_parms->avg_spring_len + FLT_EPSILON)); mul_fvector_S(bending_force, dir, fbstar(length, L, k, cb)); @@ -1337,7 +1337,7 @@ DO_INLINE void cloth_apply_spring_force(ClothModifierData *UNUSED(clmd), ClothSp if (!(s->type & CLOTH_SPRING_TYPE_BENDING)) { sub_fmatrix_fmatrix(dFdV[s->ij].m, dFdV[s->ij].m, s->dfdv); sub_fmatrix_fmatrix(dFdV[s->kl].m, dFdV[s->kl].m, s->dfdv); - add_fmatrix_fmatrix(dFdV[s->matrix_index].m, dFdV[s->matrix_index].m, s->dfdv); + add_fmatrix_fmatrix(dFdV[s->matrix_index].m, dFdV[s->matrix_index].m, s->dfdv); } VECADD(lF[s->ij], lF[s->ij], s->f); @@ -1348,7 +1348,7 @@ DO_INLINE void cloth_apply_spring_force(ClothModifierData *UNUSED(clmd), ClothSp sub_fmatrix_fmatrix(dFdX[s->kl].m, dFdX[s->kl].m, s->dfdx); sub_fmatrix_fmatrix(dFdX[s->ij].m, dFdX[s->ij].m, s->dfdx); add_fmatrix_fmatrix(dFdX[s->matrix_index].m, dFdX[s->matrix_index].m, s->dfdx); - } + } } @@ -1731,7 +1731,7 @@ static int UNUSED_FUNCTION(cloth_calc_helper_forces)(Object *UNUSED(ob), ClothMo copy_v3_v3(cos[i], cv->tx); if (cv->goal == 1.0f || len_v3v3(initial_cos[i], cv->tx) != 0.0) { - masses[i] = 1e+10; + masses[i] = 1e+10; } else { masses[i] = cv->mass; @@ -1814,7 +1814,7 @@ int implicit_solver(Object *ob, float frame, ClothModifierData *clmd, ListBase * sub_v3_v3v3(id->V[i], verts[i].xconst, verts[i].xold); // mul_v3_fl(id->V[i], clmd->sim_parms->stepsPerFrame); } - } + } } while (step < tf) { @@ -1839,7 +1839,7 @@ int implicit_solver(Object *ob, float frame, ClothModifierData *clmd, ListBase * mul_fvector_S(tvect, tvect, step+dt); VECADD(tvect, tvect, verts[i].xold); copy_v3_v3(id->Xnew[i], tvect); - } + } } copy_v3_v3(verts[i].txold, id->X[i]); @@ -1897,7 +1897,7 @@ int implicit_solver(Object *ob, float frame, ClothModifierData *clmd, ListBase * cp_lfvector(id->V, id->Vnew, numverts); // calculate - cloth_calc_force(clmd, frame, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step+dt, id->M); + cloth_calc_force(clmd, frame, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step+dt, id->M); simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt / 2.0f, id->A, id->B, id->dV, id->S, id->z, id->olddV, id->P, id->Pinv, id->M, id->bigI); } @@ -1946,6 +1946,6 @@ void implicit_set_positions(ClothModifierData *clmd) copy_v3_v3(id->V[i], verts[i].v); } if (G.debug_value > 0) - printf("implicit_set_positions\n"); + printf("implicit_set_positions\n"); } diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index b7e33f1cf71..3b08e3d2fa1 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -569,7 +569,7 @@ static const char *material_adrcodes_to_paths(int adrcode, int *array_index) return mtex_adrcodes_to_paths(adrcode, array_index); } - return NULL; + return NULL; } /* Camera Types */ @@ -727,7 +727,7 @@ static const char *world_adrcodes_to_paths(int adrcode, int *array_index) return mtex_adrcodes_to_paths(adrcode, array_index); } - return NULL; + return NULL; } /* Particle Types */ @@ -873,7 +873,7 @@ static char *get_rna_access(int blocktype, int adrcode, char actname[], char con propname = "eval_time"; break; - /* XXX problematic blocktypes */ + /* XXX problematic blocktypes */ case ID_SEQ: /* sequencer strip */ //SEQ_FAC1: switch (adrcode) { @@ -981,21 +981,21 @@ static char *get_rna_access(int blocktype, int adrcode, char actname[], char con static short adrcode_to_dtar_transchan(short adrcode) { switch (adrcode) { - case OB_LOC_X: + case OB_LOC_X: return DTAR_TRANSCHAN_LOCX; case OB_LOC_Y: return DTAR_TRANSCHAN_LOCY; case OB_LOC_Z: return DTAR_TRANSCHAN_LOCZ; - case OB_ROT_X: + case OB_ROT_X: return DTAR_TRANSCHAN_ROTX; case OB_ROT_Y: return DTAR_TRANSCHAN_ROTY; case OB_ROT_Z: return DTAR_TRANSCHAN_ROTZ; - case OB_SIZE_X: + case OB_SIZE_X: return DTAR_TRANSCHAN_SCALEX; case OB_SIZE_Y: return DTAR_TRANSCHAN_SCALEX; @@ -1645,7 +1645,7 @@ static void nlastrips_to_animdata(ID *id, ListBase *strips) /* by default, we now always extrapolate, while in the past this was optional */ if ((as->flag & ACTSTRIP_HOLDLASTFRAME) == 0) strip->extendmode = NLASTRIP_EXTEND_NOTHING; - } + } /* try to add this strip to the current NLA-Track (i.e. the 'last' one on the stack atm) */ if (BKE_nlatrack_add_strip(nlt, strip) == 0) { diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index b9bf2fd01a3..5575e99337f 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -609,7 +609,7 @@ static void cp_key(const int start, int end, const int tot, char *poin, Key *key } } else k1 += start * key->elemsize; - } + } if (mode == KEY_MODE_BEZTRIPLE) { elemstr[0] = 1; @@ -1268,7 +1268,7 @@ static void do_latt_key(Scene *scene, Object *ob, Key *key, char *out, const int do_key(a, a + 1, tot, out, key, actkb, k, t, KEY_MODE_DUMMY); else cp_key(a, a + 1, tot, out, key, actkb, k[2], NULL, KEY_MODE_DUMMY); - } + } } else { if (key->type == KEY_RELATIVE) { diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 45364f5aafa..83e7274dfc9 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -1547,7 +1547,7 @@ void rename_id(ID *id, const char *name) BLI_strncpy(id->name + 2, name, sizeof(id->name) - 2); lb = which_libbase(G.main, GS(id->name) ); - new_id(lb, id, name); + new_id(lb, id, name); } void name_uiprefix_id(char *name, ID *id) diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 7d5ed058cca..9951412063d 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -215,7 +215,7 @@ Material *BKE_material_add(const char *name) init_material(ma); - return ma; + return ma; } /* XXX keep synced with next function */ @@ -904,7 +904,7 @@ short find_material_index(Object *ob, Material *ma) break; if (a < *totcolp) return a + 1; - return 0; + return 0; } int object_add_material_slot(Object *ob) @@ -970,7 +970,7 @@ static void do_init_render_material(Material *ma, int r_mode, float *amb) ma->ambr = ma->amb * amb[0]; ma->ambg = ma->amb * amb[1]; ma->ambb = ma->amb * amb[2]; - } + } /* will become or-ed result of all node modes */ ma->mode_l = ma->mode; ma->mode_l &= ~MA_SHLESS; @@ -1613,7 +1613,7 @@ static int encode_tfaceflag(MTFace *tf, int convertall) /* calculate the flag */ int flag = tf->mode; - /* options that change the material offline render */ + /* options that change the material offline render */ if (!convertall) { flag &= ~TF_OBCOL; } @@ -1637,7 +1637,7 @@ static int encode_tfaceflag(MTFace *tf, int convertall) /* set the material options based in the tface flag */ static void decode_tfaceflag(Material *ma, int flag, int convertall) { - int alphablend; + int alphablend; GameSettings *game = &ma->game; /* flag is shifted in 1 to make 0 != no flag yet (see encode_tfaceflag) */ @@ -1796,13 +1796,13 @@ static short convert_tfacenomaterial(Main *main, Mesh *me, MTFace *tf, int flag) * for now store the flag into the material and change light/tex/collision * store the flag as a negative number */ ma->game.flag = -flag; - id_us_min((ID *)ma); + id_us_min((ID *)ma); } else printf("Error: Unable to create Material \"%s\" for Mesh \"%s\".", idname + 2, me->id.name + 2); } /* set as converted, no need to go bad to this face */ - tf->mode |= TF_CONVERTED; + tf->mode |= TF_CONVERTED; return mat_nr; } @@ -1855,7 +1855,7 @@ static void convert_tfacematerial(Main *main, Material *ma) if (mat_new) { /* rename the material*/ strcpy(mat_new->id.name, idname); - id_us_min((ID *)mat_new); + id_us_min((ID *)mat_new); mat_nr = mesh_addmaterial(me, mat_new); decode_tfaceflag(mat_new, flag, 1); @@ -2043,7 +2043,7 @@ int do_version_tface(Main *main, int fileload) nowarning = 0; } else - convert_tfacematerial(main, ma); continue; + convert_tfacematerial(main, ma); continue; } /* no conflicts in this material - 90% of cases diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index 58348483c61..33d68cc1abb 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -1630,7 +1630,7 @@ void multires_free(Multires *mr) } while (lvl) { - multires_free_level(lvl); + multires_free_level(lvl); lvl = lvl->next; } diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c index 9590160c8f3..19c9de1fdf3 100644 --- a/source/blender/blenkernel/intern/nla.c +++ b/source/blender/blenkernel/intern/nla.c @@ -496,7 +496,7 @@ float nlastrip_get_frame(NlaStrip *strip, float cframe, short mode) case NLASTRIP_TYPE_CLIP: /* action-clip (default) */ default: return nlastrip_get_frame_actionclip(strip, cframe, mode); - } + } } @@ -1162,7 +1162,7 @@ static short nlastrip_is_first(AnimData *adt, NlaStrip *strip) if (ns->start < strip->start) return 0; } - } + } /* should be first now */ return 1; @@ -1491,7 +1491,7 @@ void BKE_nla_action_pushdown(AnimData *adt) /* add a new NLA strip to the track, which references the active action */ strip = add_nlastrip_to_stack(adt, adt->action); - /* do other necessary work on strip */ + /* do other necessary work on strip */ if (strip) { /* clear reference to action now that we've pushed it onto the stack */ id_us_min(&adt->action->id); @@ -1545,7 +1545,7 @@ short BKE_nla_tweakmode_enter(AnimData *adt) /* now try to find active strip */ activeStrip = BKE_nlastrip_find_active(nlt); break; - } + } } /* There are situations where we may have multiple strips selected and we want to enter tweakmode on all @@ -1563,7 +1563,7 @@ short BKE_nla_tweakmode_enter(AnimData *adt) activeStrip = BKE_nlastrip_find_active(nlt); break; } - } + } } if ((activeTrack) && (activeStrip == NULL)) { /* no active strip in active or last selected track; compromise for first selected (assuming only single)... */ diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 0ff6b7abbca..4fff8ddf700 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -818,7 +818,7 @@ void nodeFreePreview(bNode *node) MEM_freeN(node->preview->rect); MEM_freeN(node->preview); node->preview = NULL; - } + } } static void node_init_preview(bNode *node, int xsize, int ysize) @@ -861,7 +861,7 @@ void ntreeInitPreview(bNodeTree *ntree, int xsize, int ysize) node_init_preview(node, xsize, ysize); if (node->type == NODE_GROUP && (node->flag & NODE_GROUP_EDIT)) ntreeInitPreview((bNodeTree *)node->id, xsize, ysize); - } + } } static void nodeClearPreview(bNode *node) @@ -883,7 +883,7 @@ void ntreeClearPreview(bNodeTree *ntree) nodeClearPreview(node); if (node->type == NODE_GROUP && (node->flag & NODE_GROUP_EDIT)) ntreeClearPreview((bNodeTree *)node->id); - } + } } /* hack warning! this function is only used for shader previews, and diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index ca41c83cde4..0fcf1be7e2d 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -454,7 +454,7 @@ void BKE_object_unlink(Object *ob) if (pchan->custom == ob) pchan->custom = NULL; } - } + } else if (ELEM(OB_MBALL, ob->type, obt->type)) { if (BKE_mball_is_basis_for(obt, ob)) obt->recalc |= OB_RECALC_DATA; diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 60d3b7a8846..8bf11723fd5 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -336,7 +336,7 @@ void psys_check_group_weights(ParticleSettings *part) BLI_addtail(&part->dupliweights, dw); } - go = go->next; + go = go->next; } dw = part->dupliweights.first; @@ -561,7 +561,7 @@ void psys_free(Object *ob, ParticleSystem *psys) ob->transflag &= ~OB_DUPLIPARTS; if (psys->part) { - psys->part->id.us--; + psys->part->id.us--; psys->part = NULL; } diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index af8bfd04836..c1501ccc359 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -1583,7 +1583,7 @@ static void get_angular_velocity_vector(short avemode, ParticleKey *state, float switch (avemode) { case PART_AVE_VELOCITY: copy_v3_v3(vec, state->vel); - break; + break; case PART_AVE_HORIZONTAL: { float zvec[3]; @@ -2537,7 +2537,7 @@ static void sph_force_cb(void *sphdata_v, ParticleKey *state, float *force, floa madd_v3_v3fl(force, vec, -(pressure + near_pressure*q)*q); /* Viscosity */ - if (visc > 0.f || stiff_visc > 0.f) { + if (visc > 0.f || stiff_visc > 0.f) { sub_v3_v3v3(dv, vel, state->vel); u = dot_v3v3(vec, dv); @@ -3166,8 +3166,7 @@ void BKE_psys_collision_neartest_cb(void *userdata, int index, const BVHTreeRay if (col->hit == col->current && col->pce.index == index && col->pce.tot == 3) return; - do - { + do { collision = collision_sphere_to_tri(col, ray->radius, &pce, &t); if (col->pce.inside == 0) { collision += collision_sphere_to_edges(col, ray->radius, &pce, &t); @@ -4076,7 +4075,7 @@ static void particles_fluid_step(ParticleSimulationData *sim, int UNUSED(cfra)) { FluidsimModifierData *fluidmd = (FluidsimModifierData *)modifiers_findByType(sim->ob, eModifierType_Fluidsim); - if ( fluidmd && fluidmd->fss) { + if ( fluidmd && fluidmd->fss) { FluidsimSettings *fss= fluidmd->fss; ParticleSettings *part = psys->part; ParticleData *pa=NULL; diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index e9115ae72e6..98dce0894a8 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -1363,7 +1363,7 @@ static int ptcache_file_compressed_write(PTCacheFile *pf, unsigned char *in, uns if (mode == 1) { LZO_HEAP_ALLOC(wrkmem, LZO1X_MEM_COMPRESS); - r = lzo1x_1_compress(in, (lzo_uint)in_len, out, (lzo_uint *)&out_len, wrkmem); + r = lzo1x_1_compress(in, (lzo_uint)in_len, out, (lzo_uint *)&out_len, wrkmem); if (!(r == LZO_E_OK) || (out_len >= in_len)) compressed = 0; else @@ -2273,7 +2273,7 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, unsigned int cfra) /* clear all files in the temp dir with the prefix of the ID and the ".bphys" suffix */ switch (mode) { case PTCACHE_CLEAR_ALL: - case PTCACHE_CLEAR_BEFORE: + case PTCACHE_CLEAR_BEFORE: case PTCACHE_CLEAR_AFTER: if (pid->cache->flag & PTCACHE_DISK_CACHE) { ptcache_path(pid, path); @@ -2464,7 +2464,7 @@ void BKE_ptcache_id_time(PTCacheID *pid, Scene *scene, float cfra, int *startfra if (MEM_allocN_len(cache->cached_frames) != sizeof(char) * (cache->endframe-cache->startframe+1)) { MEM_freeN(cache->cached_frames); cache->cached_frames = NULL; - } + } } if (cache->cached_frames==NULL && cache->endframe > cache->startframe) { @@ -3414,7 +3414,7 @@ void BKE_ptcache_update_info(PTCacheID *pid) } } else { - PTCacheMem *pm = cache->mem_cache.first; + PTCacheMem *pm = cache->mem_cache.first; float bytes = 0.0f; int i, mb; diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 39b404e23d4..dd09094c30c 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -325,7 +325,7 @@ void BKE_scene_free(Scene *sce) BKE_paint_free(&sce->toolsettings->imapaint.paint); MEM_freeN(sce->toolsettings); - sce->toolsettings = NULL; + sce->toolsettings = NULL; } if (sce->theDag) { @@ -436,7 +436,7 @@ Scene *BKE_scene_add(const char *name) sce->toolsettings->cornertype = 1; sce->toolsettings->degr = 90; sce->toolsettings->step = 9; - sce->toolsettings->turn = 1; + sce->toolsettings->turn = 1; sce->toolsettings->extr_offs = 1; sce->toolsettings->doublimit = 0.001; sce->toolsettings->segments = 32; @@ -958,7 +958,7 @@ float BKE_scene_frame_get_from_ctime(Scene *scene, const float frame) { float ctime = frame; ctime += scene->r.subframe; - ctime *= scene->r.framelen; + ctime *= scene->r.framelen; return ctime; } diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c index 22b5c180259..70962553c31 100644 --- a/source/blender/blenkernel/intern/seqeffects.c +++ b/source/blender/blenkernel/intern/seqeffects.c @@ -600,7 +600,7 @@ static void makeGammaTables(float gamma) color_step = 1.0f / RE_GAMMA_TABLE_SIZE; inv_color_step = (float) RE_GAMMA_TABLE_SIZE; - /* We could squeeze out the two range tables to gain some memory */ + /* We could squeeze out the two range tables to gain some memory */ for (i = 0; i < RE_GAMMA_TABLE_SIZE; i++) { color_domain_table[i] = i * color_step; gamma_range_table[i] = pow(color_domain_table[i], valid_gamma); @@ -2373,7 +2373,7 @@ static ImBuf *do_solid_color(SeqRenderData context, Sequence *seq, float UNUSED( rect[1] = col1[1]; rect[2] = col1[2]; rect[3] = 255; - } + } } } @@ -2609,7 +2609,7 @@ static void store_icu_yrange_speed(Sequence *seq, short UNUSED(adrcode), float * *ymin = 0.0; *ymax = seq->len; } - } + } } void BKE_sequence_effect_speed_rebuild_map(Scene *scene, Sequence *seq, int force) diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 49ed7f80be3..7d504875567 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -991,7 +991,7 @@ static float give_stripelem_index(Sequence *seq, float cfra) if (seq->type & SEQ_TYPE_EFFECT) { end = seq->enddisp; - } + } if (end < sta) { return -1; @@ -1882,7 +1882,7 @@ static ImBuf *input_preprocess(SeqRenderData context, Sequence *seq, float cfra, ibuf = i; } - } + } if (seq->flag & SEQ_FLIPX) { IMB_flipx(ibuf); @@ -1978,7 +1978,7 @@ static void copy_to_ibuf_still(SeqRenderData context, Sequence *seq, float nr, I if (nr == 0) { BKE_sequencer_cache_put(context, seq, seq->start, SEQ_STRIPELEM_IBUF_STARTSTILL, ibuf); - } + } if (nr == seq->len - 1) { BKE_sequencer_cache_put(context, seq, seq->start, SEQ_STRIPELEM_IBUF_ENDSTILL, ibuf); @@ -2356,9 +2356,10 @@ static ImBuf *seq_render_scene_strip(SeqRenderData context, Sequence *seq, float oldcfra = scene->r.cfra; scene->r.cfra = frame; - if (seq->scene_camera) + if (seq->scene_camera) { camera = seq->scene_camera; - else { + } + else { BKE_scene_camera_switch_update(scene); camera = scene->camera; } diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 05d0705107d..b9ca3c9cc63 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -314,7 +314,7 @@ int BKE_text_reload(Text *text) fseek(fp, 0L, SEEK_END); len = ftell(fp); - fseek(fp, 0L, SEEK_SET); + fseek(fp, 0L, SEEK_SET); text->undo_pos = -1; @@ -370,7 +370,7 @@ int BKE_text_reload(Text *text) text->curl = text->sell = text->lines.first; text->curc = text->selc = 0; - MEM_freeN(buffer); + MEM_freeN(buffer); return 1; } @@ -404,7 +404,7 @@ Text *BKE_text_load(const char *file, const char *relpath) fseek(fp, 0L, SEEK_END); len = ftell(fp); - fseek(fp, 0L, SEEK_SET); + fseek(fp, 0L, SEEK_SET); ta->name = MEM_mallocN(strlen(file) + 1, "text_name"); strcpy(ta->name, file); @@ -469,7 +469,7 @@ Text *BKE_text_load(const char *file, const char *relpath) ta->curl = ta->sell = ta->lines.first; ta->curc = ta->selc = 0; - MEM_freeN(buffer); + MEM_freeN(buffer); return ta; } @@ -683,7 +683,7 @@ void txt_clean_text(Text *text) if (!text->lines.first) { if (text->lines.last) text->lines.first = text->lines.last; else text->lines.first = text->lines.last = txt_new_line(NULL); - } + } if (!text->lines.last) text->lines.last = text->lines.first; @@ -732,7 +732,7 @@ int txt_get_span(TextLine *from, TextLine *to) if (!tmp) ret = 0; } - return ret; + return ret; } static void txt_make_dirty(Text *text) @@ -934,7 +934,7 @@ void txt_move_right(Text *text, short sel) txt_move_down(text, sel); *charp = 0; } - } + } else { // do nice right only if there are only spaces // spaces hardcoded in DNA_text_types.h @@ -1376,7 +1376,7 @@ int txt_find_string(Text *text, const char *findstr, int wrap, int match_case) int newc = (int)(s - tl->line); txt_move_to(text, newl, newc, 0); txt_move_to(text, newl, newc + strlen(findstr), 1); - return 1; + return 1; } else return 0; @@ -1458,7 +1458,7 @@ char *txt_sel_to_buf(Text *text) length += charl; buf[length] = 0; - } + } return buf; } @@ -2078,7 +2078,7 @@ void txt_do_undo(Text *text) charp = op - UNDO_BS_1 + 1; txt_add_char(text, txt_undo_read_unicode(text->undo_buf, &text->undo_pos, charp)); text->undo_pos--; - break; + break; case UNDO_DEL_1: case UNDO_DEL_2: case UNDO_DEL_3: case UNDO_DEL_4: charp = op - UNDO_DEL_1 + 1; @@ -2104,7 +2104,7 @@ void txt_do_undo(Text *text) txt_curs_first(text, &holdl, &holdc); holdln = txt_get_span(text->lines.first, holdl); - txt_insert_buf(text, buf); + txt_insert_buf(text, buf); MEM_freeN(buf); text->curl = text->lines.first; @@ -2235,7 +2235,7 @@ void txt_do_redo(Text *text) unsigned short charp; char *buf; - text->undo_pos++; + text->undo_pos++; op = text->undo_buf[text->undo_pos]; if (!op) { @@ -2351,7 +2351,7 @@ void txt_do_redo(Text *text) text->undo_pos += linep; buf[linep] = 0; - txt_insert_buf(text, buf); + txt_insert_buf(text, buf); MEM_freeN(buf); text->undo_pos++; @@ -2369,7 +2369,7 @@ void txt_do_redo(Text *text) //charp is the first char selected or 0 linep = txt_redo_read_uint32(text->undo_buf, &text->undo_pos); - //linep is now the first line of the selection + //linep is now the first line of the selection //set the selcetion for this now text->curc = charp; text->curl = text->lines.first; @@ -2476,7 +2476,7 @@ void txt_split_curline(Text *text) text->curl->format = NULL; text->curl->len = text->curl->len - text->curc; - BLI_insertlinkbefore(&text->lines, text->curl, ins); + BLI_insertlinkbefore(&text->lines, text->curl, ins); text->curc = 0; diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 300d272b86b..efc7a281636 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -646,7 +646,7 @@ MTex *add_mtex_id(ID *id, int slot) if (slot == -1) { /* find first free */ - int i; + int i; for (i = 0; i < MAX_MTEX; i++) { if (!mtex_ar[i]) { slot = i; diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c index 434bfe19c1f..4bde895cf7d 100644 --- a/source/blender/blenkernel/intern/world.c +++ b/source/blender/blenkernel/intern/world.c @@ -107,7 +107,7 @@ World *add_world(const char *name) wrld->ao_indirect_energy = 1.0f; wrld->ao_indirect_bounces = 1; wrld->aobias = 0.05f; - wrld->ao_samp_method = WO_AOSAMP_HAMMERSLEY; + wrld->ao_samp_method = WO_AOSAMP_HAMMERSLEY; wrld->ao_approx_error = 0.25f; wrld->preview = NULL; diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index 5117c833c69..5fd790990ec 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -1225,7 +1225,7 @@ int BKE_ffmpeg_property_add_string(RenderData *rd, const char *type, const char while (*param == ' ') param++; } - o = my_av_find_opt(&c, name, NULL, 0, 0); + o = my_av_find_opt(&c, name, NULL, 0, 0); if (!o) { return 0; } @@ -1233,7 +1233,7 @@ int BKE_ffmpeg_property_add_string(RenderData *rd, const char *type, const char return 0; } if (param && o->type != FF_OPT_TYPE_CONST && o->unit) { - p = my_av_find_opt(&c, param, o->unit, 0, 0); + p = my_av_find_opt(&c, param, o->unit, 0, 0); if (p) { prop = BKE_ffmpeg_property_add(rd, (char *) type, p - c.av_class->option, o - c.av_class->option); } diff --git a/source/blender/blenlib/BLI_dlrbTree.h b/source/blender/blenlib/BLI_dlrbTree.h index d04e544376a..bdde8dbd597 100644 --- a/source/blender/blenlib/BLI_dlrbTree.h +++ b/source/blender/blenlib/BLI_dlrbTree.h @@ -46,7 +46,7 @@ /* Basic Layout for a Node */ typedef struct DLRBT_Node { /* ListBase capabilities */ - struct DLRBT_Node *next, *prev; + struct DLRBT_Node *next, *prev; /* Tree Associativity settings */ struct DLRBT_Node *left, *right; diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index 9fbbd7d498d..414612dcce5 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -1469,7 +1469,7 @@ static void iterative_raycast(BVHRayCastData *data, BVHNode *node) } else { node = node->children[0]; - } + } } } #endif diff --git a/source/blender/blenlib/intern/freetypefont.c b/source/blender/blenlib/intern/freetypefont.c index 4ccfb625241..018d64b86a7 100644 --- a/source/blender/blenlib/intern/freetypefont.c +++ b/source/blender/blenlib/intern/freetypefont.c @@ -282,7 +282,7 @@ static void freetypechar_to_vchar(FT_Face face, FT_ULong charcode, VFontData *vf } } if (npoints) MEM_freeN(npoints); - if (onpoints) MEM_freeN(onpoints); + if (onpoints) MEM_freeN(onpoints); } } @@ -404,7 +404,7 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile *pf) lcode = charcode; } - return vfd; + return vfd; } diff --git a/source/blender/blenlib/intern/graph.c b/source/blender/blenlib/intern/graph.c index 51d7cb58b00..a93bbd97b51 100644 --- a/source/blender/blenlib/intern/graph.c +++ b/source/blender/blenlib/intern/graph.c @@ -353,12 +353,12 @@ int BLI_isGraphCyclic(BGraph *graph) /* Mark all nodes as not visited */ BLI_flagNodes(graph, 0); - /* detectCycles in subgraphs */ + /* detectCycles in subgraphs */ for (node = graph->nodes.first; node && value == 0; node = node->next) { /* only for nodes in subgraphs that haven't been visited yet */ if (node->flag == 0) { value = value || detectCycle(node, NULL); - } + } } return value; @@ -639,11 +639,11 @@ static void handleRadialSymmetry(BGraph *graph, BNode *root_node, int depth, flo /* if not dispatching already and on last arc * Dispatch using current arc as last - * */ + */ if (dispatch == 0 && i == total - 1) { last = i; dispatch = 1; - } + } if (dispatch) { int sub_total = last - first + 1; @@ -796,7 +796,7 @@ static void markdownSecondarySymmetry(BGraph *graph, BNode *node, int depth, int /* count the number of branches in this symmetry group * and determinate the axis of symmetry - * */ + */ for (i = 0; i < node->degree; i++) { BArc *connectedArc = node->arcs[i]; @@ -821,7 +821,7 @@ static void markdownSecondarySymmetry(BGraph *graph, BNode *node, int depth, int handleRadialSymmetry(graph, node, depth, axis, limit); } - /* markdown secondary symetries */ + /* markdown secondary symetries */ for (i = 0; i < node->degree; i++) { BArc *connectedArc = node->arcs[i]; @@ -836,7 +836,7 @@ static void markdownSymmetryArc(BGraph *graph, BArc *arc, BNode *node, int level { int i; - /* if arc is null, we start straight from a node */ + /* if arc is null, we start straight from a node */ if (arc) { arc->symmetry_level = level; @@ -875,7 +875,7 @@ static void markdownSymmetryArc(BGraph *graph, BArc *arc, BNode *node, int level /* not on the symmetry axis */ issymmetryAxis = 0; break; - } + } } } diff --git a/source/blender/blenlib/intern/listbase.c b/source/blender/blenlib/intern/listbase.c index ad718ed8e11..9f6f409c473 100644 --- a/source/blender/blenlib/intern/listbase.c +++ b/source/blender/blenlib/intern/listbase.c @@ -141,7 +141,7 @@ void BLI_insertlink(ListBase *listbase, void *vprevlink, void *vnewlink) if (listbase == NULL) return; /* empty list */ - if (listbase->first == NULL) { + if (listbase->first == NULL) { listbase->first = newlink; listbase->last = newlink; @@ -149,7 +149,7 @@ void BLI_insertlink(ListBase *listbase, void *vprevlink, void *vnewlink) } /* insert before first element */ - if (prevlink == NULL) { + if (prevlink == NULL) { newlink->next = listbase->first; newlink->prev = NULL; newlink->next->prev = newlink; @@ -203,14 +203,14 @@ void BLI_insertlinkafter(ListBase *listbase, void *vprevlink, void *vnewlink) if (listbase == NULL) return; /* empty list */ - if (listbase->first == NULL) { + if (listbase->first == NULL) { listbase->first = newlink; listbase->last = newlink; return; } /* insert at head of list */ - if (prevlink == NULL) { + if (prevlink == NULL) { newlink->prev = NULL; newlink->next = listbase->first; ((Link *)listbase->first)->prev = newlink; @@ -238,14 +238,14 @@ void BLI_insertlinkbefore(ListBase *listbase, void *vnextlink, void *vnewlink) if (listbase == NULL) return; /* empty list */ - if (listbase->first == NULL) { + if (listbase->first == NULL) { listbase->first = newlink; listbase->last = newlink; return; } /* insert at end of list */ - if (nextlink == NULL) { + if (nextlink == NULL) { newlink->prev = listbase->last; newlink->next = NULL; ((Link *)listbase->last)->next = newlink; diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index 0ae18d6e177..444daf8817c 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -330,7 +330,7 @@ void BLI_cleanup_path(const char *relabase, char *dir) if (strcmp(dir, ".") == 0) { /* happens for example in FILE_MAIN */ get_default_root(dir); return; - } + } while ( (start = strstr(dir, "\\..\\")) ) { eind = start + strlen("\\..\\") - 1; @@ -492,7 +492,7 @@ void BLI_path_rel(char *file, const char *relfile) */ if (*q != '/') { while ( (q >= file) && (*q != '/') ) { --q; --p; } - } + } else if (*p != '/') { while ( (p >= temp) && (*p != '/') ) { --p; --q; } } @@ -544,7 +544,7 @@ int BLI_parent_dir(char *path) BLI_cleanup_dir(NULL, tmp); if (!BLI_testextensie(tmp, parent_dir)) { - BLI_strncpy(path, tmp, sizeof(tmp)); + BLI_strncpy(path, tmp, sizeof(tmp)); return 1; } else { @@ -691,7 +691,7 @@ int BLI_path_abs(char *path, const char *basepath) * of paths and solving some problems (and prevent potential future * ones) -jesterKing. */ BLI_char_switch(tmp, '\\', '/'); - BLI_char_switch(base, '\\', '/'); + BLI_char_switch(base, '\\', '/'); /* Paths starting with // will get the blend file as their base, * this isn't standard in any os but is used in blender all over the place */ @@ -1300,7 +1300,7 @@ void BLI_make_file_string(const char *relabase, char *string, const char *dir, BLI_char_switch(file, '\\', '/'); #endif - /* Resolve relative references */ + /* Resolve relative references */ if (relabase && dir[0] == '/' && dir[1] == '/') { char *lslash; @@ -1321,7 +1321,7 @@ void BLI_make_file_string(const char *relabase, char *string, const char *dir, else { /* no drive specified */ /* first option: get the drive from the relabase if it has one */ if (relabase && strlen(relabase) >= 2 && relabase[1] == ':') { - BLI_strncpy(string, relabase, 3); + BLI_strncpy(string, relabase, 3); string[2] = '\\'; string[3] = '\0'; } @@ -1337,7 +1337,7 @@ void BLI_make_file_string(const char *relabase, char *string, const char *dir, strcat(string, dir); - /* Make sure string ends in one (and only one) slash */ + /* Make sure string ends in one (and only one) slash */ /* first trim all slashes from the end of the string */ sl = strlen(string); while (sl > 0 && (string[sl - 1] == '/' || string[sl - 1] == '\\') ) { diff --git a/source/blender/blenlib/intern/pbvh.c b/source/blender/blenlib/intern/pbvh.c index d3d8d371f60..bf237ffd75a 100644 --- a/source/blender/blenlib/intern/pbvh.c +++ b/source/blender/blenlib/intern/pbvh.c @@ -1630,9 +1630,9 @@ static PlaneAABBIsect test_planes_aabb(const float bb_min[3], PlaneAABBIsect ret = ISECT_INSIDE; int i, axis; - for (i = 0; i < 4; ++i) { + for (i = 0; i < 4; ++i) { for (axis = 0; axis < 3; ++axis) { - if (planes[i][axis] > 0) { + if (planes[i][axis] > 0) { vmin[axis] = bb_min[axis]; vmax[axis] = bb_max[axis]; } @@ -1646,7 +1646,7 @@ static PlaneAABBIsect test_planes_aabb(const float bb_min[3], return ISECT_OUTSIDE; else if (dot_v3v3(planes[i], vmax) + planes[i][3] >= 0) ret = ISECT_INTERSECT; - } + } return ret; } diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index dec04939724..1358fdd2a62 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -187,7 +187,7 @@ double BLI_dir_free_space(const char *dir) #endif #if defined(__sun__) || defined(__sun) || defined(__NetBSD__) - if (statvfs(name, &disk)) return(-1); + if (statvfs(name, &disk)) return(-1); #elif !defined(__FreeBSD__) && !defined(linux) && (defined(__sparc) || defined(__sparc__)) /* WARNING - This may not be supported by geeneric unix os's - Campbell */ if (statfs(name, &disk, sizeof(struct statfs), 0)) return(-1); diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c index 4b64a650b52..40b2fc20cfa 100644 --- a/source/blender/blenlib/intern/string.c +++ b/source/blender/blenlib/intern/string.c @@ -377,7 +377,7 @@ int BLI_natstrcmp(const char *s1, const char *s2) c2 = tolower(s2[d2]); } - /* first check for '.' so "foo.bar" comes before "foo 1.bar" */ + /* first check for '.' so "foo.bar" comes before "foo 1.bar" */ if (c1 == '.' && c2 != '.') return -1; if (c1 != '.' && c2 == '.') diff --git a/source/blender/blenlib/intern/time.c b/source/blender/blenlib/intern/time.c index bf9720fee09..078fc2c295b 100644 --- a/source/blender/blenlib/intern/time.c +++ b/source/blender/blenlib/intern/time.c @@ -44,7 +44,7 @@ double PIL_check_seconds_timer(void) __int64 ifreq; hasperfcounter = QueryPerformanceFrequency((LARGE_INTEGER *) &ifreq); perffreq = (double) ifreq; - } + } if (hasperfcounter) { __int64 count; diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c index a0b31f8d5b8..68d9d74cca4 100644 --- a/source/blender/blenlib/intern/winstuff.c +++ b/source/blender/blenlib/intern/winstuff.c @@ -293,7 +293,7 @@ void get_default_root(char *root) root[3] = '\0'; if (GetFileAttributes(root) != 0xFFFFFFFF) { rc = i; - break; + break; } } } @@ -304,7 +304,7 @@ void get_default_root(char *root) root[2] = '\\'; root[3] = '\0'; } - } + } } } diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c index e917ccdf342..e9caa337129 100644 --- a/source/blender/blenloader/intern/readblenentry.c +++ b/source/blender/blenloader/intern/readblenentry.c @@ -175,7 +175,7 @@ LinkNode *BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype, int *to else if (bhead->code == DATA) { if (looking) { if (bhead->SDNAnr == DNA_struct_find_nr(fd->filesdna, "PreviewImage") ) { - prv = BLO_library_read_struct(fd, bhead, "PreviewImage"); + prv = BLO_library_read_struct(fd, bhead, "PreviewImage"); if (prv) { memcpy(new_prv, prv, sizeof(PreviewImage)); if (prv->rect[0]) { @@ -183,7 +183,7 @@ LinkNode *BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype, int *to new_prv->rect[0] = MEM_callocN(new_prv->w[0] * new_prv->h[0] * sizeof(unsigned int), "prvrect"); bhead = blo_nextbhead(fd, bhead); rect = (unsigned int *)(bhead + 1); - memcpy(new_prv->rect[0], rect, bhead->len); + memcpy(new_prv->rect[0], rect, bhead->len); } else { new_prv->rect[0] = NULL; @@ -194,7 +194,7 @@ LinkNode *BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype, int *to new_prv->rect[1] = MEM_callocN(new_prv->w[1] * new_prv->h[1] * sizeof(unsigned int), "prvrect"); bhead = blo_nextbhead(fd, bhead); rect = (unsigned int *)(bhead + 1); - memcpy(new_prv->rect[1], rect, bhead->len); + memcpy(new_prv->rect[1], rect, bhead->len); } else { new_prv->rect[1] = NULL; @@ -265,10 +265,10 @@ BlendFileData *BLO_read_from_file(const char *filepath, ReportList *reports) if (fd) { fd->reports = reports; bfd = blo_read_file_internal(fd, filepath); - blo_freefiledata(fd); + blo_freefiledata(fd); } - return bfd; + return bfd; } BlendFileData *BLO_read_from_memory(void *mem, int memsize, ReportList *reports) @@ -280,10 +280,10 @@ BlendFileData *BLO_read_from_memory(void *mem, int memsize, ReportList *reports) if (fd) { fd->reports = reports; bfd = blo_read_file_internal(fd, ""); - blo_freefiledata(fd); + blo_freefiledata(fd); } - return bfd; + return bfd; } BlendFileData *BLO_read_from_memfile(Main *oldmain, const char *filename, MemFile *memfile, ReportList *reports) @@ -332,10 +332,10 @@ BlendFileData *BLO_read_from_memfile(Main *oldmain, const char *filename, MemFil } blo_join_main(&mainlist); - blo_freefiledata(fd); + blo_freefiledata(fd); } - return bfd; + return bfd; } void BLO_blendfiledata_free(BlendFileData *bfd) diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 42c90a6c0e5..7ba189d2a36 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -982,7 +982,7 @@ static FileData *blo_decode_and_check(FileData *fd, ReportList *reports) blo_freefiledata(fd); fd = NULL; } - } + } else { BKE_reportf(reports, RPT_ERROR, "Failed to read blend file '%s', not a blend file", fd->relabase); blo_freefiledata(fd); @@ -1129,7 +1129,7 @@ int BLO_is_a_library(const char *path, char *dir, char *group) /* the last part of the dir is a .blend file, no group follows */ *fd = '/'; /* put back the removed slash separating the dir and the .blend file name */ } - else { + else { char *gp = fd + 1; // in case we have a .blend file, gp points to the group /* Find the last slash */ @@ -1824,7 +1824,7 @@ static void lib_link_fcurves(FileData *fd, ID *id, ListBase *list) for (dvar= driver->variables.first; dvar; dvar= dvar->next) { DRIVER_TARGETS_LOOPER(dvar) - { + { /* only relink if still used */ if (tarIndex < dvar->num_targets) dtar->id = newlibadr(fd, id->lib, dtar->id); @@ -3046,7 +3046,7 @@ static void lib_link_curve(FileData *fd, Main *main) cu->taperobj = newlibadr(fd, cu->id.lib, cu->taperobj); cu->textoncurve = newlibadr(fd, cu->id.lib, cu->textoncurve); cu->vfont = newlibadr_us(fd, cu->id.lib, cu->vfont); - cu->vfontb = newlibadr_us(fd, cu->id.lib, cu->vfontb); + cu->vfontb = newlibadr_us(fd, cu->id.lib, cu->vfontb); cu->vfonti = newlibadr_us(fd, cu->id.lib, cu->vfonti); cu->vfontbi = newlibadr_us(fd, cu->id.lib, cu->vfontbi); @@ -3080,7 +3080,7 @@ static void direct_link_curve(FileData *fd, Curve *cu) cu->mat = newdataadr(fd, cu->mat); test_pointer_array(fd, (void **)&cu->mat); cu->str = newdataadr(fd, cu->str); - cu->strinfo= newdataadr(fd, cu->strinfo); + cu->strinfo= newdataadr(fd, cu->strinfo); cu->tb = newdataadr(fd, cu->tb); if (cu->vfont == NULL) link_list(fd, &(cu->nurb)); @@ -3091,14 +3091,14 @@ static void direct_link_curve(FileData *fd, Curve *cu) if (cu->tb) { memcpy(tb, cu->tb, cu->totbox*sizeof(TextBox)); MEM_freeN(cu->tb); - cu->tb = tb; + cu->tb = tb; } else { cu->totbox = 1; cu->actbox = 1; cu->tb = tb; cu->tb[0].w = cu->linewidth; - } + } if (cu->wordspace == 0.0f) cu->wordspace = 1.0f; } @@ -3263,7 +3263,7 @@ static const char *ptcache_data_struct[] = { "", // BPHYS_DATA_ROTATION "", // BPHYS_DATA_AVELOCITY / BPHYS_DATA_XCONST */ "", // BPHYS_DATA_SIZE: - "", // BPHYS_DATA_TIMES: + "", // BPHYS_DATA_TIMES: "BoidData" // case BPHYS_DATA_BOIDS: }; static void direct_link_pointcache(FileData *fd, PointCache *cache) @@ -3373,7 +3373,7 @@ static void lib_link_particlesettings(FileData *fd, Main *main) /* special case for only one object in the group */ index_ok = 1; } - else { + else { for (; dw; dw=dw->next) { if (dw->index > 0) { index_ok = 1; @@ -3610,7 +3610,7 @@ static void lib_link_mtface(FileData *fd, Mesh *me, MTFace *mtface, int totface) static void lib_link_customdata_mtface(FileData *fd, Mesh *me, CustomData *fdata, int totface) { - int i; + int i; for (i = 0; i < fdata->totlayer; i++) { CustomDataLayer *layer = &fdata->layers[i]; @@ -4059,7 +4059,7 @@ static void lib_link_object(FileData *fd, Main *main) if (paf->type == EFF_PARTICLE) { paf->group = newlibadr_us(fd, ob->id.lib, paf->group); } - } + } for (sens = ob->sensors.first; sens; sens = sens->next) { for (a = 0; a < sens->totlinks; a++) @@ -4591,7 +4591,7 @@ static void direct_link_object(FileData *fd, Object *ob) direct_link_partdeflect(ob->pd); ob->soft= newdataadr(fd, ob->soft); if (ob->soft) { - SoftBody *sb = ob->soft; + SoftBody *sb = ob->soft; sb->bpoint = NULL; // init pointers so it gets rebuilt nicely sb->bspring = NULL; @@ -5034,7 +5034,7 @@ static void direct_link_scene(FileData *fd, Scene *sce) ed->seqbasep = (ListBase *)(poin+offset); else ed->seqbasep = &ed->seqbase; - } + } /* stack */ link_list(fd, &(ed->metastack)); @@ -5068,7 +5068,7 @@ static void direct_link_scene(FileData *fd, Scene *sce) } if (sce->r.ffcodecdata.properties) { sce->r.ffcodecdata.properties = newdataadr(fd, sce->r.ffcodecdata.properties); - if (sce->r.ffcodecdata.properties) { + if (sce->r.ffcodecdata.properties) { IDP_DirectLinkProperty(sce->r.ffcodecdata.properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd); } @@ -8801,7 +8801,7 @@ static void expand_curve(FileData *fd, Main *mainvar, Curve *cu) } expand_doit(fd, mainvar, cu->vfont); - expand_doit(fd, mainvar, cu->vfontb); + expand_doit(fd, mainvar, cu->vfontb); expand_doit(fd, mainvar, cu->vfonti); expand_doit(fd, mainvar, cu->vfontbi); expand_doit(fd, mainvar, cu->key); @@ -9623,7 +9623,7 @@ static void library_append_end(const bContext *C, Main *mainl, FileData **fd, in if ((*fd)->flags & FD_FLAGS_SWITCH_ENDIAN) { blo_freefiledata(*fd); *fd = NULL; - } + } } void BLO_library_append_end(const bContext *C, struct Main *mainl, BlendHandle** bh, int idcode, short flag) diff --git a/source/blender/blenloader/intern/runtime.c b/source/blender/blenloader/intern/runtime.c index 4136f71f050..5d8a865eea8 100644 --- a/source/blender/blenloader/intern/runtime.c +++ b/source/blender/blenloader/intern/runtime.c @@ -91,7 +91,7 @@ cleanup: if (fd != -1) close(fd); - return res; + return res; } BlendFileData *BLO_read_runtime(const char *path, ReportList *reports) @@ -126,7 +126,7 @@ BlendFileData *BLO_read_runtime(const char *path, ReportList *reports) BKE_reportf(reports, RPT_ERROR, "Unable to read '%s' (not a blend file)", path); goto cleanup; } - else { + else { //printf("starting to read runtime from %s at datastart %d\n", path, datastart); lseek(fd, datastart, SEEK_SET); bfd = blo_read_blendafterruntime(fd, path, actualsize - datastart, reports); diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 281cc4d01c3..ad83b426c51 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -511,7 +511,7 @@ static void write_fcurves(WriteData *wd, ListBase *fcurves) writestruct(wd, DATA, "FCurve", 1, fcu); /* curve data */ - if (fcu->bezt) + if (fcu->bezt) writestruct(wd, DATA, "BezTriple", fcu->totvert, fcu->bezt); if (fcu->fpt) writestruct(wd, DATA, "FPoint", fcu->totvert, fcu->fpt); @@ -888,7 +888,7 @@ static const char *ptcache_data_struct[] = { "", // BPHYS_DATA_ROTATION "", // BPHYS_DATA_AVELOCITY / BPHYS_DATA_XCONST */ "", // BPHYS_DATA_SIZE: - "", // BPHYS_DATA_TIMES: + "", // BPHYS_DATA_TIMES: "BoidData" // case BPHYS_DATA_BOIDS: }; static const char *ptcache_extra_struct[] = { @@ -1329,7 +1329,7 @@ static void write_modifiers(WriteData *wd, ListBase *modbase) writestruct(wd, DATA, "ClothCollSettings", 1, clmd->coll_parms); writestruct(wd, DATA, "EffectorWeights", 1, clmd->sim_parms->effector_weights); write_pointcaches(wd, &clmd->ptcaches); - } + } else if (md->type==eModifierType_Smoke) { SmokeModifierData *smd = (SmokeModifierData*) md; @@ -1359,7 +1359,7 @@ static void write_modifiers(WriteData *wd, ListBase *modbase) writestruct(wd, DATA, "SmokeFlowSettings", 1, smd->flow); else if (smd->type & MOD_SMOKE_TYPE_COLL) writestruct(wd, DATA, "SmokeCollSettings", 1, smd->coll); - } + } else if (md->type==eModifierType_Fluidsim) { FluidsimModifierData *fluidmd = (FluidsimModifierData*) md; @@ -1387,7 +1387,7 @@ static void write_modifiers(WriteData *wd, ListBase *modbase) writestruct(wd, DATA, "ColorBand", 1, pmd->brush->paint_ramp); writestruct(wd, DATA, "ColorBand", 1, pmd->brush->vel_ramp); } - } + } else if (md->type==eModifierType_Collision) { #if 0 @@ -1607,7 +1607,7 @@ static void write_curves(WriteData *wd, ListBase *idbase) if (cu->vfont) { writedata(wd, DATA, amount_of_chars(cu->str)+1, cu->str); writestruct(wd, DATA, "CharInfo", cu->len+1, cu->strinfo); - writestruct(wd, DATA, "TextBox", cu->totbox, cu->tb); + writestruct(wd, DATA, "TextBox", cu->totbox, cu->tb); } else { /* is also the order of reading */ @@ -2025,7 +2025,7 @@ static void write_materials(WriteData *wd, ListBase *idbase) write_nodetree(wd, ma->nodetree); } - write_previews(wd, ma->preview); + write_previews(wd, ma->preview); } ma= ma->id.next; } @@ -2081,7 +2081,7 @@ static void write_lamps(WriteData *wd, ListBase *idbase) } if (la->curfalloff) - write_curvemapping(wd, la->curfalloff); + write_curvemapping(wd, la->curfalloff); /* nodetree is integral part of lamps, no libdata */ if (la->nodetree) { @@ -2304,7 +2304,7 @@ static void write_gpencils(WriteData *wd, ListBase *lb) /* write strokes */ for (gps= gpf->strokes.first; gps; gps= gps->next) { writestruct(wd, DATA, "bGPDstroke", 1, gps); - writestruct(wd, DATA, "bGPDspoint", gps->totpoints, gps->points); + writestruct(wd, DATA, "bGPDspoint", gps->totpoints, gps->points); } } } @@ -2999,7 +2999,7 @@ static int do_history(const char *name, ReportList *reports) if (BLI_rename(tempname1, tempname2)) { BKE_report(reports, RPT_ERROR, "Unable to make version backup"); return 1; - } + } hisnr--; } @@ -3074,7 +3074,7 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL /* file save to temporary file was successful */ /* now do reverse file history (move .blend1 -> .blend2, .blend -> .blend1) */ - if (write_flags & G_FILE_HISTORY) { + if (write_flags & G_FILE_HISTORY) { int err_hist = do_history(filepath, reports); if (err_hist) { BKE_report(reports, RPT_ERROR, "Version backup failed (file saved with @)"); diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp index 0e8ead61437..9d2d86fd3cf 100644 --- a/source/blender/collada/AnimationExporter.cpp +++ b/source/blender/collada/AnimationExporter.cpp @@ -184,7 +184,7 @@ std::string AnimationExporter::getObjectBoneName(Object *ob, const FCurve *fcu) if (boneName != NULL) return /*id_name(ob) + "_" +*/ std::string(boneName); - else + else return id_name(ob); } @@ -584,8 +584,8 @@ void AnimationExporter::get_source_values(BezTriple *bezt, COLLADASW::InputSeman values[0] = convert_time(bezt->vec[0][0]); if (bezt->ipo != BEZT_IPO_BEZ) { // We're in a mixed interpolation scenario, set zero as it's irrelevant but value might contain unused data - values[0] = 0; - values[1] = 0; + values[0] = 0; + values[1] = 0; } else if (is_rotation) { values[1] = RAD2DEGF(bezt->vec[0][1]); @@ -600,8 +600,8 @@ void AnimationExporter::get_source_values(BezTriple *bezt, COLLADASW::InputSeman values[0] = convert_time(bezt->vec[2][0]); if (bezt->ipo != BEZT_IPO_BEZ) { // We're in a mixed interpolation scenario, set zero as it's irrelevant but value might contain unused data - values[0] = 0; - values[1] = 0; + values[0] = 0; + values[1] = 0; } else if (is_rotation) { values[1] = RAD2DEGF(bezt->vec[2][1]); @@ -634,11 +634,11 @@ std::string AnimationExporter::create_source_from_fcurve(COLLADASW::InputSemanti switch (semantic) { case COLLADASW::InputSemantic::INPUT: case COLLADASW::InputSemantic::OUTPUT: - source.setAccessorStride(1); + source.setAccessorStride(1); break; case COLLADASW::InputSemantic::IN_TANGENT: case COLLADASW::InputSemantic::OUT_TANGENT: - source.setAccessorStride(2); + source.setAccessorStride(2); break; default: break; @@ -1082,13 +1082,13 @@ std::string AnimationExporter::get_transform_sid(char *rna_path, int tm_type, co break; case 6: tm_name = "diffuse"; - break; + break; case 7: tm_name = "transparency"; - break; + break; case 8: tm_name = "index_of_refraction"; - break; + break; default: tm_name = ""; diff --git a/source/blender/collada/AnimationExporter.h b/source/blender/collada/AnimationExporter.h index 7fd39765cc9..665c6999093 100644 --- a/source/blender/collada/AnimationExporter.h +++ b/source/blender/collada/AnimationExporter.h @@ -122,7 +122,7 @@ protected: float convert_angle(float angle); - std::string get_semantic_suffix(COLLADASW::InputSemantic::Semantics semantic); + std::string get_semantic_suffix(COLLADASW::InputSemantic::Semantics semantic); void add_source_parameters(COLLADASW::SourceBase::ParameterNameList& param, COLLADASW::InputSemantic::Semantics semantic, bool is_rot, const char *axis, bool transform); diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index b2748a55b6a..02d1e1166c9 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -136,7 +136,7 @@ void AnimationImporter::animation_to_fcurves(COLLADAFW::AnimationCurve *curve) bez.ipo = BEZT_IPO_BEZ; else bez.ipo = BEZT_IPO_CONST; - //bez.h1 = bez.h2 = HD_AUTO; + //bez.h1 = bez.h2 = HD_AUTO; } else { bez.h1 = bez.h2 = HD_AUTO; @@ -617,7 +617,7 @@ void AnimationImporter:: Assign_color_animations(const COLLADAFW::UniqueId& list //Add the curves of the current animation to the object for (iter = animcurves.begin(); iter != animcurves.end(); iter++) { FCurve *fcu = *iter; - BLI_addtail(AnimCurves, fcu); + BLI_addtail(AnimCurves, fcu); } } @@ -938,7 +938,7 @@ void AnimationImporter::translate_Animations(COLLADAFW::Node *node, if (is_matrix) { apply_matrix_curves(ob, animcurves, root, node, transform); } - else { + else { if (is_joint) { @@ -1094,7 +1094,7 @@ void AnimationImporter::translate_Animations(COLLADAFW::Node *node, } } } - } + } } } @@ -1114,8 +1114,8 @@ void AnimationImporter::add_bone_animation_sampled(Object *ob, std::vector<FCurv for (iter = animcurves.begin(); iter != animcurves.end(); iter++) { FCurve *fcu = *iter; - fcurve_deg_to_rad(fcu); - } + fcurve_deg_to_rad(fcu); + } } diff --git a/source/blender/collada/ArmatureExporter.cpp b/source/blender/collada/ArmatureExporter.cpp index 30e9baccbf1..134fd639a73 100644 --- a/source/blender/collada/ArmatureExporter.cpp +++ b/source/blender/collada/ArmatureExporter.cpp @@ -346,7 +346,7 @@ void ArmatureExporter::export_controller(Object *ob, Object *ob_arm) if (this->export_settings->apply_modifiers) { me = bc_to_mesh_apply_modifiers(scene, ob, this->export_settings->export_mesh_type); - } + } else { me = (Mesh *)ob->data; } diff --git a/source/blender/collada/CMakeLists.txt b/source/blender/collada/CMakeLists.txt index 3b7a38eb950..0091df3c502 100644 --- a/source/blender/collada/CMakeLists.txt +++ b/source/blender/collada/CMakeLists.txt @@ -70,7 +70,7 @@ set(SRC collada_utils.cpp AnimationImporter.h - AnimationExporter.h + AnimationExporter.h ArmatureExporter.h ArmatureImporter.h CameraExporter.h diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index f37f065b03b..1c4f0974c6d 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -311,7 +311,7 @@ bool DocumentImporter::writeScene(const COLLADAFW::Scene *scene) Object *DocumentImporter::create_camera_object(COLLADAFW::InstanceCamera *camera, Scene *sce) { const COLLADAFW::UniqueId& cam_uid = camera->getInstanciatedObjectId(); - if (uid_camera_map.find(cam_uid) == uid_camera_map.end()) { + if (uid_camera_map.find(cam_uid) == uid_camera_map.end()) { // fprintf(stderr, "Couldn't find camera by UID.\n"); return NULL; } @@ -329,7 +329,7 @@ Object *DocumentImporter::create_camera_object(COLLADAFW::InstanceCamera *camera Object *DocumentImporter::create_lamp_object(COLLADAFW::InstanceLight *lamp, Scene *sce) { const COLLADAFW::UniqueId& lamp_uid = lamp->getInstanciatedObjectId(); - if (uid_lamp_map.find(lamp_uid) == uid_lamp_map.end()) { + if (uid_lamp_map.find(lamp_uid) == uid_lamp_map.end()) { fprintf(stderr, "Couldn't find lamp by UID.\n"); return NULL; } @@ -524,7 +524,7 @@ void DocumentImporter::write_node(COLLADAFW::Node *node, COLLADAFW::Node *parent } // if node has child nodes write them COLLADAFW::NodePointerArray &child_nodes = node->getChildNodes(); - for (unsigned int i = 0; i < child_nodes.getCount(); i++) { + for (unsigned int i = 0; i < child_nodes.getCount(); i++) { write_node(child_nodes[i], node, sce, ob, is_library_node); } } diff --git a/source/blender/collada/EffectExporter.cpp b/source/blender/collada/EffectExporter.cpp index dd59fb9fb91..03e96bebb61 100644 --- a/source/blender/collada/EffectExporter.cpp +++ b/source/blender/collada/EffectExporter.cpp @@ -255,7 +255,7 @@ void EffectsExporter::operator()(Material *ma, Object *ob) if (ep.getShaderType() != COLLADASW::EffectProfile::LAMBERT) { cot = getcol(ma->specr * ma->spec, ma->specg * ma->spec, ma->specb * ma->spec, 1.0f); ep.setSpecular(cot, false, "specular"); - } + } // XXX make this more readable if possible @@ -405,7 +405,7 @@ void EffectsExporter::operator()(Material *ma, Object *ob) ep.closeProfile(); if (twoSided) mSW->appendTextBlock("<extra><technique profile=\"MAX3D\"><double_sided>1</double_sided></technique></extra>"); - closeEffect(); + closeEffect(); } COLLADASW::ColorOrTexture EffectsExporter::createTexture(Image *ima, diff --git a/source/blender/collada/GeometryExporter.cpp b/source/blender/collada/GeometryExporter.cpp index e2332b7cd55..24ce1ee117d 100644 --- a/source/blender/collada/GeometryExporter.cpp +++ b/source/blender/collada/GeometryExporter.cpp @@ -78,7 +78,7 @@ void GeometryExporter::operator()(Object *ob) Mesh *me; if (this->export_settings->apply_modifiers) { me = bc_to_mesh_apply_modifiers(mScene, ob, this->export_settings->export_mesh_type); - } + } else { me = (Mesh *)ob->data; } @@ -364,7 +364,7 @@ void GeometryExporter::createVertsSource(std::string geom_id, Mesh *me) //appends data to <float_array> int i = 0; for (i = 0; i < totverts; i++) { - source.appendValues(verts[i].co[0], verts[i].co[1], verts[i].co[2]); + source.appendValues(verts[i].co[0], verts[i].co[1], verts[i].co[2]); } source.finish(); diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp index 47ee35f0268..e5493bc237d 100644 --- a/source/blender/collada/MeshImporter.cpp +++ b/source/blender/collada/MeshImporter.cpp @@ -478,7 +478,7 @@ void MeshImporter::allocate_face_data(COLLADAFW::Mesh *mesh, Mesh *me, int new_t int total_facecount = 0; // collect edge_count and face_count from all parts - for (int i = 0; i < prim_arr.getCount(); i++) { + for (int i = 0; i < prim_arr.getCount(); i++) { COLLADAFW::MeshPrimitive *mp = prim_arr[i]; int type = mp->getPrimitiveType(); switch (type) { @@ -506,7 +506,7 @@ unsigned int MeshImporter::get_loose_edge_count(COLLADAFW::Mesh *mesh) { int loose_edge_count = 0; // collect edge_count and face_count from all parts - for (int i = 0; i < prim_arr.getCount(); i++) { + for (int i = 0; i < prim_arr.getCount(); i++) { COLLADAFW::MeshPrimitive *mp = prim_arr[i]; int type = mp->getPrimitiveType(); switch (type) { diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp index 5c891705089..011d1865957 100644 --- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp +++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp @@ -204,7 +204,7 @@ void ExecutionGroup::determineNumberOfChunks() this->m_numberOfXChunks = 1; this->m_numberOfYChunks = 1; this->m_numberOfChunks = 1; - } + } else { const float chunkSizef = this->m_chunkSize; this->m_numberOfXChunks = ceil(this->m_width / chunkSizef); diff --git a/source/blender/compositor/intern/COM_WorkScheduler.cpp b/source/blender/compositor/intern/COM_WorkScheduler.cpp index eb9c26d4f43..e9767c41230 100644 --- a/source/blender/compositor/intern/COM_WorkScheduler.cpp +++ b/source/blender/compositor/intern/COM_WorkScheduler.cpp @@ -332,10 +332,10 @@ void WorkScheduler::initialize(bool use_opencl) const char *cl_str[2] = {datatoc_COM_OpenCLKernels_cl, NULL}; g_program = clCreateProgramWithSource(g_context, 1, cl_str, 0, &error); error = clBuildProgram(g_program, numberOfDevices, cldevices, 0, 0, 0); - if (error != CL_SUCCESS) { + if (error != CL_SUCCESS) { cl_int error2; size_t ret_val_size = 0; - printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); + printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); error2 = clGetProgramBuildInfo(g_program, cldevices[0], CL_PROGRAM_BUILD_LOG, 0, NULL, &ret_val_size); if (error2 != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); } char *build_log = (char *)MEM_mallocN(sizeof(char) * ret_val_size + 1, __func__); diff --git a/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp b/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp index 70aeee8fc27..254dfb7b9c7 100644 --- a/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp +++ b/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp @@ -35,7 +35,7 @@ void ConvertAlphaNode::convertToOperations(ExecutionSystem *graph, CompositorCon } else { operation = new ConvertKeyToPremulOperation(); - } + } this->getInputSocket(0)->relinkConnections(operation->getInputSocket(0), 0, graph); this->getOutputSocket(0)->relinkConnections(operation->getOutputSocket()); diff --git a/source/blender/compositor/nodes/COM_CropNode.cpp b/source/blender/compositor/nodes/COM_CropNode.cpp index b80a3e088f2..f09bb7e1c26 100644 --- a/source/blender/compositor/nodes/COM_CropNode.cpp +++ b/source/blender/compositor/nodes/COM_CropNode.cpp @@ -40,7 +40,7 @@ void CropNode::convertToOperations(ExecutionSystem *graph, CompositorContext *co operation = new CropImageOperation(); } else { - operation = new CropOperation(); + operation = new CropOperation(); } operation->setCropSettings(cropSettings); operation->setRelative(relative); diff --git a/source/blender/compositor/operations/COM_ColorSpillOperation.cpp b/source/blender/compositor/operations/COM_ColorSpillOperation.cpp index 152b10709fb..a8e8cb98564 100644 --- a/source/blender/compositor/operations/COM_ColorSpillOperation.cpp +++ b/source/blender/compositor/operations/COM_ColorSpillOperation.cpp @@ -100,7 +100,7 @@ void ColorSpillOperation::executePixel(float output[4], float x, float y, PixelS } else { copy_v4_v4(output, input); - } + } } float ColorSpillOperation::calculateMapValue(float fac, float *input) { diff --git a/source/blender/compositor/operations/COM_CropOperation.h b/source/blender/compositor/operations/COM_CropOperation.h index ddc7f855bf1..d2f2b15aa36 100644 --- a/source/blender/compositor/operations/COM_CropOperation.h +++ b/source/blender/compositor/operations/COM_CropOperation.h @@ -37,7 +37,7 @@ protected: void updateArea(); public: - CropBaseOperation(); + CropBaseOperation(); void initExecution(); void deinitExecution(); void setCropSettings(NodeTwoXYs *settings) { this->m_settings = settings; } diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp index a3e00e9325b..0af5ec2d06c 100644 --- a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp +++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp @@ -111,7 +111,7 @@ void MovieDistortionOperation::executePixel(float output[4], float x, float y, P float u, v; this->m_cache->getUV(&this->m_movieClip->tracking, x, y, &u, &v); this->m_inputOperation->read(output, u, v, sampler); - } + } else { this->m_inputOperation->read(output, x, y, sampler); } diff --git a/source/blender/compositor/operations/COM_OpenCLKernels.cl b/source/blender/compositor/operations/COM_OpenCLKernels.cl index 4d366a864c4..b4d56a9c812 100644 --- a/source/blender/compositor/operations/COM_OpenCLKernels.cl +++ b/source/blender/compositor/operations/COM_OpenCLKernels.cl @@ -33,7 +33,7 @@ __kernel void bokehBlurKernel(__read_only image2d_t boundingBox, __read_only ima __read_only image2d_t bokehImage, __write_only image2d_t output, int2 offsetInput, int2 offsetOutput, int radius, int step, int2 dimension, int2 offset) { - int2 coords = {get_global_id(0), get_global_id(1)}; + int2 coords = {get_global_id(0), get_global_id(1)}; coords += offset; float tempBoundingBox; float4 color = {0.0f,0.0f,0.0f,0.0f}; @@ -124,7 +124,7 @@ __kernel void defocusKernel(__read_only image2d_t inputImage, __read_only image2 } } } - } + } } color = color_accum * (1.0f / multiplier_accum); @@ -148,7 +148,7 @@ __kernel void dilateKernel(__read_only image2d_t inputImage, __write_only image int2 offsetInput, int2 offsetOutput, int scope, int distanceSquared, int2 dimension, int2 offset) { - int2 coords = {get_global_id(0), get_global_id(1)}; + int2 coords = {get_global_id(0), get_global_id(1)}; coords += offset; const int2 realCoordinate = coords + offsetOutput; @@ -179,7 +179,7 @@ __kernel void erodeKernel(__read_only image2d_t inputImage, __write_only image2 int2 offsetInput, int2 offsetOutput, int scope, int distanceSquared, int2 dimension, int2 offset) { - int2 coords = {get_global_id(0), get_global_id(1)}; + int2 coords = {get_global_id(0), get_global_id(1)}; coords += offset; const int2 realCoordinate = coords + offsetOutput; @@ -210,7 +210,7 @@ __kernel void directionalBlurKernel(__read_only image2d_t inputImage, __write_o int2 offsetOutput, int iterations, float scale, float rotation, float2 translate, float2 center, int2 offset) { - int2 coords = {get_global_id(0), get_global_id(1)}; + int2 coords = {get_global_id(0), get_global_id(1)}; coords += offset; const int2 realCoordinate = coords + offsetOutput; diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.cpp b/source/blender/compositor/operations/COM_OutputFileOperation.cpp index b3c2df7230f..1bc262a4d27 100644 --- a/source/blender/compositor/operations/COM_OutputFileOperation.cpp +++ b/source/blender/compositor/operations/COM_OutputFileOperation.cpp @@ -149,7 +149,7 @@ void OutputSingleLayerOperation::deinitExecution() else printf("Saved: %s\n", filename); - IMB_freeImBuf(ibuf); + IMB_freeImBuf(ibuf); } this->m_outputBuffer = NULL; this->m_imageInput = NULL; diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp index fd9cc1fddcb..b65444108bc 100644 --- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp +++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp @@ -226,7 +226,7 @@ bool ScreenLensDistortionOperation::determineDependingAreaOfInterest(rcti *input UPDATE_INPUT; determineUV(coords, input->xmax, input->ymin); UPDATE_INPUT; - } + } else { determineUV(coords, input->xmin, input->ymin, 1.0f, 1.0f); newInput.xmin = coords[0]; diff --git a/source/blender/compositor/operations/COM_ViewerOperation.cpp b/source/blender/compositor/operations/COM_ViewerOperation.cpp index 576d5da4d74..d1ac7d74ead 100644 --- a/source/blender/compositor/operations/COM_ViewerOperation.cpp +++ b/source/blender/compositor/operations/COM_ViewerOperation.cpp @@ -96,7 +96,7 @@ void ViewerOperation::executeRegion(rcti *rect, unsigned int tileNumber) if (m_depthInput) { this->m_depthInput->read(depth, x, y, COM_PS_NEAREST); depthbuffer[offset] = depth[0]; - } + } offset ++; offset4 += 4; diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 1998dafb3cd..9e3ebfb41a2 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -1186,7 +1186,7 @@ static void *acf_dsmat_setting_ptr(bAnimListElem *ale, int setting, short *type) if (ma->adt) return GET_ACF_FLAG_PTR(ma->adt->flag, type); else - return NULL; + return NULL; default: /* unsupported */ return NULL; @@ -1263,7 +1263,7 @@ static void *acf_dslam_setting_ptr(bAnimListElem *ale, int setting, short *type) if (la->adt) return GET_ACF_FLAG_PTR(la->adt->flag, type); else - return NULL; + return NULL; default: /* unsupported */ return NULL; @@ -1347,7 +1347,7 @@ static void *acf_dstex_setting_ptr(bAnimListElem *ale, int setting, short *type) if (tex->adt) return GET_ACF_FLAG_PTR(tex->adt->flag, type); else - return NULL; + return NULL; default: /* unsupported */ return NULL; diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index d35f39a48e0..f19dbe740bc 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -464,7 +464,7 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAn /* store this level as the 'old' level now */ prevLevel = level; - } + } /* if the level is 'greater than' (i.e. less important) than the previous level... */ else if (level > prevLevel) { /* if previous level was a base-level (i.e. 0 offset / root of one hierarchy), @@ -600,7 +600,7 @@ static int animedit_poll_channels_nla_tweakmode_off(bContext *C) if (ELEM3(sa->spacetype, SPACE_ACTION, SPACE_IPO, SPACE_NLA) == 0) return 0; - /* NLA TweakMode test */ + /* NLA TweakMode test */ if (sa->spacetype == SPACE_NLA) { if ((scene == NULL) || (scene->flag & SCE_NLA_EDIT_ON)) return 0; @@ -794,7 +794,7 @@ static void rearrange_animchannel_add_to_islands(ListBase *islands, ListBase *sr FCurve *fcu = (FCurve *)channel; is_sel = SEL_FCU(fcu); - } + } break; case ANIMTYPE_NLATRACK: { @@ -910,7 +910,7 @@ static void rearrange_nla_channels(bAnimContext *UNUSED(ac), AnimData *adt, shor if (rearrange_func == NULL) return; - /* only consider NLA data if it's accessible */ + /* only consider NLA data if it's accessible */ //if (EXPANDED_DRVD(adt) == 0) // return; @@ -931,7 +931,7 @@ static void rearrange_driver_channels(bAnimContext *UNUSED(ac), AnimData *adt, s if (rearrange_func == NULL) return; - /* only consider drivers if they're accessible */ + /* only consider drivers if they're accessible */ if (EXPANDED_DRVD(adt) == 0) return; @@ -2206,7 +2206,7 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in } notifierFlags |= (ND_ANIMCHAN | NA_SELECTED); - } + } break; case ANIMTYPE_GROUP: @@ -2219,7 +2219,7 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in agrp->flag ^= AGRP_SELECTED; } else if (selectmode == -1) { - /* select all in group (and deselect everthing else) */ + /* select all in group (and deselect everthing else) */ FCurve *fcu; /* deselect all other channels */ @@ -2228,7 +2228,7 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in /* only select channels in group and group itself */ for (fcu = agrp->channels.first; fcu && fcu->grp == agrp; fcu = fcu->next) fcu->flag |= FCURVE_SELECTED; - agrp->flag |= AGRP_SELECTED; + agrp->flag |= AGRP_SELECTED; } else { /* select group by itself */ @@ -2306,7 +2306,7 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in /* invert selection status of this layer only */ gpl->flag ^= GP_LAYER_SELECT; } - else { + else { /* select layer by itself */ ANIM_deselect_anim_channels(ac, ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); gpl->flag |= GP_LAYER_SELECT; diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index 620f5de9db7..01c0a95e200 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -261,8 +261,8 @@ void ANIM_draw_previewrange(const bContext *C, View2D *v2d) /* only draw two separate 'curtains' if there's no overlap between them */ if (PSFRA < PEFRA) { glRectf(v2d->cur.xmin, v2d->cur.ymin, (float)PSFRA, v2d->cur.ymax); - glRectf((float)PEFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax); - } + glRectf((float)PEFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax); + } else { glRectf(v2d->cur.xmin, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax); } diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index d913779a883..721b3473792 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -682,7 +682,7 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne ale->datatype = ALE_ACT; ale->adt = BKE_animdata_from_id(data); - } + } break; case ANIMTYPE_DSSPK: { @@ -811,7 +811,7 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne } ale->datatype = (ale->key_data) ? ALE_FCURVE : ALE_NONE; } - } + } break; case ANIMTYPE_GPLAYER: @@ -1023,7 +1023,7 @@ static FCurve *animfilter_fcurve_next(bDopeSheet *ads, FCurve *first, bActionGro if (skip_fcurve_selected_data(ads, fcu, owner_id, filter_mode)) continue; } - } + } /* only include if visible (Graph Editor check, not channels check) */ if (!(filter_mode & ANIMFILTER_CURVE_VISIBLE) || (fcu->flag & FCURVE_VISIBLE)) { @@ -1211,7 +1211,7 @@ static size_t animfilter_nla(bAnimContext *UNUSED(ac), ListBase *anim_data, bDop */ if (!(ads->filterflag & ADS_FILTER_NLA_NOACT) || (adt->action)) { /* there isn't really anything editable here, so skip if need editable */ - if ((filter_mode & ANIMFILTER_FOREDIT) == 0) { + if ((filter_mode & ANIMFILTER_FOREDIT) == 0) { /* just add the action track now (this MUST appear for drawing) * - as AnimData may not have an action, we pass a dummy pointer just to get the list elem created, then * overwrite this with the real value - REVIEW THIS... diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c index 5295950546d..d8e3349e998 100644 --- a/source/blender/editors/animation/anim_ipo_utils.c +++ b/source/blender/editors/animation/anim_ipo_utils.c @@ -89,7 +89,7 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu) * i.e. Bone1.Location.X, or Object.Location.X * 2) <array-index> <property-name> (<struct name>) * i.e. X Location (Bone1), or X Location (Object) - * + * * Currently, option 2 is in use, to try and make it easier to quickly identify F-Curves (it does have * problems with looking rather odd though). Option 1 is better in terms of revealing a consistent sense of * hierarchy though, which isn't so clear with option 2. diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index 895aaec29da..0ae06e71b66 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -150,7 +150,7 @@ int ED_markers_post_apply_transform(ListBase *markers, Scene *scene, int mode, f break; case TFM_TIME_SCALE: - { + { /* rescale the distance between the marker and the current frame */ marker->frame = cfra + (int)floorf(((float)(marker->frame - cfra) * value) + 0.5f); changed++; @@ -249,7 +249,7 @@ void ED_markers_get_minmax(ListBase *markers, short sel, float *first, float *la min = (float)marker->frame; if (marker->frame > max) max = (float)marker->frame; - } + } } } @@ -278,7 +278,7 @@ static void add_marker_to_cfra_elem(ListBase *lb, TimeMarker *marker, short only return; } else if (ce->cfra > marker->frame) break; - } + } cen = MEM_callocN(sizeof(CfraElem), "add_to_cfra_elem"); if (ce) BLI_insertlinkbefore(lb, ce, cen); @@ -360,7 +360,7 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag) glScalef(1.0f / xscale, 1.0f, 1.0f); glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); /* vertical line - dotted */ #ifdef DURIAN_CAMERA_SWITCH @@ -726,7 +726,7 @@ static int ed_marker_move_cancel(bContext *C, wmOperator *op) { RNA_int_set(op->ptr, "frames", 0); ed_marker_move_apply(op); - ed_marker_move_exit(C, op); + ed_marker_move_exit(C, op); WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL); WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL); @@ -821,7 +821,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt) } else { /* we only print the offset */ - if (mm->slink->spacetype == SPACE_TIME) { + if (mm->slink->spacetype == SPACE_TIME) { SpaceTime *stime = (SpaceTime *)mm->slink; if (stime->flag & TIME_DRAWFRAMES) BLI_snprintf(str, sizeof(str), "Marker offset %d ", offs); @@ -1030,7 +1030,7 @@ static int ed_marker_select(bContext *C, wmEvent *evt, int extend, int camera) x = evt->x - ar->winrct.xmin; y = evt->y - ar->winrct.ymin; - UI_view2d_region_to_view(v2d, x, y, &viewx, NULL); + UI_view2d_region_to_view(v2d, x, y, &viewx, NULL); cfra = ED_markers_find_nearest_marker_time(markers, viewx); diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index 38f9119104b..25833c13925 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -91,7 +91,7 @@ FCurve *verify_driver_fcurve(ID *id, const char rna_path[], const int array_inde adt = BKE_animdata_from_id(id); if ((adt == NULL) && (add)) adt = BKE_id_add_animdata(id); - if (adt == NULL) { + if (adt == NULL) { /* if still none (as not allowed to add, or ID doesn't have animdata for some reason) */ return NULL; } @@ -478,7 +478,7 @@ static int add_driver_button_exec(bContext *C, wmOperator *op) char *path = get_driver_path_hack(C, &ptr, prop); short flags = CREATEDRIVER_WITH_DEFAULT_DVAR; - if (path) { + if (path) { success += ANIM_add_driver(op->reports, ptr.id.data, path, index, flags, DRIVER_TYPE_PYTHON); MEM_freeN(path); diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index 6c9105dde69..9e6301c91f5 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -345,7 +345,7 @@ static BezTriple *abk_get_bezt_with_value(ActBeztColumn *abk, float value) return NULL; /* look over each BezTriple in this container */ - for (i = 0; i < abk->numBezts; i++) { + for (i = 0; i < abk->numBezts; i++) { /* only do exact match for now... */ if (/*i >= MAX_ABK_BUFSIZE*/ 0) { // TODO: this case needs special handling @@ -960,7 +960,7 @@ void fcurve_to_keylist(AnimData *adt, FCurve *fcu, DLRBT_Tree *keys, DLRBT_Tree if (fcu && fcu->totvert && fcu->bezt) { /* apply NLA-mapping (if applicable) */ - if (adt) + if (adt) ANIM_nla_mapping_apply_fcurve(adt, fcu, 0, 0); /* if getting long keyframes too, grab the BezTriples in a BST for diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index b277d0eccb5..015c2667a93 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -154,7 +154,7 @@ short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, FCurve *fcu, KeyframeEdi if (fcu_cb) fcu_cb(fcu); - /* done */ + /* done */ return 0; } @@ -639,7 +639,7 @@ static short snap_bezier_horizontal(KeyframeEditData *UNUSED(ked), BezTriple *be if (ELEM3(bezt->h1, HD_AUTO, HD_AUTO_ANIM, HD_VECT)) bezt->h1 = HD_ALIGN; if (ELEM3(bezt->h2, HD_AUTO, HD_AUTO_ANIM, HD_VECT)) bezt->h2 = HD_ALIGN; } - return 0; + return 0; } /* value to snap to is stored in the custom data -> first float value slot */ @@ -880,7 +880,7 @@ KeyframeEditFunc ANIM_editkeyframes_ipo(short code) switch (code) { case BEZT_IPO_CONST: /* constant */ return set_bezt_constant; - case BEZT_IPO_LIN: /* linear */ + case BEZT_IPO_LIN: /* linear */ return set_bezt_linear; default: /* bezier */ return set_bezt_bezier; @@ -930,7 +930,7 @@ KeyframeEditFunc ANIM_editkeyframes_keytype(short code) case BEZT_KEYTYPE_JITTER: /* jitter keyframe */ return set_keytype_jitter; - case BEZT_KEYTYPE_KEYFRAME: /* proper keyframe */ + case BEZT_KEYTYPE_KEYFRAME: /* proper keyframe */ default: return set_keytype_keyframe; } diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index b5c0555bf63..9249b912da6 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -188,7 +188,7 @@ void clean_fcurve(FCurve *fcu, float thresh) /* make a copy of the old BezTriples, and clear F-Curve */ old_bezts = fcu->bezt; - totCount = fcu->totvert; + totCount = fcu->totvert; fcu->bezt = NULL; fcu->totvert = 0; @@ -256,7 +256,7 @@ void clean_fcurve(FCurve *fcu, float thresh) insert_vert_fcurve(fcu, cur[0], cur[1], 0); } } - else { + else { /* add if value doesn't equal that of previous */ if (IS_EQT(cur[1], prev[1], thresh) == 0) { /* add new keyframe */ diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index f0c5f063e57..238dd9c68e4 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -108,7 +108,7 @@ short ANIM_get_keyframing_flags(Scene *scene, short incl_mode) } /* only if including settings from the autokeying mode... */ - if (incl_mode) { + if (incl_mode) { /* keyframing mode - only replace existing keyframes */ if (IS_AUTOKEY_MODE(scene, EDITKEYS)) flag |= INSERTKEY_REPLACE; @@ -131,7 +131,7 @@ bAction *verify_adt_action(ID *id, short add) adt = BKE_animdata_from_id(id); if ((adt == NULL) && (add)) adt = BKE_id_add_animdata(id); - if (adt == NULL) { + if (adt == NULL) { /* if still none (as not allowed to add, or ID doesn't have animdata for some reason) */ printf("ERROR: Couldn't add AnimData (ID = %s)\n", (id) ? (id->name) : "<None>"); return NULL; @@ -240,7 +240,7 @@ int insert_bezt_fcurve(FCurve *fcu, BezTriple *bezt, short flag) i = binarysearch_bezt_index(fcu->bezt, bezt->vec[1][0], fcu->totvert, &replace); /* replace an existing keyframe? */ - if (replace) { + if (replace) { /* sanity check: 'i' may in rare cases exceed arraylen */ if ((i >= 0) && (i < fcu->totvert)) { /* just change the values when replacing, so as to not overwrite handles */ @@ -412,12 +412,12 @@ static short new_key_needed(FCurve *fcu, float cFrame, float nValue) float prevPosi = 0.0f, prevVal = 0.0f; float beztPosi = 0.0f, beztVal = 0.0f; - /* get current time+value */ + /* get current time+value */ beztPosi = bezt->vec[1][0]; beztVal = bezt->vec[1][1]; if (prev) { - /* there is a keyframe before the one currently being examined */ + /* there is a keyframe before the one currently being examined */ /* get previous time+value */ prevPosi = prev->vec[1][0]; @@ -940,7 +940,7 @@ short insert_keyframe(ReportList *reports, ID *id, bAction *act, const char grou } /* key entire array convenience method */ - if (array_index == -1) { + if (array_index == -1) { array_index = 0; array_index_max = RNA_property_array_length(&ptr, prop); @@ -1034,7 +1034,7 @@ short delete_keyframe(ReportList *reports, ID *id, bAction *act, const char grou } /* key entire array convenience method */ - if (array_index == -1) { + if (array_index == -1) { array_index = 0; array_index_max = RNA_property_array_length(&ptr, prop); @@ -1064,7 +1064,7 @@ short delete_keyframe(ReportList *reports, ID *id, bAction *act, const char grou /* try to find index of beztriple to get rid of */ i = binarysearch_bezt_index(fcu->bezt, cfra, fcu->totvert, &found); - if (found) { + if (found) { /* delete the key at the index (will sanity check + do recalc afterwards) */ delete_fcurve_key(fcu, i, 1); @@ -1863,7 +1863,7 @@ short fcurve_frame_has_keyframe(FCurve *fcu, float frame, short filter) /* binarysearch_bezt_index will set replace to be 0 or 1 * - obviously, 1 represents a match */ - if (replace) { + if (replace) { /* sanity check: 'i' may in rare cases exceed arraylen */ if ((i >= 0) && (i < fcu->totvert)) return 1; diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c index c19904d39ac..7c5b75e56ae 100644 --- a/source/blender/editors/armature/armature_ops.c +++ b/source/blender/editors/armature/armature_ops.c @@ -88,7 +88,7 @@ void ED_operatortypes_armature(void) WM_operatortype_append(ARMATURE_OT_armature_layers); WM_operatortype_append(ARMATURE_OT_bone_layers); - /* SKETCH */ + /* SKETCH */ WM_operatortype_append(SKETCH_OT_gesture); WM_operatortype_append(SKETCH_OT_delete); WM_operatortype_append(SKETCH_OT_draw_stroke); @@ -221,7 +221,7 @@ void ED_keymap_armature(wmKeyConfig *keyconf) /* Already part of view3d select */ //WM_keymap_add_item(keymap, "SKETCH_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); - /* sketch poll checks mode */ + /* sketch poll checks mode */ WM_keymap_add_item(keymap, "SKETCH_OT_gesture", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", LEFTMOUSE, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", LEFTMOUSE, KM_PRESS, KM_CTRL, 0); diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 8a75d07a678..5d4609fcd7c 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -117,14 +117,14 @@ void ED_armature_sync_selection(ListBase *edbo) else ebo->flag &= ~BONE_SELECTED; } - } + } } void ED_armature_validate_active(struct bArmature *arm) { EditBone *ebone = arm->act_edbone; - if (ebone) { + if (ebone) { if (ebone->flag & BONE_HIDDEN_A) arm->act_edbone = NULL; } @@ -304,7 +304,7 @@ EditBone *make_boneList(ListBase *edbo, ListBase *bones, EditBone *parent, Bone eBone->ease2 = curBone->ease2; eBone->rad_head = curBone->rad_head; eBone->rad_tail = curBone->rad_tail; - eBone->segments = curBone->segments; + eBone->segments = curBone->segments; eBone->layer = curBone->layer; if (curBone->prop) @@ -897,7 +897,7 @@ static void joined_armature_fix_links(Object *tarArm, Object *srcArm, bPoseChann /* make tar armature be new parent */ ob->parent = tarArm; } - } + } } /* join armature exec is exported for use in object->join objects operator... */ @@ -1113,7 +1113,7 @@ static void separated_armature_fix_links(Object *origArm, Object *newArm) } } } - } + } } /* Helper function for armature separating - remove certain bones from the given armature @@ -1440,7 +1440,7 @@ static int pose_select_connected_invoke(bContext *C, wmOperator *op, wmEvent *ev /* Select parents */ for (curBone = bone; curBone; curBone = next) { /* ignore bone if cannot be selected */ - if ((curBone->flag & BONE_UNSELECTABLE) == 0) { + if ((curBone->flag & BONE_UNSELECTABLE) == 0) { // XXX old cruft! use notifiers instead //select_actionchannel_by_name (ob->action, curBone->name, !(shift)); @@ -1493,7 +1493,7 @@ void POSE_OT_select_linked(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - /* props */ + /* props */ RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first"); } @@ -1550,7 +1550,7 @@ static int armature_select_linked_invoke(bContext *C, wmOperator *op, wmEvent *e bone = curBone; break; } - else { + else { bone = NULL; break; } @@ -2687,7 +2687,7 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *UNUSED(op)) updateDuplicateSubtarget(eBone, arm->edbo, obedit); } } - } + } /* correct the active bone */ if (arm->act_edbone) { @@ -2802,7 +2802,7 @@ static void fill_add_joint(EditBone *ebo, short eb_tail, ListBase *points) } for (ebp = points->first; ebp; ebp = ebp->next) { - if (equals_v3v3(ebp->vec, vec)) { + if (equals_v3v3(ebp->vec, vec)) { if (eb_tail) { if ((ebp->head_owner) && (ebp->head_owner->parent == ebo)) { /* so this bone's tail owner is this bone */ @@ -3150,7 +3150,7 @@ static int armature_merge_exec(bContext *C, wmOperator *op) /* put back link */ BLI_insertlinkbefore(&chains, nchain, chain); - } + } armature_tag_unselect(arm); @@ -3457,7 +3457,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op) /* Deselect the old bone */ ebone->flag &= ~(BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL); - } + } } /* if only one bone, make this one active */ if (totbone == 1 && first) arm->act_edbone = first; @@ -3681,7 +3681,7 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op)) parent = ebo->parent; /* only if selected and editable */ - if (EBONE_VISIBLE(arm, ebo) && EBONE_EDITABLE(ebo)) { + if (EBONE_VISIBLE(arm, ebo) && EBONE_EDITABLE(ebo)) { /* swap head and tail coordinates */ SWAP(float, ebo->head[0], ebo->tail[0]); SWAP(float, ebo->head[1], ebo->tail[1]); @@ -3721,7 +3721,7 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op)) } /* free chains */ - BLI_freelistN(&chains); + BLI_freelistN(&chains); armature_tag_unselect(arm); @@ -3778,7 +3778,7 @@ static void bone_connect_to_new_parent(ListBase *edbo, EditBone *selbone, EditBo } } - if (mode == ARM_PAR_CONNECT) { + if (mode == ARM_PAR_CONNECT) { /* Connected: Child bones will be moved to the parent tip */ selbone->flag |= BONE_CONNECTED; sub_v3_v3v3(offset, actbone->tail, selbone->head); @@ -3893,7 +3893,7 @@ static int armature_parent_set_invoke(bContext *C, wmOperator *UNUSED(op), wmEve { if (ebone != actbone) { if (ebone->parent != actbone) allchildbones = 1; - } + } } CTX_DATA_END; @@ -3901,7 +3901,7 @@ static int armature_parent_set_invoke(bContext *C, wmOperator *UNUSED(op), wmEve /* ob becomes parent, make the associated menus */ if (allchildbones) - uiItemEnumO(layout, "ARMATURE_OT_parent_set", NULL, 0, "type", ARM_PAR_OFFSET); + uiItemEnumO(layout, "ARMATURE_OT_parent_set", NULL, 0, "type", ARM_PAR_OFFSET); uiPupMenuEnd(C, pup); @@ -3994,7 +3994,7 @@ static int armature_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) ebone->flag ^= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); } } - CTX_DATA_END; + CTX_DATA_END; WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, NULL); @@ -4055,7 +4055,7 @@ static int armature_de_select_all_exec(bContext *C, wmOperator *op) } } } - CTX_DATA_END; + CTX_DATA_END; WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, NULL); @@ -4295,7 +4295,7 @@ static int armature_select_hierarchy_exec(bContext *C, wmOperator *op) break; } - } + } else { // BONE_SELECT_CHILD chbone = editbone_get_child(arm, curbone, 1); if (chbone == NULL) continue; @@ -4566,7 +4566,7 @@ int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, shor nearBone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); arm->act_bone = nearBone; } - } + } } if (ob_act) { @@ -5118,7 +5118,7 @@ static void pchan_clear_rot(bPoseChannel *pchan) } } } /* Duplicated in source/blender/editors/object/object_transform.c */ - else { + else { if (pchan->rotmode == ROT_MODE_QUAT) { unit_qt(pchan->quat); } @@ -5544,7 +5544,7 @@ static void constraint_bone_name_fix(Object *ob, ListBase *conlist, char *oldnam if (cti->flush_constraint_targets) cti->flush_constraint_targets(curcon, &targets, 0); - } + } } } @@ -5631,7 +5631,7 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n } } - if (modifiers_usesArmature(ob, arm)) { + if (modifiers_usesArmature(ob, arm)) { bDeformGroup *dg = defgroup_find_name(ob, oldname); if (dg) { BLI_strncpy(dg->name, newname, MAXBONENAME); @@ -5959,7 +5959,7 @@ float arcLengthRatio(ReebArc *arc) embedLength = arcLength; } - return embedLength / arcLength; + return embedLength / arcLength; } EditBone *test_subdivideByLength(Scene *scene, Object *obedit, ReebArc *arc, ReebNode *head, ReebNode *tail) @@ -6060,7 +6060,7 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg) arc->flag = 1; /* mark arc direction */ } - /* Loop over subdivision methods */ + /* Loop over subdivision methods */ for (i = 0; lastBone == NULL && i < SKGEN_SUB_TOTAL; i++) { switch (scene->toolsettings->skgen_subdivisions[i]) { case SKGEN_SUB_LENGTH: diff --git a/source/blender/editors/armature/editarmature_generate.c b/source/blender/editors/armature/editarmature_generate.c index 23dd3b15476..d9c7e78c01e 100644 --- a/source/blender/editors/armature/editarmature_generate.c +++ b/source/blender/editors/armature/editarmature_generate.c @@ -55,7 +55,7 @@ void setBoneRollFromNormal(EditBone *bone, const float no[3], float UNUSED(invma if (no != NULL && !is_zero_v3(no)) { float normal[3]; - copy_v3_v3(normal, no); + copy_v3_v3(normal, no); mul_m3_v3(tmat, normal); bone->roll = ED_rollBoneToVector(bone, normal, FALSE); diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index 196d03020e7..e5372c3ea09 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -191,7 +191,7 @@ static float rollBoneByQuatJoint(RigEdge *edge, RigEdge *previous, float qrot[4] if (previous->bone) { sub_v3_v3v3(vec_first, previous->bone->tail, previous->bone->head); - } + } else if (previous->prev->bone) { sub_v3_v3v3(vec_first, edge->bone->head, previous->prev->bone->tail); } @@ -653,7 +653,7 @@ static int RIG_parentControl(RigControl *ctrl, EditBone *link) sub_v3_v3v3(offset, ctrl->bone->head, link->head); - /* if root matches, check for direction too */ + /* if root matches, check for direction too */ if (dot_v3v3(offset, offset) < 0.0001f) { float vbone[3], vparent[3]; @@ -802,7 +802,7 @@ static void RIG_reconnectControlBones(RigGraph *rg) } } - /* if not found yet, check child */ + /* if not found yet, check child */ if (found == 0) { RigArc *arc; RigArc *best_arc = NULL; @@ -863,7 +863,7 @@ static void RIG_reconnectControlBones(RigGraph *rg) /* SET bone link to ctrl corresponding to pchan */ RigControl *link = BLI_ghash_lookup(rg->controls_map, pchan->name); - /* if owner is a control bone, link with it */ + /* if owner is a control bone, link with it */ if (link && link->link) { RIG_parentControl(ctrl, link->bone); found = 1; @@ -876,7 +876,7 @@ static void RIG_reconnectControlBones(RigGraph *rg) cti->flush_constraint_targets(con, &targets, 0); } } - } + } if (found == 0) { /* check if parent is already linked */ @@ -1324,7 +1324,7 @@ void RIG_printArc(RigGraph *rg, RigArc *arc) printf("\t\t%s\n", edge->bone->name); RIG_printLinkedCtrl(rg, edge->bone, 3); } - } + } printf("symmetry level: %i flag: %i group %i\n", arc->symmetry_level, arc->symmetry_flag, arc->symmetry_group); RIG_printNode((RigNode *)arc->tail, "tail"); @@ -1336,7 +1336,7 @@ void RIG_printGraph(RigGraph *rg) printf("---- ARCS ----\n"); for (arc = rg->arcs.first; arc; arc = arc->next) { - RIG_printArc(rg, arc); + RIG_printArc(rg, arc); printf("\n"); } @@ -1345,7 +1345,7 @@ void RIG_printGraph(RigGraph *rg) } else { printf("HEAD NODE: NONE\n"); - } + } } /*******************************************************************************************************/ @@ -1584,7 +1584,7 @@ static void finalizeControl(RigGraph *rigg, RigControl *ctrl, float resize) repositionTailControl(rigg, ctrl_child); } } - } + } } static void repositionTailControl(RigGraph *rigg, RigControl *ctrl) @@ -1840,7 +1840,7 @@ static float calcCostAngleLengthDistance(BArcIterator *iter, float **UNUSED(vec_ length2 = normalize_v3(vec_second); - /* Angle cost */ + /* Angle cost */ if (edge->prev) { sub_v3_v3v3(vec_first, vec1, vec0); normalize_v3(vec_first); @@ -2135,7 +2135,7 @@ static void retargetArctoArcLength(bContext *C, RigGraph *rigg, RigArc *iarc, Ri no = node_end->no; } - /* no need to move virtual edges (space between unconnected bones) */ + /* no need to move virtual edges (space between unconnected bones) */ if (edge->bone) { repositionBone(C, rigg, edge, vec0, vec1, no); } @@ -2173,7 +2173,7 @@ void *exec_retargetArctoArc(void *param) RetargetParam *p = (RetargetParam *)param; RigGraph *rigg = p->rigg; RigArc *iarc = p->iarc; - bContext *C = p->context; + bContext *C = p->context; RigNode *inode_start = p->inode_start; ReebArc *earc = iarc->link_mesh; @@ -2222,7 +2222,7 @@ static void matchMultiResolutionNode(RigGraph *rigg, RigNode *inode, ReebNode *t enode = enode->link_down; reebg = BIF_graphForMultiNode(rigg->link_mesh, enode); /* replace with call to link_down once that exists */ eshape = BLI_subtreeShape((BGraph *)reebg, (BNode *)enode, NULL, 0) % SHAPE_LEVELS; - } + } } static void markMultiResolutionChildArc(ReebNode *end_enode, ReebNode *enode) @@ -2273,7 +2273,7 @@ static void matchMultiResolutionArc(RigGraph *rigg, RigNode *start_node, RigArc reebg = reebg->link_up; enode = next_earc->head; eshape = BLI_subtreeShape((BGraph *)reebg, (BNode *)enode, (BArc *)next_earc, 1) % SHAPE_LEVELS; - } + } next_earc->flag = ARC_USED; next_iarc->link_mesh = next_earc; @@ -2303,7 +2303,7 @@ static void matchMultiResolutionStartingNode(RigGraph *rigg, ReebGraph *reebg, R enode = reebg->nodes.first; eshape = BLI_subtreeShape((BGraph *)reebg, (BNode *)enode, NULL, 0) % SHAPE_LEVELS; - } + } inode->link_mesh = enode; } @@ -2600,7 +2600,7 @@ void BIF_retargetArmature(bContext *C) ED_undo_push(C, "Retarget Skeleton"); - // XXX + // XXX // allqueue(REDRAWVIEW3D, 0); } diff --git a/source/blender/editors/armature/poseUtils.c b/source/blender/editors/armature/poseUtils.c index e2e3c49e7e0..f3c32399ad6 100644 --- a/source/blender/editors/armature/poseUtils.c +++ b/source/blender/editors/armature/poseUtils.c @@ -274,7 +274,7 @@ LinkData *poseAnim_mapping_getNextFCurve(ListBase *fcuLinks, LinkData *prev, con /* check if paths match */ if (strcmp(path, fcu->rna_path) == 0) return ld; - } + } /* none found */ return NULL; diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index a05a98c58ca..ae3d496b641 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -871,7 +871,7 @@ static void poselib_apply_pose(tPoseLib_PreviewData *pld) if (pld->marker) frame = pld->marker->frame; else - return; + return; /* init settings for testing groups for keyframes */ @@ -887,7 +887,7 @@ static void poselib_apply_pose(tPoseLib_PreviewData *pld) /* has keyframe on this frame, so try to get a PoseChannel with this name */ pchan = BKE_pose_channel_find_name(pose, agrp->name); - if (pchan) { + if (pchan) { short ok = 0; /* check if this bone should get any animation applied */ @@ -1079,7 +1079,7 @@ static void poselib_preview_get_next(tPoseLib_PreviewData *pld, int step) } /* check if any matches */ - if (pld->searchp.first == NULL) { + if (pld->searchp.first == NULL) { pld->marker = NULL; return; } @@ -1152,7 +1152,7 @@ static void poselib_preview_handle_search(tPoseLib_PreviewData *pld, unsigned sh poselib_preview_get_next(pld, 1); pld->redraw = PL_PREVIEW_REDRAWALL; return; - } + } break; case DELKEY: @@ -1639,7 +1639,7 @@ void POSELIB_OT_browse_interactive(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING; - /* properties */ + /* properties */ // TODO: make the pose_index into a proper enum instead of a cryptic int... ot->prop = RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, "Pose", "Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)", 0, INT_MAX); diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index 99de90bc9fa..576e5983d16 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -134,7 +134,7 @@ void ED_armature_exit_posemode(bContext *C, Base *base) ob->mode &= ~OB_MODE_POSE; WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_MODE_OBJECT, NULL); - } + } } /* if a selected or active bone is protected, throw error (oonly if warn == 1) and return 1 */ @@ -500,7 +500,7 @@ static int pose_select_hierarchy_exec(bContext *C, wmOperator *op) found = 1; break; } - } + } else { /* direction == BONE_SELECT_CHILD */ /* the child member is only assigned to connected bones, see [#30340] */ #if 0 @@ -992,7 +992,7 @@ static void pose_copy_menu(Scene *scene) } } } - } + } else { /* constraints, optional (note: max we can have is 24 constraints) */ bConstraint *con, *con_back; int const_toggle[24] = {0}; /* XXX, initialize as 0 to quiet errors */ @@ -1018,7 +1018,7 @@ static void pose_copy_menu(Scene *scene) con_back = con->next; BLI_freelinkN(&const_copy, con); con = con_back; - } + } else con = con->next; } @@ -1035,7 +1035,7 @@ static void pose_copy_menu(Scene *scene) * appending to list of constraints for this channel */ copy_constraints(&tmp_constraints, &const_copy, TRUE); - if ((ob->proxy) && (pchan->bone->layer & arm->layer_protected)) { + if ((ob->proxy) && (pchan->bone->layer & arm->layer_protected)) { /* add proxy-local tags */ for (con = tmp_constraints.first; con; con = con->next) con->flag |= CONSTRAINT_PROXY_LOCAL; @@ -1097,7 +1097,7 @@ static void set_pose_keys(Object *ob) for (chan = ob->pose->chanbase.first; chan; chan = chan->next) { Bone *bone = chan->bone; if ((bone) && (bone->flag & BONE_SELECTED) && (arm->layer & bone->layer)) - chan->flag |= POSE_KEY; + chan->flag |= POSE_KEY; else chan->flag &= ~POSE_KEY; } @@ -1916,7 +1916,7 @@ static int pose_bone_rotmode_exec(bContext *C, wmOperator *op) Object *ob = CTX_data_active_object(C); int mode = RNA_enum_get(op->ptr, "type"); - /* set rotation mode of selected bones */ + /* set rotation mode of selected bones */ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones) { pchan->rotmode = mode; @@ -2100,7 +2100,7 @@ static int pose_bone_layers_invoke(bContext *C, wmOperator *op, wmEvent *evt) { int layers[32] = {0}; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */ - /* get layers that are active already */ + /* get layers that are active already */ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones) { short bit; @@ -2299,10 +2299,10 @@ static int pose_clear_user_transforms_exec(bContext *C, wmOperator *op) * just pose values should change, so this should be fine */ bPose *dummyPose = NULL; - Object workob = {{0}}; + Object workob = {{0}}; bPoseChannel *pchan; - /* execute animation step for current frame using a dummy copy of the pose */ + /* execute animation step for current frame using a dummy copy of the pose */ BKE_pose_copy_data(&dummyPose, ob->pose, 0); BLI_strncpy(workob.id.name, "OB<ClearTfmWorkOb>", sizeof(workob.id.name)); diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c index 00f88a69fb6..b1bf13db69b 100644 --- a/source/blender/editors/armature/reeb.c +++ b/source/blender/editors/armature/reeb.c @@ -340,7 +340,7 @@ static ReebArc *copyArc(ReebGraph *rg, ReebArc *arc) cp_arc->edges.first = NULL; cp_arc->edges.last = NULL; - /* copy buckets */ + /* copy buckets */ cp_arc->buckets = MEM_callocN(sizeof(EmbedBucket) * cp_arc->bcount, "embed bucket"); memcpy(cp_arc->buckets, arc->buckets, sizeof(EmbedBucket) * cp_arc->bcount); @@ -377,7 +377,7 @@ static ReebGraph *copyReebGraph(ReebGraph *rg, int level) cp_rg->link_up = rg; cp_rg->multi_level = level; - /* Copy nodes */ + /* Copy nodes */ for (node = rg->nodes.first; node; node = node->next) { ReebNode *cp_node = copyNode(cp_rg, node); @@ -889,7 +889,7 @@ static void calculateArcLength(ReebArc *arc) vec0 = vec1; } - arc->length += len_v3v3(arc->tail->p, vec1); + arc->length += len_v3v3(arc->tail->p, vec1); } static void calculateGraphLength(ReebGraph *rg) @@ -948,7 +948,7 @@ void REEB_RadialSymmetry(BNode *root_node, RadialArc *ring, int count) bucket1 = IT_next(iter1); bucket2 = IT_next(iter2); - /* Make sure they both start at the same value */ + /* Make sure they both start at the same value */ while (bucket1 && bucket2 && bucket1->val < bucket2->val) { bucket1 = IT_next(iter1); } @@ -1005,7 +1005,7 @@ void REEB_RadialSymmetry(BNode *root_node, RadialArc *ring, int count) bucket1 = IT_next(iter1); bucket2 = IT_next(iter2); - /* Make sure they both start at the same value */ + /* Make sure they both start at the same value */ while (bucket1 && bucket1->val < bucket2->val) { bucket1 = IT_next(iter1); } @@ -1016,7 +1016,7 @@ void REEB_RadialSymmetry(BNode *root_node, RadialArc *ring, int count) for (; bucket1 && bucket2; bucket1 = IT_next(iter1), bucket2 = IT_next(iter2)) { - /* copy and mirror back to bucket2 */ + /* copy and mirror back to bucket2 */ bucket2->nv = bucket1->nv; copy_v3_v3(bucket2->p, bucket1->p); BLI_mirrorAlongAxis(bucket2->p, node->p, normal); @@ -1062,7 +1062,7 @@ void REEB_AxialSymmetry(BNode *root_node, BNode *node1, BNode *node2, struct BAr bucket1 = IT_next(iter1); bucket2 = IT_next(iter2); - /* Make sure they both start at the same value */ + /* Make sure they both start at the same value */ while (bucket1 && bucket1->val < bucket2->val) { bucket1 = IT_next(iter1); } @@ -1080,7 +1080,7 @@ void REEB_AxialSymmetry(BNode *root_node, BNode *node1, BNode *node2, struct BAr /* add bucket2 in bucket1 */ interp_v3_v3v3(bucket1->p, bucket1->p, bucket2->p, (float)bucket2->nv / (float)(bucket1->nv)); - /* copy and mirror back to bucket2 */ + /* copy and mirror back to bucket2 */ bucket2->nv = bucket1->nv; copy_v3_v3(bucket2->p, bucket1->p); BLI_mirrorAlongAxis(bucket2->p, root_node->p, nor); @@ -1212,7 +1212,7 @@ static void reweightArc(ReebGraph *rg, ReebArc *arc, ReebNode *start_node, float reweightArc(rg, next_arc, node, end_weight); } - /* update only if needed */ + /* update only if needed */ if (arc->head->weight != start_weight || arc->tail->weight != end_weight) { old_weight = arc->head->weight; /* backup head weight, other arcs need it intact, it will be fixed by the source arc */ @@ -1318,7 +1318,7 @@ static int joinSubgraphsEnds(ReebGraph *rg, float threshold, int nb_subgraphs) } joined = 1; - } + } } return joined; @@ -1450,7 +1450,7 @@ static void filterArc(ReebGraph *rg, ReebNode *newNode, ReebNode *removedNode, R arc->tail = newNode; } - // Remove looped arcs + // Remove looped arcs if (arc->head == arc->tail) { // v1 or v2 was already newNode, since we're removing an arc, decrement degree NodeDegreeDecrement(rg, newNode); @@ -1648,7 +1648,7 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold)) BLI_sortlist(&rg->arcs, compareArcs); #ifdef DEBUG_REEB - { + { EditFace *efa; for (efa = G.editMesh->faces.first; efa; efa = efa->next) { efa->tmp.fp = -1; @@ -1731,7 +1731,7 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold)) efa->tmp.fp = saacos(fabs(angle)); #endif #else - add_v3_v3(avg_vec, efa->n); + add_v3_v3(avg_vec, efa->n); #endif } @@ -1873,7 +1873,7 @@ static int compareVerts(const void *a, const void *b) value = 1; } - return value; + return value; } static void spreadWeight(EditMesh *em) @@ -1947,7 +1947,7 @@ void REEB_exportGraph(ReebGraph *rg, int count) fprintf(f, "angle %0.3f %0.3f %0.3f %0.3f %i\n", p[0], p[1], p[2], arc->angle, BLI_ghash_size(arc->faces)); exportNode(f, "v2", arc->tail); - } + } fclose(f); } @@ -1983,7 +1983,7 @@ void removeNormalNodes(ReebGraph *rg) /* If arcs are one after the other */ if (arc->head == connectedArc->tail) { - /* remove furthest arc */ + /* remove furthest arc */ if (arc->tail->weight < connectedArc->head->weight) { mergeConnectedArcs(rg, arc, connectedArc); nextArc = arc->next; @@ -2006,7 +2006,7 @@ void removeNormalNodes(ReebGraph *rg) /* If arcs are one after the other */ if (arc->tail == connectedArc->head) { - /* remove furthest arc */ + /* remove furthest arc */ if (arc->head->weight < connectedArc->tail->weight) { mergeConnectedArcs(rg, arc, connectedArc); nextArc = arc->next; @@ -2092,7 +2092,7 @@ void mergeArcEdges(ReebGraph *rg, ReebArc *aDst, ReebArc *aSrc, MergeDirection d newEdge->nextEdge = e; - // if edge was the first in the list, point the edit edge to the new reeb edge instead. + // if edge was the first in the list, point the edit edge to the new reeb edge instead. if (*p == e) { *p = (void *)newEdge; } @@ -2289,12 +2289,12 @@ static ReebEdge *createArc(ReebGraph *rg, ReebNode *node1, ReebNode *node2) arc->faces = BLI_ghash_ptr_new("createArc gh"); if (node1->weight <= node2->weight) { - v1 = node1; - v2 = node2; + v1 = node1; + v2 = node2; } else { - v1 = node2; - v2 = node1; + v1 = node2; + v2 = node1; } arc->head = v1; @@ -2857,7 +2857,7 @@ int weightFromDistance(EditMesh *em, EdgeIndex *indexed_edges) /* Apply dijkstra spf for each selected vert */ for (eve = em->verts.first; eve; eve = eve->next) { if (eve->f & SELECT) { - shortestPathsFromVert(em, eve, indexed_edges); + shortestPathsFromVert(em, eve, indexed_edges); } } @@ -2927,7 +2927,7 @@ static void initIteratorFct(ReebArcIterator *iter) iter->next = nextBucket; iter->nextN = nextNBucket; iter->previous = previousBucket; - iter->stopped = iteratorStopped; + iter->stopped = iteratorStopped; } static void setIteratorValues(ReebArcIterator *iter, EmbedBucket *bucket) @@ -3419,7 +3419,7 @@ void REEB_draw() if (G.scene->toolsettings->skgen_options & SKGEN_DISP_EMBED) { - glColor3f(1, 1, 1); + glColor3f(1, 1, 1); glBegin(GL_POINTS); glVertex3fv(arc->head->p); glVertex3fv(arc->tail->p); diff --git a/source/blender/editors/armature/reeb.h b/source/blender/editors/armature/reeb.h index bb8b3003baf..b0e1fd3ae34 100644 --- a/source/blender/editors/armature/reeb.h +++ b/source/blender/editors/armature/reeb.h @@ -114,7 +114,7 @@ typedef struct ReebArc { int bcount; struct EmbedBucket *buckets; - struct GHash *faces; + struct GHash *faces; float angle; struct ReebArc *link_up; /* for multi resolution filtering, points to higher levels */ } ReebArc; diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 874b31dd1ca..336ff5e1023 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -162,9 +162,9 @@ static short select_beztriple(BezTriple *bezt, short selstatus, short flag, shor bezt->f1 |= flag; bezt->f2 |= flag; bezt->f3 |= flag; - return 1; + return 1; } - else { /* deselects */ + else { /* deselects */ bezt->f1 &= ~flag; bezt->f2 &= ~flag; bezt->f3 &= ~flag; @@ -2063,7 +2063,7 @@ static int set_goal_weight_exec(bContext *C, wmOperator *op) bp->weight = weight; } } - } + } DAG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); @@ -2115,7 +2115,7 @@ static int set_radius_exec(bContext *C, wmOperator *op) bp->radius = radius; } } - } + } WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); DAG_id_tag_update(obedit->data, 0); @@ -2408,7 +2408,7 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short for (nu = editnurb->first; nu; nu = nu->next) { lastsel = 0; - if (nu->type == CU_BEZIER) { + if (nu->type == CU_BEZIER) { a = nu->pntsu; bezt = nu->bezt; if (next < 0) bezt = &nu->bezt[a - 1]; @@ -2425,7 +2425,7 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short bezt += next; lastsel = 0; } - /* move around in zigzag way so that we go through each */ + /* move around in zigzag way so that we go through each */ bezt -= (next - next / abs(next)); } } @@ -2440,7 +2440,7 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short if (!(bp->f1 & SELECT) || (selstatus == 0)) { short sel = select_bpoint(bp, selstatus, 1, VISIBLE); if ((sel == 1) && (cont == 0)) lastsel = 1; - } + } } else { bp += next; @@ -2706,7 +2706,7 @@ static int hide_exec(bContext *C, wmOperator *op) DAG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); - return OPERATOR_FINISHED; + return OPERATOR_FINISHED; } void CURVE_OT_hide(wmOperatorType *ot) @@ -2767,7 +2767,7 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op)) DAG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); - return OPERATOR_FINISHED; + return OPERATOR_FINISHED; } void CURVE_OT_reveal(wmOperatorType *ot) @@ -3200,7 +3200,7 @@ static int subdivide_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); DAG_id_tag_update(obedit->data, 0); - return OPERATOR_FINISHED; + return OPERATOR_FINISHED; } void CURVE_OT_subdivide(wmOperatorType *ot) @@ -5252,10 +5252,10 @@ static int select_more_exec(bContext *C, wmOperator *UNUSED(op)) tempbp = bp + 1; if (!(tempbp->f1 & SELECT)) sel = select_bpoint(tempbp, SELECT, 1, VISIBLE); if (sel) { - bp++; + bp++; a--; } - } + } } bp++; @@ -5313,8 +5313,8 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op)) if ((bp->hide == 0) && (bp->f1 & SELECT)) { sel = 0; - /* check if neighbors have been selected */ - /* edges of surface are an exception */ + /* check if neighbors have been selected */ + /* edges of surface are an exception */ if ((a + 1) % nu->pntsu == 0) sel++; else { bp--; @@ -5346,7 +5346,7 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op)) if (sel != 4) { select_bpoint(bp, DESELECT, 1, VISIBLE); selbpoints[a] = 1; - } + } } else lastsel = 0; @@ -5360,7 +5360,7 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op)) for (nu = editnurb->first; nu; nu = nu->next) { lastsel = 0; /* check what type of curve/nurb it is */ - if (nu->type == CU_BEZIER) { + if (nu->type == CU_BEZIER) { a = nu->pntsu; bezt = nu->bezt; while (a--) { @@ -5368,10 +5368,10 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op)) if (lastsel == 1) sel = 1; else sel = 0; - /* check if neighbors have been selected */ - /* first and last are exceptions */ + /* check if neighbors have been selected */ + /* first and last are exceptions */ if (a == nu->pntsu - 1) sel++; - else { + else { bezt--; if ((bezt->hide == 0) && (bezt->f2 & SELECT)) sel++; bezt++; @@ -5385,14 +5385,14 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op)) } if (sel != 2) { - select_beztriple(bezt, DESELECT, 1, VISIBLE); + select_beztriple(bezt, DESELECT, 1, VISIBLE); lastsel = 1; } else lastsel = 0; } else lastsel = 0; - bezt++; + bezt++; } } else { @@ -5403,9 +5403,9 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op)) if (lastsel != 0) sel = 1; else sel = 0; - /* first and last are exceptions */ + /* first and last are exceptions */ if (a == nu->pntsu * nu->pntsv - 1) sel++; - else { + else { bp--; if ((bp->hide == 0) && (bp->f1 & SELECT)) sel++; bp++; @@ -5419,9 +5419,9 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op)) } if (sel != 2) { - select_bpoint(bp, DESELECT, 1, VISIBLE); + select_bpoint(bp, DESELECT, 1, VISIBLE); lastsel = 1; - } + } else lastsel = 0; } else lastsel = 0; @@ -5482,7 +5482,7 @@ static void selectrandom_curve(ListBase *editnurb, float randfac) select_bpoint(bp, SELECT, 1, VISIBLE); bp++; } - } + } } } @@ -6627,7 +6627,7 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf) if (obedit == NULL || obedit->type != OB_SURF) { obedit = ED_object_add_type(C, OB_SURF, loc, rot, TRUE, layer); newob = 1; - } + } else DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); } diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index b379ce6e5cf..2d039cfaf7f 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -310,7 +310,7 @@ static int insert_lorem_exec(bContext *C, wmOperator *UNUSED(op)) lastlorem = ED_lorem; insert_into_textbuf(obedit, '\n'); - insert_into_textbuf(obedit, '\n'); + insert_into_textbuf(obedit, '\n'); DAG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); @@ -458,7 +458,7 @@ static void txt_add_object(bContext *C, TextLine *firstline, int totline, float nchars += strlen(tmp->line) + 1; if (cu->str) MEM_freeN(cu->str); - if (cu->strinfo) MEM_freeN(cu->strinfo); + if (cu->strinfo) MEM_freeN(cu->strinfo); cu->str = MEM_callocN(nchars + 4, "str"); cu->strinfo = MEM_callocN((nchars + 4) * sizeof(CharInfo), "strinfo"); @@ -757,7 +757,7 @@ static int paste_selection(Object *obedit, ReportList *reports) /* Verify that the copy buffer => [copy buffer len] + cu->len < MAXTEXT */ if (cu->len + len <= MAXTEXT) { - if (len) { + if (len) { int size = (cu->len * sizeof(wchar_t)) - (cu->pos * sizeof(wchar_t)) + sizeof(wchar_t); memmove(ef->textbuf + cu->pos + len, ef->textbuf + cu->pos, size); memcpy(ef->textbuf + cu->pos, ef->copybuf, len * sizeof(wchar_t)); @@ -835,7 +835,7 @@ static int move_cursor(bContext *C, int type, int select) if (ef->textbuf[cu->pos - 1] == '\n') break; if (ef->textbufinfo[cu->pos - 1].flag & CU_CHINFO_WRAP) break; cu->pos--; - } + } cursmove = FO_CURS; break; @@ -868,7 +868,7 @@ static int move_cursor(bContext *C, int type, int select) cursmove = FO_CURS; break; - case NEXT_CHAR: + case NEXT_CHAR: if ((select) && (cu->selstart == 0)) cu->selstart = cu->selend = cu->pos + 1; cu->pos++; cursmove = FO_CURS; diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 725ffcee1ba..11e07584405 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -98,8 +98,8 @@ static void gp_draw_stroke_buffer(tGPspoint *points, int totpoints, short thickn if (dflag & (GP_DRAWDATA_ONLY3D | GP_DRAWDATA_ONLYV2D)) return; - /* if drawing a single point, draw it larger */ - if (totpoints == 1) { + /* if drawing a single point, draw it larger */ + if (totpoints == 1) { /* draw point */ glBegin(GL_POINTS); glVertex2iv(&points->x); @@ -315,7 +315,7 @@ static void gp_draw_stroke(bGPDspoint *points, int totpoints, short thickness_s, s0[1] = (pt1->y / 100 * winy) + offsy; s1[0] = (pt2->x / 100 * winx) + offsx; s1[1] = (pt2->y / 100 * winy) + offsy; - } + } /* calculate gradient and normal - 'angle'=(ny/nx) */ m1[1] = s1[1] - s0[1]; @@ -331,7 +331,7 @@ static void gp_draw_stroke(bGPDspoint *points, int totpoints, short thickness_s, if (i == 0) { /* draw start cap first * - make points slightly closer to center (about halfway across) - */ + */ mt[0] = m2[0] * pthick * 0.5f; mt[1] = m2[1] * pthick * 0.5f; sc[0] = s0[0] - (m1[0] * pthick * 0.75f); @@ -382,7 +382,7 @@ static void gp_draw_stroke(bGPDspoint *points, int totpoints, short thickness_s, if (((athick * 2.0f) < pthick) && (IS_EQF(athick, pthick) == 0)) { mt[0] += (mb[0] * dfac); mt[1] += (mb[1] * dfac); - } + } /* calculate points for start of segment */ t0[0] = s0[0] - mt[0]; @@ -420,7 +420,7 @@ static void gp_draw_stroke(bGPDspoint *points, int totpoints, short thickness_s, /* draw end cap as last step * - make points slightly closer to center (about halfway across) - */ + */ mt[0] = m2[0] * pthick * 0.5f; mt[1] = m2[1] * pthick * 0.5f; sc[0] = s1[0] + (m1[0] * pthick * 0.75f); @@ -531,7 +531,7 @@ static void gp_draw_strokes(bGPDframe *gpf, int offsx, int offsy, int winx, int #endif } } - else if (gps->totpoints > 1) + else if (gps->totpoints > 1) gp_draw_stroke(gps->points, gps->totpoints, lthick, dflag, gps->flag, debug, offsx, offsy, winx, winy); } } @@ -611,7 +611,7 @@ static void gp_draw_data(bGPdata *gpd, int offsx, int offsy, int winx, int winy, } else break; - } + } /* restore alpha */ glColor4fv(color); diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c index b69db0040b5..a1a39c1be1a 100644 --- a/source/blender/editors/gpencil/editaction_gpencil.c +++ b/source/blender/editors/gpencil/editaction_gpencil.c @@ -393,7 +393,7 @@ void paste_gpdata(Scene *scene) ScrArea *sa; /* get area that gp-data comes from */ - //sa= gpencil_data_findowner((bGPdata *)ale->owner); + //sa= gpencil_data_findowner((bGPdata *)ale->owner); sa = NULL; /* this should be the right frame... as it may be a pre-existing frame, diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index e5afbdba50b..cd6668e4d59 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -536,7 +536,7 @@ static void gp_stroke_simplify(tGPsdata *p) j += 2; } - } + } /* free old buffer */ MEM_freeN(old_points); @@ -860,7 +860,7 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p, } } } - else { + else { /* loop over the points in the stroke, checking for intersections * - an intersection will require the stroke to be split */ @@ -1210,7 +1210,7 @@ static void gp_paint_initstroke(tGPsdata *p, short paintmode) /* make strokes be drawn in screen space */ p->gpd->sbuffer_sflag &= ~GP_STROKE_2DSPACE; p->gpd->flag &= ~GP_DATA_VIEWALIGN; - } + } else p->gpd->sbuffer_sflag |= GP_STROKE_2DSPACE; } @@ -1342,7 +1342,7 @@ static void gpencil_draw_exit(bContext *C, wmOperator *op) gp_session_cleanup(p); /* finally, free the temp data */ - MEM_freeN(p); + MEM_freeN(p); } op->customdata = NULL; @@ -1790,7 +1790,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, wmEvent *event) if (p->status == GP_STATUS_ERROR) { estate = OPERATOR_CANCELLED; } - } + } else { p->status = GP_STATUS_IDLING; } diff --git a/source/blender/editors/include/ED_screen_types.h b/source/blender/editors/include/ED_screen_types.h index 527ebb6c3ef..9f42fd042c3 100644 --- a/source/blender/editors/include/ED_screen_types.h +++ b/source/blender/editors/include/ED_screen_types.h @@ -94,7 +94,7 @@ typedef struct AZone { /* for draw */ short x1, y1, x2, y2; /* for clip */ - rcti rect; + rcti rect; } AZone; /* actionzone type */ diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index 8f50edd1240..b3efcf1cd54 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -94,7 +94,7 @@ DEF_ICON(LINK) DEF_ICON(INLINK) DEF_ICON(PLUGIN) - /* various ui */ + /* various ui */ DEF_ICON(HELP) DEF_ICON(GHOST_ENABLED) DEF_ICON(COLOR) diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index fcde4186778..1039453e93a 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -527,7 +527,7 @@ static void ui_draw_links(uiBlock *block) foundselectline = TRUE; } } - } + } /* Draw any active lines (lines with either button being hovered over). * Do this last so they appear on top of inactive lines. */ @@ -539,7 +539,7 @@ static void ui_draw_links(uiBlock *block) ui_draw_linkline(line, !foundselectline); } } - } + } } } @@ -581,7 +581,7 @@ static void ui_but_update_linklines(uiBlock *block, uiBut *oldbut, uiBut *newbut if (line->from == newbut) line->from = oldbut; } - } + } /* check all other button links */ for (but = block->buttons.first; but; but = but->next) { @@ -1270,7 +1270,7 @@ void ui_delete_linkline(uiLinkLine *line, uiBut *but) (*(link->ppoin))[b] = (*(link->ppoin))[a]; b++; } - } + } (*(link->totlink))--; } } @@ -1391,7 +1391,7 @@ int ui_is_but_unit(uiBut *but) return 0; #endif - /* for now disable time unit conversion */ + /* for now disable time unit conversion */ if (unit_type == PROP_UNIT_TIME) return 0; @@ -1464,16 +1464,16 @@ double ui_get_but_val(uiBut *but) case 'S': value = hsv[1]; break; case 'V': value = hsv[2]; break; } - } + } else if (but->pointype == UI_BUT_POIN_CHAR) { value = *(char *)but->poin; } else if (but->pointype == UI_BUT_POIN_SHORT) { value = *(short *)but->poin; - } + } else if (but->pointype == UI_BUT_POIN_INT) { value = *(int *)but->poin; - } + } else if (but->pointype == UI_BUT_POIN_FLOAT) { value = *(float *)but->poin; } @@ -2006,7 +2006,7 @@ void ui_set_but_soft_range(uiBut *but, double value) static void ui_free_link(uiLink *link) { - if (link) { + if (link) { BLI_freelistN(&link->lines); MEM_freeN(link); } @@ -2055,7 +2055,7 @@ void uiFreeBlock(const bContext *C, uiBlock *block) uiBut *but; while ( (but = block->buttons.first) ) { - BLI_remlink(&block->buttons, but); + BLI_remlink(&block->buttons, but); ui_free_but(C, but); } @@ -2398,7 +2398,7 @@ void uiBlockBeginAlign(uiBlock *block) /* if other align was active, end it */ if (block->flag & UI_BUT_ALIGN) uiBlockEndAlign(block); - block->flag |= UI_BUT_ALIGN_DOWN; + block->flag |= UI_BUT_ALIGN_DOWN; block->alignnr++; /* buttons declared after this call will get this align nr */ // XXX flag? diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index 010df0cbfbc..426daa69272 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -160,7 +160,7 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl /* get current color, needs to be outside of glBegin/End */ glGetFloatv(GL_CURRENT_COLOR, color); - /* 'shade' defines strength of shading */ + /* 'shade' defines strength of shading */ coltop[0] = minf(1.0f, color[0] + shadetop); coltop[1] = minf(1.0f, color[1] + shadetop); coltop[2] = minf(1.0f, color[2] + shadetop); @@ -269,7 +269,7 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float /* get current color, needs to be outside of glBegin/End */ glGetFloatv(GL_CURRENT_COLOR, color); - /* 'shade' defines strength of shading */ + /* 'shade' defines strength of shading */ colLeft[0] = minf(1.0f, color[0] + shadeLeft); colLeft[1] = minf(1.0f, color[1] + shadeLeft); colLeft[2] = minf(1.0f, color[2] + shadeLeft); @@ -510,7 +510,7 @@ static void ui_draw_but_CHARTAB(uiBut *but) if (G.selfont && BKE_vfont_is_builtin(G.selfont) == FALSE) { /* Is the font file packed, if so then use the packed file */ if (G.selfont->packedfile) { - pf = G.selfont->packedfile; + pf = G.selfont->packedfile; FTF_SetFont(pf->data, pf->size, 14.0); } else { @@ -608,7 +608,7 @@ static void ui_draw_but_CHARTAB(uiBut *but) ey -= buth; sx = rect->xmin; ex = rect->xmin + butw; - } + } glShadeModel(GL_FLAT); /* Return Font Settings to original */ @@ -1221,7 +1221,7 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect) glColor3ub(255, 255, 255); glVertex2fv(v2); glVertex2fv(v3); - } + } } glEnd(); @@ -1707,7 +1707,7 @@ static void ui_shadowbox(float minx, float miny, float maxx, float maxy, float s glVertex2f(maxx, miny - shadsize); glEnd(); - /* bottom quad */ + /* bottom quad */ glBegin(GL_POLYGON); glColor4ub(0, 0, 0, alpha); glVertex2f(minx + 0.3f * shadsize, miny); diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index c4440cf07ed..ed1a2caab05 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -704,7 +704,7 @@ static int ui_but_mouse_inside_icon(uiBut *but, ARegion *ar, wmEvent *event) BLI_rcti_rctf_copy(&rect, &but->rect); - if (but->imb) { + if (but->imb) { /* use button size itself */ } else if (but->flag & UI_ICON_LEFT) { @@ -774,7 +774,7 @@ static void ui_delete_active_linkline(uiBlock *block) (*(link->ppoin))[b] = (*(link->ppoin))[a]; b++; } - } + } (*(link->totlink))--; } } @@ -1063,7 +1063,7 @@ static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleBut break; case HSVSLI: break; - case TOG3: + case TOG3: ui_apply_but_TOG3(C, but, data); break; case MENU: @@ -1109,10 +1109,10 @@ static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleBut case INLINK: ui_apply_but_LINK(C, but, data); break; - case BUT_IMAGE: + case BUT_IMAGE: ui_apply_but_IMAGE(C, but, data); break; - case HISTOGRAM: + case HISTOGRAM: ui_apply_but_HISTOGRAM(C, but, data); break; case WAVEFORM: @@ -1343,7 +1343,7 @@ static void ui_textedit_set_cursor_pos(uiBut *but, uiHandleButtonData *data, sho } /* mouse dragged outside the widget to the left */ - if (x < startx && but->ofs > 0) { + if (x < startx && but->ofs > 0) { int i = but->ofs; origstr[but->ofs] = 0; @@ -1587,7 +1587,7 @@ static int ui_textedit_delete(uiBut *but, uiHandleButtonData *data, int directio but->pos -= step; changed = 1; } - } + } } return changed; @@ -1676,7 +1676,7 @@ static int ui_textedit_copypaste(uiBut *but, uiHandleButtonData *data, int paste if (cut) if ((but->selend - but->selsta) > 0) changed = ui_textedit_delete_selection(but, data); - } + } return changed; } @@ -2254,7 +2254,7 @@ static int ui_do_but_HOTKEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data ED_region_tag_redraw(data->region); if (event->val == KM_PRESS) { - if (ISHOTKEY(event->type)) { + if (ISHOTKEY(event->type)) { if (WM_key_event_string(event->type)[0]) ui_set_but_val(but, event->type); @@ -2935,7 +2935,7 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton data->value = temp; else data->cancel = TRUE; - } + } else { if (f < tempf) tempf -= 0.01f; else tempf += 0.01f; @@ -3336,7 +3336,7 @@ static void ui_ndofedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, wmNDOF case UI_GRAD_V: hsv[2] += ndof->ry * sensitivity; break; - case UI_GRAD_V_ALT: + case UI_GRAD_V_ALT: /* vertical 'value' strip */ /* exception only for value strip - use the range set in but->min/max */ @@ -3904,7 +3904,7 @@ static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButt changed = 1; - /* reset cmp back to the curve points again, rather than drawing segments */ + /* reset cmp back to the curve points again, rather than drawing segments */ cmp = cuma->curve; /* find newly added point and make it 'sel' */ @@ -4508,11 +4508,11 @@ static uiBlock *menu_add_shortcut(bContext *C, ARegion *ar, void *arg) int kmi_id; /* XXX this guess_opname can potentially return a different keymap than being found on adding later... */ - km = WM_keymap_guess_opname(C, but->optype->idname); + km = WM_keymap_guess_opname(C, but->optype->idname); kmi = WM_keymap_add_item(km, but->optype->idname, AKEY, KM_PRESS, 0, 0); kmi_id = kmi->id; - /* copy properties, prop can be NULL for reset */ + /* copy properties, prop can be NULL for reset */ if (prop) prop = IDP_CopyProperty(prop); WM_keymap_properties_reset(kmi, prop); @@ -4520,7 +4520,7 @@ static uiBlock *menu_add_shortcut(bContext *C, ARegion *ar, void *arg) /* update and get pointers again */ WM_keyconfig_update(wm); - km = WM_keymap_guess_opname(C, but->optype->idname); + km = WM_keymap_guess_opname(C, but->optype->idname); kmi = WM_keymap_item_find_id(km, kmi_id); RNA_pointer_create(&wm->id, &RNA_KeyMapItem, kmi, &ptr); @@ -4954,7 +4954,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event) button_activate_state(C, but, BUTTON_STATE_EXIT); return WM_UI_HANDLER_BREAK; } - } + } else if (but->pointype && but->poin == NULL) { /* there's a pointer needed */ BKE_reportf(NULL, RPT_WARNING, "DoButton pointer error: %s", but->str); @@ -6380,7 +6380,7 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle break; /* opening sublevels of pulldowns */ - case RIGHTARROWKEY: + case RIGHTARROWKEY: if (event->val == KM_PRESS && (block->flag & UI_BLOCK_LOOP)) { PASS_EVENT_TO_PARENT_IF_NONACTIVE; diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 0921107b8e6..bb0cc1176d8 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -142,7 +142,7 @@ static void def_internal_icon(ImBuf *bbuf, int icon_id, int xofs, int yofs, int new_icon = MEM_callocN(sizeof(Icon), "texicon"); new_icon->obj = NULL; /* icon is not for library object */ - new_icon->type = 0; + new_icon->type = 0; di = MEM_callocN(sizeof(DrawInfo), "drawinfo"); di->type = type; @@ -852,7 +852,7 @@ static void icon_set_image(bContext *C, ID *id, PreviewImage *prv_img, enum eIco if (G.debug & G_DEBUG) printf("%s: no preview image for this ID: %s\n", __func__, id->name); return; - } + } icon_create_rect(prv_img, size); @@ -982,8 +982,8 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al if (!di) { di = icon_create_drawinfo(); - icon->drawinfo = di; - icon->drawinfo_free = UI_icons_free_drawinfo; + icon->drawinfo = di; + icon->drawinfo_free = UI_icons_free_drawinfo; } /* scale width and height according to aspect */ @@ -994,13 +994,13 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al /* vector icons use the uiBlock transformation, they are not drawn * with untransformed coordinates like the other icons */ di->data.vector.func((int)x, (int)y, ICON_DEFAULT_HEIGHT, ICON_DEFAULT_HEIGHT, 1.0f); - } + } else if (di->type == ICON_TYPE_TEXTURE) { icon_draw_texture(x, y, (float)w, (float)h, di->data.texture.x, di->data.texture.y, di->data.texture.w, di->data.texture.h, alpha, rgb); } else if (di->type == ICON_TYPE_BUFFER) { - /* it is a builtin icon */ + /* it is a builtin icon */ iimg = di->data.buffer.image; if (!iimg->rect) return; /* something has gone wrong! */ @@ -1010,7 +1010,7 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al else if (di->type == ICON_TYPE_PREVIEW) { PreviewImage *pi = BKE_previewimg_get((ID *)icon->obj); - if (pi) { + if (pi) { /* no create icon on this level in code */ if (!pi->rect[size]) return; /* something has gone wrong! */ diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 8e30b31f3fe..cf5aed16263 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -1313,7 +1313,7 @@ static void rna_search_cb(const struct bContext *C, void *arg_but, const char *s BLI_addtail(items_list, cis); } MEM_freeN(name); - } + } i++; } diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 49e96bea6c6..d1dee74c1b1 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -240,7 +240,7 @@ Panel *uiBeginPanel(ScrArea *sa, ARegion *ar, uiBlock *block, PanelType *pt, int } } } - } + } } } @@ -545,7 +545,7 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect) if (!(panel->flag & PNL_CLOSEDX)) { ui_draw_aligned_panel_header(style, block, &headrect, 'h'); - /* itemrect smaller */ + /* itemrect smaller */ itemrect.xmax = headrect.xmax - 5.0f / block->aspect; itemrect.xmin = itemrect.xmax - BLI_rcti_size_y(&headrect); itemrect.ymin = headrect.ymin; @@ -594,7 +594,7 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect) /* draw collapse icon */ UI_ThemeColor(TH_TEXT); - /* itemrect smaller */ + /* itemrect smaller */ itemrect.xmin = headrect.xmin + 5.0f / block->aspect; itemrect.xmax = itemrect.xmin + BLI_rcti_size_y(&headrect); itemrect.ymin = headrect.ymin; @@ -895,7 +895,7 @@ void uiEndPanels(const bContext *C, ARegion *ar, int *x, int *y) panew->paneltab = NULL; ED_region_tag_redraw(ar); /* the buttons panew were not made */ } - } + } } /* re-align, possibly with animation */ @@ -1200,7 +1200,7 @@ int ui_handler_panel_region(bContext *C, wmEvent *event) ED_region_tag_redraw(ar); retval = WM_UI_HANDLER_BREAK; - } + } } } #endif diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 14cb1cbe85a..b9036db74a1 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -213,7 +213,7 @@ static MenuData *decompose_menu_string(const char *str) else { menudata_add_item(md, nitem, nretval, nicon, 0); nretval = md->nitems + 1; - } + } nitem = NULL; nicon = 0; @@ -1950,7 +1950,7 @@ static void ui_update_block_buts_rgb(uiBlock *block, const float rgb[3]) else if (bt->str[0] == 'V') { ui_set_but_val(bt, hsv[2]); } - } + } ui_check_but(bt); } diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index acf7712f97b..7e7db6aeaaa 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -348,7 +348,7 @@ void uiStyleInit(void) #else font->blf_id = BLF_load_mem("default", (unsigned char *)datatoc_bfont_ttf, datatoc_bfont_ttf_size); #endif - } + } else { font->blf_id = BLF_load(font->filename); if (font->blf_id == -1) diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 5f9722d0ec0..8ba8d40c218 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -199,7 +199,7 @@ static uiBlock *id_search_menu(bContext *C, ARegion *ar, void *arg_litem) uiBoundsBlock(block, 6); - uiBlockSetDirection(block, UI_DOWN); + uiBlockSetDirection(block, UI_DOWN); uiEndBlock(C, block); /* give search-field focus */ @@ -580,7 +580,7 @@ void uiTemplateAnyID(uiLayout *layout, PointerRNA *ptr, const char *propname, co RNA_warning("pointer property not found: %s.%s", RNA_struct_identifier(ptr->type), propname); return; } - if (!propType || RNA_property_type(propType) != PROP_ENUM) { + if (!propType || RNA_property_type(propType) != PROP_ENUM) { RNA_warning("pointer-type property not found: %s.%s", RNA_struct_identifier(ptr->type), proptypename); return; } @@ -1281,7 +1281,7 @@ static void colorband_add_cb(bContext *C, void *cb_v, void *coba_v) if (colorband_element_add(coba, pos)) { rna_update_cb(C, cb_v, NULL); - ED_undo_push(C, "Add colorband"); + ED_undo_push(C, "Add colorband"); } } diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 3203237496f..f793d71458e 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -501,16 +501,16 @@ static void widget_num_tria(uiWidgetTrias *tria, rcti *rect, float triasize, cha if (where == 'r') { centx = (float)rect->xmax - 0.5f * minsize; sizex = -sizex; - } + } else if (where == 't') { centy = (float)rect->ymax - 0.5f * minsize; sizey = -sizey; i2 = 0; i1 = 1; - } + } else if (where == 'b') { sizex = -sizex; i2 = 0; i1 = 1; - } + } for (a = 0; a < 3; a++) { tria->vec[a][0] = sizex * num_tria_vert[a][i1] + centx; @@ -536,16 +536,16 @@ static void widget_scroll_circle(uiWidgetTrias *tria, rcti *rect, float triasize if (where == 'r') { centx = (float)rect->xmax - 0.5f * minsize; sizex = -sizex; - } + } else if (where == 't') { centy = (float)rect->ymax - 0.5f * minsize; sizey = -sizey; i2 = 0; i1 = 1; - } + } else if (where == 'b') { sizex = -sizex; i2 = 0; i1 = 1; - } + } for (a = 0; a < 16; a++) { tria->vec[a][0] = sizex * scroll_circle_vert[a][i1] + centx; @@ -878,7 +878,7 @@ static void widget_draw_icon(uiBut *but, BIFIconID icon, float alpha, rcti *rect aspect = but->block->aspect; if (aspect != but->aspect) { /* prevent scaling up icon in pupmenu */ - if (aspect < 1.0f) { + if (aspect < 1.0f) { height = UI_DPI_ICON_SIZE; aspect = 1.0f; @@ -1852,7 +1852,7 @@ static void widget_menu_back(uiWidgetColors *wcol, rcti *rect, int flag, int dir else if (direction == UI_DOWN) { roundboxalign = (UI_CNR_BOTTOM_RIGHT | UI_CNR_BOTTOM_LEFT); rect->ymin -= 4.0; - } + } else if (direction == UI_TOP) { roundboxalign = UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT; rect->ymax += 4.0; @@ -2364,7 +2364,7 @@ void uiWidgetScrollDraw(uiWidgetColors *wcol, rcti *rect, rcti *slider, int stat wtb.emboss = 0; /* only emboss once */ /* exception for progress bar */ - if (state & UI_SCROLL_NO_OUTLINE) + if (state & UI_SCROLL_NO_OUTLINE) SWAP(short, outline, wtb.outline); round_box_edges(&wtb, UI_CNR_ALL, slider, rad); @@ -2388,7 +2388,7 @@ void uiWidgetScrollDraw(uiWidgetColors *wcol, rcti *rect, rcti *slider, int stat if (state & UI_SCROLL_NO_OUTLINE) SWAP(short, outline, wtb.outline); - } + } } static void widget_scroll(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int UNUSED(roundboxalign)) @@ -2627,7 +2627,7 @@ static void widget_icon_has_anim(uiBut *UNUSED(but), uiWidgetColors *wcol, rcti /* rounded */ round_box_edges(&wtb, UI_CNR_ALL, rect, 10.0f); widgetbase_draw(&wtb, wcol); - } + } } @@ -3346,7 +3346,7 @@ void ui_draw_menu_back(uiStyle *UNUSED(style), uiBlock *block, rcti *rect) glColor3ubv((unsigned char *)wt->wcol.text); UI_DrawTriIcon(BLI_rcti_cent_x(rect), rect->ymin + 10, 'v'); } - } + } } uiWidgetColors *ui_tooltip_get_theme(void) diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 47bee92be62..559602b04c0 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -299,7 +299,7 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy) /* other view types are completely defined using their own settings already */ default: /* we don't do anything here, as settings should be fine, but just make sure that rect */ - break; + break; } } @@ -1089,7 +1089,7 @@ static void step_to_grid(float *step, int *power, int unit) } /* prevents printing 1.0 2.0 3.0 etc */ - if (rem == 1.0f) (*power)++; + if (rem == 1.0f) (*power)++; } else { if (rem < 2.0f) rem = 2.0f; @@ -1100,7 +1100,7 @@ static void step_to_grid(float *step, int *power, int unit) (*power)++; /* prevents printing 1.0, 2.0, 3.0, etc. */ - if (rem == 10.0f) (*power)++; + if (rem == 10.0f) (*power)++; } } @@ -1256,7 +1256,7 @@ void UI_view2d_grid_draw(View2D *v2d, View2DGrid *grid, int flag) vec2[1] = vec1[1] -= 0.5f * grid->dy; step++; - if (flag & V2D_HORIZONTAL_FINELINES) { + if (flag & V2D_HORIZONTAL_FINELINES) { UI_ThemeColorShade(TH_GRID, 16); for (a = 0; a < step; a++) { glBegin(GL_LINE_STRIP); @@ -1487,7 +1487,7 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, /* check whether sliders can disappear due to the full-range being used */ if (v2d->keeptot) { - if ((fac1 <= 0.0f) && (fac2 >= 1.0f)) { + if ((fac1 <= 0.0f) && (fac2 >= 1.0f)) { v2d->scroll |= V2D_SCROLL_HORIZONTAL_FULLR; scrollers->horfull = 1; } @@ -1529,7 +1529,7 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, /* check whether sliders can disappear due to the full-range being used */ if (v2d->keeptot) { - if ((fac1 <= 0.0f) && (fac2 >= 1.0f)) { + if ((fac1 <= 0.0f) && (fac2 >= 1.0f)) { v2d->scroll |= V2D_SCROLL_VERTICAL_FULLR; scrollers->vertfull = 1; } @@ -1682,7 +1682,7 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v if (fac < hor.xmin + 10) continue; - switch (vs->xunits) { + switch (vs->xunits) { case V2D_UNIT_FRAMES: /* frames (as whole numbers)*/ scroll_printstr(scene, fac, h, val, grid->powerx, V2D_UNIT_FRAMES, 'h'); break; @@ -1797,7 +1797,7 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v BLF_disable_default(BLF_ROTATION); } - } + } } } @@ -2066,7 +2066,7 @@ short UI_view2d_mouse_in_scrollers(const bContext *C, View2D *v2d, int x, int y) } if (scroll & V2D_SCROLL_VERTICAL) { if (IN_2D_VERT_SCROLL(v2d, co)) return 'v'; - } + } /* not found */ return 0; diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 12e04d392b4..87da31ceaee 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -642,7 +642,7 @@ static void view_zoomstep_apply(bContext *C, wmOperator *op) v2d->cur.ymin += ofs + dy; v2d->cur.ymax += ofs - dy; - } + } else { v2d->cur.ymin += dy; v2d->cur.ymax -= dy; @@ -956,7 +956,7 @@ static int view_zoomdrag_invoke(bContext *C, wmOperator *op, wmEvent *event) view_zoomdrag_apply(C, op); view_zoomdrag_exit(C, op); return OPERATOR_FINISHED; - } + } /* set initial settings */ vzd->lastx = event->x; @@ -1065,7 +1065,7 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, wmEvent *event) /* apply zooming */ view_zoomdrag_apply(C, op); - } + } else if (event->type == vzd->invoke_event || event->type == ESCKEY) { if (event->val == KM_RELEASE) { @@ -1469,7 +1469,7 @@ static short mouse_in_scroller_handle(int mouse, int sc_min, int sc_max, int sh_ else if (in_min) return SCROLLHANDLE_MIN; else if (out_min) - return SCROLLHANDLE_MIN_OUTSIDE; + return SCROLLHANDLE_MIN_OUTSIDE; else if (out_max) return SCROLLHANDLE_MAX_OUTSIDE; @@ -1751,7 +1751,7 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event) /* can't catch this event for ourselves, so let it go to someone else? */ return OPERATOR_PASS_THROUGH; - } + } } /* zone is also inappropriate if scroller is not visible... */ diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index 99ed86d7a06..70b359d3e28 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -476,7 +476,7 @@ static int add_primitive_uvsphere_exec(bContext *C, wmOperator *op) make_prim_finish(C, obedit, &state, enter_editmode); - return OPERATOR_FINISHED; + return OPERATOR_FINISHED; } void MESH_OT_primitive_uv_sphere_add(wmOperatorType *ot) diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c index 98fae2cc701..fa1b04df05f 100644 --- a/source/blender/editors/mesh/editmesh_loopcut.c +++ b/source/blender/editors/mesh/editmesh_loopcut.c @@ -527,7 +527,7 @@ static int loopcut_modal(bContext *C, wmOperator *op, wmEvent *event) ED_region_tag_redraw(lcd->ar); break; - } + } } /* using the keyboard to input the number of cuts */ diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 40132c697e6..65cd9c7d709 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -1437,7 +1437,7 @@ static int mouse_mesh_shortest_path(bContext *C, int mval[2]) case EDGE_MODE_TAG_SHARP: me->drawflag |= ME_DRAWSHARP; break; - case EDGE_MODE_TAG_CREASE: + case EDGE_MODE_TAG_CREASE: me->drawflag |= ME_DRAWCREASES; break; case EDGE_MODE_TAG_BEVEL: @@ -1707,7 +1707,7 @@ void EDBM_selectmode_convert(BMEditMesh *em, const short selectmode_old, const s BM_edge_select_set(em->bm, eed, TRUE); } } - } + } else if (selectmode_new == SCE_SELECT_FACE) { BMIter liter; BMLoop *l; diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 1df37859501..484faf0d1e5 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -2766,7 +2766,7 @@ static float bm_edge_seg_isect(const float sco_a[2], const float sco_b[2], break; } - } + } lastdist = dist; } return perc; diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index d8793505608..c2580b4da55 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -264,7 +264,7 @@ int join_mesh_exec(bContext *C, wmOperator *op) /* adjust settings to fit (allocate a new data-array) */ kbn->data = MEM_callocN(sizeof(float) * 3 * totvert, "joined_shapekey"); - kbn->totelem = totvert; + kbn->totelem = totvert; /* XXX 2.5 Animato */ #if 0 @@ -843,7 +843,7 @@ intptr_t mesh_octree_table(Object *ob, BMEditMesh *em, const float co[3], char m minmax_v3v3_v3(min, max, eve->co); } } - else { + else { MVert *mvert; int a; @@ -878,7 +878,7 @@ intptr_t mesh_octree_table(Object *ob, BMEditMesh *em, const float co[3], char m mesh_octree_add_nodes(MeshOctree.table, eve->co, MeshOctree.offs, MeshOctree.div, (intptr_t)(eve)); } } - else { + else { MVert *mvert; int a; diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 9a2915a5d55..029b27c0400 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1124,13 +1124,13 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base, basen->object = ob; /* make sure apply works */ - BKE_free_animdata(&ob->id); + BKE_free_animdata(&ob->id); ob->adt = NULL; ob->parent = NULL; ob->constraints.first = ob->constraints.last = NULL; ob->disp.first = ob->disp.last = NULL; - ob->transflag &= ~OB_DUPLI; + ob->transflag &= ~OB_DUPLI; ob->lay = base->lay; copy_m4_m4(ob->obmat, dob->mat); @@ -1576,7 +1576,7 @@ static int convert_exec(bContext *C, wmOperator *op) /* delete original if needed */ if (basedel) { if (!keep_original) - ED_base_object_free_and_unlink(bmain, scene, basedel); + ED_base_object_free_and_unlink(bmain, scene, basedel); basedel = NULL; } diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 80993d6cca7..1b486f589ae 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -494,9 +494,9 @@ static void test_constraints(Object *owner, bPoseChannel *pchan) /* auto-set 'Path' setting on curve so this works */ cu->flag |= CU_PATH; } - } + } } - } + } /* free any temporary targets */ if (cti->flush_constraint_targets) @@ -593,7 +593,7 @@ static bConstraint *edit_constraint_property_get(wmOperator *op, Object *ob, int if (owner == EDIT_CONSTRAINT_OWNER_OBJECT) { list = &ob->constraints; - } + } else if (owner == EDIT_CONSTRAINT_OWNER_BONE) { bPoseChannel *pchan = BKE_pose_channel_active(ob); if (pchan) diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 43c6c332791..c0c2195592b 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -201,7 +201,7 @@ static int object_hide_view_set_exec(bContext *C, wmOperator *op) ED_base_object_activate(C, NULL); } } - } + } } CTX_DATA_END; @@ -684,7 +684,7 @@ static void copymenu_logicbricks(Scene *scene, View3D *v3d, Object *ob) if (TESTBASELIB(v3d, base)) { /* first: free all logic */ - free_sensors(&base->object->sensors); + free_sensors(&base->object->sensors); unlink_controllers(&base->object->controllers); free_controllers(&base->object->controllers); unlink_actuators(&base->object->actuators); @@ -885,7 +885,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event) id_us_plus((ID *)cu1->vfonti); if (cu1->vfontbi) cu1->vfontbi->id.us--; cu1->vfontbi = cu->vfontbi; - id_us_plus((ID *)cu1->vfontbi); + id_us_plus((ID *)cu1->vfontbi); BKE_vfont_to_curve(bmain, scene, base->object, 0); /* needed? */ @@ -988,7 +988,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event) cu1->flag |= CU_UV_ORCO; else cu1->flag &= ~CU_UV_ORCO; - } + } } else if (event == 29) { /* protected bits */ base->object->protectflag = ob->protectflag; @@ -1401,7 +1401,7 @@ static void UNUSED_FUNCTION(image_aspect) (Scene * scene, View3D * v3d) else ob->size[1] = ob->size[0] * y / x; done = TRUE; - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DAG_id_tag_update(&ob->id, OB_RECALC_OB); } } if (done) break; @@ -1795,7 +1795,7 @@ static int logicbricks_copy_exec(bContext *C, wmOperator *UNUSED(op)) { if (ob != ob_iter) { /* first: free all logic */ - free_sensors(&ob_iter->sensors); + free_sensors(&ob_iter->sensors); unlink_controllers(&ob_iter->controllers); free_controllers(&ob_iter->controllers); unlink_actuators(&ob_iter->actuators); @@ -1864,7 +1864,7 @@ static int game_physics_copy_exec(bContext *C, wmOperator *UNUSED(op)) ob_iter->anisotropicFriction[0] = ob->anisotropicFriction[0]; ob_iter->anisotropicFriction[1] = ob->anisotropicFriction[1]; ob_iter->anisotropicFriction[2] = ob->anisotropicFriction[2]; - ob_iter->collision_boundtype = ob->collision_boundtype; + ob_iter->collision_boundtype = ob->collision_boundtype; ob_iter->margin = ob->margin; ob_iter->bsoft = copy_bulletsoftbody(ob->bsoft); if (ob->restrictflag & OB_RESTRICT_RENDER) diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c index cca37cf3a44..e8d388bb812 100644 --- a/source/blender/editors/object/object_group.c +++ b/source/blender/editors/object/object_group.c @@ -211,7 +211,7 @@ void GROUP_OT_objects_remove_active(wmOperatorType *ot) ot->idname = "GROUP_OT_objects_remove_active"; /* api callbacks */ - ot->exec = objects_remove_active_exec; + ot->exec = objects_remove_active_exec; ot->poll = ED_operator_objectmode; /* flags */ @@ -333,7 +333,7 @@ void GROUP_OT_create(wmOperatorType *ot) ot->idname = "GROUP_OT_create"; /* api callbacks */ - ot->exec = group_create_exec; + ot->exec = group_create_exec; ot->poll = ED_operator_objectmode; /* flags */ diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c index 8bc249974f2..1332d9b19a3 100644 --- a/source/blender/editors/object/object_hook.c +++ b/source/blender/editors/object/object_hook.c @@ -667,7 +667,7 @@ static int object_hook_reset_exec(bContext *C, wmOperator *op) if (ptr.data) { /* if modifier context is available, use that */ ob = ptr.id.data; hmd = ptr.data; - } + } else { /* use the provided property */ ob = CTX_data_edit_object(C); hmd = (HookModifierData *)BLI_findlink(&ob->modifiers, num); @@ -735,7 +735,7 @@ static int object_hook_recenter_exec(bContext *C, wmOperator *op) if (ptr.data) { /* if modifier context is available, use that */ ob = ptr.id.data; hmd = ptr.data; - } + } else { /* use the provided property */ ob = CTX_data_edit_object(C); hmd = (HookModifierData *)BLI_findlink(&ob->modifiers, num); @@ -793,7 +793,7 @@ static int object_hook_assign_exec(bContext *C, wmOperator *op) if (ptr.data) { /* if modifier context is available, use that */ ob = ptr.id.data; hmd = ptr.data; - } + } else { /* use the provided property */ ob = CTX_data_edit_object(C); hmd = (HookModifierData *)BLI_findlink(&ob->modifiers, num); @@ -855,7 +855,7 @@ static int object_hook_select_exec(bContext *C, wmOperator *op) if (ptr.data) { /* if modifier context is available, use that */ ob = ptr.id.data; hmd = ptr.data; - } + } else { /* use the provided property */ ob = CTX_data_edit_object(C); hmd = (HookModifierData *)BLI_findlink(&ob->modifiers, num); diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 447ba29e203..a52f526448f 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -622,7 +622,7 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object /* fall back on regular parenting now (for follow only) */ if (partype == PAR_FOLLOW) partype = PAR_OBJECT; - } + } } else if (partype == PAR_BONE) { pchan = BKE_pose_channel_active(par); diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 9bf1bbfa102..457a77528ce 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -171,7 +171,7 @@ static void object_clear_rot(Object *ob) } } } // Duplicated in source/blender/editors/armature/editarmature.c - else { + else { if (ob->rotmode == ROT_MODE_QUAT) { unit_qt(ob->quat); unit_qt(ob->dquat); diff --git a/source/blender/editors/physics/particle_boids.c b/source/blender/editors/physics/particle_boids.c index aff66b272fe..dc309ec3c31 100644 --- a/source/blender/editors/physics/particle_boids.c +++ b/source/blender/editors/physics/particle_boids.c @@ -273,7 +273,7 @@ static int state_del_exec(bContext *C, wmOperator *UNUSED(op)) /* there must be at least one state */ if (!part->boids->states.first) { state = boid_new_state(part->boids); - BLI_addtail(&part->boids->states, state); + BLI_addtail(&part->boids->states, state); } else state = part->boids->states.first; diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 7343a44470a..e8846b3236c 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -673,7 +673,7 @@ static void foreach_point(PEData *data, ForPointFunc func) PTCacheEdit *edit = data->edit; POINT_P; - LOOP_POINTS { + LOOP_POINTS { func(data, p); } } @@ -4109,7 +4109,7 @@ int PE_minmax(Scene *scene, float min[3], float max[3]) LOOP_SELECTED_KEYS { copy_v3_v3(co, key->co); mul_m4_v3(mat, co); - DO_MINMAX(co, min, max); + DO_MINMAX(co, min, max); ok= 1; } } diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 315386a947e..9306ec79966 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -212,9 +212,9 @@ static void fluidsimPrintChannel(FILE *file, float *channel, int paramsize, char for (j=0;j <= entries;j++) { // also print time value fprintf(file, " %f ", channel[i*(entries + 1) + j]); if (j==entries-1) { fprintf(file, " "); } - } + } fprintf(file, "\n"); - } + } fprintf(file, " ;\n"); } @@ -527,7 +527,7 @@ static void export_fluid_objects(ListBase *fobjects, Scene *scene, int length) if ( ELEM(fsmesh.type, OB_FLUIDSIM_FLUID, OB_FLUIDSIM_INFLOW)) { fsmesh.channelInitialVel = fobj->InitialVelocity; fsmesh.localInivelCoords = ((fluidmd->fss->typeFlags & OB_FSINFLOW_LOCALCOORD)?1:0); - } + } if (fluidmd->fss->typeFlags & OB_FSBND_NOSLIP) fsmesh.obstacleType = FLUIDSIM_OBSTACLE_NOSLIP; @@ -593,7 +593,7 @@ static int fluid_validate_scene(ReportList *reports, Scene *scene, Object *fsDom for (base=scene->base.first; base; base= base->next) { Object *ob = base->object; - FluidsimModifierData *fluidmdtmp = (FluidsimModifierData *)modifiers_findByType(ob, eModifierType_Fluidsim); + FluidsimModifierData *fluidmdtmp = (FluidsimModifierData *)modifiers_findByType(ob, eModifierType_Fluidsim); /* only find objects with fluid modifiers */ if (!fluidmdtmp || ob->type != OB_MESH) continue; @@ -648,7 +648,7 @@ static int fluid_validate_scene(ReportList *reports, Scene *scene, Object *fsDom static int fluid_init_filepaths(Object *fsDomain, char *targetDir, char *targetFile, char *debugStrBuffer) { FluidsimModifierData *fluidmd = (FluidsimModifierData *)modifiers_findByType(fsDomain, eModifierType_Fluidsim); - FluidsimSettings *domainSettings= fluidmd->fss; + FluidsimSettings *domainSettings= fluidmd->fss; FILE *fileCfg; int dirExist = 0; char newSurfdataPath[FILE_MAX]; /* modified output settings */ @@ -673,7 +673,7 @@ static int fluid_init_filepaths(Object *fsDomain, char *targetDir, char *targetF // check selected directory // simply try to open cfg file for writing to test validity of settings fileCfg = BLI_fopen(targetFile, "w"); - if (fileCfg) { + if (fileCfg) { dirExist = 1; fclose(fileCfg); // remove cfg dummy from directory test BLI_delete(targetFile, 0, 0); @@ -1050,7 +1050,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor fsset->generateVertexVectors = (domainSettings->domainNovecgen==0); // init blender domain transform matrix - { int j; + { int j; for (i=0; i<4; i++) { for (j=0; j<4; j++) { fsset->surfaceTrafo[i*4+j] = invDomMat[j][i]; diff --git a/source/blender/editors/physics/physics_ops.c b/source/blender/editors/physics/physics_ops.c index 89ddfe02208..fb99d296a54 100644 --- a/source/blender/editors/physics/physics_ops.c +++ b/source/blender/editors/physics/physics_ops.c @@ -61,7 +61,7 @@ static void operatortypes_particle(void) WM_operatortype_append(PARTICLE_OT_rekey); WM_operatortype_append(PARTICLE_OT_subdivide); WM_operatortype_append(PARTICLE_OT_remove_doubles); - WM_operatortype_append(PARTICLE_OT_weight_set); + WM_operatortype_append(PARTICLE_OT_weight_set); WM_operatortype_append(PARTICLE_OT_delete); WM_operatortype_append(PARTICLE_OT_mirror); diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index b61280f14ce..38084773e78 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -495,7 +495,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event) if (!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.im_format.imtype)) { BKE_report(op->reports, RPT_ERROR, "Can't write a single file with an animation format selected"); return OPERATOR_CANCELLED; - } + } /* stop all running jobs, currently previews frustrate Render */ WM_jobs_stop_all(CTX_wm_manager(C)); diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 97c8e14bf5d..ad93859b84d 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -189,7 +189,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender) else perspective_m4(winmat, viewplane.xmin, viewplane.xmax, viewplane.ymin, viewplane.ymax, clipsta, clipend); } - if ((scene->r.mode & R_OSA) == 0) { + if ((scene->r.mode & R_OSA) == 0) { ED_view3d_draw_offscreen(scene, v3d, ar, sizex, sizey, NULL, winmat, TRUE, FALSE); GPU_offscreen_read_pixels(oglrender->ofs, GL_FLOAT, rr->rectf); } diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 694d2302fbd..5cfe7179f5a 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -341,7 +341,7 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre if (sp->pr_method == PR_ICON_RENDER) { if (mat->material_type == MA_TYPE_HALO) { sce->lay = 1 << MA_FLAT; - } + } else { sce->lay = 1 << MA_SPHERE_A; } @@ -386,7 +386,7 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre tex = localize_texture(origtex); sp->texcopy = tex; BLI_addtail(&pr_main->tex, tex); - } + } sce->lay = 1 << MA_TEXTURE; for (base = sce->base.first; base; base = base->next) { @@ -597,7 +597,7 @@ void ED_preview_draw(const bContext *C, void *idp, void *parentp, void *slotp, r if (ok == 0) { ED_preview_shader_job(C, sa, id, parent, slot, newx, newy, PR_BUTS_RENDER); } - } + } } /* **************************** new shader preview system ****************** */ @@ -649,7 +649,7 @@ static void shader_preview_updatejob(void *spv) if (sp->lampcopy && la->nodetree && sp->lampcopy->nodetree) ntreeLocalSync(sp->lampcopy->nodetree, la->nodetree); } - } + } } } @@ -861,7 +861,7 @@ static void icon_copy_rect(ImBuf *ibuf, unsigned int w, unsigned int h, unsigned scaledx = (float)w; scaledy = ( (float)ima->y / (float)ima->x) * (float)w; } - else { + else { scaledx = ( (float)ima->x / (float)ima->y) * (float)h; scaledy = (float)h; } diff --git a/source/blender/editors/render/render_view.c b/source/blender/editors/render/render_view.c index 01c0169eb50..0d33c44db8f 100644 --- a/source/blender/editors/render/render_view.c +++ b/source/blender/editors/render/render_view.c @@ -282,7 +282,7 @@ static int render_view_show_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent if (wincur->screen->temp) { wm_window_lower(wincur); } - else { + else { wmWindow *win, *winshow; ScrArea *sa = find_area_showing_r_result(C, &winshow); diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index ad9b0f61eb1..1cdeeb174f6 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -390,7 +390,7 @@ void ED_area_overdraw(bContext *C) az->do_draw = FALSE; } } - } + } glDisable(GL_BLEND); } @@ -1260,7 +1260,7 @@ void ED_area_initialize(wmWindowManager *wm, wmWindow *win, ScrArea *sa) } else { /* prevent uiblocks to run */ - uiFreeBlocks(NULL, &ar->uiblocks); + uiFreeBlocks(NULL, &ar->uiblocks); } /* rechecks 2d matrix for header on dpi changing, do not do for other regions, it resets view && blocks view2d operator polls (ton) */ @@ -1414,7 +1414,7 @@ void ED_area_newspace(bContext *C, ScrArea *sa, int type) /* put in front of list */ BLI_remlink(&sa->spacedata, sl); BLI_addhead(&sa->spacedata, sl); - } + } else { /* new space */ if (st) { @@ -1741,7 +1741,7 @@ void ED_region_header(const bContext *C, ARegion *ar) int maxco, xco, yco; int headery = ED_area_headersize(); - /* clear */ + /* clear */ UI_ThemeClearColor((ED_screen_area_active(C)) ? TH_HEADER : TH_HEADERDESEL); glClear(GL_COLOR_BUFFER_BIT); diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index 352039c5a61..a516603cfd4 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -194,7 +194,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult CTX_data_list_add(result, &arm->id, &RNA_EditBone, flipbone); } } - } + } CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION); return 1; } @@ -236,7 +236,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult CTX_data_list_add(result, &arm->id, &RNA_EditBone, flipbone); } } - } + } CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION); return 1; } diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 2e1723027b8..7a349e4a581 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -271,7 +271,7 @@ ScrEdge *screen_find_active_scredge(bScreen *sc, int mx, int my) if (abs(my - se->v1->vec.y) <= 2 && mx >= min && mx <= max) return se; - } + } else { short min, max; min = MIN2(se->v1->vec.y, se->v2->vec.y); @@ -875,7 +875,7 @@ static void scrarea_draw_shape_light(ScrArea *sa, char UNUSED(dir)) glBlendFunc(GL_DST_COLOR, GL_SRC_ALPHA); glEnable(GL_BLEND); /* value 181 was hardly computed: 181~105 */ - glColor4ub(255, 255, 255, 50); + glColor4ub(255, 255, 255, 50); /* draw_join_shape(sa, dir); */ glRecti(sa->v1->vec.x, sa->v1->vec.y, sa->v3->vec.x, sa->v3->vec.y); glDisable(GL_BLEND); @@ -1066,7 +1066,7 @@ static void screen_refresh_headersizes(void) for (st = lb->first; st; st = st->next) { ARegionType *art = BKE_regiontype_from_id(st, RGN_TYPE_HEADER); if (art) art->prefsizey = ED_area_headersize(); - } + } } /* make this screen usable */ @@ -1320,7 +1320,7 @@ int ED_screen_area_active(const bContext *C) for (ar = sa->regionbase.first; ar; ar = ar->next) if (ar->swinid == sc->subwinactive) return 1; - } + } return 0; } @@ -1733,7 +1733,7 @@ void ED_refresh_viewport_fps(bContext *C) fpsi->redrawtime = fpsi->lredrawtime; fpsi->lredrawtime = animtimer->ltime; } - else { + else { /* playback stopped or shouldn't be running */ if (scene->fps_info) MEM_freeN(scene->fps_info); diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 7dbae6ece8d..cdf68d97e4d 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -192,7 +192,7 @@ int ED_operator_region_view3d_active(bContext *C) return TRUE; CTX_wm_operator_poll_msg_set(C, "expected a view3d region"); - return FALSE; + return FALSE; } /* generic for any view2d which uses anim_ops */ @@ -580,7 +580,7 @@ static int actionzone_area_poll(bContext *C) for (az = sa->actionzones.first; az; az = az->next) if (BLI_rcti_isect_pt(&az->rect, x, y)) return 1; - } + } return 0; } @@ -701,7 +701,7 @@ static int actionzone_modal(bContext *C, wmOperator *op, wmEvent *event) case ESCKEY: actionzone_exit(op); return OPERATOR_CANCELLED; - case LEFTMOUSE: + case LEFTMOUSE: actionzone_exit(op); return OPERATOR_CANCELLED; @@ -1341,7 +1341,7 @@ static int area_split_apply(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL); return 1; - } + } return 0; } @@ -1691,7 +1691,7 @@ static int region_scale_invoke(bContext *C, wmOperator *op, wmEvent *event) AZone *az; if (event->type != EVT_ACTIONZONE_REGION) { - BKE_report(op->reports, RPT_ERROR, "Can only scale region size from an action zone"); + BKE_report(op->reports, RPT_ERROR, "Can only scale region size from an action zone"); return OPERATOR_CANCELLED; } @@ -2359,14 +2359,14 @@ static int area_join_modal(bContext *C, wmOperator *op, wmEvent *event) ScrArea *sa = screen_areahascursor(sc, event->x, event->y); int dir; - if (sa) { + if (sa) { if (jd->sa1 != sa) { dir = area_getorientation(jd->sa1, sa); if (dir >= 0) { if (jd->sa2) jd->sa2->flag &= ~AREA_FLAG_DRAWJOINTO; jd->sa2 = sa; jd->sa2->flag |= AREA_FLAG_DRAWJOINTO; - } + } else { /* we are not bordering on the previously selected area * we check if area has common border with the one marked for removal @@ -2380,14 +2380,14 @@ static int area_join_modal(bContext *C, wmOperator *op, wmEvent *event) jd->sa2 = sa; if (jd->sa1) jd->sa1->flag |= AREA_FLAG_DRAWJOINFROM; if (jd->sa2) jd->sa2->flag |= AREA_FLAG_DRAWJOINTO; - } + } else { if (jd->sa2) jd->sa2->flag &= ~AREA_FLAG_DRAWJOINTO; jd->sa2 = NULL; } } WM_event_add_notifier(C, NC_WINDOW, NULL); - } + } else { /* we are back in the area previously selected for keeping * we swap the areas if possible to allow user to choose */ @@ -2402,7 +2402,7 @@ static int area_join_modal(bContext *C, wmOperator *op, wmEvent *event) if (dir < 0) { printf("oops, didn't expect that!\n"); } - } + } else { dir = area_getorientation(jd->sa1, sa); if (dir >= 0) { @@ -2837,7 +2837,7 @@ static int header_flip_exec(bContext *C, wmOperator *UNUSED(op)) /* don't do anything if no region */ if (ar == NULL) return OPERATOR_CANCELLED; - } + } /* copied from SCREEN_OT_region_flip */ if (ar->alignment == RGN_ALIGN_TOP) @@ -3574,7 +3574,7 @@ void ED_operatortypes_screen(void) /* tools shared by more space types */ WM_operatortype_append(ED_OT_undo); WM_operatortype_append(ED_OT_undo_push); - WM_operatortype_append(ED_OT_redo); + WM_operatortype_append(ED_OT_redo); WM_operatortype_append(ED_OT_undo_history); } diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c index aeae79aa9d0..7af0fc27ed7 100644 --- a/source/blender/editors/screen/screendump.c +++ b/source/blender/editors/screen/screendump.c @@ -214,7 +214,7 @@ static int screenshot_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event) WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; - } + } return OPERATOR_CANCELLED; } @@ -374,7 +374,7 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float } /* imbuf knows which rects are not part of ibuf */ - IMB_freeImBuf(ibuf); + IMB_freeImBuf(ibuf); } MEM_freeN(sj->dumprect); @@ -408,7 +408,7 @@ static int screencast_exec(bContext *C, wmOperator *op) sj->y = 0; sj->dumpsx = win->sizex; sj->dumpsy = win->sizey; - } + } else { ScrArea *curarea = CTX_wm_area(C); sj->x = curarea->totrct.xmin; diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 34ff5efacc9..a318837b585 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -942,7 +942,7 @@ static int line_isect_y(const float p1[2], const float p2[2], const float y_leve if (y_diff < 0.000001f) { *x_isect = (p1[0] + p2[0]) * 0.5f; - return ISECT_TRUE; + return ISECT_TRUE; } if (p1[1] > y_level && p2[1] < y_level) { @@ -975,7 +975,7 @@ static int line_isect_x(const float p1[2], const float p2[2], const float x_leve if (x_diff < 0.000001f) { /* yuck, vertical line, we cant do much here */ *y_isect = (p1[0] + p2[0]) * 0.5f; - return ISECT_TRUE; + return ISECT_TRUE; } if (p1[0] > x_level && p2[0] < x_level) { @@ -1003,7 +1003,7 @@ static int cmp_uv(const float vec2a[2], const float vec2b[2]) float ya = (float)fmodf(vec2a[1], 1.0f); float xb = (float)fmodf(vec2b[0], 1.0f); - float yb = (float)fmodf(vec2b[1], 1.0f); + float yb = (float)fmodf(vec2b[1], 1.0f); if (xa < 0.0f) xa += 1.0f; if (ya < 0.0f) ya += 1.0f; @@ -1860,7 +1860,7 @@ static int project_bucket_isect_circle(const float cent[2], const float radius_s /* lower left out of radius test */ if (cent[1] < bucket_bounds->ymin) { return (len_squared_v2v2_alt(cent, bucket_bounds->xmin, bucket_bounds->ymin) < radius_squared) ? 1 : 0; - } + } /* top left test */ else if (cent[1] > bucket_bounds->ymax) { return (len_squared_v2v2_alt(cent, bucket_bounds->xmin, bucket_bounds->ymax) < radius_squared) ? 1 : 0; @@ -1870,7 +1870,7 @@ static int project_bucket_isect_circle(const float cent[2], const float radius_s /* lower right out of radius test */ if (cent[1] < bucket_bounds->ymin) { return (len_squared_v2v2_alt(cent, bucket_bounds->xmax, bucket_bounds->ymin) < radius_squared) ? 1 : 0; - } + } /* top right test */ else if (cent[1] > bucket_bounds->ymax) { return (len_squared_v2v2_alt(cent, bucket_bounds->xmax, bucket_bounds->ymax) < radius_squared) ? 1 : 0; @@ -2111,7 +2111,7 @@ static void project_bucket_clip_face( if ((inside_bucket_flag & ISECT_2) == 0) { copy_v2_v2(isectVCosSS[*tot], v1_clipSS); (*tot)++; } if ((inside_bucket_flag & ISECT_3) == 0) { copy_v2_v2(isectVCosSS[*tot], v2_clipSS); (*tot)++; } } - } + } if ((inside_bucket_flag & (ISECT_3 | ISECT_1)) != (ISECT_3 | ISECT_1)) { if (line_clip_rect2f(bucket_bounds, v3coSS, v1coSS, v1_clipSS, v2_clipSS)) { @@ -2394,7 +2394,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i tf_uv_pxoffset[1][1] = tf->uv[1][1] - yhalfpx; tf_uv_pxoffset[2][0] = tf->uv[2][0] - xhalfpx; - tf_uv_pxoffset[2][1] = tf->uv[2][1] - yhalfpx; + tf_uv_pxoffset[2][1] = tf->uv[2][1] - yhalfpx; if (mf->v4) { vCo[3] = ps->dm_mvert[mf->v4].co; @@ -3432,7 +3432,7 @@ static void project_paint_begin_clone(ProjPaintState *ps, int mouse[2]) mul_m4_v4(ps->projectMat, projCo); ps->cloneOffset[0] = mouse[0] - ((float)(ps->winx / 2.0f) + (ps->winx / 2.0f) * projCo[0] / projCo[3]); ps->cloneOffset[1] = mouse[1] - ((float)(ps->winy / 2.0f) + (ps->winy / 2.0f) * projCo[1] / projCo[3]); - } + } } static void project_paint_end(ProjPaintState *ps) @@ -4100,7 +4100,7 @@ static int project_paint_op(void *state, ImBuf *UNUSED(ibufb), const float lastp { /* First unpack args from the struct */ ProjPaintState *ps = (ProjPaintState *)state; - int touch_any = 0; + int touch_any = 0; ProjectHandle handles[BLENDER_MAX_THREADS]; ListBase threads; @@ -4133,7 +4133,7 @@ static int project_paint_op(void *state, ImBuf *UNUSED(ibufb), const float lastp /* image bounds */ for (i = 0; i < ps->image_tot; i++) { handles[a].projImages[i].partRedrawRect = (ImagePaintPartialRedraw *)BLI_memarena_alloc(ps->arena_mt[a], sizeof(ImagePaintPartialRedraw) * PROJ_BOUNDBOX_SQUARED); - memcpy(handles[a].projImages[i].partRedrawRect, ps->projImages[i].partRedrawRect, sizeof(ImagePaintPartialRedraw) * PROJ_BOUNDBOX_SQUARED); + memcpy(handles[a].projImages[i].partRedrawRect, ps->projImages[i].partRedrawRect, sizeof(ImagePaintPartialRedraw) * PROJ_BOUNDBOX_SQUARED); } if (ps->thread_tot > 1) @@ -4554,7 +4554,7 @@ static int imapaint_canvas_set(ImagePaintState *s, Image *ima) else if (ima->packedfile && ima->rr) { s->warnpackedfile = ima->id.name + 2; return 0; - } + } else if (ibuf && ibuf->channels != 4) { s->warnmultifile = ima->id.name + 2; return 0; @@ -5048,7 +5048,7 @@ static void paint_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) pop->prevmouse[1] = mouse[1]; } - else { + else { redraw = imapaint_paint_stroke(&pop->vc, &pop->s, pop->painter, pop->mode == PAINT_MODE_3D, pop->prevmouse, mouse, time, pressure); pop->prevmouse[0] = mouse[0]; pop->prevmouse[1] = mouse[1]; @@ -5066,7 +5066,7 @@ static void paint_brush_exit_tex(Brush *brush) MTex *mtex = &brush->mtex; if (mtex->tex && mtex->tex->nodetree) ntreeTexEndExecTree(mtex->tex->nodetree->execdata, 1); - } + } } static void paint_exit(bContext *C, wmOperator *op) diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index bb931dd1ff2..b8ac88f4d65 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -326,7 +326,7 @@ static void make_vertexcol(Object *ob) /* single ob */ CustomData_add_layer(&me->fdata, CD_MCOL, CD_DEFAULT, NULL, me->totface); } if (!me->mloopcol) { - CustomData_add_layer(&me->ldata, CD_MLOOPCOL, CD_DEFAULT, NULL, me->totloop); + CustomData_add_layer(&me->ldata, CD_MLOOPCOL, CD_DEFAULT, NULL, me->totloop); } mesh_update_customdata_pointers(me, TRUE); } @@ -1526,7 +1526,7 @@ static void enforce_locks(MDeformVert *odv, MDeformVert *ndv, if (total_changed > 1 && do_multipaint) { float undo_change = get_mp_change(ndv, defbase_tot, defbase_sel, left_over); multipaint_selection(ndv, defbase_tot, undo_change, defbase_sel); - } + } /* or designatedw is still -1 put weight back as evenly as possible */ else { redistribute_change(ndv, defbase_tot, change_status, 2, -2, left_over, total_changed, do_auto_normalize); diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 092ec32e724..07bd6a66bdf 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -3513,7 +3513,7 @@ static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush) if (tool == SCULPT_TOOL_GRAB) copy_v3_v3(sd->anchored_location, cache->true_location); else if (tool == SCULPT_TOOL_THUMB) - copy_v3_v3(sd->anchored_location, cache->orig_grab_location); + copy_v3_v3(sd->anchored_location, cache->orig_grab_location); if (ELEM(tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_THUMB)) { /* location stays the same for finding vertices in brush radius */ diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index b204fc75255..1b3fd24ae22 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -99,7 +99,7 @@ static int sculpt_undo_restore_coords(bContext *C, DerivedMesh *dm, SculptUndoNo Object *ob = CTX_data_active_object(C); SculptSession *ss = ob->sculpt; MVert *mvert; - int *index, i, j; + int *index, i, j; if (unode->maxvert) { /* regular mesh restore */ @@ -224,7 +224,7 @@ static int sculpt_undo_restore_mask(bContext *C, DerivedMesh *dm, SculptUndoNode SculptSession *ss = ob->sculpt; MVert *mvert; float *vmask; - int *index, i, j; + int *index, i, j; if (unode->maxvert) { /* regular mesh restore */ diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c index 10adeb3e721..91bc52f7053 100644 --- a/source/blender/editors/space_action/action_draw.c +++ b/source/blender/editors/space_action/action_draw.c @@ -98,7 +98,7 @@ void draw_channel_names(bContext *C, bAnimContext *ac, ARegion *ar) /* need to do a view-sync here, so that the keys area doesn't jump around (it must copy this) */ UI_view2d_sync(NULL, ac->sa, v2d, V2D_LOCK_COPY); - /* loop through channels, and set up drawing depending on their type */ + /* loop through channels, and set up drawing depending on their type */ { /* first pass: just the standard GL-drawing for backdrop + text */ y = (float)ACHANNEL_FIRST; @@ -307,7 +307,7 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar) /* Increment the step */ y -= ACHANNEL_STEP; - } + } glDisable(GL_BLEND); /* Draw keyframes diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 4342dd52b1c..1f0711cc4ad 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -502,7 +502,7 @@ static int actkeys_copy_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } else { - if (copy_action_keys(&ac)) { + if (copy_action_keys(&ac)) { BKE_report(op->reports, RPT_ERROR, "No keyframes copied to keyframes copy/paste buffer"); return OPERATOR_CANCELLED; } @@ -1319,7 +1319,7 @@ static int actkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op)) if (ANIM_animdata_get_context(C, &ac) == 0) return OPERATOR_CANCELLED; - /* init edit data */ + /* init edit data */ /* loop over action data, averaging values */ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY */ | ANIMFILTER_NODUPLIS); ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); @@ -1369,13 +1369,13 @@ void ACTION_OT_frame_jump(wmOperatorType *ot) /* defines for snap keyframes tool */ static EnumPropertyItem prop_actkeys_snap_types[] = { - {ACTKEYS_SNAP_CFRA, "CFRA", 0, "Current frame", + {ACTKEYS_SNAP_CFRA, "CFRA", 0, "Current frame", "Snap selected keyframes to the current frame"}, - {ACTKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", + {ACTKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", "Snap selected keyframes to the nearest (whole) frame (use to fix accidental sub-frame offsets)"}, - {ACTKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", + {ACTKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", "Snap selected keyframes to the nearest second"}, - {ACTKEYS_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Nearest Marker", + {ACTKEYS_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Nearest Marker", "Snap selected keyframes to the nearest marker"}, {0, NULL, 0, NULL, NULL} }; @@ -1477,11 +1477,11 @@ void ACTION_OT_snap(wmOperatorType *ot) /* defines for mirror keyframes tool */ static EnumPropertyItem prop_actkeys_mirror_types[] = { - {ACTKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current frame", + {ACTKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current frame", "Flip times of selected keyframes using the current frame as the mirror line"}, - {ACTKEYS_MIRROR_XAXIS, "XAXIS", 0, "By Values over Value=0", + {ACTKEYS_MIRROR_XAXIS, "XAXIS", 0, "By Values over Value=0", "Flip values of selected keyframes (i.e. negative values become positive, and vice versa)"}, - {ACTKEYS_MIRROR_MARKER, "MARKER", 0, "By Times over First Selected Marker", + {ACTKEYS_MIRROR_MARKER, "MARKER", 0, "By Times over First Selected Marker", "Flip times of selected keyframes using the first selected marker as the reference point"}, {0, NULL, 0, NULL, NULL} }; diff --git a/source/blender/editors/space_action/action_intern.h b/source/blender/editors/space_action/action_intern.h index c684ae1de51..10085d8a149 100644 --- a/source/blender/editors/space_action/action_intern.h +++ b/source/blender/editors/space_action/action_intern.h @@ -111,7 +111,7 @@ enum { ACTKEYS_SNAP_CFRA = 1, ACTKEYS_SNAP_NEAREST_FRAME, ACTKEYS_SNAP_NEAREST_SECOND, - ACTKEYS_SNAP_NEAREST_MARKER, + ACTKEYS_SNAP_NEAREST_MARKER, } eActKeys_Snap_Mode; /* defines for mirror keyframes @@ -121,7 +121,7 @@ enum { ACTKEYS_MIRROR_CFRA = 1, ACTKEYS_MIRROR_YAXIS, ACTKEYS_MIRROR_XAXIS, - ACTKEYS_MIRROR_MARKER, + ACTKEYS_MIRROR_MARKER, } eActKeys_Mirror_Mode; /* ***************************************** */ diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index 5da348b2a84..1602d3b6591 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -763,7 +763,7 @@ static void actkeys_select_leftright(bAnimContext *ac, short leftright, short se if (leftright == ACTKEYS_LRSEL_LEFT) { ked.f1 = MINAFRAMEF; ked.f2 = (float)(CFRA + 0.1f); - } + } else { ked.f1 = (float)(CFRA - 0.1f); ked.f2 = MAXFRAMEF; @@ -785,7 +785,7 @@ static void actkeys_select_leftright(bAnimContext *ac, short leftright, short se ANIM_fcurve_keyframes_loop(&ked, ale->key_data, ok_cb, select_cb, NULL); ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1); } - else if (ale->type == ANIMTYPE_GPLAYER) + else if (ale->type == ANIMTYPE_GPLAYER) ED_gplayer_frames_select_border(ale->data, ked.f1, ked.f2, select_mode); else if (ale->type == ANIMTYPE_MASKLAYER) ED_masklayer_frames_select_border(ale->data, ked.f1, ked.f2, select_mode); @@ -869,7 +869,7 @@ static int actkeys_select_leftright_invoke(bContext *C, wmOperator *op, wmEvent UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &x, NULL); if (x < CFRA) RNA_enum_set(op->ptr, "mode", ACTKEYS_LRSEL_LEFT); - else + else RNA_enum_set(op->ptr, "mode", ACTKEYS_LRSEL_RIGHT); } @@ -1081,7 +1081,7 @@ static void mouse_action_keys(bAnimContext *ac, const int mval[2], short select_ /* dopesheet summary covers everything */ summary_to_keylist(ac, &anim_keys, NULL); } - else if (ale->type == ANIMTYPE_GROUP) { + else if (ale->type == ANIMTYPE_GROUP) { // TODO: why don't we just give groups key_data too? bActionGroup *agrp = (bActionGroup *)ale->data; agroup_to_keylist(adt, agrp, &anim_keys, NULL); @@ -1144,7 +1144,7 @@ static void mouse_action_keys(bAnimContext *ac, const int mval[2], short select_ agrp->flag |= AGRP_SELECTED; ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, agrp, ANIMTYPE_GROUP); - } + } else if (ale->type == ANIMTYPE_FCURVE) { FCurve *fcu = ale->data; diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c index 2e92b1eea6f..7ae668bc0bb 100644 --- a/source/blender/editors/space_action/space_action.c +++ b/source/blender/editors/space_action/space_action.c @@ -377,7 +377,7 @@ static void action_listener(ScrArea *sa, wmNotifier *wmn) ED_area_tag_refresh(sa); break; case NC_SCENE: - switch (wmn->data) { + switch (wmn->data) { case ND_OB_ACTIVE: /* selection changed, so force refresh to flush (needs flag set to do syncing) */ case ND_OB_SELECT: saction->flag |= SACTION_TEMP_NEEDCHANSYNC; @@ -433,7 +433,7 @@ static void action_listener(ScrArea *sa, wmNotifier *wmn) saction->flag |= SACTION_TEMP_NEEDCHANSYNC; ED_area_tag_refresh(sa); break; - } + } break; case NC_WINDOW: if (saction->flag & SACTION_TEMP_NEEDCHANSYNC) { diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c index 2cbcbcdbc9a..35344f2c5a4 100644 --- a/source/blender/editors/space_api/spacetypes.c +++ b/source/blender/editors/space_api/spacetypes.c @@ -193,7 +193,7 @@ void ED_spacetypes_keymap(wmKeyConfig *keyconf) typedef struct RegionDrawCB { struct RegionDrawCB *next, *prev; - void (*draw)(const struct bContext *, struct ARegion *, void *); + void (*draw)(const struct bContext *, struct ARegion *, void *); void *customdata; int type; @@ -239,7 +239,7 @@ void ED_region_draw_cb_draw(const bContext *C, ARegion *ar, int type) for (rdc = ar->type->drawcalls.first; rdc; rdc = rdc->next) { if (rdc->type == type) rdc->draw(C, ar, rdc->customdata); - } + } } diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 7e232a02536..9c47c407bd9 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -236,7 +236,7 @@ static int buttons_context_path_material(ButsContextPath *path, int for_texture) if (ma) { RNA_id_pointer_create(&ma->id, &path->ptr[path->len]); path->len++; - } + } return 1; } } @@ -889,7 +889,7 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r else CTX_data_pointer_set(result, NULL, &RNA_ParticleSystem, NULL); return 1; - } + } else if (CTX_data_equals(member, "particle_settings")) { /* only available when pinned */ PointerRNA *ptr = get_pointer_type(path, &RNA_ParticleSettings); diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index 33229496d0b..09ad7312123 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -323,7 +323,7 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn) /* currently works by redraws... if preview is set, it (re)starts job */ sbuts->preview = 1; break; - } + } break; case NC_WORLD: buttons_area_redraw(sa, BCONTEXT_WORLD); diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c index ecd9e316cef..68de184f008 100644 --- a/source/blender/editors/space_console/console_ops.c +++ b/source/blender/editors/space_console/console_ops.c @@ -803,7 +803,7 @@ void CONSOLE_OT_history_append(wmOperatorType *ot) ot->poll = ED_operator_console_active; /* properties */ - RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position"); + RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position"); RNA_def_int(ot->srna, "current_character", 0, 0, INT_MAX, "Cursor", "The index of the cursor", 0, 10000); RNA_def_boolean(ot->srna, "remove_duplicates", 0, "Remove Duplicates", "Remove duplicate items in the history"); } diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 55e75992b89..2ea1b5d563b 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -494,7 +494,7 @@ void file_draw_list(const bContext *C, ARegion *ar) sx += (int)(v2d->tot.xmin + 2.0f); sy = (int)(v2d->tot.ymax - sy); - file = filelist_file(files, i); + file = filelist_file(files, i); UI_ThemeColor4(TH_TEXT); @@ -544,7 +544,7 @@ void file_draw_list(const bContext *C, ARegion *ar) if (params->display == FILE_SHORTDISPLAY) { sx += (int)layout->column_widths[COLUMN_NAME] + 12; if (!(file->type & S_IFDIR)) { - file_draw_string(sx, sy, file->size, layout->column_widths[COLUMN_SIZE], layout->tile_h, align); + file_draw_string(sx, sy, file->size, layout->column_widths[COLUMN_SIZE], layout->tile_h, align); sx += (int)layout->column_widths[COLUMN_SIZE] + 12; } } diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 7a364eb8685..52d4a6a86c1 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -554,7 +554,7 @@ int file_highlight_set(SpaceFile *sfile, ARegion *ar, int mx, int my) { View2D *v2d = &ar->v2d; FileSelectParams *params; - int numfiles, origfile; + int numfiles, origfile; if (sfile == NULL || sfile->files == NULL) return 0; @@ -849,7 +849,7 @@ int file_parent_exec(bContext *C, wmOperator *UNUSED(unused)) file_change_dir(C, 0); WM_event_add_notifier(C, NC_SPACE | ND_SPACE_FILE_LIST, NULL); } - } + } return OPERATOR_FINISHED; @@ -942,7 +942,7 @@ int file_next_exec(bContext *C, wmOperator *UNUSED(unused)) folderlist_pushdir(sfile->folders_prev, sfile->params->dir); file_change_dir(C, 1); - } + } WM_event_add_notifier(C, NC_SPACE | ND_SPACE_FILE_LIST, NULL); return OPERATOR_FINISHED; @@ -1116,7 +1116,7 @@ int file_directory_new_exec(bContext *C, wmOperator *op) if (!BLI_exists(path)) { BKE_report(op->reports, RPT_ERROR, "Couldn't create new folder"); return OPERATOR_CANCELLED; - } + } /* now remember file to jump into editing */ BLI_strncpy(sfile->params->renamefile, name, FILE_MAXFILE); @@ -1427,11 +1427,11 @@ static int file_rename_poll(bContext *C) SpaceFile *sfile = CTX_wm_space_file(C); if (sfile && sfile->params) { - if (sfile->params->active_file < 0) { + if (sfile->params->active_file < 0) { poll = 0; } else { - char dir[FILE_MAX], group[FILE_MAX]; + char dir[FILE_MAX], group[FILE_MAX]; if (filelist_islibrary(sfile->files, dir, group)) poll = 0; } } @@ -1460,11 +1460,11 @@ static int file_delete_poll(bContext *C) struct direntry *file; if (sfile && sfile->params) { - if (sfile->params->active_file < 0) { + if (sfile->params->active_file < 0) { poll = 0; } else { - char dir[FILE_MAX], group[FILE_MAX]; + char dir[FILE_MAX], group[FILE_MAX]; if (filelist_islibrary(sfile->files, dir, group)) poll = 0; file = filelist_file(sfile->files, sfile->params->active_file); if (file && S_ISDIR(file->type)) poll = 0; @@ -1485,7 +1485,7 @@ int file_delete_exec(bContext *C, wmOperator *UNUSED(op)) file = filelist_file(sfile->files, sfile->params->active_file); BLI_make_file_string(G.main->name, str, sfile->params->dir, file->relname); - BLI_delete(str, 0, 0); + BLI_delete(str, 0, 0); ED_fileselect_clear(C, sfile); WM_event_add_notifier(C, NC_SPACE | ND_SPACE_FILE_LIST, NULL); diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 9d5f7fdd982..6afc0305115 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -300,7 +300,7 @@ static int is_hidden_file(const char *filename, short hide_dot) if ( (len > 0) && (filename[len - 1] == '~') ) { is_hidden = 1; /* ignore file~ */ } - } + } } else { if (((filename[0] == '.') && (filename[1] == 0) )) { @@ -360,7 +360,7 @@ void filelist_filter(FileList *filelist) struct direntry *file = &filelist->filelist[i]; if (filelist->filterf(file, filelist->dir, filelist->filter, filelist->hide_dot) ) { num_filtered++; - } + } } if (filelist->fidx) { @@ -557,7 +557,7 @@ void filelist_free(struct FileList *filelist) } for (i = 0; i < filelist->numfiles; ++i) { - if (filelist->filelist[i].image) { + if (filelist->filelist[i].image) { IMB_freeImBuf(filelist->filelist[i].image); } filelist->filelist[i].image = NULL; @@ -573,7 +573,7 @@ void filelist_free(struct FileList *filelist) filelist->numfiles = 0; free(filelist->filelist); - filelist->filelist = NULL; + filelist->filelist = NULL; filelist->filter = 0; filelist->filter_glob[0] = '\0'; filelist->numfiltered = 0; @@ -791,7 +791,7 @@ static int file_extension_type(const char *relname) BLI_testextensie(relname, ".otf") || BLI_testextensie(relname, ".otc")) { - return FTFONTFILE; + return FTFONTFILE; } else if (BLI_testextensie(relname, ".btx")) { return BTXFILE; @@ -802,14 +802,14 @@ static int file_extension_type(const char *relname) else if (BLI_testextensie_array(relname, imb_ext_image) || (G.have_quicktime && BLI_testextensie_array(relname, imb_ext_image_qt))) { - return IMAGEFILE; + return IMAGEFILE; } else if (BLI_testextensie_array(relname, imb_ext_movie)) { - return MOVIEFILE; + return MOVIEFILE; } else if (BLI_testextensie_array(relname, imb_ext_audio)) { return SOUNDFILE; - } + } return 0; } @@ -934,7 +934,7 @@ void filelist_parent(struct FileList *filelist) void filelist_select_file(struct FileList *filelist, int index, FileSelType select, unsigned int flag, FileCheckType check) { struct direntry *file = filelist_file(filelist, index); - if (file != NULL) { + if (file != NULL) { int check_ok = 0; switch (check) { case CHECK_DIRS: @@ -969,7 +969,7 @@ void filelist_select(struct FileList *filelist, FileSelection *sel, FileSelType /* select all valid files between first and last indicated */ if ( (sel->first >= 0) && (sel->first < filelist->numfiltered) && (sel->last >= 0) && (sel->last < filelist->numfiltered) ) { int current_file; - for (current_file = sel->first; current_file <= sel->last; current_file++) { + for (current_file = sel->first; current_file <= sel->last; current_file++) { filelist_select_file(filelist, current_file, select, flag, check); } } @@ -1036,7 +1036,7 @@ void filelist_from_library(struct FileList *filelist) struct ImBuf *ima; int ok, i, nprevs, nnames, idcode; char filename[FILE_MAX]; - char dir[FILE_MAX], group[GROUP_MAX]; + char dir[FILE_MAX], group[GROUP_MAX]; /* name test */ ok = filelist_islibrary(filelist, dir, group); diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index 1fa89e5db9a..746f5f22df9 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -307,7 +307,7 @@ FileSelection ED_fileselect_layout_offset_rect(FileLayout *layout, const rcti *r CLAMP(rowmin, 0, layout->rows - 1); CLAMP(colmax, 0, layout->columns - 1); CLAMP(rowmax, 0, layout->rows - 1); - } + } if ((colmin > layout->columns - 1) || (rowmin > layout->rows - 1)) { sel.first = -1; diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index 4fe4ad133a9..fc2b6de08a6 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -198,7 +198,7 @@ static void file_refresh(const bContext *C, ScrArea *UNUSED(sa)) params->active_file = -1; // added this so it opens nicer (ton) } filelist_hidedot(sfile->files, params->flag & FILE_HIDE_DOT); - filelist_setfilter(sfile->files, params->flag & FILE_FILTER ? params->filter : 0); + filelist_setfilter(sfile->files, params->flag & FILE_FILTER ? params->filter : 0); filelist_setfilter_types(sfile->files, params->filter_glob); if (filelist_empty(sfile->files)) { @@ -481,7 +481,7 @@ static void file_channel_area_init(wmWindowManager *wm, ARegion *ar) ED_region_panels_init(wm, ar); /* own keymaps */ - keymap = WM_keymap_find(wm->defaultconf, "File Browser", SPACE_FILE, 0); + keymap = WM_keymap_find(wm->defaultconf, "File Browser", SPACE_FILE, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } @@ -505,7 +505,7 @@ static void file_header_area_init(wmWindowManager *wm, ARegion *ar) ED_region_header_init(ar); - keymap = WM_keymap_find(wm->defaultconf, "File Browser", SPACE_FILE, 0); + keymap = WM_keymap_find(wm->defaultconf, "File Browser", SPACE_FILE, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index 3e8f6f1c7fc..551ef953538 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -299,7 +299,7 @@ static void graph_panel_key_properties(const bContext *C, Panel *pa) if (RNA_path_resolve(&id_ptr, fcu->rna_path, &fcu_prop_ptr, &fcu_prop) && fcu_prop) { /* determine the unit for this property */ unit = RNA_SUBTYPE_UNIT(RNA_property_subtype(fcu_prop)); - } + } /* interpolation */ col = uiLayoutColumn(layout, FALSE); @@ -407,7 +407,7 @@ static void driver_remove_cb(bContext *C, void *ale_v, void *UNUSED(arg)) if (ELEM(NULL, id, fcu)) return; - /* call API method to remove this driver */ + /* call API method to remove this driver */ ANIM_remove_driver(reports, id, fcu->rna_path, fcu->array_index, 0); } diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index c9864df393a..f665b979559 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -262,7 +262,7 @@ static void set_fcurve_vertex_color(FCurve *fcu, short sel) /* Curve's points ARE BEING edited */ if (sel) UI_ThemeColorShadeAlpha(TH_VERTEX_SELECT, 0, alphaOffset); else UI_ThemeColorShadeAlpha(TH_VERTEX, 0, alphaOffset); - } + } else { /* Curve's points CANNOT BE edited */ if (sel) UI_ThemeColorShadeAlpha(TH_TEXT_HI, 0, alphaOffset); @@ -318,7 +318,7 @@ static int draw_fcurve_handles_check(SpaceIpo *sipo, FCurve *fcu) ) { return 0; - } + } else { return 1; } @@ -561,7 +561,7 @@ static void draw_fcurve_curve_samples(bAnimContext *ac, ID *id, FCurve *fcu, Vie if ((fcu->extend == FCURVE_EXTRAPOLATE_CONSTANT) || (fcu->flag & FCURVE_INT_VALUES) || (fcu->totvert == 1)) { /* just extend across the first keyframe's value */ v[1] = prevfpt->vec[1]; - } + } else { /* extrapolate linear dosnt use the handle, use the next points center instead */ fac = (prevfpt->vec[0] - fpt->vec[0]) / (prevfpt->vec[0] - v[0]); @@ -599,7 +599,7 @@ static void draw_fcurve_curve_samples(bAnimContext *ac, ID *id, FCurve *fcu, Vie if ((fcu->extend == FCURVE_EXTRAPOLATE_CONSTANT) || (fcu->flag & FCURVE_INT_VALUES) || (fcu->totvert == 1)) { /* based on last keyframe's value */ v[1] = prevfpt->vec[1]; - } + } else { /* extrapolate linear dosnt use the handle, use the previous points center instead */ fpt = prevfpt - 1; @@ -642,13 +642,13 @@ static void draw_fcurve_curve_bezts(bAnimContext *ac, ID *id, FCurve *fcu, View2 if ((fcu->extend == FCURVE_EXTRAPOLATE_CONSTANT) || (prevbezt->ipo == BEZT_IPO_CONST) || (fcu->totvert == 1)) { /* just extend across the first keyframe's value */ v1[1] = prevbezt->vec[1][1]; - } + } else if (prevbezt->ipo == BEZT_IPO_LIN) { /* extrapolate linear dosnt use the handle, use the next points center instead */ fac = (prevbezt->vec[1][0] - bezt->vec[1][0]) / (prevbezt->vec[1][0] - v1[0]); if (fac) fac = 1.0f / fac; v1[1] = prevbezt->vec[1][1] - fac * (prevbezt->vec[1][1] - bezt->vec[1][1]); - } + } else { /* based on angle of handle 1 (relative to keyframe) */ fac = (prevbezt->vec[0][0] - prevbezt->vec[1][0]) / (prevbezt->vec[1][0] - v1[0]); @@ -748,14 +748,14 @@ static void draw_fcurve_curve_bezts(bAnimContext *ac, ID *id, FCurve *fcu, View2 if ((fcu->extend == FCURVE_EXTRAPOLATE_CONSTANT) || (fcu->flag & FCURVE_INT_VALUES) || (prevbezt->ipo == BEZT_IPO_CONST) || (fcu->totvert == 1)) { /* based on last keyframe's value */ v1[1] = prevbezt->vec[1][1]; - } + } else if (prevbezt->ipo == BEZT_IPO_LIN) { /* extrapolate linear dosnt use the handle, use the previous points center instead */ bezt = prevbezt - 1; fac = (prevbezt->vec[1][0] - bezt->vec[1][0]) / (prevbezt->vec[1][0] - v1[0]); if (fac) fac = 1.0f / fac; v1[1] = prevbezt->vec[1][1] - fac * (prevbezt->vec[1][1] - bezt->vec[1][1]); - } + } else { /* based on angle of handle 1 (relative to keyframe) */ fac = (prevbezt->vec[2][0] - prevbezt->vec[1][0]) / (prevbezt->vec[1][0] - v1[0]); @@ -971,7 +971,7 @@ void graph_draw_channel_names(bContext *C, bAnimContext *ac, ARegion *ar) height = (float)((items * ACHANNEL_STEP) + (ACHANNEL_HEIGHT * 2)); UI_view2d_totRect_set(v2d, ar->winx, height); - /* loop through channels, and set up drawing depending on their type */ + /* loop through channels, and set up drawing depending on their type */ { /* first pass: just the standard GL-drawing for backdrop + text */ y = (float)ACHANNEL_FIRST; diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 30ec32ec0aa..56ebde6e316 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -332,7 +332,7 @@ static void create_ghost_curves(bAnimContext *ac, int start, int end) ChannelDriver *driver = fcu->driver; FPoint *fpt; float unitFac; - int cfra; + int cfra; /* disable driver so that it don't muck up the sampling process */ fcu->driver = NULL; @@ -724,7 +724,7 @@ static int graphkeys_copy_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; /* copy keyframes */ - if (copy_graph_keys(&ac)) { + if (copy_graph_keys(&ac)) { BKE_report(op->reports, RPT_ERROR, "No keyframes copied to keyframes copy/paste buffer"); return OPERATOR_CANCELLED; } @@ -1824,17 +1824,17 @@ void GRAPH_OT_frame_jump(wmOperatorType *ot) /* defines for snap keyframes tool */ static EnumPropertyItem prop_graphkeys_snap_types[] = { - {GRAPHKEYS_SNAP_CFRA, "CFRA", 0, "Current Frame", + {GRAPHKEYS_SNAP_CFRA, "CFRA", 0, "Current Frame", "Snap selected keyframes to the current frame"}, - {GRAPHKEYS_SNAP_VALUE, "VALUE", 0, "Cursor Value", + {GRAPHKEYS_SNAP_VALUE, "VALUE", 0, "Cursor Value", "Set values of selected keyframes to the cursor value (Y/Horizontal component)"}, - {GRAPHKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", + {GRAPHKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", "Snap selected keyframes to the nearest (whole) frame (use to fix accidental sub-frame offsets)"}, - {GRAPHKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", + {GRAPHKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", "Snap selected keyframes to the nearest second"}, - {GRAPHKEYS_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Nearest Marker", + {GRAPHKEYS_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Nearest Marker", "Snap selected keyframes to the nearest marker"}, - {GRAPHKEYS_SNAP_HORIZONTAL, "HORIZONTAL", 0, "Flatten Handles", + {GRAPHKEYS_SNAP_HORIZONTAL, "HORIZONTAL", 0, "Flatten Handles", "Flatten handles for a smoother transition"}, {0, NULL, 0, NULL, NULL} }; @@ -1938,15 +1938,15 @@ void GRAPH_OT_snap(wmOperatorType *ot) /* defines for mirror keyframes tool */ static EnumPropertyItem prop_graphkeys_mirror_types[] = { - {GRAPHKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current Frame", + {GRAPHKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current Frame", "Flip times of selected keyframes using the current frame as the mirror line"}, - {GRAPHKEYS_MIRROR_VALUE, "VALUE", 0, "By Values over Cursor Value", + {GRAPHKEYS_MIRROR_VALUE, "VALUE", 0, "By Values over Cursor Value", "Flip values of selected keyframes using the cursor value (Y/Horizontal component) as the mirror line"}, - {GRAPHKEYS_MIRROR_YAXIS, "YAXIS", 0, "By Times over Time=0", + {GRAPHKEYS_MIRROR_YAXIS, "YAXIS", 0, "By Times over Time=0", "Flip times of selected keyframes, effectively reversing the order they appear in"}, - {GRAPHKEYS_MIRROR_XAXIS, "XAXIS", 0, "By Values over Value=0", + {GRAPHKEYS_MIRROR_XAXIS, "XAXIS", 0, "By Values over Value=0", "Flip values of selected keyframes (i.e. negative values become positive, and vice versa)"}, - {GRAPHKEYS_MIRROR_MARKER, "MARKER", 0, "By Times over First Selected Marker", + {GRAPHKEYS_MIRROR_MARKER, "MARKER", 0, "By Times over First Selected Marker", "Flip times of selected keyframes using the first selected marker as the reference point"}, {0, NULL, 0, NULL, NULL} }; diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h index eb657169970..b2dbf764c1d 100644 --- a/source/blender/editors/space_graph/graph_intern.h +++ b/source/blender/editors/space_graph/graph_intern.h @@ -123,7 +123,7 @@ enum { GRAPHKEYS_SNAP_CFRA = 1, GRAPHKEYS_SNAP_NEAREST_FRAME, GRAPHKEYS_SNAP_NEAREST_SECOND, - GRAPHKEYS_SNAP_NEAREST_MARKER, + GRAPHKEYS_SNAP_NEAREST_MARKER, GRAPHKEYS_SNAP_HORIZONTAL, GRAPHKEYS_SNAP_VALUE, } eGraphKeys_Snap_Mode; diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index e2fc1657379..978b3224850 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -757,7 +757,7 @@ static void graphkeys_select_leftright(bAnimContext *ac, short leftright, short if (leftright == GRAPHKEYS_LRSEL_LEFT) { ked.f1 = MINAFRAMEF; ked.f2 = (float)(CFRA + 0.1f); - } + } else { ked.f1 = (float)(CFRA - 0.1f); ked.f2 = MAXFRAMEF; @@ -835,7 +835,7 @@ static int graphkeys_select_leftright_invoke(bContext *C, wmOperator *op, wmEven UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &x, NULL); if (x < CFRA) RNA_enum_set(op->ptr, "mode", GRAPHKEYS_LRSEL_LEFT); - else + else RNA_enum_set(op->ptr, "mode", GRAPHKEYS_LRSEL_RIGHT); } @@ -1113,7 +1113,7 @@ static void mouse_graph_keys(bAnimContext *ac, const int mval[2], short select_m nvi = find_nearest_fcurve_vert(ac, mval); /* check if anything to select */ - if (nvi == NULL) + if (nvi == NULL) return; /* deselect all other curves? */ @@ -1241,7 +1241,7 @@ static void graphkeys_mselect_column(bAnimContext *ac, const int mval[2], short nvi = find_nearest_fcurve_vert(ac, mval); /* check if anything to select */ - if (nvi == NULL) + if (nvi == NULL) return; /* get frame number on which elements should be selected */ diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index a4611cf1453..f41169b6c39 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -441,7 +441,7 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn) ED_area_tag_refresh(sa); break; case NC_SCENE: - switch (wmn->data) { + switch (wmn->data) { case ND_OB_ACTIVE: /* selection changed, so force refresh to flush (needs flag set to do syncing) */ case ND_OB_SELECT: sipo->flag |= SIPO_TEMP_NEEDCHANSYNC; @@ -461,7 +461,7 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn) ED_area_tag_refresh(sa); break; case ND_TRANSFORM: - break; /*do nothing*/ + break; /*do nothing*/ default: /* just redrawing the view will do */ ED_area_tag_redraw(sa); diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 59416dcf0c3..e406b65b53c 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -191,7 +191,7 @@ void image_preview_event(int event) waitcursor(0); WM_event_add_notifier(C, NC_IMAGE, ima_v); - } + } } diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 04566af2b3b..96646ae00bd 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -791,7 +791,7 @@ void draw_image_main(const bContext *C, ARegion *ar) xoffs = scene->r.disprect.xmin; yoffs = scene->r.disprect.ymin; glColor3ub(0, 0, 0); - calc_image_view(sima, 'f'); + calc_image_view(sima, 'f'); myortho2(G.v2d->cur.xmin, G.v2d->cur.xmax, G.v2d->cur.ymin, G.v2d->cur.ymax); glRectf(0.0f, 0.0f, 1.0f, 1.0f); glLoadIdentity(); diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 4793f995d98..e84db87c5eb 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -551,7 +551,7 @@ static int image_view_ndof_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent * sima->xof += pan_x; sima->yof += pan_y; - ED_region_tag_redraw(ar); + ED_region_tag_redraw(ar); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 7f53f378042..876c2f9985b 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -457,7 +457,7 @@ static void image_listener(ScrArea *sa, wmNotifier *wmn) ED_area_tag_redraw(sa); } break; - case NC_SPACE: + case NC_SPACE: if (wmn->data == ND_SPACE_IMAGE) { image_scopes_tag_refresh(sa); ED_area_tag_redraw(sa); diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c index 034c382cfd2..076c648b496 100644 --- a/source/blender/editors/space_info/space_info.c +++ b/source/blender/editors/space_info/space_info.c @@ -249,7 +249,7 @@ static void info_header_listener(ARegion *ar, wmNotifier *wmn) if (ELEM(wmn->data, ND_SCREENCAST, ND_ANIMPLAY)) ED_region_tag_redraw(ar); break; - case NC_WM: + case NC_WM: if (wmn->data == ND_JOB) ED_region_tag_redraw(ar); break; @@ -257,7 +257,7 @@ static void info_header_listener(ARegion *ar, wmNotifier *wmn) if (wmn->data == ND_RENDER_RESULT) ED_region_tag_redraw(ar); break; - case NC_SPACE: + case NC_SPACE: if (wmn->data == ND_SPACE_INFO) ED_region_tag_redraw(ar); break; diff --git a/source/blender/editors/space_logic/logic_buttons.c b/source/blender/editors/space_logic/logic_buttons.c index abdfa0ef4dd..d37306f9bc5 100644 --- a/source/blender/editors/space_logic/logic_buttons.c +++ b/source/blender/editors/space_logic/logic_buttons.c @@ -137,7 +137,7 @@ static int cut_links_exec(bContext *C, wmOperator *op) } } return OPERATOR_FINISHED; - } + } return OPERATOR_CANCELLED|OPERATOR_PASS_THROUGH; } diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c index f2013e405e2..74be7c46d26 100644 --- a/source/blender/editors/space_logic/logic_ops.c +++ b/source/blender/editors/space_logic/logic_ops.c @@ -138,7 +138,7 @@ static bSensor *edit_sensor_property_get(bContext *C, wmOperator *op, Object **o *ob = edit_object_property_get(C, op); if (!*ob) return NULL; - sens = BLI_findstring(&((*ob)->sensors), sensor_name, offsetof(bSensor, name)); + sens = BLI_findstring(&((*ob)->sensors), sensor_name, offsetof(bSensor, name)); return sens; } @@ -177,7 +177,7 @@ static bController *edit_controller_property_get(bContext *C, wmOperator *op, Ob *ob = edit_object_property_get(C, op); if (!*ob) return NULL; - cont = BLI_findstring(&((*ob)->controllers), controller_name, offsetof(bController, name)); + cont = BLI_findstring(&((*ob)->controllers), controller_name, offsetof(bController, name)); return cont; } @@ -216,7 +216,7 @@ static bActuator *edit_actuator_property_get(bContext *C, wmOperator *op, Object *ob = edit_object_property_get(C, op); if (!*ob) return NULL; - act = BLI_findstring(&((*ob)->actuators), actuator_name, offsetof(bActuator, name)); + act = BLI_findstring(&((*ob)->actuators), actuator_name, offsetof(bActuator, name)); return act; } diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index 5d7ff77e032..4adbce8f19c 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -134,7 +134,7 @@ void make_unique_prop_names(bContext *C, char *str) propcount+= BLI_countlist(&ob->sensors); propcount+= BLI_countlist(&ob->controllers); propcount+= BLI_countlist(&ob->actuators); - } + } if (propcount==0) { if (idar) MEM_freeN(idar); return; @@ -524,7 +524,7 @@ static const char *actuator_name(int type) case ACT_ARMATURE: return "Armature"; case ACT_STEERING: - return "Steering"; + return "Steering"; } return "unknown"; } @@ -678,7 +678,7 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf ob= ob->id.next; } } - } + } /* now we count */ ob= bmain->object.first; @@ -1772,7 +1772,7 @@ static void draw_actuator_motion(uiLayout *layout, PointerRNA *ptr) uiLayout *split, *row, *col, *sub; int physics_type; - ob = (Object *)ptr->id.data; + ob = (Object *)ptr->id.data; RNA_pointer_create((ID *)ob, &RNA_GameObjectSettings, ob, &settings_ptr); physics_type = RNA_enum_get(&settings_ptr, "physics_type"); @@ -1790,7 +1790,7 @@ static void draw_actuator_motion(uiLayout *layout, PointerRNA *ptr) uiItemR(row, ptr, "offset_rotation", 0, NULL, ICON_NONE); uiItemR(split, ptr, "use_local_rotation", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - if (ELEM3(physics_type, OB_BODY_TYPE_DYNAMIC, OB_BODY_TYPE_RIGID, OB_BODY_TYPE_SOFT)) { + if (ELEM3(physics_type, OB_BODY_TYPE_DYNAMIC, OB_BODY_TYPE_RIGID, OB_BODY_TYPE_SOFT)) { uiItemL(layout, "Dynamic Object Settings:", ICON_NONE); split = uiLayoutSplit(layout, 0.9, FALSE); row = uiLayoutRow(split, FALSE); diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index 18e983047cd..444af307490 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -156,7 +156,7 @@ static int nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA found = -1; } } - } + } break; } @@ -405,7 +405,7 @@ static void nla_panel_evaluation(const bContext *C, Panel *pa) uiItemR(col, &strip_ptr, "use_animated_influence", 0, NULL, ICON_NONE); sub = uiLayoutColumn(col, TRUE); - uiLayoutSetEnabled(sub, RNA_boolean_get(&strip_ptr, "use_animated_influence")); + uiLayoutSetEnabled(sub, RNA_boolean_get(&strip_ptr, "use_animated_influence")); uiItemR(sub, &strip_ptr, "influence", 0, NULL, ICON_NONE); col = uiLayoutColumn(layout, TRUE); diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c index b3a869ed57d..95e75d0e4fc 100644 --- a/source/blender/editors/space_nla/nla_channels.c +++ b/source/blender/editors/space_nla/nla_channels.c @@ -199,7 +199,7 @@ static int mouse_nla_channels(bAnimContext *ac, float x, int channel_index, shor } notifierFlags |= (ND_ANIMCHAN | NA_SELECTED); - } + } break; case ANIMTYPE_NLATRACK: diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index 5c8e7e99a8c..9091699bd4b 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -163,7 +163,7 @@ static void nla_strip_get_color_inside(AnimData *adt, NlaStrip *strip, float col /* normal, unselected strip - use (hardly noticeable) blue tinge */ UI_GetThemeColor3fv(TH_NLA_TRANSITION, color); } - } + } else if (strip->type == NLASTRIP_TYPE_META) { /* Meta Clip */ // TODO: should temporary metas get different colors too? @@ -528,7 +528,7 @@ void draw_nla_main_data(bAnimContext *ac, SpaceNla *snla, ARegion *ar) */ v2d->tot.ymin = (float)(-height); - /* loop through channels, and set up drawing depending on their type */ + /* loop through channels, and set up drawing depending on their type */ y = (float)(-NLACHANNEL_HEIGHT(snla)); for (ale = anim_data.first; ale; ale = ale->next) { @@ -628,7 +628,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View bAnimListElem *ale; float x = 0.0f; - /* loop through channels, and set up drawing depending on their type */ + /* loop through channels, and set up drawing depending on their type */ for (ale = anim_data->first; ale; ale = ale->next) { const float yminc = (float)(y - NLACHANNEL_HEIGHT_HALF(snla)); const float ymaxc = (float)(y + NLACHANNEL_HEIGHT_HALF(snla)); @@ -709,7 +709,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View // draw backdrops only... ANIM_channel_draw(ac, ale, yminc, ymaxc); break; - } + } /* if special types, draw manually for now... */ if (do_draw) { @@ -737,7 +737,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View /* even more */ offset = 21; indent = 1; - } + } break; default: @@ -936,7 +936,7 @@ void draw_nla_channel_list(bContext *C, bAnimContext *ac, ARegion *ar) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); - /* loop through channels, and set up drawing depending on their type */ + /* loop through channels, and set up drawing depending on their type */ for (ale = anim_data.first; ale; ale = ale->next) { const float yminc = (float)(y - NLACHANNEL_HEIGHT_HALF(snla)); const float ymaxc = (float)(y + NLACHANNEL_HEIGHT_HALF(snla)); diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index e0e5007aff0..945ec1d4a1b 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -123,7 +123,7 @@ static int nlaedit_enable_tweakmode_exec(bContext *C, wmOperator *op) if (anim_data.first == NULL) { BKE_report(op->reports, RPT_ERROR, "No AnimData blocks to enter tweak mode for"); return OPERATOR_CANCELLED; - } + } /* for each AnimData block with NLA-data, try setting it in tweak-mode */ for (ale = anim_data.first; ale; ale = ale->next) { @@ -192,7 +192,7 @@ static int nlaedit_disable_tweakmode_exec(bContext *C, wmOperator *op) if (anim_data.first == NULL) { BKE_report(op->reports, RPT_ERROR, "No AnimData blocks to enter tweak mode for"); return OPERATOR_CANCELLED; - } + } /* for each AnimData block with NLA-data, try exitting tweak-mode */ for (ale = anim_data.first; ale; ale = ale->next) { @@ -1364,7 +1364,7 @@ static int nlaedit_swap_exec(bContext *C, wmOperator *op) "Cannot swap selected strips as they will not be able to fit in their new places"); } else { - BKE_reportf(op->reports, RPT_WARNING, + BKE_reportf(op->reports, RPT_WARNING, "Cannot swap '%s' and '%s' as one or both will not be able to fit in their new places", sa->name, sb->name); } diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c index 3a74d0b4c9c..54ade829c0d 100644 --- a/source/blender/editors/space_nla/nla_ops.c +++ b/source/blender/editors/space_nla/nla_ops.c @@ -256,7 +256,7 @@ static void nla_keymap_main(wmKeyConfig *keyconf, wmKeyMap *keymap) WM_keymap_add_item(keymap, "NLA_OT_meta_remove", GKEY, KM_PRESS, KM_ALT, 0); /* duplicate */ - WM_keymap_add_item(keymap, "NLA_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0); + WM_keymap_add_item(keymap, "NLA_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0); /* delete */ WM_keymap_add_item(keymap, "NLA_OT_delete", XKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c index 79be0d0a194..97553b7aa56 100644 --- a/source/blender/editors/space_nla/nla_select.c +++ b/source/blender/editors/space_nla/nla_select.c @@ -390,7 +390,7 @@ static void nlaedit_select_leftright(bContext *C, bAnimContext *ac, short leftri if (leftright == NLAEDIT_LRSEL_LEFT) { xmin = MINAFRAMEF; xmax = (float)(CFRA + 0.1f); - } + } else { xmin = (float)(CFRA - 0.1f); xmax = MAXFRAMEF; @@ -471,7 +471,7 @@ static int nlaedit_select_leftright_invoke(bContext *C, wmOperator *op, wmEvent UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &x, NULL); if (x < CFRA) RNA_int_set(op->ptr, "mode", NLAEDIT_LRSEL_LEFT); - else + else RNA_int_set(op->ptr, "mode", NLAEDIT_LRSEL_RIGHT); } @@ -582,7 +582,7 @@ static void mouse_nla_strips(bContext *C, bAnimContext *ac, const int mval[2], s ANIM_deselect_anim_channels(ac, ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); /* Highlight NLA-Track */ - if (ale->type == ANIMTYPE_NLATRACK) { + if (ale->type == ANIMTYPE_NLATRACK) { NlaTrack *nlt = (NlaTrack *)ale->data; nlt->flag |= NLATRACK_SELECTED; diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 67508f2087a..074e9c29152 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -3557,7 +3557,7 @@ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link) } do_shaded = TRUE; do_triple = TRUE; - } + } else { th_col1 = TH_REDALERT; } diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 379e9987c4c..6b201e94c35 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -101,7 +101,7 @@ void ED_node_changed_update(ID *id, bNode *node) nodeUpdateID(nodetree, node->id); WM_main_add_notifier(NC_SCENE | ND_NODES, id); - } + } else if (treetype == NTREE_TEXTURE) { DAG_id_tag_update(id, 0); WM_main_add_notifier(NC_TEXTURE | ND_NODES, id); @@ -915,7 +915,7 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b /* disable lines */ if (node->flag & NODE_MUTED) - node_draw_mute_line(&ar->v2d, snode, node); + node_draw_mute_line(&ar->v2d, snode, node); if (node->flag & SELECT) UI_ThemeColor(TH_SELECT); @@ -932,7 +932,7 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b (int)(rct->xmin + (NODE_MARGIN_X / snode->aspect_sqrt)), (int)(centy - 10), (short)(BLI_rctf_size_x(rct) - 18.0f - 12.0f), (short)NODE_DY, NULL, 0, 0, 0, 0, ""); - } + } /* scale widget thing */ UI_ThemeColorShade(color_id, -10); @@ -1138,7 +1138,7 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d) #ifdef WITH_COMPOSITOR if (snode->nodetree->type == NTREE_COMPOSIT) { COM_startReadHighlights(); - } + } #endif node_draw_nodetree(C, ar, snode, snode->nodetree); diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index f0afc647ed5..3635c1d0f03 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -1972,7 +1972,7 @@ static int node_clipboard_copy_exec(bContext *C, wmOperator *UNUSED(op)) } /* transform to basic view space. child node location is relative to parent */ - if (!new_node->parent) { + if (!new_node->parent) { new_node->locx += gnode_x; new_node->locy += gnode_y; } diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index d2e47427b94..51935b24de3 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -238,9 +238,9 @@ static int group_select_flag(Group *gr) void restrictbutton_gr_restrict_flag(void *poin, void *poin2, int flag) { - Scene *scene = (Scene *)poin; + Scene *scene = (Scene *)poin; GroupObject *gob; - Group *gr = (Group *)poin2; + Group *gr = (Group *)poin2; if (group_restrict_flag(gr, flag)) { for (gob = gr->gobject.first; gob; gob = gob->next) { @@ -309,7 +309,7 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname) WM_event_add_notifier(C, NC_SCENE, NULL); break; default: WM_event_add_notifier(C, NC_ID | NA_RENAME, NULL); break; - } + } /* Check the library target exists */ if (te->idcode == ID_LI) { Library *lib = (Library *)tselem->id; @@ -636,7 +636,7 @@ static uiBlock *operator_search_menu(bContext *C, ARegion *ar, void *arg_kmi) uiButSetSearchFunc(but, operator_search_cb, arg_kmi, operator_call_cb, ot); uiBoundsBlock(block, 6); - uiBlockSetDirection(block, UI_DOWN); + uiBlockSetDirection(block, UI_DOWN); uiEndBlock(C, block); event = *(win->eventstate); /* XXX huh huh? make api call */ @@ -1251,7 +1251,7 @@ static void outliner_set_coord_tree_element(SpaceOops *soops, TreeElement *te, i for (ten = te->subtree.first; ten; ten = ten->next) { outliner_set_coord_tree_element(soops, ten, startx + UI_UNIT_X, starty); - } + } } @@ -1396,7 +1396,7 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene UI_icon_draw((float)startx + offsx, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_DIRECT); glPixelTransferf(GL_ALPHA_SCALE, 1.0f); offsx += UI_UNIT_X; - } + } glDisable(GL_BLEND); /* name */ @@ -1433,7 +1433,7 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene } } } - } + } /* store coord and continue, we need coordinates for elements outside view too */ te->xs = (float)startx; te->ys = (float)*starty; @@ -1444,7 +1444,7 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene for (ten = te->subtree.first; ten; ten = ten->next) outliner_draw_tree_element(C, block, scene, ar, soops, ten, startx + UI_UNIT_X, starty); - } + } else { for (ten = te->subtree.first; ten; ten = ten->next) outliner_set_coord_tree_element(soops, te, startx, starty); @@ -1701,7 +1701,7 @@ void draw_outliner(const bContext *C) } /* draw edit buttons if nessecery */ - outliner_buttons(C, block, ar, soops, &soops->tree); + outliner_buttons(C, block, ar, soops, &soops->tree); uiEndBlock(C, block); uiDrawBlock(C, block); diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 8f059b0a735..b3e2a2c529e 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -81,7 +81,7 @@ static int outliner_open_back(SpaceOops *soops, TreeElement *te) for (te = te->parent; te; te = te->parent) { tselem = TREESTORE(te); - if (tselem->flag & TSE_CLOSED) { + if (tselem->flag & TSE_CLOSED) { tselem->flag &= ~TSE_CLOSED; retval = 1; } @@ -197,10 +197,10 @@ static void do_item_rename(ARegion *ar, TreeElement *te, TreeStoreElem *tselem, } else if (tselem->id->lib) { // XXX error_libdata(); - } + } else if (te->idcode == ID_LI && te->parent) { BKE_report(reports, RPT_WARNING, "Cannot edit the path of an indirectly linked library"); - } + } else { tselem->flag |= TSE_TEXTBUT; ED_region_tag_redraw(ar); @@ -730,7 +730,7 @@ static void outliner_find_panel(Scene *UNUSED(scene), ARegion *ar, SpaceOops *so /* determine which type of search to do */ if (again && last_find) { - /* no popup panel - previous + user wanted to search for next after previous */ + /* no popup panel - previous + user wanted to search for next after previous */ BLI_strncpy(name, soops->search_string, sizeof(name)); flags = soops->search_flags; @@ -1858,7 +1858,7 @@ static int material_drop_invoke(bContext *C, wmOperator *op, wmEvent *event) assign_material(ob, ma, ob->totcol + 1, BKE_MAT_ASSIGN_USERPREF); DAG_ids_flush_update(bmain, 0); - WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, CTX_wm_view3d(C)); + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, CTX_wm_view3d(C)); WM_event_add_notifier(C, NC_MATERIAL | ND_SHADING, ma); return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index ef0542130ea..25cc273d5dc 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -553,16 +553,16 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree if (md->type == eModifierType_Lattice) { outliner_add_element(soops, &te->subtree, ((LatticeModifierData *) md)->object, te, TSE_LINKED_OB, 0); - } + } else if (md->type == eModifierType_Curve) { outliner_add_element(soops, &te->subtree, ((CurveModifierData *) md)->object, te, TSE_LINKED_OB, 0); - } + } else if (md->type == eModifierType_Armature) { outliner_add_element(soops, &te->subtree, ((ArmatureModifierData *) md)->object, te, TSE_LINKED_OB, 0); - } + } else if (md->type == eModifierType_Hook) { outliner_add_element(soops, &te->subtree, ((HookModifierData *) md)->object, te, TSE_LINKED_OB, 0); - } + } else if (md->type == eModifierType_ParticleSystem) { TreeElement *ten; ParticleSystem *psys = ((ParticleSystemModifierData *) md)->psys; @@ -590,7 +590,7 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree /* duplicated group */ if (ob->dup_group) - outliner_add_element(soops, &te->subtree, ob->dup_group, te, 0, 0); + outliner_add_element(soops, &te->subtree, ob->dup_group, te, 0, 0); } // can be inlined if necessary diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 7bec530fae9..adfc3d07af2 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -355,7 +355,7 @@ static void draw_seq_handle(View2D *v2d, Sequence *seq, const float handsize_cla y2 = seq->machine + SEQ_STRIP_OFSTOP; /* set up co-ordinates/dimensions for either left or right handle */ - if (direction == SEQ_LEFTHANDLE) { + if (direction == SEQ_LEFTHANDLE) { rx1 = x1; rx2 = x1 + handsize_clamped * 0.75f; @@ -415,7 +415,7 @@ static void draw_seq_handle(View2D *v2d, Sequence *seq, const float handsize_cla y1 = y2 + 0.05f; } UI_view2d_text_cache_add(v2d, x1, y1, numstr, col); - } + } } static void draw_seq_extensions(Scene *scene, ARegion *ar, Sequence *seq) diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 82d08be4da2..9de91322714 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -680,7 +680,7 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, int cutframe) seqn = BKE_sequence_dupli_recursive(scene, NULL, seq, SEQ_DUPE_UNIQUE_NAME | SEQ_DUPE_ANIM); } - if (seqn) { + if (seqn) { seqn->flag |= SELECT; /* Second Strip! */ @@ -701,7 +701,7 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, int cutframe) seqn->anim_startofs += cutframe - ts.start; seqn->anim_endofs = ts.anim_endofs; seqn->endstill = ts.endstill; - } + } /* strips with extended stillframes after */ else if (((seqn->start + seqn->len) < cutframe) && (seqn->endstill)) { @@ -773,7 +773,7 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence *seq, int cutframe) seqn = BKE_sequence_dupli_recursive(scene, NULL, seq, SEQ_DUPE_UNIQUE_NAME | SEQ_DUPE_ANIM); } - if (seqn) { + if (seqn) { seqn->flag |= SELECT; /* Second Strip! */ @@ -791,7 +791,7 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence *seq, int cutframe) seqn->startofs = cutframe - ts.start; seqn->endofs = ts.endofs; seqn->endstill = ts.endstill; - } + } /* strips with extended stillframes after */ else if (((seqn->start + seqn->len) < cutframe) && (seqn->endstill)) { diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index be33b782fdf..b4d6662b68c 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -353,7 +353,7 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event) } else { /* deselect_markers(0, 0); */ /* XXX, in 2.4x, seq selection used to deselect all, need to re-thnik this for 2.5 */ - marker->flag |= SELECT; + marker->flag |= SELECT; } } diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index a68524fcdd6..2296b27916e 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -1139,7 +1139,7 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back) barheight = (ltexth > 0) ? (st->viewlines * pix_available) / ltexth : 0; pix_bardiff = 0; if (barheight < 20) { - pix_bardiff = 20 - barheight; /* take into account the now non-linear sizing of the bar */ + pix_bardiff = 20 - barheight; /* take into account the now non-linear sizing of the bar */ barheight = 20; } barstart = (ltexth > 0) ? ((pix_available - pix_bardiff) * st->top) / ltexth : 0; @@ -1166,9 +1166,9 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back) /* the scrollbar is non-linear sized */ if (pix_bardiff > 0) { /* the start of the highlight is in the current viewport */ - if (ltexth && st->viewlines && lhlstart >= st->top && lhlstart <= st->top + st->viewlines) { + if (ltexth && st->viewlines && lhlstart >= st->top && lhlstart <= st->top + st->viewlines) { /* speed the progresion of the start of the highlight through the scrollbar */ - hlstart = ( ( (pix_available - pix_bardiff) * lhlstart) / ltexth) + (pix_bardiff * (lhlstart - st->top) / st->viewlines); + hlstart = ( ( (pix_available - pix_bardiff) * lhlstart) / ltexth) + (pix_bardiff * (lhlstart - st->top) / st->viewlines); } else if (lhlstart > st->top + st->viewlines && hlstart < barstart + barheight && hlstart > barstart) { /* push hl start down */ @@ -1179,35 +1179,35 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back) hlstart = barstart; } - if (hlend <= hlstart) { + if (hlend <= hlstart) { hlend = hlstart + 2; } /* the end of the highlight is in the current viewport */ - if (ltexth && st->viewlines && lhlend >= st->top && lhlend <= st->top + st->viewlines) { + if (ltexth && st->viewlines && lhlend >= st->top && lhlend <= st->top + st->viewlines) { /* speed the progresion of the end of the highlight through the scrollbar */ hlend = (((pix_available - pix_bardiff) * lhlend) / ltexth) + (pix_bardiff * (lhlend - st->top) / st->viewlines); } else if (lhlend < st->top && hlend >= barstart - 2 && hlend < barstart + barheight) { /* push hl end up */ hlend = barstart; - } + } else if (lhlend > st->top + st->viewlines && lhlstart < st->top + st->viewlines && hlend < barstart + barheight) { /* fill out end */ hlend = barstart + barheight; } - if (hlend <= hlstart) { + if (hlend <= hlstart) { hlstart = hlend - 2; - } - } + } + } } else { hlstart = 0; hlend = 0; } - if (hlend - hlstart < 2) { + if (hlend - hlstart < 2) { hlend = hlstart + 2; } @@ -1702,7 +1702,7 @@ static void draw_brackets(SpaceText *st, ARegion *ar) if (!endl || endc == -1) return; - UI_ThemeColor(TH_HILITE); + UI_ThemeColor(TH_HILITE); x = st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET; y = ar->winy - st->lheight; diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index b2fb16ff7fe..f9911fdddbf 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -1948,7 +1948,7 @@ static int text_move_cursor(bContext *C, int type, int select) txt_move_left(text, select); break; - case NEXT_CHAR: + case NEXT_CHAR: txt_move_right(text, select); break; @@ -2669,7 +2669,7 @@ static void text_cursor_set_apply(bContext *C, wmOperator *op, wmEvent *event) text_update_cursor_moved(C); WM_event_add_notifier(C, NC_TEXT | ND_CURSOR, st->text); - } + } else if (!st->wordwrap && (event->mval[0] < 0 || event->mval[0] > ar->winx)) { if (event->mval[0] > ar->winx) st->left++; else if (event->mval[0] < 0 && st->left > 0) st->left--; @@ -2679,7 +2679,7 @@ static void text_cursor_set_apply(bContext *C, wmOperator *op, wmEvent *event) text_update_cursor_moved(C); WM_event_add_notifier(C, NC_TEXT | ND_CURSOR, st->text); // XXX PIL_sleep_ms(10); - } + } else { text_cursor_set_to_pos(st, ar, event->mval[0], event->mval[1], 1); @@ -2688,7 +2688,7 @@ static void text_cursor_set_apply(bContext *C, wmOperator *op, wmEvent *event) ssel->old[0] = event->mval[0]; ssel->old[1] = event->mval[1]; - } + } } static void text_cursor_set_exit(bContext *C, wmOperator *op) diff --git a/source/blender/editors/space_view3d/drawanimviz.c b/source/blender/editors/space_view3d/drawanimviz.c index 135e9b891bb..c32d37a25fc 100644 --- a/source/blender/editors/space_view3d/drawanimviz.c +++ b/source/blender/editors/space_view3d/drawanimviz.c @@ -178,7 +178,7 @@ void draw_motion_path_instance(Scene *scene, intensity = 0.99f; } UI_ThemeColorBlendShade(TH_CFRAME, TH_BACK, intensity, 10); - } + } /* draw a vertex with this color */ glVertex3fv(mpv->co); diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index 31df13343ce..8f504230065 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -100,7 +100,7 @@ static void set_pchan_colorset(Object *ob, bPoseChannel *pchan) } /* only try to set custom color if enabled for armature */ - if (arm->flag & ARM_COL_CUSTOM) { + if (arm->flag & ARM_COL_CUSTOM) { /* currently, a bone can only use a custom color set if it's group (if it has one), * has been set to use one */ @@ -969,7 +969,7 @@ static void draw_sphere_bone(const short dt, int armflag, int boneflag, short co glTranslatef(0.0f, 0.0f, head); gluSphere(qobj, fac1 * head + (1.0f - fac1) * tail, 16, 10); } - else { + else { /* 1 sphere in center */ glTranslatef(0.0f, 0.0f, (head + length - tail) / 2.0f); gluSphere(qobj, fac1 * head + (1.0f - fac1) * tail, 16, 10); @@ -1040,7 +1040,7 @@ static void draw_line_bone(int armflag, int boneflag, short constflag, unsigned glEnd(); /* tip */ - if (G.f & G_PICKSEL) { + if (G.f & G_PICKSEL) { /* no bitmap in selection mode, crashes 3d cards... */ glLoadName(id | BONESEL_TIP); glBegin(GL_POINTS); @@ -1189,7 +1189,7 @@ static void draw_b_bone(const short dt, int armflag, int boneflag, short constfl glDisable(GL_COLOR_MATERIAL); glDisable(GL_LIGHTING); } - else { + else { /* wire */ if (armflag & ARM_POSEMODE) { if (constflag) { @@ -1205,9 +1205,9 @@ static void draw_b_bone(const short dt, int armflag, int boneflag, short constfl /* restore colors */ set_pchan_glColor(PCHAN_COLOR_NORMAL, boneflag, constflag); } - } + } - draw_b_bone_boxes(OB_WIRE, pchan, xwidth, length, zwidth); + draw_b_bone_boxes(OB_WIRE, pchan, xwidth, length, zwidth); } } @@ -1333,7 +1333,7 @@ static void draw_bone(const short dt, int armflag, int boneflag, short constflag else if (armflag & ARM_POSEMODE) { if (constflag) { /* draw constraint colors */ - if (set_pchan_glColor(PCHAN_COLOR_CONSTS, boneflag, constflag)) { + if (set_pchan_glColor(PCHAN_COLOR_CONSTS, boneflag, constflag)) { glEnable(GL_BLEND); draw_bone_solid_octahedral(); @@ -1344,10 +1344,10 @@ static void draw_bone(const short dt, int armflag, int boneflag, short constflag /* restore colors */ set_pchan_glColor(PCHAN_COLOR_NORMAL, boneflag, constflag); } - } + } draw_bone_octahedral(); } - else { + else { /* solid */ if (armflag & ARM_POSEMODE) set_pchan_glColor(PCHAN_COLOR_SOLID, boneflag, constflag); @@ -1741,7 +1741,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, if (use_custom && pchan->custom_tx) { glMultMatrixf(pchan->custom_tx->pose_mat); - } + } else { glMultMatrixf(pchan->pose_mat); } @@ -1803,7 +1803,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, */ if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE) == 0 && (draw_wire == 0)) { /* object tag, for bordersel optim */ - glLoadName(index & 0xFFFF); + glLoadName(index & 0xFFFF); index = -1; } } @@ -1830,7 +1830,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, if (pchan->custom_tx) { glMultMatrixf(pchan->custom_tx->pose_mat); - } + } else { glMultMatrixf(pchan->pose_mat); } @@ -1869,7 +1869,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, /* stick or wire bones have not been drawn yet so don't clear object selection in this case */ if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE) == 0 && draw_wire) { /* object tag, for bordersel optim */ - glLoadName(index & 0xFFFF); + glLoadName(index & 0xFFFF); index = -1; } } @@ -1938,7 +1938,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, glLoadName(index & 0xFFFF); pchan_draw_IK_root_lines(pchan, !(do_dashed & 2)); } - } + } } } @@ -1992,7 +1992,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, /* restore things */ if (!ELEM(arm->drawtype, ARM_WIRE, ARM_LINE) && (dt > OB_WIRE) && (arm->flag & ARM_POSEMODE)) bglPolygonOffset(rv3d->dist, 0.0); - } + } /* restore */ glDisable(GL_CULL_FACE); @@ -2045,7 +2045,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, if (arm->flag & ARM_DRAWNAMES) { mid_v3_v3v3(vec, pchan->pose_head, pchan->pose_tail); view3d_cached_text_draw_add(vec, pchan->name, 10, 0, col); - } + } /* Draw additional axes on the bone tail */ if ((arm->flag & ARM_DRAWAXES) && (arm->flag & ARM_POSEMODE)) { @@ -2075,7 +2075,7 @@ static void get_matrix_editbone(EditBone *eBone, float bmat[][4]) float mat[3][3]; /* Compose the parent transforms (i.e. their translations) */ - sub_v3_v3v3(delta, eBone->tail, eBone->head); + sub_v3_v3v3(delta, eBone->tail, eBone->head); eBone->length = (float)sqrt(delta[0] * delta[0] + delta[1] * delta[1] + delta[2] * delta[2]); @@ -2258,7 +2258,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, const short dt) mid_v3_v3v3(vec, eBone->head, eBone->tail); glRasterPos3fv(vec); view3d_cached_text_draw_add(vec, eBone->name, 10, 0, col); - } + } /* Draw additional axes */ if (arm->flag & ARM_DRAWAXES) { glPushMatrix(); @@ -2643,7 +2643,7 @@ int draw_armature(Scene *scene, View3D *v3d, ARegion *ar, Base *base, } draw_pose_paths(scene, v3d, ar, ob); } - } + } } draw_pose_bones(scene, v3d, ar, base, dt, ob_wire_col, (dflag & DRAW_CONSTCOLOR), is_outline); arm->flag &= ~ARM_POSEMODE; diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index cded7bbbdfc..c603605aa0e 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -382,7 +382,7 @@ static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, O glEnable(GL_CULL_FACE); glCullFace(GL_BACK); } - else { + else { glDisable(GL_CULL_FACE); } glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, (me->flag & ME_TWOSIDED) ? GL_TRUE : GL_FALSE); @@ -406,7 +406,7 @@ static void draw_textured_end(void) * - zr */ glPushMatrix(); - glLoadIdentity(); + glLoadIdentity(); GPU_default_lights(); glPopMatrix(); } diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 236cbb86724..6818c78bbd6 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -185,7 +185,7 @@ int ED_view3d_context_user_region(bContext *C, View3D **v3d_r, ARegion **ar_r) ar_unlock_user = ar; break; } - } + } } } @@ -719,7 +719,7 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) case NC_BRUSH: if (wmn->action == NA_EDITED) ED_region_tag_redraw_overlay(ar); - break; + break; case NC_MATERIAL: switch (wmn->data) { case ND_SHADING_DRAW: @@ -748,12 +748,12 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) break; } break; - case NC_IMAGE: + case NC_IMAGE: /* this could be more fine grained checks if we had * more context than just the region */ ED_region_tag_redraw(ar); break; - case NC_TEXTURE: + case NC_TEXTURE: /* same as above */ ED_region_tag_redraw(ar); break; @@ -882,7 +882,7 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn) case ND_KEYFRAME: if (wmn->action == NA_EDITED) ED_region_tag_redraw(ar); - break; + break; } break; case NC_SCENE: diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 8e1b0716136..062400ef79e 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -523,7 +523,7 @@ static void drawfloor(Scene *scene, View3D *v3d, const char **grid_unit) GPU_print_error("sdsd"); } - /* draw the Z axis line */ + /* draw the Z axis line */ /* check for the 'show Z axis' preference */ if (v3d->gridflag & (V3D_SHOW_X | V3D_SHOW_Y | V3D_SHOW_Z)) { int axis; @@ -1115,7 +1115,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) } /* edge */ - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); setlinestyle(0); @@ -1429,7 +1429,7 @@ ImBuf *view3d_read_backbuf(ViewContext *vc, short xmin, short ymin, short xmax, (ymaxc - yminc + 1), GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect); - glReadBuffer(GL_BACK); + glReadBuffer(GL_BACK); if (ENDIAN_ORDER == B_ENDIAN) IMB_convert_rgba_to_abgr(ibuf); @@ -1471,7 +1471,7 @@ unsigned int view3d_sample_backbuf_rect(ViewContext *vc, const int mval[2], int int a, b, rc, nr, amount, dirvec[4][2]; int distance = 0; unsigned int index = 0; - short indexok = 0; + short indexok = 0; amount = (size - 1) / 2; @@ -2024,7 +2024,7 @@ static void draw_dupli_objects(Scene *scene, ARegion *ar, View3D *v3d, Base *bas void view3d_update_depths_rect(ARegion *ar, ViewDepths *d, rcti *rect) { - int x, y, w, h; + int x, y, w, h; rcti r; /* clamp rect by area */ @@ -2122,7 +2122,7 @@ float view3d_depth_near(ViewDepths *d) int i = (int)d->w * (int)d->h; /* cast to avoid short overflow */ /* far is both the starting 'far' value - * and the closest value found. */ + * and the closest value found. */ while (i--) { depth = *depths++; if ((depth < far) && (depth > near)) { @@ -2815,7 +2815,7 @@ static void draw_viewport_fps(Scene *scene, ARegion *ar) if (fps + 0.5f < (float)(FPS)) { UI_ThemeColor(TH_REDALERT); BLI_snprintf(printable, sizeof(printable), "fps: %.2f", fps); - } + } else { UI_ThemeColor(TH_TEXT_HI); BLI_snprintf(printable, sizeof(printable), "fps: %i", (int)(fps + 0.5f)); diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 96264081f10..21717cdcf82 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -921,7 +921,7 @@ static int viewrotate_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_FINISHED; } - else { + else { /* add temp handler */ WM_event_add_modal_handler(C, op); @@ -1354,7 +1354,7 @@ static int ndof_all_invoke(bContext *C, wmOperator *op, wmEvent *event) ED_view3d_camera_lock_sync(v3d, rv3d); ED_region_tag_redraw(CTX_wm_region(C)); - viewops_data_free(C, op); + viewops_data_free(C, op); return OPERATOR_FINISHED; } } @@ -1501,7 +1501,7 @@ static int viewmove_invoke(bContext *C, wmOperator *op, wmEvent *event) viewmove_apply(vod, event->prevx, event->prevy); ED_view3d_depth_tag_update(vod->rv3d); - viewops_data_free(C, op); + viewops_data_free(C, op); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index b2ae63df662..d8fcc7e12e7 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -167,7 +167,7 @@ static int view3d_layers_exec(bContext *C, wmOperator *op) } else { v3d->lay |= (1 << 20) - 1; - } + } } else { int bit; @@ -452,7 +452,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) const float dpi_fac = UI_DPI_FAC; int is_paint = 0; - RNA_pointer_create(&screen->id, &RNA_SpaceView3D, v3d, &v3dptr); + RNA_pointer_create(&screen->id, &RNA_SpaceView3D, v3d, &v3dptr); RNA_pointer_create(&scene->id, &RNA_ToolSettings, ts, &toolsptr); RNA_pointer_create(&scene->id, &RNA_Scene, scene, &sceneptr); diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index c30adf844a8..37f682b4827 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -165,7 +165,7 @@ void view3d_get_transformation(const ARegion *ar, RegionView3D *rv3d, Object *ob mats->viewport[0] = ar->winrct.xmin; mats->viewport[1] = ar->winrct.ymin; mats->viewport[2] = ar->winx; - mats->viewport[3] = ar->winy; + mats->viewport[3] = ar->winy; } /* ********************** view3d_select: selection manipulations ********************* */ diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index e55e97e501b..9dd38003656 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -349,7 +349,7 @@ static void make_trans_verts(Object *obedit, float min[3], float max[3], int mod tv->flag = 1; tv++; tottrans++; - } + } if ((mode & TM_ALL_JOINTS) && (tipsel)) { copy_v3_v3(tv->oldloc, ebo->tail); diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index b40e880591a..e3ce163dbc1 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -182,7 +182,7 @@ static uiBlock *tool_search_menu(bContext *C, ARegion *ar, void *arg_listbase) uiButSetSearchFunc(but, operator_search_cb, arg_listbase, operator_call_cb, NULL); uiBoundsBlock(block, 6); - uiBlockSetDirection(block, UI_DOWN); + uiBlockSetDirection(block, UI_DOWN); uiEndBlock(C, block); event = *(win->eventstate); /* XXX huh huh? make api call */ diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index de8cbd856e8..511f2f37de3 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -786,7 +786,7 @@ void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d) { if (rv3d->persp == RV3D_CAMOB) { /* obs/camera */ if (v3d->camera) { - BKE_object_where_is_calc(scene, v3d->camera); + BKE_object_where_is_calc(scene, v3d->camera); obmat_to_viewmat(v3d, rv3d, v3d->camera, 0); } else { @@ -919,7 +919,7 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b free_object_duplilist(lb); } code++; - } + } } } v3d->xray = FALSE; /* restore */ @@ -1192,7 +1192,7 @@ static int view3d_localview_exit(Main *bmain, Scene *scene, ScrArea *sa) DAG_on_visible_update(bmain, FALSE); return TRUE; - } + } else { return FALSE; } diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 1ce99534181..1a218c1b49d 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -277,7 +277,7 @@ void projectIntView(TransInfo *t, const float vec[3], int adr[2]) //vec[0] = vec[0]/((t->scene->r.frs_sec / t->scene->r.frs_sec_base)); /* same as below */ UI_view2d_to_region_no_clip((View2D *)t->view, vec[0], vec[1], out, out + 1); - } + } else #endif { @@ -3383,7 +3383,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short /* this function works on end result */ protectedAxisAngleBits(td->protectflag, td->ext->rotAxis, td->ext->rotAngle, td->ext->irotAxis, td->ext->irotAngle); } - else { + else { float eulmat[3][3]; mul_m3_m3m3(totmat, mat, td->ext->r_mtx); @@ -4811,7 +4811,7 @@ static BMLoop *get_next_loop(BMVert *v, BMLoop *l, } l = l->radial_next; - } while (l != firstl); + } while (l != firstl); if (i) mul_v3_fl(a, 1.0f / (float)i); @@ -6108,7 +6108,7 @@ static short getAnimEdit_DrawTime(TransInfo *t) SpaceIpo *sipo = (SpaceIpo *)t->sa->spacedata.first; drawtime = (sipo->flag & SIPO_DRAWTIME) ? 1 : 0; - } + } else { drawtime = 0; } diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 2e9d1ee670f..0c9a29ce666 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -332,7 +332,7 @@ static void createTransEdge(TransInfo *t) invert_m3_m3(smtx, mtx); BM_ITER_MESH (eed, &iter, em->bm, BM_EDGES_OF_MESH) { - if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) && (BM_elem_flag_test(eed, BM_ELEM_SELECT) || propmode)) { + if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) && (BM_elem_flag_test(eed, BM_ELEM_SELECT) || propmode)) { float *bweight = CustomData_bmesh_get(&em->bm->edata, eed->head.data, CD_BWEIGHT); float *crease = CustomData_bmesh_get(&em->bm->edata, eed->head.data, CD_CREASE); @@ -850,7 +850,7 @@ static short pose_grab_with_ik_add(bPoseChannel *pchan) con = add_pose_constraint(NULL, pchan, "TempConstraint", CONSTRAINT_TYPE_KINEMATIC); pchan->constflag |= (PCHAN_HAS_IK | PCHAN_HAS_TARGET); /* for draw, but also for detecting while pose solving */ data = con->data; - if (targetless) { + if (targetless) { /* if exists, use values from last targetless (but disabled) IK-constraint as base */ *data = *targetless; } @@ -3416,14 +3416,14 @@ static void bezt_to_transdata(TransData *td, TransData2D *td2d, AnimData *adt, B if (td->flag & TD_MOVEHANDLE1) { td2d->h1 = bezt->vec[0]; copy_v2_v2(td2d->ih1, td2d->h1); - } - else + } + else td2d->h1 = NULL; if (td->flag & TD_MOVEHANDLE2) { td2d->h2 = bezt->vec[2]; copy_v2_v2(td2d->ih2, td2d->h2); - } + } else td2d->h2 = NULL; @@ -3527,7 +3527,7 @@ static void createTransGraphEditData(bContext *C, TransInfo *t) if (sel1) count++; if (sel3) count++; } - } + } else if (sipo->around == V3D_LOCAL) { /* for local-pivot we only need to count the number of selected handles only, so that centerpoints don't * don't get moved wrong @@ -3622,7 +3622,7 @@ static void createTransGraphEditData(bContext *C, TransInfo *t) if (sel1) { hdata = initTransDataCurveHandles(td, bezt); bezt_to_transdata(td++, td2d++, adt, bezt, 0, 1, 1, intvals, mtx, smtx); - } + } else { /* h1= 0; */ /* UNUSED */ } @@ -3631,7 +3631,7 @@ static void createTransGraphEditData(bContext *C, TransInfo *t) if (hdata == NULL) hdata = initTransDataCurveHandles(td, bezt); bezt_to_transdata(td++, td2d++, adt, bezt, 2, 1, 1, intvals, mtx, smtx); - } + } else { /* h2= 0; */ /* UNUSED */ } diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 39d9b97ef65..01586d1f4a0 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -705,7 +705,7 @@ static void recalcData_view3d(TransInfo *t) BKE_nurb_handles_calc(nu); /* Cant do testhandlesNurb here, it messes up the h1 and h2 flags */ nu = nu->next; } - } + } else { /* Normal updating */ while (nu) { diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 845d5b73f0c..70e4d4cd027 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -142,7 +142,7 @@ TransformOrientation *createObjectSpace(bContext *C, ReportList *UNUSED(reports) strncpy(name, ob->id.name + 2, MAX_ID_NAME - 2); } - return addMatrixSpace(C, mat, name, overwrite); + return addMatrixSpace(C, mat, name, overwrite); } TransformOrientation *createBoneSpace(bContext *C, ReportList *reports, char *name, int overwrite) diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 94b8abb8850..baca4629883 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -723,14 +723,14 @@ static float RotationBetween(TransInfo *t, float p1[3], float p2[3]) { float angle, start[3], end[3], center[3]; - copy_v3_v3(center, t->center); + copy_v3_v3(center, t->center); if (t->flag & (T_EDIT | T_POSE)) { Object *ob = t->obedit ? t->obedit : t->poseobj; mul_m4_v3(ob->obmat, center); } sub_v3_v3v3(start, p1, center); - sub_v3_v3v3(end, p2, center); + sub_v3_v3v3(end, p2, center); // Angle around a constraint axis (error prone, will need debug) if (t->con.applyRot != NULL && (t->con.mode & CON_APPLY)) { @@ -779,7 +779,7 @@ static float ResizeBetween(TransInfo *t, float p1[3], float p2[3]) { float d1[3], d2[3], center[3], len_d1; - copy_v3_v3(center, t->center); + copy_v3_v3(center, t->center); if (t->flag & (T_EDIT | T_POSE)) { Object *ob = t->obedit ? t->obedit : t->poseobj; mul_m4_v3(ob->obmat, center); @@ -846,7 +846,7 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec)) p2 = NULL; p1->flag = 1; - /* if peeling objects, take the first and last from each object */ + /* if peeling objects, take the first and last from each object */ if (t->settings->snap_flag & SCE_SNAP_PEEL_OBJECT) { DepthPeel *peel; for (peel = p1->next; peel; peel = peel->next) { @@ -982,7 +982,7 @@ static void TargetSnapCenter(TransInfo *t) { /* Only need to calculate once */ if ((t->tsnap.status & TARGET_INIT) == 0) { - copy_v3_v3(t->tsnap.snapTarget, t->center); + copy_v3_v3(t->tsnap.snapTarget, t->center); if (t->flag & (T_EDIT | T_POSE)) { Object *ob = t->obedit ? t->obedit : t->poseobj; @@ -991,7 +991,7 @@ static void TargetSnapCenter(TransInfo *t) TargetSnapOffset(t, NULL); - t->tsnap.status |= TARGET_INIT; + t->tsnap.status |= TARGET_INIT; } } @@ -1027,7 +1027,7 @@ static void TargetSnapActive(TransInfo *t) t->tsnap.target = SCE_SNAP_TARGET_MEDIAN; t->tsnap.targetSnap = TargetSnapMedian; TargetSnapMedian(t); - } + } } } @@ -1055,7 +1055,7 @@ static void TargetSnapMedian(TransInfo *t) TargetSnapOffset(t, NULL); - t->tsnap.status |= TARGET_INIT; + t->tsnap.status |= TARGET_INIT; } } @@ -1166,7 +1166,7 @@ static int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], fl mul_m4_v3(obmat, location); - new_depth = len_v3v3(location, ray_start); + new_depth = len_v3v3(location, ray_start); ED_view3d_project_int(ar, location, screen_loc); new_dist = abs(screen_loc[0] - (int)mval[0]) + abs(screen_loc[1] - (int)mval[1]); @@ -1182,7 +1182,7 @@ static int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], fl normalize_v3(no); *dist = new_dist; - } + } } return retval; @@ -1234,7 +1234,7 @@ static int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], sh mul_m4_v3(obmat, location); - new_depth = len_v3v3(location, ray_start); + new_depth = len_v3v3(location, ray_start); if (ED_view3d_project_int_global(ar, location, screen_loc, V3D_PROJ_TEST_NOP) == V3D_PROJ_RET_OK) { new_dist = abs(screen_loc[0] - (int)mval[0]) + abs(screen_loc[1] - (int)mval[1]); @@ -1259,17 +1259,17 @@ static int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], sh mul = dot_v3v3(vec, edge_loc) / dot_v3v3(edge_loc, edge_loc); if (r_no) { - normal_short_to_float_v3(n1, v1no); + normal_short_to_float_v3(n1, v1no); normal_short_to_float_v3(n2, v2no); interp_v3_v3v3(r_no, n2, n1, mul); mul_m3_v3(timat, r_no); normalize_v3(r_no); - } + } copy_v3_v3(r_loc, location); *r_dist = new_dist; - } + } } } @@ -1318,7 +1318,7 @@ static int snapVertex(ARegion *ar, float vco[3], short vno[3], float obmat[][4], } *r_dist = new_dist; - } + } } return retval; @@ -1425,7 +1425,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh switch (snap_mode) { case SCE_SNAP_MODE_FACE: - { + { #ifdef USE_BVH_FACE_SNAP // Added for durian BVHTreeRayHit hit; BVHTreeFromMesh treeData; @@ -1858,7 +1858,7 @@ static int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], mul_m4_v3(obmat, location); - new_depth = len_v3v3(location, ray_start); + new_depth = len_v3v3(location, ray_start); mul_m3_v3(timat, normal); normalize_v3(normal); @@ -1893,7 +1893,7 @@ static int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], normalize_v3(normal); addDepthPeel(depth_peels, new_depth, location, normal, ob); - } + } } } } diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c index 9a3b0476205..b645b983ae5 100644 --- a/source/blender/editors/util/editmode_undo.c +++ b/source/blender/editors/util/editmode_undo.c @@ -104,7 +104,7 @@ static UndoElem *curundo = NULL; static void undo_restore(UndoElem *undo, void *editdata, void *obdata) { if (undo) { - undo->to_editmode(undo->undodata, editdata, obdata); + undo->to_editmode(undo->undodata, editdata, obdata); } } diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index 5eafc3e65a9..1753a564a3c 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -505,7 +505,7 @@ static int undo_history_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even MEM_freeN(item); uiPupMenuEnd(C, pup); - } + } } return OPERATOR_CANCELLED; diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index 7aaae404d15..9c2c300c530 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -534,7 +534,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) { tf = CustomData_bmesh_get(&bm->pdata, efa->head.data, CD_MTEXPOLY); - if (uvedit_face_visible_test(scene, ima, efa, tf)) { + if (uvedit_face_visible_test(scene, ima, efa, tf)) { BM_elem_flag_enable(efa, BM_ELEM_TAG); } else { @@ -818,7 +818,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) bglVertex2fv(luv->uv); } } - bglEnd(); + bglEnd(); } glPointSize(1.0); diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index acc69309a8c..0d7a31eb8da 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -1953,7 +1953,7 @@ static int mouse_select(bContext *C, const float co[2], int extend, int loop) } flush = 1; - } + } } } else { diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index f017394356e..83817e758af 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -1566,7 +1566,7 @@ static void p_vert_harmonic_insert(PVert *v) e = v->edge; do { - npoints++; + npoints++; e = p_wheel_edge_next(e); } while (e && (e != v->edge)); @@ -4400,7 +4400,7 @@ void param_pack(ParamHandle *handle, float margin) if (margin > 0.0f) area += sqrt(box->w * box->h); - } + } if (margin > 0.0f) { /* multiply the margin by the area to give predictable results not dependent on UV scale, diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 19a1c4339ad..926b6cfe59e 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -1436,8 +1436,8 @@ static void uv_map_mirror(BMEditMesh *em, BMFace *efa, MTexPoly *UNUSED(tf)) if (i != mi) { dx = uvs[mi][0] - uvs[i][0]; if (dx > 0.5f) uvs[i][0] += 1.0f; - } - } + } + } BLI_array_fixedstack_free(uvs); } diff --git a/source/blender/gpu/intern/gpu_codegen.h b/source/blender/gpu/intern/gpu_codegen.h index 3010937a2f3..42e87532e26 100644 --- a/source/blender/gpu/intern/gpu_codegen.h +++ b/source/blender/gpu/intern/gpu_codegen.h @@ -99,7 +99,7 @@ struct GPUNodeLink { void *ptr1, *ptr2; int dynamic; - int dynamictype; + int dynamictype; int type; int users; diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index ac05f1e8309..0796a6c2ee0 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -1216,7 +1216,7 @@ static void gpu_material_to_fixed(GPUMaterialFixed *smat, const Material *bmat, if (gamma) { linearrgb_to_srgb_v3_v3(smat->diff, smat->diff); linearrgb_to_srgb_v3_v3(smat->spec, smat->spec); - } + } } } @@ -1627,7 +1627,7 @@ int GPU_scene_object_lights(Scene *scene, Object *ob, int lay, float viewmat[][4 glLightfv(GL_LIGHT0+count, GL_SPECULAR, energy); glEnable(GL_LIGHT0+count); - glPopMatrix(); + glPopMatrix(); count++; if (count==8) diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index e5f08d38ce8..e6f40c4f1bf 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -1881,7 +1881,7 @@ GPUShaderExport *GPU_shader_export(struct Scene *scene, struct Material *ma) GPUBuiltin gputype; GPUDynamicType dynamictype; GPUDataType datatype; - } builtins[] = { + } builtins[] = { { GPU_VIEW_MATRIX, GPU_DYNAMIC_OBJECT_VIEWMAT, GPU_DATA_16F }, { GPU_INVERSE_VIEW_MATRIX, GPU_DYNAMIC_OBJECT_VIEWIMAT, GPU_DATA_16F }, { GPU_OBJECT_MATRIX, GPU_DYNAMIC_OBJECT_MAT, GPU_DATA_16F }, diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl index 716ffc2b254..5713c5e88a2 100644 --- a/source/blender/gpu/shaders/gpu_shader_material.glsl +++ b/source/blender/gpu/shaders/gpu_shader_material.glsl @@ -1894,7 +1894,7 @@ void test_shadowbuf_vsm(vec3 rco, sampler2D shadowmap, mat4 shadowpersmat, float } else { result = 1.0; - } + } } } diff --git a/source/blender/ikplugin/BIK_api.h b/source/blender/ikplugin/BIK_api.h index 4fc273bd435..95b1dafd129 100644 --- a/source/blender/ikplugin/BIK_api.h +++ b/source/blender/ikplugin/BIK_api.h @@ -58,7 +58,7 @@ struct BIK_ParamValue { float f[8]; int i[8]; char s[32]; - } value; + } value; }; typedef struct BIK_ParamValue BIK_ParamValue; diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h index 76c247b2195..061f045e502 100644 --- a/source/blender/imbuf/IMB_imbuf_types.h +++ b/source/blender/imbuf/IMB_imbuf_types.h @@ -93,7 +93,7 @@ typedef struct ImBuf { /* tiled pixel storage */ int tilex, tiley; int xtiles, ytiles; - unsigned int **tiles; + unsigned int **tiles; /* zbuffer */ int *zbuf; /* z buffer data, original zbuffer */ diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c index 4aeba9af89d..5b64416c309 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -1233,7 +1233,7 @@ static ImBuf *anim_getnew(struct anim *anim) if (anim->curtype != 0) return (NULL); - anim->curtype = imb_get_anim_type(anim->name); + anim->curtype = imb_get_anim_type(anim->name); switch (anim->curtype) { case ANIM_SEQUENCE: diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c index df12f0b703e..32733668052 100644 --- a/source/blender/imbuf/intern/bmp.c +++ b/source/blender/imbuf/intern/bmp.c @@ -184,7 +184,7 @@ struct ImBuf *imb_bmp_decode(unsigned char *mem, size_t size, int flags, char co rect += 4; bmp += 3; } /* for 24-bit images, rows are padded to multiples of 4 */ - bmp += x % 4; + bmp += x % 4; } } else if (depth == 32) { diff --git a/source/blender/imbuf/intern/cineon/cineonlib.c b/source/blender/imbuf/intern/cineon/cineonlib.c index a9001303679..894e3a93b4b 100644 --- a/source/blender/imbuf/intern/cineon/cineonlib.c +++ b/source/blender/imbuf/intern/cineon/cineonlib.c @@ -215,7 +215,7 @@ dumpCineonFormatInfo(CineonFormatInformation* formatInfo) { default: d_printf(" (unknown)\n"); break; } d_printf("Packing %d,", formatInfo->packing); - if (formatInfo->packing & 0x80) { + if (formatInfo->packing & 0x80) { d_printf(" multi pixel,"); } else { @@ -232,14 +232,14 @@ dumpCineonFormatInfo(CineonFormatInformation* formatInfo) { default: d_printf(" (unknown)\n"); break; } d_printf("Sign %d,", formatInfo->signage); - if (formatInfo->signage) { + if (formatInfo->signage) { d_printf(" signed\n"); } else { d_printf(" unsigned\n"); } d_printf("Sense %d,", formatInfo->signage); - if (formatInfo->signage) { + if (formatInfo->signage) { d_printf(" negative\n"); } else { diff --git a/source/blender/imbuf/intern/cineon/dpxlib.c b/source/blender/imbuf/intern/cineon/dpxlib.c index c1138225e93..0a067af2cb9 100644 --- a/source/blender/imbuf/intern/cineon/dpxlib.c +++ b/source/blender/imbuf/intern/cineon/dpxlib.c @@ -407,7 +407,7 @@ intern_dpxOpen(int mode, const char* bytestuff, int bufsize) { if (mode == LFREALFILE) { filename = bytestuff; dpx->file = BLI_fopen(filename, "rb"); - if (dpx->file == 0) { + if (dpx->file == 0) { if (verbose) d_printf("Failed to open file \"%s\".\n", filename); dpxClose(dpx); return 0; diff --git a/source/blender/imbuf/intern/dds/BlockDXT.cpp b/source/blender/imbuf/intern/dds/BlockDXT.cpp index f5e9e536e41..db2ca5969ec 100644 --- a/source/blender/imbuf/intern/dds/BlockDXT.cpp +++ b/source/blender/imbuf/intern/dds/BlockDXT.cpp @@ -232,7 +232,7 @@ void BlockDXT1::decodeBlock(ColorBlock * block) const uint idx = (row[j] >> (2 * i)) & 3; block->color(i, j) = color_array[idx]; } - } + } } void BlockDXT1::decodeBlockNV5x(ColorBlock * block) const @@ -592,7 +592,7 @@ void BlockCTX1::decodeBlock(ColorBlock * block) const uint idx = (row[j] >> (2 * i)) & 3; block->color(i, j) = color_array[idx]; } - } + } } void BlockCTX1::setIndices(int * idx) diff --git a/source/blender/imbuf/intern/dds/ColorBlock.cpp b/source/blender/imbuf/intern/dds/ColorBlock.cpp index 0b9f5c163fb..dbd87bf1426 100644 --- a/source/blender/imbuf/intern/dds/ColorBlock.cpp +++ b/source/blender/imbuf/intern/dds/ColorBlock.cpp @@ -393,7 +393,7 @@ void ColorBlock::computeRange(Vector3::Arg axis, Color32 * start, Color32 * end) int mini, maxi; mini = maxi = 0; - float min, max; + float min, max; min = max = dot(Vector3(m_color[0].r, m_color[0].g, m_color[0].b), axis); for (uint i = 1; i < 16; i++) diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c index aa236af3507..966e70c2876 100644 --- a/source/blender/imbuf/intern/divers.c +++ b/source/blender/imbuf/intern/divers.c @@ -62,7 +62,7 @@ void IMB_de_interlace(ImBuf *ibuf) tbuf1 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect); tbuf2 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect); - ibuf->x *= 2; + ibuf->x *= 2; IMB_rectcpy(tbuf1, ibuf, 0, 0, 0, 0, ibuf->x, ibuf->y); IMB_rectcpy(tbuf2, ibuf, 0, 0, tbuf2->x, 0, ibuf->x, ibuf->y); diff --git a/source/blender/imbuf/intern/imageprocess.c b/source/blender/imbuf/intern/imageprocess.c index 863b8424cc2..57fbce710a1 100644 --- a/source/blender/imbuf/intern/imageprocess.c +++ b/source/blender/imbuf/intern/imageprocess.c @@ -444,7 +444,7 @@ void neareast_interpolation_color(struct ImBuf *in, unsigned char outI[4], float outF[2] = dataF[2]; outF[3] = dataF[3]; } - } + } } void neareast_interpolation(ImBuf *in, ImBuf *out, float x, float y, int xout, int yout) diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c index 549a28a0453..dec5f6fb39e 100644 --- a/source/blender/imbuf/intern/iris.c +++ b/source/blender/imbuf/intern/iris.c @@ -408,7 +408,7 @@ struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags, char colo } MEM_freeN(starttab); - MEM_freeN(lengthtab); + MEM_freeN(lengthtab); } else { @@ -613,7 +613,7 @@ static void expandrow2(float *optr, unsigned char *iptr, int z) optr += 4; } } - } + } } static void expandrow(unsigned char *optr, unsigned char *iptr, int z) diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c index 01523463712..692ba3c49ea 100644 --- a/source/blender/imbuf/intern/jp2.c +++ b/source/blender/imbuf/intern/jp2.c @@ -436,7 +436,7 @@ static void cinema_parameters(opj_cparameters_t *parameters) parameters->image_offset_y0 = 0; /*Codeblock size = 32 * 32*/ - parameters->cblockw_init = 32; + parameters->cblockw_init = 32; parameters->cblockh_init = 32; parameters->csty |= 0x01; @@ -602,7 +602,7 @@ static opj_image_t *ibuftoimage(ImBuf *ibuf, opj_cparameters_t *parameters) prec = 12; numcomps = 3; } - else { + else { /* Get settings from the imbuf */ color_space = (ibuf->ftype & JP2_YCC) ? CLRSPC_SYCC : CLRSPC_SRGB; diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c index a11f16d5669..8e072361583 100644 --- a/source/blender/imbuf/intern/rectop.c +++ b/source/blender/imbuf/intern/rectop.c @@ -447,7 +447,7 @@ void IMB_rectblend(struct ImBuf *dbuf, struct ImBuf *sbuf, int destx, drectf += destskip * 4; srectf += srcskip * 4; - } + } } } } @@ -482,13 +482,13 @@ void IMB_rectfill(struct ImBuf *drect, const float col[4]) *rrectf++ = col[2]; *rrectf++ = col[3]; } - } + } } void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height, - const float col[4], struct ColorManagedDisplay *display, - int x1, int y1, int x2, int y2) + const float col[4], struct ColorManagedDisplay *display, + int x1, int y1, int x2, int y2) { int i, j; float a; /* alpha */ diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c index 253680e4bea..eaad77f1ff9 100644 --- a/source/blender/imbuf/intern/targa.c +++ b/source/blender/imbuf/intern/targa.c @@ -55,9 +55,9 @@ /***/ typedef struct TARGA { - unsigned char numid; + unsigned char numid; unsigned char maptyp; - unsigned char imgtyp; + unsigned char imgtyp; short maporig; short mapsize; unsigned char mapbits; diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c index ff7218d649c..a3ce332b609 100644 --- a/source/blender/imbuf/intern/thumbs.c +++ b/source/blender/imbuf/intern/thumbs.c @@ -175,7 +175,7 @@ static void to_hex_char(char *hexbytes, const unsigned char *bytes, int len) static int uri_from_filename(const char *path, char *uri) { - char orig_uri[URI_MAX]; + char orig_uri[URI_MAX]; const char *dirstart = path; #ifdef WIN32 @@ -265,7 +265,7 @@ ImBuf *IMB_thumb_create(const char *path, ThumbSize size, ThumbSource source, Im char thumb[40]; short tsize = 128; short ex, ey; - float scaledx, scaledy; + float scaledx, scaledy; struct stat info; switch (size) { @@ -334,7 +334,7 @@ ImBuf *IMB_thumb_create(const char *path, ThumbSize size, ThumbSource source, Im } else { IMB_freeImBuf(img); - img = IMB_anim_previewframe(anim); + img = IMB_anim_previewframe(anim); } IMB_free_anim(anim); } @@ -401,7 +401,7 @@ ImBuf *IMB_thumb_read(const char *path, ThumbSize size) if (!uri_from_filename(path, uri)) { return NULL; } - if (thumbpath_from_uri(uri, thumb, sizeof(thumb), size)) { + if (thumbpath_from_uri(uri, thumb, sizeof(thumb), size)) { img = IMB_loadiffname(thumb, IB_rect | IB_metadata, NULL); } @@ -438,7 +438,7 @@ ImBuf *IMB_thumb_manage(const char *path, ThumbSize size, ThumbSource source) if (stat(path, &st)) { return NULL; - } + } if (!uri_from_filename(path, uri)) { return NULL; } diff --git a/source/blender/imbuf/intern/thumbs_blend.c b/source/blender/imbuf/intern/thumbs_blend.c index cfc49d8cef5..73ced4095f9 100644 --- a/source/blender/imbuf/intern/thumbs_blend.c +++ b/source/blender/imbuf/intern/thumbs_blend.c @@ -166,7 +166,7 @@ void IMB_overlayblend_thumb(unsigned int *thumb, int width, int height, float as margin_t = height - margin_b; } - { + { int x, y; int stride_x = (margin_r - margin_l) - 2; diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index 8dd791c8508..fe138a71a4a 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -416,7 +416,7 @@ int IMB_isanim(const char *filename) type = imb_get_anim_type(filename); } else { - return(FALSE); + return(FALSE); } } else { /* no quicktime */ diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 4a5ad69cb91..b445d59db2c 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -46,21 +46,21 @@ typedef struct bAddObjectActuator { struct Object *ob; } bAddObjectActuator; -typedef struct bActionActuator { - struct bAction *act; /* Pointer to action */ - short type, flag; /* Playback type */ // not in use - float sta, end; /* Start & End frames */ - char name[64]; /* For property-driven playback, MAX_NAME */ - char frameProp[64]; /* Set this property to the actions current frame, MAX_NAME */ - short blendin; /* Number of frames of blending */ - short priority; /* Execution priority */ - short layer; /* Animation layer */ - short end_reset; /* Ending the actuator (negative pulse) wont reset the the action to its starting frame */ - short strideaxis; /* Displacement axis */ - short pad; - float stridelength; /* Displacement incurred by cycle */ // not in use - float layer_weight; /* How much of the previous layer to use for blending. (<0 = disable, 0 = add mode) */ -} bActionActuator; +typedef struct bActionActuator { + struct bAction *act; /* Pointer to action */ + short type, flag; /* Playback type */ // not in use + float sta, end; /* Start & End frames */ + char name[64]; /* For property-driven playback, MAX_NAME */ + char frameProp[64]; /* Set this property to the actions current frame, MAX_NAME */ + short blendin; /* Number of frames of blending */ + short priority; /* Execution priority */ + short layer; /* Animation layer */ + short end_reset; /* Ending the actuator (negative pulse) wont reset the the action to its starting frame */ + short strideaxis; /* Displacement axis */ + short pad; + float stridelength; /* Displacement incurred by cycle */ // not in use + float layer_weight; /* How much of the previous layer to use for blending. (<0 = disable, 0 = add mode) */ +} bActionActuator; typedef struct Sound3D { float min_gain; @@ -261,7 +261,7 @@ typedef struct bActuator { /** * For ipo's and props: to find out which object the actuator * belongs to */ - struct Object *ob; + struct Object *ob; } bActuator; diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index 7cf0d588710..1ac6e6db94b 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -246,13 +246,13 @@ typedef enum eFMod_Noise_Modifications { /* stepped modifier data */ typedef struct FMod_Stepped { - float step_size; /* Number of frames each interpolated value should be held */ - float offset; /* Reference frame number that stepping starts from */ - - float start_frame; /* start frame of the frame range that modifier works in */ - float end_frame; /* end frame of the frame range that modifier works in */ - - int flag; /* various settings */ + float step_size; /* Number of frames each interpolated value should be held */ + float offset; /* Reference frame number that stepping starts from */ + + float start_frame; /* start frame of the frame range that modifier works in */ + float end_frame; /* end frame of the frame range that modifier works in */ + + int flag; /* various settings */ } FMod_Stepped; /* stepped modifier range flags */ @@ -325,14 +325,14 @@ typedef enum eDriverTarget_TransformChannels { */ typedef struct DriverVar { struct DriverVar *next, *prev; - - char name[64]; /* name of the variable to use in py-expression (must be valid python identifier) */ - - DriverTarget targets[8]; /* MAX_DRIVER_TARGETS, target slots */ - short num_targets; /* number of targets actually used by this variable */ - - short type; /* type of driver target (eDriverTarget_Types) */ - float curval; /* result of previous evaluation */ + + char name[64]; /* name of the variable to use in py-expression (must be valid python identifier) */ + + DriverTarget targets[8]; /* MAX_DRIVER_TARGETS, target slots */ + short num_targets; /* number of targets actually used by this variable */ + + short type; /* type of driver target (eDriverTarget_Types) */ + float curval; /* result of previous evaluation */ } DriverVar; /* Driver Variable Types */ @@ -556,36 +556,36 @@ typedef struct AnimMapper { */ typedef struct NlaStrip { struct NlaStrip *next, *prev; - - ListBase strips; /* 'Child' strips (used for 'meta' strips) */ - bAction *act; /* Action that is referenced by this strip (strip is 'user' of the action) */ - AnimMapper *remap; /* Remapping info this strip (for tweaking correspondence of action with context) */ - - ListBase fcurves; /* F-Curves for controlling this strip's influence and timing */ // TODO: move out? - ListBase modifiers; /* F-Curve modifiers to be applied to the entire strip's referenced F-Curves */ - - char name[64]; /* User-Visible Identifier for Strip */ - - float influence; /* Influence of strip */ - float strip_time; /* Current 'time' within action being used (automatically evaluated, but can be overridden) */ - - float start, end; /* extents of the strip */ - float actstart, actend; /* range of the action to use */ - - float repeat; /* The number of times to repeat the action range (only when no F-Curves) */ - float scale; /* The amount the action range is scaled by (only when no F-Curves) */ - - float blendin, blendout; /* strip blending length (only used when there are no F-Curves) */ - short blendmode; /* strip blending mode (layer-based mixing) */ - - short extendmode; /* strip extrapolation mode (time-based mixing) */ + + ListBase strips; /* 'Child' strips (used for 'meta' strips) */ + bAction *act; /* Action that is referenced by this strip (strip is 'user' of the action) */ + AnimMapper *remap; /* Remapping info this strip (for tweaking correspondence of action with context) */ + + ListBase fcurves; /* F-Curves for controlling this strip's influence and timing */ // TODO: move out? + ListBase modifiers; /* F-Curve modifiers to be applied to the entire strip's referenced F-Curves */ + + char name[64]; /* User-Visible Identifier for Strip */ + + float influence; /* Influence of strip */ + float strip_time; /* Current 'time' within action being used (automatically evaluated, but can be overridden) */ + + float start, end; /* extents of the strip */ + float actstart, actend; /* range of the action to use */ + + float repeat; /* The number of times to repeat the action range (only when no F-Curves) */ + float scale; /* The amount the action range is scaled by (only when no F-Curves) */ + + float blendin, blendout; /* strip blending length (only used when there are no F-Curves) */ + short blendmode; /* strip blending mode (layer-based mixing) */ + + short extendmode; /* strip extrapolation mode (time-based mixing) */ short pad1; - - short type; /* type of NLA strip */ - - void *speaker_handle; /* handle for speaker objects */ - - int flag; /* settings */ + + short type; /* type of NLA strip */ + + void *speaker_handle; /* handle for speaker objects */ + + int flag; /* settings */ int pad2; } NlaStrip; @@ -600,48 +600,48 @@ typedef enum eNlaStrip_Blend_Mode { /* NLA Strip Extrpolation Mode */ typedef enum eNlaStrip_Extrapolate_Mode { /* extend before first frame if no previous strips in track, and always hold+extend last frame */ - NLASTRIP_EXTEND_HOLD = 0, + NLASTRIP_EXTEND_HOLD = 0, /* only hold+extend last frame */ - NLASTRIP_EXTEND_HOLD_FORWARD, + NLASTRIP_EXTEND_HOLD_FORWARD = 1, /* don't contribute at all */ - NLASTRIP_EXTEND_NOTHING + NLASTRIP_EXTEND_NOTHING = 2 } eNlaStrip_Extrapolate_Mode; /* NLA Strip Settings */ typedef enum eNlaStrip_Flag { /* UI selection flags */ /* NLA strip is the active one in the track (also indicates if strip is being tweaked) */ - NLASTRIP_FLAG_ACTIVE = (1<<0), + NLASTRIP_FLAG_ACTIVE = (1<<0), /* NLA strip is selected for editing */ - NLASTRIP_FLAG_SELECT = (1<<1), -// NLASTRIP_FLAG_SELECT_L = (1<<2), // left handle selected -// NLASTRIP_FLAG_SELECT_R = (1<<3), // right handle selected + NLASTRIP_FLAG_SELECT = (1<<1), +// NLASTRIP_FLAG_SELECT_L = (1<<2), // left handle selected +// NLASTRIP_FLAG_SELECT_R = (1<<3), // right handle selected /* NLA strip uses the same action that the action being tweaked uses (not set for the twaking one though) */ - NLASTRIP_FLAG_TWEAKUSER = (1<<4), - + NLASTRIP_FLAG_TWEAKUSER = (1<<4), + /* controls driven by local F-Curves */ /* strip influence is controlled by local F-Curve */ - NLASTRIP_FLAG_USR_INFLUENCE = (1<<5), - NLASTRIP_FLAG_USR_TIME = (1<<6), + NLASTRIP_FLAG_USR_INFLUENCE = (1<<5), + NLASTRIP_FLAG_USR_TIME = (1<<6), NLASTRIP_FLAG_USR_TIME_CYCLIC = (1<<7), - + /* NLA strip length is synced to the length of the referenced action */ - NLASTRIP_FLAG_SYNC_LENGTH = (1<<9), - + NLASTRIP_FLAG_SYNC_LENGTH = (1<<9), + /* playback flags (may be overridden by F-Curves) */ /* NLA strip blendin/out values are set automatically based on overlaps */ - NLASTRIP_FLAG_AUTO_BLENDS = (1<<10), + NLASTRIP_FLAG_AUTO_BLENDS = (1<<10), /* NLA strip is played back in reverse order */ - NLASTRIP_FLAG_REVERSE = (1<<11), + NLASTRIP_FLAG_REVERSE = (1<<11), /* NLA strip is muted (i.e. doesn't contribute in any way) */ - NLASTRIP_FLAG_MUTED = (1<<12), + NLASTRIP_FLAG_MUTED = (1<<12), /* NLA Strip is played back in 'ping-pong' style */ - NLASTRIP_FLAG_MIRROR = (1<<13), - + NLASTRIP_FLAG_MIRROR = (1<<13), + /* temporary editing flags */ /* NLA-Strip is really just a temporary meta used to facilitate easier transform code */ - NLASTRIP_FLAG_TEMP_META = (1<<30), - NLASTRIP_FLAG_EDIT_TOUCHED = (1<<31) + NLASTRIP_FLAG_TEMP_META = (1<<30), + NLASTRIP_FLAG_EDIT_TOUCHED = (1<<31) } eNlaStrip_Flag; /* NLA Strip Type */ @@ -651,7 +651,7 @@ typedef enum eNlaStrip_Type { /* 'transition' - blends between the adjacent strips */ NLASTRIP_TYPE_TRANSITION, /* 'meta' - a strip which acts as a container for a few others */ - NLASTRIP_TYPE_META, + NLASTRIP_TYPE_META, /* 'emit sound' - a strip which is used for timing when speaker emits sounds */ NLASTRIP_TYPE_SOUND @@ -827,71 +827,71 @@ typedef struct AnimOverride { * This datablock should be placed immediately after the ID block where it is used, so that * the code which retrieves this data can do so in an easier manner. See blenkernel/intern/anim_sys.c for details. */ -typedef struct AnimData { +typedef struct AnimData { /* active action - acts as the 'tweaking track' for the NLA */ - bAction *action; - /* temp-storage for the 'real' active action (i.e. the one used before the tweaking-action - * took over to be edited in the Animation Editors) + bAction *action; + /* temp-storage for the 'real' active action (i.e. the one used before the tweaking-action + * took over to be edited in the Animation Editors) */ - bAction *tmpact; - /* remapping-info for active action - should only be used if needed - * (for 'foreign' actions that aren't working correctly) + bAction *tmpact; + /* remapping-info for active action - should only be used if needed + * (for 'foreign' actions that aren't working correctly) */ - AnimMapper *remap; - + AnimMapper *remap; + /* nla-tracks */ - ListBase nla_tracks; + ListBase nla_tracks; /* active NLA-strip (only set/used during tweaking, so no need to worry about dangling pointers) */ - NlaStrip *actstrip; - - /* 'drivers' for this ID-block's settings - FCurves, but are completely - * separate from those for animation data + NlaStrip *actstrip; + + /* 'drivers' for this ID-block's settings - FCurves, but are completely + * separate from those for animation data */ - ListBase drivers; /* standard user-created Drivers/Expressions (used as part of a rig) */ - ListBase overrides; /* temp storage (AnimOverride) of values for settings that are animated (but the value hasn't been keyframed) */ - + ListBase drivers; /* standard user-created Drivers/Expressions (used as part of a rig) */ + ListBase overrides; /* temp storage (AnimOverride) of values for settings that are animated (but the value hasn't been keyframed) */ + /* settings for animation evaluation */ - int flag; /* user-defined settings */ - int recalc; /* depsgraph recalculation flags */ - + int flag; /* user-defined settings */ + int recalc; /* depsgraph recalculation flags */ + /* settings for active action evaluation (based on NLA strip settings) */ - short act_blendmode; /* accumulation mode for active action */ - short act_extendmode; /* extrapolation mode for active action */ - float act_influence; /* influence for active action */ + short act_blendmode; /* accumulation mode for active action */ + short act_extendmode; /* extrapolation mode for active action */ + float act_influence; /* influence for active action */ } AnimData; /* Animation Data settings (mostly for NLA) */ typedef enum eAnimData_Flag { /* only evaluate a single track in the NLA */ - ADT_NLA_SOLO_TRACK = (1<<0), + ADT_NLA_SOLO_TRACK = (1<<0), /* don't use NLA */ - ADT_NLA_EVAL_OFF = (1<<1), + ADT_NLA_EVAL_OFF = (1<<1), /* NLA is being 'tweaked' (i.e. in EditMode) */ - ADT_NLA_EDIT_ON = (1<<2), + ADT_NLA_EDIT_ON = (1<<2), /* active Action for 'tweaking' does not have mapping applied for editing */ - ADT_NLA_EDIT_NOMAP = (1<<3), + ADT_NLA_EDIT_NOMAP = (1<<3), /* NLA-Strip F-Curves are expanded in UI */ - ADT_NLA_SKEYS_COLLAPSED = (1<<4), - + ADT_NLA_SKEYS_COLLAPSED = (1<<4), + /* drivers expanded in UI */ - ADT_DRIVERS_COLLAPSED = (1<<10), + ADT_DRIVERS_COLLAPSED = (1<<10), /* don't execute drivers */ - ADT_DRIVERS_DISABLED = (1<<11), - + ADT_DRIVERS_DISABLED = (1<<11), + /* AnimData block is selected in UI */ - ADT_UI_SELECTED = (1<<14), + ADT_UI_SELECTED = (1<<14), /* AnimData block is active in UI */ - ADT_UI_ACTIVE = (1<<15), - + ADT_UI_ACTIVE = (1<<15), + /* F-Curves from this AnimData block are not visible in the Graph Editor */ - ADT_CURVES_NOT_VISIBLE = (1<<16) + ADT_CURVES_NOT_VISIBLE = (1<<16) } eAnimData_Flag; /* Animation Data recalculation settings (to be set by depsgraph) */ typedef enum eAnimData_Recalc { - ADT_RECALC_DRIVERS = (1<<0), - ADT_RECALC_ANIM = (1<<1), - ADT_RECALC_ALL = (ADT_RECALC_DRIVERS | ADT_RECALC_ANIM) + ADT_RECALC_DRIVERS = (1 << 0), + ADT_RECALC_ANIM = (1 << 1), + ADT_RECALC_ALL = (ADT_RECALC_DRIVERS | ADT_RECALC_ANIM) } eAnimData_Recalc; /* Base Struct for Anim ------------------------------------- */ diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index 0a20a60c893..fd68a6d9a27 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -45,91 +45,91 @@ struct AnimData; */ typedef struct Bone { - struct Bone *next, *prev; /* Next/prev elements within this list */ - IDProperty *prop; /* User-Defined Properties on this Bone */ - struct Bone *parent; /* Parent (ik parent if appropriate flag is set */ - ListBase childbase; /* Children */ - char name[64]; /* Name of the bone - must be unique within the armature, MAXBONENAME */ - - float roll; /* roll is input for editmode, length calculated */ - float head[3]; - float tail[3]; /* head/tail and roll in Bone Space */ - float bone_mat[3][3]; /* rotation derived from head/tail/roll */ - - int flag; - - float arm_head[3]; - float arm_tail[3]; /* head/tail in Armature Space (rest pos) */ - float arm_mat[4][4]; /* matrix: (bonemat(b)+head(b))*arm_mat(b-1), rest pos*/ - float arm_roll; /* roll in Armature Space (rest pos) */ - - float dist, weight; /* dist, weight: for non-deformgroup deforms */ - float xwidth, length, zwidth; /* width: for block bones. keep in this order, transform! */ - float ease1, ease2; /* length of bezier handles */ - float rad_head, rad_tail; /* radius for head/tail sphere, defining deform as well, parent->rad_tip overrides rad_head*/ - - float size[3]; /* patch for upward compat, UNUSED! */ - int layer; /* layers that bone appears on */ - short segments; /* for B-bones */ - short pad[1]; + struct Bone *next, *prev; /* Next/prev elements within this list */ + IDProperty *prop; /* User-Defined Properties on this Bone */ + struct Bone *parent; /* Parent (ik parent if appropriate flag is set */ + ListBase childbase; /* Children */ + char name[64]; /* Name of the bone - must be unique within the armature, MAXBONENAME */ + + float roll; /* roll is input for editmode, length calculated */ + float head[3]; + float tail[3]; /* head/tail and roll in Bone Space */ + float bone_mat[3][3]; /* rotation derived from head/tail/roll */ + + int flag; + + float arm_head[3]; + float arm_tail[3]; /* head/tail in Armature Space (rest pos) */ + float arm_mat[4][4]; /* matrix: (bonemat(b)+head(b))*arm_mat(b-1), rest pos*/ + float arm_roll; /* roll in Armature Space (rest pos) */ + + float dist, weight; /* dist, weight: for non-deformgroup deforms */ + float xwidth, length, zwidth; /* width: for block bones. keep in this order, transform! */ + float ease1, ease2; /* length of bezier handles */ + float rad_head, rad_tail; /* radius for head/tail sphere, defining deform as well, parent->rad_tip overrides rad_head */ + + float size[3]; /* patch for upward compat, UNUSED! */ + int layer; /* layers that bone appears on */ + short segments; /* for B-bones */ + short pad[1]; } Bone; typedef struct bArmature { - ID id; + ID id; struct AnimData *adt; - - ListBase bonebase; - ListBase chainbase; - ListBase *edbo; /* editbone listbase, we use pointer so we can check state */ - + + ListBase bonebase; + ListBase chainbase; + ListBase *edbo; /* editbone listbase, we use pointer so we can check state */ + /* active bones should work like active object where possible * - active and selection are unrelated - * - active & hidden is not allowed + * - active & hidden is not allowed * - from the user perspective active == last selected * - active should be ignored when not visible (hidden layer) */ - Bone *act_bone; /* active bone (when not in editmode) */ - void *act_edbone; /* active editbone (in editmode) */ - - void *sketch; /* sketch struct for etch-a-ton */ - - int flag; - int drawtype; - int gevertdeformer; /* how vertex deformation is handled in the ge */ - int pad; - short deformflag; - short pathflag; - - unsigned int layer_used; /* for UI, to show which layers are there */ - unsigned int layer, layer_protected; /* for buttons to work, both variables in this order together */ - + Bone *act_bone; /* active bone (when not in editmode) */ + void *act_edbone; /* active editbone (in editmode) */ + + void *sketch; /* sketch struct for etch-a-ton */ + + int flag; + int drawtype; + int gevertdeformer; /* how vertex deformation is handled in the ge */ + int pad; + short deformflag; + short pathflag; + + unsigned int layer_used; /* for UI, to show which layers are there */ + unsigned int layer, layer_protected; /* for buttons to work, both variables in this order together */ + // XXX deprecated... old animaton system (armature only viz) --- - short ghostep, ghostsize; /* number of frames to ghosts to show, and step between them */ - short ghosttype, pathsize; /* ghost drawing options and number of frames between points of path */ - int ghostsf, ghostef; /* start and end frames of ghost-drawing range */ - int pathsf, pathef; /* start and end frames of path-calculation range for all bones */ - int pathbc, pathac; /* number of frames before/after current frame of path-calculation for all bones */ + short ghostep, ghostsize; /* number of frames to ghosts to show, and step between them */ + short ghosttype, pathsize; /* ghost drawing options and number of frames between points of path */ + int ghostsf, ghostef; /* start and end frames of ghost-drawing range */ + int pathsf, pathef; /* start and end frames of path-calculation range for all bones */ + int pathbc, pathac; /* number of frames before/after current frame of path-calculation for all bones */ // XXX end of deprecated code ---------------------------------- } bArmature; /* armature->flag */ /* don't use bit 7, was saved in files to disable stuff */ typedef enum eArmature_Flag { - ARM_RESTPOS = (1<<0), - ARM_DRAWXRAY = (1<<1), /* XRAY is here only for backwards converting */ - ARM_DRAWAXES = (1<<2), - ARM_DRAWNAMES = (1<<3), - ARM_POSEMODE = (1<<4), - ARM_EDITMODE = (1<<5), - ARM_DELAYDEFORM = (1<<6), - ARM_DONT_USE = (1<<7), - ARM_MIRROR_EDIT = (1<<8), - ARM_AUTO_IK = (1<<9), - ARM_NO_CUSTOM = (1<<10), /* made option negative, for backwards compat */ - ARM_COL_CUSTOM = (1<<11), /* draw custom colors */ - ARM_GHOST_ONLYSEL = (1<<12), /* when ghosting, only show selected bones (this should belong to ghostflag instead) */ /* XXX deprecated */ - ARM_DS_EXPAND = (1<<13), /* dopesheet channel is expanded */ - ARM_HAS_VIZ_DEPS = (1<<14), /* other objects are used for visualizing various states (hack for efficient updates) */ + ARM_RESTPOS = (1<<0), + ARM_DRAWXRAY = (1<<1), /* XRAY is here only for backwards converting */ + ARM_DRAWAXES = (1<<2), + ARM_DRAWNAMES = (1<<3), + ARM_POSEMODE = (1<<4), + ARM_EDITMODE = (1<<5), + ARM_DELAYDEFORM = (1<<6), + ARM_DONT_USE = (1<<7), + ARM_MIRROR_EDIT = (1<<8), + ARM_AUTO_IK = (1<<9), + ARM_NO_CUSTOM = (1<<10), /* made option negative, for backwards compat */ + ARM_COL_CUSTOM = (1<<11), /* draw custom colors */ + ARM_GHOST_ONLYSEL = (1<<12), /* when ghosting, only show selected bones (this should belong to ghostflag instead) */ /* XXX deprecated */ + ARM_DS_EXPAND = (1<<13), /* dopesheet channel is expanded */ + ARM_HAS_VIZ_DEPS = (1<<14), /* other objects are used for visualizing various states (hack for efficient updates) */ } eArmature_Flag; /* armature->drawtype */ @@ -176,29 +176,29 @@ typedef enum eArmature_GhostType { /* bone->flag */ typedef enum eBone_Flag { - BONE_SELECTED = (1<<0), - BONE_ROOTSEL = (1<<1), - BONE_TIPSEL = (1<<2), - BONE_TRANSFORM = (1<<3), /* Used instead of BONE_SELECTED during transform */ - BONE_CONNECTED = (1<<4), /* when bone has a parent, connect head of bone to parent's tail*/ - /* 32 used to be quatrot, was always set in files, do not reuse unless you clear it always */ - BONE_HIDDEN_P = (1<<6), /* hidden Bones when drawing PoseChannels */ - BONE_DONE = (1<<7), /* For detecting cyclic dependencies */ - BONE_DRAW_ACTIVE = (1<<8), /* active is on mouse clicks only - deprecated, ONLY USE FOR DRAWING */ - BONE_HINGE = (1<<9), /* No parent rotation or scale */ - BONE_HIDDEN_A = (1<<10), /* hidden Bones when drawing Armature Editmode */ - BONE_MULT_VG_ENV = (1<<11), /* multiplies vgroup with envelope */ - BONE_NO_DEFORM = (1<<12), /* bone doesn't deform geometry */ - BONE_UNKEYED = (1<<13), /* set to prevent destruction of its unkeyframed pose (after transform) */ - BONE_HINGE_CHILD_TRANSFORM = (1<<14), /* set to prevent hinge child bones from influencing the transform center */ - BONE_NO_SCALE = (1<<15), /* No parent scale */ - BONE_HIDDEN_PG = (1<<16), /* hidden bone when drawing PoseChannels (for ghost drawing) */ - BONE_DRAWWIRE = (1<<17), /* bone should be drawn as OB_WIRE, regardless of draw-types of view+armature */ - BONE_NO_CYCLICOFFSET = (1<<18), /* when no parent, bone will not get cyclic offset */ - BONE_EDITMODE_LOCKED = (1<<19), /* bone transforms are locked in EditMode */ - BONE_TRANSFORM_CHILD = (1<<20), /* Indicates that a parent is also being transformed */ - BONE_UNSELECTABLE = (1<<21), /* bone cannot be selected */ - BONE_NO_LOCAL_LOCATION = (1<<22) /* bone location is in armature space */ + BONE_SELECTED = (1 << 0), + BONE_ROOTSEL = (1 << 1), + BONE_TIPSEL = (1 << 2), + BONE_TRANSFORM = (1 << 3), /* Used instead of BONE_SELECTED during transform */ + BONE_CONNECTED = (1 << 4), /* when bone has a parent, connect head of bone to parent's tail*/ + /* 32 used to be quatrot, was always set in files, do not reuse unless you clear it always */ + BONE_HIDDEN_P = (1 << 6), /* hidden Bones when drawing PoseChannels */ + BONE_DONE = (1 << 7), /* For detecting cyclic dependencies */ + BONE_DRAW_ACTIVE = (1 << 8), /* active is on mouse clicks only - deprecated, ONLY USE FOR DRAWING */ + BONE_HINGE = (1 << 9), /* No parent rotation or scale */ + BONE_HIDDEN_A = (1 << 10), /* hidden Bones when drawing Armature Editmode */ + BONE_MULT_VG_ENV = (1 << 11), /* multiplies vgroup with envelope */ + BONE_NO_DEFORM = (1 << 12), /* bone doesn't deform geometry */ + BONE_UNKEYED = (1 << 13), /* set to prevent destruction of its unkeyframed pose (after transform) */ + BONE_HINGE_CHILD_TRANSFORM = (1 << 14), /* set to prevent hinge child bones from influencing the transform center */ + BONE_NO_SCALE = (1 << 15), /* No parent scale */ + BONE_HIDDEN_PG = (1 << 16), /* hidden bone when drawing PoseChannels (for ghost drawing) */ + BONE_DRAWWIRE = (1 << 17), /* bone should be drawn as OB_WIRE, regardless of draw-types of view+armature */ + BONE_NO_CYCLICOFFSET = (1 << 18), /* when no parent, bone will not get cyclic offset */ + BONE_EDITMODE_LOCKED = (1 << 19), /* bone transforms are locked in EditMode */ + BONE_TRANSFORM_CHILD = (1 << 20), /* Indicates that a parent is also being transformed */ + BONE_UNSELECTABLE = (1 << 21), /* bone cannot be selected */ + BONE_NO_LOCAL_LOCATION = (1 << 22) /* bone location is in armature space */ } eBone_Flag; #define MAXBONENAME 64 diff --git a/source/blender/makesdna/DNA_boid_types.h b/source/blender/makesdna/DNA_boid_types.h index ce5fc4b0c3c..f1930ffd643 100644 --- a/source/blender/makesdna/DNA_boid_types.h +++ b/source/blender/makesdna/DNA_boid_types.h @@ -36,18 +36,18 @@ typedef enum BoidRuleType { eBoidRuleType_None = 0, - eBoidRuleType_Goal = 1, /* go to goal assigned object or loudest assigned signal source */ - eBoidRuleType_Avoid = 2, /* get away from assigned object or loudest assigned signal source */ - eBoidRuleType_AvoidCollision = 3, /* manoeuver to avoid collisions with other boids and deflector object in near future */ - eBoidRuleType_Separate = 4, /* keep from going through other boids */ - eBoidRuleType_Flock = 5, /* move to center of neighbors and match their velocity */ - eBoidRuleType_FollowLeader = 6, /* follow a boid or assigned object */ - eBoidRuleType_AverageSpeed = 7, /* maintain speed, flight level or wander*/ - eBoidRuleType_Fight = 8, /* go to closest enemy and attack when in range */ - //eBoidRuleType_Protect = 9, /* go to enemy closest to target and attack when in range */ - //eBoidRuleType_Hide = 10, /* find a deflector move to it's other side from closest enemy */ - //eBoidRuleType_FollowPath = 11, /* move along a assigned curve or closest curve in a group */ - //eBoidRuleType_FollowWall = 12, /* move next to a deflector object's in direction of it's tangent */ + eBoidRuleType_Goal = 1, /* go to goal assigned object or loudest assigned signal source */ + eBoidRuleType_Avoid = 2, /* get away from assigned object or loudest assigned signal source */ + eBoidRuleType_AvoidCollision = 3, /* manoeuver to avoid collisions with other boids and deflector object in near future */ + eBoidRuleType_Separate = 4, /* keep from going through other boids */ + eBoidRuleType_Flock = 5, /* move to center of neighbors and match their velocity */ + eBoidRuleType_FollowLeader = 6, /* follow a boid or assigned object */ + eBoidRuleType_AverageSpeed = 7, /* maintain speed, flight level or wander*/ + eBoidRuleType_Fight = 8, /* go to closest enemy and attack when in range */ + //eBoidRuleType_Protect = 9, /* go to enemy closest to target and attack when in range */ + //eBoidRuleType_Hide = 10, /* find a deflector move to it's other side from closest enemy */ + //eBoidRuleType_FollowPath = 11, /* move along a assigned curve or closest curve in a group */ + //eBoidRuleType_FollowWall = 12, /* move next to a deflector object's in direction of it's tangent */ NUM_BOID_RULE_TYPES } BoidRuleType; @@ -67,7 +67,7 @@ typedef struct BoidRuleGoalAvoid { BoidRule rule; struct Object *ob; int options; - float fear_factor; + float fear_factor; /* signals */ int signal_id, channels; diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 4928a88b33e..df1cba6a44d 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -45,7 +45,7 @@ */ typedef struct ClothSimSettings { - struct LinkNode *cache; /* UNUSED atm */ + struct LinkNode *cache; /* UNUSED atm */ float mingoal; /* see SB */ float Cdis; /* Mechanical damping of springs. */ float Cvi; /* Viscous/fluid damping. */ diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index 8b1e7e12e17..f1b7a7c3cc3 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -170,7 +170,7 @@ typedef struct bSplineIKConstraint { short numpoints; /* number of points to bound in points array */ short chainlen; /* number of bones ('n') that are in the chain */ - /* settings */ + /* settings */ short flag; /* general settings for constraint */ short xzScaleMode; /* method used for determining the x & z scaling of the bones */ } bSplineIKConstraint; @@ -340,7 +340,7 @@ typedef struct bTransformConstraint { float from_max[3]; /* to map on to to_min/max range. */ float to_min[3]; /* range of motion on owner caused by target */ - float to_max[3]; + float to_max[3]; } bTransformConstraint; /* Pivot Constraint */ @@ -486,7 +486,7 @@ typedef enum eBConstraint_Flags { CONSTRAINT_EXPAND = (1<<0), /* pre-check for illegal object name or bone name */ CONSTRAINT_DISABLE = (1<<2), - /* to indicate which Ipo should be shown, maybe for 3d access later too */ + /* to indicate which Ipo should be shown, maybe for 3d access later too */ CONSTRAINT_ACTIVE = (1<<4), /* to indicate that the owner's space should only be changed into ownspace, but not out of it */ CONSTRAINT_SPACEONCE = (1<<6), @@ -664,7 +664,7 @@ typedef enum eSplineIK_Flags { /* bones in the chain should not scale to fit the curve */ CONSTRAINT_SPLINEIK_SCALE_LIMITED = (1<<2), /* evenly distribute the bones along the path regardless of length */ - CONSTRAINT_SPLINEIK_EVENSPLITS = (1<<3), + CONSTRAINT_SPLINEIK_EVENSPLITS = (1<<3), /* don't adjust the x and z scaling of the bones by the curve radius */ CONSTRAINT_SPLINEIK_NO_CURVERAD = (1<<4) } eSplineIK_Flags; @@ -751,7 +751,7 @@ typedef enum eChildOf_Flags { /* Restrictions for Pivot Constraint axis to consider for enabling constraint */ typedef enum ePivotConstraint_Axis { /* do not consider this activity-clamping */ - PIVOTCON_AXIS_NONE = -1, + PIVOTCON_AXIS_NONE = -1, /* consider -ve x-axis rotations */ PIVOTCON_AXIS_X_NEG = 0, diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 9fbe045226e..3cf84648ea6 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -234,11 +234,11 @@ typedef struct Curve { float ctime; /* current evaltime - for use by Objects parented to curves */ int totbox, actbox; - struct TextBox *tb; + struct TextBox *tb; - int selstart, selend; + int selstart, selend; - struct CharInfo *strinfo; + struct CharInfo *strinfo; struct CharInfo curinfo; float bevfac1, bevfac2; diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h index 71b344d23d7..100968e7257 100644 --- a/source/blender/makesdna/DNA_gpencil_types.h +++ b/source/blender/makesdna/DNA_gpencil_types.h @@ -39,7 +39,7 @@ * This assumes that the bottom-left corner is (0,0) */ typedef struct bGPDspoint { - float x, y, z; /* co-ordinates of point (usually 2d, but can be 3d as well) */ + float x, y, z; /* co-ordinates of point (usually 2d, but can be 3d as well) */ float pressure; /* pressure of input device (from 0 to 1) at this point */ } bGPDspoint; @@ -53,7 +53,7 @@ typedef struct bGPDstroke { bGPDspoint *points; /* array of data-points for stroke */ int totpoints; /* number of data-points in array */ - short thickness; /* thickness of stroke (currently not used) */ + short thickness; /* thickness of stroke (currently not used) */ short flag; /* various settings about this stroke */ } bGPDstroke; @@ -94,7 +94,7 @@ typedef struct bGPDlayer { ListBase frames; /* list of annotations to display for frames (bGPDframe list) */ bGPDframe *actframe; /* active frame (should be the frame that is currently being displayed) */ - int flag; /* settings for layer */ + int flag; /* settings for layer */ short thickness; /* current thickness to apply to strokes */ short gstep; /* max number of frames between active and ghost to show (0=only those on either side) */ diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h index a73fc9073fa..3e641fba1ac 100644 --- a/source/blender/makesdna/DNA_ipo_types.h +++ b/source/blender/makesdna/DNA_ipo_types.h @@ -93,7 +93,7 @@ typedef struct Ipo { rctf cur; /* Rect defining extents of keyframes? */ short blocktype, showkey; /* blocktype: self-explanatory; showkey: either 0 or 1 (show vertical yellow lines for editing) */ - short muteipo, pad; /* muteipo: either 0 or 1 (whether ipo block is muted) */ + short muteipo, pad; /* muteipo: either 0 or 1 (whether ipo block is muted) */ } Ipo; /* ----------- adrcodes (for matching ipo-curves to data) ------------- */ diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h index 4884db14c57..f36e65085c9 100644 --- a/source/blender/makesdna/DNA_lamp_types.h +++ b/source/blender/makesdna/DNA_lamp_types.h @@ -109,7 +109,7 @@ typedef struct Lamp { struct PreviewImage *preview; /* nodes */ - struct bNodeTree *nodetree; + struct bNodeTree *nodetree; } Lamp; /* **************** LAMP ********************* */ diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index 51f9af278fe..9a8d3bf981c 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -86,7 +86,7 @@ typedef struct Material { ID id; struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ - short material_type, flag; + short material_type, flag; /* note, keep this below synced with render_types.h */ float r, g, b; float specr, specg, specb; @@ -156,7 +156,7 @@ typedef struct Material { float rampfac_col, rampfac_spec; struct MTex *mtex[18]; /* MAX_MTEX */ - struct bNodeTree *nodetree; + struct bNodeTree *nodetree; struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ struct Group *group; /* light group */ struct PreviewImage *preview; diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index 7040bc72f18..0c193e9be21 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -72,7 +72,7 @@ typedef struct MVert { * at the moment alpha is abused for vertex painting * and not used for transparency, note that red and blue are swapped */ typedef struct MCol { - char a, r, g, b; + char a, r, g, b; } MCol; /* new face structure, replaces MFace, which is now diff --git a/source/blender/makesdna/DNA_meta_types.h b/source/blender/makesdna/DNA_meta_types.h index 2912650c77c..5b37ff523cb 100644 --- a/source/blender/makesdna/DNA_meta_types.h +++ b/source/blender/makesdna/DNA_meta_types.h @@ -93,7 +93,7 @@ typedef struct MetaBall { /* used in editmode */ /*ListBase edit_elems;*/ - MetaElem *lastelem; + MetaElem *lastelem; } MetaBall; /* **************** METABALL ********************* */ diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 99df51e9ec4..fe82d27cfa8 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -348,7 +348,7 @@ typedef struct UVProjectModifierData { int flags; int num_projectors; float aspectx, aspecty; - float scalex, scaley; + float scalex, scaley; char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ int uvlayer_tmp, pad; } UVProjectModifierData; @@ -683,7 +683,7 @@ typedef struct SimpleDeformModifierData { struct Object *origin; /* object to control the origin of modifier space coordinates */ char vgroup_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ float factor; /* factors to control simple deforms */ - float limit[2]; /* lower and upper limit */ + float limit[2]; /* lower and upper limit */ char mode; /* deform function */ char axis; /* lock axis (for taper and strech) */ diff --git a/source/blender/makesdna/DNA_nla_types.h b/source/blender/makesdna/DNA_nla_types.h index 43b52ed65eb..5837f891ae0 100644 --- a/source/blender/makesdna/DNA_nla_types.h +++ b/source/blender/makesdna/DNA_nla_types.h @@ -50,7 +50,7 @@ typedef struct bActionModifier { /* path deform modifier */ short no_rot_axis; - struct Object *ob; + struct Object *ob; } bActionModifier; /* NLA-Modifier Types */ diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 374b3ba1e53..8c0c42bb880 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -475,7 +475,7 @@ typedef struct RenderData { int color_mgt_flag; /** post-production settings. deprecated, but here for upwards compat (initialized to 1) */ - float postgamma, posthue, postsat; + float postgamma, posthue, postsat; /* Dither noise intensity */ float dither_intensity; @@ -1086,7 +1086,7 @@ typedef struct Scene { short use_nodes; - struct bNodeTree *nodetree; + struct bNodeTree *nodetree; struct Editing *ed; /* sequence editor data is allocated here */ diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 2469656ecd7..be6464778e5 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -792,10 +792,10 @@ typedef struct SpaceText { float blockscale DNA_DEPRECATED; short blockhandler[8] DNA_DEPRECATED; - struct Text *text; + struct Text *text; int top, viewlines; - short flags, menunr; + short flags, menunr; short lheight; /* user preference */ char cwidth, linenrs_tot; /* runtime computed, character width and the number of chars to use when showing line numbers */ diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h index ce94a229750..dd63e6aad59 100644 --- a/source/blender/makesdna/DNA_texture_types.h +++ b/source/blender/makesdna/DNA_texture_types.h @@ -161,7 +161,7 @@ typedef struct PointDensity { float speed_scale, falloff_speed_scale, pdpad2; struct ColorBand *coba; /* for time -> color */ - struct CurveMapping *falloff_curve; /* falloff density curve */ + struct CurveMapping *falloff_curve; /* falloff density curve */ } PointDensity; typedef struct VoxelData { @@ -176,7 +176,7 @@ typedef struct VoxelData { int _pad; struct Object *object; /* for rendering smoke sims */ - float int_multiplier; + float int_multiplier; int still_frame; char source_path[1024]; /* 1024 = FILE_MAX */ diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index c10850d74e6..89b1208e800 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -184,7 +184,7 @@ typedef struct ThemeSpace { /* button/tool regions */ char button[4]; char button_title[4]; - char button_text[4]; + char button_text[4]; char button_text_hi[4]; /* listview regions */ @@ -195,8 +195,8 @@ typedef struct ThemeSpace { /* float panel */ char panel[4]; - char panel_title[4]; - char panel_text[4]; + char panel_title[4]; + char panel_text[4]; char panel_text_hi[4]; char shade1[4]; @@ -302,7 +302,7 @@ typedef struct bTheme { ThemeUI tui; /* Individual Spacetypes */ - ThemeSpace tbuts; + ThemeSpace tbuts; ThemeSpace tv3d; ThemeSpace tfile; ThemeSpace tipo; @@ -316,7 +316,7 @@ typedef struct bTheme { ThemeSpace ttime; ThemeSpace tnode; ThemeSpace tlogic; - ThemeSpace tuserpref; + ThemeSpace tuserpref; ThemeSpace tconsole; ThemeSpace tclip; diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h index a3f4b362672..084496871bf 100644 --- a/source/blender/makesdna/DNA_view2d_types.h +++ b/source/blender/makesdna/DNA_view2d_types.h @@ -128,7 +128,7 @@ typedef struct View2D { #define V2D_SCROLL_HORIZONTAL (V2D_SCROLL_TOP|V2D_SCROLL_BOTTOM|V2D_SCROLL_BOTTOM_O) /* scale markings - vertical */ #define V2D_SCROLL_SCALE_VERTICAL (1<<5) - /* scale markings - horizontal */ + /* scale markings - horizontal */ #define V2D_SCROLL_SCALE_HORIZONTAL (1<<6) /* induce hiding of scrollbars - set by region drawing in response to size of region */ #define V2D_SCROLL_VERTICAL_HIDE (1<<7) diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h index b3c10406d4c..8a14564f8a4 100644 --- a/source/blender/makesdna/DNA_world_types.h +++ b/source/blender/makesdna/DNA_world_types.h @@ -61,14 +61,14 @@ typedef struct World { float ambr, ambg, ambb; float pad2; - unsigned int fastcol; + unsigned int fastcol; /** * Exposure= mult factor. unused now, but maybe back later. Kept in to be upward compat. * New is exp/range control. linfac & logfac are constants... don't belong in * file, but allocating 8 bytes for temp mem isn't useful either. */ - float exposure, exp, range; + float exposure, exp, range; float linfac, logfac; /** @@ -129,7 +129,7 @@ typedef struct World { struct PreviewImage *preview; /* nodes */ - struct bNodeTree *nodetree; + struct bNodeTree *nodetree; } World; diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 674a7d7a2fe..72e34fe7228 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -87,14 +87,14 @@ static const char *includefiles[] = { "DNA_mesh_types.h", "DNA_meshdata_types.h", "DNA_modifier_types.h", - "DNA_lattice_types.h", + "DNA_lattice_types.h", "DNA_object_types.h", "DNA_object_force.h", "DNA_object_fluidsim.h", "DNA_world_types.h", "DNA_scene_types.h", "DNA_view3d_types.h", - "DNA_view2d_types.h", + "DNA_view2d_types.h", "DNA_space_types.h", "DNA_userdef_types.h", "DNA_screen_types.h", diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index b0fcfb9b540..d285e0df313 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -327,7 +327,7 @@ static void rna_def_gpencil_stroke(BlenderRNA *brna) RNA_def_property_collection_sdna(prop, NULL, "points", "totpoints"); RNA_def_property_struct_type(prop, "GPencilStrokePoint"); RNA_def_property_ui_text(prop, "Stroke Points", "Stroke data points"); - rna_def_gpencil_stroke_points_api(brna, prop); + rna_def_gpencil_stroke_points_api(brna, prop); prop = RNA_def_property(srna, "draw_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); @@ -376,7 +376,7 @@ static void rna_def_gpencil_frame(BlenderRNA *brna) RNA_def_property_collection_sdna(prop, NULL, "strokes", NULL); RNA_def_property_struct_type(prop, "GPencilStroke"); RNA_def_property_ui_text(prop, "Strokes", "Freehand curves defining the sketch on this frame"); - rna_def_gpencil_strokes_api(brna, prop); + rna_def_gpencil_strokes_api(brna, prop); /* Frame Number */ prop = RNA_def_property(srna, "frame_number", PROP_INT, PROP_NONE); diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c index 8eb47f4066c..54f3efcc84c 100644 --- a/source/blender/modifiers/intern/MOD_cloth.c +++ b/source/blender/modifiers/intern/MOD_cloth.c @@ -180,7 +180,7 @@ static void freeData(ModifierData *md) MEM_freeN(clmd->sim_parms); } if (clmd->coll_parms) - MEM_freeN(clmd->coll_parms); + MEM_freeN(clmd->coll_parms); BKE_ptcache_free_list(&clmd->ptcaches); clmd->point_cache = NULL; diff --git a/source/blender/modifiers/intern/MOD_decimate.c b/source/blender/modifiers/intern/MOD_decimate.c index 765e264365b..e7ece60121e 100644 --- a/source/blender/modifiers/intern/MOD_decimate.c +++ b/source/blender/modifiers/intern/MOD_decimate.c @@ -50,8 +50,8 @@ #include "BKE_tessmesh.h" /* testing only! - Campbell */ -// #define USE_DECIMATE_BMESH -// #include "PIL_time.h" +#define USE_DECIMATE_BMESH +#include "PIL_time.h" #ifdef WITH_MOD_DECIMATE @@ -89,7 +89,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob), BMEditMesh *em; BMesh *bm; - // TIMEIT_START(decim); + TIMEIT_START(decim); if (dmd->percent == 1.0f) { return dm; @@ -111,7 +111,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob), BMEdit_Free(em); MEM_freeN(em); - // TIMEIT_END(decim); + TIMEIT_END(decim); return result; } diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c index a94b4834d18..3387eaf679b 100644 --- a/source/blender/modifiers/intern/MOD_screw.c +++ b/source/blender/modifiers/intern/MOD_screw.c @@ -215,7 +215,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, if (totlen != 0.0f) { float zero[3] = {0.0f, 0.0f, 0.0f}; - float cp[3]; + float cp[3]; screw_ofs = closest_to_line_v3(cp, mtx_tx[3], zero, axis_vec); } else { @@ -831,7 +831,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, } /* close the loop*/ - if (close) { + if (close) { if (do_flip) { ml_new[3].v = i1; ml_new[2].v = i2; diff --git a/source/blender/nodes/composite/node_composite_tree.c b/source/blender/nodes/composite/node_composite_tree.c index 0d86ada8026..2d65d083131 100644 --- a/source/blender/nodes/composite/node_composite_tree.c +++ b/source/blender/nodes/composite/node_composite_tree.c @@ -301,7 +301,7 @@ struct bNodeTreeExec *ntreeCompositBeginExecTree(bNodeTree *ntree, int use_tree_ for (node= exec->nodetree->nodes.first; node; node= node->next) { /* initialize needed for groups */ - node->exec= 0; + node->exec= 0; for (sock= node->outputs.first; sock; sock= sock->next) { bNodeStack *ns= node_get_socket_stack(exec->stack, sock); diff --git a/source/blender/nodes/composite/node_composite_util.c b/source/blender/nodes/composite/node_composite_util.c index ad2d26d7c27..9e9810e2770 100644 --- a/source/blender/nodes/composite/node_composite_util.c +++ b/source/blender/nodes/composite/node_composite_util.c @@ -72,7 +72,7 @@ CompBuf *dupalloc_compbuf(CompBuf *cbuf) dupbuf->xof= cbuf->xof; dupbuf->yof= cbuf->yof; - } + } return dupbuf; } @@ -94,7 +94,7 @@ CompBuf *pass_on_compbuf(CompBuf *cbuf) break; lastbuf->next= dupbuf; dupbuf->prev= lastbuf; - } + } return dupbuf; } diff --git a/source/blender/nodes/composite/nodes/node_composite_alphaOver.c b/source/blender/nodes/composite/nodes/node_composite_alphaOver.c index 86eb0aa2c83..26f2789b9bb 100644 --- a/source/blender/nodes/composite/nodes/node_composite_alphaOver.c +++ b/source/blender/nodes/composite/nodes/node_composite_alphaOver.c @@ -48,7 +48,7 @@ static bNodeSocketTemplate cmp_node_alphaover_out[]= { static void do_alphaover_premul(bNode *UNUSED(node), float *out, float *src, float *over, float *fac) { - /* Zero alpha values should still permit an add of RGB data */ + /* Zero alpha values should still permit an add of RGB data */ if (over[3]<0.0f) { copy_v4_v4(out, src); } @@ -62,7 +62,7 @@ static void do_alphaover_premul(bNode *UNUSED(node), float *out, float *src, flo out[1]= (mul*src[1]) + fac[0]*over[1]; out[2]= (mul*src[2]) + fac[0]*over[2]; out[3]= (mul*src[3]) + fac[0]*over[3]; - } + } } /* result will be still premul, but the over part is premulled */ diff --git a/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c b/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c index e05ef1ea5a5..7674ace42a3 100644 --- a/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c +++ b/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c @@ -33,14 +33,14 @@ /* **************** BILATERALBLUR ******************** */ static bNodeSocketTemplate cmp_node_bilateralblur_in[] = { - { SOCK_RGBA, 1, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f}, - { SOCK_RGBA, 1, N_("Determinator"), 1.0f, 1.0f, 1.0f, 1.0f}, - { -1, 0, "" } + { SOCK_RGBA, 1, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f}, + { SOCK_RGBA, 1, N_("Determinator"), 1.0f, 1.0f, 1.0f, 1.0f}, + { -1, 0, "" } }; static bNodeSocketTemplate cmp_node_bilateralblur_out[] = { - { SOCK_RGBA, 0, N_("Image")}, - { -1, 0, "" } + { SOCK_RGBA, 0, N_("Image")}, + { -1, 0, "" } }; #ifdef WITH_COMPOSITOR_LEGACY diff --git a/source/blender/nodes/composite/nodes/node_composite_boxmask.c b/source/blender/nodes/composite/nodes/node_composite_boxmask.c index 1ba522c0e5f..ff0fa0c971d 100644 --- a/source/blender/nodes/composite/nodes/node_composite_boxmask.c +++ b/source/blender/nodes/composite/nodes/node_composite_boxmask.c @@ -38,12 +38,12 @@ static bNodeSocketTemplate cmp_node_boxmask_in[]= { { SOCK_FLOAT, 1, N_("Mask"), 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, { SOCK_FLOAT, 1, N_("Value"), 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } + { -1, 0, "" } }; static bNodeSocketTemplate cmp_node_boxmask_out[]= { { SOCK_FLOAT, 0, N_("Mask"), 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } + { -1, 0, "" } }; static void node_composit_init_boxmask(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp)) diff --git a/source/blender/nodes/composite/nodes/node_composite_brightness.c b/source/blender/nodes/composite/nodes/node_composite_brightness.c index 2b8a394d6f2..b58c1c27b2a 100644 --- a/source/blender/nodes/composite/nodes/node_composite_brightness.c +++ b/source/blender/nodes/composite/nodes/node_composite_brightness.c @@ -72,7 +72,7 @@ static void do_brightnesscontrast(bNode *UNUSED(node), float *out, float *in, fl b = a * (brightness + delta); } - for (c=0; c<3; c++) { + for (c=0; c<3; c++) { i = in[c]; v = a*i + b; out[c] = v; diff --git a/source/blender/nodes/composite/nodes/node_composite_channelMatte.c b/source/blender/nodes/composite/nodes/node_composite_channelMatte.c index 06b77de463b..fdb656ead74 100644 --- a/source/blender/nodes/composite/nodes/node_composite_channelMatte.c +++ b/source/blender/nodes/composite/nodes/node_composite_channelMatte.c @@ -71,7 +71,7 @@ static void do_normalized_ycca_to_rgba2(bNode *UNUSED(node), float *out, float * static void do_channel_matte(bNode *node, float *out, float *in) { NodeChroma *c=(NodeChroma *)node->storage; - float alpha=0.0; + float alpha=0.0; switch (c->algorithm) { case 0: { /* Alpha=key_channel-limit channel */ diff --git a/source/blender/nodes/composite/nodes/node_composite_crop.c b/source/blender/nodes/composite/nodes/node_composite_crop.c index 9b1483d95cf..f93a4817c01 100644 --- a/source/blender/nodes/composite/nodes/node_composite_crop.c +++ b/source/blender/nodes/composite/nodes/node_composite_crop.c @@ -82,7 +82,7 @@ static void node_composit_exec_crop(void *UNUSED(data), bNode *node, bNodeStack outputrect.ymin=MIN2(ntxy->y1, ntxy->y2); if (node->custom1) { - /* this option crops the image size too */ + /* this option crops the image size too */ stackbuf= get_cropped_compbuf(&outputrect, cbuf->rect, cbuf->x, cbuf->y, cbuf->type); } else { diff --git a/source/blender/nodes/composite/nodes/node_composite_defocus.c b/source/blender/nodes/composite/nodes/node_composite_defocus.c index 1a9852264bf..34433f894f3 100644 --- a/source/blender/nodes/composite/nodes/node_composite_defocus.c +++ b/source/blender/nodes/composite/nodes/node_composite_defocus.c @@ -861,7 +861,7 @@ static void node_composit_exec_defocus(void *UNUSED(data), bNode *node, bNodeSta if (node->exec & NODE_BREAK) { free_compbuf(new); new= NULL; - } + } out[0]->data = new; if (zbuf_use && (zbuf_use != zbuf)) free_compbuf(zbuf_use); } diff --git a/source/blender/nodes/composite/nodes/node_composite_ellipsemask.c b/source/blender/nodes/composite/nodes/node_composite_ellipsemask.c index a97322a17c0..905090e93ad 100644 --- a/source/blender/nodes/composite/nodes/node_composite_ellipsemask.c +++ b/source/blender/nodes/composite/nodes/node_composite_ellipsemask.c @@ -38,12 +38,12 @@ static bNodeSocketTemplate cmp_node_ellipsemask_in[]= { { SOCK_FLOAT, 1, N_("Mask"), 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, { SOCK_FLOAT, 1, N_("Value"), 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } + { -1, 0, "" } }; static bNodeSocketTemplate cmp_node_ellipsemask_out[]= { { SOCK_FLOAT, 0, N_("Mask"), 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } + { -1, 0, "" } }; static void node_composit_init_ellipsemask(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp)) diff --git a/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c b/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c index c8784ceedb7..793ea2eb756 100644 --- a/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c +++ b/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c @@ -89,7 +89,7 @@ static void node_composit_exec_hue_sat(void *UNUSED(data), bNode *node, bNodeSta out[0]->data= stackbuf; - /* get rid of intermediary cbuf if it's extra */ + /* get rid of intermediary cbuf if it's extra */ if (stackbuf!=cbuf) free_compbuf(cbuf); } diff --git a/source/blender/nodes/composite/nodes/node_composite_image.c b/source/blender/nodes/composite/nodes/node_composite_image.c index 9f3874560ac..4f6a73c34c9 100644 --- a/source/blender/nodes/composite/nodes/node_composite_image.c +++ b/source/blender/nodes/composite/nodes/node_composite_image.c @@ -505,7 +505,7 @@ static void node_composit_exec_image(void *data, bNode *node, bNodeStack **UNUSE generate_preview(data, node, stackbuf); } } - } + } } #endif /* WITH_COMPOSITOR_LEGACY */ diff --git a/source/blender/nodes/composite/nodes/node_composite_invert.c b/source/blender/nodes/composite/nodes/node_composite_invert.c index b0e656b173b..277998ee355 100644 --- a/source/blender/nodes/composite/nodes/node_composite_invert.c +++ b/source/blender/nodes/composite/nodes/node_composite_invert.c @@ -33,14 +33,14 @@ /* **************** INVERT ******************** */ static bNodeSocketTemplate cmp_node_invert_in[]= { - { SOCK_FLOAT, 1, N_("Fac"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, - { SOCK_RGBA, 1, N_("Color"), 1.0f, 1.0f, 1.0f, 1.0f}, - { -1, 0, "" } + { SOCK_FLOAT, 1, N_("Fac"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, + { SOCK_RGBA, 1, N_("Color"), 1.0f, 1.0f, 1.0f, 1.0f}, + { -1, 0, "" } }; static bNodeSocketTemplate cmp_node_invert_out[]= { - { SOCK_RGBA, 0, N_("Color")}, - { -1, 0, "" } + { SOCK_RGBA, 0, N_("Color")}, + { -1, 0, "" } }; #ifdef WITH_COMPOSITOR_LEGACY diff --git a/source/blender/nodes/composite/nodes/node_composite_levels.c b/source/blender/nodes/composite/nodes/node_composite_levels.c index 601516c5bb0..4cc927aaa33 100644 --- a/source/blender/nodes/composite/nodes/node_composite_levels.c +++ b/source/blender/nodes/composite/nodes/node_composite_levels.c @@ -101,7 +101,7 @@ static void fill_bins(bNode *node, CompBuf* in, int* bins) bins[ivalue]+=1; } /*end if alpha */ } - } + } } static float brightness_mean(bNode *node, CompBuf* in) @@ -275,8 +275,8 @@ static void node_composit_exec_view_levels(void *data, bNode *node, bNodeStack * if (in[0]->hasinput==0) return; if (in[0]->data==NULL) return; - histogram=alloc_compbuf(256, 256, CB_RGBA, 1); - cbuf=typecheck_compbuf(in[0]->data, CB_RGBA); + histogram=alloc_compbuf(256, 256, CB_RGBA, 1); + cbuf=typecheck_compbuf(in[0]->data, CB_RGBA); /*initalize bins*/ for (x=0; x<256; x++) { diff --git a/source/blender/nodes/composite/nodes/node_composite_mapUV.c b/source/blender/nodes/composite/nodes/node_composite_mapUV.c index 04d2eaff4f4..e6c9d72294f 100644 --- a/source/blender/nodes/composite/nodes/node_composite_mapUV.c +++ b/source/blender/nodes/composite/nodes/node_composite_mapUV.c @@ -135,7 +135,7 @@ static void do_mapuv(CompBuf *stackbuf, CompBuf *cbuf, CompBuf *uvbuf, float thr } } - IMB_freeImBuf(ibuf); + IMB_freeImBuf(ibuf); } diff --git a/source/blender/nodes/composite/nodes/node_composite_math.c b/source/blender/nodes/composite/nodes/node_composite_math.c index 1bddfe0852a..96504b21365 100644 --- a/source/blender/nodes/composite/nodes/node_composite_math.c +++ b/source/blender/nodes/composite/nodes/node_composite_math.c @@ -34,14 +34,14 @@ /* **************** SCALAR MATH ******************** */ static bNodeSocketTemplate cmp_node_math_in[]= { - { SOCK_FLOAT, 1, N_("Value"), 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE}, - { SOCK_FLOAT, 1, N_("Value"), 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE}, - { -1, 0, "" } + { SOCK_FLOAT, 1, N_("Value"), 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE}, + { SOCK_FLOAT, 1, N_("Value"), 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE}, + { -1, 0, "" } }; static bNodeSocketTemplate cmp_node_math_out[]= { - { SOCK_FLOAT, 0, N_("Value")}, - { -1, 0, "" } + { SOCK_FLOAT, 0, N_("Value")}, + { -1, 0, "" } }; #ifdef WITH_COMPOSITOR_LEGACY diff --git a/source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c index ebc18cd19eb..97150020cfb 100644 --- a/source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c +++ b/source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c @@ -97,7 +97,7 @@ static void node_composit_exec_sephsva(void *UNUSED(data), bNode *node, bNodeSta /*not used anymore */ if (cbuf2!=cbuf) free_compbuf(cbuf2); - free_compbuf(cbuf); + free_compbuf(cbuf); } } diff --git a/source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c index 0c989ed3fc6..aaa10d45445 100644 --- a/source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c +++ b/source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c @@ -150,7 +150,7 @@ static void node_composit_exec_combrgba(void *UNUSED(data), bNode *node, bNodeSt do_combrgba, CB_VAL, CB_VAL, CB_VAL, CB_VAL); out[0]->data= stackbuf; - } + } } #endif /* WITH_COMPOSITOR_LEGACY */ diff --git a/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c index ccae7cfe57f..0d862d063f3 100644 --- a/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c +++ b/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c @@ -296,7 +296,7 @@ static void node_composit_exec_combycca(void *UNUSED(data), bNode *node, bNodeSt } out[0]->data= stackbuf; - } + } } #endif /* WITH_COMPOSITOR_LEGACY */ diff --git a/source/blender/nodes/composite/nodes/node_composite_texture.c b/source/blender/nodes/composite/nodes/node_composite_texture.c index 3fedccd7d12..01baa39807a 100644 --- a/source/blender/nodes/composite/nodes/node_composite_texture.c +++ b/source/blender/nodes/composite/nodes/node_composite_texture.c @@ -81,7 +81,7 @@ static void texture_procedural(CompBuf *cbuf, float *out, float xco, float yco) copy_v3_fl(col, col[3]); } } - else { + else { copy_v3_v3(col, nor); } diff --git a/source/blender/nodes/shader/nodes/node_shader_bump.c b/source/blender/nodes/shader/nodes/node_shader_bump.c index 315565e619b..665ff582aa8 100644 --- a/source/blender/nodes/shader/nodes/node_shader_bump.c +++ b/source/blender/nodes/shader/nodes/node_shader_bump.c @@ -36,14 +36,14 @@ /* **************** BUMP ******************** */ static bNodeSocketTemplate sh_node_bump_in[]= { - { SOCK_FLOAT, 1, "Strength", 0.1f, 0.0f, 0.0f, 0.0f, -1000.0f, 1000.0f}, - { SOCK_FLOAT, 1, "Height", 1.0f, 1.0f, 1.0f, 1.0f, -1000.0f, 1000.0f, PROP_NONE, SOCK_HIDE_VALUE}, - { -1, 0, "" } + { SOCK_FLOAT, 1, "Strength", 0.1f, 0.0f, 0.0f, 0.0f, -1000.0f, 1000.0f}, + { SOCK_FLOAT, 1, "Height", 1.0f, 1.0f, 1.0f, 1.0f, -1000.0f, 1000.0f, PROP_NONE, SOCK_HIDE_VALUE}, + { -1, 0, "" } }; static bNodeSocketTemplate sh_node_bump_out[]= { { SOCK_VECTOR, 0, "Normal"}, - { -1, 0, "" } + { -1, 0, "" } }; static int gpu_shader_bump(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out) diff --git a/source/blender/nodes/shader/nodes/node_shader_invert.c b/source/blender/nodes/shader/nodes/node_shader_invert.c index ef592a7e2ec..d1b773916d4 100644 --- a/source/blender/nodes/shader/nodes/node_shader_invert.c +++ b/source/blender/nodes/shader/nodes/node_shader_invert.c @@ -36,14 +36,14 @@ /* **************** INVERT ******************** */ static bNodeSocketTemplate sh_node_invert_in[]= { - { SOCK_FLOAT, 1, N_("Fac"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, - { SOCK_RGBA, 1, N_("Color"), 0.0f, 0.0f, 0.0f, 1.0f}, - { -1, 0, "" } + { SOCK_FLOAT, 1, N_("Fac"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, + { SOCK_RGBA, 1, N_("Color"), 0.0f, 0.0f, 0.0f, 1.0f}, + { -1, 0, "" } }; static bNodeSocketTemplate sh_node_invert_out[]= { - { SOCK_RGBA, 0, N_("Color")}, - { -1, 0, "" } + { SOCK_RGBA, 0, N_("Color")}, + { -1, 0, "" } }; static void node_shader_exec_invert(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **in, diff --git a/source/blender/nodes/shader/nodes/node_shader_material.c b/source/blender/nodes/shader/nodes/node_shader_material.c index 57865e072e7..bec43e05b24 100644 --- a/source/blender/nodes/shader/nodes/node_shader_material.c +++ b/source/blender/nodes/shader/nodes/node_shader_material.c @@ -139,7 +139,7 @@ static void node_shader_exec_material(void *data, bNode *node, bNodeStack **in, if (hasinput[MAT_IN_ALPHA]) nodestack_get_vec(&shi->alpha, SOCK_FLOAT, in[MAT_IN_ALPHA]); if (hasinput[MAT_IN_TRANSLUCENCY]) - nodestack_get_vec(&shi->translucency, SOCK_FLOAT, in[MAT_IN_TRANSLUCENCY]); + nodestack_get_vec(&shi->translucency, SOCK_FLOAT, in[MAT_IN_TRANSLUCENCY]); } shi->nodes= 1; /* temp hack to prevent trashadow recursion */ diff --git a/source/blender/nodes/shader/nodes/node_shader_math.c b/source/blender/nodes/shader/nodes/node_shader_math.c index c112ae1d448..956b4af8030 100644 --- a/source/blender/nodes/shader/nodes/node_shader_math.c +++ b/source/blender/nodes/shader/nodes/node_shader_math.c @@ -35,20 +35,20 @@ /* **************** SCALAR MATH ******************** */ static bNodeSocketTemplate sh_node_math_in[]= { - { SOCK_FLOAT, 1, N_("Value"), 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE}, - { SOCK_FLOAT, 1, N_("Value"), 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE}, - { -1, 0, "" } + { SOCK_FLOAT, 1, N_("Value"), 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE}, + { SOCK_FLOAT, 1, N_("Value"), 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE}, + { -1, 0, "" } }; static bNodeSocketTemplate sh_node_math_out[]= { - { SOCK_FLOAT, 0, N_("Value")}, - { -1, 0, "" } + { SOCK_FLOAT, 0, N_("Value")}, + { -1, 0, "" } }; static void node_shader_exec_math(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) { - switch (node->custom1) { + switch (node->custom1) { case 0: /* Add */ out[0]->vec[0]= in[0]->vec[0] + in[1]->vec[0]; @@ -77,7 +77,7 @@ bNodeStack **out) break; case 5: /* Cosine */ { - if (in[0]->hasinput || !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ + if (in[0]->hasinput || !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ out[0]->vec[0]= cos(in[0]->vec[0]); else out[0]->vec[0]= cos(in[1]->vec[0]); @@ -85,7 +85,7 @@ bNodeStack **out) break; case 6: /* Tangent */ { - if (in[0]->hasinput || !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ + if (in[0]->hasinput || !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ out[0]->vec[0]= tan(in[0]->vec[0]); else out[0]->vec[0]= tan(in[1]->vec[0]); @@ -193,7 +193,7 @@ bNodeStack **out) out[0]->vec[0]= 0.0f; } break; - } + } } static int gpu_shader_math(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) diff --git a/source/blender/nodes/shader/nodes/node_shader_output.c b/source/blender/nodes/shader/nodes/node_shader_output.c index 4434054abae..24e10b65ed8 100644 --- a/source/blender/nodes/shader/nodes/node_shader_output.c +++ b/source/blender/nodes/shader/nodes/node_shader_output.c @@ -62,7 +62,7 @@ static void node_shader_exec_output(void *data, bNode *node, bNodeStack **in, bN // copy_v3_v3(shr->nor, in[3]->vec); } - } + } } static int gpu_shader_output(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out) diff --git a/source/blender/nodes/shader/nodes/node_shader_squeeze.c b/source/blender/nodes/shader/nodes/node_shader_squeeze.c index adab396be02..afce712a38d 100644 --- a/source/blender/nodes/shader/nodes/node_shader_squeeze.c +++ b/source/blender/nodes/shader/nodes/node_shader_squeeze.c @@ -34,15 +34,15 @@ /* **************** VALUE SQUEEZE ******************** */ static bNodeSocketTemplate sh_node_squeeze_in[]= { - { SOCK_FLOAT, 1, N_("Value"), 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE}, - { SOCK_FLOAT, 1, N_("Width"), 1.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE}, - { SOCK_FLOAT, 1, N_("Center"), 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE}, - { -1, 0, "" } + { SOCK_FLOAT, 1, N_("Value"), 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE}, + { SOCK_FLOAT, 1, N_("Width"), 1.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE}, + { SOCK_FLOAT, 1, N_("Center"), 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE}, + { -1, 0, "" } }; static bNodeSocketTemplate sh_node_squeeze_out[]= { - { SOCK_FLOAT, 0, N_("Value")}, - { -1, 0, "" } + { SOCK_FLOAT, 0, N_("Value")}, + { -1, 0, "" } }; static void node_shader_exec_squeeze(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **in, diff --git a/source/blender/nodes/shader/nodes/node_shader_vectMath.c b/source/blender/nodes/shader/nodes/node_shader_vectMath.c index 007366c6082..08f1cee6a02 100644 --- a/source/blender/nodes/shader/nodes/node_shader_vectMath.c +++ b/source/blender/nodes/shader/nodes/node_shader_vectMath.c @@ -36,15 +36,15 @@ /* **************** VECTOR MATH ******************** */ static bNodeSocketTemplate sh_node_vect_math_in[]= { - { SOCK_VECTOR, 1, N_("Vector"), 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE}, - { SOCK_VECTOR, 1, N_("Vector"), 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE}, - { -1, 0, "" } + { SOCK_VECTOR, 1, N_("Vector"), 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE}, + { SOCK_VECTOR, 1, N_("Vector"), 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE}, + { -1, 0, "" } }; static bNodeSocketTemplate sh_node_vect_math_out[]= { - { SOCK_VECTOR, 0, N_("Vector")}, + { SOCK_VECTOR, 0, N_("Vector")}, { SOCK_FLOAT, 0, N_("Value")}, - { -1, 0, "" } + { -1, 0, "" } }; static void node_shader_exec_vect_math(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) diff --git a/source/blender/nodes/texture/nodes/node_texture_checker.c b/source/blender/nodes/texture/nodes/node_texture_checker.c index cd9c3170cf7..72e3520ebd4 100644 --- a/source/blender/nodes/texture/nodes/node_texture_checker.c +++ b/source/blender/nodes/texture/nodes/node_texture_checker.c @@ -62,7 +62,7 @@ static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack ** } else { tex_input_rgba(out, in[1], p, thread); - } + } } static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) diff --git a/source/blender/nodes/texture/nodes/node_texture_distance.c b/source/blender/nodes/texture/nodes/node_texture_distance.c index 29f08a0ded0..07424a81587 100644 --- a/source/blender/nodes/texture/nodes/node_texture_distance.c +++ b/source/blender/nodes/texture/nodes/node_texture_distance.c @@ -38,7 +38,7 @@ static bNodeSocketTemplate inputs[]= { { SOCK_VECTOR, 1, N_("Coordinate 1"), 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, PROP_NONE }, { SOCK_VECTOR, 1, N_("Coordinate 2"), 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, PROP_NONE }, - { -1, 0, "" } + { -1, 0, "" } }; static bNodeSocketTemplate outputs[]= { diff --git a/source/blender/nodes/texture/nodes/node_texture_invert.c b/source/blender/nodes/texture/nodes/node_texture_invert.c index 0339c3f0cf2..934a60451a4 100644 --- a/source/blender/nodes/texture/nodes/node_texture_invert.c +++ b/source/blender/nodes/texture/nodes/node_texture_invert.c @@ -35,13 +35,13 @@ /* **************** INVERT ******************** */ static bNodeSocketTemplate inputs[]= { - { SOCK_RGBA, 1, N_("Color"), 0.0f, 0.0f, 0.0f, 1.0f}, - { -1, 0, "" } + { SOCK_RGBA, 1, N_("Color"), 0.0f, 0.0f, 0.0f, 1.0f}, + { -1, 0, "" } }; static bNodeSocketTemplate outputs[]= { - { SOCK_RGBA, 0, N_("Color")}, - { -1, 0, "" } + { SOCK_RGBA, 0, N_("Color")}, + { -1, 0, "" } }; static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) diff --git a/source/blender/nodes/texture/nodes/node_texture_math.c b/source/blender/nodes/texture/nodes/node_texture_math.c index 36e9cac0827..b5ebc1f2c45 100644 --- a/source/blender/nodes/texture/nodes/node_texture_math.c +++ b/source/blender/nodes/texture/nodes/node_texture_math.c @@ -36,14 +36,14 @@ /* **************** SCALAR MATH ******************** */ static bNodeSocketTemplate inputs[]= { - { SOCK_FLOAT, 1, N_("Value"), 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE}, - { SOCK_FLOAT, 1, N_("Value"), 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE}, - { -1, 0, "" } + { SOCK_FLOAT, 1, N_("Value"), 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE}, + { SOCK_FLOAT, 1, N_("Value"), 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE}, + { -1, 0, "" } }; static bNodeSocketTemplate outputs[]= { - { SOCK_FLOAT, 0, N_("Value")}, - { -1, 0, "" } + { SOCK_FLOAT, 0, N_("Value")}, + { -1, 0, "" } }; static void valuefn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread) @@ -178,7 +178,7 @@ static void valuefn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor fprintf(stderr, "%s:%d: unhandeld value in switch statement: %d\n", __FILE__, __LINE__, node->custom1); - } + } } static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) diff --git a/source/blender/nodes/texture/nodes/node_texture_rotate.c b/source/blender/nodes/texture/nodes/node_texture_rotate.c index 2f997d36e71..8f50eaece4f 100644 --- a/source/blender/nodes/texture/nodes/node_texture_rotate.c +++ b/source/blender/nodes/texture/nodes/node_texture_rotate.c @@ -39,12 +39,12 @@ static bNodeSocketTemplate inputs[]= { { SOCK_RGBA, 1, N_("Color"), 0.0f, 0.0f, 0.0f, 1.0f}, { SOCK_FLOAT, 1, N_("Turns"), 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, PROP_NONE }, { SOCK_VECTOR, 1, N_("Axis"), 0.0f, 0.0f, 1.0f, 0.0f, -1.0f, 1.0f, PROP_DIRECTION }, - { -1, 0, "" } + { -1, 0, "" } }; static bNodeSocketTemplate outputs[]= { - { SOCK_RGBA, 0, N_("Color")}, - { -1, 0, "" } + { SOCK_RGBA, 0, N_("Color")}, + { -1, 0, "" } }; static void rotate(float new_co[3], float a, float ax[3], const float co[3]) diff --git a/source/blender/nodes/texture/nodes/node_texture_scale.c b/source/blender/nodes/texture/nodes/node_texture_scale.c index 130a21ba84d..4bc283fc33c 100644 --- a/source/blender/nodes/texture/nodes/node_texture_scale.c +++ b/source/blender/nodes/texture/nodes/node_texture_scale.c @@ -36,12 +36,12 @@ static bNodeSocketTemplate inputs[]= { { SOCK_RGBA, 1, N_("Color"), 0.0f, 0.0f, 0.0f, 1.0f }, { SOCK_VECTOR, 1, N_("Scale"), 1.0f, 1.0f, 1.0f, 0.0f, -10.0f, 10.0f, PROP_XYZ }, - { -1, 0, "" } + { -1, 0, "" } }; static bNodeSocketTemplate outputs[]= { - { SOCK_RGBA, 0, N_("Color")}, - { -1, 0, "" } + { SOCK_RGBA, 0, N_("Color")}, + { -1, 0, "" } }; static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) diff --git a/source/blender/nodes/texture/nodes/node_texture_translate.c b/source/blender/nodes/texture/nodes/node_texture_translate.c index 85f857ca2be..bce60198a5d 100644 --- a/source/blender/nodes/texture/nodes/node_texture_translate.c +++ b/source/blender/nodes/texture/nodes/node_texture_translate.c @@ -37,12 +37,12 @@ static bNodeSocketTemplate inputs[]= { { SOCK_RGBA, 1, N_("Color"), 0.0f, 0.0f, 0.0f, 1.0f}, { SOCK_VECTOR, 1, N_("Offset"), 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f, PROP_TRANSLATION }, - { -1, 0, "" } + { -1, 0, "" } }; static bNodeSocketTemplate outputs[]= { - { SOCK_RGBA, 0, N_("Color")}, - { -1, 0, "" } + { SOCK_RGBA, 0, N_("Color")}, + { -1, 0, "" } }; static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) diff --git a/source/blender/nodes/texture/nodes/node_texture_valToNor.c b/source/blender/nodes/texture/nodes/node_texture_valToNor.c index 73dcc72eb40..fe3ea908e26 100644 --- a/source/blender/nodes/texture/nodes/node_texture_valToNor.c +++ b/source/blender/nodes/texture/nodes/node_texture_valToNor.c @@ -36,12 +36,12 @@ static bNodeSocketTemplate inputs[]= { { SOCK_FLOAT, 1, N_("Val"), 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE }, { SOCK_FLOAT, 1, N_("Nabla"), 0.025f, 0.0f, 0.0f, 0.0f, 0.001f, 0.1f, PROP_UNSIGNED }, - { -1, 0, "" } + { -1, 0, "" } }; static bNodeSocketTemplate outputs[]= { - { SOCK_VECTOR, 0, N_("Normal") }, - { -1, 0, "" } + { SOCK_VECTOR, 0, N_("Normal") }, + { -1, 0, "" } }; static void normalfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) @@ -49,7 +49,7 @@ static void normalfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack * float new_co[3]; const float *co = p->co; - float nabla = tex_input_value(in[1], p, thread); + float nabla = tex_input_value(in[1], p, thread); float val; float nor[3]; diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c index 9492c8384dc..3b8193c422d 100644 --- a/source/blender/python/generic/py_capi_utils.c +++ b/source/blender/python/generic/py_capi_utils.c @@ -542,7 +542,7 @@ void PyC_RunQuicky(const char *filepath, int n, ...) if (fp) { PyGILState_STATE gilstate = PyGILState_Ensure(); - va_list vargs; + va_list vargs; int *sizes = PyMem_MALLOC(sizeof(int) * (n / 2)); int i; diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c index 3bf44e43c56..ad900343704 100644 --- a/source/blender/python/intern/bpy.c +++ b/source/blender/python/intern/bpy.c @@ -278,7 +278,7 @@ void BPy_init_modules(void) bpy_import_test("bpy_types"); PyModule_AddObject(mod, "data", BPY_rna_module()); /* imports bpy_types by running this */ bpy_import_test("bpy_types"); - PyModule_AddObject(mod, "props", BPY_rna_props()); + PyModule_AddObject(mod, "props", BPY_rna_props()); /* ops is now a python module that does the conversion from SOME_OT_foo -> some.foo */ PyModule_AddObject(mod, "ops", BPY_operator_module()); PyModule_AddObject(mod, "app", BPY_app_struct()); diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index bb116017f6b..6d9e4364066 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -1511,7 +1511,7 @@ static PyObject *BPy_RemoveProperty(PyObject *self, PyObject *args, PyObject *kw args = PyTuple_New(0); ret = BPy_RemoveProperty(self, args, kw); Py_DECREF(args); - return ret; + return ret; } else if (PyTuple_GET_SIZE(args) > 1) { PyErr_SetString(PyExc_ValueError, "all args must be keywords"); diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 861fb555bb4..1833000f69b 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -5564,7 +5564,7 @@ PyTypeObject pyrna_prop_collection_Type = { NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, /* tp_compare */ /* DEPRECATED in python 3.0! */ - NULL, /* subclassed */ /* tp_repr */ + NULL, /* subclassed */ /* tp_repr */ /* Method suites for standard classes */ @@ -5598,7 +5598,7 @@ PyTypeObject pyrna_prop_collection_Type = { /*** Assigned meaning in release 2.1 ***/ /*** rich comparisons ***/ - NULL, /* subclassed */ /* richcmpfunc tp_richcompare; */ + NULL, /* subclassed */ /* richcmpfunc tp_richcompare; */ /*** weak reference enabler ***/ #ifdef USE_WEAKREFS @@ -5683,7 +5683,7 @@ static PyTypeObject pyrna_prop_collection_idprop_Type = { /*** Assigned meaning in release 2.1 ***/ /*** rich comparisons ***/ - NULL, /* subclassed */ /* richcmpfunc tp_richcompare; */ + NULL, /* subclassed */ /* richcmpfunc tp_richcompare; */ /*** weak reference enabler ***/ #ifdef USE_WEAKREFS @@ -5830,7 +5830,7 @@ PyTypeObject pyrna_prop_collection_iter_Type = { NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, /* tp_compare */ /* DEPRECATED in python 3.0! */ - NULL, /* subclassed */ /* tp_repr */ + NULL, /* subclassed */ /* tp_repr */ /* Method suites for standard classes */ @@ -5868,7 +5868,7 @@ PyTypeObject pyrna_prop_collection_iter_Type = { /*** Assigned meaning in release 2.1 ***/ /*** rich comparisons ***/ - NULL, /* subclassed */ /* richcmpfunc tp_richcompare; */ + NULL, /* subclassed */ /* richcmpfunc tp_richcompare; */ /*** weak reference enabler ***/ #ifdef USE_WEAKREFS diff --git a/source/blender/quicktime/apple/qtkit_export.m b/source/blender/quicktime/apple/qtkit_export.m index 7b2e03ded6e..cfc43d3c548 100644 --- a/source/blender/quicktime/apple/qtkit_export.m +++ b/source/blender/quicktime/apple/qtkit_export.m @@ -159,7 +159,7 @@ int quicktime_videocodecType_from_rnatmpvalue(int rnatmpvalue) return qtVideoCodecList[i].codecType; } - return 0; + return 0; } /* Audio codec */ @@ -204,7 +204,7 @@ int quicktime_audiocodecType_from_rnatmpvalue(int rnatmpvalue) return qtAudioCodecList[i].codecType; } - return 0; + return 0; } @@ -647,7 +647,7 @@ int append_qt(struct RenderData *rd, int start_frame, int frame, int *pixels, in if (qtexport->audioFile) { UInt32 audioPacketsConverted; /* Append audio */ - while (qtexport->audioTotalExportedFrames < qtexport->audioLastFrame) { + while (qtexport->audioTotalExportedFrames < qtexport->audioLastFrame) { qtexport->audioBufferList.mNumberBuffers = 1; qtexport->audioBufferList.mBuffers[0].mNumberChannels = qtexport->audioOutputFormat.mChannelsPerFrame; @@ -683,7 +683,7 @@ int append_qt(struct RenderData *rd, int start_frame, int frame, int *pixels, in } } - [pool drain]; + [pool drain]; return 1; } diff --git a/source/blender/quicktime/apple/qtkit_import.m b/source/blender/quicktime/apple/qtkit_import.m index 090c938fd7c..b568a1255a8 100644 --- a/source/blender/quicktime/apple/qtkit_import.m +++ b/source/blender/quicktime/apple/qtkit_import.m @@ -312,7 +312,7 @@ int startquicktime (struct anim *anim) pool = [[NSAutoreleasePool alloc] init]; - [QTMovie enterQTKitOnThread]; + [QTMovie enterQTKitOnThread]; attributes = [NSDictionary dictionaryWithObjectsAndKeys: [NSString stringWithCString:anim->name @@ -543,7 +543,7 @@ ImBuf *imb_quicktime_decode(unsigned char *mem, int size, int flags) if (ENDIAN_ORDER == B_ENDIAN) IMB_convert_rgba_to_abgr(ibuf); /* return successfully */ - return (ibuf); + return (ibuf); } diff --git a/source/blender/quicktime/apple/quicktime_export.c b/source/blender/quicktime/apple/quicktime_export.c index 1daf78b071a..1c4ab5a4b0e 100644 --- a/source/blender/quicktime/apple/quicktime_export.c +++ b/source/blender/quicktime/apple/quicktime_export.c @@ -178,7 +178,7 @@ int quicktime_videocodecType_from_rnatmpvalue(int rnatmpvalue) return qtVideoCodecList[i].codecType; } - return 0; + return 0; } @@ -804,7 +804,7 @@ static int request_qtcodec_settings(bContext *C, wmOperator *op) qtdata->aDataRateSetting.minSpatialQuality = (rd->qtcodecsettings.minSpatialQuality * codecLosslessQuality) / 100; qtdata->aDataRateSetting.minTemporalQuality = (rd->qtcodecsettings.minTemporalQuality * codecLosslessQuality) / 100; - qtdata->aDataRateSetting.frameDuration = rd->frs_sec; + qtdata->aDataRateSetting.frameDuration = rd->frs_sec; err = SCSetInfo(qtdata->theComponent, scTemporalSettingsType, &qtdata->gTemporalSettings); CheckError(err, "SCSetInfo1 error", op->reports); diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h index a29994a430d..7777a220512 100644 --- a/source/blender/render/extern/include/RE_pipeline.h +++ b/source/blender/render/extern/include/RE_pipeline.h @@ -83,7 +83,7 @@ typedef struct RenderLayer { /* copy of RenderData */ char name[RE_MAXNAME]; unsigned int lay, lay_zmask, lay_exclude; - int layflag, passflag, pass_xor; + int layflag, passflag, pass_xor; struct Material *mat_override; struct Group *light_override; diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h index 8474d9ff09e..1e62ab6d14d 100644 --- a/source/blender/render/intern/include/render_types.h +++ b/source/blender/render/intern/include/render_types.h @@ -128,7 +128,7 @@ struct Render /* if render with single-layer option, other rendered layers are stored here */ RenderResult *pushedresult; /* a list of RenderResults, for fullsample */ - ListBase fullresult; + ListBase fullresult; /* read/write mutex, all internal code that writes to re->result must use a * write lock, all external code must use a read lock. internal code is assumed * to not conflict with writes, so no lock used for that */ diff --git a/source/blender/render/intern/include/shadbuf.h b/source/blender/render/intern/include/shadbuf.h index 5cde8e5106a..7c168baada7 100644 --- a/source/blender/render/intern/include/shadbuf.h +++ b/source/blender/render/intern/include/shadbuf.h @@ -79,19 +79,19 @@ float ISB_getshadow(ShadeInput *shi, ShadBuf *shb); /* buffer samples, allocated in camera buffer and pointed to in lampbuffer nodes */ typedef struct ISBSample { - float zco[3]; /* coordinate in lampview projection */ - short *shadfac; /* initialized zero = full lighted */ - int obi; /* object for face lookup */ - int facenr; /* index in faces list */ + float zco[3]; /* coordinate in lampview projection */ + short *shadfac; /* initialized zero = full lighted */ + int obi; /* object for face lookup */ + int facenr; /* index in faces list */ } ISBSample; /* transparent version of buffer sample */ typedef struct ISBSampleA { - float zco[3]; /* coordinate in lampview projection */ - short *shadfac; /* NULL = full lighted */ - int obi; /* object for face lookup */ - int facenr; /* index in faces list */ - struct ISBSampleA *next; /* in end, we want the first items to align with ISBSample */ + float zco[3]; /* coordinate in lampview projection */ + short *shadfac; /* NULL = full lighted */ + int obi; /* object for face lookup */ + int facenr; /* index in faces list */ + struct ISBSampleA *next; /* in end, we want the first items to align with ISBSample */ } ISBSampleA; /* used for transparent storage only */ diff --git a/source/blender/render/intern/raytrace/bvh.h b/source/blender/render/intern/raytrace/bvh.h index 103c04a590f..47d3a892e84 100644 --- a/source/blender/render/intern/raytrace/bvh.h +++ b/source/blender/render/intern/raytrace/bvh.h @@ -91,7 +91,7 @@ static inline int rayobject_bb_intersect_test(const Isect *isec, const float *_b if (t1x > t2y || t2x < t1y || t1x > t2z || t2x < t1z || t1y > t2z || t2y < t1z) return 0; if (t2x < 0.0f || t2y < 0.0f || t2z < 0.0f) return 0; if (t1x > isec->dist || t1y > isec->dist || t1z > isec->dist) return 0; - RE_RC_COUNT(isec->raycounter->bb.hit); + RE_RC_COUNT(isec->raycounter->bb.hit); return 1; } diff --git a/source/blender/render/intern/raytrace/rayobject_blibvh.cpp b/source/blender/render/intern/raytrace/rayobject_blibvh.cpp index 2d642a0a0d8..198577f61c6 100644 --- a/source/blender/render/intern/raytrace/rayobject_blibvh.cpp +++ b/source/blender/render/intern/raytrace/rayobject_blibvh.cpp @@ -79,7 +79,7 @@ typedef struct BVHObject { RayObject *RE_rayobject_blibvh_create(int size) { BVHObject *obj = (BVHObject *)MEM_callocN(sizeof(BVHObject), "BVHObject"); - assert(RE_rayobject_isAligned(obj)); /* RayObject API assumes real data to be 4-byte aligned */ + assert(RE_rayobject_isAligned(obj)); /* RayObject API assumes real data to be 4-byte aligned */ obj->rayobj.api = &bvh_api; obj->bvh = BLI_bvhtree_new(size, 0.0, 4, 6); @@ -137,7 +137,7 @@ static void RE_rayobject_blibvh_add(RayObject *o, RayObject *ob) DO_MIN(min_max, obj->bb[0]); DO_MAX(min_max + 3, obj->bb[1]); - BLI_bvhtree_insert(obj->bvh, obj->next_leaf - obj->leafs, min_max, 2); + BLI_bvhtree_insert(obj->bvh, obj->next_leaf - obj->leafs, min_max, 2); *(obj->next_leaf++) = ob; } diff --git a/source/blender/render/intern/raytrace/rayobject_instance.cpp b/source/blender/render/intern/raytrace/rayobject_instance.cpp index c3e761ae069..f797f7a4311 100644 --- a/source/blender/render/intern/raytrace/rayobject_instance.cpp +++ b/source/blender/render/intern/raytrace/rayobject_instance.cpp @@ -59,7 +59,7 @@ static RayObjectAPI instance_api = RE_rayobject_instance_free, RE_rayobject_instance_bb, RE_rayobject_instance_cost, - RE_rayobject_instance_hint_bb + RE_rayobject_instance_hint_bb }; typedef struct InstanceRayObject { diff --git a/source/blender/render/intern/raytrace/rayobject_internal.h b/source/blender/render/intern/raytrace/rayobject_internal.h index 07672f7bfb2..92ac39909a8 100644 --- a/source/blender/render/intern/raytrace/rayobject_internal.h +++ b/source/blender/render/intern/raytrace/rayobject_internal.h @@ -50,7 +50,7 @@ typedef int (*RE_rayobjectcontrol_test_break_callback)(void *data); typedef struct RayObjectControl { void *data; - RE_rayobjectcontrol_test_break_callback test_break; + RE_rayobjectcontrol_test_break_callback test_break; } RayObjectControl; /* Returns true if for some reason a heavy processing function should stop diff --git a/source/blender/render/intern/raytrace/rayobject_qbvh.cpp b/source/blender/render/intern/raytrace/rayobject_qbvh.cpp index 16d70297a34..33ce3bd33d5 100644 --- a/source/blender/render/intern/raytrace/rayobject_qbvh.cpp +++ b/source/blender/render/intern/raytrace/rayobject_qbvh.cpp @@ -68,7 +68,7 @@ void bvh_done<QBVHTree>(QBVHTree *obj) //Build and optimize the tree //TODO do this in 1 pass (half memory usage during building) - VBVHNode *root = BuildBinaryVBVH<VBVHNode>(arena1, &obj->rayobj.control).transform(obj->builder); + VBVHNode *root = BuildBinaryVBVH<VBVHNode>(arena1, &obj->rayobj.control).transform(obj->builder); if (RE_rayobjectcontrol_test_break(&obj->rayobj.control)) { BLI_memarena_free(arena1); diff --git a/source/blender/render/intern/raytrace/rayobject_raycounter.cpp b/source/blender/render/intern/raytrace/rayobject_raycounter.cpp index 7d86b6cf8cb..5335bf50cbc 100644 --- a/source/blender/render/intern/raytrace/rayobject_raycounter.cpp +++ b/source/blender/render/intern/raytrace/rayobject_raycounter.cpp @@ -43,10 +43,10 @@ void RE_RC_INFO(RayCounter *info) printf("\n"); printf("BB tests: %llu\n", info->bb.test ); printf("BB hits: %llu\n", info->bb.hit ); - printf("\n"); + printf("\n"); printf("SIMD BB tests: %llu\n", info->simd_bb.test ); printf("SIMD BB hits: %llu\n", info->simd_bb.hit ); - printf("\n"); + printf("\n"); printf("Primitives tests: %llu\n", info->faces.test ); printf("Primitives hits: %llu\n", info->faces.hit ); printf("------------------------------------\n"); diff --git a/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp b/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp index 678aa8e5634..3ca21e14e4e 100644 --- a/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp +++ b/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp @@ -77,7 +77,7 @@ RTBuilder *rtbuild_create(int size) for (int i = 0; i < 3; i++) { builder->sorted_begin[i] = (RTBuilder::Object **)MEM_mallocN(sizeof(RTBuilder::Object *) * size, "RTBuilder.sorted_objects"); builder->sorted_end[i] = builder->sorted_begin[i]; - } + } return builder; @@ -224,7 +224,7 @@ int rtbuild_mean_split(RTBuilder *b, int nchilds, int axis) Mleafs_per_child = s / nchilds; mleafs_per_child = Mleafs_per_child / nchilds; - //split min leafs per child + //split min leafs per child b->child_offset[0] = 0; for (i = 1; i <= nchilds; i++) b->child_offset[i] = mleafs_per_child; @@ -295,7 +295,7 @@ int rtbuild_median_split(RTBuilder *b, float *separators, int nchilds, int axis) return rtbuild_mean_split(b, nchilds, axis); return nchilds; - } + } } int rtbuild_median_split_largest_axis(RTBuilder *b, int nchilds) @@ -324,7 +324,7 @@ struct SweepCost { /* Object Surface Area Heuristic splitter */ int rtbuild_heuristic_object_split(RTBuilder *b, int nchilds) { - int size = rtbuild_size(b); + int size = rtbuild_size(b); assert(nchilds == 2); assert(size > 1); int baxis = -1, boffset = 0; @@ -429,7 +429,7 @@ int rtbuild_heuristic_object_split(RTBuilder *b, int nchilds) for (int i = 0; i < 3; i++) std::stable_partition(b->sorted_begin[i], b->sorted_end[i], selected_node); - return nchilds; + return nchilds; } /* @@ -494,7 +494,7 @@ int bb_largest_axis(const float min[3], const float max[3]) return 1; else return 2; - } + } } /* only returns 0 if merging inner and outerbox would create a box larger than outer box */ @@ -508,5 +508,5 @@ int bb_fits_inside(const float outer_min[3], const float outer_max[3], for (i = 0; i < 3; i++) if (outer_max[i] < inner_max[i]) return 0; - return 1; + return 1; } diff --git a/source/blender/render/intern/raytrace/rayobject_vbvh.cpp b/source/blender/render/intern/raytrace/rayobject_vbvh.cpp index 85c9d0d402f..d03bdb74407 100644 --- a/source/blender/render/intern/raytrace/rayobject_vbvh.cpp +++ b/source/blender/render/intern/raytrace/rayobject_vbvh.cpp @@ -112,7 +112,7 @@ void bvh_done<VBVHTree>(VBVHTree *obj) //Finds the optimal packing of this tree using a given cost model //TODO this uses quite a lot of memory, find ways to reduce memory usage during building - OVBVHNode *root = BuildBinaryVBVH<OVBVHNode>(arena2).transform(obj->builder); + OVBVHNode *root = BuildBinaryVBVH<OVBVHNode>(arena2).transform(obj->builder); VBVH_optimalPackSIMD<OVBVHNode, PackCost>(PackCost()).transform(root); obj->root = Reorganize_VBVH<OVBVHNode>(arena1).transform(root); @@ -125,7 +125,7 @@ void bvh_done<VBVHTree>(VBVHTree *obj) obj->builder = NULL; obj->node_arena = arena1; - obj->cost = 1.0; + obj->cost = 1.0; } template<int StackSize> diff --git a/source/blender/render/intern/raytrace/reorganize.h b/source/blender/render/intern/raytrace/reorganize.h index a9ed71a76bc..9d9711eee56 100644 --- a/source/blender/render/intern/raytrace/reorganize.h +++ b/source/blender/render/intern/raytrace/reorganize.h @@ -75,7 +75,7 @@ void reorganize_find_fittest_parent(Node *tree, Node *node, std::pair<float, Nod float pcost = bb_area(parent->bb, parent->bb + 3); cost = std::min(cost, std::make_pair(pcost, parent) ); for (Node *child = parent->child; child; child = child->sibling) - q.push(child); + q.push(child); } } } @@ -140,7 +140,7 @@ void remove_useless(Node *node, Node **new_node) (*prev)->sibling = next; prev = &((*prev)->sibling); } - } + } } if (node->child) { if (RE_rayobject_isAligned(node->child) && node->child->sibling == 0) @@ -181,7 +181,7 @@ void pushup(Node *parent) *prev = child; prev = &(*prev)->sibling; child = *prev; - } + } } for (Node *child = parent->child; RE_rayobject_isAligned(child) && child; child = child->sibling) @@ -205,13 +205,13 @@ void pushup_simd(Node *parent) n += (cn - 1); append_sibling(child, child->child); child = child->sibling; - *prev = child; + *prev = child; } else { *prev = child; prev = &(*prev)->sibling; child = *prev; - } + } } for (Node *child = parent->child; RE_rayobject_isAligned(child) && child; child = child->sibling) @@ -320,7 +320,7 @@ struct OVBVHNode { /* * Reorganize the node based on calculated cut costs - */ + */ int best_cutsize; void set_cut(int cutsize, OVBVHNode ***cut) { @@ -357,7 +357,7 @@ struct OVBVHNode { //Optimize new childs for (OVBVHNode *child = this->child; child && RE_rayobject_isAligned(child); child = child->sibling) child->optimize(); - } + } } }; @@ -431,7 +431,7 @@ struct VBVH_optimalPackSIMD { current_size -= bt[j][current_size]; } } - } + } } }; @@ -493,6 +493,6 @@ struct VBVH_optimalPackSIMD { if ((G.debug & G_DEBUG) && first) printf("expected cost = %f (%d)\n", node->cut_cost[0], node->best_cutsize); node->optimize(); } - return node; - } + return node; + } }; diff --git a/source/blender/render/intern/raytrace/svbvh.h b/source/blender/render/intern/raytrace/svbvh.h index 4fdf3ac23e8..a515b986d77 100644 --- a/source/blender/render/intern/raytrace/svbvh.h +++ b/source/blender/render/intern/raytrace/svbvh.h @@ -96,7 +96,7 @@ static int svbvh_bb_intersect_test(const Isect *isec, const float *_bb) if (t2x < 0.0 || t2y < 0.0 || t2z < 0.0) return 0; if (t1x > isec->dist || t1y > isec->dist || t1z > isec->dist) return 0; - RE_RC_COUNT(isec->raycounter->bb.hit); + RE_RC_COUNT(isec->raycounter->bb.hit); return 1; } @@ -307,7 +307,7 @@ struct Reorganize_SVBVH { prepare_for_simd(node); return node; - } + } }; #endif /* __SSE__ */ diff --git a/source/blender/render/intern/raytrace/vbvh.h b/source/blender/render/intern/raytrace/vbvh.h index ec671f95c76..9755bf89668 100644 --- a/source/blender/render/intern/raytrace/vbvh.h +++ b/source/blender/render/intern/raytrace/vbvh.h @@ -233,6 +233,6 @@ struct Reorganize_VBVH { *child_ptr = 0; return node; - } + } }; #endif diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index 50d2515169b..ea3673c28f8 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -227,7 +227,7 @@ void RE_make_stars(Render *re, Scene *scenev3d, void (*initfunc)(void), hlfrand = 2.0 * dblrand; if (initfunc) { - initfunc(); + initfunc(); } if (re) /* add render object for stars */ @@ -364,7 +364,7 @@ static void split_v_renderfaces(ObjectRen *obr, int startvlak, int UNUSED(startv if (v==0) { vlr->v1 = RE_vertren_copy(obr, vlr->v1); - } + } } } } @@ -882,7 +882,7 @@ static void autosmooth(Render *UNUSED(re), ObjectRen *obr, float mat[][4], int d else normal_tri_v3(vlr->n, vlr->v3->co, vlr->v2->co, vlr->v1->co); } - } + } } /* ------------------------------------------------------------------------- */ @@ -1939,7 +1939,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem copy_v3_v3(state.vel, (cache+k)->vel); } else - continue; + continue; if (k > 0) curlen += len_v3v3((cache+k-1)->co, (cache+k)->co); @@ -2367,7 +2367,7 @@ static void displace_render_face(Render *re, ObjectRen *obr, VlakRen *vlr, float /* Recalculate the face normal - if flipped before, flip now */ if (vlr->v4) { normal_quad_v3(vlr->n, vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co); - } + } else { normal_tri_v3(vlr->n, vlr->v3->co, vlr->v2->co, vlr->v1->co); } @@ -2536,7 +2536,7 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar, copy_v3_v3(v1->co, data); data += 3; if (orco) { v1->orco= orco; orco+= 3; orcoret++; - } + } mul_m4_v3(mat, v1->co); for (v = 1; v < sizev; v++) { @@ -2544,7 +2544,7 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar, copy_v3_v3(ver->co, data); data += 3; if (orco) { ver->orco= orco; orco+= 3; orcoret++; - } + } mul_m4_v3(mat, ver->co); } /* if V-cyclic, add extra vertices at end of the row */ @@ -2554,8 +2554,8 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar, if (orco) { ver->orco= orco; orco+=3; orcoret++; //orcobase + 3*(u*sizev + 0); } - } - } + } + } /* Done before next loop to get corner vert */ if (dl->flag & DL_CYCL_U) nsizev++; @@ -2608,7 +2608,7 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar, p1++; p2++; p3++; p4++; } - } + } /* fix normals for U resp. V cyclic faces */ sizeu--; sizev--; /* dec size for face array */ if (dl->flag & DL_CYCL_V) { @@ -3616,22 +3616,22 @@ static void area_lamp_vectors(LampRen *lar) /* corner vectors */ lar->area[0][0]= lar->co[0] - xsize*lar->mat[0][0] - ysize*lar->mat[1][0]; lar->area[0][1]= lar->co[1] - xsize*lar->mat[0][1] - ysize*lar->mat[1][1]; - lar->area[0][2]= lar->co[2] - xsize*lar->mat[0][2] - ysize*lar->mat[1][2]; + lar->area[0][2]= lar->co[2] - xsize*lar->mat[0][2] - ysize*lar->mat[1][2]; /* corner vectors */ lar->area[1][0]= lar->co[0] - xsize*lar->mat[0][0] + ysize*lar->mat[1][0]; lar->area[1][1]= lar->co[1] - xsize*lar->mat[0][1] + ysize*lar->mat[1][1]; - lar->area[1][2]= lar->co[2] - xsize*lar->mat[0][2] + ysize*lar->mat[1][2]; + lar->area[1][2]= lar->co[2] - xsize*lar->mat[0][2] + ysize*lar->mat[1][2]; /* corner vectors */ lar->area[2][0]= lar->co[0] + xsize*lar->mat[0][0] + ysize*lar->mat[1][0]; lar->area[2][1]= lar->co[1] + xsize*lar->mat[0][1] + ysize*lar->mat[1][1]; - lar->area[2][2]= lar->co[2] + xsize*lar->mat[0][2] + ysize*lar->mat[1][2]; + lar->area[2][2]= lar->co[2] + xsize*lar->mat[0][2] + ysize*lar->mat[1][2]; /* corner vectors */ lar->area[3][0]= lar->co[0] + xsize*lar->mat[0][0] - ysize*lar->mat[1][0]; lar->area[3][1]= lar->co[1] + xsize*lar->mat[0][1] - ysize*lar->mat[1][1]; - lar->area[3][2]= lar->co[2] + xsize*lar->mat[0][2] - ysize*lar->mat[1][2]; + lar->area[3][2]= lar->co[2] + xsize*lar->mat[0][2] - ysize*lar->mat[1][2]; /* only for correction button size, matrix size works on energy */ lar->areasize= lar->dist*lar->dist/(4.0f*xsize*ysize); } @@ -5594,7 +5594,7 @@ void RE_Database_FromScene_Vectors(Render *re, Main *bmain, Scene *sce, unsigned re->i.infostr= "Calculating next frame vectors"; database_fromscene_vectors(re, sce, lay, +1); - } + } /* copy away vertex info */ copy_dbase_object_vectors(re, &newtable); diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c index 910307f370b..f01f37019a0 100644 --- a/source/blender/render/intern/source/envmap.c +++ b/source/blender/render/intern/source/envmap.c @@ -76,7 +76,7 @@ static void envmap_split_ima(EnvMap *env, ImBuf *ibuf) BLI_lock_thread(LOCK_IMAGE); if (env->cube[1] == NULL) { - BKE_free_envmapdata(env); + BKE_free_envmapdata(env); dx = ibuf->y; dx /= 2; @@ -120,7 +120,7 @@ static void envmap_split_ima(EnvMap *env, ImBuf *ibuf) IMB_float_from_rect(env->cube[1]); } } - } + } BLI_unlock_thread(LOCK_IMAGE); } @@ -576,7 +576,7 @@ void make_envmaps(Render *re) re->display_init(re->dih, re->result); re->display_clear(re->dch, re->result); // re->flag |= R_REDRAW_PRV; - } + } /* restore */ re->r.mode |= trace; diff --git a/source/blender/render/intern/source/gammaCorrectionTables.c b/source/blender/render/intern/source/gammaCorrectionTables.c index 1c2613e8d18..8efdf472232 100644 --- a/source/blender/render/intern/source/gammaCorrectionTables.c +++ b/source/blender/render/intern/source/gammaCorrectionTables.c @@ -107,13 +107,13 @@ void makeGammaTables(float gamma) color_step = 1.0 / RE_GAMMA_TABLE_SIZE; inv_color_step = (float) RE_GAMMA_TABLE_SIZE; - /* We could squeeze out the two range tables to gain some memory. */ + /* We could squeeze out the two range tables to gain some memory. */ for (i = 0; i < RE_GAMMA_TABLE_SIZE; i++) { - color_domain_table[i] = i * color_step; + color_domain_table[i] = i * color_step; gamma_range_table[i] = pow(color_domain_table[i], - valid_gamma); + valid_gamma); inv_gamma_range_table[i] = pow(color_domain_table[i], - valid_inv_gamma); + valid_inv_gamma); } /* The end of the table should match 1.0 carefully. In order to avoid */ diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c index e491b00ae85..64cd62ee98b 100644 --- a/source/blender/render/intern/source/imagetexture.c +++ b/source/blender/render/intern/source/imagetexture.c @@ -102,7 +102,7 @@ static void ibuf_get_color(float col[4], struct ImBuf *ibuf, int x, int y) col[1] = ((float)rect[1])*(1.0f/255.0f); col[2] = ((float)rect[2])*(1.0f/255.0f); col[3] = ((float)rect[3])*(1.0f/255.0f); - } + } } int imagewrap(Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], TexResult *texres) @@ -209,7 +209,7 @@ int imagewrap(Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], TexResul if (tex->imaflag & TEX_USEALPHA) { if ((tex->imaflag & TEX_CALCALPHA) == 0) { texres->talpha = TRUE; - } + } } /* interpolate */ @@ -1011,7 +1011,7 @@ static void image_mipmap_test(Tex *tex, ImBuf *ibuf) if (ibuf->userflags & IB_MIPMAP_INVALID) { IMB_remakemipmap(ibuf, tex->imaflag & TEX_GAUSS_MIP); ibuf->userflags &= ~IB_MIPMAP_INVALID; - } + } BLI_unlock_thread(LOCK_IMAGE); } if (ibuf->mipmap[0] == NULL) { diff --git a/source/blender/render/intern/source/occlusion.c b/source/blender/render/intern/source/occlusion.c index 895c5d6c8fb..ed0ae950aa3 100644 --- a/source/blender/render/intern/source/occlusion.c +++ b/source/blender/render/intern/source/occlusion.c @@ -1130,7 +1130,7 @@ static void normalizef(float *n) n[0] *= d; n[1] *= d; n[2] *= d; - } + } } /* TODO: exact duplicate of ff_quad_form_factor() in math_geom.c diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 869a9d59444..fdaf366b148 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -499,7 +499,7 @@ void RE_InitState(Render *re, Render *source, RenderData *rd, SceneRenderLayer * } /* always call, checks for gamma, gamma tables and jitter too */ - make_sample_tables(re); + make_sample_tables(re); /* if preview render, we try to keep old result */ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE); @@ -984,7 +984,7 @@ static void addblur_rect_key(RenderResult *rr, float *rectf, float *rectf1, floa rf[1] = mfac * rf[1] + blurfac * rf1[1]; rf[2] = mfac * rf[2] + blurfac * rf1[2]; rf[3] = mfac * rf[3] + blurfac * rf1[3]; - } + } } } rectf += stride; @@ -1076,7 +1076,7 @@ static void do_render_blur_3d(Render *re) /* weak... the display callback wants an active renderlayer pointer... */ re->result->renlay = render_get_active_layer(re, re->result); - re->display_draw(re->ddh, re->result, NULL); + re->display_draw(re->ddh, re->result, NULL); } @@ -1567,7 +1567,7 @@ static void do_render_composite_fields_blur_3d(Render *re) ntreeFreeCache(ntree); do_render_fields_blur_3d(re); - } + } else { /* ensure new result gets added, like for regular renders */ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE); @@ -2140,7 +2140,7 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie IMB_freeImBuf(ibuf); printf("Append frame %d", scene->r.cfra); - } + } else { if (name_override) BLI_strncpy(name, name_override, sizeof(name)); diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c index 8e6078b18e0..c4df041a5ae 100644 --- a/source/blender/render/intern/source/pixelshading.c +++ b/source/blender/render/intern/source/pixelshading.c @@ -614,7 +614,7 @@ void shadeSkyPixel(float collector[4], float fx, float fy, short thread) copy_v3_v3(collector, &R.wrld.horr); collector[3] = 0.0f; - } + } else { /* 2. */ diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c index f8462dcd888..a540cdb85d5 100644 --- a/source/blender/render/intern/source/pointdensity.c +++ b/source/blender/render/intern/source/pointdensity.c @@ -171,7 +171,7 @@ static void pointdensity_cache_psys(Render *re, PointDensity *pd, Object *ob, Pa pd->point_data[i*3 + 0] = state.vel[0]; pd->point_data[i*3 + 1] = state.vel[1]; pd->point_data[i*3 + 2] = state.vel[2]; - } + } if (data_used & POINT_DATA_LIFE) { float pa_time; @@ -419,7 +419,7 @@ int pointdensitytex(Tex *tex, const float texvec[3], TexResult *texres) texres->tin = 0.0f; - if ((!pd) || (!pd->point_tree)) + if ((!pd) || (!pd->point_tree)) return 0; init_pointdensityrangedata(pd, &pdr, &density, vec, &age, diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c index 260a80d70e9..042803c150e 100644 --- a/source/blender/render/intern/source/rayshade.c +++ b/source/blender/render/intern/source/rayshade.c @@ -239,7 +239,7 @@ RayObject* makeraytree_object(Render *re, ObjectInstanceRen *obi) if (faces == 0) return NULL; - //Create Ray cast accelaration structure + //Create Ray cast accelaration structure raytree = RE_rayobject_create( re, re->r.raytrace_structure, faces ); if ( (re->r.raytrace_options & R_RAYTRACE_USE_LOCAL_COORDS) ) vlakprimitive = obr->rayprimitives = (VlakPrimitive*)MEM_callocN(faces*sizeof(VlakPrimitive), "ObjectRen primitives"); @@ -549,7 +549,7 @@ void shade_ray(Isect *is, ShadeInput *shi, ShadeResult *shr) /* raytrace likes to separate the spec color */ sub_v3_v3v3(shr->diff, shr->combined, shr->spec); - } + } } @@ -632,7 +632,7 @@ static float shade_by_transmission(Isect *is, ShadeInput *shi, ShadeResult *shr) if (shi->mat->tx_limit <= 0.0f) { d= 1.0f; - } + } else { float p; @@ -733,7 +733,7 @@ static void traceray(ShadeInput *origshi, ShadeResult *origshr, short depth, con if (depth>0) { float fr, fg, fb, f, f1; - if ((shi.mat->mode_l & MA_TRANSP) && shr.alpha < 1.0f && (shi.mat->mode_l & (MA_ZTRANSP | MA_RAYTRANSP))) { + if ((shi.mat->mode_l & MA_TRANSP) && shr.alpha < 1.0f && (shi.mat->mode_l & (MA_ZTRANSP | MA_RAYTRANSP))) { float nf, f, refract[3], tracol[4]; tracol[0]= shi.r; @@ -938,7 +938,7 @@ void init_jitter_plane(LampRen *lar) DP_energy(lar->jitter, fp, tot, lar->area_size, lar->area_sizey); } } - } + } /* create the dithered tables (could just check lamp type!) */ jitter_plane_offset(lar->jitter, lar->jitter+2*tot, tot, lar->area_size, lar->area_sizey, 0.5f, 0.0f); jitter_plane_offset(lar->jitter, lar->jitter+4*tot, tot, lar->area_size, lar->area_sizey, 0.5f, 0.5f); @@ -1151,7 +1151,7 @@ static void QMC_sampleHemiCosine(float vec[3], QMCSampler *qsa, int thread, int QMC_getSample(s, qsa, thread, num); - phi = s[0]*2.f*M_PI; + phi = s[0]*2.f*M_PI; sqr = s[1]*sqrt(2-s[1]*s[1]); vec[0] = cos(phi)*sqr; @@ -1295,7 +1295,7 @@ static void trace_refract(float col[4], ShadeInput *shi, ShadeResult *shr) max_samples = 1; - while (samples < max_samples) { + while (samples < max_samples) { if (refraction(v_refract, shi->vn, shi->view, shi->ang)) { traflag |= RAY_INSIDE; } @@ -1822,7 +1822,7 @@ static float *sphere_sampler(int type, int resol, int thread, int xs, int ys, in } return sphere; - } + } else { float *sphere; float *vec1; @@ -1847,7 +1847,7 @@ static float *sphere_sampler(int type, int resol, int thread, int xs, int ys, in for (a=0; a<tot; a++, vec+=3, vec1+=3) { vec1[0]= cost*cosfi*vec[0] - sinfi*vec[1] + sint*cosfi*vec[2]; vec1[1]= cost*sinfi*vec[0] + cosfi*vec[1] + sint*sinfi*vec[2]; - vec1[2]= -sint*vec[0] + cost*vec[2]; + vec1[2]= -sint*vec[0] + cost*vec[2]; } } return sphere; @@ -1981,7 +1981,7 @@ static void ray_ao_qmc(ShadeInput *shi, float ao[3], float env[3]) samples++; if (qsa && qsa->type == SAMP_TYPE_HALTON) { - /* adaptive sampling - consider samples below threshold as in shadow (or vice versa) and exit early */ + /* adaptive sampling - consider samples below threshold as in shadow (or vice versa) and exit early */ if (adapt_thresh > 0.0f && (samples > max_samples/2) ) { if (adaptive_sample_contrast_val(samples, prev, fac, adapt_thresh)) { diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c index 167e91272e2..dc99ee02a19 100644 --- a/source/blender/render/intern/source/render_texture.c +++ b/source/blender/render/intern/source/render_texture.c @@ -303,7 +303,7 @@ static float tex_tri(float a) /* computes basic wood intensity value at x,y,z */ static float wood_int(Tex *tex, float x, float y, float z) { - float wi=0; + float wi = 0; short wf = tex->noisebasis2; /* wave form: TEX_SIN=0, TEX_SAW=1, TEX_TRI=2 */ short wt = tex->stype; /* wood type: TEX_BAND=0, TEX_RING=1, TEX_BANDNOISE=2, TEX_RINGNOISE=3 */ @@ -374,7 +374,7 @@ static float marble_int(Tex *tex, float x, float y, float z) mi = waveform[wf](mi); if (mt==TEX_SHARP) { mi = sqrt(mi); - } + } else if (mt==TEX_SHARPER) { mi = sqrt(sqrt(mi)); } @@ -494,7 +494,7 @@ static int stucci(Tex *tex, const float texvec[3], TexResult *texres) if (tex->stype) ofs*=(b2*b2); nor[0] = BLI_gNoise(tex->noisesize, texvec[0]+ofs, texvec[1], texvec[2], (tex->noisetype!=TEX_NOISESOFT), tex->noisebasis); - nor[1] = BLI_gNoise(tex->noisesize, texvec[0], texvec[1]+ofs, texvec[2], (tex->noisetype!=TEX_NOISESOFT), tex->noisebasis); + nor[1] = BLI_gNoise(tex->noisesize, texvec[0], texvec[1]+ofs, texvec[2], (tex->noisetype!=TEX_NOISESOFT), tex->noisebasis); nor[2] = BLI_gNoise(tex->noisesize, texvec[0], texvec[1], texvec[2]+ofs, (tex->noisetype!=TEX_NOISESOFT), tex->noisebasis); texres->tin= nor[2]; @@ -769,7 +769,7 @@ static int cubemap_glob(const float n[3], float x, float y, float z, float *adr1 else { *adr1 = (y + 1.0f) / 2.0f; *adr2 = (z + 1.0f) / 2.0f; - ret= 2; + ret= 2; } return ret; } @@ -824,8 +824,8 @@ static int cubemap(MTex *mtex, VlakRen *vlr, const float n[3], float x, float y, *adr1 = (y + 1.0f) / 2.0f; *adr2 = (z + 1.0f) / 2.0f; ret= 2; - } - } + } + } else { return cubemap_glob(n, x, y, z, adr1, adr2); } @@ -862,7 +862,7 @@ static int cubemap_ob(Object *ob, const float n[3], float x, float y, float z, f else { *adr1 = (y + 1.0f) / 2.0f; *adr2 = (z + 1.0f) / 2.0f; - ret= 2; + ret= 2; } return ret; } @@ -971,7 +971,7 @@ static void do_2d_mapping(MTex *mtex, float texvec[3], VlakRen *vlr, const float map_to_tube(area + 2, area + 3, texvec[0] + dxt[0], texvec[1] + dxt[1], texvec[2] + dxt[2]); map_to_tube(area + 4, area + 5, texvec[0] + dyt[0], texvec[1] + dyt[1], texvec[2] + dyt[2]); } - else { + else { map_to_sphere(area, area+1, texvec[0], texvec[1], texvec[2]); map_to_sphere(area + 2, area + 3, texvec[0] + dxt[0], texvec[1] + dxt[1], texvec[2] + dxt[2]); map_to_sphere(area + 4, area + 5, texvec[0] + dyt[0], texvec[1] + dyt[1], texvec[2] + dyt[2]); @@ -2664,8 +2664,8 @@ void do_volume_tex(ShadeInput *shi, const float *xyz, int mapto_flag, float col_ copy_v3_v3(co, xyz); if (mtex->texflag & MTEX_OB_DUPLI_ORIG) { if (shi->obi && shi->obi->duplitexmat) - mul_m4_v3(shi->obi->duplitexmat, co); - } + mul_m4_v3(shi->obi->duplitexmat, co); + } mul_m4_v3(ob->imat_ren, co); if (mtex->texflag & MTEX_MAPTO_BOUNDS && ob->bb) { @@ -3078,7 +3078,7 @@ void do_sky_tex(const float rco[3], float lo[3], const float dxyview[2], float h break; } - /* placement */ + /* placement */ if (mtex->projx) texvec[0]= mtex->size[0]*(co[mtex->projx-1]+mtex->ofs[0]); else texvec[0]= mtex->size[0]*(mtex->ofs[0]); @@ -3241,7 +3241,7 @@ void do_lamp_tex(LampRen *la, const float lavec[3], ShadeInput *shi, float col_r } co= tempvec; - dx= dxt; dy= dyt; + dx= dxt; dy= dyt; if (shi->osatex) { copy_v3_v3(dxt, shi->dxlv); copy_v3_v3(dyt, shi->dylv); diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index 0bfbed8e58c..a83a76796b9 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -671,7 +671,7 @@ int get_sample_layers(RenderPart *pa, RenderLayer *rl, RenderLayer **rlpp) RenderResult *rr= BLI_findlink(&pa->fullresult, sample); rlpp[sample]= BLI_findlink(&rr->layers, nr); - } + } return R.osa; } else { @@ -714,7 +714,7 @@ static void sky_tile(RenderPart *pa, RenderLayer *rl) addAlphaUnderFloat(pass, col); } } - } + } } if (y&1) @@ -772,8 +772,8 @@ static void atm_tile(RenderPart *pa, RenderLayer *rl) if (*zrect >= 9.9e10f || rgbrect[3]==0.0f) { continue; } - - if ((lar->sunsky->effect_type & LA_SUN_EFFECT_AP)) { + + if ((lar->sunsky->effect_type & LA_SUN_EFFECT_AP)) { float tmp_rgb[3]; /* skip if worldspace lamp vector is below horizon */ @@ -928,7 +928,7 @@ static void addps(ListBase *lb, intptr_t *rd, int obi, int facenr, int z, int ma PixStrMain *psm; PixStr *ps, *last= NULL; - if (*rd) { + if (*rd) { ps= (PixStr *)(*rd); while (ps) { @@ -2012,7 +2012,7 @@ void add_halo_flare(Render *re) re->display_draw(re->ddh, rr, NULL); } - R.r.mode= mode; + R.r.mode= mode; } /* ************************* bake ************************ */ @@ -2474,7 +2474,7 @@ static int get_next_bake_face(BakeShade *bs) return 0; } - BLI_lock_thread(LOCK_CUSTOM1); + BLI_lock_thread(LOCK_CUSTOM1); for (; obi; obi=obi->next, v=0) { obr= obi->obr; @@ -2520,7 +2520,7 @@ static int get_next_bake_face(BakeShade *bs) /* might be read by UI to set active image for display */ R.bakebuf= ima; - } + } bs->obi= obi; bs->vlr= vlr; @@ -2557,7 +2557,7 @@ static void shade_tface(BakeShade *bs) /* note, these calls only free/fill contents of zspan struct, not zspan itself */ zbuf_free_span(bs->zspan); zbuf_alloc_span(bs->zspan, bs->ibuf->x, bs->ibuf->y, R.clipcrop); - } + } bs->rectx= bs->ibuf->x; bs->recty= bs->ibuf->y; diff --git a/source/blender/render/intern/source/renderdatabase.c b/source/blender/render/intern/source/renderdatabase.c index 1721741d64d..886f266b22f 100644 --- a/source/blender/render/intern/source/renderdatabase.c +++ b/source/blender/render/intern/source/renderdatabase.c @@ -244,7 +244,7 @@ VertRen *RE_findOrAddVert(ObjectRen *obr, int nr) memset(obr->vertnodes+obr->vertnodeslen, 0, TABLEINITSIZE*sizeof(VertTableNode)); obr->vertnodeslen+=TABLEINITSIZE; - if (temp) MEM_freeN(temp); + if (temp) MEM_freeN(temp); } v= obr->vertnodes[a].vert; @@ -487,7 +487,7 @@ VlakRen *RE_findOrAddVlak(ObjectRen *obr, int nr) memset(obr->vlaknodes+obr->vlaknodeslen, 0, TABLEINITSIZE*sizeof(VlakTableNode)); obr->vlaknodeslen+=TABLEINITSIZE; /*Does this really need to be power of 2?*/ - if (temp) MEM_freeN(temp); + if (temp) MEM_freeN(temp); } v= obr->vlaknodes[a].vlak; @@ -658,7 +658,7 @@ StrandRen *RE_findOrAddStrand(ObjectRen *obr, int nr) memset(obr->strandnodes+obr->strandnodeslen, 0, TABLEINITSIZE*sizeof(StrandTableNode)); obr->strandnodeslen+=TABLEINITSIZE; /*Does this really need to be power of 2?*/ - if (temp) MEM_freeN(temp); + if (temp) MEM_freeN(temp); } v= obr->strandnodes[a].strand; @@ -892,7 +892,7 @@ HaloRen *RE_findOrAddHalo(ObjectRen *obr, int nr) if (temp) memcpy(obr->bloha, temp, obr->blohalen*sizeof(void*)); memset(&(obr->bloha[obr->blohalen]), 0, TABLEINITSIZE*sizeof(void*)); obr->blohalen+=TABLEINITSIZE; /*Does this really need to be power of 2?*/ - if (temp) MEM_freeN(temp); + if (temp) MEM_freeN(temp); } h= obr->bloha[a]; diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c index bed3fb5f754..ce89ebd4c34 100644 --- a/source/blender/render/intern/source/shadbuf.c +++ b/source/blender/render/intern/source/shadbuf.c @@ -89,7 +89,7 @@ extern struct Render R; static void copy_to_ztile(int *rectz, int size, int x1, int y1, int tile, char *r1) { - int len4, *rz; + int len4, *rz; int x2, y2; x2= x1+tile; @@ -528,21 +528,21 @@ static void compress_shadowbuf(ShadBuf *shb, int *rectz, int square) for (y=0; y<size; y+=16) { if (y< size/2) miny= y+15-size/2; - else miny= y-size/2; + else miny= y-size/2; for (x=0; x<size; x+=16) { /* is tile within spotbundle? */ a= size/2; if (x< a) minx= x+15-a; - else minx= x-a; + else minx= x-a; dist= sqrt( (float)(minx*minx+miny*miny) ); if (square==0 && dist>(float)(a+12)) { /* 12, tested with a onlyshadow lamp */ a= 256; verg= 0; /* 0x80000000; */ /* 0x7FFFFFFF; */ rz1= (&verg)+1; - } + } else { copy_to_ztile(rectz, size, x, y, 16, rcline); rz1= (int *)rcline; @@ -669,8 +669,8 @@ static void shadowbuf_autoclip(Render *re, LampRen *lar) clipflag[vlr->v2->index]= 1; clipflag[vlr->v3->index]= 1; if (vlr->v4) clipflag[vlr->v4->index]= 1; - } - } + } + } /* calculate min and max */ for (a=0; a< obr->totvert;a++) { @@ -1867,7 +1867,7 @@ static void isb_bsp_recalc_box(ISBBranch *root) init_box(&root->box); for (a=root->totsamp-1; a>=0; a--) bound_boxf(&root->box, root->samples[a]->zco); - } + } } /* callback function for zbuf clip */ @@ -2040,7 +2040,7 @@ static void isb_bsp_fillfaces(Render *re, LampRen *lar, ISBBranch *root) if (vlr->v4) c4= testclip(hoco[3]); - /* ***** NO WIRE YET */ + /* ***** NO WIRE YET */ if (ma->material_type == MA_TYPE_WIRE) { if (vlr->v4) zbufclipwire(&zspan, i, a+1, vlr->ec, hoco[0], hoco[1], hoco[2], hoco[3], c1, c2, c3, c4); @@ -2187,7 +2187,7 @@ static int isb_add_samples(RenderPart *pa, ISBBranch *root, MemArena *memarena, } if (bsp_err) break; } - } + } MEM_freeN(xcos); MEM_freeN(ycos); @@ -2394,7 +2394,7 @@ static int isb_add_samples_transp(RenderPart *pa, ISBBranch *root, MemArena *mem } if (bsp_err) break; } - } + } MEM_freeN(xcos); MEM_freeN(ycos); diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c index 36e9f4cb785..db93a21de2d 100644 --- a/source/blender/render/intern/source/shadeinput.c +++ b/source/blender/render/intern/source/shadeinput.c @@ -236,7 +236,7 @@ void vlr_set_uv_indices(VlakRen *vlr, int *i1, int *i2, int *i3) /* 1---2 1---2 0 = orig face, 1 = new face */ /* Update vert nums to point to correct verts of original face */ - if (vlr->flag & R_DIVIDE_24) { + if (vlr->flag & R_DIVIDE_24) { if (vlr->flag & R_FACE_SPLIT) { (*i1)++; (*i2)++; (*i3)++; } @@ -777,7 +777,7 @@ void shade_input_set_uv(ShadeInput *shi) CLAMP(shi->u, -2.0f, 1.0f); CLAMP(shi->v, -2.0f, 1.0f); } - } + } } void shade_input_set_normals(ShadeInput *shi) diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c index 51a1edf4de9..f1665a3a9cd 100644 --- a/source/blender/render/intern/source/shadeoutput.c +++ b/source/blender/render/intern/source/shadeoutput.c @@ -114,7 +114,7 @@ static void fogcolor(const float colf[3], float *rco, float *view) addAlphaOverFloat(colf, hor); sub_v3_v3(vec, dview); - } + } } #endif @@ -168,7 +168,7 @@ float mistfactor(float zcor, float const co[3]) } } - return (1.0f-fac)* (1.0f-R.wrld.misi); + return (1.0f-fac)* (1.0f-R.wrld.misi); } static void spothalo(struct LampRen *lar, ShadeInput *shi, float *intens) @@ -228,7 +228,7 @@ static void spothalo(struct LampRen *lar, ShadeInput *shi, float *intens) } } - /* scale z to make sure volume is normalized */ + /* scale z to make sure volume is normalized */ nray[2] *= (double)lar->sh_zfac; /* nray does not need normalization */ @@ -548,7 +548,7 @@ static float spec(float inp, int hard) b1= inp*inp; /* avoid FPE */ - if (b1<0.01f) b1= 0.01f; + if (b1<0.01f) b1= 0.01f; if ((hard & 1)==0) inp= 1.0f; if (hard & 2) inp*= b1; @@ -561,7 +561,7 @@ static float spec(float inp, int hard) b1*= b1; /* avoid FPE */ - if (b1<0.001f) b1= 0.0f; + if (b1<0.001f) b1= 0.0f; if (hard & 32) inp*= b1; b1*= b1; @@ -569,7 +569,7 @@ static float spec(float inp, int hard) b1*= b1; if (hard & 128) inp*=b1; - if (b1<0.001f) b1= 0.0f; + if (b1<0.001f) b1= 0.0f; if (hard & 256) { b1*= b1; @@ -1317,7 +1317,7 @@ static void shade_one_light(LampRen *lar, ShadeInput *shi, ShadeResult *shr, int if (lar->mode & LA_TEXTURE) do_lamp_tex(lar, lv, shi, lacol, LA_TEXTURE); if (lar->mode & LA_SHAD_TEX) do_lamp_tex(lar, lv, shi, lashdw, LA_SHAD_TEX); - /* tangent case; calculate fake face normal, aligned with lampvector */ + /* tangent case; calculate fake face normal, aligned with lampvector */ /* note, vnor==vn is used as tangent trigger for buffer shadow */ if (vlr->flag & R_TANGENT) { float cross[3], nstrand[3], blend; @@ -1637,7 +1637,7 @@ static void shade_lamp_loop_only_shadow(ShadeInput *shi, ShadeResult *shr) } } - /* quite disputable this... also note it doesn't mirror-raytrace */ + /* quite disputable this... also note it doesn't mirror-raytrace */ if ((R.wrld.mode & (WO_AMB_OCC|WO_ENV_LIGHT)) && shi->amb!=0.0f) { float f; @@ -1845,7 +1845,7 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr) } } - if (shi->combinedflag & SCE_PASS_SHADOW) + if (shi->combinedflag & SCE_PASS_SHADOW) copy_v3_v3(shr->combined, shr->shad); /* note, no ';' ! */ else copy_v3_v3(shr->combined, shr->diff); diff --git a/source/blender/render/intern/source/strand.c b/source/blender/render/intern/source/strand.c index dc3225b7f09..6e2e97b95de 100644 --- a/source/blender/render/intern/source/strand.c +++ b/source/blender/render/intern/source/strand.c @@ -545,7 +545,7 @@ static void do_strand_fillac(void *handle, int x, int y, float u, float v, float bufferz= 0x7FFFFFFF; if (spart->rectmask) maskz= 0x7FFFFFFF; - if (*rd) { + if (*rd) { for (ps= (PixStr *)(*rd); ps; ps= ps->next) { if (mask & ps->mask) { bufferz= ps->z; diff --git a/source/blender/render/intern/source/sunsky.c b/source/blender/render/intern/source/sunsky.c index 1288b0305b1..4f57a046d68 100644 --- a/source/blender/render/intern/source/sunsky.c +++ b/source/blender/render/intern/source/sunsky.c @@ -330,8 +330,8 @@ static void ComputeAttenuatedSunlight(float theta, int turbidity, float fTau[3]) int i; float fLambda[3]; - fLambda[0] = 0.65f; - fLambda[1] = 0.57f; + fLambda[0] = 0.65f; + fLambda[1] = 0.57f; fLambda[2] = 0.475f; fAlpha = 1.3f; diff --git a/source/blender/render/intern/source/volume_precache.c b/source/blender/render/intern/source/volume_precache.c index fb7ea38ef68..8757be740f3 100644 --- a/source/blender/render/intern/source/volume_precache.c +++ b/source/blender/render/intern/source/volume_precache.c @@ -270,7 +270,7 @@ BLI_INLINE int ms_I(int x, int y, int z, int *n) /* has a pad of 1 voxel surroun BLI_INLINE int v_I_pad(int x, int y, int z, int *n) /* has a pad of 1 voxel surrounding the core for boundary simulation */ { /* same ordering to light cache, with padding */ - return z*(n[1]+2)*(n[0]+2) + y*(n[0]+2) + x; + return z*(n[1]+2)*(n[0]+2) + y*(n[0]+2) + x; } BLI_INLINE int lc_to_ms_I(int x, int y, int z, int *n) @@ -389,7 +389,7 @@ static void multiple_scattering_diffusion(Render *re, VolumePrecache *vp, Materi const int j = ms_I(x, y, z, n); //ms index time= PIL_check_seconds_timer(); - c++; + c++; if (vp->data_r[i] > 0.0f) sr[j] += vp->data_r[i]; if (vp->data_g[i] > 0.0f) diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c index 220fcd3e986..fe4cff76093 100644 --- a/source/blender/render/intern/source/volumetric.c +++ b/source/blender/render/intern/source/volumetric.c @@ -76,7 +76,7 @@ static float vol_get_shadow(ShadeInput *shi, LampRen *lar, const float co[3]) if (lar->shb) { float dxco[3] = {0.f, 0.f, 0.f}, dyco[3] = {0.f, 0.f, 0.f}; - visibility = testshadowbuf(&R, lar->shb, co, dxco, dyco, 1.0, 0.0); + visibility = testshadowbuf(&R, lar->shb, co, dxco, dyco, 1.0, 0.0); } else if (lar->mode & LA_SHAD_RAY) { /* trace shadow manually, no good lamp api atm */ @@ -205,7 +205,7 @@ static void vol_trace_behind(ShadeInput *shi, VlakRen *vlr, const float co[3], f else { shadeSkyView(col_r, co, shi->view, NULL, shi->thread); shadeSunView(col_r, shi->view); - } + } } @@ -221,7 +221,7 @@ static void vol_get_precached_scattering(Render *re, ShadeInput *shi, float scat /* find sample point in global space bounding box 0.0-1.0 */ global_bounds_obi(re, shi->obi, bbmin, bbmax); sub_v3_v3v3(dim, bbmax, bbmin); - mul_v3_m4v3(world_co, re->viewinv, co); + mul_v3_m4v3(world_co, re->viewinv, co); /* sample_co in 0.0-1.0 */ sample_co[0] = (world_co[0] - bbmin[0]) / dim[0]; diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c index 7eccacb816d..e73c0397c6b 100644 --- a/source/blender/render/intern/source/voxeldata.c +++ b/source/blender/render/intern/source/voxeldata.c @@ -414,7 +414,7 @@ void make_voxeldata(struct Render *re) int voxeldatatex(struct Tex *tex, const float texvec[3], struct TexResult *texres) { - VoxelData *vd = tex->vd; + VoxelData *vd = tex->vd; float co[3], offset[3] = {0.5, 0.5, 0.5}, a; int retval = (vd->data_type == TEX_VD_RGBA_PREMUL) ? TEX_RGB : TEX_INT; int depth = (vd->data_type == TEX_VD_RGBA_PREMUL) ? 4 : 1; @@ -482,7 +482,7 @@ int voxeldatatex(struct Tex *tex, const float texvec[3], struct TexResult *texre break; case TEX_VD_LINEAR: *result = BLI_voxel_sample_trilinear(dataset, vd->resol, co); - break; + break; case TEX_VD_QUADRATIC: *result = BLI_voxel_sample_triquadratic(dataset, vd->resol, co); break; @@ -515,5 +515,5 @@ int voxeldatatex(struct Tex *tex, const float texvec[3], struct TexResult *texre texres->ta = texres->tin; BRICONTRGB; - return retval; + return retval; } diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c index 87d710511a8..4d91a7d9d11 100644 --- a/source/blender/render/intern/source/zbuf.c +++ b/source/blender/render/intern/source/zbuf.c @@ -409,7 +409,7 @@ static void zbuffillAc4(ZSpan *zspan, int obi, int zvlnr, if (apn->p[3]==zvlnr && apn->obi[3]==obi) {apn->mask[3]|= mask; break; } if (apn->next==NULL) apn->next= addpsA(zspan); apn= apn->next; - } + } } } zverg+= zxd; @@ -501,7 +501,7 @@ static void zbuflineAc(ZSpan *zspan, int obi, int zvlnr, const float vec1[3], co if (apn->p[3]==zvlnr && apn->obi[3]==obi) {apn->mask[3]|= mask; break; } if (apn->next==0) apn->next= addpsA(zspan); apn= apn->next; - } + } } } } @@ -572,7 +572,7 @@ static void zbuflineAc(ZSpan *zspan, int obi, int zvlnr, const float vec1[3], co if (apn->p[3]==zvlnr) {apn->mask[3]|= mask; break; } if (apn->next==0) apn->next= addpsA(zspan); apn= apn->next; - } + } } } } @@ -1624,7 +1624,7 @@ static void clippyra(float *labda, float *v1, float *v2, int *b2, int *b3, int a else { dw= clipcrop*(v2[3]-v1[3]); v13= clipcrop*v1[3]; - } + } /* according the original article by Liang&Barsky, for clipping of * homogeneous coordinates with viewplane, the value of "0" is used instead of "-w" . * This differs from the other clipping cases (like left or top) and I considered @@ -1682,7 +1682,7 @@ static void makevertpyra(float *vez, float *labda, float **trias, float *v1, flo adr[1]= v1[1]+l1*(v2[1]-v1[1]); adr[2]= v1[2]+l1*(v2[2]-v1[2]); adr[3]= v1[3]+l1*(v2[3]-v1[3]); - } + } else trias[*b1]= v1; (*b1)++; @@ -2022,7 +2022,7 @@ static void zmask_rect(int *rectz, int *rectp, int xs, int ys, int neg) EXTEND_PIXEL(row1 + 2); EXTEND_PIXEL(row2 + 2); EXTEND_PIXEL(row3 + 2); - } + } if (tot) { len++; curz[0]= (int)(z/(float)tot); @@ -2047,7 +2047,7 @@ static void zmask_rect(int *rectz, int *rectp, int xs, int ys, int neg) if (rectp[len]==0) { rectz[len] = -0x7FFFFFFF; rectp[len]= -1; /* env code */ - } + } } } } @@ -3233,7 +3233,7 @@ static void copyto_abufz(RenderPart *pa, int *arectz, int *rectmask, int sample) *rza= 0x7FFFFFFF; if (rectmask) *rma= 0x7FFFFFFF; - if (*rd) { + if (*rd) { /* when there's a sky pixstruct, fill in sky-Z, otherwise solid Z */ for (ps= (PixStr *)(*rd); ps; ps= ps->next) { if (sample & ps->mask) { @@ -4243,7 +4243,7 @@ unsigned short *zbuffer_transp_shade(RenderPart *pa, RenderLayer *rl, float *pas MEM_freeN(APixbufstrand); if (sscache) strand_shade_cache_free(sscache); - freepsA(&apsmbase); + freepsA(&apsmbase); if (R.r.mode & R_SHADOW) ISB_free(pa); diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c index b9e15bfe660..ebde6407a48 100644 --- a/source/blender/windowmanager/intern/wm_cursors.c +++ b/source/blender/windowmanager/intern/wm_cursors.c @@ -61,7 +61,7 @@ static GHOST_TStandardCursor convert_cursor(int curs) case CURSOR_FACESEL: return GHOST_kStandardCursorRightArrow; case CURSOR_WAIT: return GHOST_kStandardCursorWait; case CURSOR_EDIT: return GHOST_kStandardCursorCrosshair; - case CURSOR_HELP: + case CURSOR_HELP: #ifdef __APPLE__ return GHOST_kStandardCursorLeftRight; #else @@ -560,7 +560,7 @@ BEGIN_CURSOR_BLOCK BlenderCursor[BC_CROSSCURSOR] = &CrossCursor; END_CURSOR_BLOCK - /********************** EditCross Cursor ***********************/ + /********************** EditCross Cursor ***********************/ BEGIN_CURSOR_BLOCK static char editcross_sbm[] = { 0x0e, 0x00, 0x11, 0x00, 0x1d, 0x00, 0x19, 0x03, @@ -775,7 +775,7 @@ BEGIN_CURSOR_BLOCK END_CURSOR_BLOCK - /********************** TextEdit Cursor ***********************/ + /********************** TextEdit Cursor ***********************/ BEGIN_CURSOR_BLOCK static char textedit_sbm[] = { 0xe0, 0x03, 0x10, 0x04, 0x60, 0x03, 0x40, 0x01, @@ -808,7 +808,7 @@ BEGIN_CURSOR_BLOCK END_CURSOR_BLOCK - /********************** Paintbrush Cursor ***********************/ + /********************** Paintbrush Cursor ***********************/ BEGIN_CURSOR_BLOCK static char paintbrush_sbm[] = { diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c index bbb2a54887e..0581000e07c 100644 --- a/source/blender/windowmanager/intern/wm_dragdrop.c +++ b/source/blender/windowmanager/intern/wm_dragdrop.c @@ -141,7 +141,7 @@ void wm_dropbox_free(void) BLI_freelistN(&dm->dropboxes); } - BLI_freelistN(&dropboxes); + BLI_freelistN(&dropboxes); } /* *********************************** */ diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index bb5c869b87e..e17f70eeca4 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -2626,7 +2626,7 @@ static void update_tablet_data(wmWindow *win, wmEvent *event) event->custom = EVT_DATA_TABLET; event->customdata = wmtab; event->customdatafree = 1; - } + } } /* adds customdata to event */ diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 602105fd28c..bb8c434dfb5 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -715,7 +715,7 @@ static ImBuf *blend_file_thumb(Scene *scene, bScreen *screen, int **thumb_pt) IB_rect, FALSE, FALSE, err_out); } - if (ibuf) { + if (ibuf) { float aspect = (scene->r.xsch * scene->r.xasp) / (scene->r.ysch * scene->r.yasp); /* dirty oversampling */ diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c index 4a410363167..0917d766051 100644 --- a/source/blender/windowmanager/intern/wm_jobs.c +++ b/source/blender/windowmanager/intern/wm_jobs.c @@ -466,7 +466,7 @@ void wm_jobs_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt) if (wm_job->flag & WM_JOB_PROGRESS) WM_event_add_notifier(C, NC_WM | ND_JOB, NULL); wm_job->do_update = FALSE; - } + } if (wm_job->ready) { if (wm_job->endjob) diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 809f3638df6..995fa15aef3 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -807,7 +807,7 @@ int WM_operator_filesel(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { if (RNA_struct_property_is_set(op->ptr, "filepath")) { return WM_operator_call_notest(C, op); /* call exec direct */ - } + } else { WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; @@ -1215,7 +1215,7 @@ static int wm_debug_menu_exec(bContext *C, wmOperator *op) ED_screen_refresh(CTX_wm_manager(C), CTX_wm_window(C)); WM_event_add_notifier(C, NC_WINDOW, NULL); - return OPERATOR_FINISHED; + return OPERATOR_FINISHED; } static int wm_debug_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) @@ -1715,7 +1715,7 @@ static int wm_link_append_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(ev { if (RNA_struct_property_is_set(op->ptr, "filepath")) { return WM_operator_call_notest(C, op); - } + } else { /* XXX TODO solve where to get last linked library from */ if (G.lib[0] != '\0') { @@ -2184,7 +2184,7 @@ static int wm_exit_blender_op(bContext *C, wmOperator *op) { WM_operator_free(op); - WM_exit(C); + WM_exit(C); return OPERATOR_FINISHED; } @@ -3483,7 +3483,7 @@ static int redraw_timer_exec(bContext *C, wmOperator *op) if (type == 0) { if (ar) ED_region_do_draw(C, ar); - } + } else if (type == 1) { wmWindow *win = CTX_wm_window(C); diff --git a/source/blender/windowmanager/intern/wm_subwindow.c b/source/blender/windowmanager/intern/wm_subwindow.c index 4078a88b2fd..e33f936b4da 100644 --- a/source/blender/windowmanager/intern/wm_subwindow.c +++ b/source/blender/windowmanager/intern/wm_subwindow.c @@ -192,7 +192,7 @@ void wm_subwindow_close(wmWindow *win, int swinid) wm_subwindow_free(swin); BLI_remlink(&win->subwindows, swin); MEM_freeN(swin); - } + } else { printf("%s: Internal error, bad winid: %d\n", __func__, swinid); } @@ -398,7 +398,7 @@ int WM_framebuffer_to_index(unsigned int col) return col & 0xFFFFFF; default: // 18 bits... return ((col & 0xFC0000) >> 6) + ((col & 0xFC00) >> 4) + ((col & 0xFC) >> 2); - } + } } diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 44827302d7d..04f0d6ed64a 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -164,7 +164,7 @@ void wm_window_free(bContext *C, wmWindowManager *wm, wmWindow *win) if (CTX_wm_window(C) == win) CTX_wm_window_set(C, NULL); - } + } /* always set drawable and active to NULL, * prevents non-drawable state of main windows (bugs #22967 and #25071, possibly #22477 too) */ @@ -648,7 +648,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr else if (!GHOST_ValidWindow(g_system, ghostwin)) { /* XXX - should be checked, why are we getting an event here, and */ /* what is it? */ - puts("<!> event has invalid window"); + puts("<!> event has invalid window"); return 1; } else { @@ -1001,7 +1001,7 @@ void wm_ghost_init(bContext *C) g_system = GHOST_CreateSystem(); GHOST_AddEventConsumer(g_system, consumer); - } + } } void wm_ghost_exit(void) diff --git a/source/blender/windowmanager/wm_event_system.h b/source/blender/windowmanager/wm_event_system.h index a33d37ac50e..2d0dd2ef911 100644 --- a/source/blender/windowmanager/wm_event_system.h +++ b/source/blender/windowmanager/wm_event_system.h @@ -32,10 +32,10 @@ #define __WM_EVENT_SYSTEM_H__ /* return value of handler-operator call */ -#define WM_HANDLER_CONTINUE 0 -#define WM_HANDLER_BREAK 1 -#define WM_HANDLER_HANDLED 2 -#define WM_HANDLER_MODAL 4 /* MODAL|BREAK means unhandled */ +#define WM_HANDLER_CONTINUE 0 +#define WM_HANDLER_BREAK 1 +#define WM_HANDLER_HANDLED 2 +#define WM_HANDLER_MODAL 4 /* MODAL|BREAK means unhandled */ struct ScrArea; struct ARegion; @@ -44,40 +44,40 @@ struct ARegion; typedef struct wmEventHandler { struct wmEventHandler *next, *prev; - - int type, flag; /* type default=0, rest is custom */ - + + int type, flag; /* type default=0, rest is custom */ + /* keymap handler */ - wmKeyMap *keymap; /* pointer to builtin/custom keymaps */ - rcti *bblocal, *bbwin; /* optional local and windowspace bb */ - + wmKeyMap *keymap; /* pointer to builtin/custom keymaps */ + rcti *bblocal, *bbwin; /* optional local and windowspace bb */ + /* modal operator handler */ - wmOperator *op; /* for derived/modal handlers */ - struct ScrArea *op_area; /* for derived/modal handlers */ - struct ARegion *op_region; /* for derived/modal handlers */ + wmOperator *op; /* for derived/modal handlers */ + struct ScrArea *op_area; /* for derived/modal handlers */ + struct ARegion *op_region; /* for derived/modal handlers */ /* ui handler */ - wmUIHandlerFunc ui_handle; /* callback receiving events */ - wmUIHandlerRemoveFunc ui_remove; /* callback when handler is removed */ - void *ui_userdata; /* user data pointer */ - struct ScrArea *ui_area; /* for derived/modal handlers */ - struct ARegion *ui_region; /* for derived/modal handlers */ - struct ARegion *ui_menu; /* for derived/modal handlers */ - + wmUIHandlerFunc ui_handle; /* callback receiving events */ + wmUIHandlerRemoveFunc ui_remove; /* callback when handler is removed */ + void *ui_userdata; /* user data pointer */ + struct ScrArea *ui_area; /* for derived/modal handlers */ + struct ARegion *ui_region; /* for derived/modal handlers */ + struct ARegion *ui_menu; /* for derived/modal handlers */ + /* fileselect handler re-uses modal operator data */ - struct bScreen *filescreen; /* screen it started in, to validate exec */ - + struct bScreen *filescreen; /* screen it started in, to validate exec */ + /* drop box handler */ ListBase *dropboxes; - + } wmEventHandler; /* handler flag */ /* after this handler all others are ignored */ -#define WM_HANDLER_BLOCKING 1 +#define WM_HANDLER_BLOCKING 1 /* handler tagged to be freed in wm_handlers_do() */ -#define WM_HANDLER_DO_FREE 2 +#define WM_HANDLER_DO_FREE 2 @@ -89,23 +89,23 @@ enum { /* wm_event_system.c */ -void wm_event_free_all (wmWindow *win); -void wm_event_free (wmEvent *event); -void wm_event_free_handler (wmEventHandler *handler); +void wm_event_free_all (wmWindow *win); +void wm_event_free (wmEvent *event); +void wm_event_free_handler (wmEventHandler *handler); - /* goes over entire hierarchy: events -> window -> screen -> area -> region */ -void wm_event_do_handlers (bContext *C); + /* goes over entire hierarchy: events -> window -> screen -> area -> region */ +void wm_event_do_handlers (bContext *C); -void wm_event_add_ghostevent (wmWindowManager *wm, wmWindow *win, int type, int time, void *customdata); +void wm_event_add_ghostevent (wmWindowManager *wm, wmWindow *win, int type, int time, void *customdata); -void wm_event_do_notifiers (bContext *C); +void wm_event_do_notifiers (bContext *C); /* wm_keymap.c */ /* wm_dropbox.c */ -void wm_dropbox_free(void); -void wm_drags_check_ops(bContext *C, wmEvent *event); -void wm_drags_draw(bContext *C, wmWindow *win, rcti *rect); +void wm_dropbox_free(void); +void wm_drags_check_ops(bContext *C, wmEvent *event); +void wm_drags_draw(bContext *C, wmWindow *win, rcti *rect); #endif /* __WM_EVENT_SYSTEM_H__ */ diff --git a/source/gameengine/GameLogic/SCA_IInputDevice.h b/source/gameengine/GameLogic/SCA_IInputDevice.h index bc4d22eaaaf..1a403f40955 100644 --- a/source/gameengine/GameLogic/SCA_IInputDevice.h +++ b/source/gameengine/GameLogic/SCA_IInputDevice.h @@ -167,9 +167,9 @@ public: KX_CAPSLOCKKEY, // 123 KX_LEFTCTRLKEY, // 124 - KX_LEFTALTKEY, - KX_RIGHTALTKEY, - KX_RIGHTCTRLKEY, + KX_LEFTALTKEY, + KX_RIGHTALTKEY, + KX_RIGHTCTRLKEY, KX_RIGHTSHIFTKEY, KX_LEFTSHIFTKEY,// 129 diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index dfc8073303e..6979af10e0a 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -228,11 +228,11 @@ STR_String& KX_GameObject::GetName() } - +/* Set the name of the value */ void KX_GameObject::SetName(const char *name) { m_name = name; -}; // Set the name of the value +} KX_IPhysicsController* KX_GameObject::GetPhysicsController() { @@ -241,7 +241,7 @@ KX_IPhysicsController* KX_GameObject::GetPhysicsController() KX_GameObject* KX_GameObject::GetDupliGroupObject() { - return m_pDupliGroupObject; + return m_pDupliGroupObject; } CListValue* KX_GameObject::GetInstanceObjects() @@ -251,11 +251,11 @@ CListValue* KX_GameObject::GetInstanceObjects() void KX_GameObject::AddInstanceObjects(KX_GameObject* obj) { - if(!m_pInstanceObjects) + if (!m_pInstanceObjects) m_pInstanceObjects = new CListValue(); obj->AddRef(); - m_pInstanceObjects->Add(obj); + m_pInstanceObjects->Add(obj); } void KX_GameObject::RemoveInstanceObject(KX_GameObject* obj) @@ -267,7 +267,7 @@ void KX_GameObject::RemoveInstanceObject(KX_GameObject* obj) void KX_GameObject::RemoveDupliGroupObject() { - if(m_pDupliGroupObject) { + if (m_pDupliGroupObject) { m_pDupliGroupObject->Release(); m_pDupliGroupObject = NULL; } diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index 157e282b557..5ceef2c60c9 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -221,11 +221,11 @@ public: GetInstanceObjects( ); - void + void SetDupliGroupObject(KX_GameObject* ); - void + void AddInstanceObjects(KX_GameObject* ); diff --git a/source/gameengine/Ketsji/KX_MeshProxy.cpp b/source/gameengine/Ketsji/KX_MeshProxy.cpp index 8451dc3497d..b49c27fc6b8 100644 --- a/source/gameengine/Ketsji/KX_MeshProxy.cpp +++ b/source/gameengine/Ketsji/KX_MeshProxy.cpp @@ -239,7 +239,7 @@ PyObject *KX_MeshProxy::pyattr_get_materials(void *self_v, const KX_PYATTRIBUTE_ KX_BlenderMaterial *mat = static_cast<KX_BlenderMaterial*>(polymat); PyList_SET_ITEM(materials, i, mat->GetProxy()); } - else { + else { KX_PolygonMaterial *mat = static_cast<KX_PolygonMaterial*>(polymat); PyList_SET_ITEM(materials, i, mat->GetProxy()); } diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index 89799d065a4..7ec84cfa6b7 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -2240,9 +2240,9 @@ PyObject *initGameKeys() KX_MACRO_addTypesToDict(d, CAPSLOCKKEY, SCA_IInputDevice::KX_CAPSLOCKKEY); KX_MACRO_addTypesToDict(d, LEFTCTRLKEY, SCA_IInputDevice::KX_LEFTCTRLKEY); - KX_MACRO_addTypesToDict(d, LEFTALTKEY, SCA_IInputDevice::KX_LEFTALTKEY); - KX_MACRO_addTypesToDict(d, RIGHTALTKEY, SCA_IInputDevice::KX_RIGHTALTKEY); - KX_MACRO_addTypesToDict(d, RIGHTCTRLKEY, SCA_IInputDevice::KX_RIGHTCTRLKEY); + KX_MACRO_addTypesToDict(d, LEFTALTKEY, SCA_IInputDevice::KX_LEFTALTKEY); + KX_MACRO_addTypesToDict(d, RIGHTALTKEY, SCA_IInputDevice::KX_RIGHTALTKEY); + KX_MACRO_addTypesToDict(d, RIGHTCTRLKEY, SCA_IInputDevice::KX_RIGHTCTRLKEY); KX_MACRO_addTypesToDict(d, RIGHTSHIFTKEY, SCA_IInputDevice::KX_RIGHTSHIFTKEY); KX_MACRO_addTypesToDict(d, LEFTSHIFTKEY, SCA_IInputDevice::KX_LEFTSHIFTKEY); diff --git a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h index 7dac93acd21..976f3c58d68 100644 --- a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h +++ b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h @@ -50,7 +50,7 @@ class KX_SCA_AddObjectActuator : public SCA_IActuator /// Time field: lifetime of the new object int m_timeProp; - /// Original object reference (object to replicate) + /// Original object reference (object to replicate) SCA_IObject* m_OriginalObject; /// Object will be added to the following scene diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index a6b7ed3f732..f772fa5113a 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -1027,7 +1027,7 @@ int KX_Scene::NewRemoveObject(class CValue* gameobj) // if the object is the dupligroup proxy, you have to cleanup all m_pDupliGroupObject's in all // instances refering to this group - if(newobj->GetInstanceObjects()) { + if (newobj->GetInstanceObjects()) { for (int i = 0; i < newobj->GetInstanceObjects()->GetCount(); i++) { KX_GameObject* instance = (KX_GameObject*)newobj->GetInstanceObjects()->GetValue(i); instance->RemoveDupliGroupObject(); |