Commit Graph

9283 Commits

Author SHA1 Message Date
0c8cf8fe7f Fix use of wrong icon IDs. 2018-11-09 15:39:57 +01:00
9ee9a257c9 UI: Fix checking for sequences. 2018-11-09 12:39:26 +01:00
7c227e4740 Py API Docs: Warnings for some properties that are slower to access than expected. 2018-11-09 12:07:10 +01:00
395f0fdd48 UI: Fix bug when no sequencer strips were selected on a new scene.
Reported by Tintwotin on DevTalk. Thanks!
2018-11-09 11:53:20 +01:00
80a7c57e5e Tool System: add grease pencil primitive tool 2018-11-09 17:12:07 +11:00
f96e7154f6 UI: tweak object type active state
The state of the objects visibility should only impact
the 'active' display of the select icon, not it's self.
2018-11-09 13:18:50 +11:00
7346c4f513 Cleanup: use proportional edit template for keymap 2018-11-09 13:14:48 +11:00
e81c1d3d48 Cleanup: use tuple instead of dict
This just loops over pairs so no mapping is needed.
2018-11-09 13:14:48 +11:00
87186f49cc UI: Tweaks to Object Types Visibility popover.
Replace checkbox for visibility with eye icon instead.
Thanks a.monti and zebus3d for the help.

Closes T57714
Part of UI Paper Cuts T56950
2018-11-09 02:58:35 +01:00
8a41de0f8c Cleanup: de-duplicate keymap items 2018-11-09 12:46:00 +11:00
04cdf8d040 Keymap: skip loading the keymap preset in background mode
Caused a crash on exit and isn't needed.
2018-11-09 11:43:45 +11:00
3064da1200 Keymap: move builtin keymaps from C to Python
This should be purely an implementation change,
for end users there should be no functional difference.

The entire key configuration is in one file with ~5000 lines of code.
Mostly avoiding code duplication and preserve comments and utility
functions from the C code.
It's a bit long but for searching and editing it's also convenient to
have it all in one file.

Notes:

- Actual keymap is shared by blender / blender_legacy
  and stored in `keymap_data/blender_default.py`

  This only generates JSON-like data to be passed into
  `keyconfig_import_from_data`, allowing other presets to load and
  manipulate the default keymap.

- Each preset defines 'keyconfig_data'
  which can be shared between presets.

- Some of the utility functions for generating keymap items still
  need to be ported over to Python.

- Some keymap items can be made into loops (marked as TODO).

See: D3907
2018-11-09 11:33:06 +11:00
de8c2336ad Fix wrong selectability icon in viewport menu. 2018-11-08 19:06:42 +01:00
626ca4a2d5 Fix X-Ray option showing in LookDev mode, where it does nothing. 2018-11-08 19:00:53 +01:00
c81ddc97ef UI: Tweaks to Add menu in Video Sequencer Editor.
Mainly organization and bringing it closer to the Add menu in the 3D Viewport.

* Icons for most top-level items when available.
* New Transitions menu for Cross, Gamma Cross and Wipe.
* Move Color and Text to top level. These options are used way too often to be in a submenu.
Having a menu with 2 entries defeats the purpose, so I've removed it for now. I checked if
add-ons used it and apparently not. It can be brought back if needed.
* Avoid empty dropdown in Scene/Mask/Clip. Solution is ugly for now and should be improved in C.
* Some effects couldn't be used without 1 or 2 strips selected, now the menu entry is grayed out accordingly.
* Some more icons for other menus.
2018-11-08 16:01:26 +01:00
acb8334e70 UI: Some icons for Image menu in Image editor. 2018-11-08 16:01:26 +01:00
70355052e2 Fix: show options of image empty only for image empties 2018-11-08 14:30:27 +01:00
a421cfa8d3 UI: hide bundled addons which haven't been updated
All are displayed when '--debug' is set, see: T56351
2018-11-08 10:10:08 +11:00
bcf1997ac2 Merge branch 'master' into blender2.8 2018-11-08 09:56:22 +11:00
9ccb70f202 Cleanup: minor simplification to user-addon check 2018-11-08 09:54:13 +11:00
f12d2adc87 RNA: Object.select_set use boolean, only select
- Was setting active state, making it necessary to backup/restore
  active object in cases where this isn't needed.
  Existing scripts are explicitly setting the active object when needed.

- Use a boolean select arg (toggle selection wasn't used anywhere).

- Add an optional view layer argument since scripts should be able to
  operate outside the user context.
2018-11-08 08:54:55 +11:00
9a38526be0 Py API Docs: show gpu_extras module 2018-11-07 15:45:28 +01:00
84ad9b102e Workbench: Add cubic filtering for smoke simulation
The option is per domain and only affects the solid / xray / wireframe view.

Eevee is not yet supported.
2018-11-07 13:25:28 +01:00
c19dafd2a6 Paint: paint.brush_select now supports gpencil
Replace grease pencil specific brush select operator.
2018-11-07 11:42:30 +11:00
895295a9f0 Paint: update shortcut detection for new logic 2018-11-07 10:54:56 +11:00
a55ef18309 UI: Use icons for some operators.
* Area and Workspace duplicate.
* Toggle Area Fullscreen
* Operator Search
* Workspace reorder to front/back (arrows help to know which direction means front/back)
2018-11-06 22:05:05 +01:00
f600b4bc67 Shrinkwrap: new mode that projects along the target normal.
The Nearest Surface Point shrink method, while fast, is neither
smooth nor continuous: as the source point moves, the projected
point can both stop and jump. This causes distortions in the
deformation of the shrinkwrap modifier, and the motion of an
animated object with a shrinkwrap constraint.

This patch implements a new mode, which, instead of using the simple
nearest point search, iteratively solves an equation for each triangle
to find a point which has its interpolated normal point to or from the
original vertex. Non-manifold boundary edges are treated as infinitely
thin cylinders that cast normals in all perpendicular directions.

Since this is useful for the constraint, and having multiple
objects with constraints targeting the same guide mesh is a quite
reasonable use case, rather than calculating the mesh boundary edge
data over and over again, it is precomputed and cached in the mesh.

Reviewers: mont29

Differential Revision: https://developer.blender.org/D3836
2018-11-06 21:20:17 +03:00
7b38df41ae Fix/cleanup RNA viewlayer API.
RNA's ViewLayer would present 'first level' of layer collection as a
list (collection property), when it is actually now only a single item,
same as the scene's master collection.

Note: did not try to update view_layer python tests, those are already
fully broken for quiet some time I guess (they still assume
view_layer.collections to be mutable e.g.)...
2018-11-06 17:20:49 +01:00
32dca36afb Cleanup: Use annotation for the new class 2018-11-06 09:57:03 +01:00
798cdaeeb6 Implement an Armature constraint that mimics the modifier.
The main use one can imagine for this is adding tweak controls to
parts of a model that are already deformed by multiple other major
bones. It is natural to expect such locations to deform as if the
tweaks aren't there by default; however currently there is no easy
way to make a bone follow multiple other bones.

This adds a new constraint that implements the math behind the Armature
modifier, with support for explicit weights, bone envelopes, and dual
quaternion blending. It can also access bones from multiple armatures
at the same time (mainly because it's easier to code it that way.)

This also fixes dquat_to_mat4, which wasn't used anywhere before.

Differential Revision: https://developer.blender.org/D3664
2018-11-06 10:56:08 +03:00
80109c976c Brush: split out vertex paint tool & blend mode
- Vertex & weight paint now use the 'blend' setting.
- Weight paint now has it's own tool setting,
  since weight paint doesn't deal with color - we'll likely
  support different tools eventually.
2018-11-06 18:06:33 +11:00
a90bcdf93d Tool System: use tool type enum to access brushes
Previously the brush names were used which had the limit that:

- Brush names that were deleted wouldn't show up in the toolbar.
- Naming collisions between user defined brushes and existing tools
  broke tool selection.

Now brushes are created as needed when tools are selected.

Note, vertex/weight paint combine tool and blend modes,
this should be split out into a separate enum.
2018-11-06 12:39:51 +11:00
946f9d8fb3 Eevee: Fix "Show Irradiance/cubemap" icons 2018-11-05 16:31:12 +01:00
83b3b540de GP: Change Lock icon and Popover title 2018-11-05 16:29:07 +01:00
72a23e6564 UI VSE: Use icon for Refresh Sequencer button in the header. 2018-11-05 15:34:23 +01:00
2d3493d50c UI VSE: Rename OpenGL Render to Sequence Render.
Follows change in the 3D Viewport.
2018-11-05 15:12:27 +01:00
69fcffb78f UI: Move Sync Markers from View to Marker menu.
In Dopesheet and Sequencer. Suggested by tintwotin in DevTalk, thanks!
2018-11-05 15:11:56 +01:00
8fcc04edce Cleanup: avoid using instance to get enum 2018-11-05 13:54:43 +11:00
642fe9e0f2 PyAPI: use keywords for ToolDef.from_fn.with_args
Enforces explicit names,
allows for keywords to be forwarded to the dictionary.
2018-11-05 11:58:23 +11:00
4e37796976 Fix various Freestyle rendering bugs. 2018-11-05 00:22:33 +01:00
2f8a45e314 Tool System: support passing in args to ToolDef functions
Needed since class aren't yet defined
so we can't access their namespace.

This avoids intermediate draw functions.
2018-11-05 07:12:57 +11:00
5cfcee8c39 GP: Reorganize Canvas Grid
Now the grid is always controlled by the topbar selector and not in the canvas panel. To have two places to define orientation was confuse.

The orientation by default (no lock) is always to view plane.
2018-11-04 13:00:37 +01:00
179358e6c4 UI: Don't nest sculpt scrape/flatten
These are different enough not to be grouped.
2018-11-04 10:33:51 +11:00
628a0209a4 Cleanup: missed last commit 2018-11-04 10:32:04 +11:00
2402c56a67 UI: move gpencil tool-draw code to topbar
The grease pencil UI was showing twice in tool properties space.
Move to top-bar because this UI is meant as quick convenience access
which is expanded on in the tool properties editor.
2018-11-04 10:29:40 +11:00
bc870f17a7 Cleanup: style, shadow warning 2018-11-04 10:10:00 +11:00
d2b4eaa137 GP: New Time Offset custom frame range parameters
These parameters allow to define a frame range for the animation loop and make possible to loop a section while the scene is playing.
2018-11-03 17:11:38 +01:00
f267921774 UI: remove grease pencil icons
Grease pencil tool now uses an icon for each tool,
previously it mapped icons to tool icons which is now not needed
because for each tool a different brush can be selected which has it's
own icon.
2018-11-03 20:35:34 +11:00
e53cb83d07 UI: separate sculpt from smooth, flatten 2018-11-03 20:35:34 +11:00
270a6a6689 GP: Change presets for new stroke and fill switches 2018-11-03 10:01:28 +01:00