Merge branch 'master' into sculpt-dev
This commit is contained in:
commit
7547e28ba4
|
@ -569,13 +569,13 @@ GHOST_TSuccess GHOST_SystemWin32::getButtons(GHOST_Buttons &buttons) const
|
|||
*/
|
||||
bool swapped = ::GetSystemMetrics(SM_SWAPBUTTON) == TRUE;
|
||||
|
||||
bool down = HIBYTE(::GetKeyState(VK_LBUTTON)) != 0;
|
||||
bool down = HIBYTE(::GetAsyncKeyState(VK_LBUTTON)) != 0;
|
||||
buttons.set(swapped ? GHOST_kButtonMaskRight : GHOST_kButtonMaskLeft, down);
|
||||
|
||||
down = HIBYTE(::GetKeyState(VK_MBUTTON)) != 0;
|
||||
down = HIBYTE(::GetAsyncKeyState(VK_MBUTTON)) != 0;
|
||||
buttons.set(GHOST_kButtonMaskMiddle, down);
|
||||
|
||||
down = HIBYTE(::GetKeyState(VK_RBUTTON)) != 0;
|
||||
down = HIBYTE(::GetAsyncKeyState(VK_RBUTTON)) != 0;
|
||||
buttons.set(swapped ? GHOST_kButtonMaskLeft : GHOST_kButtonMaskRight, down);
|
||||
return GHOST_kSuccess;
|
||||
}
|
||||
|
@ -939,148 +939,106 @@ GHOST_EventButton *GHOST_SystemWin32::processButtonEvent(GHOST_TEventType type,
|
|||
{
|
||||
GHOST_SystemWin32 *system = (GHOST_SystemWin32 *)getSystem();
|
||||
|
||||
if (type == GHOST_kEventButtonDown) {
|
||||
window->updateMouseCapture(MousePressed);
|
||||
}
|
||||
else if (type == GHOST_kEventButtonUp) {
|
||||
window->updateMouseCapture(MouseReleased);
|
||||
}
|
||||
GHOST_TabletData td = window->m_tabletInRange ? window->getLastTabletData() :
|
||||
GHOST_TABLET_DATA_NONE;
|
||||
|
||||
/* Check for active Wintab mouse emulation in addition to a tablet in range because a proximity
|
||||
* leave event might have fired before the Windows mouse up event, thus there are still tablet
|
||||
* events to grab. The described behavior was observed in a Wacom Bamboo CTE-450. */
|
||||
if (window->useTabletAPI(GHOST_kTabletWintab) &&
|
||||
(window->m_tabletInRange || window->wintabSysButPressed()) &&
|
||||
processWintabEvent(type, window, mask, window->getMousePressed())) {
|
||||
/* Wintab processing only handles in-contact events. */
|
||||
return NULL;
|
||||
}
|
||||
/* Ensure button click occurs at its intended position. */
|
||||
DWORD msgPos = ::GetMessagePos();
|
||||
GHOST_TInt32 x_screen = GET_X_LPARAM(msgPos), y_screen = GET_Y_LPARAM(msgPos);
|
||||
system->pushEvent(new GHOST_EventCursor(
|
||||
system->getMilliSeconds(), GHOST_kEventCursorMove, window, x_screen, y_screen, td));
|
||||
|
||||
return new GHOST_EventButton(
|
||||
system->getMilliSeconds(), type, window, mask, GHOST_TABLET_DATA_NONE);
|
||||
window->updateMouseCapture(type == GHOST_kEventButtonDown ? MousePressed : MouseReleased);
|
||||
return new GHOST_EventButton(system->getMilliSeconds(), type, window, mask, td);
|
||||
}
|
||||
|
||||
GHOST_TSuccess GHOST_SystemWin32::processWintabEvent(GHOST_TEventType type,
|
||||
GHOST_WindowWin32 *window,
|
||||
GHOST_TButtonMask mask,
|
||||
bool mousePressed)
|
||||
void GHOST_SystemWin32::processWintabEvent(GHOST_WindowWin32 *window)
|
||||
{
|
||||
GHOST_SystemWin32 *system = (GHOST_SystemWin32 *)getSystem();
|
||||
|
||||
/* Only process Wintab packets if we can correlate them to a Window's mouse button event. When a
|
||||
* button event associated to a mouse button by Wintab occurs outside of WM_*BUTTON events,
|
||||
* there's no way to tell if other simultaneously pressed non-mouse mapped buttons are associated
|
||||
* to a modifier key (shift, alt, ctrl) or a system event (scroll, etc.) and thus it is not
|
||||
* possible to determine if a mouse click event should occur. */
|
||||
if (!mousePressed && !window->wintabSysButPressed()) {
|
||||
return GHOST_kFailure;
|
||||
}
|
||||
|
||||
std::vector<GHOST_WintabInfoWin32> wintabInfo;
|
||||
if (!window->getWintabInfo(wintabInfo)) {
|
||||
return GHOST_kFailure;
|
||||
return;
|
||||
}
|
||||
|
||||
auto wtiIter = wintabInfo.begin();
|
||||
|
||||
/* We only process events that correlate to a mouse button events, so there may exist Wintab
|
||||
* button down events that were instead mapped to e.g. scroll still in the queue. We need to
|
||||
* skip those and find the last button down mapped to mouse buttons. */
|
||||
if (!window->wintabSysButPressed()) {
|
||||
/* Assume there may be no button down event currently in the queue. */
|
||||
wtiIter = wintabInfo.end();
|
||||
|
||||
for (auto it = wintabInfo.begin(); it != wintabInfo.end(); it++) {
|
||||
if (it->type == GHOST_kEventButtonDown) {
|
||||
wtiIter = it;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool unhandledButton = type != GHOST_kEventCursorMove;
|
||||
|
||||
for (; wtiIter != wintabInfo.end(); wtiIter++) {
|
||||
auto info = *wtiIter;
|
||||
|
||||
for (auto info : wintabInfo) {
|
||||
switch (info.type) {
|
||||
case GHOST_kEventButtonDown: {
|
||||
/* While changing windows with a tablet, Window's mouse button events normally occur before
|
||||
* tablet proximity events, so a button up event can't be differentiated as occurring from
|
||||
* a Wintab tablet or a normal mouse and a Ghost button event will always be generated.
|
||||
*
|
||||
* If we were called during a button down event create a ghost button down event, otherwise
|
||||
* don't duplicate the prior button down as it interrupts drawing immediately after
|
||||
* changing a window. */
|
||||
case GHOST_kEventCursorMove: {
|
||||
system->pushEvent(new GHOST_EventCursor(
|
||||
info.time, GHOST_kEventCursorMove, window, info.x, info.y, info.tabletData));
|
||||
if (type == GHOST_kEventButtonDown && mask == info.button) {
|
||||
break;
|
||||
}
|
||||
case GHOST_kEventButtonDown: {
|
||||
system->pushEvent(new GHOST_EventCursor(
|
||||
info.time, GHOST_kEventCursorMove, window, info.x, info.y, info.tabletData));
|
||||
|
||||
UINT message;
|
||||
switch (info.button) {
|
||||
case GHOST_kButtonMaskLeft:
|
||||
message = WM_LBUTTONDOWN;
|
||||
break;
|
||||
case GHOST_kButtonMaskRight:
|
||||
message = WM_RBUTTONDOWN;
|
||||
break;
|
||||
case GHOST_kButtonMaskMiddle:
|
||||
message = WM_MBUTTONDOWN;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
|
||||
MSG msg;
|
||||
if (PeekMessage(&msg, window->getHWND(), message, message, PM_REMOVE | PM_NOYIELD) &&
|
||||
WM_QUIT != msg.message) {
|
||||
window->updateMouseCapture(MousePressed);
|
||||
system->pushEvent(
|
||||
new GHOST_EventButton(info.time, info.type, window, info.button, info.tabletData));
|
||||
unhandledButton = false;
|
||||
}
|
||||
window->updateWintabSysBut(MousePressed);
|
||||
break;
|
||||
}
|
||||
case GHOST_kEventCursorMove:
|
||||
system->pushEvent(new GHOST_EventCursor(
|
||||
info.time, GHOST_kEventCursorMove, window, info.x, info.y, info.tabletData));
|
||||
break;
|
||||
case GHOST_kEventButtonUp:
|
||||
system->pushEvent(
|
||||
new GHOST_EventButton(info.time, info.type, window, info.button, info.tabletData));
|
||||
if (type == GHOST_kEventButtonUp && mask == info.button) {
|
||||
unhandledButton = false;
|
||||
case GHOST_kEventButtonUp: {
|
||||
UINT message;
|
||||
switch (info.button) {
|
||||
case GHOST_kButtonMaskLeft:
|
||||
message = WM_LBUTTONUP;
|
||||
break;
|
||||
case GHOST_kButtonMaskRight:
|
||||
message = WM_RBUTTONUP;
|
||||
break;
|
||||
case GHOST_kButtonMaskMiddle:
|
||||
message = WM_MBUTTONUP;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
|
||||
MSG msg;
|
||||
if (PeekMessage(&msg, window->getHWND(), message, message, PM_REMOVE | PM_NOYIELD) &&
|
||||
WM_QUIT != msg.message) {
|
||||
window->updateMouseCapture(MouseReleased);
|
||||
system->pushEvent(
|
||||
new GHOST_EventButton(info.time, info.type, window, info.button, info.tabletData));
|
||||
}
|
||||
window->updateWintabSysBut(MouseReleased);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* No Wintab button found correlating to the system button event, handle it too.
|
||||
*
|
||||
* Wintab button up events may be handled during WM_MOUSEMOVE, before their corresponding
|
||||
* WM_*BUTTONUP event has fired, which results in two GHOST Button up events for a single Wintab
|
||||
* associated button event. Alternatively this Windows button up event may have been generated
|
||||
* from a non-stylus device such as a button on the tablet pad and needs to be handled for some
|
||||
* workflows.
|
||||
*
|
||||
* The ambiguity introduced by Windows and Wintab buttons being asynchronous and having no
|
||||
* definitive way to associate each, and that the Wintab API does not provide enough information
|
||||
* to differentiate whether the stylus down is or is not modified by another button to a
|
||||
* non-mouse mapping, means that we must pessimistically generate mouse up events when we are
|
||||
* unsure of an association to prevent the mouse locking into a down state. */
|
||||
if (unhandledButton) {
|
||||
if (!window->wintabSysButPressed()) {
|
||||
GHOST_TInt32 x, y;
|
||||
system->getCursorPosition(x, y);
|
||||
system->pushEvent(new GHOST_EventCursor(system->getMilliSeconds(),
|
||||
GHOST_kEventCursorMove,
|
||||
window,
|
||||
x,
|
||||
y,
|
||||
GHOST_TABLET_DATA_NONE));
|
||||
}
|
||||
system->pushEvent(new GHOST_EventButton(
|
||||
system->getMilliSeconds(), type, window, mask, GHOST_TABLET_DATA_NONE));
|
||||
}
|
||||
|
||||
return GHOST_kSuccess;
|
||||
}
|
||||
|
||||
void GHOST_SystemWin32::processPointerEvent(
|
||||
UINT type, GHOST_WindowWin32 *window, WPARAM wParam, LPARAM lParam, bool &eventHandled)
|
||||
{
|
||||
std::vector<GHOST_PointerInfoWin32> pointerInfo;
|
||||
GHOST_SystemWin32 *system = (GHOST_SystemWin32 *)getSystem();
|
||||
|
||||
/* Pointer events might fire when changing windows for a device which is set to use Wintab, even
|
||||
* when when Wintab is left enabled but set to the bottom of Wintab overlap order. */
|
||||
if (!window->useTabletAPI(GHOST_kTabletNative)) {
|
||||
return;
|
||||
}
|
||||
|
||||
GHOST_SystemWin32 *system = (GHOST_SystemWin32 *)getSystem();
|
||||
std::vector<GHOST_PointerInfoWin32> pointerInfo;
|
||||
|
||||
if (window->getPointerInfo(pointerInfo, wParam, lParam) != GHOST_kSuccess) {
|
||||
return;
|
||||
}
|
||||
|
@ -1148,36 +1106,16 @@ void GHOST_SystemWin32::processPointerEvent(
|
|||
|
||||
GHOST_EventCursor *GHOST_SystemWin32::processCursorEvent(GHOST_WindowWin32 *window)
|
||||
{
|
||||
GHOST_TInt32 x_screen, y_screen;
|
||||
GHOST_SystemWin32 *system = (GHOST_SystemWin32 *)getSystem();
|
||||
|
||||
GHOST_TabletData tabletData = GHOST_TABLET_DATA_NONE;
|
||||
|
||||
if (window->m_tabletInRange || window->wintabSysButPressed()) {
|
||||
if (window->useTabletAPI(GHOST_kTabletWintab) &&
|
||||
processWintabEvent(
|
||||
GHOST_kEventCursorMove, window, GHOST_kButtonMaskNone, window->getMousePressed())) {
|
||||
return NULL;
|
||||
}
|
||||
else if (window->useTabletAPI(GHOST_kTabletNative)) {
|
||||
/* Tablet input handled in WM_POINTER* events. WM_MOUSEMOVE events in response to tablet
|
||||
* input aren't normally generated when using WM_POINTER events, but manually moving the
|
||||
* system cursor as we do in WM_POINTER handling does. */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* If using Wintab but no button event is currently active, fall through to default handling.
|
||||
*
|
||||
* Populate tablet data so that cursor is recognized as an absolute position device. */
|
||||
tabletData.Active = GHOST_kTabletModeStylus;
|
||||
tabletData.Pressure = 0.0f;
|
||||
tabletData.Xtilt = 0.0f;
|
||||
tabletData.Ytilt = 0.0f;
|
||||
if (window->m_tabletInRange) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GHOST_SystemWin32 *system = (GHOST_SystemWin32 *)getSystem();
|
||||
GHOST_TInt32 x_screen, y_screen;
|
||||
|
||||
system->getCursorPosition(x_screen, y_screen);
|
||||
|
||||
if (window->getCursorGrabModeIsWarp() && !window->m_tabletInRange) {
|
||||
if (window->getCursorGrabModeIsWarp()) {
|
||||
GHOST_TInt32 x_new = x_screen;
|
||||
GHOST_TInt32 y_new = y_screen;
|
||||
GHOST_TInt32 x_accum, y_accum;
|
||||
|
@ -1205,12 +1143,16 @@ GHOST_EventCursor *GHOST_SystemWin32::processCursorEvent(GHOST_WindowWin32 *wind
|
|||
window,
|
||||
x_screen + x_accum,
|
||||
y_screen + y_accum,
|
||||
tabletData);
|
||||
GHOST_TABLET_DATA_NONE);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return new GHOST_EventCursor(
|
||||
system->getMilliSeconds(), GHOST_kEventCursorMove, window, x_screen, y_screen, tabletData);
|
||||
return new GHOST_EventCursor(system->getMilliSeconds(),
|
||||
GHOST_kEventCursorMove,
|
||||
window,
|
||||
x_screen,
|
||||
y_screen,
|
||||
GHOST_TABLET_DATA_NONE);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1320,6 +1262,23 @@ GHOST_EventKey *GHOST_SystemWin32::processKeyEvent(GHOST_WindowWin32 *window, RA
|
|||
return event;
|
||||
}
|
||||
|
||||
GHOST_Event *GHOST_SystemWin32::processWindowSizeEvent(GHOST_WindowWin32 *window)
|
||||
{
|
||||
GHOST_SystemWin32 *system = (GHOST_SystemWin32 *)getSystem();
|
||||
GHOST_Event *sizeEvent = new GHOST_Event(
|
||||
system->getMilliSeconds(), GHOST_kEventWindowSize, window);
|
||||
|
||||
/* We get WM_SIZE before we fully init. Do not dispatch before we are continuously resizing. */
|
||||
if (window->m_inLiveResize) {
|
||||
system->pushEvent(sizeEvent);
|
||||
system->dispatchEvents();
|
||||
return NULL;
|
||||
}
|
||||
else {
|
||||
return sizeEvent;
|
||||
}
|
||||
}
|
||||
|
||||
GHOST_Event *GHOST_SystemWin32::processWindowEvent(GHOST_TEventType type,
|
||||
GHOST_WindowWin32 *window)
|
||||
{
|
||||
|
@ -1359,12 +1318,10 @@ void GHOST_SystemWin32::setTabletAPI(GHOST_TTabletAPI api)
|
|||
GHOST_System::setTabletAPI(api);
|
||||
|
||||
GHOST_WindowManager *wm = getWindowManager();
|
||||
GHOST_WindowWin32 *activeWindow = (GHOST_WindowWin32 *)wm->getActiveWindow();
|
||||
|
||||
for (GHOST_IWindow *win : wm->getWindows()) {
|
||||
GHOST_WindowWin32 *windowsWindow = (GHOST_WindowWin32 *)win;
|
||||
windowsWindow->updateWintab(windowsWindow == activeWindow,
|
||||
!::IsIconic(windowsWindow->getHWND()));
|
||||
GHOST_WindowWin32 *windowWin32 = (GHOST_WindowWin32 *)win;
|
||||
windowWin32->setWintabEnabled(windowWin32->useTabletAPI(GHOST_kTabletWintab));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1609,15 +1566,23 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
|
|||
////////////////////////////////////////////////////////////////////////
|
||||
case WT_INFOCHANGE: {
|
||||
window->processWintabInfoChangeEvent(lParam);
|
||||
eventHandled = true;
|
||||
break;
|
||||
}
|
||||
case WT_CSRCHANGE:
|
||||
window->updateWintabCursorInfo();
|
||||
eventHandled = true;
|
||||
break;
|
||||
case WT_PROXIMITY: {
|
||||
bool inRange = LOWORD(lParam);
|
||||
window->processWintabProximityEvent(inRange);
|
||||
if (window->useTabletAPI(GHOST_kTabletWintab)) {
|
||||
window->m_tabletInRange = LOWORD(lParam);
|
||||
}
|
||||
eventHandled = true;
|
||||
break;
|
||||
}
|
||||
case WT_PACKET:
|
||||
window->updateWintabEventsSyncTime();
|
||||
processWintabEvent(window);
|
||||
eventHandled = true;
|
||||
break;
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Pointer events, processed
|
||||
|
@ -1667,6 +1632,15 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
|
|||
}
|
||||
break;
|
||||
case WM_MOUSEMOVE:
|
||||
if (!window->m_mousePresent) {
|
||||
TRACKMOUSEEVENT tme = {sizeof(tme)};
|
||||
tme.dwFlags = TME_LEAVE;
|
||||
tme.hwndTrack = hwnd;
|
||||
TrackMouseEvent(&tme);
|
||||
window->m_mousePresent = true;
|
||||
window->setWintabOverlap(true);
|
||||
}
|
||||
|
||||
event = processCursorEvent(window);
|
||||
break;
|
||||
case WM_MOUSEWHEEL: {
|
||||
|
@ -1709,7 +1683,10 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
|
|||
window->loadCursor(true, GHOST_kStandardCursorDefault);
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_MOUSELEAVE:
|
||||
window->m_mousePresent = false;
|
||||
window->setWintabOverlap(false);
|
||||
break;
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Mouse events, ignored
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1725,7 +1702,6 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
|
|||
* is sent to the window that has captured the mouse.
|
||||
*/
|
||||
break;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Window events, processed
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1758,8 +1734,6 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
|
|||
if (LOWORD(wParam) == WA_INACTIVE)
|
||||
window->lostMouseCapture();
|
||||
|
||||
window->updateWintab(LOWORD(wParam) != WA_INACTIVE, !::IsIconic(window->getHWND()));
|
||||
|
||||
lResult = ::DefWindowProc(hwnd, msg, wParam, lParam);
|
||||
break;
|
||||
}
|
||||
|
@ -1801,6 +1775,8 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
|
|||
/* Let DefWindowProc handle it. */
|
||||
break;
|
||||
case WM_SIZING:
|
||||
event = processWindowSizeEvent(window);
|
||||
break;
|
||||
case WM_SIZE:
|
||||
/* The WM_SIZE message is sent to a window after its size has changed.
|
||||
* The WM_SIZE and WM_MOVE messages are not sent if an application handles the
|
||||
|
@ -1808,21 +1784,13 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
|
|||
* to perform any move or size change processing during the WM_WINDOWPOSCHANGED
|
||||
* message without calling DefWindowProc.
|
||||
*/
|
||||
/* we get first WM_SIZE before we fully init.
|
||||
* So, do not dispatch before we continuously resizing. */
|
||||
if (window->m_inLiveResize) {
|
||||
system->pushEvent(processWindowEvent(GHOST_kEventWindowSize, window));
|
||||
system->dispatchEvents();
|
||||
}
|
||||
else {
|
||||
event = processWindowEvent(GHOST_kEventWindowSize, window);
|
||||
}
|
||||
event = processWindowSizeEvent(window);
|
||||
|
||||
/* Window might be minimized while inactive. When a window is inactive but not minimized,
|
||||
* Wintab is left enabled (to catch the case where a pen is used to activate a window).
|
||||
* When an inactive window is minimized, we need to disable Wintab. */
|
||||
if (msg == WM_SIZE && wParam == SIZE_MINIMIZED) {
|
||||
window->updateWintab(false, false);
|
||||
if (wParam == SIZE_MINIMIZED) {
|
||||
window->setWintabEnabled(false);
|
||||
}
|
||||
else if (wParam == SIZE_MAXIMIZED || wParam == SIZE_RESTORED) {
|
||||
window->setWintabEnabled(true);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
@ -322,16 +322,9 @@ class GHOST_SystemWin32 : public GHOST_System {
|
|||
|
||||
/**
|
||||
* Creates tablet events from Wintab events.
|
||||
* \param type: The type of pointer event.
|
||||
* \param window: The window receiving the event (the active window).
|
||||
* \param mask: The button mask of the calling event.
|
||||
* \param mousePressed: Whether the mouse is currently pressed.
|
||||
* \return True if the method handled the event.
|
||||
*/
|
||||
static GHOST_TSuccess processWintabEvent(GHOST_TEventType type,
|
||||
GHOST_WindowWin32 *window,
|
||||
GHOST_TButtonMask mask,
|
||||
bool mousePressed);
|
||||
static void processWintabEvent(GHOST_WindowWin32 *window);
|
||||
|
||||
/**
|
||||
* Creates tablet events from pointer events.
|
||||
|
@ -376,6 +369,13 @@ class GHOST_SystemWin32 : public GHOST_System {
|
|||
*/
|
||||
GHOST_TKey processSpecialKey(short vKey, short scanCode) const;
|
||||
|
||||
/**
|
||||
* Creates a window size event.
|
||||
* \param window: The window receiving the event (the active window).
|
||||
* \return The event created.
|
||||
*/
|
||||
static GHOST_Event *processWindowSizeEvent(GHOST_WindowWin32 *window);
|
||||
|
||||
/**
|
||||
* Creates a window event.
|
||||
* \param type: The type of event to create.
|
||||
|
|
|
@ -72,6 +72,7 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system,
|
|||
bool is_debug,
|
||||
bool dialog)
|
||||
: GHOST_Window(width, height, state, wantStereoVisual, false),
|
||||
m_mousePresent(false),
|
||||
m_tabletInRange(false),
|
||||
m_inLiveResize(false),
|
||||
m_system(system),
|
||||
|
@ -309,8 +310,7 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system,
|
|||
(m_wintab.enable = (GHOST_WIN32_WTEnable)::GetProcAddress(m_wintab.handle, "WTEnable")) &&
|
||||
(m_wintab.overlap = (GHOST_WIN32_WTOverlap)::GetProcAddress(m_wintab.handle, "WTOverlap"))) {
|
||||
initializeWintab();
|
||||
// Determine which tablet API to use and enable it.
|
||||
updateWintab(m_system->m_windowFocus, m_system->m_windowFocus);
|
||||
setWintabEnabled(true);
|
||||
}
|
||||
|
||||
CoCreateInstance(
|
||||
|
@ -326,13 +326,12 @@ GHOST_WindowWin32::~GHOST_WindowWin32()
|
|||
}
|
||||
|
||||
if (m_wintab.handle) {
|
||||
updateWintab(false, false);
|
||||
setWintabEnabled(false);
|
||||
if (m_wintab.close && m_wintab.context) {
|
||||
m_wintab.close(m_wintab.context);
|
||||
}
|
||||
|
||||
FreeLibrary(m_wintab.handle);
|
||||
memset(&m_wintab, 0, sizeof(m_wintab));
|
||||
}
|
||||
|
||||
if (m_user32) {
|
||||
|
@ -771,32 +770,6 @@ void GHOST_WindowWin32::updateMouseCapture(GHOST_MouseCaptureEventWin32 event)
|
|||
}
|
||||
}
|
||||
|
||||
bool GHOST_WindowWin32::getMousePressed() const
|
||||
{
|
||||
return m_nPressedButtons;
|
||||
}
|
||||
|
||||
bool GHOST_WindowWin32::wintabSysButPressed() const
|
||||
{
|
||||
return m_wintab.numSysButtons;
|
||||
}
|
||||
|
||||
void GHOST_WindowWin32::updateWintabSysBut(GHOST_MouseCaptureEventWin32 event)
|
||||
{
|
||||
switch (event) {
|
||||
case MousePressed:
|
||||
m_wintab.numSysButtons++;
|
||||
break;
|
||||
case MouseReleased:
|
||||
if (m_wintab.numSysButtons)
|
||||
m_wintab.numSysButtons--;
|
||||
break;
|
||||
case OperatorGrab:
|
||||
case OperatorUngrab:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
HCURSOR GHOST_WindowWin32::getStandardCursor(GHOST_TStandardCursor shape) const
|
||||
{
|
||||
// Convert GHOST cursor to Windows OEM cursor
|
||||
|
@ -1000,28 +973,6 @@ GHOST_TSuccess GHOST_WindowWin32::hasCursorShape(GHOST_TStandardCursor cursorSha
|
|||
return (getStandardCursor(cursorShape)) ? GHOST_kSuccess : GHOST_kFailure;
|
||||
}
|
||||
|
||||
void GHOST_WindowWin32::updateWintab(bool active, bool visible)
|
||||
{
|
||||
if (m_wintab.enable && m_wintab.overlap && m_wintab.context) {
|
||||
bool enable = useTabletAPI(GHOST_kTabletWintab) && visible;
|
||||
bool overlap = enable && active;
|
||||
|
||||
/* Disabling context while the Window is not minimized can cause issues on receiving Wintab
|
||||
* input while changing a window for some drivers, so only disable if either Wintab had been
|
||||
* disabled or the window is minimized. */
|
||||
m_wintab.enable(m_wintab.context, enable);
|
||||
m_wintab.overlap(m_wintab.context, overlap);
|
||||
|
||||
if (!overlap) {
|
||||
/* WT_PROXIMITY event doesn't occur unless tablet's cursor leaves the proximity while the
|
||||
* window is active. */
|
||||
m_tabletInRange = false;
|
||||
m_wintab.numSysButtons = 0;
|
||||
m_wintab.sysButtonsPressed = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GHOST_WindowWin32::initializeWintab()
|
||||
{
|
||||
/* Return if wintab library handle doesn't exist or wintab is already initialized. */
|
||||
|
@ -1034,8 +985,6 @@ void GHOST_WindowWin32::initializeWintab()
|
|||
if (m_wintab.open && m_wintab.info && m_wintab.queueSizeGet && m_wintab.queueSizeSet &&
|
||||
m_wintab.info(WTI_DEFSYSCTX, 0, &lc)) {
|
||||
|
||||
/* The pressure and orientation (tilt) */
|
||||
AXIS Pressure, Orientation[3];
|
||||
lc.lcPktData = PACKETDATA;
|
||||
lc.lcPktMode = PACKETMODE;
|
||||
lc.lcMoveMask = PACKETDATA;
|
||||
|
@ -1046,19 +995,7 @@ void GHOST_WindowWin32::initializeWintab()
|
|||
|
||||
m_wintab.info(WTI_INTERFACE, IFC_NDEVICES, &m_wintab.numDevices);
|
||||
|
||||
BOOL pressureSupport = m_wintab.info(WTI_DEVICES, DVC_NPRESSURE, &Pressure);
|
||||
m_wintab.maxPressure = pressureSupport ? Pressure.axMax : 0;
|
||||
|
||||
BOOL tiltSupport = m_wintab.info(WTI_DEVICES, DVC_ORIENTATION, &Orientation);
|
||||
/* Does the tablet support azimuth ([0]) and altitude ([1])? */
|
||||
if (tiltSupport && Orientation[0].axResolution && Orientation[1].axResolution) {
|
||||
/* All this assumes the minimum is 0. */
|
||||
m_wintab.maxAzimuth = Orientation[0].axMax;
|
||||
m_wintab.maxAltitude = Orientation[1].axMax;
|
||||
}
|
||||
else { /* No so dont do tilt stuff. */
|
||||
m_wintab.maxAzimuth = m_wintab.maxAltitude = 0;
|
||||
}
|
||||
updateWintabCursorInfo();
|
||||
|
||||
/* The Wintab spec says we must open the context disabled if we are using cursor masks. */
|
||||
m_wintab.context = m_wintab.open(m_hWnd, &lc, FALSE);
|
||||
|
@ -1171,9 +1108,63 @@ GHOST_TSuccess GHOST_WindowWin32::getPointerInfo(
|
|||
}
|
||||
}
|
||||
|
||||
if (!outPointerInfo.empty()) {
|
||||
lastTabletData = outPointerInfo.back().tabletData;
|
||||
}
|
||||
|
||||
return GHOST_kSuccess;
|
||||
}
|
||||
|
||||
void GHOST_WindowWin32::setWintabEnabled(bool enable)
|
||||
{
|
||||
if (m_wintab.enable && m_wintab.get && m_wintab.context) {
|
||||
LOGCONTEXT context = {0};
|
||||
|
||||
if (m_wintab.get(m_wintab.context, &context)) {
|
||||
if (enable && context.lcStatus & CXS_DISABLED && useTabletAPI(GHOST_kTabletWintab)) {
|
||||
m_wintab.enable(m_wintab.context, true);
|
||||
|
||||
POINT cursorPos;
|
||||
::GetCursorPos(&cursorPos);
|
||||
GHOST_Rect bounds;
|
||||
getClientBounds(bounds);
|
||||
if (bounds.isInside(cursorPos.x, cursorPos.y)) {
|
||||
setWintabOverlap(true);
|
||||
}
|
||||
}
|
||||
else if (!enable && !(context.lcStatus & CXS_DISABLED)) {
|
||||
setWintabOverlap(false);
|
||||
m_wintab.enable(m_wintab.context, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GHOST_WindowWin32::setWintabOverlap(bool overlap)
|
||||
{
|
||||
if (m_wintab.overlap && m_wintab.get && m_wintab.packetsGet && m_wintab.context) {
|
||||
LOGCONTEXT context = {0};
|
||||
|
||||
if (m_wintab.get(m_wintab.context, &context)) {
|
||||
if (overlap && context.lcStatus & CXS_OBSCURED && useTabletAPI(GHOST_kTabletWintab)) {
|
||||
m_wintab.overlap(m_wintab.context, true);
|
||||
}
|
||||
else if (!overlap && context.lcStatus & CXS_ONTOP) {
|
||||
m_wintab.overlap(m_wintab.context, false);
|
||||
|
||||
/* If context is disabled, Windows Ink may be active and managing m_tabletInRange. Don't
|
||||
* modify it. */
|
||||
if (!(context.lcStatus & CXS_DISABLED)) {
|
||||
/* Set tablet as not in range, proximity event may not occur. */
|
||||
m_tabletInRange = false;
|
||||
/* Clear the packet queue. */
|
||||
m_wintab.packetsGet(m_wintab.context, m_wintab.pkts.size(), m_wintab.pkts.data());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GHOST_WindowWin32::processWintabDisplayChangeEvent()
|
||||
{
|
||||
LOGCONTEXT lc_sys = {0}, lc_curr = {0};
|
||||
|
@ -1207,48 +1198,38 @@ bool GHOST_WindowWin32::useTabletAPI(GHOST_TTabletAPI api) const
|
|||
}
|
||||
}
|
||||
|
||||
void GHOST_WindowWin32::processWintabProximityEvent(bool inRange)
|
||||
void GHOST_WindowWin32::updateWintabCursorInfo()
|
||||
{
|
||||
if (!useTabletAPI(GHOST_kTabletWintab)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Let's see if we can initialize tablet here
|
||||
if (m_wintab.info && m_wintab.context) {
|
||||
AXIS Pressure, Orientation[3]; /* The maximum tablet size */
|
||||
AXIS Pressure, Orientation[3];
|
||||
|
||||
BOOL pressureSupport = m_wintab.info(WTI_DEVICES, DVC_NPRESSURE, &Pressure);
|
||||
m_wintab.maxPressure = pressureSupport ? Pressure.axMax : 0;
|
||||
|
||||
BOOL tiltSupport = m_wintab.info(WTI_DEVICES, DVC_ORIENTATION, &Orientation);
|
||||
/* does the tablet support azimuth ([0]) and altitude ([1]) */
|
||||
/* Does the tablet support azimuth ([0]) and altitude ([1]). */
|
||||
if (tiltSupport && Orientation[0].axResolution && Orientation[1].axResolution) {
|
||||
m_wintab.maxAzimuth = Orientation[0].axMax;
|
||||
m_wintab.maxAltitude = Orientation[1].axMax;
|
||||
}
|
||||
else { /* no so dont do tilt stuff */
|
||||
else {
|
||||
m_wintab.maxAzimuth = m_wintab.maxAltitude = 0;
|
||||
}
|
||||
}
|
||||
|
||||
m_tabletInRange = inRange;
|
||||
}
|
||||
|
||||
void GHOST_WindowWin32::processWintabInfoChangeEvent(LPARAM lParam)
|
||||
{
|
||||
GHOST_SystemWin32 *system = (GHOST_SystemWin32 *)GHOST_System::getSystem();
|
||||
|
||||
// Update number of connected Wintab digitizers
|
||||
/* Update number of connected Wintab digitizers */
|
||||
if (LOWORD(lParam) == WTI_INTERFACE && HIWORD(lParam) == IFC_NDEVICES) {
|
||||
m_wintab.info(WTI_INTERFACE, IFC_NDEVICES, &m_wintab.numDevices);
|
||||
updateWintab((GHOST_WindowWin32 *)system->getWindowManager()->getActiveWindow() == this,
|
||||
!::IsIconic(m_hWnd));
|
||||
if (useTabletAPI(GHOST_kTabletWintab)) {
|
||||
setWintabEnabled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GHOST_TSuccess GHOST_WindowWin32::wintabMouseToGhost(UINT cursor,
|
||||
WORD physicalButton,
|
||||
GHOST_TButtonMask &ghostButton)
|
||||
GHOST_TButtonMask GHOST_WindowWin32::wintabMouseToGhost(UINT cursor, WORD physicalButton)
|
||||
{
|
||||
const WORD numButtons = 32;
|
||||
BYTE logicalButtons[numButtons] = {0};
|
||||
|
@ -1258,198 +1239,120 @@ GHOST_TSuccess GHOST_WindowWin32::wintabMouseToGhost(UINT cursor,
|
|||
m_wintab.info(WTI_CURSORS + cursor, CSR_SYSBTNMAP, &systemButtons);
|
||||
|
||||
if (physicalButton >= numButtons) {
|
||||
return GHOST_kFailure;
|
||||
return GHOST_kButtonMaskNone;
|
||||
}
|
||||
BYTE lb = logicalButtons[physicalButton];
|
||||
|
||||
if (lb >= numButtons) {
|
||||
return GHOST_kFailure;
|
||||
return GHOST_kButtonMaskNone;
|
||||
}
|
||||
switch (systemButtons[lb]) {
|
||||
case SBN_LCLICK:
|
||||
ghostButton = GHOST_kButtonMaskLeft;
|
||||
return GHOST_kSuccess;
|
||||
return GHOST_kButtonMaskLeft;
|
||||
case SBN_RCLICK:
|
||||
ghostButton = GHOST_kButtonMaskRight;
|
||||
return GHOST_kSuccess;
|
||||
return GHOST_kButtonMaskRight;
|
||||
case SBN_MCLICK:
|
||||
ghostButton = GHOST_kButtonMaskMiddle;
|
||||
return GHOST_kSuccess;
|
||||
return GHOST_kButtonMaskMiddle;
|
||||
default:
|
||||
return GHOST_kFailure;
|
||||
return GHOST_kButtonMaskNone;
|
||||
}
|
||||
}
|
||||
|
||||
GHOST_TSuccess GHOST_WindowWin32::getWintabInfo(std::vector<GHOST_WintabInfoWin32> &outWintabInfo)
|
||||
{
|
||||
if (!useTabletAPI(GHOST_kTabletWintab)) {
|
||||
return GHOST_kFailure;
|
||||
}
|
||||
|
||||
if (!(m_wintab.packetsGet && m_wintab.context)) {
|
||||
if (!(useTabletAPI(GHOST_kTabletWintab) && m_wintab.packetsGet && m_wintab.context)) {
|
||||
return GHOST_kFailure;
|
||||
}
|
||||
|
||||
GHOST_SystemWin32 *system = (GHOST_SystemWin32 *)GHOST_System::getSystem();
|
||||
|
||||
updateWintabEvents();
|
||||
const int numPackets = m_wintab.packetsGet(
|
||||
m_wintab.context, m_wintab.pkts.size(), m_wintab.pkts.data());
|
||||
outWintabInfo.resize(numPackets);
|
||||
|
||||
auto &pendingEvents = m_wintab.pendingEvents;
|
||||
size_t pendingEventSize = pendingEvents.size();
|
||||
outWintabInfo.resize(pendingEventSize);
|
||||
for (int i = 0; i < numPackets; i++) {
|
||||
PACKET pkt = m_wintab.pkts[i];
|
||||
GHOST_WintabInfoWin32 &out = outWintabInfo[i];
|
||||
|
||||
for (int i = 0; i < pendingEventSize; i++) {
|
||||
PACKET pkt = pendingEvents.front();
|
||||
pendingEvents.pop();
|
||||
|
||||
GHOST_TabletData tabletData = GHOST_TABLET_DATA_NONE;
|
||||
switch (pkt.pkCursor % 3) { /* % 3 for multiple devices ("DualTrack") */
|
||||
out.tabletData = GHOST_TABLET_DATA_NONE;
|
||||
/* % 3 for multiple devices ("DualTrack"). */
|
||||
switch (pkt.pkCursor % 3) {
|
||||
case 0:
|
||||
tabletData.Active = GHOST_kTabletModeNone; /* puck - not yet supported */
|
||||
/* Puck - processed as mouse. */
|
||||
out.tabletData.Active = GHOST_kTabletModeNone;
|
||||
break;
|
||||
case 1:
|
||||
tabletData.Active = GHOST_kTabletModeStylus; /* stylus */
|
||||
out.tabletData.Active = GHOST_kTabletModeStylus;
|
||||
break;
|
||||
case 2:
|
||||
tabletData.Active = GHOST_kTabletModeEraser; /* eraser */
|
||||
out.tabletData.Active = GHOST_kTabletModeEraser;
|
||||
break;
|
||||
}
|
||||
|
||||
out.x = pkt.pkX;
|
||||
out.y = pkt.pkY;
|
||||
|
||||
if (m_wintab.maxPressure > 0) {
|
||||
tabletData.Pressure = (float)pkt.pkNormalPressure / (float)m_wintab.maxPressure;
|
||||
out.tabletData.Pressure = (float)pkt.pkNormalPressure / (float)m_wintab.maxPressure;
|
||||
}
|
||||
|
||||
if ((m_wintab.maxAzimuth > 0) && (m_wintab.maxAltitude > 0)) {
|
||||
ORIENTATION ort = pkt.pkOrientation;
|
||||
float vecLen;
|
||||
float altRad, azmRad; /* in radians */
|
||||
float altRad, azmRad; /* In radians. */
|
||||
|
||||
/*
|
||||
* from the wintab spec:
|
||||
* orAzimuth Specifies the clockwise rotation of the
|
||||
* cursor about the z axis through a full circular range.
|
||||
* From the wintab spec:
|
||||
* orAzimuth: Specifies the clockwise rotation of the cursor about the z axis through a
|
||||
* full circular range.
|
||||
* orAltitude: Specifies the angle with the x-y plane through a signed, semicircular range.
|
||||
* Positive values specify an angle upward toward the positive z axis; negative values
|
||||
* specify an angle downward toward the negative z axis.
|
||||
*
|
||||
* orAltitude Specifies the angle with the x-y plane
|
||||
* through a signed, semicircular range. Positive values
|
||||
* specify an angle upward toward the positive z axis;
|
||||
* negative values specify an angle downward toward the negative z axis.
|
||||
*
|
||||
* wintab.h defines .orAltitude as a UINT but documents .orAltitude
|
||||
* as positive for upward angles and negative for downward angles.
|
||||
* WACOM uses negative altitude values to show that the pen is inverted;
|
||||
* therefore we cast .orAltitude as an (int) and then use the absolute value.
|
||||
* wintab.h defines orAltitude as a UINT but documents orAltitude as positive for upward
|
||||
* angles and negative for downward angles. WACOM uses negative altitude values to show that
|
||||
* the pen is inverted; therefore we cast orAltitude as an (int) and then use the absolute
|
||||
* value.
|
||||
*/
|
||||
|
||||
/* convert raw fixed point data to radians */
|
||||
/* Convert raw fixed point data to radians. */
|
||||
altRad = (float)((fabs((float)ort.orAltitude) / (float)m_wintab.maxAltitude) * M_PI / 2.0);
|
||||
azmRad = (float)(((float)ort.orAzimuth / (float)m_wintab.maxAzimuth) * M_PI * 2.0);
|
||||
|
||||
/* find length of the stylus' projected vector on the XY plane */
|
||||
/* Find length of the stylus' projected vector on the XY plane. */
|
||||
vecLen = cos(altRad);
|
||||
|
||||
/* from there calculate X and Y components based on azimuth */
|
||||
tabletData.Xtilt = sin(azmRad) * vecLen;
|
||||
tabletData.Ytilt = (float)(sin(M_PI / 2.0 - azmRad) * vecLen);
|
||||
/* From there calculate X and Y components based on azimuth. */
|
||||
out.tabletData.Xtilt = sin(azmRad) * vecLen;
|
||||
out.tabletData.Ytilt = (float)(sin(M_PI / 2.0 - azmRad) * vecLen);
|
||||
}
|
||||
|
||||
outWintabInfo[i].x = pkt.pkX;
|
||||
outWintabInfo[i].y = pkt.pkY;
|
||||
|
||||
/* Some Wintab libraries don't handle relative button input correctly, so we track button
|
||||
* presses manually. Examples include Wacom's Bamboo modifying button events in the queue when
|
||||
* peeked, or missing events when entering the window when the context is not on top. */
|
||||
DWORD buttonsChanged = m_wintab.sysButtonsPressed ^ pkt.pkButtons;
|
||||
|
||||
/* Find the index for the changed button from the button map. */
|
||||
WORD physicalButton = 0;
|
||||
for (DWORD diff = (unsigned)buttonsChanged >> 1; diff > 0; diff = (unsigned)diff >> 1) {
|
||||
physicalButton++;
|
||||
out.button = wintabMouseToGhost(pkt.pkCursor, LOWORD(pkt.pkButtons));
|
||||
switch (HIWORD(pkt.pkButtons)) {
|
||||
case TBN_NONE:
|
||||
out.type = GHOST_kEventCursorMove;
|
||||
break;
|
||||
case TBN_DOWN:
|
||||
out.type = GHOST_kEventButtonDown;
|
||||
break;
|
||||
case TBN_UP:
|
||||
out.type = GHOST_kEventButtonUp;
|
||||
break;
|
||||
}
|
||||
|
||||
if (buttonsChanged &&
|
||||
wintabMouseToGhost(pkt.pkCursor, physicalButton, outWintabInfo[i].button)) {
|
||||
if (buttonsChanged & pkt.pkButtons) {
|
||||
outWintabInfo[i].type = GHOST_kEventButtonDown;
|
||||
}
|
||||
else {
|
||||
outWintabInfo[i].type = GHOST_kEventButtonUp;
|
||||
}
|
||||
}
|
||||
else {
|
||||
outWintabInfo[i].type = GHOST_kEventCursorMove;
|
||||
}
|
||||
out.time = system->tickCountToMillis(pkt.pkTime);
|
||||
}
|
||||
|
||||
m_wintab.sysButtonsPressed = pkt.pkButtons;
|
||||
|
||||
outWintabInfo[i].time = system->millisSinceStart(pkt.pkTime);
|
||||
outWintabInfo[i].tabletData = tabletData;
|
||||
if (!outWintabInfo.empty()) {
|
||||
lastTabletData = outWintabInfo.back().tabletData;
|
||||
}
|
||||
|
||||
return GHOST_kSuccess;
|
||||
}
|
||||
|
||||
void GHOST_WindowWin32::updateWintabEvents()
|
||||
GHOST_TabletData GHOST_WindowWin32::getLastTabletData()
|
||||
{
|
||||
readWintabEvents();
|
||||
// When a Wintab device is used to leave window focus, some of it's packets are periodically not
|
||||
// queued in time to be flushed. Reading packets needs to occur before expiring packets to clear
|
||||
// these from the queue.
|
||||
expireWintabEvents();
|
||||
}
|
||||
|
||||
void GHOST_WindowWin32::updateWintabEventsSyncTime()
|
||||
{
|
||||
readWintabEvents();
|
||||
|
||||
if (!m_wintab.pendingEvents.empty()) {
|
||||
auto lastEvent = m_wintab.pendingEvents.back();
|
||||
m_wintab.sysTimeOffset = ::GetTickCount() - lastEvent.pkTime;
|
||||
}
|
||||
|
||||
expireWintabEvents();
|
||||
}
|
||||
|
||||
void GHOST_WindowWin32::readWintabEvents()
|
||||
{
|
||||
if (!(m_wintab.packetsGet && m_wintab.context)) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto &pendingEvents = m_wintab.pendingEvents;
|
||||
|
||||
/* Get new packets. */
|
||||
const int numPackets = m_wintab.packetsGet(
|
||||
m_wintab.context, m_wintab.pkts.size(), m_wintab.pkts.data());
|
||||
|
||||
for (int i = 0; i < numPackets; i++) {
|
||||
pendingEvents.push(m_wintab.pkts[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/* Wintab (per documentation but may vary with implementation) does not update when its event
|
||||
* buffer is full. This is an issue because we need some synchronization point between Wintab
|
||||
* events and Win32 events, so we can't drain and process the queue immediately. We need to
|
||||
* associate Wintab mouse events to Win32 mouse events because Wintab buttons are modal (a button
|
||||
* associated to left click is not always a left click) and there's no way to reconstruct their
|
||||
* mode from the Wintab API alone. There is no guaranteed ordering between Wintab and Win32 mouse
|
||||
* events and no documented time stamp shared between the two, so we synchronize on mouse button
|
||||
* events. */
|
||||
void GHOST_WindowWin32::expireWintabEvents()
|
||||
{
|
||||
auto &pendingEvents = m_wintab.pendingEvents;
|
||||
|
||||
DWORD currTime = ::GetTickCount() - m_wintab.sysTimeOffset;
|
||||
DWORD millisTimeout = 300;
|
||||
while (!pendingEvents.empty()) {
|
||||
DWORD pkTime = pendingEvents.front().pkTime;
|
||||
|
||||
if (currTime > pkTime + millisTimeout) {
|
||||
pendingEvents.pop();
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return lastTabletData;
|
||||
}
|
||||
|
||||
GHOST_TUns16 GHOST_WindowWin32::getDPIHint()
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
// PACKETDATA and PACKETMODE modify structs in pktdef.h, so make sure they come first
|
||||
#define PACKETDATA \
|
||||
(PK_BUTTONS | PK_NORMAL_PRESSURE | PK_ORIENTATION | PK_CURSOR | PK_X | PK_Y | PK_TIME)
|
||||
#define PACKETMODE 0
|
||||
#define PACKETMODE PK_BUTTONS
|
||||
#include <pktdef.h>
|
||||
|
||||
class GHOST_SystemWin32;
|
||||
|
@ -437,13 +437,6 @@ class GHOST_WindowWin32 : public GHOST_Window {
|
|||
HCURSOR getStandardCursor(GHOST_TStandardCursor shape) const;
|
||||
void loadCursor(bool visible, GHOST_TStandardCursor cursorShape) const;
|
||||
|
||||
/**
|
||||
* Handle setup and switch between Wintab and Pointer APIs.
|
||||
* \param active: Whether the window is or will be in an active state.
|
||||
* \param visible: Whether the window is currently (or will be) visible).
|
||||
*/
|
||||
void updateWintab(bool active, bool visible);
|
||||
|
||||
/**
|
||||
* Query whether given tablet API should be used.
|
||||
* \param api: Tablet API to test.
|
||||
|
@ -461,16 +454,27 @@ class GHOST_WindowWin32 : public GHOST_Window {
|
|||
WPARAM wParam,
|
||||
LPARAM lParam);
|
||||
|
||||
/**
|
||||
* Enables or disables Wintab context.
|
||||
* \param enable: Whether the context should be enabled.
|
||||
*/
|
||||
void setWintabEnabled(bool enable);
|
||||
|
||||
/**
|
||||
* Changes Wintab context overlap.
|
||||
* \param overlap: Whether context should be brought to top of overlap order.
|
||||
*/
|
||||
void setWintabOverlap(bool overlap);
|
||||
|
||||
/**
|
||||
* Handle Wintab coordinate changes when DisplayChange events occur.
|
||||
*/
|
||||
void processWintabDisplayChangeEvent();
|
||||
|
||||
/**
|
||||
* Set tablet details when a cursor enters range.
|
||||
* \param inRange: Whether the Wintab device is in tracking range.
|
||||
* Updates cached Wintab properties for current cursor.
|
||||
*/
|
||||
void processWintabProximityEvent(bool inRange);
|
||||
void updateWintabCursorInfo();
|
||||
|
||||
/**
|
||||
* Handle Wintab info changes such as change in number of connected tablets.
|
||||
|
@ -486,14 +490,10 @@ class GHOST_WindowWin32 : public GHOST_Window {
|
|||
GHOST_TSuccess getWintabInfo(std::vector<GHOST_WintabInfoWin32> &outWintabInfo);
|
||||
|
||||
/**
|
||||
* Updates pending Wintab events and syncs Wintab time with OS time.
|
||||
* Get the most recent tablet data.
|
||||
* \return Most recent tablet data.
|
||||
*/
|
||||
void updateWintabEventsSyncTime();
|
||||
|
||||
/**
|
||||
* Updates pending Wintab events.
|
||||
*/
|
||||
void updateWintabEvents();
|
||||
GHOST_TabletData getLastTabletData();
|
||||
|
||||
GHOST_TSuccess beginFullScreen() const
|
||||
{
|
||||
|
@ -507,24 +507,8 @@ class GHOST_WindowWin32 : public GHOST_Window {
|
|||
|
||||
GHOST_TUns16 getDPIHint() override;
|
||||
|
||||
/**
|
||||
* Get whether there are currently any mouse buttons pressed.
|
||||
* \return True if there are any currently pressed mouse buttons.
|
||||
*/
|
||||
bool getMousePressed() const;
|
||||
|
||||
/**
|
||||
* Get if there are currently pressed Wintab buttons associated to a Windows mouse button press.
|
||||
* \return True if there are currently any pressed Wintab buttons associated to a Windows
|
||||
* mouse button press.
|
||||
*/
|
||||
bool wintabSysButPressed() const;
|
||||
|
||||
/**
|
||||
* Register a Wintab button has been associated to a Windows mouse button press.
|
||||
* \param event: Whether the button was pressed or released.
|
||||
*/
|
||||
void updateWintabSysBut(GHOST_MouseCaptureEventWin32 event);
|
||||
/** Whether the mouse is either over or captured by the window. */
|
||||
bool m_mousePresent;
|
||||
|
||||
/** Whether a tablet stylus is being tracked. */
|
||||
bool m_tabletInRange;
|
||||
|
@ -582,28 +566,28 @@ class GHOST_WindowWin32 : public GHOST_Window {
|
|||
int hotY,
|
||||
bool canInvertColor);
|
||||
|
||||
/** Pointer to system */
|
||||
/** Pointer to system. */
|
||||
GHOST_SystemWin32 *m_system;
|
||||
/** Pointer to COM IDropTarget implementor */
|
||||
/** Pointer to COM IDropTarget implementor. */
|
||||
GHOST_DropTargetWin32 *m_dropTarget;
|
||||
/** Window handle. */
|
||||
HWND m_hWnd;
|
||||
/** Device context handle. */
|
||||
HDC m_hDC;
|
||||
|
||||
/** Flag for if window has captured the mouse */
|
||||
/** Flag for if window has captured the mouse. */
|
||||
bool m_hasMouseCaptured;
|
||||
/** Flag if an operator grabs the mouse with WM_cursor_grab_enable/ungrab()
|
||||
* Multiple grabs must be released with a single ungrab */
|
||||
/** Flag if an operator grabs the mouse with WM_cursor_grab_enable/ungrab().
|
||||
* Multiple grabs must be released with a single ungrab. */
|
||||
bool m_hasGrabMouse;
|
||||
/** Count of number of pressed buttons */
|
||||
/** Count of number of pressed buttons. */
|
||||
int m_nPressedButtons;
|
||||
/** HCURSOR structure of the custom cursor */
|
||||
/** HCURSOR structure of the custom cursor. */
|
||||
HCURSOR m_customCursor;
|
||||
/** request GL context aith alpha channel */
|
||||
/** Request GL context aith alpha channel. */
|
||||
bool m_wantAlphaBackground;
|
||||
|
||||
/** ITaskbarList3 structure for progress bar*/
|
||||
/** ITaskbarList3 structure for progress bar. */
|
||||
ITaskbarList3 *m_Bar;
|
||||
|
||||
static const wchar_t *s_windowClassName;
|
||||
|
@ -626,42 +610,31 @@ class GHOST_WindowWin32 : public GHOST_Window {
|
|||
GHOST_WIN32_WTEnable enable = NULL;
|
||||
GHOST_WIN32_WTOverlap overlap = NULL;
|
||||
|
||||
/** Stores the Tablet context if detected Tablet features using WinTab.dll */
|
||||
/** Stores the Tablet context if detected Tablet features using WinTab.dll. */
|
||||
HCTX context = NULL;
|
||||
/** Number of connected Wintab digitizers */
|
||||
/** Number of connected Wintab digitizers. */
|
||||
UINT numDevices = 0;
|
||||
/** Number of cursors currently in contact mapped to system buttons */
|
||||
GHOST_TUns8 numSysButtons = 0;
|
||||
/** Cursors currently in contact mapped to system buttons */
|
||||
DWORD sysButtonsPressed = 0;
|
||||
DWORD sysTimeOffset = 0;
|
||||
LONG maxPressure = 0;
|
||||
LONG maxAzimuth = 0, maxAltitude = 0;
|
||||
/** Reusable buffer to read in Wintab Packets. */
|
||||
std::vector<PACKET> pkts;
|
||||
/** Queue of packets to process. */
|
||||
std::queue<PACKET> pendingEvents;
|
||||
} m_wintab;
|
||||
|
||||
/** Most recent tablet data. */
|
||||
GHOST_TabletData lastTabletData = GHOST_TABLET_DATA_NONE;
|
||||
|
||||
/**
|
||||
* Wintab setup.
|
||||
*/
|
||||
void initializeWintab();
|
||||
|
||||
void readWintabEvents();
|
||||
|
||||
void expireWintabEvents();
|
||||
|
||||
/**
|
||||
* Convert Wintab system mapped (mouse) buttons into Ghost button mask.
|
||||
* \param cursor: The Wintab cursor associated to the button.
|
||||
* \param physicalButton: The physical button ID to inspect.
|
||||
* \param buttonMask: Return pointer for button found.
|
||||
* \return Whether an associated button was found.
|
||||
* \return The system mapped button.
|
||||
*/
|
||||
GHOST_TSuccess wintabMouseToGhost(UINT cursor,
|
||||
WORD physicalButton,
|
||||
GHOST_TButtonMask &buttonMask);
|
||||
GHOST_TButtonMask wintabMouseToGhost(UINT cursor, WORD physicalButton);
|
||||
|
||||
GHOST_TWindowState m_normal_state;
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ class Prefs(bpy.types.KeyConfigPreferences):
|
|||
description=(
|
||||
"The action when Middle-Mouse dragging in the viewport. "
|
||||
"Shift-Middle-Mouse is used for the other action. "
|
||||
"This applies to Track-Pad as well"
|
||||
"This applies to trackpad as well"
|
||||
),
|
||||
update=update_fn,
|
||||
)
|
||||
|
|
|
@ -347,7 +347,7 @@ class ClearUselessActions(Operator):
|
|||
|
||||
|
||||
class UpdateAnimatedTransformConstraint(Operator):
|
||||
"""Update fcurves/drivers affecting Transform constraints (use it with files from 2.70 and earlier)"""
|
||||
"""Update f-curves/drivers affecting Transform constraints (use it with files from 2.70 and earlier)"""
|
||||
bl_idname = "anim.update_animated_transform_constraints"
|
||||
bl_label = "Update Animated Transform Constraints"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
|
|
@ -80,7 +80,7 @@ class SequencerCrossfadeSounds(Operator):
|
|||
|
||||
|
||||
class SequencerSplitMulticam(Operator):
|
||||
"""Split multi-cam strip and select camera"""
|
||||
"""Split multicam strip and select camera"""
|
||||
|
||||
bl_idname = "sequencer.split_multicam"
|
||||
bl_label = "Split Multicam"
|
||||
|
|
|
@ -868,7 +868,7 @@ class PREFERENCES_OT_addon_show(Operator):
|
|||
# Note: shares some logic with PREFERENCES_OT_addon_install
|
||||
# but not enough to de-duplicate. Fixes here may apply to both.
|
||||
class PREFERENCES_OT_app_template_install(Operator):
|
||||
"""Install an application-template"""
|
||||
"""Install an application template"""
|
||||
bl_idname = "preferences.app_template_install"
|
||||
bl_label = "Install Template from File..."
|
||||
|
||||
|
|
|
@ -642,7 +642,7 @@ class LightMapPack(Operator):
|
|||
# UV Packing...
|
||||
PREF_BOX_DIV: IntProperty(
|
||||
name="Pack Quality",
|
||||
description="Pre Packing before the complex boxpack",
|
||||
description="Pre-packing before the complex boxpack",
|
||||
min=1, max=48,
|
||||
default=12,
|
||||
)
|
||||
|
|
|
@ -834,7 +834,7 @@ class WM_OT_context_modal_mouse(Operator):
|
|||
|
||||
|
||||
class WM_OT_url_open(Operator):
|
||||
"""Open a website in the web-browser"""
|
||||
"""Open a website in the web browser"""
|
||||
bl_idname = "wm.url_open"
|
||||
bl_label = ""
|
||||
bl_options = {'INTERNAL'}
|
||||
|
@ -851,7 +851,7 @@ class WM_OT_url_open(Operator):
|
|||
|
||||
|
||||
class WM_OT_url_open_preset(Operator):
|
||||
"""Open a preset website in the web-browser"""
|
||||
"""Open a preset website in the web browser"""
|
||||
bl_idname = "wm.url_open_preset"
|
||||
bl_label = "Open Preset Website"
|
||||
bl_options = {'INTERNAL'}
|
||||
|
@ -1737,7 +1737,7 @@ class WM_OT_tool_set_by_index(Operator):
|
|||
)
|
||||
|
||||
expand: BoolProperty(
|
||||
description="Include tool sub-groups",
|
||||
description="Include tool subgroups",
|
||||
default=True,
|
||||
)
|
||||
|
||||
|
@ -2169,7 +2169,7 @@ class WM_OT_batch_rename(Operator):
|
|||
'GPENCIL': ("grease_pencils", "Grease Pencil(s)"),
|
||||
'CAMERA': ("cameras", "Camera(s)"),
|
||||
'SPEAKER': ("speakers", "Speaker(s)"),
|
||||
'LIGHT_PROBE': ("light_probes", "LightProbe(s)"),
|
||||
'LIGHT_PROBE': ("light_probes", "Light Probe(s)"),
|
||||
}
|
||||
|
||||
# Finish with space types.
|
||||
|
|
|
@ -1437,7 +1437,7 @@ class USERPREF_PT_saveload_file_browser(SaveLoadPanel, CenterAlignMixIn, Panel):
|
|||
col.prop(paths, "use_filter_files")
|
||||
|
||||
col = layout.column(heading="Hide")
|
||||
col.prop(paths, "show_hidden_files_datablocks", text="Dot File & Datablocks")
|
||||
col.prop(paths, "show_hidden_files_datablocks", text="Dot File & Data-Blocks")
|
||||
col.prop(paths, "hide_recent_locations", text="Recent Locations")
|
||||
col.prop(paths, "hide_system_bookmarks", text="System Bookmarks")
|
||||
|
||||
|
|
|
@ -957,7 +957,7 @@ class VIEW3D_MT_transform(VIEW3D_MT_transform_base, Menu):
|
|||
# generic...
|
||||
layout = self.layout
|
||||
if context.mode == 'EDIT_MESH':
|
||||
layout.operator("transform.shrink_fatten", text="Shrink Fatten")
|
||||
layout.operator("transform.shrink_fatten", text="Shrink/Fatten")
|
||||
layout.operator("transform.skin_resize")
|
||||
elif context.mode == 'EDIT_CURVE':
|
||||
layout.operator("transform.transform", text="Radius").mode = 'CURVE_SHRINKFATTEN'
|
||||
|
@ -5093,7 +5093,7 @@ class VIEW3D_MT_edit_gpencil_transform(Menu):
|
|||
layout.operator("transform.bend", text="Bend")
|
||||
layout.operator("transform.shear", text="Shear")
|
||||
layout.operator("transform.tosphere", text="To Sphere")
|
||||
layout.operator("transform.transform", text="Shrink Fatten").mode = 'GPENCIL_SHRINKFATTEN'
|
||||
layout.operator("transform.transform", text="Shrink/Fatten").mode = 'GPENCIL_SHRINKFATTEN'
|
||||
|
||||
|
||||
class VIEW3D_MT_edit_gpencil_showhide(Menu):
|
||||
|
@ -7046,7 +7046,7 @@ class VIEW3D_MT_gpencil_edit_context_menu(Menu):
|
|||
col.operator("transform.bend", text="Bend")
|
||||
col.operator("transform.shear", text="Shear")
|
||||
col.operator("transform.tosphere", text="To Sphere")
|
||||
col.operator("transform.transform", text="Shrink Fatten").mode = 'GPENCIL_SHRINKFATTEN'
|
||||
col.operator("transform.transform", text="Shrink/Fatten").mode = 'GPENCIL_SHRINKFATTEN'
|
||||
|
||||
col.separator()
|
||||
|
||||
|
@ -7090,7 +7090,7 @@ class VIEW3D_MT_gpencil_edit_context_menu(Menu):
|
|||
col.separator()
|
||||
|
||||
col.operator("gpencil.stroke_smooth", text="Smooth Stroke").only_selected = False
|
||||
col.operator("transform.transform", text="Shrink Fatten").mode = 'GPENCIL_SHRINKFATTEN'
|
||||
col.operator("transform.transform", text="Shrink/Fatten").mode = 'GPENCIL_SHRINKFATTEN'
|
||||
|
||||
col.separator()
|
||||
|
||||
|
|
|
@ -3422,7 +3422,7 @@ static void ANIM_OT_channels_click(wmOperatorType *ot)
|
|||
/* identifiers */
|
||||
ot->name = "Mouse Click on Channels";
|
||||
ot->idname = "ANIM_OT_channels_click";
|
||||
ot->description = "Handle mouse-clicks over animation channels";
|
||||
ot->description = "Handle mouse clicks over animation channels";
|
||||
|
||||
/* api callbacks */
|
||||
ot->invoke = animchannels_mouseclick_invoke;
|
||||
|
|
|
@ -1617,7 +1617,7 @@ void ARMATURE_OT_bone_primitive_add(wmOperatorType *ot)
|
|||
/* identifiers */
|
||||
ot->name = "Add Bone";
|
||||
ot->idname = "ARMATURE_OT_bone_primitive_add";
|
||||
ot->description = "Add a new bone located at the 3D-Cursor";
|
||||
ot->description = "Add a new bone located at the 3D cursor";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = armature_bone_primitive_add_exec;
|
||||
|
|
|
@ -876,7 +876,7 @@ void ARMATURE_OT_fill(wmOperatorType *ot)
|
|||
/* identifiers */
|
||||
ot->name = "Fill Between Joints";
|
||||
ot->idname = "ARMATURE_OT_fill";
|
||||
ot->description = "Add bone between selected joint(s) and/or 3D-Cursor";
|
||||
ot->description = "Add bone between selected joint(s) and/or 3D cursor";
|
||||
|
||||
/* callbacks */
|
||||
ot->exec = armature_fill_bones_exec;
|
||||
|
|
|
@ -948,7 +948,7 @@ void ARMATURE_OT_parent_set(wmOperatorType *ot)
|
|||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
||||
RNA_def_enum(
|
||||
ot->srna, "type", prop_editarm_make_parent_types, 0, "ParentType", "Type of parenting");
|
||||
ot->srna, "type", prop_editarm_make_parent_types, 0, "Parent Type", "Type of parenting");
|
||||
}
|
||||
|
||||
static const EnumPropertyItem prop_editarm_clear_parent_types[] = {
|
||||
|
@ -1029,7 +1029,7 @@ void ARMATURE_OT_parent_clear(wmOperatorType *ot)
|
|||
"type",
|
||||
prop_editarm_clear_parent_types,
|
||||
0,
|
||||
"ClearType",
|
||||
"Clear Type",
|
||||
"What way to clear parenting");
|
||||
}
|
||||
|
||||
|
|
|
@ -1802,7 +1802,7 @@ static int textbox_add_exec(bContext *C, wmOperator *UNUSED(op))
|
|||
void FONT_OT_textbox_add(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name = "Add Textbox";
|
||||
ot->name = "Add Text Box";
|
||||
ot->description = "Add a new text box";
|
||||
ot->idname = "FONT_OT_textbox_add";
|
||||
|
||||
|
@ -1846,8 +1846,8 @@ static int textbox_remove_exec(bContext *C, wmOperator *op)
|
|||
void FONT_OT_textbox_remove(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name = "Remove Textbox";
|
||||
ot->description = "Remove the textbox";
|
||||
ot->name = "Remove Text Box";
|
||||
ot->description = "Remove the text box";
|
||||
ot->idname = "FONT_OT_textbox_remove";
|
||||
|
||||
/* api callbacks */
|
||||
|
|
|
@ -428,7 +428,7 @@ void WM_OT_alembic_export(wmOperatorType *ot)
|
|||
"triangulate",
|
||||
false,
|
||||
"Triangulate",
|
||||
"Export Polygons (Quads & NGons) as Triangles");
|
||||
"Export polygons (quads and n-gons) as triangles");
|
||||
|
||||
RNA_def_enum(ot->srna,
|
||||
"quad_method",
|
||||
|
|
|
@ -649,7 +649,7 @@ void WM_OT_collada_export(wmOperatorType *ot)
|
|||
"Copy textures to same folder where the .dae file is exported");
|
||||
|
||||
RNA_def_boolean(
|
||||
func, "triangulate", 1, "Triangulate", "Export Polygons (Quads & NGons) as Triangles");
|
||||
func, "triangulate", 1, "Triangulate", "Export polygons (quads and n-gons) as triangles");
|
||||
|
||||
RNA_def_boolean(func,
|
||||
"use_object_instantiation",
|
||||
|
|
|
@ -239,7 +239,7 @@ void MESH_OT_primitive_cube_add(wmOperatorType *ot)
|
|||
|
||||
static const EnumPropertyItem fill_type_items[] = {
|
||||
{0, "NOTHING", 0, "Nothing", "Don't fill at all"},
|
||||
{1, "NGON", 0, "Ngon", "Use ngons"},
|
||||
{1, "NGON", 0, "N-Gon", "Use n-gons"},
|
||||
{2, "TRIFAN", 0, "Triangle Fan", "Use triangle fans"},
|
||||
{0, NULL, 0, NULL, NULL},
|
||||
};
|
||||
|
|
|
@ -1055,7 +1055,7 @@ void MESH_OT_bevel(wmOperatorType *ot)
|
|||
"CUTOFF",
|
||||
0,
|
||||
"Cutoff",
|
||||
"A cut-off at each profile's end before the intersection"},
|
||||
"A cutoff at each profile's end before the intersection"},
|
||||
{0, NULL, 0, NULL, NULL},
|
||||
};
|
||||
|
||||
|
|
|
@ -4327,7 +4327,7 @@ void MESH_OT_edges_select_sharp(wmOperatorType *ot)
|
|||
|
||||
/* identifiers */
|
||||
ot->name = "Select Sharp Edges";
|
||||
ot->description = "Select all sharp-enough edges";
|
||||
ot->description = "Select all sharp enough edges";
|
||||
ot->idname = "MESH_OT_edges_select_sharp";
|
||||
|
||||
/* api callbacks */
|
||||
|
@ -4536,7 +4536,7 @@ static int edbm_select_non_manifold_exec(bContext *C, wmOperator *op)
|
|||
void MESH_OT_select_non_manifold(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name = "Select Non Manifold";
|
||||
ot->name = "Select Non-Manifold";
|
||||
ot->description = "Select all non-manifold vertices or edges";
|
||||
ot->idname = "MESH_OT_select_non_manifold";
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ static const EnumPropertyItem prop_similar_types[] = {
|
|||
{SIMFACE_NORMAL, "NORMAL", 0, "Normal", ""},
|
||||
{SIMFACE_COPLANAR, "COPLANAR", 0, "Coplanar", ""},
|
||||
{SIMFACE_SMOOTH, "SMOOTH", 0, "Flat/Smooth", ""},
|
||||
{SIMFACE_FACEMAP, "FACE_MAP", 0, "Face-Map", ""},
|
||||
{SIMFACE_FACEMAP, "FACE_MAP", 0, "Face Map", ""},
|
||||
#ifdef WITH_FREESTYLE
|
||||
{SIMFACE_FREESTYLE, "FREESTYLE_FACE", 0, "Freestyle Face Marks", ""},
|
||||
#endif
|
||||
|
|
|
@ -187,7 +187,7 @@ void MESH_OT_subdivide(wmOperatorType *ot)
|
|||
prop_mesh_cornervert_types,
|
||||
SUBD_CORNER_STRAIGHT_CUT,
|
||||
"Quad Corner Type",
|
||||
"How to subdivide quad corners (anything other than Straight Cut will prevent ngons)");
|
||||
"How to subdivide quad corners (anything other than Straight Cut will prevent n-gons)");
|
||||
|
||||
RNA_def_float(ot->srna,
|
||||
"fractal",
|
||||
|
@ -335,7 +335,7 @@ void MESH_OT_subdivide_edgering(wmOperatorType *ot)
|
|||
{
|
||||
/* identifiers */
|
||||
ot->name = "Subdivide Edge-Ring";
|
||||
ot->description = "Subdivide perpendicular edges to the selected edge ring";
|
||||
ot->description = "Subdivide perpendicular edges to the selected edge-ring";
|
||||
ot->idname = "MESH_OT_subdivide_edgering";
|
||||
|
||||
/* api callbacks */
|
||||
|
@ -407,7 +407,7 @@ void MESH_OT_unsubdivide(wmOperatorType *ot)
|
|||
|
||||
/* props */
|
||||
RNA_def_int(
|
||||
ot->srna, "iterations", 2, 1, 1000, "Iterations", "Number of times to unsubdivide", 1, 100);
|
||||
ot->srna, "iterations", 2, 1, 1000, "Iterations", "Number of times to un-subdivide", 1, 100);
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
@ -6939,7 +6939,7 @@ void MESH_OT_sort_elements(wmOperatorType *ot)
|
|||
type_items,
|
||||
SRT_VIEW_ZAXIS,
|
||||
"Type",
|
||||
"Type of re-ordering operation to apply");
|
||||
"Type of reordering operation to apply");
|
||||
RNA_def_enum_flag(ot->srna,
|
||||
"elements",
|
||||
elem_items,
|
||||
|
@ -7258,7 +7258,7 @@ void MESH_OT_wireframe(wmOperatorType *ot)
|
|||
/* identifiers */
|
||||
ot->name = "Wireframe";
|
||||
ot->idname = "MESH_OT_wireframe";
|
||||
ot->description = "Create a solid wire-frame from faces";
|
||||
ot->description = "Create a solid wireframe from faces";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = edbm_wireframe_exec;
|
||||
|
|
|
@ -843,7 +843,7 @@ void MESH_OT_customdata_mask_clear(wmOperatorType *ot)
|
|||
{
|
||||
|
||||
/* identifiers */
|
||||
ot->name = "Clear Sculpt-Mask Data";
|
||||
ot->name = "Clear Sculpt Mask Data";
|
||||
ot->idname = "MESH_OT_customdata_mask_clear";
|
||||
ot->description = "Clear vertex sculpt masking data from the mesh";
|
||||
|
||||
|
|
|
@ -324,7 +324,7 @@ void ED_object_add_generic_props(wmOperatorType *ot, bool do_editmode)
|
|||
|
||||
if (do_editmode) {
|
||||
prop = RNA_def_boolean(
|
||||
ot->srna, "enter_editmode", 0, "Enter Editmode", "Enter editmode when adding this object");
|
||||
ot->srna, "enter_editmode", 0, "Enter Edit Mode", "Enter edit mode when adding this object");
|
||||
RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
|
||||
}
|
||||
/* note: this property gets hidden for add-camera operator */
|
||||
|
|
|
@ -1008,7 +1008,7 @@ void CONSTRAINT_OT_childof_set_inverse(wmOperatorType *ot)
|
|||
/* identifiers */
|
||||
ot->name = "Set Inverse";
|
||||
ot->idname = "CONSTRAINT_OT_childof_set_inverse";
|
||||
ot->description = "Set inverse correction for ChildOf constraint";
|
||||
ot->description = "Set inverse correction for Child Of constraint";
|
||||
|
||||
/* callbacks */
|
||||
ot->invoke = childof_set_inverse_invoke;
|
||||
|
@ -1057,7 +1057,7 @@ void CONSTRAINT_OT_childof_clear_inverse(wmOperatorType *ot)
|
|||
/* identifiers */
|
||||
ot->name = "Clear Inverse";
|
||||
ot->idname = "CONSTRAINT_OT_childof_clear_inverse";
|
||||
ot->description = "Clear inverse correction for ChildOf constraint";
|
||||
ot->description = "Clear inverse correction for Child Of constraint";
|
||||
|
||||
/* callbacks */
|
||||
ot->invoke = childof_clear_inverse_invoke;
|
||||
|
@ -1263,7 +1263,7 @@ void CONSTRAINT_OT_objectsolver_set_inverse(wmOperatorType *ot)
|
|||
/* identifiers */
|
||||
ot->name = "Set Inverse";
|
||||
ot->idname = "CONSTRAINT_OT_objectsolver_set_inverse";
|
||||
ot->description = "Set inverse correction for ObjectSolver constraint";
|
||||
ot->description = "Set inverse correction for Object Solver constraint";
|
||||
|
||||
/* callbacks */
|
||||
ot->invoke = objectsolver_set_inverse_invoke;
|
||||
|
@ -1319,7 +1319,7 @@ void CONSTRAINT_OT_objectsolver_clear_inverse(wmOperatorType *ot)
|
|||
/* identifiers */
|
||||
ot->name = "Clear Inverse";
|
||||
ot->idname = "CONSTRAINT_OT_objectsolver_clear_inverse";
|
||||
ot->description = "Clear inverse correction for ObjectSolver constraint";
|
||||
ot->description = "Clear inverse correction for Object Solver constraint";
|
||||
|
||||
/* callbacks */
|
||||
ot->invoke = objectsolver_clear_inverse_invoke;
|
||||
|
|
|
@ -863,8 +863,8 @@ void OBJECT_OT_editmode_toggle(wmOperatorType *ot)
|
|||
{
|
||||
|
||||
/* identifiers */
|
||||
ot->name = "Toggle Editmode";
|
||||
ot->description = "Toggle object's editmode";
|
||||
ot->name = "Toggle Edit Mode";
|
||||
ot->description = "Toggle object's edit mode";
|
||||
ot->idname = "OBJECT_OT_editmode_toggle";
|
||||
|
||||
/* api callbacks */
|
||||
|
|
|
@ -1533,7 +1533,7 @@ void OBJECT_OT_origin_set(wmOperatorType *ot)
|
|||
0,
|
||||
"Origin to Geometry",
|
||||
"Calculate the center of geometry based on the current pivot point (median, otherwise "
|
||||
"bounding-box)"},
|
||||
"bounding box)"},
|
||||
{ORIGIN_TO_CURSOR,
|
||||
"ORIGIN_CURSOR",
|
||||
0,
|
||||
|
|
|
@ -1345,13 +1345,13 @@ void SCENE_OT_light_cache_bake(wmOperatorType *ot)
|
|||
{LIGHTCACHE_SUBSET_ALL,
|
||||
"ALL",
|
||||
0,
|
||||
"All LightProbes",
|
||||
"All Light Probes",
|
||||
"Bake both irradiance grids and reflection cubemaps"},
|
||||
{LIGHTCACHE_SUBSET_DIRTY,
|
||||
"DIRTY",
|
||||
0,
|
||||
"Dirty Only",
|
||||
"Only bake lightprobes that are marked as dirty"},
|
||||
"Only bake light probes that are marked as dirty"},
|
||||
{LIGHTCACHE_SUBSET_CUBE,
|
||||
"CUBEMAPS",
|
||||
0,
|
||||
|
|
|
@ -3611,7 +3611,7 @@ static int spacedata_cleanup_exec(bContext *C, wmOperator *op)
|
|||
static void SCREEN_OT_spacedata_cleanup(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name = "Clean-up Space-data";
|
||||
ot->name = "Cleanup Space Data";
|
||||
ot->description = "Remove unused settings for invisible editors";
|
||||
ot->idname = "SCREEN_OT_spacedata_cleanup";
|
||||
|
||||
|
@ -5285,7 +5285,7 @@ static void SCREEN_OT_space_type_set_or_cycle(wmOperatorType *ot)
|
|||
{
|
||||
/* identifiers */
|
||||
ot->name = "Cycle Space Type Set";
|
||||
ot->description = "Set the space type or cycle sub-type";
|
||||
ot->description = "Set the space type or cycle subtype";
|
||||
ot->idname = "SCREEN_OT_space_type_set_or_cycle";
|
||||
|
||||
/* api callbacks */
|
||||
|
|
|
@ -6299,7 +6299,7 @@ void PAINT_OT_image_from_view(wmOperatorType *ot)
|
|||
/* identifiers */
|
||||
ot->name = "Image from View";
|
||||
ot->idname = "PAINT_OT_image_from_view";
|
||||
ot->description = "Make an image from biggest 3D view for re-projection";
|
||||
ot->description = "Make an image from biggest 3D view for reprojection";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = texture_paint_image_from_view_exec;
|
||||
|
|
|
@ -1399,7 +1399,7 @@ static EnumPropertyItem prop_cloth_filter_type[] = {
|
|||
"SCALE",
|
||||
0,
|
||||
"Scale",
|
||||
"Scales the mesh as a soft-body using the origin of the object as scale"},
|
||||
"Scales the mesh as a soft body using the origin of the object as scale"},
|
||||
{0, NULL, 0, NULL, NULL},
|
||||
};
|
||||
|
||||
|
|
|
@ -1702,7 +1702,7 @@ static const EnumPropertyItem prop_actkeys_snap_types[] = {
|
|||
"NEAREST_FRAME",
|
||||
0,
|
||||
"Selection to Nearest Frame",
|
||||
"Snap selected keyframes to the nearest (whole) frame (use to fix accidental sub-frame "
|
||||
"Snap selected keyframes to the nearest (whole) frame (use to fix accidental subframe "
|
||||
"offsets)"},
|
||||
{ACTKEYS_SNAP_NEAREST_SECOND,
|
||||
"NEAREST_SECOND",
|
||||
|
|
|
@ -533,7 +533,7 @@ void CLIP_OT_view_pan(wmOperatorType *ot)
|
|||
-FLT_MAX,
|
||||
FLT_MAX,
|
||||
"Offset",
|
||||
"Offset in floating point units, 1.0 is the width and height of the image",
|
||||
"Offset in floating-point units, 1.0 is the width and height of the image",
|
||||
-FLT_MAX,
|
||||
FLT_MAX);
|
||||
}
|
||||
|
|
|
@ -1003,7 +1003,7 @@ void CLIP_OT_slide_marker(wmOperatorType *ot)
|
|||
-FLT_MAX,
|
||||
FLT_MAX,
|
||||
"Offset",
|
||||
"Offset in floating point units, 1.0 is the width and height of the image",
|
||||
"Offset in floating-point units, 1.0 is the width and height of the image",
|
||||
-FLT_MAX,
|
||||
FLT_MAX);
|
||||
}
|
||||
|
@ -1881,7 +1881,7 @@ void CLIP_OT_clean_tracks(wmOperatorType *ot)
|
|||
0.0f,
|
||||
FLT_MAX,
|
||||
"Reprojection Error",
|
||||
"Effect on tracks which have got larger re-projection error",
|
||||
"Effect on tracks which have got larger reprojection error",
|
||||
0.0f,
|
||||
100.0f);
|
||||
RNA_def_enum(ot->srna, "action", actions_items, 0, "Action", "Cleanup action to execute");
|
||||
|
|
|
@ -1777,7 +1777,7 @@ static int file_refresh_exec(bContext *C, wmOperator *UNUSED(unused))
|
|||
void FILE_OT_refresh(struct wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name = "Refresh Filelist";
|
||||
ot->name = "Refresh File List";
|
||||
ot->description = "Refresh the file list";
|
||||
ot->idname = "FILE_OT_refresh";
|
||||
|
||||
|
|
|
@ -2198,7 +2198,7 @@ static const EnumPropertyItem prop_graphkeys_snap_types[] = {
|
|||
"NEAREST_FRAME",
|
||||
0,
|
||||
"Selection to Nearest Frame",
|
||||
"Snap selected keyframes to the nearest (whole) frame (use to fix accidental sub-frame "
|
||||
"Snap selected keyframes to the nearest (whole) frame (use to fix accidental subframe "
|
||||
"offsets)"},
|
||||
{GRAPHKEYS_SNAP_NEAREST_SECOND,
|
||||
"NEAREST_SECOND",
|
||||
|
|
|
@ -417,7 +417,7 @@ void IMAGE_OT_view_pan(wmOperatorType *ot)
|
|||
-FLT_MAX,
|
||||
FLT_MAX,
|
||||
"Offset",
|
||||
"Offset in floating point units, 1.0 is the width and height of the image",
|
||||
"Offset in floating-point units, 1.0 is the width and height of the image",
|
||||
-FLT_MAX,
|
||||
FLT_MAX);
|
||||
}
|
||||
|
|
|
@ -621,7 +621,7 @@ void NLA_OT_action_unlink(wmOperatorType *ot)
|
|||
"force_delete",
|
||||
false,
|
||||
"Force Delete",
|
||||
"Clear Fake User and remove copy stashed in this datablock's NLA stack");
|
||||
"Clear Fake User and remove copy stashed in this data-block's NLA stack");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
}
|
||||
|
||||
|
|
|
@ -1859,7 +1859,7 @@ void NODE_OT_output_file_add_socket(wmOperatorType *ot)
|
|||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
||||
RNA_def_string(
|
||||
ot->srna, "file_path", "Image", MAX_NAME, "File Path", "Sub-path of the output file");
|
||||
ot->srna, "file_path", "Image", MAX_NAME, "File Path", "Subpath of the output file");
|
||||
}
|
||||
|
||||
/* ****************** Multi File Output Remove Socket ******************* */
|
||||
|
|
|
@ -393,7 +393,7 @@ void SEQUENCER_OT_view_ghost_border(wmOperatorType *ot)
|
|||
/* Identifiers. */
|
||||
ot->name = "Border Offset View";
|
||||
ot->idname = "SEQUENCER_OT_view_ghost_border";
|
||||
ot->description = "Set the boundaries of the border used for offset-view";
|
||||
ot->description = "Set the boundaries of the border used for offset view";
|
||||
|
||||
/* Api callbacks. */
|
||||
ot->invoke = WM_gesture_box_invoke;
|
||||
|
|
|
@ -2535,12 +2535,12 @@ void VIEW3D_OT_select(wmOperatorType *ot)
|
|||
"center",
|
||||
0,
|
||||
"Center",
|
||||
"Use the object center when selecting, in edit-mode used to extend object selection");
|
||||
"Use the object center when selecting, in edit mode used to extend object selection");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
prop = RNA_def_boolean(
|
||||
ot->srna, "enumerate", 0, "Enumerate", "List objects under the mouse (object mode only)");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
prop = RNA_def_boolean(ot->srna, "object", 0, "Object", "Use object selection (edit-mode only)");
|
||||
prop = RNA_def_boolean(ot->srna, "object", 0, "Object", "Use object selection (edit mode only)");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
|
||||
prop = RNA_def_int_vector(ot->srna,
|
||||
|
|
|
@ -131,32 +131,32 @@ const EnumPropertyItem rna_enum_transform_mode_types[] = {
|
|||
{TFM_ROTATION, "ROTATION", 0, "Rotation", ""},
|
||||
{TFM_RESIZE, "RESIZE", 0, "Resize", ""},
|
||||
{TFM_SKIN_RESIZE, "SKIN_RESIZE", 0, "Skin Resize", ""},
|
||||
{TFM_TOSPHERE, "TOSPHERE", 0, "Tosphere", ""},
|
||||
{TFM_TOSPHERE, "TOSPHERE", 0, "To Sphere", ""},
|
||||
{TFM_SHEAR, "SHEAR", 0, "Shear", ""},
|
||||
{TFM_BEND, "BEND", 0, "Bend", ""},
|
||||
{TFM_SHRINKFATTEN, "SHRINKFATTEN", 0, "Shrinkfatten", ""},
|
||||
{TFM_SHRINKFATTEN, "SHRINKFATTEN", 0, "Shrink/Fatten", ""},
|
||||
{TFM_TILT, "TILT", 0, "Tilt", ""},
|
||||
{TFM_TRACKBALL, "TRACKBALL", 0, "Trackball", ""},
|
||||
{TFM_PUSHPULL, "PUSHPULL", 0, "Pushpull", ""},
|
||||
{TFM_PUSHPULL, "PUSHPULL", 0, "Push/Pull", ""},
|
||||
{TFM_CREASE, "CREASE", 0, "Crease", ""},
|
||||
{TFM_MIRROR, "MIRROR", 0, "Mirror", ""},
|
||||
{TFM_BONESIZE, "BONE_SIZE", 0, "Bonesize", ""},
|
||||
{TFM_BONESIZE, "BONE_SIZE", 0, "Bone Size", ""},
|
||||
{TFM_BONE_ENVELOPE, "BONE_ENVELOPE", 0, "Bone Envelope", ""},
|
||||
{TFM_BONE_ENVELOPE_DIST, "BONE_ENVELOPE_DIST", 0, "Bone Envelope Distance", ""},
|
||||
{TFM_CURVE_SHRINKFATTEN, "CURVE_SHRINKFATTEN", 0, "Curve Shrinkfatten", ""},
|
||||
{TFM_MASK_SHRINKFATTEN, "MASK_SHRINKFATTEN", 0, "Mask Shrinkfatten", ""},
|
||||
{TFM_GPENCIL_SHRINKFATTEN, "GPENCIL_SHRINKFATTEN", 0, "GPencil Shrinkfatten", ""},
|
||||
{TFM_CURVE_SHRINKFATTEN, "CURVE_SHRINKFATTEN", 0, "Curve Shrink/Fatten", ""},
|
||||
{TFM_MASK_SHRINKFATTEN, "MASK_SHRINKFATTEN", 0, "Mask Shrink/Fatten", ""},
|
||||
{TFM_GPENCIL_SHRINKFATTEN, "GPENCIL_SHRINKFATTEN", 0, "Grease Pencil Shrink/Fatten", ""},
|
||||
{TFM_BONE_ROLL, "BONE_ROLL", 0, "Bone Roll", ""},
|
||||
{TFM_TIME_TRANSLATE, "TIME_TRANSLATE", 0, "Time Translate", ""},
|
||||
{TFM_TIME_SLIDE, "TIME_SLIDE", 0, "Time Slide", ""},
|
||||
{TFM_TIME_SCALE, "TIME_SCALE", 0, "Time Scale", ""},
|
||||
{TFM_TIME_EXTEND, "TIME_EXTEND", 0, "Time Extend", ""},
|
||||
{TFM_BAKE_TIME, "BAKE_TIME", 0, "Bake Time", ""},
|
||||
{TFM_BWEIGHT, "BWEIGHT", 0, "Bweight", ""},
|
||||
{TFM_BWEIGHT, "BWEIGHT", 0, "Bevel Weight", ""},
|
||||
{TFM_ALIGN, "ALIGN", 0, "Align", ""},
|
||||
{TFM_EDGE_SLIDE, "EDGESLIDE", 0, "Edge Slide", ""},
|
||||
{TFM_SEQ_SLIDE, "SEQSLIDE", 0, "Sequence Slide", ""},
|
||||
{TFM_GPENCIL_OPACITY, "GPENCIL_OPACITY", 0, "GPencil Opacity", ""},
|
||||
{TFM_GPENCIL_OPACITY, "GPENCIL_OPACITY", 0, "Grease Pencil Opacity", ""},
|
||||
{0, NULL, 0, NULL, NULL},
|
||||
};
|
||||
|
||||
|
|
|
@ -336,7 +336,7 @@ static void rna_def_dopesheet(BlenderRNA *brna)
|
|||
RNA_def_property_boolean_sdna(prop, NULL, "flag", ADS_FLAG_SHOW_DBFILTERS);
|
||||
RNA_def_property_ui_text(
|
||||
prop,
|
||||
"Show Datablock Filters",
|
||||
"Show Data-Block Filters",
|
||||
"Show options for whether channels related to certain types of data are included");
|
||||
RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1);
|
||||
RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN, NULL);
|
||||
|
|
|
@ -1250,7 +1250,7 @@ static void rna_def_edit_bone(BlenderRNA *brna)
|
|||
srna = RNA_def_struct(brna, "EditBone", NULL);
|
||||
RNA_def_struct_sdna(srna, "EditBone");
|
||||
RNA_def_struct_idprops_func(srna, "rna_EditBone_idprops");
|
||||
RNA_def_struct_ui_text(srna, "Edit Bone", "Editmode bone in an Armature data-block");
|
||||
RNA_def_struct_ui_text(srna, "Edit Bone", "Edit mode bone in an armature data-block");
|
||||
RNA_def_struct_ui_icon(srna, ICON_BONE_DATA);
|
||||
|
||||
RNA_define_verify_sdna(0); /* not in sdna */
|
||||
|
@ -1335,7 +1335,7 @@ static void rna_def_edit_bone(BlenderRNA *brna)
|
|||
RNA_def_property_flag(prop, PROP_THICK_WRAP); /* no reference to original data */
|
||||
RNA_def_property_ui_text(
|
||||
prop,
|
||||
"Editbone Matrix",
|
||||
"Edit Bone Matrix",
|
||||
"Matrix combining location and rotation of the bone (head position, direction and roll), "
|
||||
"in armature space (does not include/support bone's length/size)");
|
||||
RNA_def_property_float_funcs(prop, "rna_EditBone_matrix_get", "rna_EditBone_matrix_set", NULL);
|
||||
|
|
|
@ -364,7 +364,7 @@ static void rna_def_attribute_float(BlenderRNA *brna)
|
|||
|
||||
srna = RNA_def_struct(brna, "FloatAttribute", "Attribute");
|
||||
RNA_def_struct_sdna(srna, "CustomDataLayer");
|
||||
RNA_def_struct_ui_text(srna, "Float Attribute", "Geometry attribute with floating point values");
|
||||
RNA_def_struct_ui_text(srna, "Float Attribute", "Geometry attribute with floating-point values");
|
||||
|
||||
prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
|
||||
RNA_def_property_struct_type(prop, "FloatAttributeValue");
|
||||
|
@ -381,7 +381,7 @@ static void rna_def_attribute_float(BlenderRNA *brna)
|
|||
srna = RNA_def_struct(brna, "FloatAttributeValue", NULL);
|
||||
RNA_def_struct_sdna(srna, "MFloatProperty");
|
||||
RNA_def_struct_ui_text(
|
||||
srna, "Float Attribute Value", "Floating point value in geometry attribute");
|
||||
srna, "Float Attribute Value", "Floating-point value in geometry attribute");
|
||||
prop = RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "f");
|
||||
RNA_def_property_update(prop, 0, "rna_Attribute_update_data");
|
||||
|
@ -396,7 +396,7 @@ static void rna_def_attribute_float_vector(BlenderRNA *brna)
|
|||
srna = RNA_def_struct(brna, "FloatVectorAttribute", "Attribute");
|
||||
RNA_def_struct_sdna(srna, "CustomDataLayer");
|
||||
RNA_def_struct_ui_text(
|
||||
srna, "Float Vector Attribute", "Vector geometry attribute, with floating point precision");
|
||||
srna, "Float Vector Attribute", "Vector geometry attribute, with floating-point precision");
|
||||
|
||||
prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
|
||||
RNA_def_property_struct_type(prop, "FloatVectorAttributeValue");
|
||||
|
@ -432,7 +432,7 @@ static void rna_def_attribute_float_color(BlenderRNA *brna)
|
|||
srna = RNA_def_struct(brna, "FloatColorAttribute", "Attribute");
|
||||
RNA_def_struct_sdna(srna, "CustomDataLayer");
|
||||
RNA_def_struct_ui_text(
|
||||
srna, "Float Color Attribute", "Color geometry attribute, with floating point precision");
|
||||
srna, "Float Color Attribute", "Color geometry attribute, with floating-point precision");
|
||||
|
||||
prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
|
||||
RNA_def_property_struct_type(prop, "FloatColorAttributeValue");
|
||||
|
|
|
@ -2839,7 +2839,7 @@ static void rna_def_brush(BlenderRNA *brna)
|
|||
RNA_def_property_range(prop, 0.0f, 1.0f);
|
||||
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Autosmooth", "Amount of smoothing to automatically apply to each stroke");
|
||||
prop, "Auto-Smooth", "Amount of smoothing to automatically apply to each stroke");
|
||||
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
||||
|
||||
prop = RNA_def_property(srna, "topology_rake_factor", PROP_FLOAT, PROP_FACTOR);
|
||||
|
|
|
@ -604,7 +604,7 @@ static void rna_def_depsgraph_update(BlenderRNA *brna)
|
|||
|
||||
prop = RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_struct_type(prop, "ID");
|
||||
RNA_def_property_ui_text(prop, "ID", "Updated datablock");
|
||||
RNA_def_property_ui_text(prop, "ID", "Updated data-block");
|
||||
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE);
|
||||
RNA_def_property_pointer_funcs(prop, "rna_DepsgraphUpdate_id_get", NULL, NULL, NULL);
|
||||
|
||||
|
@ -745,7 +745,7 @@ static void rna_def_depsgraph(BlenderRNA *brna)
|
|||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
RNA_def_property_ui_text(prop, "IDs", "All evaluated datablocks");
|
||||
RNA_def_property_ui_text(prop, "IDs", "All evaluated data-blocks");
|
||||
|
||||
prop = RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);
|
||||
RNA_def_property_struct_type(prop, "Object");
|
||||
|
@ -788,7 +788,7 @@ static void rna_def_depsgraph(BlenderRNA *brna)
|
|||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
RNA_def_property_ui_text(prop, "Updates", "Updates to datablocks");
|
||||
RNA_def_property_ui_text(prop, "Updates", "Updates to data-blocks");
|
||||
}
|
||||
|
||||
void RNA_def_depsgraph(BlenderRNA *brna)
|
||||
|
|
|
@ -58,9 +58,9 @@ const EnumPropertyItem rna_enum_fmodifier_type_items[] = {
|
|||
"ENVELOPE",
|
||||
0,
|
||||
"Envelope",
|
||||
"Reshape F-Curve values - e.g. change amplitude of movements"},
|
||||
"Reshape F-Curve values, e.g. change amplitude of movements"},
|
||||
{FMODIFIER_TYPE_CYCLES, "CYCLES", 0, "Cycles", "Cyclic extend/repeat keyframe sequence"},
|
||||
{FMODIFIER_TYPE_NOISE, "NOISE", 0, "Noise", "Add pseudo-random noise on top of F-Curves"},
|
||||
{FMODIFIER_TYPE_NOISE, "NOISE", 0, "Noise", "Add pseudorandom noise on top of F-Curves"},
|
||||
/*{FMODIFIER_TYPE_FILTER, "FILTER", 0, "Filter", ""},*/ /* FIXME: not implemented yet! */
|
||||
/*{FMODIFIER_TYPE_PYTHON, "PYTHON", 0, "Python", ""},*/ /* FIXME: not implemented yet! */
|
||||
{FMODIFIER_TYPE_LIMITS,
|
||||
|
@ -72,7 +72,7 @@ const EnumPropertyItem rna_enum_fmodifier_type_items[] = {
|
|||
"STEPPED",
|
||||
0,
|
||||
"Stepped Interpolation",
|
||||
"Snap values to nearest grid-step - e.g. for a stop-motion look"},
|
||||
"Snap values to nearest grid step, e.g. for a stop-motion look"},
|
||||
{0, NULL, 0, NULL, NULL},
|
||||
};
|
||||
|
||||
|
@ -97,12 +97,12 @@ const EnumPropertyItem rna_enum_beztriple_keyframe_type_items[] = {
|
|||
"KEYFRAME",
|
||||
ICON_KEYTYPE_KEYFRAME_VEC,
|
||||
"Keyframe",
|
||||
"Normal keyframe - e.g. for key poses"},
|
||||
"Normal keyframe, e.g. for key poses"},
|
||||
{BEZT_KEYTYPE_BREAKDOWN,
|
||||
"BREAKDOWN",
|
||||
ICON_KEYTYPE_BREAKDOWN_VEC,
|
||||
"Breakdown",
|
||||
"A breakdown pose - e.g. for transitions between key poses"},
|
||||
"A breakdown pose, e.g. for transitions between key poses"},
|
||||
{BEZT_KEYTYPE_MOVEHOLD,
|
||||
"MOVING_HOLD",
|
||||
ICON_KEYTYPE_MOVING_HOLD_VEC,
|
||||
|
|
|
@ -2419,7 +2419,7 @@ static void rna_def_gpencil_data(BlenderRNA *brna)
|
|||
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_DATA_AUTOLOCK_LAYERS);
|
||||
RNA_def_property_ui_text(
|
||||
prop,
|
||||
"Autolock Layers",
|
||||
"Auto-Lock Layers",
|
||||
"Lock automatically all layers except active one to avoid accidental changes");
|
||||
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_autolock");
|
||||
|
||||
|
@ -2537,7 +2537,7 @@ static void rna_def_gpencil_data(BlenderRNA *brna)
|
|||
prop = RNA_def_property(srna, "is_annotation", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_DATA_ANNOTATIONS);
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_ui_text(prop, "Annotation", "Current datablock is an annotation");
|
||||
RNA_def_property_ui_text(prop, "Annotation", "Current data-block is an annotation");
|
||||
|
||||
/* Nested Structs */
|
||||
prop = RNA_def_property(srna, "grid", PROP_POINTER, PROP_NONE);
|
||||
|
|
|
@ -1021,7 +1021,7 @@ static void rna_def_image(BlenderRNA *brna)
|
|||
|
||||
prop = RNA_def_property(srna, "use_generated_float", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "gen_flag", IMA_GEN_FLOAT);
|
||||
RNA_def_property_ui_text(prop, "Float Buffer", "Generate floating point buffer");
|
||||
RNA_def_property_ui_text(prop, "Float Buffer", "Generate floating-point buffer");
|
||||
RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_generated_update");
|
||||
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
||||
|
||||
|
@ -1106,7 +1106,7 @@ static void rna_def_image(BlenderRNA *brna)
|
|||
prop = RNA_def_property(srna, "pixels", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_flag(prop, PROP_DYNAMIC);
|
||||
RNA_def_property_multi_array(prop, 1, NULL);
|
||||
RNA_def_property_ui_text(prop, "Pixels", "Image pixels in floating point values");
|
||||
RNA_def_property_ui_text(prop, "Pixels", "Image pixels in floating-point values");
|
||||
RNA_def_property_dynamic_array_funcs(prop, "rna_Image_pixels_get_length");
|
||||
RNA_def_property_float_funcs(prop, "rna_Image_pixels_get", "rna_Image_pixels_set", NULL);
|
||||
|
||||
|
@ -1118,7 +1118,7 @@ static void rna_def_image(BlenderRNA *brna)
|
|||
prop = RNA_def_property(srna, "is_float", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_funcs(prop, "rna_Image_is_float_get", NULL);
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_ui_text(prop, "Is Float", "True if this image is stored in float buffer");
|
||||
RNA_def_property_ui_text(prop, "Is Float", "True if this image is stored in floating-point buffer");
|
||||
|
||||
prop = RNA_def_property(srna, "colorspace_settings", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "colorspace_settings");
|
||||
|
|
|
@ -316,7 +316,7 @@ void RNA_api_image(StructRNA *srna)
|
|||
RNA_def_function_ui_description(func, "Reload the image from its source path");
|
||||
|
||||
func = RNA_def_function(srna, "update", "rna_Image_update");
|
||||
RNA_def_function_ui_description(func, "Update the display image from the floating point buffer");
|
||||
RNA_def_function_ui_description(func, "Update the display image from the floating-point buffer");
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
|
||||
func = RNA_def_function(srna, "scale", "rna_Image_scale");
|
||||
|
|
|
@ -387,8 +387,8 @@ void RNA_def_main(BlenderRNA *brna)
|
|||
{"lightprobes",
|
||||
"LightProbe",
|
||||
"rna_Main_lightprobes_begin",
|
||||
"LightProbes",
|
||||
"LightProbe data-blocks",
|
||||
"Light Probes",
|
||||
"Light Probe data-blocks",
|
||||
RNA_def_main_lightprobes},
|
||||
# ifdef WITH_HAIR_NODES
|
||||
{"hairs", "Hair", "rna_Main_hairs_begin", "Hairs", "Hair data-blocks", RNA_def_main_hairs},
|
||||
|
|
|
@ -1206,7 +1206,7 @@ void RNA_def_main_images(BlenderRNA *brna, PropertyRNA *cprop)
|
|||
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
||||
RNA_def_boolean(func, "alpha", 0, "Alpha", "Use alpha channel");
|
||||
RNA_def_boolean(
|
||||
func, "float_buffer", 0, "Float Buffer", "Create an image with floating point color");
|
||||
func, "float_buffer", 0, "Float Buffer", "Create an image with floating-point color");
|
||||
RNA_def_boolean(func, "stereo3d", 0, "Stereo 3D", "Create left and right views");
|
||||
RNA_def_boolean(func, "is_data", 0, "Is Data", "Create image with non-color data color space");
|
||||
RNA_def_boolean(func, "tiled", 0, "Tiled", "Create a tiled image");
|
||||
|
|
|
@ -999,7 +999,7 @@ static int rna_MeshFaceMapLayer_data_length(PointerRNA *ptr)
|
|||
static PointerRNA rna_Mesh_face_map_new(struct Mesh *me, ReportList *reports, const char *name)
|
||||
{
|
||||
if (BKE_mesh_ensure_facemap_customdata(me) == false) {
|
||||
BKE_report(reports, RPT_ERROR, "Currently only single face-map layers are supported");
|
||||
BKE_report(reports, RPT_ERROR, "Currently only single face map layers are supported");
|
||||
return PointerRNA_NULL;
|
||||
}
|
||||
|
||||
|
@ -1027,14 +1027,14 @@ static void rna_Mesh_face_map_remove(struct Mesh *me,
|
|||
CustomDataLayer *layer_test = &pdata->layers[index];
|
||||
if (layer != layer_test) {
|
||||
/* don't show name, its likely freed memory */
|
||||
BKE_report(reports, RPT_ERROR, "FaceMap not in mesh");
|
||||
BKE_report(reports, RPT_ERROR, "Face map not in mesh");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (BKE_mesh_clear_facemap_customdata(me) == false) {
|
||||
BKE_report(reports, RPT_ERROR, "Error removing face-map");
|
||||
BKE_report(reports, RPT_ERROR, "Error removing face map");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2180,7 +2180,7 @@ static void rna_def_mproperties(BlenderRNA *brna)
|
|||
RNA_def_struct_sdna(srna, "CustomDataLayer"); \
|
||||
RNA_def_struct_ui_text(srna, \
|
||||
"Mesh " elemname " Float Property Layer", \
|
||||
"User defined layer of floating point number values"); \
|
||||
"User defined layer of floating-point number values"); \
|
||||
RNA_def_struct_path_func(srna, "rna_Mesh" elemname "FloatPropertyLayer_path"); \
|
||||
\
|
||||
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); \
|
||||
|
@ -2207,7 +2207,7 @@ static void rna_def_mproperties(BlenderRNA *brna)
|
|||
RNA_def_struct_ui_text( \
|
||||
srna, \
|
||||
"Mesh " elemname " Float Property", \
|
||||
"User defined floating point number value in a float properties layer"); \
|
||||
"User defined floating-point number value in a float properties layer"); \
|
||||
RNA_def_struct_path_func(srna, "rna_Mesh" elemname "FloatProperty_path"); \
|
||||
\
|
||||
prop = RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE); \
|
||||
|
@ -2829,7 +2829,7 @@ static void rna_def_paint_mask(BlenderRNA *brna, PropertyRNA *UNUSED(cprop))
|
|||
|
||||
srna = RNA_def_struct(brna, "MeshPaintMaskProperty", NULL);
|
||||
RNA_def_struct_sdna(srna, "MFloatProperty");
|
||||
RNA_def_struct_ui_text(srna, "Mesh Paint Mask Property", "Floating point paint mask value");
|
||||
RNA_def_struct_ui_text(srna, "Mesh Paint Mask Property", "Floating-point paint mask value");
|
||||
RNA_def_struct_path_func(srna, "rna_MeshPaintMask_path");
|
||||
|
||||
prop = RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
|
||||
|
@ -2851,7 +2851,7 @@ static void rna_def_face_map(BlenderRNA *brna)
|
|||
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
|
||||
RNA_def_struct_name_property(srna, prop);
|
||||
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MeshPolyLayer_name_set");
|
||||
RNA_def_property_ui_text(prop, "Name", "Name of face-map layer");
|
||||
RNA_def_property_ui_text(prop, "Name", "Name of face map layer");
|
||||
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
|
||||
|
||||
prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
|
||||
|
@ -2888,13 +2888,13 @@ static void rna_def_face_maps(BlenderRNA *brna, PropertyRNA *cprop)
|
|||
srna = RNA_def_struct(brna, "MeshFaceMapLayers", NULL);
|
||||
RNA_def_struct_ui_text(srna, "Mesh Face Map Layer", "Per-face map index");
|
||||
RNA_def_struct_sdna(srna, "Mesh");
|
||||
RNA_def_struct_ui_text(srna, "Mesh FaceMaps", "Collection of mesh face-maps");
|
||||
RNA_def_struct_ui_text(srna, "Mesh Face Maps", "Collection of mesh face maps");
|
||||
|
||||
/* add this since we only ever have one layer anyway, don't bother with active_index */
|
||||
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_struct_type(prop, "MeshFaceMapLayer");
|
||||
RNA_def_property_pointer_funcs(prop, "rna_Mesh_face_map_active_get", NULL, NULL, NULL);
|
||||
RNA_def_property_ui_text(prop, "Active FaceMap Layer", "");
|
||||
RNA_def_property_ui_text(prop, "Active Face Map Layer", "");
|
||||
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
|
||||
|
||||
FunctionRNA *func;
|
||||
|
@ -3163,7 +3163,7 @@ static void rna_def_mesh(BlenderRNA *brna)
|
|||
NULL);
|
||||
RNA_def_property_struct_type(prop, "MeshFaceMapLayer");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_IGNORE);
|
||||
RNA_def_property_ui_text(prop, "FaceMap", "");
|
||||
RNA_def_property_ui_text(prop, "Face Map", "");
|
||||
rna_def_face_maps(brna, prop);
|
||||
|
||||
/* Skin vertices */
|
||||
|
|
|
@ -4183,7 +4183,7 @@ static const EnumPropertyItem node_script_mode_items[] = {
|
|||
};
|
||||
|
||||
static EnumPropertyItem node_ies_mode_items[] = {
|
||||
{NODE_IES_INTERNAL, "INTERNAL", 0, "Internal", "Use internal text datablock"},
|
||||
{NODE_IES_INTERNAL, "INTERNAL", 0, "Internal", "Use internal text data-block"},
|
||||
{NODE_IES_EXTERNAL, "EXTERNAL", 0, "External", "Use external .ies file"},
|
||||
{0, NULL, 0, NULL, NULL},
|
||||
};
|
||||
|
@ -4564,7 +4564,7 @@ static void def_sh_attribute(StructRNA *srna)
|
|||
"OBJECT",
|
||||
0,
|
||||
"Object",
|
||||
"The attribute is associated with the object or mesh datablock itself, "
|
||||
"The attribute is associated with the object or mesh data-block itself, "
|
||||
"and its value is uniform"},
|
||||
{SHD_ATTRIBUTE_INSTANCER,
|
||||
"INSTANCER",
|
||||
|
@ -5712,7 +5712,7 @@ static void def_sh_tex_ies(StructRNA *srna)
|
|||
RNA_def_property_enum_funcs(prop, NULL, "rna_ShaderNodeTexIES_mode_set", NULL);
|
||||
RNA_def_property_enum_items(prop, node_ies_mode_items);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Source", "Whether the IES file is loaded from disk or from a Text datablock");
|
||||
prop, "Source", "Whether the IES file is loaded from disk or from a text data-block");
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
|
||||
RNA_def_struct_sdna_from(srna, "bNode", NULL);
|
||||
|
@ -5855,7 +5855,7 @@ static void def_cmp_blur(StructRNA *srna)
|
|||
prop = RNA_def_property(srna, "use_variable_size", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "custom1", CMP_NODEFLAG_BLUR_VARIABLE_SIZE);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Variable Size", "Support variable blur per-pixel when using an image for size input");
|
||||
prop, "Variable Size", "Support variable blur per pixel when using an image for size input");
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
|
||||
prop = RNA_def_property(srna, "use_extended_bounds", PROP_BOOLEAN, PROP_NONE);
|
||||
|
@ -7675,7 +7675,7 @@ static void def_cmp_bokehblur(StructRNA *srna)
|
|||
prop = RNA_def_property(srna, "use_variable_size", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "custom1", CMP_NODEFLAG_BLUR_VARIABLE_SIZE);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Variable Size", "Support variable blur per-pixel when using an image for size input");
|
||||
prop, "Variable Size", "Support variable blur per pixel when using an image for size input");
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
|
||||
prop = RNA_def_property(srna, "use_extended_bounds", PROP_BOOLEAN, PROP_NONE);
|
||||
|
@ -8968,7 +8968,7 @@ static void rna_def_node_socket_float(BlenderRNA *brna,
|
|||
}
|
||||
|
||||
srna = RNA_def_struct(brna, idname, "NodeSocketStandard");
|
||||
RNA_def_struct_ui_text(srna, "Float Node Socket", "Floating point number socket of a node");
|
||||
RNA_def_struct_ui_text(srna, "Float Node Socket", "Floating-point number socket of a node");
|
||||
RNA_def_struct_sdna(srna, "bNodeSocket");
|
||||
|
||||
RNA_def_struct_sdna_from(srna, "bNodeSocketValueFloat", "default_value");
|
||||
|
@ -8985,7 +8985,7 @@ static void rna_def_node_socket_float(BlenderRNA *brna,
|
|||
/* socket interface */
|
||||
srna = RNA_def_struct(brna, interface_idname, "NodeSocketInterfaceStandard");
|
||||
RNA_def_struct_ui_text(
|
||||
srna, "Float Node Socket Interface", "Floating point number socket of a node");
|
||||
srna, "Float Node Socket Interface", "Floating-point number socket of a node");
|
||||
RNA_def_struct_sdna(srna, "bNodeSocket");
|
||||
|
||||
RNA_def_struct_sdna_from(srna, "bNodeSocketValueFloat", "default_value");
|
||||
|
|
|
@ -1972,7 +1972,7 @@ static void rna_Object_fmap_remove(Object *ob, ReportList *reports, PointerRNA *
|
|||
bFaceMap *fmap = fmap_ptr->data;
|
||||
if (BLI_findindex(&ob->fmaps, fmap) == -1) {
|
||||
BKE_reportf(
|
||||
reports, RPT_ERROR, "FaceMap '%s' not in object '%s'", fmap->name, ob->id.name + 2);
|
||||
reports, RPT_ERROR, "Face map '%s' not in object '%s'", fmap->name, ob->id.name + 2);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2156,7 +2156,7 @@ static void rna_def_face_map(BlenderRNA *brna)
|
|||
|
||||
prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
|
||||
RNA_def_property_ui_text(prop, "Select", "Face-map selection state (for tools to use)");
|
||||
RNA_def_property_ui_text(prop, "Select", "Face map selection state (for tools to use)");
|
||||
/* important not to use a notifier here, creates a feedback loop! */
|
||||
|
||||
prop = RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
|
||||
|
|
|
@ -3137,7 +3137,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
|
|||
prop = RNA_def_property(srna, "drag_factor", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_float_sdna(prop, NULL, "dragfac");
|
||||
RNA_def_property_range(prop, 0.0f, 1.0f);
|
||||
RNA_def_property_ui_text(prop, "Drag", "Amount of air-drag");
|
||||
RNA_def_property_ui_text(prop, "Drag", "Amount of air drag");
|
||||
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
||||
|
||||
prop = RNA_def_property(srna, "brownian_factor", PROP_FLOAT, PROP_NONE);
|
||||
|
|
|
@ -586,7 +586,7 @@ static void rna_def_render_engine(BlenderRNA *brna)
|
|||
|
||||
func = RNA_def_function(srna, "begin_result", "RE_engine_begin_result");
|
||||
RNA_def_function_ui_description(
|
||||
func, "Create render result to write linear floating point render layers and passes");
|
||||
func, "Create render result to write linear floating-point render layers and passes");
|
||||
parm = RNA_def_int(func, "x", 0, 0, INT_MAX, "X", "", 0, INT_MAX);
|
||||
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
||||
parm = RNA_def_int(func, "y", 0, 0, INT_MAX, "Y", "", 0, INT_MAX);
|
||||
|
|
|
@ -3222,7 +3222,7 @@ void RNA_def_rna(BlenderRNA *brna)
|
|||
srna = RNA_def_struct(brna, "FloatProperty", "Property");
|
||||
RNA_def_struct_ui_text(srna,
|
||||
"Float Definition",
|
||||
"RNA floating point number (single precision) property definition");
|
||||
"RNA floating-point number (single precision) property definition");
|
||||
rna_def_number_property(srna, PROP_FLOAT);
|
||||
|
||||
/* StringProperty */
|
||||
|
|
|
@ -246,7 +246,7 @@ const EnumPropertyItem rna_enum_curve_fit_method_items[] = {
|
|||
"REFIT",
|
||||
0,
|
||||
"Refit",
|
||||
"Incrementally re-fit the curve (high quality)"},
|
||||
"Incrementally refit the curve (high quality)"},
|
||||
{CURVE_PAINT_FIT_METHOD_SPLIT,
|
||||
"SPLIT",
|
||||
0,
|
||||
|
@ -5445,7 +5445,7 @@ static void rna_def_image_format_stereo3d_format(BlenderRNA *brna)
|
|||
|
||||
prop = RNA_def_property(srna, "use_sidebyside_crosseyed", PROP_BOOLEAN, PROP_BOOLEAN);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", S3D_SIDEBYSIDE_CROSSEYED);
|
||||
RNA_def_property_ui_text(prop, "Cross-Eyed", "Right eye should see left image and vice-versa");
|
||||
RNA_def_property_ui_text(prop, "Cross-Eyed", "Right eye should see left image and vice versa");
|
||||
RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Stereo3dFormat_update");
|
||||
|
||||
prop = RNA_def_property(srna, "use_squeezed_frame", PROP_BOOLEAN, PROP_BOOLEAN);
|
||||
|
@ -7626,14 +7626,14 @@ void RNA_def_scene(BlenderRNA *brna)
|
|||
|
||||
prop = RNA_def_property(srna, "frame_subframe", PROP_FLOAT, PROP_TIME);
|
||||
RNA_def_property_float_sdna(prop, NULL, "r.subframe");
|
||||
RNA_def_property_ui_text(prop, "Current Sub-Frame", "");
|
||||
RNA_def_property_ui_text(prop, "Current Subframe", "");
|
||||
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
||||
RNA_def_property_range(prop, 0.0f, 1.0f);
|
||||
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.01, 2);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_FRAME, "rna_Scene_frame_update");
|
||||
|
||||
prop = RNA_def_property(srna, "frame_float", PROP_FLOAT, PROP_TIME);
|
||||
RNA_def_property_ui_text(prop, "Current Sub-Frame", "");
|
||||
RNA_def_property_ui_text(prop, "Current Subframe", "");
|
||||
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
||||
RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
|
||||
RNA_def_property_ui_range(prop, MINAFRAME, MAXFRAME, 0.1, 2);
|
||||
|
@ -7744,7 +7744,7 @@ void RNA_def_scene(BlenderRNA *brna)
|
|||
PROP_EDITABLE); /* DO NOT MAKE THIS EDITABLE, OR NLA EDITOR BREAKS */
|
||||
RNA_def_property_ui_text(
|
||||
prop,
|
||||
"NLA TweakMode",
|
||||
"NLA Tweak Mode",
|
||||
"Whether there is any action referenced by NLA being edited (strictly read-only)");
|
||||
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL);
|
||||
|
||||
|
|
|
@ -276,7 +276,7 @@ void RNA_api_scene(StructRNA *srna)
|
|||
func, "frame", 0, MINAFRAME, MAXFRAME, "", "Frame number to set", MINAFRAME, MAXFRAME);
|
||||
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
||||
RNA_def_float(
|
||||
func, "subframe", 0.0, 0.0, 1.0, "", "Sub-frame time, between 0.0 and 1.0", 0.0, 1.0);
|
||||
func, "subframe", 0.0, 0.0, 1.0, "", "Subframe time, between 0.0 and 1.0", 0.0, 1.0);
|
||||
RNA_def_function_flag(func, FUNC_USE_MAIN);
|
||||
|
||||
func = RNA_def_function(srna, "uvedit_aspect", "rna_Scene_uvedit_aspect");
|
||||
|
@ -411,7 +411,7 @@ void RNA_api_scene(StructRNA *srna)
|
|||
0.0001f,
|
||||
1000.0f);
|
||||
RNA_def_boolean(
|
||||
func, "triangulate", 0, "Triangulate", "Export Polygons (Quads & NGons) as Triangles");
|
||||
func, "triangulate", 0, "Triangulate", "Export polygons (quads and n-gons) as triangles");
|
||||
RNA_def_enum(func,
|
||||
"quad_method",
|
||||
rna_enum_modifier_triangulate_quad_method_items,
|
||||
|
|
|
@ -1943,8 +1943,8 @@ static void rna_def_sequence(BlenderRNA *brna)
|
|||
RNA_def_property_boolean_sdna(prop, NULL, "cache_flag", SEQ_CACHE_STORE_PREPROCESSED);
|
||||
RNA_def_property_ui_text(
|
||||
prop,
|
||||
"Cache Pre-Processed",
|
||||
"Cache pre-processed images, for faster tweaking of effects at the cost of memory usage");
|
||||
"Cache Preprocessed",
|
||||
"Cache preprocessed images, for faster tweaking of effects at the cost of memory usage");
|
||||
|
||||
prop = RNA_def_property(srna, "use_cache_composite", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "cache_flag", SEQ_CACHE_STORE_COMPOSITE);
|
||||
|
|
|
@ -4360,7 +4360,7 @@ static void rna_def_space_view3d(BlenderRNA *brna)
|
|||
RNA_def_property_ui_text(
|
||||
prop,
|
||||
"Local View",
|
||||
"Display an isolated sub-set of objects, apart from the scene visibility");
|
||||
"Display an isolated subset of objects, apart from the scene visibility");
|
||||
|
||||
prop = RNA_def_property(srna, "lens", PROP_FLOAT, PROP_UNIT_CAMERA);
|
||||
RNA_def_property_float_sdna(prop, NULL, "lens");
|
||||
|
|
|
@ -1448,7 +1448,7 @@ static void rna_def_panel(BlenderRNA *brna)
|
|||
RNA_def_property_string_sdna(prop, NULL, "type->parent_id");
|
||||
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Parent ID Name", "If this is set, the panel becomes a sub-panel");
|
||||
prop, "Parent ID Name", "If this is set, the panel becomes a subpanel");
|
||||
|
||||
prop = RNA_def_property(srna, "bl_ui_units_x", PROP_INT, PROP_UNSIGNED);
|
||||
RNA_def_property_int_sdna(prop, NULL, "type->ui_units_x");
|
||||
|
@ -1519,7 +1519,7 @@ static void rna_def_uilist(BlenderRNA *brna)
|
|||
|
||||
prop = RNA_def_property(srna, "use_filter_invert", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "filter_flag", UILST_FLT_EXCLUDE);
|
||||
RNA_def_property_ui_text(prop, "Invert", "Invert filtering (show hidden items, and vice-versa)");
|
||||
RNA_def_property_ui_text(prop, "Invert", "Invert filtering (show hidden items, and vice versa)");
|
||||
|
||||
/* WARNING: This is sort of an abuse, sort-by-alpha is actually a value,
|
||||
* should even be an enum in full logic (of two values, sort by index and sort by name).
|
||||
|
|
|
@ -2455,7 +2455,7 @@ static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
|
|||
prop = RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_float_sdna(prop, NULL, "ds_subchannel");
|
||||
RNA_def_property_array(prop, 3);
|
||||
RNA_def_property_ui_text(prop, "Dope Sheet Sub-Channel", "");
|
||||
RNA_def_property_ui_text(prop, "Dope Sheet Subchannel", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
prop = RNA_def_property(srna, "channel_group", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
|
@ -3334,7 +3334,7 @@ static void rna_def_userdef_theme_space_action(BlenderRNA *brna)
|
|||
prop = RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_float_sdna(prop, NULL, "ds_subchannel");
|
||||
RNA_def_property_array(prop, 4);
|
||||
RNA_def_property_ui_text(prop, "Dope Sheet Sub-Channel", "");
|
||||
RNA_def_property_ui_text(prop, "Dope Sheet Subchannel", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
prop = RNA_def_property(srna, "channels", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
|
@ -5763,7 +5763,7 @@ static void rna_def_userdef_input(BlenderRNA *brna)
|
|||
RNA_def_property_ui_range(prop, DEG2RADF(0.001f), DEG2RADF(15.0f), 1.0f, 2);
|
||||
RNA_def_property_ui_text(prop,
|
||||
"Orbit Sensitivity",
|
||||
"Rotation amount per-pixel to control how fast the viewport orbits");
|
||||
"Rotation amount per pixel to control how fast the viewport orbits");
|
||||
|
||||
prop = RNA_def_property(srna, "view_rotate_sensitivity_trackball", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_range(prop, 0.1f, 10.0f);
|
||||
|
@ -5776,7 +5776,7 @@ static void rna_def_userdef_input(BlenderRNA *brna)
|
|||
RNA_def_property_ui_text(prop,
|
||||
"Mouse Drag Threshold",
|
||||
"Number of pixels to drag before a tweak/drag event is triggered "
|
||||
"for mouse/track-pad input "
|
||||
"for mouse/trackpad input "
|
||||
"(otherwise click events are detected)");
|
||||
|
||||
prop = RNA_def_property(srna, "drag_threshold_tablet", PROP_INT, PROP_PIXEL);
|
||||
|
|
|
@ -2310,7 +2310,7 @@ static void rna_def_window_stereo3d(BlenderRNA *brna)
|
|||
|
||||
prop = RNA_def_property(srna, "use_sidebyside_crosseyed", PROP_BOOLEAN, PROP_BOOLEAN);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", S3D_SIDEBYSIDE_CROSSEYED);
|
||||
RNA_def_property_ui_text(prop, "Cross-Eyed", "Right eye should see left image and vice-versa");
|
||||
RNA_def_property_ui_text(prop, "Cross-Eyed", "Right eye should see left image and vice versa");
|
||||
}
|
||||
|
||||
static void rna_def_window(BlenderRNA *brna)
|
||||
|
|
|
@ -1288,7 +1288,7 @@ static void rna_def_gizmo(BlenderRNA *brna, PropertyRNA *cprop)
|
|||
prop = RNA_def_property(srna, "use_tooltip", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_funcs(
|
||||
prop, "rna_Gizmo_flag_use_tooltip_get", "rna_Gizmo_flag_use_tooltip_set");
|
||||
RNA_def_property_ui_text(prop, "Use Tooltip", "Use tool-tips when hovering over this gizmo");
|
||||
RNA_def_property_ui_text(prop, "Use Tooltip", "Use tooltips when hovering over this gizmo");
|
||||
/* No update needed. */
|
||||
|
||||
/* wmGizmo.state (readonly) */
|
||||
|
|
|
@ -295,7 +295,7 @@ static void rna_def_workspace_tool(BlenderRNA *brna)
|
|||
RNA_define_verify_sdna(0);
|
||||
prop = RNA_def_property(srna, "has_datablock", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_ui_text(prop, "Has Datablock", "");
|
||||
RNA_def_property_ui_text(prop, "Has Data-Block", "");
|
||||
RNA_def_property_boolean_funcs(prop, "rna_WorkSpaceTool_has_datablock_get", NULL);
|
||||
RNA_define_verify_sdna(1);
|
||||
|
||||
|
|
|
@ -3618,7 +3618,7 @@ static void WM_OT_stereo3d_set(wmOperatorType *ot)
|
|||
"use_sidebyside_crosseyed",
|
||||
false,
|
||||
"Cross-Eyed",
|
||||
"Right eye should see left image and vice-versa");
|
||||
"Right eye should see left image and vice versa");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
}
|
||||
|
||||
|
|
|
@ -1079,7 +1079,7 @@ static int arg_handle_debug_value_set(int argc, const char **argv, void *UNUSED(
|
|||
|
||||
static const char arg_handle_debug_fpe_set_doc[] =
|
||||
"\n\t"
|
||||
"Enable floating point exceptions.";
|
||||
"Enable floating-point exceptions.";
|
||||
static int arg_handle_debug_fpe_set(int UNUSED(argc),
|
||||
const char **UNUSED(argv),
|
||||
void *UNUSED(data))
|
||||
|
|
Loading…
Reference in New Issue