Commit Graph

75472 Commits

Author SHA1 Message Date
Campbell Barton
3b1b625ead UI: use spacebar for toolbar
- This allows quick, consistent toolbar access
  w/o conflicting w/ the keymap.
  Where pressing space before a key activates that operator as a tool
  instead of running immediately.
- Search can still be accessed by pressing spacebar again.
- When there is no toolbar for a space, operator search still opens.
2018-05-21 12:46:26 +02:00
Campbell Barton
3102821c9c Revert "Fix/workaround RNA build error in C++ API."
This reverts commit 9f2ae547c0.

Args were reordered.
2018-05-21 12:38:52 +02:00
Campbell Barton
bdc3335016 Merge branch 'master' into blender2.8 2018-05-21 12:37:54 +02:00
Campbell Barton
882daeffc5 RNA: support for PARM_OUTPUT & PARM_RNAPTR 2018-05-21 12:34:11 +02:00
Campbell Barton
21777533fb Merge branch 'master' into blender2.8 2018-05-21 12:26:36 +02:00
Brecht Van Lommel
9f2ae547c0 Fix/workaround RNA build error in C++ API.
It seems output parameter needs to be the last one.
2018-05-21 11:13:56 +02:00
Campbell Barton
0e9605f44d Merge branch 'master' into blender2.8 2018-05-21 10:54:51 +02:00
Campbell Barton
4198c18f15 Cleanup: correct variable names 2018-05-21 10:53:50 +02:00
Campbell Barton
351c6d4346 Merge branch 'master' into blender2.8 2018-05-21 10:40:09 +02:00
Campbell Barton
12a60265cd WM: utility to find a keymap item from an operator
Also RNA access to WM_keyconfig_update,
needed when generating dynamic keymaps used in menus immediately after.
2018-05-21 10:35:44 +02:00
Campbell Barton
94fd828d75 Error in last commit 2018-05-21 08:22:08 +02:00
Campbell Barton
e7895bac07 UI: support for custom keymaps for popovers 2018-05-20 22:39:14 +02:00
Ines Almeida
46514cf865 COW Operators: Fix VIEW3D_OT_view_all and camera mode of VIEW3D_OT_viewnumpad
Reviewers: sergey, aligorith

Maniphest Tasks: T54829

Differential Revision: https://developer.blender.org/D3314
2018-05-20 20:05:26 +02:00
Ines Almeida
8e0953eb49 COW Operators: Fix VIEW3D_OT_view_lock_to_active
Reviewers: aligorith, sergey

Maniphest Tasks: T54829

Differential Revision: https://developer.blender.org/D3365
2018-05-20 19:48:58 +02:00
Clément Foucault
d3def53be5 Workbench: Shadow: Add support for completly manifold geom.
If a mesh is known to be manifold, then it's not necessary to increment the
stencil buffer 2 times anymore. But we still need to account properly for
degenerate triangles.

In this case, only generate a quad if the tri is facing the lamp. If there
is a degenerate loop, the other edge will either cancel the increment (if
it is also facing the light) or not produce a quad (if not facing).

This will always give the correct count.
2018-05-20 19:17:11 +02:00
Clément Foucault
4bbb1d4e5e DRW: Rename some DRW_STATE_* for more consistency. 2018-05-20 19:17:11 +02:00
Clément Foucault
7a28dea1e1 Workbench: Shadow: Add Depth Fail method
Also add new debug visualisation.

Depth fail method is not used for the moment but has nice benefits. It will
be used efficiently in the future.
2018-05-20 19:14:22 +02:00
Clément Foucault
2c6106247b Workbench: Precompute light direction in object space.
Avoid 2 matrix multiplication in the shader.
2018-05-20 19:14:22 +02:00
Clément Foucault
ef90d46700 Workbench: Shadow: Add geometry instancing extension.
This give a very slight perf boost. (2ms gain over 67ms total in my test)
2018-05-20 19:14:22 +02:00
Clément Foucault
24cc976d55 Workbench: Shadows: Fix corner case with degenerate triangles.
Seems that degenerate tris are somewhat widely used in modeling. So we need
to fix this. Test the edges in the geom shader since the adjacency info is
only dependant on topology, not actual vertex placement.

This fixes most of the remaining noise issues. Only a few artifacts appear
on really weird models. So if you want to get rid of the artifacts, fix
your model!
2018-05-20 19:14:22 +02:00
Clément Foucault
687f09a8ad Workbench: Optimize Shadows.
This makes the shadows ~10 times faster in the general case.

This only create extrusion geometry on the outline edges. Also we increment
or decrement the stencil buffer by 2 for each manifold edge and only by 1
for non manifold. This make the algorithm robust yet less heavy than creating
one prism for each triangles.
2018-05-20 19:14:22 +02:00
Ines Almeida
4308602d6a Fix: crash when rotating the view in pose mode 2018-05-20 17:44:50 +02:00
Campbell Barton
8cb6ede2bf UI: locate popover w/ active item under cursor
Use when popover has no parent, useful for accessing the toolbar.
2018-05-20 09:58:46 +02:00
Campbell Barton
7959617fb6 Cleanup: line length 2018-05-20 09:04:18 +02:00
Campbell Barton
12eb29fe35 Cleanup: whitespace, duplicate includes 2018-05-20 08:52:56 +02:00
Joshua Leung
96a3a62861 Hacky Fix: Changing frames by setting Scene.frame_current directly didn't update rigs in 3D viewport
Operators did not suffer from this problem as they were still just using notifiers
directly. The "proper" fix is to use the new message bus system. But, we've
got enough problems dealing with COW already as it is now... moving on.
2018-05-19 20:18:45 +02:00
Joshua Leung
0492e56fec Fix: When trying to transform animated bones, they would jump to and use random old values
The transform code needed to use data from the "_eval" copy of the posebone
instead of the main-db version, otherwise the initial/reset value would be
wrong, causing the jumping.
2018-05-19 19:54:47 +02:00
Joshua Leung
aca892832a Add back temporary exception for pose bones in DEG_get_evaluated_rna_pointer()
Without the exception, adding new poses to pose libraries took several seconds
with only <= 4 bones selected. While we may still need this for other cases too,
since bones are such a common use case, it makes sense to provide some level
of optimisation for them.
2018-05-19 19:54:47 +02:00
Joshua Leung
006b8e6092 Cleanup: Remove temporary debugging code 2018-05-19 19:54:47 +02:00
Joshua Leung
4a0dea88bf WIP: Improved implementation of DEG_get_evaluated_rna_pointer()
This now works by getting the RNA Path from the given PointerRNA to go from the
ID block to the data it points to, then uses this path to find the new data
relative to the COW ID.

Note: This currently still has all the debug prints left in - As can be seen,
I was testing this against the earlier PoseBone hack/special case. We may still
need to bring such special cases back in future, since looking up RNA Paths
like this can be slow.
2018-05-19 19:54:47 +02:00
Joshua Leung
6ba28ff8b1 WIP COW Fix: Insert keyframe operators/api now queries depsgraph for evaluated data
When using copy on write, insert keyframe operators were reading from old
bmain data instead of COW data. This meant that inserting keyframes would
often read old/stale data, resulting in invalid keyframes getting created
(e.g. from last transform operation, instead of actual current state).

This commit makes it so that keyframing operators will ask depsgraph for
the evaluated copy of the data, so that it can read values from that. It
introduces a new function - `DEG_get_evaluated_rna_pointer()`, which when
working correctly/fully, should work just like the other `DEG_get_evaluated_*()`
functions, except it lets you pass in an RNA Pointer.

However, currently, this is only done for Pose Bones (as a dirty hack, since this
is an important/pivotal requirement for production) and/or datablock
properties directly (since we can just use the DEG_get_evaluated_id() directly).
on the datablock.

Committing to a branch for now as this all needs more testing. More work to come
later at a more sane time of day!
2018-05-19 19:54:47 +02:00
Campbell Barton
06737a8258 UI: popover-once (click-drag for single actions)
Experimental support for using popovers like menus,
use this when the user hold the mouse down
(previously this did nothing).

This means turning frequently accessed menu items into
popovers doesn't add more clicks to the existing use case.
2018-05-19 19:16:47 +02:00
Campbell Barton
d3c89f50a0 UI: Use popover for toolbar popup operator
- Currently the popup closes immediately, could be made configurable.
- Support exiting popups when their submenu's are accessed.
2018-05-19 10:25:52 +02:00
Campbell Barton
ddebf1ea3b UI: Add menu to show the toolbar
For people who prefer to keep the toolbar hidden,
expose as a menu (currently Shift-Space).
2018-05-18 22:28:59 +02:00
Germano
e785048ef3 Fix snap with occlusion. 2018-05-18 17:26:22 -03:00
Germano
4df99bd601 Ruler: Fix mixed snap. 2018-05-18 17:12:20 -03:00
Campbell Barton
1fd11dd3ba Cleanup: comments, use negate_mat3_m4 2018-05-18 19:56:34 +02:00
Joshua Leung
de7635f607 Fix: Use DEG_get_ctime() for rigidbody sims instead of BKE_scene_frame_get()
There are still probably other massive problems to solve (i.e. which copies
of data cache/sim gets written/read from for COW eval) that need to be solved
before we can get the sims actually running though.
2018-05-18 18:04:35 +02:00
Sybren A. Stüvel
30673ff325 Fix crash when collection view layer cannot be found 2018-05-18 17:56:17 +02:00
Campbell Barton
f9547ab313 Fix tools not being initialized on startup 2018-05-18 17:36:11 +02:00
Campbell Barton
c2d5411cbf Fix manipulator removal
The flag could be left set, removing the manipulator type again.
2018-05-18 17:36:11 +02:00
Joshua Leung
29595334f0 COW Fix: POSE_OT_armature_apply (Apply Pose as Rest Pose) now works with COW 2018-05-18 17:07:46 +02:00
Germano
2d6bfb5b63 Transform: Improve the hierarchy in the choice of snapped elements in the mixed snap.
To snap to small edges in 3d_view is no longer obfuscated by vertices if then is also enabled.
2018-05-18 11:40:32 -03:00
Sybren A. Stüvel
a3070474e2 Clear the ParticleSettings pointer to prevent doubly-freeing it
Not happy with the approach, as it adds to nested_id_hack_discard_pointers(),
but at least it fixes a crash.
2018-05-18 16:29:16 +02:00
Germano
db2c966e2c Cleanup: remove unused function. 2018-05-18 10:55:51 -03:00
Brecht Van Lommel
6776a55464 Fix crash rendering files with Python errors in background mode. 2018-05-18 15:50:08 +02:00
Brecht Van Lommel
d7ba8611e2 Fix crash with shape keys and modifier stack, after recent changes. 2018-05-18 15:50:08 +02:00
Clément Foucault
47949fd764 Eevee: Codestyle fix. 2018-05-18 15:33:04 +02:00
Clément Foucault
83c2febaee Eevee: SSS: Fix compilation errors.
Fix T55114
2018-05-18 15:31:07 +02:00
Philipp Oeser
6e48afeb23 Merge branch 'master' into blender2.8 2018-05-18 14:59:38 +02:00