}
}
+void XYWnd::SetCustomPivotOrigin( int pointx, int pointy ){
+ Vector3 point;
+ XY_ToPoint( pointx, pointy, point );
+ VIEWTYPE viewtype = static_cast<VIEWTYPE>( GetViewType() );
+ const int nDim = ( viewtype == YZ ) ? 0 : ( ( viewtype == XZ ) ? 1 : 2 );
+ //vector3_snap( point, GetSnapGridSize() );
+ point[nDim] = 999999;
+
+ GlobalSelectionSystem().setCustomPivotOrigin( point );
+ SceneChangeNotify();
+}
+
unsigned int MoveCamera_buttons(){
return RAD_CONTROL | ( g_glwindow_globals.m_nMouseType == ETwoButton ? RAD_RBUTTON : RAD_MBUTTON );
}
}
}
+unsigned int SetCustomPivotOrigin_buttons(){
+ return RAD_MBUTTON | RAD_SHIFT;
+}
+
/*
==============
NewBrushDrag
void XYWnd::Move_End(){
m_move_started = false;
- g_xywnd_freezePointer.unfreeze_pointer( m_parent ? m_parent : MainFrame_getWindow() );
+ g_xywnd_freezePointer.unfreeze_pointer( m_parent ? m_parent : MainFrame_getWindow(), false );
g_signal_handler_disconnect( G_OBJECT( m_gl_widget ), m_move_focusOut );
}
void XYWnd::Zoom_End(){
m_zoom_started = false;
- g_xywnd_freezePointer.unfreeze_pointer( m_parent ? m_parent : MainFrame_getWindow() );
+ g_xywnd_freezePointer.unfreeze_pointer( m_parent ? m_parent : MainFrame_getWindow(), false );
g_signal_handler_disconnect( G_OBJECT( m_gl_widget ), m_zoom_focusOut );
}
else if ( buttons == OrientCamera_buttons() ) {
XYWnd_OrientCamera( this, x, y, *g_pParentWnd->GetCamWnd() );
}
+ else if ( buttons == SetCustomPivotOrigin_buttons() ) {
+ SetCustomPivotOrigin( x, y );
+ }
else
{
m_window_observer->onMouseDown( WindowVector_forInteger( x, y ), button_for_flags( buttons ), modifiers_for_flags( buttons ) );
XYWnd_OrientCamera( this, x, y, *g_pParentWnd->GetCamWnd() );
}
+ else if ( buttons == SetCustomPivotOrigin_buttons() ) {
+ SetCustomPivotOrigin( x, y );
+ }
+
else
{
m_window_observer->onMouseMotion( WindowVector_forInteger( x, y ), modifiers_for_flags( buttons ) );