Reported by Thomas Engel
Fix [#26938] Blender Zoom not working after startup (Windows)
Reported by Ilija Boshkov
by applying patch [#26881] Fix for console disappearing in debug mode [Windows]
Submitted by Alexander Kuznetsov (AlexK)
The patch moves console toggling code into GHOST and improves on the toggling behaviour.
The patch changes handling of WM_SYSCOMMAND so that alt-key toggling isn't a problem anymore.
Displays a global progress indicator in the application icon reflecting the total progress of all running jobs.
Currently fully implemented on OSX (Cocoa).
On other OSes that do not allow to redraw the app icon, this can be implemented as a [x%] display in the app title, so to appear in the taskbar.
Thanks to Matt for the windowmanager wrapper.
Added GHOST_TUns16 numOfAASamples parameter to GHOST_CreateWindow to specify the number of AA samples (null if no AA wanted)
Implemented it in the cascade of GHOST classes.
Full implementation currently done for OSX/Cocoa, stubs for other OSes.
Moguri : it's ready for your win32 implementation !
Note that fallback to a non AA window (if gfx card doesn't support AA) is done inside GHOST OS specific layer, so that blender windowmanager still gets its window created properly.
The dragging sequence is performed in four phases:
- Start sequence (GHOST_kEventDraggingEntered) that tells a drag'n'drop operation has started. Already gives the object data type, and the entering mouse location
- Update mouse position (GHOST_kEventDraggingUpdated) sent upon each mouse move until the drag'n'drop operation stops, to give the updated mouse position.
Useful to highlight a potential destination, and update the status (through GHOST_setAcceptDragOperation) telling if the object can be dropped at the current cursor position.
- Abort drag'n'drop sequence (GHOST_kEventDraggingExited) sent when the user moved the mouse outside the window.
- Send the dropped data (GHOST_kEventDraggingDropDone)
- Outside of the normal sequence, dropped data can be sent (GHOST_kEventDraggingDropOnIcon). This can happen when the user drops an object on the application icon. (Also used in OSX to pass the filename of the document the user doubled-clicked in the finder)
Note that the event handler is responsible for freeing the received data.
And the mouse position is sent directly in blender client coordinates (y=0 at bottom)
The GHOST_setAcceptDragOperation(TRUE) call must be placed before the user drops the object for it to be accepted.
Current handled data types :
- Text string
- Array of filenames (full paths)
- Bitmap image (not implemented yet)
- Use an enum for grab modes rather then boolean options.
-- GHOST_kGrabNormal: continuous grab userpref disabled
-- GHOST_kGrabWrap: wrap the mouse at the screen bounds *
-- GHOST_kGrabHide: hide the mouse while grabbing and restore the mouse where it was initially pressed *
GrabWrap is nice for transform and tools where you want some idea where the cursor is, previously I found both restoring the mouse at its original location and restoring at a clamped location was confusing with operators like transform, wrapping is not ideal but IMHO the best of a bad bunch of options.
GrabHide is for numbuts, where restoring the mouse at the initial location isnt so confusing.
- Useful for dragging buttons to the far right when theyd otherwise hit the screen edge.
- Useful for transform though probably NOT what you want when using the transform manipulator (should make an option).
- When enabled, number buttons use this as well as a different conversion of mouse movement
float numbuts: mouse 1px == 1-clickstep
int numbuts: 2px == 1 (tried 1:1 but its too jitter prone)
details...
- access as an option to GHOST_SetCursorGrab(grab, warp)
- Currently all operators that grab use this, could be made an operator flag
- only Ghost/X11 supported currently
- Window creation at preferred size
Implement in Ghost the use of Cocoa functions to get the maximum visible rect (size and position) for the window contents (all screen excluding dock, top menu, and window title bar)
Thus Apple specific code in window creation (wm_window.c & wm_apple.c) is no more needed => removed in case of Cocoa build
- Alert on exiting despite unsaved changes
Add to GHOST method to maintain an all platforms (not apple specific anymore) status on unsaved changes
Update GHOST_SystemCocoa to use this for asking or not user to confirm exit without saving changes
* Pass on mouse location on window leave/enter too, fixing some
issues with button highlights and tooltips.
* When a modal operator runs, grab the mouse cursor so that for
example transform still works when you move your mouse outside
of the window, previously it would just stop then. This is
automatic now for all modal ops, perhaps not always needed?
* Fix for a trailing button highlight issue.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
it is now in a state where it can be safely
merged with trunk.
Note: basic icons were provided but I'm not
an icondesigner and working in a 16x15 grid
is way too small for me, so feel free to
change them.
Changed getClipboard to GHOST_getClipboard and putClipboard to GHOST_putClipboard
Removed ghost calls from blender and added the calls to winlay.h and ghostwinlay.c
This cleand up casts in drawtext.c
- Moved WIN32 code to ghost and added code for other systems.
- Added functions getClipboard(flag), and putClipboard(buffer, flag)
-Flag is used on X11 to request selection buffer or clipboard.
-If any other system uses flag = 1 the function returns doing nothing.
- Changed ctrl +c/v and shift+ctrl + c/v to do the same thing (use the clipboard).
- Changed the menu items (copy, paste) to use the clipboard.
work only in non camera mode in 3D view
need the external plug-in to be compiled separately
line 894 of ghostwinlay.c must be replaced with
values adapted at your system
see mailing list for features planned and how
to use
notes :
it compiles but is non functional
lacks the platform specific changes in ghost ( i cant test windows)
lacks the code for plug-in.
the platform specific code will be added when we sync with Ettore work
the plug-in itself cannot be added here
This is 'ported' from Nicholas Bishop's sculpting GSoC tree. I'm bringing it
over now so a) it can be there for when lukep does his GHOST refactor b) it's
something that GHOST should have anyway, particularly now there's interest in
painting tools and c) it's missing support in Windows, so hopefully now some
enterprising Windows coder can add that more easily in the main bf tree.
Right now X11 and Mac OS X are supported. I added and can maintain the Mac OS X
part, but I'm not familiar with the Xinput stuff, which Nicholas wrote. Both
X11 and Mac are collecting active device and pressure, and Mac is also
collecting x and y tilt data. Up to coders how they want to use this info! :)
Although the data's coming in, I haven't actually made this do anything. I
thought it best to leave it to brecht to figure out what he wants to do with the
painting stuff, and I wonder what other interesting uses there could be for it
(proportional edit?). I'll write implementation details in a separate mail to
the committers list.
I took out the following from the includes in the intern dir that still had
it:
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
Kent
--
mein@cs.umn.edu