Commit Graph

378 Commits

Author SHA1 Message Date
be71c46b24 code cleanup: minor BMESH_TODO's, some were left in even though they were done/invalid. 2013-04-15 04:34:14 +00:00
c9a10b99ff Cycles: optimization for 3D viewport border render with heavy scenes, the OpenGL
render of objects could slow things down when redrawing the view each time a new
sample is displayed.

Now it does a partial redraw of the viewport with only the render border area,
skipping OpenGL object drawing while the render is refining.
2013-04-14 21:42:58 +00:00
40ab9be14a Bug fix:
On screen/area refresh calls the header scroll offset was cleared too. 
Probably an old remainder of early 2.5 coding. Should be not needed so much.
2013-03-25 15:45:59 +00:00
660be3da39 use gcc warning -Wredundant-decls, exposes some odd/duplicate declarations which have been removed. 2013-03-11 20:27:38 +00:00
af16cd804c Bugfix #34365
Tiny tweak.

Dragging option (cursor change) for region dividers in editors was having an 
un-even sensitivity hotspot. This conflicted with header buttons for example,
where the hotspot and bottons overlapped.

Now the hotspot is around the region-edge evenly.
2013-03-10 14:30:24 +00:00
ddddb7bab1 code cleanup: favor braces when blocks have mixed brace use. 2013-03-09 03:46:30 +00:00
a9b9fcc951 style cleanup 2013-02-24 20:33:21 +00:00
b1543f07bf Another bunch of UI translation fixes, thanks to Leon Cheung, Gabriel Gazzán and S. Lockal for spotting them! 2013-02-24 15:40:28 +00:00
89e0de3c35 Bug fix #34347
If you move (with F5) the properties and tools region in 3d viewport to the same side,
the mini-axis and text overlays were drawing in wrong place.
2013-02-23 14:31:46 +00:00
2c084e280d code cleanup: remove unused arg 2013-02-22 00:51:58 +00:00
7175549de6 Fix DPI not taken into account for header text (e.g. during transform). 2013-02-20 14:53:31 +00:00
c24777ee9e style cleanup 2013-01-23 23:42:18 +00:00
f0c313c8b6 Fix #33556: overlapping regions draw over render info at the top of 3d view and
image editor. Also fix it not scaling properly with DPI.
2013-01-23 14:05:08 +00:00
682df047a0 style cleanup 2013-01-08 02:06:16 +00:00
d4eac8189e Removed on old patch from the code, which attempted to keep the scrollers
in user preferences in place.

New scroller code made user pref scroller jump back on activating add-ons,
because that causes a full blender system refresh.
2012-12-31 14:56:07 +00:00
857df8065f style cleanup 2012-12-28 14:19:05 +00:00
41753f4fdd Node editor: remove option to show overlapping Property region.
- The main window has sliders, which was drawn behind the region
- If property region had slider too, it got even worse.

Basically the node editor is UI view, so drawing another UI on top isn't
functioning well in general.
2012-12-26 13:25:13 +00:00
fa28e50ac2 Region scrollbar fix!
Now scrollbars correctly hide and show, making space for the actual contents
in a region. It solves several old hacks, and puts view2d code a bit more
back in control as well. 

Implementation notes:

- The view2d mask feature is working again
- The #define V2D_SCROLL_HORIZONTAL_HIDE means: "turn on hiding".
- Code for UI_view2d_region_reinit() is enforcing better standard view settings

But... two hack/patches needed to be added:

- Region panel drawing: if after generating the button panels it appears
  a scroller hides or reveils, it calls all the generating code again.
  (a simple scale doesn't work due to rounding differences in layout code)

- View2d code that maps 'tot' and 'cur' rects: if this code detects that
  the mask changes, it calcs the map code again.

Also a bugfix (issue in 2.65)

- The left/bottom area split widget was drawing 1 pixel too large sometimes, 
  leaving bad trails on moving area dividers.
2012-12-26 13:05:39 +00:00
482630652b Bugfix, in 2.61.1
Overlapping regions now hide automatic when too little space is left.
2012-12-19 16:16:20 +00:00
9aa6698bd0 UI DPI scaling:
Recoded the (2.65.1 version) region scale, which happened on loading files with 
different saved size windows. Also scaling window itself was affected.

Old method: scaled region widths based on area/editor scaling factors.
That was leading to too small or too large button regions easily.

New method: region width/height now are in DPI control. Much nicer!
- On changing dpi, buttons remain visually same widths.
- On changing window sizes, the button views and zooms stick to exactly same.

Caveat: people who were using Blender with 'extreme' dpi setting, might find
the layouts slightly differ. Not sure if this is worth version patching...

Todo: overlapping regions that overlap together draw badly. Fix underway.
2012-12-19 15:44:47 +00:00
6b2af22d37 DPI: fix wrong scaling of editor type choosing buttons, and for menu arrows
overlapping or being too close to icons in small buttons.
2012-12-18 20:00:52 +00:00
f91eefcc62 Fix region expander (+) drawing too narrow. 2012-12-18 14:55:51 +00:00
9c90cf3ca4 Nicer function for drawing text in 3d window:
ED_region_visible_rect(ar, rect)
Returns the visible rect inside a region, subtracting the overlapping UI regions.

Added with minimal overhead, only called once per region draw.

Also fixes the 'Auto Key' warning print in 3d window (was behind properties)
2012-12-18 13:59:47 +00:00
60e35be2d4 UI fixes:
- on setting lower DPI, the regions that were scrolled down would start moving down
  1 pixel on every draw. Caused by rounding error. (int + 0.1 vs int -0.1)
  (Ancient bug)

- circles used in outliner - to denote selection/active - now draw bigger, and better
  centered. (2.66 fix only)
2012-12-17 17:37:48 +00:00
7b5784e37c Test print in bugfix... 2012-12-16 14:50:50 +00:00
7965b6995e Bug fix 33563
Region sizex/sizey should store the actual used sizes, for hide/reveal.
Didn't happen correctly, resulting in opening button regions of size 1.
2012-12-16 14:19:29 +00:00
e114459ba3 Fix region overlap drawing over render info text in image editor and 3d view. 2012-12-16 09:37:15 +00:00
35dd893c36 Bugfix, irc collection:
With larger header sizes (via DPI setting), splitting an area horizontally (using
left-bottom corner widget, move up) stopped immediate after split, not allowing 
to drag it to a position.

Culprit was code to check minimum header size, and area operator using the same
flags. Now ScrVert has two flags - one for internal use, one for the tools to set.
2012-12-15 09:45:34 +00:00
5e9ee25328 style cleanup 2012-12-14 04:38:52 +00:00
ae2a9a6e7a Bug fix, irc report:
Overlapping regions, when you both want them on the same side they should not overlap
each other! (Try F5 on a region to flip position).

Code for subdivision is in need for some cleanup - a branching recursion is needed.
2012-12-13 17:43:12 +00:00
a63f0d320b Bugfix [#33511]
Overlapping regions: when dragging the region to close them, it started the blending
timer - which of course is not meant to happen.
2012-12-13 12:17:57 +00:00
0260e4b8a3 code cleanup: quiet warnings 2012-12-13 00:47:47 +00:00
12b642062c Holiday coding log :)
Nice formatted version (pictures soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability

Short list of main changes:

- Transparent region option (over main region), added code to blend in/out such panels.
- Min size window now 640 x 480
- Fixed DPI for ui - lots of cleanup and changes everywhere. Icon image need correct size still, layer-in-use icon needs remake.
- Macbook retina support, use command line --no-native-pixels to disable it
- Timeline Marker label was drawing wrong
- Trackpad and magic mouse: supports zoom (hold ctrl)
- Fix for splash position: removed ghost function and made window size update after creation immediate
- Fast undo buffer save now adds UI as well. Could be checked for regular file save even...
  Quit.blend and temp file saving use this now.
- Dixed filename in window on reading quit.blend or temp saves, and they now add a warning in window title: "(Recovered)"
- New Userpref option "Keep Session" - this always saves quit.blend, and loads on start.
  This allows keeping UI and data without actual saves, until you actually save.
  When you load startup.blend and quit, it recognises the quit.blend as a startup (no file name in header)
- Added 3D view copy/paste buffers (selected objects). Shortcuts ctrl-c, ctrl-v (OSX, cmd-c, cmd-v). 
  Coded partial file saving for it. Could be used for other purposes. Todo: use OS clipboards. 
- User preferences (themes, keymaps, user settings) now can be saved as a separate file.
  Old option is called "Save Startup File" the new one "Save User Settings".
  To visualise this difference, the 'save startup file' button has been removed from user preferences window. That option is available as CTRL+U and in File menu still.
- OSX: fixed bug that stopped giving mouse events outside window.
  This also fixes "Continuous Grab" for OSX. (error since 2009)
2012-12-12 18:58:11 +00:00
e106003cdb Bugfix 32988
"Area prev space" was setting areas to "Info" - in case no previous editor
could be found. That goes wrong for cases like:

- goto composite screen
- make image editor full
- render
- esc
2012-10-27 15:27:27 +00:00
0e494b74c4 style cleanup 2012-10-26 04:14:10 +00:00
b32bf2c462 code cleanup: use min_/max_ math functions, add minmax_v2_v2v2. 2012-10-25 22:47:54 +00:00
d34f2410a1 Bugfix #24343
Ancient 2.5 UI issue:

The button views in Property Editor have an internal storage, to ensure the view
on the buttons stays same when you switch contextes or select objects.

Bug was that - in case buttons were all scrolled invisible - sometimes no slider
was drawn to indicate that.

Discussion on whether this is a good feature or not: the only improvement would
be to store such settings even per object... but that's a feature creep I think.
2012-10-25 14:49:50 +00:00
0405406280 Bugfix #28298
When I added DPI support in the UI, I added code that refreshes views for 2d
regions. These refreshes also happened on screen switches or file select, causing
header views (horizontal scrolled) to clear.

Now the code less intrusive, changing header views in fewer cases. 

This is a patch provided by Anthony Edlin. Thanks dude!
2012-10-25 12:53:27 +00:00
81eafc49e6 use min_ii/max_ii over MIN2 MAX2 2012-10-24 05:06:40 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
6536e2d01a And more UI messages fixes... 2012-10-08 21:03:35 +00:00
e8872a8ea2 style cleanup: if(); 2012-10-07 09:48:59 +00:00
872cc0c4c0 Kind of cleanup of "menu strings": always have a space between the entry's label and value (these strings are a nightmare to handle in RTL languages like arabic or persian, but a bit less of a nightmare this way ;) ). 2012-10-04 13:59:14 +00:00
232571c61a code cleanup: replace macro for BLI_rect size/center with inline functions. 2012-09-15 11:48:20 +00:00
56b28635e7 code cleanup: rename BLI_in_rctf() --> BLI_rctf_isect_pt(), to conform with our naming convention. 2012-08-23 18:25:45 +00:00
c92ab5c3ef code cleanup: use rect size macros 2012-08-21 20:34:05 +00:00
77f47799dd code cleanup: use BLI_RCT_SIZE macro 2012-08-20 23:06:17 +00:00
26f073b327 macros for rectangle center and size 2012-08-20 15:29:02 +00:00
e9caa21830 fix own error in recent smoothview cleanup, also correct some cross references in bmesh docs. 2012-08-17 14:43:20 +00:00
b8b7e5d137 fix for minor UI annoyance - when the window is fullscreen now dont draw area corners since areas cant be split when fullscreen. 2012-08-11 00:05:57 +00:00