Merge branch 'master' into blender2.8
In addition to pack of conflicts listed below, also had to comment out particle part of new Alembic code... :/ Conflicts: intern/ghost/intern/GHOST_WindowWin32.cpp source/blender/blenkernel/BKE_effect.h source/blender/blenkernel/BKE_pointcache.h source/blender/blenkernel/intern/cloth.c source/blender/blenkernel/intern/depsgraph.c source/blender/blenkernel/intern/dynamicpaint.c source/blender/blenkernel/intern/effect.c source/blender/blenkernel/intern/particle_system.c source/blender/blenkernel/intern/pointcache.c source/blender/blenkernel/intern/rigidbody.c source/blender/blenkernel/intern/smoke.c source/blender/blenkernel/intern/softbody.c source/blender/depsgraph/intern/builder/deg_builder_relations.cc source/blender/gpu/intern/gpu_debug.c source/blender/makesdna/DNA_object_types.h source/blender/makesrna/intern/rna_particle.c
This commit is contained in:
@@ -433,6 +433,7 @@ extern GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle,
|
||||
GHOST_TButtonMask mask,
|
||||
int *isDown);
|
||||
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
/***************************************************************************************
|
||||
* Access to 3D mouse.
|
||||
***************************************************************************************/
|
||||
@@ -442,6 +443,7 @@ extern GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle,
|
||||
* \param deadzone Deadzone of the 3D mouse (both for rotation and pan) relative to full range
|
||||
*/
|
||||
extern void GHOST_setNDOFDeadZone(float deadzone);
|
||||
#endif
|
||||
|
||||
|
||||
/***************************************************************************************
|
||||
|
@@ -377,11 +377,13 @@ public:
|
||||
*/
|
||||
virtual GHOST_TSuccess getButtonState(GHOST_TButtonMask mask, bool& isDown) const = 0;
|
||||
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
/**
|
||||
* Sets 3D mouse deadzone
|
||||
* \param deadzone: Deadzone of the 3D mouse (both for rotation and pan) relative to full range
|
||||
*/
|
||||
virtual void setNDOFDeadZone(float deadzone) = 0;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Toggles console
|
||||
|
@@ -172,8 +172,10 @@ typedef enum {
|
||||
GHOST_kEventWheel, /// Mouse wheel event
|
||||
GHOST_kEventTrackpad, /// Trackpad event
|
||||
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
GHOST_kEventNDOFMotion, /// N degree of freedom device motion event
|
||||
GHOST_kEventNDOFButton, /// N degree of freedom device button event
|
||||
#endif
|
||||
|
||||
GHOST_kEventKeyDown,
|
||||
GHOST_kEventKeyUp,
|
||||
@@ -478,6 +480,7 @@ typedef enum {
|
||||
GHOST_kFinished
|
||||
} GHOST_TProgress;
|
||||
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
typedef struct {
|
||||
/** N-degree of freedom device data v3 [GSoC 2010] */
|
||||
// Each component normally ranges from -1 to +1, but can exceed that.
|
||||
@@ -497,6 +500,7 @@ typedef struct {
|
||||
GHOST_TButtonAction action;
|
||||
short button;
|
||||
} GHOST_TEventNDOFButtonData;
|
||||
#endif // WITH_INPUT_NDOF
|
||||
|
||||
typedef struct {
|
||||
/** The key code. */
|
||||
|
@@ -406,12 +406,13 @@ GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle,
|
||||
}
|
||||
|
||||
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
void GHOST_setNDOFDeadZone(float deadzone)
|
||||
{
|
||||
GHOST_ISystem *system = GHOST_ISystem::getSystem();
|
||||
system->setNDOFDeadZone(deadzone);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void GHOST_setAcceptDragOperation(GHOST_WindowHandle windowhandle, GHOST_TInt8 canAccept)
|
||||
{
|
||||
|
@@ -22,9 +22,12 @@
|
||||
|
||||
/** \file ghost/intern/GHOST_EventNDOF.h
|
||||
* \ingroup GHOST
|
||||
* Declaration of GHOST_EventManager class.
|
||||
*/
|
||||
|
||||
#ifndef WITH_INPUT_NDOF
|
||||
# error NDOF code included in non-NDOF-enabled build
|
||||
#endif
|
||||
|
||||
#ifndef __GHOST_EVENTNDOF_H__
|
||||
#define __GHOST_EVENTNDOF_H__
|
||||
|
||||
|
@@ -21,6 +21,10 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#ifndef WITH_INPUT_NDOF
|
||||
# error NDOF code included in non-NDOF-enabled build
|
||||
#endif
|
||||
|
||||
#ifndef __GHOST_NDOFMANAGER_H__
|
||||
#define __GHOST_NDOFMANAGER_H__
|
||||
|
||||
|
@@ -24,8 +24,6 @@
|
||||
#ifndef __GHOST_NDOFMANAGERCOCOA_H__
|
||||
#define __GHOST_NDOFMANAGERCOCOA_H__
|
||||
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
|
||||
#include "GHOST_NDOFManager.h"
|
||||
|
||||
// Event capture is handled within the NDOF manager on Macintosh,
|
||||
@@ -40,6 +38,4 @@ public:
|
||||
bool available();
|
||||
};
|
||||
|
||||
|
||||
#endif // WITH_INPUT_NDOF
|
||||
#endif // #include guard
|
||||
|
@@ -210,7 +210,9 @@ static void DeviceEvent(uint32_t unused, uint32_t msg_type, void* msg_arg)
|
||||
case kConnexionCmdHandleButtons:
|
||||
{
|
||||
int button_bits = has_old_driver ? s->buttons8 : s->buttons;
|
||||
#ifdef DEBUG_NDOF_BUTTONS
|
||||
printf("button bits: 0x%08x\n", button_bits);
|
||||
#endif
|
||||
ndof_manager->updateButtons(button_bits, now);
|
||||
ghost_system->notifyExternalEventProcessed();
|
||||
break;
|
||||
|
@@ -21,8 +21,6 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
|
||||
#include "GHOST_NDOFManagerUnix.h"
|
||||
#include "GHOST_System.h"
|
||||
|
||||
@@ -144,5 +142,3 @@ bool GHOST_NDOFManagerUnix::processEvents()
|
||||
|
||||
return anyProcessed;
|
||||
}
|
||||
|
||||
#endif /* WITH_INPUT_NDOF */
|
||||
|
@@ -24,8 +24,6 @@
|
||||
#ifndef __GHOST_NDOFMANAGERUNIX_H__
|
||||
#define __GHOST_NDOFMANAGERUNIX_H__
|
||||
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
|
||||
#include "GHOST_NDOFManager.h"
|
||||
|
||||
/* Event capture is handled within the NDOF manager on Linux,
|
||||
@@ -43,5 +41,4 @@ private:
|
||||
bool m_available;
|
||||
};
|
||||
|
||||
#endif /* WITH_INPUT_NDOF */
|
||||
#endif /* __GHOST_NDOFMANAGERUNIX_H__ */
|
||||
|
@@ -22,8 +22,6 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#ifdef WITH_INPUT_NDOF // use contents of this file
|
||||
|
||||
#include "GHOST_NDOFManagerWin32.h"
|
||||
|
||||
|
||||
@@ -40,5 +38,3 @@ bool GHOST_NDOFManagerWin32::available()
|
||||
// always available since RawInput is built into Windows
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // WITH_INPUT_NDOF
|
||||
|
@@ -25,8 +25,6 @@
|
||||
#ifndef __GHOST_NDOFMANAGERWIN32_H__
|
||||
#define __GHOST_NDOFMANAGERWIN32_H__
|
||||
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
|
||||
#include "GHOST_NDOFManager.h"
|
||||
|
||||
|
||||
@@ -37,6 +35,4 @@ public:
|
||||
bool available();
|
||||
};
|
||||
|
||||
|
||||
#endif // WITH_INPUT_NDOF
|
||||
#endif // #include guard
|
||||
|
@@ -38,11 +38,13 @@
|
||||
|
||||
#include "GHOST_DisplayManager.h"
|
||||
#include "GHOST_EventManager.h"
|
||||
#include "GHOST_NDOFManager.h"
|
||||
#include "GHOST_TimerTask.h"
|
||||
#include "GHOST_TimerManager.h"
|
||||
#include "GHOST_WindowManager.h"
|
||||
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
# include "GHOST_NDOFManager.h"
|
||||
#endif
|
||||
|
||||
GHOST_System::GHOST_System()
|
||||
: m_nativePixel(false),
|
||||
@@ -292,14 +294,12 @@ GHOST_TSuccess GHOST_System::getButtonState(GHOST_TButtonMask mask, bool& isDown
|
||||
return success;
|
||||
}
|
||||
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
void GHOST_System::setNDOFDeadZone(float deadzone)
|
||||
{
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
this->m_ndofManager->setDeadZone(deadzone);
|
||||
#else
|
||||
(void)deadzone;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
GHOST_TSuccess GHOST_System::init()
|
||||
{
|
||||
@@ -345,6 +345,7 @@ GHOST_TSuccess GHOST_System::exit()
|
||||
delete m_ndofManager;
|
||||
m_ndofManager = NULL;
|
||||
#endif
|
||||
|
||||
return GHOST_kSuccess;
|
||||
}
|
||||
|
||||
|
@@ -48,7 +48,9 @@ class GHOST_Event;
|
||||
class GHOST_TimerManager;
|
||||
class GHOST_Window;
|
||||
class GHOST_WindowManager;
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
class GHOST_NDOFManager;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Implementation of platform independent functionality of the GHOST_ISystem
|
||||
@@ -236,6 +238,7 @@ public:
|
||||
*/
|
||||
GHOST_TSuccess getButtonState(GHOST_TButtonMask mask, bool& isDown) const;
|
||||
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
/***************************************************************************************
|
||||
* Access to 3D mouse.
|
||||
***************************************************************************************/
|
||||
@@ -245,6 +248,7 @@ public:
|
||||
* \param deadzone: Deadzone of the 3D mouse (both for rotation and pan) relative to full range
|
||||
*/
|
||||
void setNDOFDeadZone(float deadzone);
|
||||
#endif
|
||||
|
||||
/***************************************************************************************
|
||||
* Other (internal) functionality.
|
||||
|
@@ -57,7 +57,7 @@
|
||||
#include "GHOST_WindowWin32.h"
|
||||
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
#include "GHOST_NDOFManagerWin32.h"
|
||||
#include "GHOST_NDOFManagerWin32.h"
|
||||
#endif
|
||||
|
||||
// Key code values not found in winuser.h
|
||||
@@ -125,9 +125,9 @@
|
||||
static void initRawInput()
|
||||
{
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
#define DEVICE_COUNT 2
|
||||
#define DEVICE_COUNT 2
|
||||
#else
|
||||
#define DEVICE_COUNT 1
|
||||
#define DEVICE_COUNT 1
|
||||
#endif
|
||||
|
||||
RAWINPUTDEVICE devices[DEVICE_COUNT];
|
||||
|
Reference in New Issue
Block a user