Commit Graph

2501 Commits

Author SHA1 Message Date
Campbell Barton 356afe0085 Fix possible NULL pointer use 2015-06-11 23:58:53 +10:00
Campbell Barton af980a20a4 Fix T37746: Presets in splash failed to redraw 2015-06-09 21:55:35 +10:00
Dalai Felinto e1b8ed8dd4 Multiview: fix Time Sequential crash when screen is fullscreen T44688
ED_screen_duplicate() was never written to support non-fullscreen modes.
This is prior to the hidden ui fullscreen commit, and it's quite ancient
in Blender's code (since Jan/08 - 1363134d)

That's why duplicate window, and new screen operators are disabled when
screen is full.
2015-06-08 18:48:52 -03:00
Campbell Barton 962f764d58 WM: refactor window code for stereo3d
Window copy code made it hard to test fixes.
2015-06-09 01:27:40 +10:00
Campbell Barton f8385de5ed Remove redundant NULL check 2015-06-09 01:27:40 +10:00
Julian Eisel 4f94947157 Fix T44976: 3D View turns into an Image Editor after saving render
result

Was a case of two stacked temporary fullscreens, so a quite extreme
situation.
2015-06-08 16:04:00 +02:00
Campbell Barton b54e95a5c8 Alternative fix copying windows from popup dialogs
It could still crash if the window was freed and another was activated. see T44688.
2015-06-08 16:02:57 +10:00
Bastien Montagne 94e7ac5b97 Fix wrong usage of THB_NORMAL size when generating .blend file thumbnail at save time.
We do not use that size of preview anymore, only THB_LARGE...
2015-06-05 19:42:59 +02:00
Campbell Barton c8711b6f6f Fix T40621: Tablet in walk mode fails
Add support for walk mode /w absolute pointing devices.
2015-06-01 20:07:57 +10:00
Campbell Barton 07a6d4ed75 WM: include tablet data in WM_event_print 2015-06-01 17:40:52 +10:00
Campbell Barton bfa7586ba3 Fix T44747: Drag toggle /w nodes (glitch)
It was possible to perform actions while performing a drag-toggle.
2015-06-01 16:40:43 +10:00
Campbell Barton 565faadd8e Cleanup: doxygen comments 2015-06-01 14:56:07 +10:00
Campbell Barton b147473f02 Fix T44892: Cursor warp, invoked outside the area
If an operator starts outside an area, don't use warping.
(problematic for menu's).
2015-06-01 12:03:02 +10:00
Campbell Barton d9b6768521 Fix T44688: Stereo3D time-sequential crashes 2015-05-28 18:46:15 +10:00
Campbell Barton 4be7258f00 WM: remove windows if they fail to initialize 2015-05-28 18:46:15 +10:00
Antony Riakiotakis 930bf58478 Clamp min/max frame rate for player 2015-05-27 20:02:53 +02:00
Campbell Barton 718bc078a8 Fix T44740: Tweak events stuck (ignored release)
Tweak event was being added to the end of the event queue (out of order),
meaning any mouse releases already in the queue wouldn't be used to exit the gesture.
Gestures could get stuck (mostly when the system wasn't able to handle events fast enough).

Now tweak events are now added in order.
2015-05-26 20:07:58 +10:00
Campbell Barton f01c6e185f Cleanup: typos 2015-05-23 22:38:47 +10:00
Antony Riakiotakis f6062638c1 Fix crash in blenderplayer when scrubbing off screen.
Was cache referencing deleted or NULL items.

Reported by Kopias on irc
2015-05-21 17:37:11 +02:00
Campbell Barton 183b643774 Building without Python works again 2015-05-19 11:38:07 +10:00
Campbell Barton 29aae4db38 UI: errors in buttons now show in info report
Mistakes in button expressions were previously only printed to the console.
2015-05-18 10:02:29 +10:00
Brecht Van Lommel 43ee3f4040 Fix T44739: OS X RMB emulation giving wrong mouse button release event. 2015-05-17 16:55:18 +02:00
Campbell Barton eeadd19eb5 Cleanup: use define for playback frame limiter 2015-05-16 08:35:25 +10:00
Campbell Barton 80c0097210 Only initialize icons in background mode.
Also enable this for headless builds too.

Calling UI_icons_init would initialize matcaps, brushes etc...
2015-05-16 06:21:26 +10:00
Bastien Montagne b931afe55e Fix new 'custom previews/icons' py feature crashing in background mode.
We want this even without UI, some scripts may use it in a background processing
mode to avoid too heavy process in actual 'user' blender...
2015-05-15 20:12:25 +02:00
Antony Riakiotakis f4e8e70b5d Add really simple memory reduction scheme for internal animation player.
Holds 30 frames in memory. Could make it check memory instead but that
should suffice for now to make sure blender does not crash on me with
movie files.

Previously the system would load eveything in memory so something like
playing caminandes in player would swap after 30 seconds in local
computer.
2015-05-15 16:01:01 +02:00
Julian Eisel 7549ec7301 Fix some issues found by Coverity Scan
Some of them are just brain dead code, some are potential bugs.
2015-05-15 01:08:41 +02:00
Antony Riakiotakis 1ccc417477 Invert value calculation for percentages it makes more sense that way 2015-05-14 14:22:57 +02:00
Antony Riakiotakis 7aa74dfe5e Radial operator:
Percentage properties use interaction like factors with number feedback
and easier way to go predict lower percentages.
2015-05-14 14:01:33 +02:00
Bastien Montagne d30f664c04 Expose PreviewImage & custom icons to py API.
This commit mainly:

* Exposes PreviewImage struct in RNA, including ways for user to set images data.
* Adds a new kind of PreviewImage, using a file path and IMB_thumb to get image.
* Adds a new kind of custom icon using PreviewImage, unrelated to ID previews system.
* Adds a python API (utils.previews) to allow python scripts to access those custom previews/icons.

Note that loading image from files' thumbnails is done when needed (deferred loading), not
when defining the custom preview/icon.

WARNING: for release addons who would want to use this, please keep it to a strict minimum, really needed level.
We do not want our UI to explode under hundreds of different flashy icons!

For more info, see also the release notes of Blender 2.75 (http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.75/Addons)
and the example/templates featured with Blender.

Patch by Campbell (ideasman42), Inês (brita) and Bastien (mont29).

Differential Revision: https://developer.blender.org/D1255
2015-05-11 16:37:15 +02:00
Campbell Barton 097862cb26 GHash: avoid redundant casts 2015-05-11 12:39:39 +10:00
Campbell Barton a077be3658 Cleanup: use r_* prefix for return args 2015-05-08 07:25:39 +10:00
Campbell Barton 74dc4e87a6 Fix Buttons context, invalid object data access
Another instance of T44376.
Crash where the Python context would access a stale pointer to the active object.
2015-05-04 18:06:31 +10:00
Campbell Barton 77e6a001a9 Fix T44376: Buttons context, invalid data access
Removing a scene from the buttons window would crash from a Python operator.
2015-05-04 16:01:20 +10:00
Campbell Barton 8d5e57748a Cleanup: WM_main_remove_notifier_reference
Assumed the `reference` pointer is an ID, currently true, but may not always be.
Add a callback specifically for this purpose since cleaning up notifiers and space-types are different operations.
2015-05-04 16:01:20 +10:00
Campbell Barton da8a62adce Cleanup: naming for callback wrappers 2015-05-04 16:01:20 +10:00
Brecht Van Lommel bf7098a93f Auto pack: don't show "No new files have been packed" on every .blend file save. 2015-05-01 19:20:42 +02:00
Bastien Montagne f271d85b86 Fix T44439: outliner's treestore could keep invalid ID pointers, could crash on undo due to invalid mem access.
We cannot nuke treestore in readfile's `blo_lib_link_screen_restore()`, because this will
destroy all UI-state data (like opened/closed items, etc.).

Since we cannot know for sure whether an ID pointer from tselem->id is valid here, we
have to ensure they are never invalid, i.e. to always set them to NULL when we delete them.

To do so, this commit uses a similar approach as what already exists for ID references
in WM notifiers - it extends `free_notifier_reference_cb()` to also nullify those IDs in
all outliners.

Note that some ID types are not used(shown) by outliner currently, so `TREESTORE_ID_TYPE` macro
was added, that checks whether an ID is possibly used by outliner. Avoids a few searches
in whole tree whene deleting some IDs.

Reviewers: campbellbarton, sergey

Maniphest Tasks: T44439

Differential Revision: https://developer.blender.org/D1272
2015-04-30 14:28:22 +02:00
Antony Riakiotakis 18ba32df37 Don't check against scene notifier twice 2015-04-29 16:28:20 +02:00
Bastien Montagne 6ada7a1a0b Usual UI messages fixes... 2015-04-27 20:10:32 +02:00
Campbell Barton 3f80accfb3 Fix T44011: Ruler/Knife/Loop-cut fail in quad-view
This is a kind of sloppy-focus,
resolving long standing bug with loop-cut/knife/ruler /w quad-view.

Where activating a tool would lock onto one of quad-views,
especially problematic when activating from the toolbar or menus.
2015-04-27 19:17:07 +10:00
Campbell Barton 5e1eb8cdcf Cleanup: rename GRAB_POINTER -> GRAB_CURSOR
Term pointer is overloaded already.
2015-04-27 18:58:53 +10:00
Julian Eisel cf366c8b66 UI: 'View Online Manual' Shortcut
D1031, implement proposal T37478 to give easy access to the online manual.

Use Alt+F1 while hovering over a button/setting.
2015-04-27 01:35:24 +10:00
Julian Eisel 3bffcc675b Fix T42495: Fullscreen area icon glitch
Tried a couple of things to trigger an update/redraw for the exact right
moment (sending azone update event, timer, delayed redraw, etc) but this
seems to work rock solid without being *that* ugly.
2015-04-25 01:29:53 +02:00
Dalai Felinto 7e66f0e9d4 Multi-View: Set Stereo 3D operator support for EXEC calls 2015-04-24 13:07:33 -03:00
Dalai Felinto 27ac96dbae Multi-View: rolls back to a non quadbuffer friendly window if displaymode changes from pageflip to something else
In some cases the graphic card supports quadbuffer, but not the display.
In this case it is nice to go back to a window that does not have
quadbuffer if you change back to anaglyph, interlace, ...

Otherwise you may be stuck with a flickering window
2015-04-24 13:06:49 -03:00
Dalai Felinto efe41ae7fd Multiview: Quadbuffer (time sequential) working [debug builds only]
I'll enable this mode in Release builds once I figure out how to best
handle opening files that are saved with the quadbuffer mode.

In fact I think no display mode should be saved/read from a file.

Tested in Linux with NVidia 3D Vision and NVidia 3D Vision Pro with
NVidia Quadro FX 580 and Quadro FX 4600.

(kudos for the Visgraf Lab at IMPA, for having me around with all those
gadgets ;)

Thanks for Cédric Paille (cedricp) for the code snippets and tests -
T44327
2015-04-23 19:50:52 -03:00
Campbell Barton 57d9badc21 Cleanup: use bool /w flag checks 2015-04-21 01:50:20 +10:00
Campbell Barton 252b0cf5d2 Cleanup: API naming use BKE_undo_ prefix 2015-04-18 18:25:07 +02:00
Antony Riakiotakis 230712e6cb Autosave:
Flush edits only when saving global undo. This will stop freeing of PBVH
in sculpt mode, which introduces some pretty severe freezes, especially
in dyntopo. For global undo we flush the contents of the global undo
buffer which does not include localized edits of sculpt/edit mode, so
those data will not get saved anyway.
2015-04-18 15:50:29 +02:00