mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
style cleanup: trailing tabs & expand some non prefix tabs into spaces.
This commit is contained in:
parent
a1a0c8da13
commit
f3ece5a108
379 changed files with 1766 additions and 1768 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -525,7 +525,7 @@ macro(remove_strict_flags_file
|
|||
# TODO
|
||||
endif()
|
||||
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
unset(_SOURCE)
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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__ */
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -388,7 +388,7 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
/** Displacement of a mouse wheel. */
|
||||
GHOST_TInt32 z;
|
||||
GHOST_TInt32 z;
|
||||
} GHOST_TEventWheelData;
|
||||
|
||||
typedef enum {
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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) +
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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++) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ BulletSoftBody *bsbNew(void)
|
|||
|
||||
|
||||
bsb->viterations = 0;
|
||||
bsb->piterations = 2;
|
||||
bsb->piterations = 2;
|
||||
bsb->diterations = 0;
|
||||
bsb->citerations = 4;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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++) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1630,7 +1630,7 @@ void multires_free(Multires *mr)
|
|||
}
|
||||
|
||||
while (lvl) {
|
||||
multires_free_level(lvl);
|
||||
multires_free_level(lvl);
|
||||
lvl = lvl->next;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)... */
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1469,7 +1469,7 @@ static void iterative_raycast(BVHRayCastData *data, BVHNode *node)
|
|||
}
|
||||
else {
|
||||
node = node->children[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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] == '\\') ) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 == '.')
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ double PIL_check_seconds_timer(void)
|
|||
__int64 ifreq;
|
||||
hasperfcounter = QueryPerformanceFrequency((LARGE_INTEGER *) &ifreq);
|
||||
perffreq = (double) ifreq;
|
||||
}
|
||||
}
|
||||
|
||||
if (hasperfcounter) {
|
||||
__int64 count;
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 @)");
|
||||
|
|
|
|||
|
|
@ -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 = "";
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ set(SRC
|
|||
collada_utils.cpp
|
||||
|
||||
AnimationImporter.h
|
||||
AnimationExporter.h
|
||||
AnimationExporter.h
|
||||
ArmatureExporter.h
|
||||
ArmatureImporter.h
|
||||
CameraExporter.h
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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__);
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ protected:
|
|||
|
||||
void updateArea();
|
||||
public:
|
||||
CropBaseOperation();
|
||||
CropBaseOperation();
|
||||
void initExecution();
|
||||
void deinitExecution();
|
||||
void setCropSettings(NodeTwoXYs *settings) { this->m_settings = settings; }
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue