Commit Graph

3891 Commits

Author SHA1 Message Date
dbc058301b Cleanup: trailing commas 2019-04-16 16:40:47 +02:00
423d9086e6 Fix T63429: Random deselect function lost
Add back the ability to choose the select operation for random select.
Now we allow the operator to specify if the select operation should be
visible in the GUI or not.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4665
2019-04-16 13:16:04 +02:00
5498e7f193 CMake: add library deps to CMakeLists.txt
Tested to work on Linux and macOS.

This will be enabled once all platforms are verified.

See D4684
2019-04-16 06:20:52 +02:00
3849e02369 CMake: fix WITH_PYTHON=OFF 2019-04-15 08:40:29 +02:00
47adab4f99 CMake: prepare for BLENDER_SORTED_LIBS removal
No functional change, this adds LIB definition and args to cmake files.
Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS'
since there are many platforms/configurations that could break when
changing linking order.

Manually add and enable WITHOUT_SORTED_LIBS to try building
without sorted libs (currently fails since all variables are empty).
This check will eventually be removed.

See T46725.
2019-04-14 15:37:24 +02:00
eff8cc9ccc Cleanup: doxy comments
Use doxy references to function and enums,
also correct some names which became out of sync.
2019-04-14 10:48:42 +02:00
6815efc3ff Keymap: warn when running poll on empty keymaps 2019-04-13 19:26:01 +02:00
73c7aaba22 Cleanup: style, use braces for the window manager 2019-04-13 09:15:15 +02:00
986329b4c4 Cleanup: comments 2019-04-12 01:01:50 +10:00
George Vogiatzis
a180b754eb Interface: New region type 'Footer', used by text editor
* It can be hidden by dragging it up/down.
* It can be at the top or bottom, independent of the header.
* It uses the color theme from the header.
* It does not change its color, when the area becomes active.

Currently, it is used in the text editor to display the file path.

Differential Revision: https://developer.blender.org/D4601
2019-04-05 13:48:26 +02:00
2bc3418884 Fix T63000: Don't use original file name for autosave
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4609
2019-04-04 14:38:18 +02:00
0298f1d634 Fix T62870: progress in taskbar not updated when cancelling render 2019-04-04 13:47:41 +02:00
57de9581e8 UI: use active-default button flag for operator confirmation 2019-03-28 00:54:55 +11:00
2d34420648 UI: support an 'active default' button for pop-ups
Use this for the save confirmation dialog so it has a default action
when pressing enter which draws with a highlight so it's clear what the
default action is (the dialog was just closing before).

Resolves T57686
2019-03-28 00:26:00 +11:00
c602ec74fd GPU: State: Replace GL_BLEND by GPU_blend 2019-03-25 20:26:52 +01:00
72ede30d0f Cleanup: pass const image data to IMB_ibImageFromMemory 2019-03-25 09:08:29 +11:00
72c323d50c GPU: State: Replace GL_LINE_SMOOTH by GPU_line_smooth 2019-03-23 23:54:01 +01:00
ed9af18c76 GPU: Replace glEnable/glDisable but GPU_state calls 2019-03-23 23:43:26 +01:00
Dalai Felinto
74b47e4181 Fix: VSE preview not showing stereo drawing (unreported)
SpaceSeq main stereo drawing is for ar->regiontype RGN_TYPE_PREVIEW, but
the drawing code was assuming RGN_TYPE_WINDOW was the only one to be
considered for all the regions.

SpaceSeq still needs stereo drawing in RGN_TYPE_WINDOW but only when
backdrop is enabled.

Bug introduced on rBe01cadd657c76267.
2019-03-22 15:55:32 -03:00
8b4e0eb88e Fix T59962, T60130: error adding image sequence with node wrangler.
The region should be restored correctly, there is already a similar test for
areas to be preserved.
2019-03-22 18:59:40 +01:00
Dalai Felinto
9a49a26eb3 Fix T62348: Cycles - Viewport rendering not update on switching viewlayer
It updates only the main window you edit and the non-main window
children of this main one.

Reviewers: sergey, brecht

Differential Revision: https://developer.blender.org/D4528
2019-03-22 12:46:39 -03:00
e4694c057b UI: replace button open event with activate on init
No user visible change.
2019-03-22 00:55:24 +11:00
9a09246dc0 WM: enable activate on init for wmOperatorType.prop
This enables popups to edit text when displayed,
use for new collection popup.
2019-03-22 00:32:01 +11:00
a1addc5c63 UI: support for popups starting with buttons activated
While this could already be done from C,
this is now exposed to Python
2019-03-20 23:10:34 +11:00
ef09aff61c Preferences: add threshold for cursor motion
A hard coded threshold was used to ignore cursor motion,
make this a preference since tablet users may want to increase it
since a pen hovering isn't as easy to keep still as a mouse.

Resolves T56278
2019-03-20 22:19:16 +11:00
5739506104 UI: scale cursor motion threshold by DPI
This was using hard coded values of 2-3px.

Move both drag and motion thresholds to defines.
2019-03-20 02:52:55 +11:00
e7fd6c8f30 Cleanup: comment blocks 2019-03-19 15:17:46 +11:00
e2abb1bf5c Fix T61872: Sculpt key shortcut assignment fails 2019-03-19 13:50:32 +11:00
ce066f9da7 Fix assigning keys to paint operators
Comparing context mode with object flag (decade old bug from 2.5x).
2019-03-19 13:48:33 +11:00
48ad55a03d Cleanup: use enum for CTX_data_mode_enum
Exposes errors in some cases when compared against incompatible values.
2019-03-19 13:46:32 +11:00
d731ee4960 Fix T61368: Brush texture preview ignores rotation 2019-03-19 13:07:48 +11:00
6c0240e84a UI: clarify "Remap Relative" tooltip
Resolves T62612
2019-03-18 13:58:01 +11:00
Miguel Porces
5797a5fc65 Fix ID user counting issues with NodeCustomGroup.
User counting now happens before init() and after free() methods, so that
the ID users are in a valid state when Python might modify them. ID user
counting was moved into node.c and simplified.

Patch by Miguel with further refactoring by Brecht. Ref D4370.
2019-03-16 20:21:16 +01:00
d4156b46d7 Tool System: use categories for tool identifiers
Tools that come with Blender use 'builtin' or 'builtin_brush' prefix.
2019-03-15 16:48:01 +11:00
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
1abd120e70 Cleanup: rename uiBlock.mx,my to bounds_offset
Use a name that related to block bounds calculation
(mx/my are typically used for mouse x,y).
2019-03-13 16:41:35 +11:00
cf09a2443c Fix T60978: crash toggling window fullscreen on macOS.
GHOST event handling does not need a window in the context, and restoring
it to the previous value is problematic if the window was deleted in the
meantime.
2019-03-08 10:24:59 +01:00
1caa5b14bf Cleanup: remove unused test break code for handling cancels. 2019-03-08 10:24:59 +01:00
6db49261cc Cleanup: make modal event double click handling more straightforward 2019-03-08 14:19:27 +11:00
96af595f63 WM: fix double click handling in modal keymaps
Model keymaps wasn't matching double-click events with press
as is done in regular keymap handling.
2019-03-08 13:35:48 +11:00
8f817de0cb Cleanup: use plural names for Main lists
Convention was not to but after discussion on 918941483f we agree its
best to change the convention.

Names now mostly follow RNA.

Some exceptions:

- Use 'nodetrees' instead of 'nodegroups'
  since the struct is called NodeTree.
- Use 'gpencils' instead of 'grease_pencil'
  since 'gpencil' is a common abbreviation in the C code.

Other exceptions:

- Leave 'wm' as it's a list of one.
- Leave 'ipo' as is for versioning.
2019-03-08 09:50:00 +11:00
cf38b08f52 Fix gizmos not responding to theme color updates
Re-create gizmos when changing theme colors, since
theme colors don't change often this allows gizmos to setup their
colors on initialization.
2019-03-08 02:39:40 +11:00
1901595898 Tool System: use set/add/subtract for all lasso select operators 2019-03-07 23:45:58 +11:00
e25cdac24b Fix T62280: driver functions added in load_post broken after recent changes.
Evaluate the dependency graph a bit later still. This kind of worked before
because it was using the drive namespace from the previously loaded .blend
file but that's of course wrong.
2019-03-07 11:55:48 +01:00
ab0bc65c24 Refactor CDData masks, to have one mask per mesh elem type.
We already have different storages for cddata of verts, edges etc.,
'simply' do the same for the mask flags we use all around Blender code
to request some data, or limit some operation to some layers, etc.

Reason we need this is that some cddata types (like Normals) are
actually shared between verts/polys/loops, and we don’t want to generate
clnors everytime we request vnors!

As a side note, this also does final fix to T59338, which was the
trigger for this patch (need to request computed loop normals for
another mesh than evaluated one).

Reviewers: brecht, campbellbarton, sergey

Differential Revision: https://developer.blender.org/D4407
2019-03-07 11:29:50 +01:00
d31b2f8549 Fix T61063, T62195: Python scripts should run before depsgraph evaluation.
This was changed (accidentally?) in d192d72312, now go back to behavior more
similar to 2.7. Python scripts should be able to set up drivers or do other
changes that will then be taken into account when evaluating the scene for the
first time.

The more tricky thing is that Python scripts now run before ED_editors_init,
but given what happens in there it seems safe.
2019-03-05 19:20:08 +01:00
8d8d113b73 Tool System: use set/add/subtract for all circle select operators
This applies changes from the 3D view circle select to other operators.
2019-03-05 22:26:45 +11:00
baee9b014a Outliner: better support for paintcurves ('Blender File' view)
- paintcurves were hitting an assert in outliner_add_element()
- missing outliner update when adding a paintcurve
- paintcurves were not showing an icon [they dont have a dedicated icon,
took the one used elsewhere]

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4445
2019-03-04 13:04:41 +01:00
ff10f123ba Cleanup: typo in comment
spotted by @miclack, thx!
2019-03-04 10:16:07 +01:00
3982d3c171 WM: add gesture variable to detect first execution
Needed for circle select to replace the current selection.
2019-03-01 23:00:11 +11:00