Commit Graph

798 Commits

Author SHA1 Message Date
5674ac9b7e Cleanup identation and fix a bad alignment issue in last commit 2014-11-17 16:12:16 +01:00
e103c9773f Numerical input for changing brush size, strenght or angle.
Patch by Martin Vykoukal, thanks!

This patch adds ability to change brush parameters with keyboard, which
is missing functionality from 2.4x.
Original report: T28811

Reviewers: psy-fi

Differential Revision: https://developer.blender.org/D837
2014-11-17 16:02:44 +01:00
e5ad6348b9 Add PROP_PERCENTAGE to subtypes handled by WM_OT_radial_control operator. 2014-11-16 11:11:05 +01:00
5c6e333780 UI Refactor T41640
Make the UI API more consistent and reduce confusion with some naming.

mainly:
- API function calls
- enum values

some internal static functions have been left for now
2014-11-10 23:06:54 +01:00
31a83ee9f1 Cleanup: mostly use bools for booleans. 2014-11-01 22:25:57 +01:00
2f0bdcb306 Fix T41041: 'Delete keyframe' removes markers too
Operators that trigger UI events (but nothing else)
were using 'CANCELLED' making it impossible to tell if an invoke
function failed, or opened a menu.
2014-10-28 17:51:43 +01:00
ee4fb23361 WM: clear operator memory on file load
Was causing problems when opening scenes with different scale set.
2014-10-28 15:47:51 +01:00
cb7afe5e41 WM: unneeded alloc the operator-type iterator 2014-10-28 15:41:05 +01:00
Dalai Felinto
7c25f16f1a Fullscreen Editor (new fullscreen mode for clean UI)
Organize Maximize/Fullscreen mess and add a new fullscreen mode with no UI

* Maximize Editor: (old Ctrl+Up)
* Full Screen Window: (old Alt + F11)
* Full Screen Editor: new operator (Alt + F10)
* Change Show/Hide Header: (Alt + F9)

When the mode is on moving the mouse near the top right corner of the
editor shows an icon to go back to the normal editor mode.

This was originally intended for the multiview branch, but this
functionality also benefits non-stereo workflows, thus it can be
reviewed and committed independently.

Development notes:
* This includes cleanups in the code to sanitize the naming of
  fullscreen/maximize across the window/editor code.

* Originally the idea was to make the window fullscreen as well, but
  this idea was dropped.

* You can see the clicking area when debug is 1

* Technically the user can be left with an unfaded icon in the corner
  (specially when using a tablet). If we think this is too bad we can
  increase the action zone to be the whole screen, or something similar.

Reviewers: campbellbarton [1], ton [2], fsiddi [2]

[1] actual code review
[2] design review

Differential Revision: https://developer.blender.org/D678
2014-10-14 15:11:41 -03:00
0ba84b7124 Operator to define render border from rendered image editor
This way it is possible to define render border directly from the image editor,
which is useful for at least three things:

- If viewport is really optimized out (simplified etc) then it might be hard to
  guess which exact area you're mainly interested now.

- No need to switch to the viewport to do render border tweaks, could be useful
  when doing compositing.

- If one need to look at particular pixel(s) which is real handy for debugging
  render engines (both Cycles and BI).

Reviewers: campbellbarton, venomgfx

Reviewed By: venomgfx

Differential Revision: https://developer.blender.org/D820
2014-10-08 18:02:49 +02:00
a1d80b9c56 Update link to the Support an Animation Movie link
This is to be in the final release.
2014-10-02 20:47:24 +02:00
cbe68f70a8 Cleanup: spelling 2014-09-29 15:51:47 +10:00
3a40aed3d5 Cleanup: use float versions of functions when in/output are floats 2014-09-24 14:55:02 +10:00
98a78963be Fix crashes with timers.
Incorrectly accessing the menu pointer, set it to NULL before doing the
tests.

We don't restore the menu pointer because it is invalid by the time the operator ends.
2014-09-18 16:02:40 +02:00
3fec3f0bce Fix T41737 using append from menu will result in error message
message in terminal was: RNA_boolean_get: WM_OT_append.relative_path not found.
Added check for existence of the relative path property which was removed from append
since it is not needed and used.
2014-09-07 16:05:44 +02:00
a7f87cfc0d Cleanup: de-duplicate link/append props 2014-09-05 10:16:11 +10:00
61914883ff Separate operators for Link and Append.
Since the choice to link or append has been removed in the file browser operator panel,
there was no way to tell whether as a user you were linking or appending.
To fix this the proposed patch separates the operators.

Reviewers: campbellbarton, carter2422, venomgfx

Subscribers: fsiddi

Maniphest Tasks: T41593

Differential Revision: https://developer.blender.org/D770
2014-09-04 19:35:18 +02:00
fa6080bf33 Support better precision mode for angle properties in radial operator
(holding down shift key) by using the new dial functionality.
2014-08-27 17:47:37 +02:00
71ce415f4a Fix T41462: "Reload from trusted" button not prompting for confirmation.
Made 'revert_mainfile' op also handle the 'use scripts' option, and use it
for this feature (since it has a nice simple invoke confirmation popup).
2014-08-18 14:13:55 +02:00
513b8ddf06 Fix T41421
Don't store selection properties, if those are set in the keymap we can
end uo locking one state forever.
2014-08-15 17:32:05 +02:00
f7dcec1f69 Fix part of T41297.
Add precision mode to radial operator by keeping the shift key pressed.
Precision mode works by checking difference between absolute window
coordinates and the point where shift was pressed and adding those to
the distance between that point and the radial center. This allows
bigger negative/positive range than using a strict radial scheme.
2014-08-14 11:40:10 +02:00
028fd29eeb Pie Menus C code backend.
This commit merges the code in the pie-menu branch.

As per decisions taken the last few days, there are no pie menus
included and there will be an official add-on including overrides of
some keys with pie menus. However, people will now be able to use the
new code in python.

Full Documentation is in http://wiki.blender.org/index.php/Dev:Ref/

Thanks:
Campbell Barton, Dalai Felinto and Ton Roosendaal for the code review
and design comments

Jonathan Williamson, Pawel Lyczkowski, Pablo Vazquez among others for
suggestions during the development.

Special Thanks to Sean Olson, for his support, suggestions, testing and
merciless bugging so that I would finish the pie menu code. Without him
we wouldn't be here. Also to the rest of the developers of the original
python add-on, Patrick Moore and Dan Eicher and finally to Matt Ebb, who
did the research and first implementation and whose code I used to get
started.
2014-08-11 11:02:26 +02:00
f82dda557c Experimental gooseberry request:
Expose radial control properties. That way, the operator can be tweaked
in the input preferences to tweak other properties as well.
2014-08-07 12:29:50 +02:00
13a8f650df Cleanup 2014-07-21 10:53:07 +10:00
00b29156e0 Defines: replace ELEM3-16 with ELEM(...), that can take varargs 2014-07-20 01:33:40 +10:00
414c70435d T39690: Modifications to Blender's 'temp dir' system.
Current temporary data of Blender suffers one major issue - default 'temp' dir on Windows is never
automatically cleaned up, and can end being quite big when used by Blender, especially when we have
to store per-process data (using getpid() in file names).

To address this, this patch:
* Divides tempdir paths in two, one for 'base' temp dir (the same as previous unique tempdir path),
  the other is a mkdtemp-generated sub-dir, specific to each Blender instance.
* Only uses base tempdir when we need some shallow persistance accross Blender sessions - and we always
  reuse the same filename (quit.blend...) or generate small file (crash reports...).
* Uses temp sub-dir for heavy files like pointcache or renderEXRs (Save Buffer option).
* Erases temp sub-dir on quit or crash.

To get this working it also adds a working 'recursive delete' to BLI_delete() under Windows.

Note that, as in current code, the 'recover render result' hack-feature that was possible
with SaveBuffer option is still removed. A real renderresult cache feature will be added
soon, though.

Reviewers: campbellbarton, brecht, sergey

Reviewed By: campbellbarton, sergey

CC: sergey

Differential Revision: https://developer.blender.org/D531
2014-06-23 13:42:54 +02:00
d1b45f7f7c Fix release notes link in splash.
Auto-generate this link from Blender version, as done for e.g.py API link.

This commit should be backported to 2.71 branch.
2014-06-20 10:21:39 +02:00
ea2043eb3a UI: Add support for popups to refresh their layput (D578)
This is needed for popups to chance state once activated,
currently it makes use of operators `check` callback, after values are modified,
as the file selector does already.
2014-06-15 01:42:31 +10:00
2e56182311 Detect version suffix based on release cycle and version char
Should make it less error-prone for release tagging/ahoy.
2014-06-13 20:19:02 +06:00
7aea3acc03 Splash: enable rc label 2014-06-13 04:39:10 +10:00
f1f33ba7be Fix T40549: box selection starting point in the file requester.
We need to 'reset' mouse coordinates to the one it was when the gesture handling started,
else org coords are where the tweak event is created, which gives a noticeable gap
(several pixels) and unwanted behavior like the one retported about file box selection.
2014-06-09 15:31:27 +02:00
7b0bce1946 Code cleanup: remove redundant filename copy & simplify splash 2014-05-01 11:59:25 +10:00
4b75956330 Fix T39974: Popups lead to crash if 'UNDO' isn't set
This isn't supported, raise an error instead
2014-05-01 05:28:52 +10:00
4ca67869cc Code cleanup: remove unused includes
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-05-01 04:47:51 +10:00
48446870a8 Code cleanup: remove redundant CTX calls 2014-04-30 08:11:47 +10:00
23b4e246e3 Remove link from Link/Append UI, since we have 2 menu items 2014-04-30 05:09:22 +10:00
15d77d201d Code cleanup: use 'const' for arrays (windowmanager) 2014-04-27 00:25:15 +10:00
1eb1351976 Fix T38924: wm.link_append() could fail to append
When the library path was changed by BLI_cleanup_path
appending would fail.
2014-04-25 18:43:53 +10:00
9ae0e585b0 View2d: API Cleanup for view<->region conversion
View2D had some inconsistencies making it error prone in some cases.

- Inconstant checking for NULL x/y args.
  Disallow NULL args for x/y destination pointers, instead add:
  - UI_view2d_region_to_view_x/y
  - UI_view2d_view_to_region_x/y

- '_no_clip' suffix wasn't always used for non-clipping conversion,
  switch it around and use a '_clip' suffix for all funcs that clip.

- UI_view2d_text_cache_add now clips before adding cache.

- '_clip' funcs return a bool to quickly check if its in the view.

- add conversion for rectangles, since this is a common task:
  - UI_view2d_view_to_region_rcti
  - UI_view2d_region_to_view_rctf
2014-04-21 16:59:40 +10:00
dd54b721c6 Add load_ui to WM_OT_read_homefile
Useful for implementing templates.

Patch D423 by Gaia Clary
2014-04-03 11:29:45 +11:00
726628518d WM: expose file loading operator property init functions 2014-04-03 11:04:02 +11:00
442f2df736 Code cleanup: avoid redundant lookups for subwindows 2014-04-02 17:33:20 +11:00
420da872a6 Fix T39378: Revert, Recover Last Session and Load Factory Settings have no prompt.
Now they do, to make it harder to accidentally press them and lose work.

Reviewed By: brecht, carter2422

Differential Revision: https://developer.blender.org/D440
2014-04-01 18:00:07 +02:00
617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
7199e2288f Code cleanup: use sqrtf when input and output are float 2014-03-28 14:53:37 +11:00
a2c002acb9 Add a slight shadow to the radial operator text. It helps when brush
color is close to the cursor color.
2014-03-25 01:25:01 +02:00
b701c92588 Code cleanup:
* Separate some common code for sculpt raycasting
* Cleanup to radial operator commit
2014-03-24 23:46:30 +02:00
7bb84912ef Code cleanup: ifdef debug only checks and simplify manifold test 2014-03-25 07:54:41 +11:00
76d32a3f16 Improvements to radial control operator:
* Factor values get a minimum circle too, which denotes the maximum
value. This makes it easy to set the maximum value while previously
maximum was at center, much more difficult to set exactly.

* Added text indication of value at center of the widget.
2014-03-24 22:50:59 +02:00
d2660a079c Fix T39260: "Redo Last" operator popup shows macro operator labels twice.
The popup was showing an explicit uiItemL as well as using the
UI_LAYOUT_OP_SHOW_TITLE flag. Both do the exact same thing.
2014-03-19 13:20:44 +01:00