Commit Graph

82442 Commits

Author SHA1 Message Date
Bastien Montagne
fb4c2ed1a9 Fix T57892: Align Objects in Blender 2.8 Alpha 2 last Builds.
Needed some update for API changes...
2018-11-20 22:14:00 +01:00
Bastien Montagne
b7ee0912a7 Fix T57921: Crash when loading 2.7x .blend with scene without any render layer.
We need at least one view layer, always. :)
2018-11-20 21:50:46 +01:00
Campbell Barton
3a13b89296 Cleanup: unused args, indentation 2018-11-21 06:29:19 +11:00
Campbell Barton
176b0df920 Cleanup: gcc function type warning 2018-11-21 06:24:52 +11:00
Antonioya
a4a9123c33 GP: Refactor target weight paint
Now, the target weight is defined as the final maximum value with a new property and all fields have be moved to brush struct.
2018-11-20 20:05:37 +01:00
Antonioya
e63c947204 GP: Refactor drawing engine to single VBO
This is part of T57829.

Reduce the number of batches used to only one by shader type.  This reduces GPU overhead and increase a lot the FPS. As the number of batches is small, the time to allocate and free memory was reduced in 90% or more.

Also the code has been simplified and all batch management has been removed because this is not necessary. Now, all shading groups are created after all vertex buffer data for all strokes has been created using DRW_shgroup_call_range_add().

All batch cache data has been moved to the Object runtime struct and not as before where some parts (derived data) were saved inside GPD datablock.

For particles, now the code is faster and cleaner and gets better FPS.

Thanks to Clément Foucault for his help and advices to improve speed.
2018-11-20 20:05:37 +01:00
Campbell Barton
140d383393 Fix T57935: Crash Alt clicking w/ poly build tool 2018-11-21 05:25:52 +11:00
Campbell Barton
5aa728ec7e Cleanup: style 2018-11-21 05:25:52 +11:00
Antonioya
ec908beab3 GP: New option to paint a predefined weight
Enabling this option, the weight is set to the predefined value and not the result of the sum of the paint actions.
2018-11-20 18:12:04 +01:00
Charlie Jolly
53d9ddf772 UI: Color Ramp: Add menu and functions to distribute color stops
Suggestion from Right-Click Select: https://blender.community/c/rightclickselect/Npcbbc/color-ramp-flags-auto-distribution-function

Differential Revision: https://developer.blender.org/D3965
2018-11-20 17:02:31 +00:00
Bastien Montagne
23656d01d8 Merge branch 'master' into blender2.8 2018-11-20 18:01:13 +01:00
Bastien Montagne
ec851efda9 Fix T57923: Freeze in mesh vnors computation code with some degenerated geometry.
Second part of the fix: do not try at all to compute normals in degenerated
geometry. Just loss of time and potential issues later with weird
invalid computed values.
2018-11-20 17:54:48 +01:00
Bastien Montagne
c9c6433a59 Fix T57923: Freeze in mesh vnors computation code with some degenerated geometry.
Fix first part of it, the freeze itself being caused by float NAN values
never comparing equal to anything, not even themselves.
2018-11-20 17:52:21 +01:00
Antonioya
d2e473f01c GP: Reorganize Reproject options
The options depend of drawing mode and this was very strange. Now, the options are listed in the menu.
2018-11-20 16:29:33 +01:00
Antonioya
1824aad3f3 GP: Set Gizmo orientation for edit mode 2018-11-20 16:04:19 +01:00
Sergey Sharybin
4dc639ac99 Speedup rigs with multiple objects deformed by bbones
Previously each of the objects which has armature modifier will
request deformation matricies from bbones. Thing is, all those
deformations are the same and do not depend on object which is
being modified. What's even worse is that this calculation is
not cheap.

This change makes it so bbones deformation is calculated once
and stored in the armature object. After this armature modifiers
simply use it.

With a rigs we've got here dependency graph evaluation time
goes down from 0.02 sec to 0.012 sec.

Possible further optimization is to make bbone deformation
calculated at the time when bone is calculated. This will avoid
an extra threaded loop over all bones.
2018-11-20 15:53:59 +01:00
Sergey Sharybin
163be42a96 Cleanup: Use more const qualifiers 2018-11-20 15:07:38 +01:00
Sergey Sharybin
5c632ced53 Merge branch 'master' into blender2.8 2018-11-20 15:02:13 +01:00
Sergey Sharybin
01e8e7dc6d Task scheduler: Optimize parallel loop over lists
The goal is to address performance regression when going from
few threads to 10s of threads. On a systems with more than 32
CPU threads the benefit of threaded loop was actually harmful.

There are following tweaks now:

- The chunk size is adaptive for the number of threads, which
  minimizes scheduling overhead.

- The number of tasks is adaptive to the list size and chunk
  size.

Here comes performance comparison on the production shot:

 Number of threads        DEG time before        DEG time after
       44                     0.09                   0.02
       32                     0.055                  0.025
       16                     0.025                  0.025
       8                      0.035                  0.033
2018-11-20 14:58:17 +01:00
Sergey Sharybin
98bcd52ef2 Comment out all derived mesh evaluation
Seems all the usecases of derived mesh are if-defed already,
so no need to have API for it in place, and definitely no
need to waste CPU ticks on converting evaluated mesh to
derived mesh.
2018-11-20 14:54:16 +01:00
Sergey Sharybin
e81aca85cb Depsgraph: Don't use derived mesh
Ideally would need to make check based on evaluated mesh,
but is now a good time to go away from derived mesh.
2018-11-20 14:54:16 +01:00
Sergey Sharybin
fd926f0058 Modifier stack: Only ensure derived mesh when USE_DERIVEDMESH is defined
This is more an internal transition away from derived mesh.
2018-11-20 14:53:41 +01:00
Sergey Sharybin
1ee8c3e46a Modifier stack: Use evaluated mesh to check normals 2018-11-20 14:53:41 +01:00
Sergey Sharybin
88d634ca05 Vertex parent: Remove CCGDM optimization
Currently we never return CCGDM from the modifier stack,
so the optimization was doing pretty much nothing.

Removing it completely for now, it needs to be re-done
with the new evaluated Mesh/Subdiv.
2018-11-20 14:53:41 +01:00
129b8833c6 UI: increase spacing at sides of headers, to avoid region split zone overlap. 2018-11-20 13:39:49 +01:00
Clément Foucault
fc181d855e Fis T57948: Crash in 2.8x lookdev 2018-11-20 13:30:29 +01:00
Clément Foucault
566a4a96cb Fix T57891: Radius of strip hair doesn't scale with object scale
Note that this only works fine with uniformly scaled objects.
Otherwise, the hair thickness will vary in a weird way depending on viewing
angles.
2018-11-20 13:09:27 +01:00
Jacques Lucke
86e0d13218 Images: "Image" submenu in "Add" menu
The submenu has two entries currently: "Reference" and "Background".
Both operators produce an image empty with different settings.
2018-11-20 12:44:49 +01:00
Bastien Montagne
76d602f38d Add option not to print debug/info in ngon_tessellate.
That func can be called a lot, generating a lot of noise in the
console...
2018-11-20 12:35:05 +01:00
Antonioya
a29740e290 GP: Fix bottom statistics 2018-11-20 11:42:36 +01:00
Campbell Barton
a19ee4e926 Tool System: define tools for lattice editmode 2018-11-20 21:41:39 +11:00
Campbell Barton
057ba2eb68 Fix error generating toolbar tooltip
C code needed to be updated for module move.
2018-11-20 21:35:24 +11:00
Sybren A. Stüvel
789a259d71 Merge branch 'master' into blender2.8 2018-11-20 10:46:36 +01:00
Sybren A. Stüvel
9bc2570e2a Removed superfluous NULL check 2018-11-20 10:46:17 +01:00
Sybren A. Stüvel
f8f5751dac Merge branch 'master' into blender2.8 2018-11-20 10:38:55 +01:00
Sergey Sharybin
92a47e3b53 Multires: Cleanup, remove unused function 2018-11-20 10:34:01 +01:00
Sybren A. Stüvel
0540d2b65c Added MovieClip.fps read-only property to RNA
This makes it possible for a Python script that loads a MovieClip into the
clip editor to also change the scene frame rate to match.
2018-11-20 10:32:24 +01:00
Sergey Sharybin
698f1e3d94 Fix T57938: Dynamic paint baking issues
Quite usual fix for the caching systems.
2018-11-20 10:29:35 +01:00
Campbell Barton
640eb00670 Tool System: define tools for meta-ball editmode 2018-11-20 18:52:56 +11:00
Alexander Gavrilov
812205f936 UI: unhide bones in Jump To Target instead of failing.
The whole point is to avoid the need to manually hunt for the
bone, so it makes more sense to unhide it automatically.

If the bone is on multiple layers, just the first one is enabled.

Also, ED_pose_bone_select already checks PBONE_SELECTABLE.
2018-11-20 10:24:33 +03:00
Campbell Barton
1edc3f74ed Cleanup: make object deselect match other ED_ APIs
Use SEL_* argument, matching ED_pose_deselect_all.
2018-11-20 18:08:24 +11:00
Alexander Gavrilov
d227c58e3e UI: support jumping to target object/bone
Complex rigs are built from many bones (often overlapping)
connected by constraints.

When investigating or debugging such rigs one often wants to switch to
the target of a constraint, or a parent bone, but it is difficult to do
manually due to overlap confusion.

This adds a right click menu option that automatically selects
and makes the target object or bone active for UI fields where a
suitable reference is readily available.
2018-11-20 17:38:35 +11:00
Campbell Barton
93f82698e7 Object: utility (de)select all functions
part of D3955 by @angavrilov
2018-11-20 17:00:55 +11:00
Campbell Barton
82eecc6c00 Multi-Objects: Calc origin w/ all edit-objects
D3924 by @Leon95 w/ code de-duplication.
2018-11-20 16:26:46 +11:00
Campbell Barton
15db2acd9f Fix T57722: Clipped LookDev preview spheres
D3948 by @pablodp606
2018-11-20 15:08:56 +11:00
Campbell Barton
720368e2d0 Cleanup: use const mesh arg to BM_mesh_bm_from_me
Needed for D3966
2018-11-20 13:30:25 +11:00
Campbell Barton
9d85cf0d54 Theme: avoid right-shift in XML files
Use 2 space indent for attributes, ~20% smaller files.
2018-11-20 13:15:26 +11:00
Campbell Barton
9a1796797e Keymap: update addon register/unregister utilities
Use the same data format and loader that the default key-maps use.

This supports nested properties (needed for macros)
and fixes modal key-maps which weren't supported.

This format still needs to be documented.
2018-11-20 12:37:04 +11:00
Campbell Barton
916446e83f Cleanup: move keymap hierarchy into own file 2018-11-20 11:38:13 +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