svn merge ^/trunk/blender -r46644:HEAD
authorOve Murberg Henriksen <sorayasilvermoon@hotmail.com>
Thu, 17 May 2012 23:34:54 +0000 (23:34 +0000)
committerOve Murberg Henriksen <sorayasilvermoon@hotmail.com>
Thu, 17 May 2012 23:34:54 +0000 (23:34 +0000)
731 files changed:
CMakeLists.txt
build_files/cmake/macros.cmake
build_files/cmake/packaging.cmake
build_files/package_spec/rpm/blender.spec.in
intern/cycles/kernel/osl/nodes/node_camera.osl
intern/elbeem/intern/ntl_geometryobject.cpp
release/scripts/startup/bl_operators/console.py
release/scripts/startup/bl_operators/image.py
release/scripts/startup/bl_operators/presets.py
release/scripts/startup/bl_ui/properties_animviz.py
release/scripts/startup/bl_ui/properties_data_armature.py
release/scripts/startup/bl_ui/properties_data_bone.py
release/scripts/startup/bl_ui/properties_object.py
release/scripts/startup/bl_ui/properties_paint_common.py
release/scripts/startup/bl_ui/properties_physics_field.py
release/scripts/startup/bl_ui/properties_scene.py
release/scripts/startup/bl_ui/properties_texture.py
release/scripts/startup/bl_ui/space_clip.py
release/scripts/startup/bl_ui/space_node.py
release/scripts/startup/bl_ui/space_text.py
release/scripts/startup/bl_ui/space_time.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
source/blender/CMakeLists.txt
source/blender/SConscript
source/blender/blenkernel/BKE_ccg.h
source/blender/blenkernel/BKE_colortools.h
source/blender/blenkernel/BKE_customdata.h
source/blender/blenkernel/BKE_image.h
source/blender/blenkernel/BKE_mesh.h
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/BKE_object.h
source/blender/blenkernel/intern/CCGSubSurf.c
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/cloth.c
source/blender/blenkernel/intern/collision.c
source/blender/blenkernel/intern/colortools.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/deform.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/editderivedmesh.c
source/blender/blenkernel/intern/icons.c
source/blender/blenkernel/intern/idprop.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/multires.c
source/blender/blenkernel/intern/nla.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/sound.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenkernel/intern/tracking.c
source/blender/blenlib/BLI_ghash.h
source/blender/blenlib/intern/BLI_ghash.c
source/blender/blenlib/intern/pbvh.c
source/blender/blenloader/intern/readblenentry.c
source/blender/blenloader/intern/readfile.c
source/blender/bmesh/intern/bmesh_core.c
source/blender/bmesh/intern/bmesh_mesh.c
source/blender/bmesh/intern/bmesh_opdefines.c
source/blender/bmesh/intern/bmesh_operators.c
source/blender/bmesh/intern/bmesh_walkers.c
source/blender/bmesh/intern/bmesh_walkers_impl.c
source/blender/bmesh/operators/bmo_create.c
source/blender/bmesh/operators/bmo_dupe.c
source/blender/bmesh/operators/bmo_hull.c
source/blender/bmesh/tools/BME_bevel.c
source/blender/collada/GeometryExporter.cpp
source/blender/collada/GeometryExporter.h
source/blender/collada/MeshImporter.cpp
source/blender/collada/MeshImporter.h
source/blender/compositor/CMakeLists.txt [new file with mode: 0644]
source/blender/compositor/COM_compositor.h [new file with mode: 0644]
source/blender/compositor/COM_defines.h [new file with mode: 0644]
source/blender/compositor/SConscript [new file with mode: 0644]
source/blender/compositor/intern/COM_CPUDevice.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_CPUDevice.h [new file with mode: 0644]
source/blender/compositor/intern/COM_ChannelInfo.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_ChannelInfo.h [new file with mode: 0644]
source/blender/compositor/intern/COM_ChunkOrder.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_ChunkOrder.h [new file with mode: 0644]
source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_ChunkOrderHotspot.h [new file with mode: 0644]
source/blender/compositor/intern/COM_CompositorContext.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_CompositorContext.h [new file with mode: 0644]
source/blender/compositor/intern/COM_Converter.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_Converter.h [new file with mode: 0644]
source/blender/compositor/intern/COM_Device.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_Device.h [new file with mode: 0644]
source/blender/compositor/intern/COM_ExecutionGroup.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_ExecutionGroup.h [new file with mode: 0644]
source/blender/compositor/intern/COM_ExecutionSystem.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_ExecutionSystem.h [new file with mode: 0644]
source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_ExecutionSystemHelper.h [new file with mode: 0644]
source/blender/compositor/intern/COM_InputSocket.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_InputSocket.h [new file with mode: 0644]
source/blender/compositor/intern/COM_MemoryBuffer.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_MemoryBuffer.h [new file with mode: 0644]
source/blender/compositor/intern/COM_MemoryManager.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_MemoryManager.h [new file with mode: 0644]
source/blender/compositor/intern/COM_MemoryManagerState.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_MemoryManagerState.h [new file with mode: 0644]
source/blender/compositor/intern/COM_MemoryProxy.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_MemoryProxy.h [new file with mode: 0644]
source/blender/compositor/intern/COM_Node.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_Node.h [new file with mode: 0644]
source/blender/compositor/intern/COM_NodeBase.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_NodeBase.h [new file with mode: 0644]
source/blender/compositor/intern/COM_NodeOperation.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_NodeOperation.h [new file with mode: 0644]
source/blender/compositor/intern/COM_NodeProgram.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_NodeProgram.h [new file with mode: 0644]
source/blender/compositor/intern/COM_OpenCLDevice.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_OpenCLDevice.h [new file with mode: 0644]
source/blender/compositor/intern/COM_OutputSocket.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_OutputSocket.h [new file with mode: 0644]
source/blender/compositor/intern/COM_Socket.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_Socket.h [new file with mode: 0644]
source/blender/compositor/intern/COM_SocketConnection.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_SocketConnection.h [new file with mode: 0644]
source/blender/compositor/intern/COM_SocketReader.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_SocketReader.h [new file with mode: 0644]
source/blender/compositor/intern/COM_WorkPackage.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_WorkPackage.h [new file with mode: 0644]
source/blender/compositor/intern/COM_WorkScheduler.cpp [new file with mode: 0644]
source/blender/compositor/intern/COM_WorkScheduler.h [new file with mode: 0644]
source/blender/compositor/intern/COM_compositor.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_AlphaOverNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_AlphaOverNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_BilateralBlurNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_BilateralBlurNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_BlurNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_BlurNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_BokehBlurNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_BokehBlurNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_BokehImageNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_BokehImageNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_BoxMaskNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_BoxMaskNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_BrightnessNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_BrightnessNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_ChannelMatteNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_ChannelMatteNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_ChromaMatteNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_ChromaMatteNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_ColorBalanceNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_ColorBalanceNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_ColorCorrectionNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_ColorCorrectionNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_ColorCurveNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_ColorCurveNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_ColorMatteNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_ColorMatteNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_ColorNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_ColorNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_ColorRampNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_ColorRampNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_ColorSpillNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_ColorSpillNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_ColorToBWNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_ColorToBWNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_CombineHSVANode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_CombineHSVANode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_CombineRGBANode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_CombineRGBANode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_CombineYCCANode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_CombineYCCANode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_CombineYUVANode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_CombineYUVANode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_CompositorNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_CompositorNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_ConvertAlphaNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_CropNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_CropNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_DefocusNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_DefocusNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_DifferenceMatteNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_DifferenceMatteNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_DilateErodeNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_DilateErodeNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_DirectionalBlurNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_DirectionalBlurNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_DisplaceNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_DisplaceNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_DistanceMatteNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_DistanceMatteNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_EllipseMaskNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_EllipseMaskNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_FilterNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_FilterNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_FlipNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_FlipNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_GammaNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_GammaNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_GlareNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_GlareNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_GroupNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_GroupNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_HueSaturationValueNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_IDMaskNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_IDMaskNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_ImageNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_ImageNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_InvertNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_InvertNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_LensDistortionNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_LensDistortionNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_LuminanceMatteNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_LuminanceMatteNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_MapUVNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_MapUVNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_MapValueNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_MapValueNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_MathNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_MathNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_MixNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_MixNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_MovieClipNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_MovieClipNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_MovieDistortionNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_MovieDistortionNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_MuteNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_MuteNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_NormalNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_NormalNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_NormalizeNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_NormalizeNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_OutputFileNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_OutputFileNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_RenderLayersNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_RenderLayersNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_RotateNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_RotateNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_ScaleNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_ScaleNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_SeparateHSVANode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_SeparateHSVANode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_SeparateRGBANode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_SeparateRGBANode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_SeparateYCCANode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_SeparateYCCANode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_SeparateYUVANode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_SeparateYUVANode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_SetAlphaNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_SetAlphaNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_SocketProxyNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_SocketProxyNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_SplitViewerNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_SplitViewerNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_Stabilize2dNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_Stabilize2dNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_SwitchNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_SwitchNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_TextureNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_TextureNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_TimeNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_TimeNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_TonemapNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_TonemapNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_TransformNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_TransformNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_TranslateNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_TranslateNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_ValueNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_ValueNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_VectorBlurNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_VectorBlurNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_VectorCurveNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_VectorCurveNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_ViewLevelsNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_ViewLevelsNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_ViewerNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_ViewerNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_ZCombineNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_ZCombineNode.h [new file with mode: 0644]
source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_AlphaOverKeyOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_AlphaOverMixedOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_AntiAliasOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_AntiAliasOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_BilateralBlurOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_BilateralBlurOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_BlurBaseOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_BlurBaseOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_BokehBlurOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_BokehBlurOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_BokehImageOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_BokehImageOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_BoxMaskOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_BoxMaskOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_BrightnessOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_BrightnessOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_CalculateMeanOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_CalculateMeanOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ChangeHSVOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ChangeHSVOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ChannelMatteOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ChannelMatteOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ChromaMatteOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ChromaMatteOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ColorBalanceLGGOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ColorCorrectionOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ColorCurveOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ColorCurveOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ColorMatteOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ColorMatteOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ColorRampOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ColorRampOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ColorSpillOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ColorSpillOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_CombineChannelsOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_CombineChannelsOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_CompositorOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_CompositorOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertColorProfileOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertColorToBWOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertColorToVectorOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertColorToVectorOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertColourToValueProg.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertColourToValueProg.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertValueToColourProg.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertValueToColourProg.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertValueToVectorOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertValueToVectorOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertVectorToColorOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertVectorToColorOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertVectorToValueOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ConvolutionFilterOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_CropOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_CropOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_CurveBaseOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_CurveBaseOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_DifferenceMatteOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_DilateErodeOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_DilateErodeOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_DirectionalBlurOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_DisplaceOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_DisplaceOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_DisplaceSimpleOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_DistanceMatteOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_DistanceMatteOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_DotproductOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_DotproductOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_EllipseMaskOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_EllipseMaskOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_FastGaussianBlurOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_FlipOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_FlipOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_FogGlowImageOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_FogGlowImageOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_GammaCorrectOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_GammaCorrectOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_GammaOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_GammaOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_GaussianBokehBlurOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_GaussianXBlurOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_GaussianYBlurOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_GlareBaseOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_GlareBaseOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_GlareSimpleStarOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_GlareSimpleStarOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_GlareStreaksOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_GlareStreaksOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_GlareThresholdOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_GlareThresholdOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_IDMaskOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_IDMaskOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ImageOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ImageOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_InvertOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_InvertOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_LensGhostOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_LensGhostOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_LensGlowImageOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_LensGlowImageOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_LensGlowOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_LensGlowOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_LuminanceMatteOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MapUVOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MapUVOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MapValueOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MapValueOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MathBaseOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MathBaseOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MixAddOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MixAddOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MixBaseOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MixBaseOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MixBlendOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MixBlendOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MixBurnOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MixBurnOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MixColorOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MixColorOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MixDarkenOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MixDarkenOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MixDifferenceOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MixDifferenceOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MixDivideOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MixDivideOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MixDodgeOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MixDodgeOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MixHueOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MixHueOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MixLightenOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MixLightenOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MixLinearLightOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MixLinearLightOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MixMultiplyOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MixMultiplyOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MixOverlayOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MixOverlayOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MixSaturationOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MixSaturationOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MixScreenOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MixScreenOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MixSoftLightOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MixSoftLightOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MixSubtractOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MixSubtractOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MixValueOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MixValueOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MovieClipAttributeOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MovieClipOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MovieClipOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MovieDistortionOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MovieDistortionOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MultilayerImageOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MultilayerImageOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_NormalizeOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_NormalizeOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_OpenCLKernels.cl [new file with mode: 0644]
source/blender/compositor/operations/COM_OpenCLKernels.cl.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_OutputFileOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_OutputFileOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_PreviewOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_PreviewOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_QualityStepHelper.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_QualityStepHelper.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ReadBufferOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ReadBufferOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersAOOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersAOOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersAlphaProg.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersAlphaProg.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersBaseProg.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersColorOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersColorOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersCyclesOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersCyclesOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersDepthProg.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersDepthProg.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersDiffuseOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersDiffuseOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersEmitOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersEmitOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersEnvironmentOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersEnvironmentOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersImageProg.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersImageProg.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersIndirectOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersIndirectOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersMaterialIndexOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersMaterialIndexOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersMistOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersMistOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersNormalOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersNormalOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersObjectIndexOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersObjectIndexOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersReflectionOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersReflectionOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersRefractionOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersRefractionOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersShadowOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersShadowOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersSpecularOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersSpecularOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersSpeedOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersSpeedOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersUVOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RenderLayersUVOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_RotateOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_RotateOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ScaleOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ScaleOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_SeparateChannelOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_SeparateChannelOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_SetAlphaOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_SetAlphaOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_SetColorOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_SetColorOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_SetSamplerOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_SetSamplerOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_SetValueOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_SetValueOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_SetVectorOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_SetVectorOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_SocketProxyOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_SocketProxyOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_SplitViewerOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_SplitViewerOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_TextureOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_TextureOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_TonemapOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_TonemapOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_TranslateOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_TranslateOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_VectorBlurOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_VectorBlurOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_VectorCurveOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_VectorCurveOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ViewerBaseOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ViewerBaseOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ViewerOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ViewerOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_WriteBufferOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_WriteBufferOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_ZCombineOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_ZCombineOperation.h [new file with mode: 0644]
source/blender/editors/animation/anim_filter.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/editarmature_retarget.c
source/blender/editors/armature/editarmature_sketch.c
source/blender/editors/armature/reeb.c
source/blender/editors/curve/editcurve.c
source/blender/editors/include/ED_mesh.h
source/blender/editors/include/ED_transform.h
source/blender/editors/interface/interface_draw.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_icons.c
source/blender/editors/interface/interface_intern.h
source/blender/editors/interface/interface_ops.c
source/blender/editors/interface/interface_panel.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/mesh/editmesh_knife.c
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/editmesh_utils.c
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_constraint.c
source/blender/editors/object/object_select.c
source/blender/editors/object/object_transform.c
source/blender/editors/render/render_update.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/sculpt_paint/paint_cursor.c
source/blender/editors/sculpt_paint/paint_hide.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_ops.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/space_clip/clip_editor.c
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_intern.h
source/blender/editors/space_node/node_ops.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_conversions.c
source/blender/gpu/intern/gpu_buffers.c
source/blender/gpu/intern/gpu_codegen.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/imbuf/intern/IMB_anim.h
source/blender/imbuf/intern/IMB_metadata.h
source/blender/imbuf/intern/anim_movie.c
source/blender/imbuf/intern/bmp.c
source/blender/imbuf/intern/cache.c
source/blender/imbuf/intern/filetype.c
source/blender/imbuf/intern/indexer.c
source/blender/imbuf/intern/indexer_dv.c
source/blender/imbuf/intern/iris.c
source/blender/imbuf/intern/jp2.c
source/blender/imbuf/intern/jpeg.c
source/blender/imbuf/intern/metadata.c
source/blender/imbuf/intern/moviecache.c
source/blender/imbuf/intern/openexr/openexr_multi.h
source/blender/imbuf/intern/radiance_hdr.c
source/blender/imbuf/intern/readimage.c
source/blender/imbuf/intern/scaling.c
source/blender/imbuf/intern/targa.c
source/blender/imbuf/intern/thumbs.c
source/blender/imbuf/intern/thumbs_blend.c
source/blender/imbuf/intern/tiff.c
source/blender/imbuf/intern/util.c
source/blender/makesdna/DNA_meshdata_types.h
source/blender/makesdna/DNA_movieclip_types.h
source/blender/makesdna/DNA_node_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_texture_types.h
source/blender/makesdna/intern/dna_genfile.c
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_animation.c
source/blender/makesrna/intern/rna_armature.c
source/blender/makesrna/intern/rna_brush.c
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_constraint.c
source/blender/makesrna/intern/rna_image_api.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_nodetree_types.h
source/blender/makesrna/intern/rna_sequencer_api.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/modifiers/intern/MOD_boolean_util.c
source/blender/modifiers/intern/MOD_build.c
source/blender/modifiers/intern/MOD_mask.c
source/blender/modifiers/intern/MOD_mirror.c
source/blender/modifiers/intern/MOD_remesh.c
source/blender/nodes/CMakeLists.txt
source/blender/nodes/NOD_composite.h
source/blender/nodes/SConscript
source/blender/nodes/composite/node_composite_tree.c
source/blender/nodes/composite/nodes/node_composite_bilateralblur.c
source/blender/nodes/composite/nodes/node_composite_bokehblur.c [new file with mode: 0644]
source/blender/nodes/composite/nodes/node_composite_bokehimage.c [new file with mode: 0644]
source/blender/nodes/composite/nodes/node_composite_boxmask.c [new file with mode: 0644]
source/blender/nodes/composite/nodes/node_composite_brightness.c
source/blender/nodes/composite/nodes/node_composite_colorcorrection.c [new file with mode: 0644]
source/blender/nodes/composite/nodes/node_composite_displace.c
source/blender/nodes/composite/nodes/node_composite_ellipsemask.c [new file with mode: 0644]
source/blender/nodes/composite/nodes/node_composite_image.c
source/blender/nodes/composite/nodes/node_composite_switch.c [new file with mode: 0644]
source/blender/nodes/composite/nodes/node_composite_viewer.c
source/blender/nodes/shader/node_shader_tree.c
source/blender/nodes/texture/node_texture_tree.c
source/blender/opencl/CMakeLists.txt [new file with mode: 0644]
source/blender/opencl/OCL_opencl.h [new file with mode: 0644]
source/blender/opencl/SConscript [new file with mode: 0644]
source/blender/opencl/intern/OCL_opencl.c [new file with mode: 0644]
source/blender/opencl/intern/clew.c [new file with mode: 0644]
source/blender/opencl/intern/clew.h [new file with mode: 0644]
source/blender/python/intern/bpy_rna.c
source/blender/python/intern/bpy_rna_callback.c
source/blender/render/intern/raytrace/bvh.h
source/blender/render/intern/raytrace/rayobject.cpp
source/blender/render/intern/raytrace/rayobject_blibvh.cpp
source/blender/render/intern/raytrace/rayobject_hint.h
source/blender/render/intern/raytrace/rayobject_qbvh.cpp
source/blender/render/intern/raytrace/rayobject_rtbuild.cpp
source/blender/render/intern/raytrace/rayobject_rtbuild.h
source/blender/render/intern/raytrace/rayobject_svbvh.cpp
source/blender/render/intern/raytrace/rayobject_vbvh.cpp
source/blender/render/intern/raytrace/reorganize.h
source/blender/render/intern/raytrace/svbvh.h
source/blender/render/intern/raytrace/vbvh.h
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/shadeinput.c
source/blender/render/intern/source/sss.c
source/blender/render/intern/source/strand.c
source/blender/render/intern/source/texture_ocean.c
source/blender/windowmanager/intern/wm.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/intern/wm_window.c
source/blenderplayer/bad_level_call_stubs/stubs.c
source/creator/CMakeLists.txt
source/gameengine/GameLogic/SCA_PythonController.cpp
source/gameengine/GameLogic/SCA_RandomNumberGenerator.h

index 6b34c36d90db571ffd8c926670f201c2d976455c..69812be1e50fec6268e705a6c72b7d846da0b9f5 100644 (file)
@@ -291,8 +291,9 @@ if(APPLE)
                        message(STATUS "Setting compiler to: " ${CMAKE_XCODE_ATTRIBUTE_GCC_VERSION})
                endif()
        else() # unix makefile generator does not fill XCODE_VERSION var, so we get it with a command
-               execute_process(COMMAND xcodebuild -version OUTPUT_VARIABLE XCODE_VERS_BUILDNR )
-               STRING(SUBSTRING ${XCODE_VERS_BUILDNR} 6 3 XCODE_VERSION) # truncate away build-nr
+               execute_process(COMMAND xcodebuild -version OUTPUT_VARIABLE XCODE_VERS_BUILD_NR)
+               string(SUBSTRING "${XCODE_VERS_BUILD_NR}" 6 3 XCODE_VERSION) # truncate away build-nr
+               unset(XCODE_VERS_BUILD_NR)
        endif()
        
        message(STATUS "Detected Xcode-version: " ${XCODE_VERSION})
@@ -837,6 +838,17 @@ elseif(WIN32)
                        set(GETTEXT_LIBPATH ${GETTEXT}/lib)
                        set(GETTEXT_LIBRARIES gnu_gettext)
                endif()
+               
+               if(WITH_MOD_CLOTH_ELTOPO)
+                       set(LAPACK ${LIBDIR}/lapack)
+                       # set(LAPACK_INCLUDE_DIR ${LAPACK}/include)
+                       set_lib_path(LAPACK_LIBPATH ${LAPACK}/lib)      
+                       set(LAPACK_LIBRARIES
+                               ${LIBDIR}/lapack/lib/libf2c.lib
+                               ${LIBDIR}/lapack/lib/clapack_nowrap.lib
+                               ${LIBDIR}/lapack/lib/BLAS_nowrap.lib
+                       )
+               endif()
 
                set(PNG_LIBRARIES libpng)
                set(JPEG_LIBRARIES libjpeg)
@@ -1079,7 +1091,11 @@ elseif(WIN32)
                                ${LIBDIR}/opencollada/include/GeneratedSaxParser/include
                        )
                        set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib ${OPENCOLLADA}/lib)
-                       set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa xml)
+                       if(WITH_MINGW64)
+                               set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa xml)
+                       else()
+                               set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa)
+                       endif()
                        set(PCRE_LIBRARIES pcre)
                endif()
 
index eeefcf730c85812e66cbe2d58ebbe867a732f834..fbd28cc239891cd97f910cc58e9789eb1974454f 100644 (file)
@@ -214,7 +214,8 @@ macro(setup_liblinks
                        ${OPENGL_glu_LIBRARY}
                        ${PNG_LIBRARIES}
                        ${ZLIB_LIBRARIES}
-                       ${FREETYPE_LIBRARY})
+                       ${FREETYPE_LIBRARY}
+                       ${LAPACK_LIBRARIES})
 
        # since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
        if(WITH_PYTHON)  # AND NOT WITH_PYTHON_MODULE  # WIN32 needs
index c0124fe81999414d047b7d275549044fb5a5a2eb..8a534bc530e8bb0caefe07311ea66663a745da03 100644 (file)
@@ -1,5 +1,5 @@
 set(PROJECT_DESCRIPTION  "Blender is a very fast and versatile 3D modeller/renderer.")
-set(PROJECT_COPYRIGHT    "Copyright (C) 2001-2011 Blender Foundation")
+set(PROJECT_COPYRIGHT    "Copyright (C) 2001-2012 Blender Foundation")
 set(PROJECT_CONTACT      "foundation@blender.org")
 set(PROJECT_VENDOR       "Blender Foundation")
 set(ORG_WEBSITE          "www.blender.org")
@@ -31,7 +31,7 @@ set(BUILD_REV ${MY_WC_REVISION})
 
 
 # Force Package Name
-set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${BLENDER_VERSION}-r${BUILD_REV}-${CMAKE_SYSTEM_PROCESSOR})
+set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-1.r${BUILD_REV}-${CMAKE_SYSTEM_PROCESSOR})
 
 if(CMAKE_SYSTEM_NAME MATCHES "Linux")
        # RPM packages
index 25ad5344721848e6ad0e8a9d6b6b5c1d1e263421..85a689031a3c1266519fe17bedeb2874db22e53c 100644 (file)
@@ -1,5 +1,11 @@
 # -*- rpm-spec -*-
 %global __python %{__python3}
+%global blender_api @CPACK_PACKAGE_VERSION_MAJOR@.@CPACK_PACKAGE_VERSION_MINOR@
+
+%define _rpmdir @CPACK_RPM_DIRECTORY@
+%define _rpmfilename @CPACK_RPM_FILE_NAME@
+%define _unpackaged_files_terminate_build 0
+%define _topdir @CPACK_RPM_DIRECTORY@
 
 BuildRoot:      @CPACK_RPM_DIRECTORY@/@CPACK_PACKAGE_FILE_NAME@@CPACK_RPM_PACKAGE_COMPONENT_PART_PATH@
 Summary:        @CPACK_RPM_PACKAGE_SUMMARY@
@@ -9,12 +15,17 @@ Release:        @CPACK_RPM_PACKAGE_RELEASE@%{?dist}
 License:        @CPACK_RPM_PACKAGE_LICENSE@
 Group:          @CPACK_RPM_PACKAGE_GROUP@
 Vendor:         @CPACK_RPM_PACKAGE_VENDOR@
-Epoch:         1
+Epoch:          1
 
-%define _rpmdir @CPACK_RPM_DIRECTORY@
-%define _rpmfilename @CPACK_RPM_FILE_NAME@
-%define _unpackaged_files_terminate_build 0
-%define _topdir @CPACK_RPM_DIRECTORY@
+Requires(post):   desktop-file-utils
+Requires(post):   shared-mime-info
+Requires(postun): desktop-file-utils
+Requires(postun): shared-mime-info
+
+Provides:         blender(ABI) = %{blender_api}
+Provides:         blender-fonts = %{?epoch:%{epoch}:}%{version}-%{release}
+
+Obsoletes:        blender-fonts <= 2.49a-9
 
 %description
 Blender is an integrated 3d suite for modelling, animation, rendering,
@@ -40,6 +51,10 @@ then
 fi
 mv "@CPACK_TOPLEVEL_DIRECTORY@/tmpBBroot" ${RPM_BUILD_ROOT}
 
+rm -f ${RPM_BUILD_ROOT}%{_bindir}/blender-thumbnailer.py
+
+%find_lang %{name}
+
 %clean
 rm -rf ${RPM_BUILD_ROOT}
 
@@ -57,14 +72,15 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
 fi || :
 
-%files
+%files -f blender.lang
 %defattr(-,root,root,-)
 %{_bindir}/%{name}
-%{_datadir}/%{name}/@CPACK_PACKAGE_VERSION_MAJOR@.@CPACK_PACKAGE_VERSION_MINOR@
+%{_datadir}/%{name}/%{blender_api}/datafiles/fonts
+%{_datadir}/%{name}/%{blender_api}/scripts
 %{_datadir}/icons/hicolor/*/apps/%{name}.*
 %{_datadir}/applications/%{name}.desktop
-%{_datadir}/doc/blender
-%{_mandir}/man1/blender.*
+%{_datadir}/doc/%{name}
+%{_mandir}/man1/%{name}.*
 
 %changelog
 @CPACK_RPM_SPEC_CHANGELOG@
index 0b50084db0fb16077784b9fd8fe022b5ca532ee9..898ebd2bbb2cab29b1d0aa0dfdbc7114df1261aa 100644 (file)
@@ -26,7 +26,7 @@ shader node_camera(
        ViewVector = (vector)transform("world", "camera", P);
 
        ViewZDepth = fabs(ViewVector[2]);
-       ViewDistance = lenght(ViewVector);
+       ViewDistance = length(ViewVector);
 
        ViewVector = normalize(ViewVector);
 }
index 43c6b1f9456dfe5df6d739a0f474f0db5b13a215..4f640253f0f2a4c029f4706dad529280261657f1 100644 (file)
@@ -125,7 +125,7 @@ void ntlGeometryObject::initialize(ntlRenderGlobals *glob)
                }
 
                if(!gotit) {
-                       errFatal("ntlGeometryObject::initialize","Obj '"<<mName<<"', Unkown 'geoinittype' value: '"<< ginitStr <<"' ", SIMWORLD_INITERROR);
+                       errFatal("ntlGeometryObject::initialize","Obj '"<<mName<<"', Unknown 'geoinittype' value: '"<< ginitStr <<"' ", SIMWORLD_INITERROR);
                        return;
                }
        }
index 099cb02564d9ff73ae2c3ecce8cf488ad64dc9e8..ff87f98658d9a3dcecb8b69f67334674c43df1ce 100644 (file)
@@ -24,7 +24,9 @@ from bpy.props import StringProperty
 
 
 def _lang_module_get(sc):
-    return __import__("console_" + sc.language)
+    return __import__("console_" + sc.language,
+                      # for python 3.3, maybe a bug???
+                      level=0)
 
 
 class ConsoleExec(Operator):
index 6af6488e86bf3303643881cef700838336777435..f2e5e57fad83ea100d5a8aaba1f4dec068118196 100644 (file)
@@ -121,12 +121,14 @@ class SaveDirty(Operator):
                 if image.packed_file:
                     if image.library:
                         self.report({'WARNING'},
-                                    "Packed library image: %r from library %r can't be re-packed" %
+                                    "Packed library image: %r from library %r"
+                                    " can't be re-packed" %
                                     (image.name, image.library.filepath))
                     else:
                         image.pack(as_png=True)
                 else:
-                    filepath = bpy.path.abspath(image.filepath, library=image.library)
+                    filepath = bpy.path.abspath(image.filepath,
+                                                library=image.library)
                     if "\\" not in filepath and "/" not in filepath:
                         self.report({'WARNING'}, "Invalid path: " + filepath)
                     elif filepath in unique_paths:
index 564d6d7d8cf26a1d1043fff8a59a54f85afdf0c4..05f7f3f0367ca19b3058a44feabc429c5a59b8a3 100644 (file)
@@ -129,9 +129,6 @@ class AddPresetBase():
                         value = eval(rna_path)
                         rna_recursive_attr_expand(value, rna_path, 1)
 
-                            
-
-
                     file_preset.close()
 
             preset_menu_class.bl_label = bpy.path.display_name(filename)
index 1f798f4659033c54b4f9b14611eaaa8cb486dd35..3c1f910814a369785e9986f59c8b9187a88e0eae 100644 (file)
@@ -35,7 +35,7 @@ class MotionPathButtonsPanel():
         layout = self.layout
 
         mps = avs.motion_path
-        
+
         # Display Range
         layout.prop(mps, "type", expand=True)
 
@@ -50,21 +50,21 @@ class MotionPathButtonsPanel():
         elif (mps.type == 'RANGE'):
             sub.prop(mps, "frame_start", text="Start")
             sub.prop(mps, "frame_end", text="End")
-            
+
         sub.prop(mps, "frame_step", text="Step")
-        
+
         col = split.column()
         if bones:
             col.label(text="Cache for Bone:")
         else:
             col.label(text="Cache:")
-            
+
         if mpath:
             sub = col.column(align=True)
             sub.enabled = False
             sub.prop(mpath, "frame_start", text="From")
             sub.prop(mpath, "frame_end", text="To")
-            
+
             if bones:
                 col.operator("pose.paths_update", text="Update Paths", icon='BONE_DATA')
             else:
@@ -72,15 +72,14 @@ class MotionPathButtonsPanel():
         else:
             col.label(text="Not available yet...", icon='ERROR')
             col.label(text="Calculate Paths first", icon='INFO')
-        
-        
+
         # Display Settings
         split = layout.split()
-        
+
         col = split.column()
         col.label(text="Show:")
         col.prop(mps, "show_frame_numbers", text="Frame Numbers")
-        
+
         col = split.column()
         col.prop(mps, "show_keyframe_highlight", text="Keyframes")
         sub = col.column()
index 529d7c5f981729e5297c87fa3fdce240511261cb..6bec652045e3aa6f5e91be258b8db3ac1e3b487f 100644 (file)
@@ -305,10 +305,10 @@ class DATA_PT_motion_paths(MotionPathButtonsPanel, Panel):
 
         ob = context.object
         avs = ob.pose.animation_visualisation
-        
+
         pchan = context.active_pose_bone
         mpath = pchan.motion_path if pchan else None
-        
+
         self.draw_settings(context, avs, mpath, bones=True)
 
 
index 10c4c1fdd0490259aa77c1a0fbe4df5b94f092bb..11524cf9c03ea8a23d205d420994de9d3bf1975b 100644 (file)
@@ -356,9 +356,6 @@ class BONE_PT_deform(BoneButtonsPanel, Panel):
         sub.prop(bone, "bbone_in", text="Ease In")
         sub.prop(bone, "bbone_out", text="Ease Out")
 
-        col.label(text="Offset:")
-        col.prop(bone, "use_cyclic_offset")
-
 
 class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
index cdef7e703e54c9a28c3055deb1b4399c0729c011..4f3ca26725c182bd01e53feb309c14dadd2a7d56 100644 (file)
@@ -301,7 +301,7 @@ class OBJECT_PT_motion_paths(MotionPathButtonsPanel, Panel):
         ob = context.object
         avs = ob.animation_visualisation
         mpath = ob.motion_path
-        
+
         self.draw_settings(context, avs, mpath)
 
 
index 94df1ed6cf5a656fc66549aa6ba7962135fc06f2..53cf640beb9d1db4e9d4934d5bee2c0971c9f35a 100644 (file)
@@ -67,3 +67,37 @@ class UnifiedPaintPanel():
         ups = context.tool_settings.unified_paint_settings
         ptr = ups if ups.use_unified_weight else brush
         parent.prop(ptr, prop_name, icon=icon, text=text, slider=slider)
+
+
+# Used in both the View3D toolbar and texture properties
+def sculpt_brush_texture_settings(layout, brush):
+    tex_slot = brush.texture_slot
+
+    layout.label(text="Brush Mapping:")
+
+    # map_mode
+    layout.row().prop(tex_slot, "map_mode", text="")
+    layout.separator()
+
+    # angle and texture_angle_source
+    col = layout.column()
+    col.active = brush.sculpt_capabilities.has_texture_angle_source
+    col.label(text="Angle:")
+    if brush.sculpt_capabilities.has_random_texture_angle:
+        col.prop(brush, "texture_angle_source_random", text="")
+    else:
+        col.prop(brush, "texture_angle_source_no_random", text="")
+
+    col = layout.column()
+    col.active = brush.sculpt_capabilities.has_texture_angle
+    col.prop(tex_slot, "angle", text="")
+
+    # scale and offset
+    split = layout.split()
+    split.prop(tex_slot, "offset")
+    split.prop(tex_slot, "scale")
+
+    # texture_sample_bias
+    col = layout.column(align=True)
+    col.label(text="Sample Bias:")
+    col.prop(brush, "texture_sample_bias", slider=True, text="")
index 2229b9dc3dab244bc5f8ec0656eebb8d99541724..2054215df4a96420d04a6b98af22c84cd0fb9cc9 100644 (file)
@@ -112,7 +112,6 @@ class PHYSICS_PT_field(PhysicButtonsPanel, Panel):
 
             col = split.column()
             col.prop(field, "use_object_coords")
-            col.prop(field, "use_root_coords")
             col.prop(field, "use_2d_force")
         else:
             basic_force_field_settings_ui(self, context, field)
index 1c78549c086b0a38c759364f0e1de0c286dd3f78..af8fcc6cbdc43e883c204607940c8dd3b1c81042 100644 (file)
@@ -122,7 +122,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, Panel):
             subcol.operator_context = 'INVOKE_DEFAULT'
             subcol.operator("anim.keying_set_export", text="Export to File").filepath = "keyingset.py"
 
-            col = row.column()
+            col = row.column(align=True)
             col.label(text="Keyframing Settings:")
             col.prop(ks, "bl_options")
 
@@ -161,20 +161,25 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, Panel):
             col.template_any_ID(ksp, "id", "id_type")
             col.template_path_builder(ksp, "data_path", ksp.id)
 
-            row = layout.row()
+            row = col.row(align=True)
+            row.label(text="Array Target:")
+            row.prop(ksp, "use_entire_array", text="All Items")
+            if ksp.use_entire_array:
+                row.label(text=" ") # padding
+            else:
+                row.prop(ksp, "array_index", text="Index")
 
-            col = row.column()
-            col.label(text="Array Target:")
-            col.prop(ksp, "use_entire_array")
-            if ksp.use_entire_array is False:
-                col.prop(ksp, "array_index")
+            layout.separator()
 
+            row = layout.row()
             col = row.column()
             col.label(text="F-Curve Grouping:")
-            col.prop(ksp, "group_method")
+            col.prop(ksp, "group_method", text="")
             if ksp.group_method == 'NAMED':
                 col.prop(ksp, "group")
-
+            
+            col = row.column(align=True)
+            col.label(text="Keyframing Settings:")
             col.prop(ksp, "bl_options")
 
 
index 320475815507ea68a1cca951f542689cbcaa7be8..1d5e96cf7016cc14c5a7e336a0b967d126c4d6b0 100644 (file)
@@ -29,6 +29,8 @@ from bpy.types import (Brush,
 
 from rna_prop_ui import PropertyPanel
 
+from bl_ui.properties_paint_common import sculpt_brush_texture_settings
+
 
 class TEXTURE_MT_specials(Menu):
     bl_label = "Texture Specials"
@@ -856,12 +858,7 @@ class TEXTURE_PT_mapping(TextureSlotPanel, Panel):
 
         if isinstance(idblock, Brush):
             if context.sculpt_object:
-                layout.label(text="Brush Mapping:")
-                layout.prop(tex, "map_mode", expand=True)
-
-                row = layout.row()
-                row.active = tex.map_mode in {'FIXED', 'TILED'}
-                row.prop(tex, "angle")
+                sculpt_brush_texture_settings(layout, idblock)
         else:
             if isinstance(idblock, Material):
                 split = layout.split(percentage=0.3)
@@ -884,9 +881,9 @@ class TEXTURE_PT_mapping(TextureSlotPanel, Panel):
                 row.prop(tex, "mapping_y", text="")
                 row.prop(tex, "mapping_z", text="")
 
-        row = layout.row()
-        row.column().prop(tex, "offset")
-        row.column().prop(tex, "scale")
+            row = layout.row()
+            row.column().prop(tex, "offset")
+            row.column().prop(tex, "scale")
 
 
 class TEXTURE_PT_influence(TextureSlotPanel, Panel):
index bd3f087e38a686c67cc52e8f121e88615fd73e26..4ab23359fd8d47cd02e06c86686b7b1196d76321 100644 (file)
@@ -101,6 +101,7 @@ class CLIP_PT_clip_view_panel:
 
         return clip and sc.view == 'CLIP'
 
+
 class CLIP_PT_tracking_panel:
 
     @classmethod
index 0114f33928a097882e67baeb151062626f4cb451..11c258ef689197626dd58828ba4f1ddb97ad9f0f 100644 (file)
@@ -205,5 +205,25 @@ class NODE_PT_properties(Panel):
         col.prop(snode, "backdrop_y", text="Y")
         col.operator("node.backimage_move", text="Move")
 
+class NODE_PT_quality(bpy.types.Panel):
+    bl_space_type = 'NODE_EDITOR'
+    bl_region_type = 'UI'
+    bl_label = "Quality"
+
+    @classmethod
+    def poll(cls, context):
+        snode = context.space_data
+        return snode.tree_type == 'COMPOSITING' and snode.node_tree is not None
+
+    def draw(self, context):
+        layout = self.layout
+        snode = context.space_data
+        tree = snode.node_tree
+
+        layout.prop(tree, "render_quality", text="Render")
+        layout.prop(tree, "edit_quality", text="Edit")
+        layout.prop(tree, "chunksize")
+        layout.prop(tree, "use_opencl")
+
 if __name__ == "__main__":  # only for live edit.
     bpy.utils.register_module(__name__)
index d1daa4a55549ef5e370af54a3592c6115f748d9d..9c24e48300af3dd35e4c70fa745691b70983556e 100644 (file)
@@ -277,7 +277,7 @@ class TEXT_MT_edit(Menu):
 
         layout.separator()
 
-        layout.operator("text.move_lines", 
+        layout.operator("text.move_lines",
                         text="Move line(s) up").direction = 'UP'
         layout.operator("text.move_lines",
                         text="Move line(s) down").direction = 'DOWN'
index 8fb587e263417a02d19121561b5a8f16ffc28467..0f573c46d698283fef041526945a19eab043bfd6 100644 (file)
@@ -83,7 +83,7 @@ class TIME_HT_header(Header):
         row.prop(toolsettings, "use_keyframe_insert_auto", text="", toggle=True)
         if toolsettings.use_keyframe_insert_auto:
             row.prop(toolsettings, "use_keyframe_insert_keyingset", text="", toggle=True)
-            
+
             if screen.is_animation_playing:
                 subsub = row.row()
                 subsub.prop(toolsettings, "use_record_with_nla", toggle=True)
index b3ac9481931de7b8daef2b5e4e7c0bd262f2c824..e069d78bff0432e65f9bf525e2bec3295b2d7273 100644 (file)
@@ -93,7 +93,7 @@ class VIEW3D_HT_header(Header):
             if snap_element != 'INCREMENT':
                 row.prop(toolsettings, "snap_target", text="")
                 if obj:
-                    if obj.mode in {'OBJECT','POSE'} and snap_element != 'VOLUME':
+                    if obj.mode in {'OBJECT', 'POSE'} and snap_element != 'VOLUME':
                         row.prop(toolsettings, "use_snap_align_rotation", text="")
                     elif obj.mode == 'EDIT':
                         row.prop(toolsettings, "use_snap_self", text="")
@@ -164,7 +164,7 @@ class VIEW3D_MT_transform(VIEW3D_MT_transform_base):
     def draw(self, context):
         # base menu
         VIEW3D_MT_transform_base.draw(self, context)
-        
+
         # generic...
         layout = self.layout
         layout.separator()
@@ -178,16 +178,16 @@ class VIEW3D_MT_transform_object(VIEW3D_MT_transform_base):
     def draw(self, context):
         # base menu
         VIEW3D_MT_transform_base.draw(self, context)
-        
+
         # object-specific option follow...
         layout = self.layout
         layout.separator()
 
         layout.operator("transform.translate", text="Move Texture Space").texture_space = True
         layout.operator("transform.resize", text="Scale Texture Space").texture_space = True
-        
+
         layout.separator()
-        
+
         layout.operator_context = 'EXEC_REGION_WIN'
         layout.operator("transform.transform", text="Align to Transform Orientation").mode = 'ALIGN'  # XXX see alignmenu() in edit.c of b2.4x to get this working
 
@@ -214,13 +214,13 @@ class VIEW3D_MT_transform_armature(VIEW3D_MT_transform_base):
     def draw(self, context):
         # base menu
         VIEW3D_MT_transform_base.draw(self, context)
-        
+
         # armature specific extensions follow...
         layout = self.layout
         layout.separator()
 
         obj = context.object
-        if (obj.type == 'ARMATURE' and obj.mode in {'EDIT', 'POSE'} and 
+        if (obj.type == 'ARMATURE' and obj.mode in {'EDIT', 'POSE'} and
             obj.data.draw_type in {'BBONE', 'ENVELOPE'}):
             layout.operator("transform.transform", text="Scale Envelope/BBone").mode = 'BONE_SIZE'
 
@@ -612,6 +612,7 @@ class VIEW3D_MT_select_edit_curve(Menu):
         layout.operator("curve.select_all", text="Inverse").action = 'INVERT'
         layout.operator("curve.select_random")
         layout.operator("curve.select_nth", text="Every Nth Number of Points")
+        layout.operator("curve.select_linked", text="Select Linked")
 
         layout.separator()
 
@@ -641,6 +642,7 @@ class VIEW3D_MT_select_edit_surface(Menu):
         layout.operator("curve.select_all", text="Inverse").action = 'INVERT'
         layout.operator("curve.select_random")
         layout.operator("curve.select_nth", text="Every Nth Number of Points")
+        layout.operator("curve.select_linked", text="Select Linked")
 
         layout.separator()
 
@@ -1286,7 +1288,7 @@ class VIEW3D_MT_hide_mask(Menu):
         op = layout.operator("paint.hide_show", text="Show Bounding Box")
         op.action = 'SHOW'
         op.area = 'INSIDE'
-    
+
         op = layout.operator("paint.hide_show", text="Hide Masked")
         op.area = 'MASKED'
         op.action = 'HIDE'
@@ -1989,7 +1991,7 @@ class VIEW3D_MT_edit_curve_ctrlpoints(Menu):
 
             layout.separator()
 
-            layout.menu("VIEW3D_MT_hook")
+        layout.menu("VIEW3D_MT_hook")
 
 
 class VIEW3D_MT_edit_curve_segments(Menu):
@@ -2299,7 +2301,7 @@ class VIEW3D_PT_view3d_cursor(Panel):
     @classmethod
     def poll(cls, context):
         view = context.space_data
-        return (view)
+        return (view is not None)
 
     def draw(self, context):
         layout = self.layout
index 50f26c33e15e4f400f09a01f575c60f767e50de9..e78176fac0fc08aef618b8cc03fd42f943d0bd8b 100644 (file)
@@ -20,6 +20,7 @@
 import bpy
 from bpy.types import Menu, Panel
 from bl_ui.properties_paint_common import UnifiedPaintPanel
+from bl_ui.properties_paint_common import sculpt_brush_texture_settings
 
 
 class View3DPanel():
@@ -719,45 +720,11 @@ class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel):
             col.prop(brush, "use_fixed_texture")
 
         if context.sculpt_object:
-            #XXX duplicated from properties_texture.py
-
-            col.label(text="Brush Mapping:")
-            col.row().prop(tex_slot, "map_mode", expand=True)
-
-            col.separator()
-
-            col = layout.column()
-            col.active = tex_slot.map_mode in {'FIXED'}
-            col.label(text="Angle:")
-            if brush.sculpt_capabilities.has_random_texture_angle:
-                col.prop(brush, "texture_angle_source_random", text="")
-            else:
-                col.prop(brush, "texture_angle_source_no_random", text="")
-
-            #row = col.row(align=True)
-            #row.label(text="Angle:")
-            #row.active = tex_slot.map_mode in {'FIXED', 'TILED'}
-
-            #row = col.row(align=True)
-
-            #col = row.column()
-            #col.active = tex_slot.map_mode in {'FIXED'}
-            #col.prop(brush, "use_rake", toggle=True, icon='PARTICLEMODE', text="")
-
-            col = layout.column()
-            col.active = tex_slot.map_mode in {'FIXED', 'TILED'}
-            col.prop(tex_slot, "angle", text="")
-
-            split = layout.split()
-            split.prop(tex_slot, "offset")
-            split.prop(tex_slot, "scale")
-
-            col = layout.column(align=True)
-            col.label(text="Sample Bias:")
-            col.prop(brush, "texture_sample_bias", slider=True, text="")
+            sculpt_brush_texture_settings(col, brush)
 
+            # use_texture_overlay and texture_overlay_alpha
             col = layout.column(align=True)
-            col.active = tex_slot.map_mode in {'FIXED', 'TILED'}
+            col.active = brush.sculpt_capabilities.has_overlay
             col.label(text="Overlay:")
 
             row = col.row()
@@ -766,7 +733,6 @@ class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel):
             else:
                 row.prop(brush, "use_texture_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
             sub = row.row()
-            sub.active = tex_slot.map_mode in {'FIXED', 'TILED'} and brush.use_texture_overlay
             sub.prop(brush, "texture_overlay_alpha", text="Alpha")
 
 
index cb17a87fd76a023a9eb90ad5de210a73f75ff05a..e0fd33d13160dfb7a12531cb02eb3ea5d1286898 100644 (file)
@@ -94,11 +94,13 @@ add_subdirectory(blenkernel)
 add_subdirectory(blenlib)
 add_subdirectory(bmesh)
 add_subdirectory(render)
+add_subdirectory(compositor)
 add_subdirectory(blenfont)
 add_subdirectory(blenloader)
 add_subdirectory(blenpluginapi)
 add_subdirectory(ikplugin)
 add_subdirectory(gpu)
+add_subdirectory(opencl)
 add_subdirectory(imbuf)
 add_subdirectory(avi)
 add_subdirectory(nodes)
index c3a7089f425659874bdd047c11b904d38bc2689f..411a04528c5a4f6795f59bf937e9031c4075ce4e 100644 (file)
@@ -9,9 +9,11 @@ SConscript(['avi/SConscript',
             'blenloader/SConscript',
             'blenpluginapi/SConscript',
             'gpu/SConscript',
+            'opencl/SConscript',
             'editors/SConscript',
             'imbuf/SConscript',
             'makesdna/SConscript',
+            'compositor/SConscript',
             'render/SConscript',
             'nodes/SConscript',
             'modifiers/SConscript',
index 597d6498d99b970262f07a3da68b51af4c8b8f3d..6d39d42bde5844f50f7c5e2d278ddda8b0ee8e1f 100644 (file)
 struct CCGSubSurf;
 
 /* Each CCGElem is CCGSubSurf's representation of a subdivided
  vertex. All CCGElems in a particular CCGSubSurf have the same
  layout, but the layout can vary from one CCGSubSurf to another. For
  this reason, CCGElem is presented as an opaque pointer, and
  elements should always be accompanied by a CCGKey, which provides
  the necessary offsets to access components of a CCGElem.
* vertex. All CCGElems in a particular CCGSubSurf have the same
* layout, but the layout can vary from one CCGSubSurf to another. For
* this reason, CCGElem is presented as an opaque pointer, and
* elements should always be accompanied by a CCGKey, which provides
* the necessary offsets to access components of a CCGElem.
  */
 typedef struct CCGElem CCGElem;
 
@@ -50,7 +50,7 @@ typedef struct CCGKey {
        int level;
 
        /* number of bytes in each element (one float per layer, plus
-          three floats for normals if enabled) */
+        * three floats for normals if enabled) */
        int elem_size;
 
        /* number of elements along each side of grid */
@@ -61,11 +61,11 @@ typedef struct CCGKey {
        int grid_bytes;
 
        /* currently always the last three floats, unless normals are
-          disabled */
+        * disabled */
        int normal_offset;
 
        /* offset in bytes of mask value; only valid if 'has_mask' is
-          true */
+        * true */
        int mask_offset;
 
        int num_layers;
index b85f0efe7e309a5a784aa734154dbd793002355e..d67e1a9118ea850bcc0873430a80f8adbe22caaf 100644 (file)
@@ -33,6 +33,7 @@
 
 struct CurveMapping;
 struct CurveMap;
+struct CurveMapPoint;
 struct Scopes;
 struct ImBuf;
 struct rctf;
@@ -52,12 +53,14 @@ void                curvemapping_set_black_white(struct CurveMapping *cumap, con
 
 #define CURVEMAP_SLOPE_NEGATIVE 0
 #define CURVEMAP_SLOPE_POSITIVE 1
-void                curvemap_reset(struct CurveMap *cuma, struct rctf *clipr, int preset, int slope);
-void                curvemap_remove(struct CurveMap *cuma, int flag);
-void                curvemap_insert(struct CurveMap *cuma, float x, float y);
-void                curvemap_sethandle(struct CurveMap *cuma, int type);
+void                    curvemap_reset(struct CurveMap *cuma, struct rctf *clipr, int preset, int slope);
+void                    curvemap_remove(struct CurveMap *cuma, int flag);
+void                    curvemap_remove_point(struct CurveMap *cuma, struct CurveMapPoint *cmp);
+struct CurveMapPoint    *curvemap_insert(struct CurveMap *cuma, float x, float y);
+void                    curvemap_sethandle(struct CurveMap *cuma, int type);
 
 void                curvemapping_changed(struct CurveMapping *cumap, int rem_doubles);
+void                curvemapping_changed_all(struct CurveMapping *cumap);
 
 /* single curve, no table check */
 float               curvemap_evaluateF(struct CurveMap *cuma, float value);
index b39ea7cca0224006b13b778c1a43b6f2ed30757c..bbe68db8bfe93cd5153f08cbcc3f0fc87b817e4d 100644 (file)
@@ -261,8 +261,8 @@ void CustomData_bmesh_set(const struct CustomData *data, void *block, int type,
 
 void CustomData_bmesh_set_n(struct CustomData *data, void *block, int type, int n, 
                             void *source);
-/*sets the data of the block at physical layer n.  no real type checking 
  *is performed.
+/* sets the data of the block at physical layer n.  no real type checking
is performed.
  */
 void CustomData_bmesh_set_layer_n(struct CustomData *data, void *block, int n,
                                   void *source);
index 97b724c09e498f2bb72adb9e331bed917ec0a2e3..91e3e9edbf0e9bff943c66e907ca8f037f7f41f1 100644 (file)
@@ -183,6 +183,9 @@ struct Image *BKE_image_copy(struct Image *ima);
 /* merge source into dest, and free source */
 void BKE_image_merge(struct Image *dest, struct Image *source);
 
+/* scale the image */
+void BKE_image_scale(struct Image *image, int width, int height);
+
 /* check if texture has alpha (depth=32) */
 int BKE_image_has_alpha(struct Image *image);
 
index 62ba85ae937e0f067783881aa9f5bc9860d1273f..c168c39fd9f21c2388607201c9b318bca1e4c3b7 100644 (file)
@@ -266,8 +266,8 @@ void create_vert_poly_map(MeshElemMap **map, int **mem,
                           const struct MPoly *mface, const struct MLoop *mloop,
                           int totvert, int totface, int totloop);
        
-void create_vert_edge_map(struct ListBase **map, IndexNode **mem, const struct MEdge *medge,
-                          const int totvert, const int totedge);
+void create_vert_edge_map(MeshElemMap **map, int **mem,
+                                                 const struct MEdge *medge, int totvert, int totedge);
 
 /* vertex level transformations & checks (no derived mesh) */
 
index 68b3e01b9ff9962281b86ea42e29213cdd3422ff..a6018a4582142c1521be7b60e77768a2c1b80219 100644 (file)
@@ -145,9 +145,13 @@ typedef struct bNodeType {
        void (*uifunc)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr);
        /// Additional parameters in the side panel.
        void (*uifuncbut)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr);
+       /// Additional drawing on backdrop.
+       void (*uibackdropfunc)(struct SpaceNode* snode, struct ImBuf* backdrop, struct bNode* node, int x, int y);
+
        /// Draw a node socket. Default draws the input value button.
        NodeSocketButtonFunction drawinputfunc;
        NodeSocketButtonFunction drawoutputfunc;
+
        /// Optional custom label function for the node header.
        const char *(*labelfunc)(struct bNode *);
        /// Optional custom resize handle polling.
@@ -647,6 +651,13 @@ void                       ntreeGPUMaterialNodes(struct bNodeTree *ntree, struct GPUMaterial *mat);
 #define CMP_NODE_TONEMAP       302
 #define CMP_NODE_LENSDIST      303
 
+#define CMP_NODE_COLORCORRECTION 312
+#define CMP_NODE_MASK_BOX       313
+#define CMP_NODE_MASK_ELLIPSE   314
+#define CMP_NODE_BOKEHIMAGE     315
+#define CMP_NODE_BOKEHBLUR      316
+#define CMP_NODE_SWITCH         317
+
 /* channel toggles */
 #define CMP_CHAN_RGB           1
 #define CMP_CHAN_A                     2
@@ -674,7 +685,7 @@ void                        ntreeGPUMaterialNodes(struct bNodeTree *ntree, struct GPUMaterial *mat);
 struct CompBuf;
 struct bNodeTreeExec *ntreeCompositBeginExecTree(struct bNodeTree *ntree, int use_tree_data);
 void ntreeCompositEndExecTree(struct bNodeTreeExec *exec, int use_tree_data);
-void ntreeCompositExecTree(struct bNodeTree *ntree, struct RenderData *rd, int do_previews);
+void ntreeCompositExecTree(struct bNodeTree *ntree, struct RenderData *rd, int rendering, int do_previews);
 void ntreeCompositTagRender(struct Scene *sce);
 int ntreeCompositTagAnimated(struct bNodeTree *ntree);
 void ntreeCompositTagGenerators(struct bNodeTree *ntree);
index b0ee81f577ac8f69ba7b1316a755714e02e33f17..1cdf2ee2e14f082190daa3e06059d8791f3768e1 100644 (file)
@@ -151,6 +151,7 @@ struct KeyBlock *BKE_object_insert_shape_key(struct Scene *scene, struct Object
 
 int BKE_object_is_modified(struct Scene *scene, struct Object *ob);
 int BKE_object_is_deform_modified(struct Scene *scene, struct Object *ob);
+int BKE_object_is_animated(struct Scene *scene, struct Object *ob);
 
 void BKE_object_relink(struct Object *ob);
 
index abbd4bf64bc26bf844f5a5d45272a387bb7ceae4..6f768a147f7fc2cdf759e6ec45f2535e4770f66b 100644 (file)
@@ -3127,7 +3127,7 @@ void CCG_key(CCGKey *key, const CCGSubSurf *ss, int level)
        key->num_layers = ss->meshIFC.numLayers;
        
        /* if normals are present, always the last three floats of an
-          element */
+        * element */
        if (key->has_normals)
                key->normal_offset = key->elem_size - sizeof(float) * 3;
        else
index 9e46d03a3ab694674392372df4f83c7025688030..0f8716e2b04f0401dedfa274a3c6f91a7bc87b38 100644 (file)
@@ -574,7 +574,7 @@ void BKE_pose_channels_hash_make(bPose *pose)
        if (!pose->chanhash) {
                bPoseChannel *pchan;
 
-               pose->chanhash = BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "make_pose_chan gh");
+               pose->chanhash = BLI_ghash_str_new("make_pose_chan gh");
                for (pchan = pose->chanbase.first; pchan; pchan = pchan->next)
                        BLI_ghash_insert(pose->chanhash, pchan->name, pchan);
        }
index afbabd8d3e528b4d829c8a2e391113edb58e8f9e..3450408a0a0617ff39213219482163acc9a05f20 100644 (file)
@@ -522,7 +522,7 @@ static void cdDM_drawFacesSolid(DerivedMesh *dm,
                glNormal3sv(no);                                                \
        }                                                                                       \
        glVertex3fv(mvert[index].co);                           \
-}
+} (void)0
 
        if (cddm->pbvh && cddm->pbvh_draw) {
                if (dm->numTessFaceData) {
index b521285c626cfeb12eeedb6cc81bb5dd2e7b3be2..b38f0f78cdb6ecd56867a0e05eadf4706aa73a39 100644 (file)
@@ -92,7 +92,7 @@ static CM_SOLVER_DEF  solvers [] =
 
 /* ********** cloth engine ******* */
 /* Prototypes for internal functions.
-*/
+ */
 static void cloth_to_object (Object *ob,  ClothModifierData *clmd, float (*vertexCos)[3]);
 static void cloth_from_mesh ( ClothModifierData *clmd, DerivedMesh *dm );
 static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float framenr, int first);
@@ -101,10 +101,10 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm );
 
 
 /******************************************************************************
-*
-* External interface called by modifier.c clothModifier functions.
-*
-******************************************************************************/
+ *
+ * External interface called by modifier.c clothModifier functions.
+ *
+ ******************************************************************************/
 /**
  * cloth_init -  creates a new cloth simulation.
  *
@@ -145,8 +145,8 @@ void cloth_init(ClothModifierData *clmd )
        clmd->coll_parms->selfepsilon = 0.75;
 
        /* These defaults are copied from softbody.c's
-       * softbody_calc_forces() function.
-       */
+        * softbody_calc_forces() function.
+        */
        clmd->sim_parms->eff_force_scale = 1000.0;
        clmd->sim_parms->eff_wind_scale = 250.0;
 
@@ -419,9 +419,64 @@ static int do_step_cloth(Object *ob, ClothModifierData *clmd, DerivedMesh *resul
        return ret;
 }
 
+#if 0
+static DerivedMesh *cloth_to_triangles(DerivedMesh *dm)
+{
+       DerivedMesh *result = NULL;
+       unsigned int i = 0, j = 0;
+       unsigned int quads = 0, numfaces = dm->getNumTessFaces(dm);
+       MFace *mface = dm->getTessFaceArray(dm);
+       MFace *mface2 = NULL;
+
+       /* calc faces */
+       for(i = 0; i < numfaces; i++)
+       {
+               if(mface[i].v4)
+                       quads++;
+       }
+               
+       result = CDDM_from_template(dm, dm->getNumVerts(dm), 0, numfaces + quads, 0, 0);
+
+       DM_copy_vert_data(dm, result, 0, 0, dm->getNumVerts(dm));
+       DM_copy_tessface_data(dm, result, 0, 0, numfaces);
+
+       DM_ensure_tessface(result);
+       mface2 = result->getTessFaceArray(result);
+
+       for(i = 0, j = numfaces; i < numfaces; i++)
+       {
+               // DG TODO: is this necessary?
+               mface2[i].v1 = mface[i].v1;
+               mface2[i].v2 = mface[i].v2;
+               mface2[i].v3 = mface[i].v3;
+
+               mface2[i].v4 = 0;
+               //test_index_face(&mface2[i], &result->faceData, i, 3);
+
+               if(mface[i].v4)
+               {
+                       DM_copy_tessface_data(dm, result, i, j, 1);
+
+                       mface2[j].v1 = mface[i].v1;
+                       mface2[j].v2 = mface[i].v3;
+                       mface2[j].v3 = mface[i].v4;
+                       mface2[j].v4 = 0;
+                       //test_index_face(&mface2[j], &result->faceData, j, 3);
+
+                       j++;
+               }
+       }
+
+       CDDM_calc_edges_tessface(result);
+       CDDM_tessfaces_to_faces(result); /* builds ngon faces from tess (mface) faces */
+
+       return result;
+}
+#endif
+
 /************************************************
  * clothModifier_do - main simulation function
-************************************************/
+ ************************************************/
 void clothModifier_do(ClothModifierData *clmd, Scene *scene, Object *ob, DerivedMesh *dm, float (*vertexCos)[3])
 {
        PointCache *cache;
@@ -674,10 +729,10 @@ void cloth_free_modifier_extern(ClothModifierData *clmd )
 }
 
 /******************************************************************************
-*
-* Internal functions.
-*
-******************************************************************************/
+ *
+ * Internal functions.
+ *
+ ******************************************************************************/
 
 /**
  * cloth_to_object - copies the deformed vertices to the object.
@@ -923,16 +978,16 @@ static void cloth_from_mesh ( ClothModifierData *clmd, DerivedMesh *dm )
                memcpy ( &clmd->clothObject->mfaces[i], &mface[i], sizeof ( MFace ) );
 
        /* Free the springs since they can't be correct if the vertices
-       * changed.
-       */
+        * changed.
+        */
        if ( clmd->clothObject->springs != NULL )
                MEM_freeN ( clmd->clothObject->springs );
 
 }
 
 /***************************************************************************************
-* SPRING NETWORK BUILDING IMPLEMENTATION BEGIN
-***************************************************************************************/
+ * SPRING NETWORK BUILDING IMPLEMENTATION BEGIN
+ ***************************************************************************************/
 
 // be careful: implicit solver has to be resettet when using this one!
 // --> only for implicit handling of this spring!
@@ -1221,6 +1276,6 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
 
 } /* cloth_build_springs */
 /***************************************************************************************
-* SPRING NETWORK BUILDING IMPLEMENTATION END
-***************************************************************************************/
+ * SPRING NETWORK BUILDING IMPLEMENTATION END
+ ***************************************************************************************/
 
index 609b2d3496c4315ab9606366df21134fa853aea1..a93653537c7968a4924527cb3ca35d12aa140a69 100644 (file)
@@ -161,284 +161,7 @@ void bvhtree_update_from_mvert(BVHTree * bvhtree, MFace *faces, int numfaces, MV
 /***********************************
 Collision modifier code end
 ***********************************/
-
-/**
-* gsl_poly_solve_cubic -
-*
-* copied from SOLVE_CUBIC.C --> GSL
-*/
-
 #define mySWAP(a, b) do { double tmp = b ; b = a ; a = tmp ; } while (0)
-#if 0 /* UNUSED */
-static int 
-gsl_poly_solve_cubic (double a, double b, double c, 
-                                         double *x0, double *x1, double *x2)
-{
-       double q = (a * a - 3 * b);
-       double r = (2 * a * a * a - 9 * a * b + 27 * c);
-
-       double Q = q / 9;
-       double R = r / 54;
-
-       double Q3 = Q * Q * Q;
-       double R2 = R * R;
-
-       double CR2 = 729 * r * r;
-       double CQ3 = 2916 * q * q * q;
-
-       if (R == 0 && Q == 0)
-       {
-               *x0 = - a / 3;
-               *x1 = - a / 3;
-               *x2 = - a / 3;
-               return 3;
-       }
-       else if (CR2 == CQ3) 
-       {
-               /* this test is actually R2 == Q3, written in a form suitable
-               for exact computation with integers */
-
-               /* Due to finite precision some double roots may be missed, and
-               considered to be a pair of complex roots z = x +/- epsilon i
-               close to the real axis. */
-
-               double sqrtQ = sqrt (Q);
-
-               if (R > 0)
-               {
-                       *x0 = -2 * sqrtQ  - a / 3;
-                       *x1 = sqrtQ - a / 3;
-                       *x2 = sqrtQ - a / 3;
-               }
-               else
-               {
-                       *x0 = - sqrtQ  - a / 3;
-                       *x1 = - sqrtQ - a / 3;
-                       *x2 = 2 * sqrtQ - a / 3;
-               }
-               return 3;
-       }
-       else if (CR2 < CQ3) /* equivalent to R2 < Q3 */
-       {
-               double sqrtQ = sqrt (Q);
-               double sqrtQ3 = sqrtQ * sqrtQ * sqrtQ;
-               double theta = acos (R / sqrtQ3);
-               double norm = -2 * sqrtQ;
-               *x0 = norm * cos (theta / 3) - a / 3;
-               *x1 = norm * cos ((theta + 2.0 * M_PI) / 3) - a / 3;
-               *x2 = norm * cos ((theta - 2.0 * M_PI) / 3) - a / 3;
-
-               /* Sort *x0, *x1, *x2 into increasing order */
-
-               if (*x0 > *x1)
-                       mySWAP(*x0, *x1);
-
-               if (*x1 > *x2)
-               {
-                       mySWAP(*x1, *x2);
-
-                       if (*x0 > *x1)
-                               mySWAP(*x0, *x1);
-               }
-
-               return 3;
-       }
-       else
-       {
-               double sgnR = (R >= 0 ? 1 : -1);
-               double A = -sgnR * pow (fabs (R) + sqrt (R2 - Q3), 1.0/3.0);
-               double B = Q / A;
-               *x0 = A + B - a / 3;
-               return 1;
-       }
-}
-
-
-
-/**
-* gsl_poly_solve_quadratic
-*
-* copied from GSL
-*/
-static int 
-gsl_poly_solve_quadratic (double a, double b, double c, 
-                                                 double *x0, double *x1)
-{
-       double disc = b * b - 4 * a * c;
-
-       if (a == 0) /* Handle linear case */
-       {
-               if (b == 0)
-               {
-                       return 0;
-               }
-               else
-               {
-                       *x0 = -c / b;
-                       return 1;
-               };
-       }
-
-       if (disc > 0)
-       {
-               if (b == 0)
-               {
-                       double r = fabs (0.5 * sqrt (disc) / a);
-                       *x0 = -r;
-                       *x1 =  r;
-               }
-               else
-               {
-                       double sgnb = (b > 0 ? 1 : -1);
-                       double temp = -0.5 * (b + sgnb * sqrt (disc));
-                       double r1 = temp / a;
-                       double r2 = c / temp;
-
-                       if (r1 < r2) 
-                       {
-                               *x0 = r1;
-                               *x1 = r2;
-                       } 
-                       else 
-                       {
-                               *x0 = r2;
-                               *x1 = r1;
-                       }
-               }
-               return 2;
-       }
-       else if (disc == 0) 
-       {
-               *x0 = -0.5 * b / a;
-               *x1 = -0.5 * b / a;
-               return 2;
-       }
-       else
-       {
-               return 0;
-       }
-}
-#endif /* UNUSED */
-
-
-
-/*
-* See Bridson et al. "Robust Treatment of Collision, Contact and Friction for Cloth Animation"
-*     page 4, left column
-*/
-#if 0
-static int cloth_get_collision_time ( double a[3], double b[3], double c[3], double d[3], double e[3], double f[3], double solution[3] )
-{
-       int num_sols = 0;
-
-       // x^0 - checked 
-       double g =      a[0] * c[1] * e[2] - a[0] * c[2] * e[1] +
-               a[1] * c[2] * e[0] - a[1] * c[0] * e[2] + 
-               a[2] * c[0] * e[1] - a[2] * c[1] * e[0];
-
-       // x^1
-       double h = -b[2] * c[1] * e[0] + b[1] * c[2] * e[0] - a[2] * d[1] * e[0] +
-               a[1] * d[2] * e[0] + b[2] * c[0] * e[1] - b[0] * c[2] * e[1] +
-               a[2] * d[0] * e[1] - a[0] * d[2] * e[1] - b[1] * c[0] * e[2] +
-               b[0] * c[1] * e[2] - a[1] * d[0] * e[2] + a[0] * d[1] * e[2] -
-               a[2] * c[1] * f[0] + a[1] * c[2] * f[0] + a[2] * c[0] * f[1] -
-               a[0] * c[2] * f[1] - a[1] * c[0] * f[2] + a[0] * c[1] * f[2];
-
-       // x^2
-       double i = -b[2] * d[1] * e[0] + b[1] * d[2] * e[0] +
-               b[2] * d[0] * e[1] - b[0] * d[2] * e[1] -
-               b[1] * d[0] * e[2] + b[0] * d[1] * e[2] -
-               b[2] * c[1] * f[0] + b[1] * c[2] * f[0] -
-               a[2] * d[1] * f[0] + a[1] * d[2] * f[0] +
-               b[2] * c[0] * f[1] - b[0] * c[2] * f[1] + 
-               a[2] * d[0] * f[1] - a[0] * d[2] * f[1] -
-               b[1] * c[0] * f[2] + b[0] * c[1] * f[2] -
-               a[1] * d[0] * f[2] + a[0] * d[1] * f[2];
-
-       // x^3 - checked
-       double j = -b[2] * d[1] * f[0] + b[1] * d[2] * f[0] +
-               b[2] * d[0] * f[1] - b[0] * d[2] * f[1] -
-               b[1] * d[0] * f[2] + b[0] * d[1] * f[2];
-
-       /*
-       printf("r1: %lf\n", a[0] * c[1] * e[2] - a[0] * c[2] * e[1]);
-       printf("r2: %lf\n", a[1] * c[2] * e[0] - a[1] * c[0] * e[2]);
-       printf("r3: %lf\n", a[2] * c[0] * e[1] - a[2] * c[1] * e[0]);
-
-       printf("x1 x: %f, y: %f, z: %f\n", a[0], a[1], a[2]);
-       printf("x2 x: %f, y: %f, z: %f\n", c[0], c[1], c[2]);
-       printf("x3 x: %f, y: %f, z: %f\n", e[0], e[1], e[2]);
-
-       printf("v1 x: %f, y: %f, z: %f\n", b[0], b[1], b[2]);
-       printf("v2 x: %f, y: %f, z: %f\n", d[0], d[1], d[2]);
-       printf("v3 x: %f, y: %f, z: %f\n", f[0], f[1], f[2]);
-
-       printf("t^3: %lf, t^2: %lf, t^1: %lf, t^0: %lf\n", j, i, h, g);
-       
-*/
-       // Solve cubic equation to determine times t1, t2, t3, when the collision will occur.
-       if ( ABS ( j ) > DBL_EPSILON )
-       {
-               i /= j;
-               h /= j;
-               g /= j;
-               num_sols = gsl_poly_solve_cubic ( i, h, g, &solution[0], &solution[1], &solution[2] );
-       }
-       else
-       {
-               num_sols = gsl_poly_solve_quadratic ( i, h, g, &solution[0], &solution[1] );
-               solution[2] = -1.0;
-       }
-
-       // printf("num_sols: %d, sol1: %lf, sol2: %lf, sol3: %lf\n", num_sols, solution[0],  solution[1],  solution[2]);
-
-       // Discard negative solutions
-       if ( ( num_sols >= 1 ) && ( solution[0] < DBL_EPSILON ) )
-       {
-               --num_sols;
-               solution[0] = solution[num_sols];
-       }
-       if ( ( num_sols >= 2 ) && ( solution[1] < DBL_EPSILON ) )
-       {
-               --num_sols;
-               solution[1] = solution[num_sols];
-       }
-       if ( ( num_sols == 3 ) && ( solution[2] < DBL_EPSILON ) )
-       {
-               --num_sols;
-       }
-
-       // Sort
-       if ( num_sols == 2 )
-       {
-               if ( solution[0] > solution[1] )
-               {
-                       double tmp = solution[0];
-                       solution[0] = solution[1];
-                       solution[1] = tmp;
-               }
-       }
-       else if ( num_sols == 3 )
-       {
-
-               // Bubblesort
-               if ( solution[0] > solution[1] )
-               {
-                       double tmp = solution[0]; solution[0] = solution[1]; solution[1] = tmp;
-               }
-               if ( solution[1] > solution[2] )
-               {
-                       double tmp = solution[1]; solution[1] = solution[2]; solution[2] = tmp;
-               }
-               if ( solution[0] > solution[1] )
-               {
-                       double tmp = solution[0]; solution[0] = solution[1]; solution[1] = tmp;
-               }
-       }
-
-       return num_sols;
-}
-#endif
 
 
 // w3 is not perfect
@@ -485,7 +208,6 @@ DO_INLINE void collision_interpolateOnTriangle ( float to[3], float v1[3], float
        VECADDMUL(to, v3, w3);
 }
 
-#ifndef WITH_ELTOPO
 static int cloth_collision_response_static ( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair, CollPair *collision_end )
 {
        int result = 0;
@@ -498,6 +220,12 @@ static int cloth_collision_response_static ( ClothModifierData *clmd, CollisionM
        cloth1 = clmd->clothObject;
 
        for ( ; collpair != collision_end; collpair++ ) {
+               float i1[3], i2[3], i3[3];
+
+               zero_v3(i1);
+               zero_v3(i2);
+               zero_v3(i3);
+
                // only handle static collisions here
                if ( collpair->flag & COLLISION_IN_FUTURE )
                        continue;
@@ -536,1555 +264,239 @@ static int cloth_collision_response_static ( ClothModifierData *clmd, CollisionM
                        // Calculate Impulse magnitude to stop all motion in normal direction.
                        float magtangent = 0, repulse = 0, d = 0;
                        double impulse = 0.0;
-                       float vrel_t_pre[3];
-                       float temp[3], spf;
-
-                       // calculate tangential velocity
-                       copy_v3_v3 ( temp, collpair->normal );
-                       mul_v3_fl(temp, magrelVel);
-                       sub_v3_v3v3(vrel_t_pre, relativeVelocity, temp);
-
-                       // Decrease in magnitude of relative tangential velocity due to coulomb friction
-                       // in original formula "magrelVel" should be the "change of relative velocity in normal direction"
-                       magtangent = MIN2(clmd->coll_parms->friction * 0.01f * magrelVel, sqrtf(dot_v3v3(vrel_t_pre, vrel_t_pre)));
-
-                       // Apply friction impulse.
-                       if ( magtangent > ALMOST_ZERO ) {
-                               normalize_v3(vrel_t_pre);
-
-                               impulse = magtangent / ( 1.0f + w1*w1 + w2*w2 + w3*w3 ); // 2.0 *
-                               VECADDMUL ( cloth1->verts[collpair->ap1].impulse, vrel_t_pre, w1 * impulse );
-                               VECADDMUL ( cloth1->verts[collpair->ap2].impulse, vrel_t_pre, w2 * impulse );
-                               VECADDMUL ( cloth1->verts[collpair->ap3].impulse, vrel_t_pre, w3 * impulse );
-                       }
-
-                       // Apply velocity stopping impulse
-                       // I_c = m * v_N / 2.0
-                       // no 2.0 * magrelVel normally, but looks nicer DG
-                       impulse =  magrelVel / ( 1.0 + w1*w1 + w2*w2 + w3*w3 );
-
-                       VECADDMUL ( cloth1->verts[collpair->ap1].impulse, collpair->normal, w1 * impulse );
-                       cloth1->verts[collpair->ap1].impulse_count++;
-
-                       VECADDMUL ( cloth1->verts[collpair->ap2].impulse, collpair->normal, w2 * impulse );
-                       cloth1->verts[collpair->ap2].impulse_count++;
-
-                       VECADDMUL ( cloth1->verts[collpair->ap3].impulse, collpair->normal, w3 * impulse );
-                       cloth1->verts[collpair->ap3].impulse_count++;
-
-                       // Apply repulse impulse if distance too short
-                       // I_r = -min(dt*kd, m(0, 1d/dt - v_n))
-                       spf = (float)clmd->sim_parms->stepsPerFrame / clmd->sim_parms->timescale;
-
-                       d = clmd->coll_parms->epsilon*8.0f/9.0f + epsilon2*8.0f/9.0f - collpair->distance;
-                       if ( ( magrelVel < 0.1f*d*spf ) && ( d > ALMOST_ZERO ) ) {
-                               repulse = MIN2 ( d*1.0f/spf, 0.1f*d*spf - magrelVel );
-
-                               // stay on the safe side and clamp repulse
-                               if ( impulse > ALMOST_ZERO )
-                                       repulse = MIN2 ( repulse, 5.0*impulse );
-                               repulse = MAX2 ( impulse, repulse );
-
-                               impulse = repulse / ( 1.0f + w1*w1 + w2*w2 + w3*w3 ); // original 2.0 / 0.25
-                               VECADDMUL ( cloth1->verts[collpair->ap1].impulse, collpair->normal,  impulse );
-                               VECADDMUL ( cloth1->verts[collpair->ap2].impulse, collpair->normal,  impulse );
-                               VECADDMUL ( cloth1->verts[collpair->ap3].impulse, collpair->normal,  impulse );
-                       }
-
-                       result = 1;
-               }
-       }
-       return result;
-}
-#endif /* !WITH_ELTOPO */
-
-#ifdef WITH_ELTOPO
-typedef struct edgepairkey {
-       int a1, a2, b1, b2;
-} edgepairkey;
-
-unsigned int edgepair_hash(void *vkey)
-{
-       edgepairkey *key = vkey;
-       int keys[4] = {key->a1, key->a2, key->b1, key->b2};
-       int i, j;
-       
-       for (i=0; i<4; i++) {
-               for (j=0; j<3; j++) {
-                       if (keys[j] >= keys[j+1]) {
-                               SWAP(int, keys[j], keys[j+1]);
-                       }
-               }
-       }
-       
-       return keys[0]*101 + keys[1]*72 + keys[2]*53 + keys[3]*34;
-}
-
-int edgepair_cmp(const void *va, const void *vb)
-{
-       edgepairkey *a = va, *b = vb;
-       int keysa[4] = {a->a1, a->a2, a->b1, a->b2};
-       int keysb[4] = {b->a1, b->a2, b->b1, b->b2};
-       int i;
-       
-       for (i=0; i<4; i++) {
-               int j, ok=0;
-               for (j=0; j<4; j++) {
-                       if (keysa[i] == keysa[j]) {
-                               ok = 1;
-                               break;
-                       }
-               }
-               if (!ok)
-                       return -1;
-       }
-       
-       return 0;
-}
-
-static void get_edgepairkey(edgepairkey *key, int a1, int a2, int b1, int b2)
-{
-       key->a1 = a1;
-       key->a2 = a2;
-       key->b1 = b1;
-       key->b2 = b2;
-}
-
-/*an immense amount of duplication goes on here. . .a major performance hit, I'm sure*/
-static CollPair* cloth_edge_collision ( ModifierData *md1, ModifierData *md2, 
-                                                                               BVHTreeOverlap *overlap, CollPair *collpair,
-                                                                               GHash *visithash, MemArena *arena)
-{
-       ClothModifierData *clmd = (ClothModifierData *)md1;
-       CollisionModifierData *collmd = (CollisionModifierData *) md2;
-       MFace *face1=NULL, *face2 = NULL;
-       ClothVertex *verts1 = clmd->clothObject->verts;
-       double distance = 0;
-       edgepairkey *key, tstkey;
-       float epsilon1 = clmd->coll_parms->epsilon;
-       float epsilon2 = BLI_bvhtree_getepsilon ( collmd->bvhtree );
-       float no[3], uv[3], t, relnor;
-       int i, i1, i2, i3, i4, i5, i6;
-       Cloth *cloth = clmd->clothObject;
-       float n1[3], n2[3], off[3], v1[2][3], v2[2][3], v3[2][3], v4[2][3], v5[2][3], v6[2][3];
-       void **verts[] = {v1, v2, v3, v4, v5, v6};
-       int j, ret, bp1, bp2, bp3, ap1, ap2, ap3, table[6];
-       
-       face1 = & ( clmd->clothObject->mfaces[overlap->indexA] );
-       face2 = & ( collmd->mfaces[overlap->indexB] );
-
-       // check all 4 possible collisions
-       for ( i = 0; i < 4; i++ ) {
-               if ( i == 0 ) {
-                       // fill faceA
-                       ap1 = face1->v1;
-                       ap2 = face1->v2;
-                       ap3 = face1->v3;
-
-                       // fill faceB
-                       bp1 = face2->v1;
-                       bp2 = face2->v2;
-                       bp3 = face2->v3;
-               }
-               else if ( i == 1 ) {
-                       if ( face1->v4 ) {
-                               // fill faceA
-                               ap1 = face1->v1;
-                               ap2 = face1->v3;
-                               ap3 = face1->v4;
-
-                               // fill faceB
-                               bp1 = face2->v1;
-                               bp2 = face2->v2;
-                               bp3 = face2->v3;
-                       }
-                       else {
-                               continue;
-                       }
-               }
-               if ( i == 2 ) {
-                       if ( face2->v4 ) {
-                               // fill faceA
-                               ap1 = face1->v1;
-                               ap2 = face1->v2;
-                               ap3 = face1->v3;
-
-                               // fill faceB
-                               bp1 = face2->v1;
-                               bp2 = face2->v3;
-                               bp3 = face2->v4;
-                       }
-                       else {
-                               continue;
-                       }
-               }
-               else if ( i == 3 ) {
-                       if ( face1->v4 && face2->v4 ) {
-                               // fill faceA
-                               ap1 = face1->v1;
-                               ap2 = face1->v3;
-                               ap3 = face1->v4;
-
-                               // fill faceB
-                               bp1 = face2->v1;
-                               bp2 = face2->v3;
-                               bp3 = face2->v4;
-                       }
-                       else {
-                               continue;
-                       }
-               }
-               
-               copy_v3_v3(v1[0], cloth->verts[ap1].txold); 
-               copy_v3_v3(v1[1], cloth->verts[ap1].tx);
-               copy_v3_v3(v2[0], cloth->verts[ap2].txold);
-               copy_v3_v3(v2[1], cloth->verts[ap2].tx);
-               copy_v3_v3(v3[0], cloth->verts[ap3].txold);
-               copy_v3_v3(v3[1], cloth->verts[ap3].tx);
-               
-               copy_v3_v3(v4[0], collmd->current_x[bp1].co);
-               copy_v3_v3(v4[1], collmd->current_xnew[bp1].co);
-               copy_v3_v3(v5[0], collmd->current_x[bp2].co);
-               copy_v3_v3(v5[1], collmd->current_xnew[bp2].co);
-               copy_v3_v3(v6[0], collmd->current_x[bp3].co);
-               copy_v3_v3(v6[1], collmd->current_xnew[bp3].co);
-               
-               normal_tri_v3(n2, v4[1], v5[1], v6[1]);
-
-               /*offset new positions a bit, to account for margins*/
-               i1 = ap1; i2 = ap2; i3 = ap3;
-               i4 = bp1; i5 = bp2; i6 = bp3;
-
-               for (j=0; j<3; j++) {
-                       int collp1, collp2, k, j2 = (j+1)%3;
-                       
-                       table[0] = ap1; table[1] = ap2; table[2] = ap3;
-                       table[3] = bp1; table[4] = bp2; table[5] = bp3;
-                       for (k=0; k<3; k++) {
-                               float p1[3], p2[3];
-                               int k2 = (k+1)%3;
-                               
-                               get_edgepairkey(&tstkey, table[j], table[j2], table[k+3], table[k2+3]);
-                               //if (BLI_ghash_haskey(visithash, &tstkey))
-                               //      continue;
-                               
-                               key = BLI_memarena_alloc(arena, sizeof(edgepairkey));
-                               *key = tstkey;
-                               BLI_ghash_insert(visithash, key, NULL);
-
-                               sub_v3_v3v3(p1, verts[j], verts[j2]);
-                               sub_v3_v3v3(p2, verts[k+3], verts[k2+3]);
-                               
-                               cross_v3_v3v3(off, p1, p2);
-                               normalize_v3(off);
-
-                               if (dot_v3v3(n2, off) < 0.0)
-                                       negate_v3(off);
-                               
-                               mul_v3_fl(off,  epsilon1 + epsilon2 + ALMOST_ZERO);
-                               copy_v3_v3(p1, verts[k+3]);
-                               copy_v3_v3(p2, verts[k2+3]);
-                               add_v3_v3(p1, off);
-                               add_v3_v3(p2, off);
-                               
-                               ret = eltopo_line_line_moving_isect_v3v3_f(verts[j], table[j], verts[j2], table[j2], 
-                                                                                                                  p1, table[k+3], p2, table[k2+3], 
-                                                                                                                  no, uv, &t, &relnor);
-                               /*cloth vert versus coll face*/
-                               if (ret) {
-                                       collpair->ap1 = table[j]; collpair->ap2 = table[j2]; 
-                                       collpair->bp1 = table[k+3]; collpair->bp2 = table[k2+3];
-                                       
-                                       /*I'm not sure if this is correct, but hopefully it's 
-                                         better then simply ignoring back edges*/
-                                       if (dot_v3v3(n2, no) < 0.0) {
-                                               negate_v3(no);
-                                       }
-                                       
-                                       copy_v3_v3(collpair->normal, no);
-                                       mul_v3_v3fl(collpair->vector, collpair->normal, relnor);
-                                       collpair->distance = relnor;
-                                       collpair->time = t;
-                                       
-                                       copy_v2_v2(collpair->bary, uv);
-                                       
-                                       collpair->flag = COLLISION_IS_EDGES;
-                                       collpair++;
-                               }
-                       }
-               }
-       }
-       
-       return collpair;
-}
-
-static int cloth_edge_collision_response_moving ( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair, CollPair *collision_end )
-{
-       int result = 0;
-       Cloth *cloth1;
-       float w1, w2;
-       float v1[3], v2[3], relativeVelocity[3];
-       float magrelVel, pimpulse[3];
-
-       cloth1 = clmd->clothObject;
-
-       for ( ; collpair != collision_end; collpair++ ) {
-               if (!(collpair->flag & COLLISION_IS_EDGES))
-                       continue;
-               
-               // was: txold
-               w1 = collpair->bary[0]; w2 = collpair->bary[1];                 
-               
-               // Calculate relative "velocity".
-               VECADDFAC(v1, cloth1->verts[collpair->ap1].tv, cloth1->verts[collpair->ap2].tv, w1);
-               VECADDFAC(v2, collmd->current_v[collpair->bp1].co, collmd->current_v[collpair->bp2].co, w2);
-               
-               sub_v3_v3v3(relativeVelocity, v2, v1);
-               
-               // Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal').
-               magrelVel = dot_v3v3 ( relativeVelocity, collpair->normal );
-
-               // If v_n_mag < 0 the edges are approaching each other.
-               if ( magrelVel > ALMOST_ZERO ) {
-                       // Calculate Impulse magnitude to stop all motion in normal direction.
-                       float magtangent = 0, repulse = 0, d = 0;
-                       double impulse = 0.0;
-                       float vrel_t_pre[3];
-                       float temp[3], spf;
-                       
-                       zero_v3(pimpulse);
-                       
-                       // calculate tangential velocity
-                       copy_v3_v3 ( temp, collpair->normal );
-                       mul_v3_fl(temp, magrelVel);
-                       sub_v3_v3v3(vrel_t_pre, relativeVelocity, temp);
-
-                       // Decrease in magnitude of relative tangential velocity due to coulomb friction
-                       // in original formula "magrelVel" should be the "change of relative velocity in normal direction"
-                       magtangent = MIN2 ( clmd->coll_parms->friction * 0.01 * magrelVel, sqrt ( dot_v3v3 ( vrel_t_pre, vrel_t_pre ) ) );
-
-                       // Apply friction impulse.
-                       if ( magtangent > ALMOST_ZERO ) {
-                               normalize_v3(vrel_t_pre);
-
-                               impulse = magtangent; 
-                               VECADDMUL ( pimpulse, vrel_t_pre, impulse);
-                       }
-
-                       // Apply velocity stopping impulse
-                       // I_c = m * v_N / 2.0
-                       // no 2.0 * magrelVel normally, but looks nicer DG
-                       impulse =  magrelVel;
-                       
-                       mul_v3_fl(collpair->normal, 0.5);
-                       VECADDMUL ( pimpulse, collpair->normal, impulse);
-
-                       // Apply repulse impulse if distance too short
-                       // I_r = -min(dt*kd, m(0, 1d/dt - v_n))
-                       spf = (float)clmd->sim_parms->stepsPerFrame / clmd->sim_parms->timescale;
-
-                       d = collpair->distance;
-                       if ( ( magrelVel < 0.1*d*spf && ( d > ALMOST_ZERO ) ) ) {
-                               repulse = MIN2 ( d*1.0/spf, 0.1*d*spf - magrelVel );
-
-                               // stay on the safe side and clamp repulse
-                               if ( impulse > ALMOST_ZERO )
-                                       repulse = MIN2 ( repulse, 5.0*impulse );
-                               repulse = MAX2 ( impulse, repulse );
-
-                               impulse = repulse / ( 5.0 ); // original 2.0 / 0.25
-                               VECADDMUL ( pimpulse, collpair->normal, impulse);
-                       }
-                       
-                       w2 = 1.0f-w1;
-                       if (w1 < 0.5)
-                               w1 *= 2.0;
-                       else
-                               w2 *= 2.0;
-                       
-                       VECADDFAC(cloth1->verts[collpair->ap1].impulse, cloth1->verts[collpair->ap1].impulse, pimpulse, w1*2.0);
-                       VECADDFAC(cloth1->verts[collpair->ap2].impulse, cloth1->verts[collpair->ap2].impulse, pimpulse, w2*2.0);
-                       
-                       cloth1->verts[collpair->ap1].impulse_count++;
-                       cloth1->verts[collpair->ap2].impulse_count++;
-                       
-                       result = 1;
-               }
-       } 
-       
-       return result;
-}
-
-static int cloth_collision_response_moving ( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair, CollPair *collision_end )
-{
-       int result = 0;
-       Cloth *cloth1;
-       float w1, w2, w3, u1, u2, u3;
-       float v1[3], v2[3], relativeVelocity[3];
-       float magrelVel;
-       float epsilon2 = BLI_bvhtree_getepsilon ( collmd->bvhtree );
-       
-       cloth1 = clmd->clothObject;
-
-       for ( ; collpair != collision_end; collpair++ ) {
-               if (collpair->flag & COLLISION_IS_EDGES)
-                       continue;
-               
-               if ( collpair->flag & COLLISION_USE_COLLFACE ) {
-                       // was: txold
-                       w1 = collpair->bary[0]; w2 = collpair->bary[1]; w3 = collpair->bary[2];                 
-
-                       // Calculate relative "velocity".
-                       collision_interpolateOnTriangle ( v1, collmd->current_v[collpair->bp1].co, collmd->current_v[collpair->bp2].co, collmd->current_v[collpair->bp3].co, w1, w2, w3);
-                       
-                       sub_v3_v3v3(relativeVelocity, v1, cloth1->verts[collpair->collp].tv);
-                       
-                       // Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal').
-                       magrelVel = dot_v3v3 ( relativeVelocity, collpair->normal );
-       
-                       // If v_n_mag < 0 the edges are approaching each other.
-                       if ( magrelVel > ALMOST_ZERO ) {
-                               // Calculate Impulse magnitude to stop all motion in normal direction.
-                               float magtangent = 0, repulse = 0, d = 0;
-                               double impulse = 0.0;
-                               float vrel_t_pre[3];
-                               float temp[3], spf;
-       
-                               // calculate tangential velocity
-                               copy_v3_v3 ( temp, collpair->normal );
-                               mul_v3_fl(temp, magrelVel);
-                               sub_v3_v3v3(vrel_t_pre, relativeVelocity, temp);
-       
-                               // Decrease in magnitude of relative tangential velocity due to coulomb friction
-                               // in original formula "magrelVel" should be the "change of relative velocity in normal direction"
-                               magtangent = MIN2 ( clmd->coll_parms->friction * 0.01 * magrelVel, sqrt ( dot_v3v3 ( vrel_t_pre, vrel_t_pre ) ) );
-       
-                               // Apply friction impulse.
-                               if ( magtangent > ALMOST_ZERO ) {
-                                       normalize_v3(vrel_t_pre);
-       
-                                       impulse = magtangent; // 2.0 * 
-                                       VECADDMUL ( cloth1->verts[collpair->collp].impulse, vrel_t_pre, impulse);
-                               }
-       
-                               // Apply velocity stopping impulse
-                               // I_c = m * v_N / 2.0
-                               // no 2.0 * magrelVel normally, but looks nicer DG
-                               impulse =  magrelVel/2.0;
-       
-                               VECADDMUL ( cloth1->verts[collpair->collp].impulse, collpair->normal, impulse);
-                               cloth1->verts[collpair->collp].impulse_count++;
-       
-                               // Apply repulse impulse if distance too short
-                               // I_r = -min(dt*kd, m(0, 1d/dt - v_n))
-                               spf = (float)clmd->sim_parms->stepsPerFrame / clmd->sim_parms->timescale;
-       
-                               d = -collpair->distance;
-                               if ( ( magrelVel < 0.1*d*spf ) && ( d > ALMOST_ZERO ) ) {
-                                       repulse = MIN2 ( d*1.0/spf, 0.1*d*spf - magrelVel );
-       
-                                       // stay on the safe side and clamp repulse
-                                       if ( impulse > ALMOST_ZERO )
-                                               repulse = MIN2 ( repulse, 5.0*impulse );
-                                       repulse = MAX2 ( impulse, repulse );
-       
-                                       impulse = repulse / ( 5.0 ); // original 2.0 / 0.25
-                                       VECADDMUL ( cloth1->verts[collpair->collp].impulse, collpair->normal, impulse);
-                               }
-       
-                               result = 1;
-                       }
-               }
-               else {
-                       w1 = collpair->bary[0]; w2 = collpair->bary[1]; w3 = collpair->bary[2];                 
-
-                       // Calculate relative "velocity".
-                       collision_interpolateOnTriangle ( v1, cloth1->verts[collpair->ap1].tv, cloth1->verts[collpair->ap2].tv, cloth1->verts[collpair->ap3].tv, w1, w2, w3 );
-       
-                       sub_v3_v3v3(relativeVelocity, collmd->current_v[collpair->collp].co, v1);
-                       
-                       // Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal').
-                       magrelVel = dot_v3v3 ( relativeVelocity, collpair->normal );
-       
-                       // If v_n_mag < 0 the edges are approaching each other.
-                       if ( magrelVel > ALMOST_ZERO ) {
-                               // Calculate Impulse magnitude to stop all motion in normal direction.
-                               float magtangent = 0, repulse = 0, d = 0;
-                               double impulse = 0.0;
-                               float vrel_t_pre[3], pimpulse[3] = {0.0f, 0.0f, 0.0f};
-                               float temp[3], spf;
-       
-                               // calculate tangential velocity
-                               copy_v3_v3 ( temp, collpair->normal );
-                               mul_v3_fl(temp, magrelVel);
-                               sub_v3_v3v3(vrel_t_pre, relativeVelocity, temp);
-       
-                               // Decrease in magnitude of relative tangential velocity due to coulomb friction
-                               // in original formula "magrelVel" should be the "change of relative velocity in normal direction"
-                               magtangent = MIN2 ( clmd->coll_parms->friction * 0.01 * magrelVel, sqrt ( dot_v3v3 ( vrel_t_pre, vrel_t_pre ) ) );
-       
-                               // Apply friction impulse.
-                               if ( magtangent > ALMOST_ZERO ) {
-                                       normalize_v3(vrel_t_pre);
-       
-                                       impulse = magtangent; // 2.0 * 
-                                       VECADDMUL ( pimpulse, vrel_t_pre, impulse);
-                               }
-       
-                               // Apply velocity stopping impulse
-                               // I_c = m * v_N / 2.0
-                               // no 2.0 * magrelVel normally, but looks nicer DG
-                               impulse =  magrelVel/2.0;
-       
-                               VECADDMUL ( pimpulse, collpair->normal, impulse);
-       
-                               // Apply repulse impulse if distance too short
-                               // I_r = -min(dt*kd, m(0, 1d/dt - v_n))
-                               spf = (float)clmd->sim_parms->stepsPerFrame / clmd->sim_parms->timescale;
-       
-                               d = -collpair->distance;
-                               if ( ( magrelVel < 0.1*d*spf ) && ( d > ALMOST_ZERO ) ) {
-                                       repulse = MIN2 ( d*1.0/spf, 0.1*d*spf - magrelVel );
-       
-                                       // stay on the safe side and clamp repulse
-                                       if ( impulse > ALMOST_ZERO )
-                                               repulse = MIN2 ( repulse, 5.0*impulse );
-                                       repulse = MAX2 ( impulse, repulse );
-       
-                                       impulse = repulse / ( 2.0 ); // original 2.0 / 0.25
-                                       VECADDMUL ( pimpulse, collpair->normal, impulse);
-                               }
-                               
-                               if (w1 < 0.5) w1 *= 2.0;
-                               if (w2 < 0.5) w2 *= 2.0;
-                               if (w3 < 0.5) w3 *= 2.0;
-                               
-                               VECADDMUL(cloth1->verts[collpair->ap1].impulse, pimpulse, w1*2.0);
-                               VECADDMUL(cloth1->verts[collpair->ap2].impulse, pimpulse, w2*2.0);
-                               VECADDMUL(cloth1->verts[collpair->ap3].impulse, pimpulse, w3*2.0);
-                               cloth1->verts[collpair->ap1].impulse_count++;
-                               cloth1->verts[collpair->ap2].impulse_count++;
-                               cloth1->verts[collpair->ap3].impulse_count++;
-                               
-                               result = 1;
-                       }
-               }
-       } 
-       
-       return result;
-}
-
-
-typedef struct tripairkey {
-       int p, a1, a2, a3;
-} tripairkey;
-
-unsigned int tripair_hash(void *vkey)
-{
-       tripairkey *key = vkey;
-       int keys[4] = {key->p, key->a1, key->a2, key->a3};
-       int i, j;
-       
-       for (i=0; i<4; i++) {
-               for (j=0; j<3; j++) {
-                       if (keys[j] >= keys[j+1]) {
-                               SWAP(int, keys[j], keys[j+1]);
-                       }
-               }
-       }
-       
-       return keys[0]*101 + keys[1]*72 + keys[2]*53 + keys[3]*34;
-}
-
-int tripair_cmp(const void *va, const void *vb)
-{
-       tripairkey *a = va, *b = vb;
-       int keysa[4] = {a->p, a->a1, a->a2, a->a3};
-       int keysb[4] = {b->p, b->a1, b->a2, b->a3};
-       int i;
-       
-       for (i=0; i<4; i++) {
-               int j, ok=0;
-               for (j=0; j<4; j++) {
-                       if (keysa[i] == keysa[j]) {
-                               ok = 1;
-                               break;
-                       }
-               }
-               if (!ok)
-                       return -1;
-       }
-       
-       return 0;
-}
-
-static void get_tripairkey(tripairkey *key, int p, int a1, int a2, int a3)
-{
-       key->a1 = a1;
-       key->a2 = a2;
-       key->a3 = a3;
-       key->p = p;
-}
-
-static int checkvisit(MemArena *arena, GHash *gh, int p, int a1, int a2, int a3)
-{
-       tripairkey key, *key2;
-       
-       get_tripairkey(&key, p, a1, a2, a3);
-       if (BLI_ghash_haskey(gh, &key))
-               return 1;
-       
-       key2 = BLI_memarena_alloc(arena, sizeof(*key2));
-       *key2 = key;
-       BLI_ghash_insert(gh, key2, NULL);
-       
-       return 0;
-}
-
-int cloth_point_tri_moving_v3v3_f(float v1[2][3], int i1, float v2[2][3], int i2,
-                                   float v3[2][3],  int i3, float v4[2][3], int i4,
-                                   float normal[3], float bary[3], float *t, 
-                                                                  float *relnor, GHash *gh, MemArena *arena)
-{
-       if (checkvisit(arena, gh, i1, i2, i3, i4))
-               return 0;
-       
-       return eltopo_point_tri_moving_v3v3_f(v1, i1, v2, i2, v3, i3, v4, i4, normal, bary, t, relnor);
-}
-
-static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTreeOverlap *overlap, 
-                                                                  CollPair *collpair, double dt, GHash *gh, MemArena *arena)
-{
-       ClothModifierData *clmd = (ClothModifierData *)md1;
-       CollisionModifierData *collmd = (CollisionModifierData *) md2;
-       MFace *face1=NULL, *face2 = NULL;
-       ClothVertex *verts1 = clmd->clothObject->verts;
-       double distance = 0;
-       float epsilon1 = clmd->coll_parms->epsilon;
-       float epsilon2 = BLI_bvhtree_getepsilon ( collmd->bvhtree );
-       float no[3], uv[3], t, relnor;
-       int i, i1, i2, i3, i4, i5, i6;
-       Cloth *cloth = clmd->clothObject;
-       float n1[3], sdis, p[3], l, n2[3], off[3], v1[2][3], v2[2][3], v3[2][3], v4[2][3], v5[2][3], v6[2][3];
-       int j, ret, bp1, bp2, bp3, ap1, ap2, ap3;
-       
-       face1 = & ( clmd->clothObject->mfaces[overlap->indexA] );
-       face2 = & ( collmd->mfaces[overlap->indexB] );
-
-       // check all 4 possible collisions
-       for ( i = 0; i < 4; i++ ) {
-               if ( i == 0 ) {
-                       // fill faceA
-                       ap1 = face1->v1;
-                       ap2 = face1->v2;
-                       ap3 = face1->v3;
-
-                       // fill faceB
-                       bp1 = face2->v1;
-                       bp2 = face2->v2;
-                       bp3 = face2->v3;
-               }
-               else if ( i == 1 ) {
-                       if ( face1->v4 ) {
-                               // fill faceA
-                               ap1 = face1->v1;
-                               ap2 = face1->v3;
-                               ap3 = face1->v4;
-
-                               // fill faceB
-                               bp1 = face2->v1;
-                               bp2 = face2->v2;
-                               bp3 = face2->v3;
-                       }
-                       else {
-                               continue;
-                       }
-               }
-               if ( i == 2 ) {
-                       if ( face2->v4 ) {
-                               // fill faceA
-                               ap1 = face1->v1;
-                               ap2 = face1->v2;
-                               ap3 = face1->v3;
-
-                               // fill faceB
-                               bp1 = face2->v1;
-                               bp2 = face2->v3;
-                               bp3 = face2->v4;
-                       }
-                       else {
-                               continue;
-                       }
-               }
-               else if ( i == 3 ) {
-                       if ( face1->v4 && face2->v4 ) {
-                               // fill faceA
-                               ap1 = face1->v1;
-                               ap2 = face1->v3;
-                               ap3 = face1->v4;
-
-                               // fill faceB
-                               bp1 = face2->v1;
-                               bp2 = face2->v3;
-                               bp3 = face2->v4;
-                       }
-                       else {
-                               continue;
-                       }
-               }
-               
-               copy_v3_v3(v1[0], cloth->verts[ap1].txold); 
-               copy_v3_v3(v1[1], cloth->verts[ap1].tx);
-               copy_v3_v3(v2[0], cloth->verts[ap2].txold);
-               copy_v3_v3(v2[1], cloth->verts[ap2].tx);
-               copy_v3_v3(v3[0], cloth->verts[ap3].txold);
-               copy_v3_v3(v3[1], cloth->verts[ap3].tx);
-               
-               copy_v3_v3(v4[0], collmd->current_x[bp1].co);
-               copy_v3_v3(v4[1], collmd->current_xnew[bp1].co);
-               copy_v3_v3(v5[0], collmd->current_x[bp2].co);
-               copy_v3_v3(v5[1], collmd->current_xnew[bp2].co);
-               copy_v3_v3(v6[0], collmd->current_x[bp3].co);
-               copy_v3_v3(v6[1], collmd->current_xnew[bp3].co);
-               
-               normal_tri_v3(n2, v4[1], v5[1], v6[1]);
-               
-               sdis = clmd->coll_parms->distance_repel + epsilon2 + FLT_EPSILON;
-
-               /*apply a repulsion force, to help the solver along*/
-               copy_v3_v3(off, n2);
-               negate_v3(off);
-               if (isect_ray_plane_v3(v1[1], off, v4[1], v5[1], v6[1], &l, 0)) {
-                       if (l >= 0.0 && l < sdis) {
-                               mul_v3_fl(off, (l-sdis)*cloth->verts[ap1].mass*dt*clmd->coll_parms->repel_force*0.1);
-
-                               add_v3_v3(cloth->verts[ap1].tv, off);
-                               add_v3_v3(cloth->verts[ap2].tv, off);
-                               add_v3_v3(cloth->verts[ap3].tv, off);
-                       }
-               }
-
-               /*offset new positions a bit, to account for margins*/
-               copy_v3_v3(off, n2);
-               mul_v3_fl(off,  epsilon1 + epsilon2 + ALMOST_ZERO);
-               add_v3_v3(v4[1], off); add_v3_v3(v5[1], off); add_v3_v3(v6[1], off);
-               
-               i1 = ap1; i2 = ap2; i3 = ap3;
-               i4 = bp1+cloth->numverts; i5 = bp2+cloth->numverts; i6 = bp3+cloth->numverts;
-               
-               for (j=0; j<6; j++) {
-                       int collp;
-
-                       switch (j) {
-                       case 0:
-                               ret = cloth_point_tri_moving_v3v3_f(v1, i1, v4, i4, v5, i5, v6, i6, no, uv, &t, &relnor, gh, arena);
-                               collp = ap1;
-                               break;
-                       case 1:
-                               collp = ap2;
-                               ret = cloth_point_tri_moving_v3v3_f(v2, i2, v4, i4, v5, i5, v6, i6, no, uv, &t, &relnor, gh, arena);
-                               break;
-                       case 2:
-                               collp = ap3;
-                               ret = cloth_point_tri_moving_v3v3_f(v3, i3, v4, i4, v5, i5, v6, i6, no, uv, &t, &relnor, gh, arena);
-                               break;
-                       case 3:
-                               collp = bp1;
-                               ret = cloth_point_tri_moving_v3v3_f(v4, i4, v1, i1, v2, i2, v3, i3, no, uv, &t, &relnor, gh, arena);
-                               break;
-                       case 4:
-                               collp = bp2;                            
-                               ret = cloth_point_tri_moving_v3v3_f(v5, i5, v1, i1, v2, i2, v3, i3, no, uv, &t, &relnor, gh, arena);
-                               break;
-                       case 5:
-                               collp = bp3;
-                               ret = cloth_point_tri_moving_v3v3_f(v6, i6, v1, i1, v2, i2, v3, i3, no, uv, &t, &relnor, gh, arena);
-                               break;
-                       }
-                       
-                       /*cloth vert versus coll face*/
-                       if (ret && j < 3) {
-                               collpair->bp1 = bp1; collpair->bp2 = bp2; collpair->bp3 = bp3;
-                               collpair->collp = collp;
-                               
-                               copy_v3_v3(collpair->normal, no);
-                               mul_v3_v3fl(collpair->vector, collpair->normal, relnor);
-                               collpair->distance = relnor;
-                               collpair->time = t;
-                               
-                               copy_v3_v3(collpair->bary, uv);
-                               
-                               collpair->flag = COLLISION_USE_COLLFACE;
-                               collpair++;
-                       }
-                       else if (ret && j >= 3) { /*coll vert versus cloth face*/
-                               collpair->ap1 = ap1; collpair->ap2 = ap2; collpair->ap3 = ap3;
-                               collpair->collp = collp;
-                               
-                               copy_v3_v3(collpair->normal, no);
-                               mul_v3_v3fl(collpair->vector, collpair->normal, relnor);
-                               collpair->distance = relnor;
-                               collpair->time = t;
-                               
-                               copy_v3_v3(collpair->bary, uv);
-
-                               collpair->flag = 0;
-                               collpair++;
-                       }
-               }
-       }
-       
-       return collpair;
-}
-
-static void machine_epsilon_offset(Cloth *cloth)
-{
-       ClothVertex *cv;
-       int i, j;
-       
-       cv = cloth->verts;
-       for (i=0; i<cloth->numverts; i++, cv++) {
-               /*aggrevatingly enough, it's necessary to offset the coordinates
-                by a multiple of the 32-bit floating point epsilon when switching
-                into doubles*/
-               #define RNDSIGN (float)(-1*(BLI_rand()%2==0)|1)
-               for (j=0; j<3; j++) {
-                       cv->tx[j] += FLT_EPSILON*30.0f*RNDSIGN;
-                       cv->txold[j] += FLT_EPSILON*30.0f*RNDSIGN;
-                       cv->tv[j] += FLT_EPSILON*30.0f*RNDSIGN;
-               }               
-       }
-}
-
-#else /* !WITH_ELTOPO */
-
-//Determines collisions on overlap, collisions are written to collpair[i] and collision+number_collision_found is returned
-static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, 
-       BVHTreeOverlap *overlap, CollPair *collpair, float dt )
-{
-       ClothModifierData *clmd = (ClothModifierData *)md1;
-       CollisionModifierData *collmd = (CollisionModifierData *) md2;
-       Cloth *cloth = clmd->clothObject;
-       MFace *face1=NULL, *face2 = NULL;
-#ifdef USE_BULLET
-       ClothVertex *verts1 = clmd->clothObject->verts;
-#endif
-       double distance = 0;
-       float epsilon1 = clmd->coll_parms->epsilon;
-       float epsilon2 = BLI_bvhtree_getepsilon ( collmd->bvhtree );
-       float n2[3], sdis, l;
-       int i;
-
-       face1 = & ( clmd->clothObject->mfaces[overlap->indexA] );
-       face2 = & ( collmd->mfaces[overlap->indexB] );
-
-       // check all 4 possible collisions
-       for ( i = 0; i < 4; i++ ) {
-               if ( i == 0 ) {
-                       // fill faceA
-                       collpair->ap1 = face1->v1;
-                       collpair->ap2 = face1->v2;
-                       collpair->ap3 = face1->v3;
-
-                       // fill faceB
-                       collpair->bp1 = face2->v1;
-                       collpair->bp2 = face2->v2;
-                       collpair->bp3 = face2->v3;
-               }
-               else if ( i == 1 ) {
-                       if ( face1->v4 ) {
-                               // fill faceA
-                               collpair->ap1 = face1->v1;
-                               collpair->ap2 = face1->v4;
-                               collpair->ap3 = face1->v3;
-
-                               // fill faceB
-                               collpair->bp1 = face2->v1;
-                               collpair->bp2 = face2->v2;
-                               collpair->bp3 = face2->v3;
-                       }
-                       else
-                               i++;
-               }
-               if ( i == 2 ) {
-                       if ( face2->v4 ) {
-                               // fill faceA
-                               collpair->ap1 = face1->v1;
-                               collpair->ap2 = face1->v2;
-                               collpair->ap3 = face1->v3;
-
-                               // fill faceB
-                               collpair->bp1 = face2->v1;
-                               collpair->bp2 = face2->v4;
-                               collpair->bp3 = face2->v3;
-                       }
-                       else
-                               break;
-               }
-               else if ( i == 3 ) {
-                       if ( face1->v4 && face2->v4 ) {
-                               // fill faceA
-                               collpair->ap1 = face1->v1;
-                               collpair->ap2 = face1->v4;
-                               collpair->ap3 = face1->v3;
-
-                               // fill faceB
-                               collpair->bp1 = face2->v1;
-                               collpair->bp2 = face2->v4;
-                               collpair->bp3 = face2->v3;
-                       }
-                       else
-                               break;
-               }
-               
-               normal_tri_v3(n2, collmd->current_xnew[collpair->bp1].co, 
-                       collmd->current_xnew[collpair->bp2].co, 
-                       collmd->current_xnew[collpair->bp3].co);
-               
-               sdis = clmd->coll_parms->distance_repel + epsilon2 + FLT_EPSILON;
-               
-               /* apply a repulsion force, to help the solver along.
-                * this is kindof crude, it only tests one vert of the triangle */
-               if (isect_ray_plane_v3(cloth->verts[collpair->ap1].tx, n2, collmd->current_xnew[collpair->bp1].co, 
-                       collmd->current_xnew[collpair->bp2].co,
-                       collmd->current_xnew[collpair->bp3].co, &l, 0))
-               {
-                       if (l >= 0.0f && l < sdis) {
-                               mul_v3_fl(n2, (l-sdis)*cloth->verts[collpair->ap1].mass*dt*clmd->coll_parms->repel_force*0.1f);
-
-                               add_v3_v3(cloth->verts[collpair->ap1].tv, n2);
-                               add_v3_v3(cloth->verts[collpair->ap2].tv, n2);
-                               add_v3_v3(cloth->verts[collpair->ap3].tv, n2);
-                       }
-               }
-               
-#ifdef USE_BULLET
-               // calc distance + normal
-               distance = plNearestPoints (
-                       verts1[collpair->ap1].txold, verts1[collpair->ap2].txold, verts1[collpair->ap3].txold, collmd->current_x[collpair->bp1].co, collmd->current_x[collpair->bp2].co, collmd->current_x[collpair->bp3].co, collpair->pa, collpair->pb, collpair->vector );
-#else
-               // just be sure that we don't add anything
-               distance = 2.0 * (double)( epsilon1 + epsilon2 + ALMOST_ZERO );
-#endif
-
-               if (distance <= (epsilon1 + epsilon2 + ALMOST_ZERO)) {
-                       normalize_v3_v3(collpair->normal, collpair->vector);
-
-                       collpair->distance = distance;
-                       collpair->flag = 0;
-                       collpair++;
-               }/*
-               else
-               {
-                       float w1, w2, w3, u1, u2, u3;
-                       float v1[3], v2[3], relativeVelocity[3];
-
-                       // calc relative velocity
-                       
-                       // compute barycentric coordinates for both collision points
-                       collision_compute_barycentric ( collpair->pa,
-                       verts1[collpair->ap1].txold,
-                       verts1[collpair->ap2].txold,
-                       verts1[collpair->ap3].txold,
-                       &w1, &w2, &w3 );
-
-                       // was: txold
-                       collision_compute_barycentric ( collpair->pb,
-                       collmd->current_x[collpair->bp1].co,
-                       collmd->current_x[collpair->bp2].co,
-                       collmd->current_x[collpair->bp3].co,
-                       &u1, &u2, &u3 );
-
-                       // Calculate relative "velocity".
-                       collision_interpolateOnTriangle ( v1, verts1[collpair->ap1].tv, verts1[collpair->ap2].tv, verts1[collpair->ap3].tv, w1, w2, w3 );
-
-                       collision_interpolateOnTriangle ( v2, collmd->current_v[collpair->bp1].co, collmd->current_v[collpair->bp2].co, collmd->current_v[collpair->bp3].co, u1, u2, u3 );
-
-                       sub_v3_v3v3(relativeVelocity, v2, v1);
-
-                       if (sqrt(dot_v3v3(relativeVelocity, relativeVelocity)) >= distance)
-                       {
-                               // check for collision in the future
-                               collpair->flag |= COLLISION_IN_FUTURE;
-                               collpair++;
-                       }
-               }*/
-       }
-       return collpair;
-}
-#endif /* WITH_ELTOPO */
-
-
-#if 0
-static int cloth_collision_response_moving( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair, CollPair *collision_end )
-{
-       int result = 0;
-       Cloth *cloth1;
-       float w1, w2, w3, u1, u2, u3;
-       float v1[3], v2[3], relativeVelocity[3];
-       float magrelVel;
-
-       cloth1 = clmd->clothObject;
-
-       for ( ; collpair != collision_end; collpair++ )
-       {
-               // compute barycentric coordinates for both collision points
-               collision_compute_barycentric ( collpair->pa,
-                       cloth1->verts[collpair->ap1].txold,
-                       cloth1->verts[collpair->ap2].txold,
-                       cloth1->verts[collpair->ap3].txold,
-                       &w1, &w2, &w3 );
-
-               // was: txold
-               collision_compute_barycentric ( collpair->pb,
-                       collmd->current_x[collpair->bp1].co,
-                       collmd->current_x[collpair->bp2].co,
-                       collmd->current_x[collpair->bp3].co,
-                       &u1, &u2, &u3 );
-
-               // Calculate relative "velocity".
-               collision_interpolateOnTriangle ( v1, cloth1->verts[collpair->ap1].tv, cloth1->verts[collpair->ap2].tv, cloth1->verts[collpair->ap3].tv, w1, w2, w3 );
-
-               collision_interpolateOnTriangle ( v2, collmd->current_v[collpair->bp1].co, collmd->current_v[collpair->bp2].co, collmd->current_v[collpair->bp3].co, u1, u2, u3 );
-
-               sub_v3_v3v3(relativeVelocity, v2, v1);
-
-               // Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal').
-               magrelVel = dot_v3v3 ( relativeVelocity, collpair->normal );
-
-               // printf("magrelVel: %f\n", magrelVel);
-
-               // Calculate masses of points.
-               // TODO
-
-               // If v_n_mag < 0 the edges are approaching each other.
-               if ( magrelVel > ALMOST_ZERO )
-               {
-                       // Calculate Impulse magnitude to stop all motion in normal direction.
-                       float magtangent = 0;
-                       double impulse = 0.0;
-                       float vrel_t_pre[3];
-                       float temp[3];
-
-                       // calculate tangential velocity
-                       copy_v3_v3 ( temp, collpair->normal );
-                       mul_v3_fl(temp, magrelVel);
-                       sub_v3_v3v3(vrel_t_pre, relativeVelocity, temp);
-
-                       // Decrease in magnitude of relative tangential velocity due to coulomb friction
-                       // in original formula "magrelVel" should be the "change of relative velocity in normal direction"
-                       magtangent = MIN2 ( clmd->coll_parms->friction * 0.01 * magrelVel, sqrt ( dot_v3v3 ( vrel_t_pre, vrel_t_pre ) ) );
-
-                       // Apply friction impulse.
-                       if ( magtangent > ALMOST_ZERO )
-                       {
-                               normalize_v3(vrel_t_pre);
-
-                               impulse = 2.0 * magtangent / ( 1.0 + w1*w1 + w2*w2 + w3*w3 );
-                               VECADDMUL ( cloth1->verts[collpair->ap1].impulse, vrel_t_pre, w1 * impulse );
-                               VECADDMUL ( cloth1->verts[collpair->ap2].impulse, vrel_t_pre, w2 * impulse );
-                               VECADDMUL ( cloth1->verts[collpair->ap3].impulse, vrel_t_pre, w3 * impulse );
-                       }
-
-                       // Apply velocity stopping impulse
-                       // I_c = m * v_N / 2.0
-                       // no 2.0 * magrelVel normally, but looks nicer DG
-                       impulse =  magrelVel / ( 1.0 + w1*w1 + w2*w2 + w3*w3 );
-
-                       VECADDMUL ( cloth1->verts[collpair->ap1].impulse, collpair->normal, w1 * impulse );
-                       cloth1->verts[collpair->ap1].impulse_count++;
-
-                       VECADDMUL ( cloth1->verts[collpair->ap2].impulse, collpair->normal, w2 * impulse );
-                       cloth1->verts[collpair->ap2].impulse_count++;
-
-                       VECADDMUL ( cloth1->verts[collpair->ap3].impulse, collpair->normal, w3 * impulse );
-                       cloth1->verts[collpair->ap3].impulse_count++;
-
-                       // Apply repulse impulse if distance too short
-                       // I_r = -min(dt*kd, m(0, 1d/dt - v_n))
-                       /*
-                       d = clmd->coll_parms->epsilon*8.0/9.0 + epsilon2*8.0/9.0 - collpair->distance;
-                       if ( ( magrelVel < 0.1*d*clmd->sim_parms->stepsPerFrame ) && ( d > ALMOST_ZERO ) )
-                       {
-                       repulse = MIN2 ( d*1.0/clmd->sim_parms->stepsPerFrame, 0.1*d*clmd->sim_parms->stepsPerFrame - magrelVel );
-
-                       // stay on the safe side and clamp repulse
-                       if ( impulse > ALMOST_ZERO )
-                       repulse = MIN2 ( repulse, 5.0*impulse );
-                       repulse = MAX2 ( impulse, repulse );
-
-                       impulse = repulse / ( 1.0 + w1*w1 + w2*w2 + w3*w3 ); // original 2.0 / 0.25
-                       VECADDMUL ( cloth1->verts[collpair->ap1].impulse, collpair->normal,  impulse );
-                       VECADDMUL ( cloth1->verts[collpair->ap2].impulse, collpair->normal,  impulse );
-                       VECADDMUL ( cloth1->verts[collpair->ap3].impulse, collpair->normal,  impulse );
-                       }
-                       */
-                       result = 1;
-               }
-       }
-       return result;
-}
-#endif
-
-#if 0
-static float projectPointOntoLine(float *p, float *a, float *b) 
-{
-       float ba[3], pa[3];
-       sub_v3_v3v3(ba, b, a);
-       sub_v3_v3v3(pa, p, a);
-       return dot_v3v3(pa, ba) / dot_v3v3(ba, ba);
-}
-
-static void calculateEENormal(float *np1, float *np2, float *np3, float *np4, float *out_normal)
-{
-       float line1[3], line2[3];
-       float length;
-
-       sub_v3_v3v3(line1, np2, np1);
-       sub_v3_v3v3(line2, np3, np1);
-
-       // printf("l1: %f, l1: %f, l2: %f, l2: %f\n", line1[0], line1[1], line2[0], line2[1]);
-
-       cross_v3_v3v3(out_normal, line1, line2);
-
-       
-
-       length = normalize_v3(out_normal);
-       if (length <= FLT_EPSILON)
-       { // lines are collinear
-               sub_v3_v3v3(out_normal, np2, np1);
-               normalize_v3(out_normal);
-       }
-}
+                       float vrel_t_pre[3];
+                       float temp[3], spf;
 
-static void findClosestPointsEE(float *x1, float *x2, float *x3, float *x4, float *w1, float *w2)
-{
-       float temp[3], temp2[3];
-       
-       double a, b, c, e, f; 
+                       // calculate tangential velocity
+                       copy_v3_v3 ( temp, collpair->normal );
+                       mul_v3_fl(temp, magrelVel);
+                       sub_v3_v3v3(vrel_t_pre, relativeVelocity, temp);
 
-       sub_v3_v3v3(temp, x2, x1);
-       a = dot_v3v3(temp, temp);
+                       // Decrease in magnitude of relative tangential velocity due to coulomb friction
+                       // in original formula "magrelVel" should be the "change of relative velocity in normal direction"
+                       magtangent = MIN2(clmd->coll_parms->friction * 0.01f * magrelVel, sqrtf(dot_v3v3(vrel_t_pre, vrel_t_pre)));
 
-       sub_v3_v3v3(temp2, x4, x3);
-       b = -dot_v3v3(temp, temp2);
+                       // Apply friction impulse.
+                       if ( magtangent > ALMOST_ZERO ) {
+                               normalize_v3(vrel_t_pre);
 
-       c = dot_v3v3(temp2, temp2);
+                               impulse = magtangent / ( 1.0f + w1*w1 + w2*w2 + w3*w3 ); // 2.0 *
+                               VECADDMUL ( i1, vrel_t_pre, w1 * impulse );
+                               VECADDMUL ( i2, vrel_t_pre, w2 * impulse );
+                               VECADDMUL ( i3, vrel_t_pre, w3 * impulse );
+                       }
 
-       sub_v3_v3v3(temp2, x3, x1);
-       e = dot_v3v3(temp, temp2);
+                       // Apply velocity stopping impulse
+                       // I_c = m * v_N / 2.0
+                       // no 2.0 * magrelVel normally, but looks nicer DG
+                       impulse =  magrelVel / ( 1.0 + w1*w1 + w2*w2 + w3*w3 );
 
-       sub_v3_v3v3(temp, x4, x3);
-       f = -dot_v3v3(temp, temp2);
+                       VECADDMUL ( i1, collpair->normal, w1 * impulse );
+                       cloth1->verts[collpair->ap1].impulse_count++;
 
-       *w1 = (e * c - b * f) / (a * c - b * b);
-       *w2 = (f - b * *w1) / c;
+                       VECADDMUL ( i2, collpair->normal, w2 * impulse );
+                       cloth1->verts[collpair->ap2].impulse_count++;
 
-}
+                       VECADDMUL ( i3, collpair->normal, w3 * impulse );
+                       cloth1->verts[collpair->ap3].impulse_count++;
 
-// calculates the distance of 2 edges
-static float edgedge_distance(float np11[3], float np12[3], float np21[3], float np22[3], float *out_a1, float *out_a2, float *out_normal)
-{
-       float line1[3], line2[3], cross[3];
-       float length;
-       float temp[3], temp2[3];
-       float dist_a1, dist_a2;
-       
-       sub_v3_v3v3(line1, np12, np11);
-       sub_v3_v3v3(line2, np22, np21);
+                       // Apply repulse impulse if distance too short
+                       // I_r = -min(dt*kd, m(0, 1d/dt - v_n))
+                       spf = (float)clmd->sim_parms->stepsPerFrame / clmd->sim_parms->timescale;
 
-       cross_v3_v3v3(cross, line1, line2);
-       length = dot_v3v3(cross, cross);
+                       d = clmd->coll_parms->epsilon*8.0f/9.0f + epsilon2*8.0f/9.0f - collpair->distance;
+                       if ( ( magrelVel < 0.1f*d*spf ) && ( d > ALMOST_ZERO ) ) {
+                               repulse = MIN2 ( d*1.0f/spf, 0.1f*d*spf - magrelVel );
 
-       if (length < FLT_EPSILON) 
-       {
-               *out_a2 = projectPointOntoLine(np11, np21, np22);
-               if ((*out_a2 >= -FLT_EPSILON) && (*out_a2 <= 1.0 + FLT_EPSILON)) 
-               {
-                       *out_a1 = 0;
-                       calculateEENormal(np11, np12, np21, np22, out_normal);
-                       sub_v3_v3v3(temp, np22, np21);
-                       mul_v3_fl(temp, *out_a2);
-                       VECADD(temp2, temp, np21);
-                       VECADD(temp2, temp2, np11);
-                       return dot_v3v3(temp2, temp2);
-               }
+                               // stay on the safe side and clamp repulse
+                               if ( impulse > ALMOST_ZERO )
+                                       repulse = MIN2 ( repulse, 5.0*impulse );
+                               repulse = MAX2 ( impulse, repulse );
 
-               CLAMP(*out_a2, 0.0, 1.0);
-               if (*out_a2 > .5) 
-               { // == 1.0
-                       *out_a1 = projectPointOntoLine(np22, np11, np12);
-                       if ((*out_a1 >= -FLT_EPSILON) && (*out_a1 <= 1.0 + FLT_EPSILON)) 
-                       {
-                               calculateEENormal(np11, np12, np21, np22, out_normal);
-
-                               // return (np22 - (np11 + (np12 - np11) * out_a1)).lengthSquared();
-                               sub_v3_v3v3(temp, np12, np11);
-                               mul_v3_fl(temp, *out_a1);
-                               VECADD(temp2, temp, np11);
-                               sub_v3_v3v3(temp2, np22, temp2);
-                               return dot_v3v3(temp2, temp2);
-                       }
-               } 
-               else 
-               { // == 0.0
-                       *out_a1 = projectPointOntoLine(np21, np11, np12);
-                       if ((*out_a1 >= -FLT_EPSILON) && (*out_a1 <= 1.0 + FLT_EPSILON)) 
-                       {
-                               calculateEENormal(np11, np11, np21, np22, out_normal);
-
-                               // return (np21 - (np11 + (np12 - np11) * out_a1)).lengthSquared();
-                               sub_v3_v3v3(temp, np12, np11);
-                               mul_v3_fl(temp, *out_a1);
-                               VECADD(temp2, temp, np11);
-                               sub_v3_v3v3(temp2, np21, temp2);
-                               return dot_v3v3(temp2, temp2);
+                               impulse = repulse / ( 1.0f + w1*w1 + w2*w2 + w3*w3 ); // original 2.0 / 0.25
+                               VECADDMUL ( i1, collpair->normal,  impulse );
+                               VECADDMUL ( i2, collpair->normal,  impulse );
+                               VECADDMUL ( i3, collpair->normal,  impulse );
                        }
-               }
 
-               CLAMP(*out_a1, 0.0, 1.0);
-               calculateEENormal(np11, np12, np21, np22, out_normal);
-               if (*out_a1 > .5)
-               {
-                       if (*out_a2 > .5)
-                       {
-                               sub_v3_v3v3(temp, np12, np22);
-                       }
-                       else
-                       {
-                               sub_v3_v3v3(temp, np12, np21);
-                       }
+                       result = 1;
                }
                else
                {
-                       if (*out_a2 > .5)
-                       {
-                               sub_v3_v3v3(temp, np11, np22);
-                       }
-                       else
-                       {
-                               sub_v3_v3v3(temp, np11, np21);
-                       }
-               }
+                       // Apply repulse impulse if distance too short
+                       // I_r = -min(dt*kd, m(0, 1d/dt - v_n))
+                       float spf = (float)clmd->sim_parms->stepsPerFrame / clmd->sim_parms->timescale;
 
-               return dot_v3v3(temp, temp);
-       }
-       else
-       {
-               
-               // If the lines aren't parallel (but coplanar) they have to intersect
+                       float d = clmd->coll_parms->epsilon*8.0f/9.0f + epsilon2*8.0f/9.0f - collpair->distance;
+                       if ( d > ALMOST_ZERO) {
+                               // stay on the safe side and clamp repulse
+                               float repulse = d*1.0f/spf;
 
-               findClosestPointsEE(np11, np12, np21, np22, out_a1, out_a2);
+                               float impulse = repulse / ( 1.0f + w1*w1 + w2*w2 + w3*w3 ); // original 2.0 / 0.25
+                               VECADDMUL ( i1, collpair->normal,  impulse );
+                               VECADDMUL ( i2, collpair->normal,  impulse );
+                               VECADDMUL ( i3, collpair->normal,  impulse );
 
-               // If both points are on the finite edges, we're done.
-               if (*out_a1 >= 0.0 && *out_a1 <= 1.0 && *out_a2 >= 0.0 && *out_a2 <= 1.0) 
-               {
-                       float p1[3], p2[3];
-                       
-                       // p1= np11 + (np12 - np11) * out_a1;
-                       sub_v3_v3v3(temp, np12, np11);
-