Commit Graph

341 Commits

Author SHA1 Message Date
Jacques Lucke
687385b963 UI: Confirm dialog when closing an unsaved file
The complexity in this patch comes from the fact
that the current operator system does not support
multi-step user interactions well.

More specifically, for this to work, we need to show
a confirm dialog and a file browser afterwards.
We decided that it is easier to keep everything in
a single operator, instead of creating separate
operators that invoke each other.

So, now the `WM_OT_open_mainfile` operator invokes
itself in different states. It implements a simple
finite state machine to manage the states.

The dialog itself is expected to be improved in
a future commit. See D4829 for more details.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4829
2019-05-14 14:21:17 +02:00
George Vogiatzis
1813b26bbc Fix T64434: error with save system info after recent changes
Differential Revision: https://developer.blender.org/D4839
2019-05-10 17:16:29 +02:00
Campbell Barton
fc37238b17 Cleanup: unused args/vars/imports in bl_operators 2019-05-09 12:42:05 +10:00
Campbell Barton
619b9e9d81 Cleanup: typo, tweak proportional edit check 2019-05-07 10:06:00 +10:00
William Reynish
90f8f5cb06 UI: Tooltips
- Add missing tooltips to Quick Effects and Subdivide Edge Ring
  - Add proper tooltip to the Bevel operator
  - Clearer tooltips for the extrude operators

Plus a few other tweaks

Suggested by users on Devtalk.
2019-05-05 21:36:12 +02:00
Campbell Barton
d217b23f73 Cleanup: use keyword only args to rna_idprop_ui_create 2019-04-16 16:00:24 +02:00
Alexander Gavrilov
40dd91561d Python: add a utility function for creating custom properties.
Creating a fully functional custom property requires also setting up
its limits, description, default value and static override status.
It is complex enough to warrant providing an official utility.

Currently boolean properties are technically int, but the utility
pretends they are separate in case that eventually they are.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D4620
2019-04-16 16:49:00 +03:00
Campbell Barton
e49da07184 Cleanup: style 2019-04-10 00:06:13 +10:00
Brecht Van Lommel
b9b3b4a957 Fix part of T63102: wrong Python API Reference link in Help menu. 2019-03-29 17:56:42 +01:00
Campbell Barton
310a1f728c Cleanup: unused vars 2019-03-20 10:44:01 +11:00
Campbell Barton
3400fe3ece Tool System: split UI label from tool identifiers
Prepare for exposing tool registration to the Python API.

- Generated tools can use their own prefix so naming collisions
  won't happen between hard coded & generated tools.
- Add-on authors can use the add-on name as a prefix.

Currently the names match, renaming will happen next.
2019-03-15 14:53:08 +11:00
Campbell Barton
3ddd7e9704 Cleanup: style 2019-03-14 11:08:48 +11:00
Campbell Barton
270fd28496 Cleanup: use single quotes for enums 2019-03-04 22:11:06 +11:00
Campbell Barton
bbe98b18fb Cleanup: use preferences prefix for Python operators 2019-03-02 00:23:42 +11:00
Philipp Oeser
87c4f30954 Fix T61455: Import any add-on broken
recent split userpref.py out of wm.py (rB9ec944bbab7a) forgot to move
'module_filesystem_remove' there as well...
2019-02-12 13:33:33 +01:00
Campbell Barton
9ec944bbab Cleanup: split user preferences out of wm.py
These operations are for handling preference related tasks so move into
into a preferences file.

Operators still need to be renamed.
2019-02-11 23:24:09 +11:00
Philipp Oeser
478be344fa Fix T61246: studiolights (un)install problems
- studiolights were not installed to their proper subfolder (thus not
recognized on blender restart)
- they were actually loaded with a wrong path which could lead to
deletion of the original source file when uninstalled again
2019-02-06 23:13:50 +01:00
Campbell Barton
7894d6c6f1 Cleanup: line length 2019-01-30 09:06:44 +11:00
Jacques Lucke
e6ba760ce8 Fix: allow removal of addons that are symlinked
Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D4256
2019-01-28 10:52:54 +01:00
Brecht Van Lommel
6c878c5d3c Fix T58692: splash screen next not working when using BLENDER_USER_CONFIG. 2019-01-04 16:25:37 +01:00
Campbell Barton
ae50a7df03 Fixes and edits to studio light operators
- Remove pathlib use
  (was converting to/from string with no real advantage).
- Use user_resource(..., create=True) to ensure the path exists.
- Pass full path to BKE_studiolight_create, don't add extension after.
- Fix 'sl' filtering glob and move from ui code to operator.
- Fix string copy length.
2019-01-03 02:13:00 +11:00
Bastien Montagne
0661bcba32 Merge branch 'blender2.7'
Conflicts:
	source/blender/windowmanager/intern/wm_operators.c
2018-12-27 23:33:42 +01:00
Bastien Montagne
83dcdfd356 API Doc: point to blender2.7 new folder.
master is now for 2.8. ;)
2018-12-27 23:02:52 +01:00
Bastien Montagne
df3e7d0361 Point API doc back to master one.
Now that 2.8 is master again...
Still have to update 2.7 thingy there, now (and update API doc site
 accordingly, too).
2018-12-27 22:57:55 +01:00
Campbell Barton
63fcbfc3a7 RNA: naming, user-preferences -> preferences 2018-12-21 12:55:02 +11:00
Campbell Barton
e71d489254 Cleanup: style 2018-12-20 13:11:04 +11:00
Alexander Gavrilov
61c941f040 RNA: support setting default values for custom properties.
NLA requires a usable default value for all properties that
are to be animated via it, without any exceptions. This is
the real cause of T36496: using the default of 0 for a scale
related custom property obviously doesn't work.

Thus, to really fix this it is necessary to support configurable
default values for custom properties, which are very frequently
used in rigs for auxiliary settings. For common use it is enough
to support this for scalar float and integer properties.

The default can be set via the custom property configuration
popup, or a right click menu option. In addition, to help in
updating old rigs, an operator that saves current values as
defaults for all object and bone properties is added.

Reviewers: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D4084
2018-12-19 14:20:35 +03:00
Campbell Barton
42b9df5907 Cleanup: use 'tool_settings' name everywhere in UI scripts 2018-12-17 17:22:50 +11:00
Alexander Gavrilov
cfa46ddf6c UI: initialize Overridable Static checkbox for custom properties. 2018-12-16 17:09:32 +03:00
Bastien Montagne
eedd679ef2 Point API doc to proper path.
We'll have to update that again once we move 2.8 to master...
2018-12-12 12:29:58 +01:00
Bastien Montagne
91c9be7df3 Merge branch 'master' into blender2.8 2018-12-12 12:04:17 +01:00
Bastien Montagne
047d7d3b57 Fix T59213: Application menu links to outdated version of Python API.
Somehow those links were forgotten when we renamed API doc to simpler
names last year...
2018-12-12 11:56:25 +01:00
Campbell Barton
d8ed96a6a0 Cleanup: remove unused brush set by index 2018-12-04 17:33:47 +11:00
Clément Foucault
fe28554898 StudioLight Editor: Add copy settings and overwrite prompt
Copy settings let users create variations more easily.

Ovewrite prompt is there to be able to edit already existing studiolight.
2018-11-30 15:40:57 +01:00
Clément Foucault
6cfed6d775 UI: Minor changes to studiolight user preferences 2018-11-29 21:52:36 +01:00
Clément Foucault
844788a36c Workbench: Add back studio lighting presets
This changes a bit how the userprefs solid lights works. They are not
visible until enabling the "Edit Solid Light" checkbox. Once enabled the
current studiolight used for solid mode will be overwritten.

Once the lighting settings are tweaked, the user can click the
"Save as Studio light" button to save the current settings.
This makes it easy to create new lighting without messing the other
presets.

The studio lights are stored as ASCII files on the disk using a dead
simple custom format.

The UI/UX is not perfect and will be improved in other commits.

Also includes:
* Separate LookDev HDRI selection from Solid Lights
* Hide LookDev HDRIs from the Solid Lights selection list
2018-11-29 21:52:36 +01:00
Clément Foucault
8f4ab480bf Workbench: Rename orientation to type and Camera studio light to Studio 2018-11-29 21:52:36 +01:00
Brecht Van Lommel
919503d204 New splash image for Beta.
This one focuses on the development fund campaign. We plan to do more
more splash updates during the Beta.
2018-11-29 16:50:00 +01:00
Campbell Barton
3f33b4573d Keymap: Change default spacebar action to play
This has been a contentious topic: Artists at the Blender-Studio prefer
this behavior, while the user community overwhelmingly prefers 2.7x
operator search. Previously this defaulted to accessing tools
(eg: Space-T activates transform.. Space-R rotate etc) which I still
believe is a better long term default - otherwise we don't have
efficient tool switching for a system we intend to make more use of,
nevertheless as far as I can tell users haven't been keen on adopting
this so far. Show the preference on the setup screen since many users
don't animate and will may want to quickly search or switch tools.
2018-11-28 08:00:04 +11:00
Campbell Barton
48b0695806 Cleanup: unused vars, imports 2018-11-26 09:27:25 +11:00
Campbell Barton
bb5a96e76e Cleanup: move toolbar keymap generation to bl_keymap_utils
The function is getting complicated, any refactoring
would be best done outside of 'space_toolsystem_common'.
2018-11-20 11:17:36 +11:00
Campbell Barton
f8c16b0175 Cleanup: move bpy_extras.keyconfig_utils to own module
bpy_extras were meant to be useful high-level helper functions for
script authors to perform common operations,
to avoid writing to verbose API's.

bpy_extras.keymap_utils contains some specialized API calls
mainly intended for Blender's own internal use.

Move keymap import export to internal API.
2018-11-20 11:06:01 +11:00
Campbell Barton
c9f24a5690 WM: remove interaction presets
These only exposed a few options, which didn't end up helping
much to make Blender's key-map fit the behavior of other applications.
2018-11-20 08:11:46 +11:00
Campbell Barton
074cd53c19 Keymap: move left click select to a preference 2018-11-19 06:27:17 +11:00
Campbell Barton
e0a30aef19 WM: Fix secondary toolbar events being ignored
Error in recent workaround.
2018-11-16 09:19:33 +11:00
Brecht Van Lommel
088be7eb2f Keymaps: replace select / action mouse system
For Blender builtin configurations the option to choose the select mouse remains
and is now also in the splash screen. It works by changing the keymap dynamically
in the script, rather than using special events.

The system of automatic switching of events was not flexible enough to deal with
side effects that require further keymap changes, so it is now under more manual
control in the script.

This breaks compatibility for some scripts and exported key configurations.
These can be fixed by replacing SELECTMOUSE, ACTIONMOUSE, EVT_TWEAK_S and
EVT_TWEAK_A with appropriate LEFTMOUSE, RIGHTMOUSE, EVT_TWEAK_L and
EVT_TWEAK_R events.

Other than that, there should be no functional changes.
2018-11-16 08:31:00 +11:00
Brecht Van Lommel
2aa0a69015 Splash: tweak quick setup to use single column style layout. 2018-11-15 15:26:53 +01:00
Brecht Van Lommel
8dbf0957f6 Keymaps: add select with left / right option to quick setup splash screen. 2018-11-15 15:12:48 +01:00
Campbell Barton
7c03365861 WM: use spacebar press event (not double click)
Functionality) is nicer but this uses a hack to make it work,
keep the code under a variable in case we want to remove.
2018-11-15 17:12:33 +11:00
Campbell Barton
c94f806dc7 WM: remove warning when toolbar not found
Not useful for general usage, so removing.
2018-11-15 09:51:37 +11:00