Commit Graph

61541 Commits

Author SHA1 Message Date
Campbell Barton bb45381bc2 Merge branch 'master' into blender2.8 2018-05-22 08:49:24 +02:00
Campbell Barton 4e14437cb0 Multi-Object-Mode: EditCurve Select Random
D3405 by @dgriffin91
2018-05-22 08:25:05 +02:00
Campbell Barton c7903f17a2 Fix memory leak in armature delete 2018-05-22 08:20:19 +02:00
Campbell Barton ee1327a84c Multi-Object-Mode: EditLattice Select All
D3164 by @ranjian0
2018-05-22 08:11:13 +02:00
Campbell Barton 99f994e7ed Fix crash drawing edit-lattice
Edit-mode was never using batch cache.
2018-05-22 08:10:36 +02:00
Campbell Barton 17778ddeb7 Cleanup: naming
Use 'ob' prefix for objects, 'eval' suffix for evaluated data.
2018-05-22 07:48:12 +02:00
Campbell Barton ac476375b1 Cleanup: style, whitespace 2018-05-22 07:39:16 +02:00
Campbell Barton 67cf4cb5ec Cleanup: replace MEM_SAFE_FREE -> MEM_freeN
No need to check for NULL in this case.
2018-05-22 07:28:14 +02:00
Bastien Montagne feabab6a9e Fix compilation with ndof code. 2018-05-21 21:18:12 +02:00
Bastien Montagne 612364181a Static Override: Fix drivers' ID target overridability.
You need the whole chain of pointers... This was breaking static
overrides of any rig basically.

Note that this kills performances again (adding several hundreds of
thousands more stuff on a blendrig...), need a better way to handle RNA
override walking.
2018-05-21 21:14:54 +02:00
Inês Almeida 161ab6109e COW Operators: Fix VIEW3D_OT_ rotate move zoom dolly orbit roll pan smoothview and the ndof versions
Fixes camera view locking, camera related transitions and movements with the active object as pivot point
Note there can still be problems if the active object is not selectable
2018-05-21 20:33:12 +02:00
Campbell Barton 9f66d00287 CMake: only include licences for enabled libs 2018-05-21 18:41:59 +02:00
Bastien Montagne 13d2df32c7 Fix broken draw code from last Thursday commit.
Seriously... Not all edges have faces!!!!!!!!

Quick fix to make it possible to load/use customshaped bones again, not
100% sure it is correct, but... At least it does not crash anymore!
2018-05-21 18:00:50 +02:00
Campbell Barton f0fda91a55 Merge branch 'master' into blender2.8 2018-05-21 17:27:38 +02:00
Campbell Barton 20bafbd550 Cleanup: unused vars 2018-05-21 17:27:21 +02:00
Campbell Barton 605e184167 Cleanup: use const for transform internal API 2018-05-21 17:24:14 +02:00
Germano Cavalcante 08ba057eef Fix misuse of the use_occlusion_test parameter. 2018-05-21 11:17:19 -03:00
Germano Cavalcante f14e4510ac Transform Snap: Fix normal in the wrong space. 2018-05-21 11:05:34 -03:00
Campbell Barton 575437ac90 3D View: fix scale of 3D cursor crosshair
Interface scale was applied twice.
2018-05-21 14:51:10 +02:00
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
Inês 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
Inês 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
Inês 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