Commit Graph

75472 Commits

Author SHA1 Message Date
Brecht Van Lommel
e4afccf388 Depsgraph: optimization of driver evaluation with many drivers. 2018-05-31 09:46:21 +02:00
Campbell Barton
e910765ad0 WM: Use tool-system for setting brushes
This sets the tool instead of the brush, with cycling support.
2018-05-31 09:04:15 +02:00
Campbell Barton
81bf9a41e1 Tool System: Utility to set the tool by name
Wrapper for the Python operator.
2018-05-31 09:02:43 +02:00
Jeroen Bakker
fbd614f1fa Workbench: Highlights
Made the highlights darker (using the defaults of blender 2.7
- sharpness = 50
- spec color = 0.025 (I bumped it to 0.1)
- added a log2 to the frontal camera light to reveal more details of the
mesh
2018-05-30 22:19:10 +02:00
Campbell Barton
264a4a8f97 RNA: add tool index access
Needed for changing the active tool from Python.
2018-05-30 22:16:13 +02:00
Campbell Barton
84e5c981dc UI: toolbars now redraw on tool change 2018-05-30 22:16:13 +02:00
Jeroen Bakker
f5f25b843e Removed Object color from workbench. Added Highlights to FLAT shading. 2018-05-30 20:34:29 +02:00
Campbell Barton
1f693aefca Cleanup: style/whitespace
Also use 'uint'.
2018-05-30 19:49:33 +02:00
Brecht Van Lommel
0b6603d9b6 Fix selection randomly failing with border render.
We no longer user scissor for 3D viewport drawing, and some selection
code assumed it still. This also cleans up unnecessary scissor test
switching, we only have it temporarily enabled now.
2018-05-30 19:34:12 +02:00
Brecht Van Lommel
cce16df10f Fix Cycles viewport render stuck with curve objects.
We should solve this better by making the depsgraph convert all curves to
meshes, for now ensure we don't to depsgraph tags during export.
2018-05-30 18:17:49 +02:00
Brecht Van Lommel
17ce968c59 Depsgraph API: renaming, more granular update information.
* depsgraph.ids: all evaluated datablocks in the depsgraph
* depsgraph.objects: all evaluated objects in the depsgraph
* depsgraph.object_instances: all object instances to display or render
* depsgraph.updates: list of updates to datablocks
2018-05-30 18:17:49 +02:00
Brecht Van Lommel
08862b8246 Render API: rename some API functions back to earlier names.
Their purpose is the same, no reason to break API compatibility here.
2018-05-30 18:17:49 +02:00
Campbell Barton
9fabe3ef53 Cleanup: quiet warning 2018-05-30 17:38:07 +02:00
Campbell Barton
efd0333a9c UI: fix property split w/ color buttons & empty text 2018-05-30 17:29:20 +02:00
Joshua Leung
1272936773 Tweak for previous commit: Just group all bone properties under the bone name
After more testing, I realised that bendy bone properties should also be grouped,
but probably all other per-bone settings too. Now, just group all of them, since
it's easier for everyone this way.
2018-05-30 17:05:37 +02:00
Sergey Sharybin
7661f8a65b Modifiers: Bring back custom data referencing logic
Brings dependency graph evaluation time to similar time than 2.79
for file reported in T55228.
2018-05-30 17:00:47 +02:00
Sergey Sharybin
41fac4fa76 Modifiers: Make input of modifier stack referencing copied CD layers
The idea is to allow modifier stack to reference custom data layers
from copied version of mesh datablock.
2018-05-30 17:00:47 +02:00
Sergey Sharybin
25d4d43491 Modifiers: Restore duplication of referenced layers
Was no reason to remove those calls, it was always a plan to bring
referenced layers back eventually.
2018-05-30 17:00:47 +02:00
Joshua Leung
cdfa517760 Insert Keyframe: Change default behaviour for how F-Curves get grouped
For many years, animators have been complaining about how keyframing a (transform)
property directly would leave them ungrouped, while keyframing them using a Keying Set
would put them into a group based on the name of the keyingset.

This commit attempts to improve (unify + make consistent) the default behaviour:
* All object transforms now get added to an "Object Transforms" group,
  regardless of whether they were added individually via buttons or keyingset
* All bone transforms now get added to a group corresponding to the name of the bone
  instead of only the ones added via keyingset
2018-05-30 16:46:12 +02:00
Joshua Leung
23b455a891 Cleanup: Reuse existing scene pointer 2018-05-30 16:46:11 +02:00
Bastien Montagne
92e3b3839b Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/space_outliner/outliner_intern.h
2018-05-30 16:32:49 +02:00
Bastien Montagne
10a2562bc5 Fix missing movieclip ID type in allowed ones for Outliner... 2018-05-30 16:14:55 +02:00
Campbell Barton
f1f1c32849 Object Modes: don't de-select others when activating 2018-05-30 15:51:49 +02:00
Dalai Felinto
5b8fe8324b Fix render info not working with overlap regions 2018-05-30 15:45:40 +02:00
Campbell Barton
38957c1838 Object Modes: stay in object mode when setting active
When activating an object from the 3D view or outliner,
keep the newly selected object in object mode.
2018-05-30 15:33:05 +02:00
Campbell Barton
5954a5c465 Object Modes: pose support for generic mode exit 2018-05-30 15:33:05 +02:00
Campbell Barton
375c1eab65 Cleanup: RNA naming, use highlight as suffux
This is whats done already elsewhere.
2018-05-30 15:33:05 +02:00
Campbell Barton
d0d2fc9819 Cleanup: whitespace 2018-05-30 15:26:57 +02:00
Bastien Montagne
30fb455977 Initial 'fix' for Sculpt & COW - shallow copy sculpt data into COWed object.
Still a lot to fix here, right now you can get sculpt drawing updating
when you come from Edit mode, not from Object mode... Go figure...
2018-05-30 15:15:35 +02:00
Sergey Sharybin
35a6d9ec55 ID copy: Add flag which allows custom data to reference original datablock 2018-05-30 15:07:59 +02:00
Jeroen Bakker
acaf46db0e Workbench: Specular Highlights
Added specular highlights for:
 - Solid studio shading
 - Texture studio shading
2018-05-30 14:42:07 +02:00
Sergey Sharybin
29f9a19708 Modifier stack: Avoid roundtrip from mesh to DM back to mesh
Saves quite a bit of CPU ticks per mesh update, giving measurable
speedup for file from T55228.

Memory usage goes up a it, most likely due to evaluated mesh having
more custom data layers than corresponding DM does.
2018-05-30 14:29:05 +02:00
Sergey Sharybin
da16cb1511 Eevee: Keep track on whether orco was allocated or not
If it's coming from vertex data, we must not free that pointer.
2018-05-30 14:29:05 +02:00
Clément Foucault
f03953ae06 Object Mode: Add Texture space visualization. 2018-05-30 14:27:40 +02:00
Joshua Leung
ccb7f1d4f1 Fix T55256: Animation Noise modifier does not update on value change
Animation needs tagging in depsgraph (for animation refresh), instead of only
tagging AnimData->recalc
2018-05-30 14:22:25 +02:00
Joshua Leung
26f42a1928 Fix: Toggling "mute" toggle in animation editors didn't work with copy-on-write
Tested on Autumn run cycle by muting master bone animation - when working, the
dog should run forwards when the master bone animation is being muted.
2018-05-30 14:22:25 +02:00
Brecht Van Lommel
5c17dbd991 Fix missing Cycles 3D viewport updates when editing materials, lamps.
This introduces a new depsgraph API for getting updated datablocks,
rather than getting it from bpy.data.

* depsgraph.ids_updated gives a list of all datablocks in the depsgraph
  which have been updated.
* depsgraph.id_type_updated('TYPE') is true if any datablock of the given
  type has been added, removed or modified.

More API updates are coming to properly handle multiple depsgraphs and
finer update granularity, but this should make Cycles work again.
2018-05-30 14:07:23 +02:00
Brecht Van Lommel
8ed723745e Fix unnecessary Cycles render updates when selecting objects. 2018-05-30 14:07:22 +02:00
Bastien Montagne
292125bfd3 Fix broken meshdeform modifier after recent cleanup. 2018-05-30 14:02:28 +02:00
Campbell Barton
9c2db1455f Keymap: group paint modes, reorder enum
Menu now matches the keymap.
2018-05-30 13:47:24 +02:00
Campbell Barton
eb24c9a1e1 Keymap: Pose/Weight-Paint modes now co-exist
Use the same key for pose & weight paint mode (instead of texture paint)

This makes more sense since pose/weight paint modes
are often used in combination.
2018-05-30 12:56:38 +02:00
Campbell Barton
03ec3a6141 Cleanup: remove '.' 2018-05-30 12:56:38 +02:00
Clément Foucault
48ceeead10 DRW: Instance Data: Replace with static allocation that can be referenced.
This mean you can store data used for drawing inside the object engine
data.

Also fixes T55243 Crash in ASAN debug builds due to use-after-free memory in draw code - instances issue?
2018-05-30 12:25:20 +02:00
Clément Foucault
10c0bba28e Eevee: Hair: Fix hair strip view Position. 2018-05-30 12:25:20 +02:00
Clément Foucault
7e8fd563c6 DRW: Add compile option to disable deferred compilation.
This maybe usefull for debugging.
2018-05-30 12:25:20 +02:00
Clément Foucault
93de6ca2db DRW: Instance selection id: use Batch buffers instead of DRWInstanceData
This is motivated by the refactor of DRWInstanceData to be actual non
contiguous mempools.
2018-05-30 12:25:20 +02:00
Clément Foucault
0488b728eb Eevee: Add support for the Hair info node.
Only the random output is not supported for the moment.
2018-05-30 12:25:20 +02:00
Clément Foucault
10f6450ef2 Eevee: Add support for new Hair geometry system.
This now can shade actual poly strips that mimics cylinders.
This makes hair coverage exact compared to the line method and result in
smoother fading hair.

This does make the sampling a bit more exact but needs more samples to
converge properly.
2018-05-30 12:25:20 +02:00
Clément Foucault
501c0b1df8 GPUMaterial: Add support for hair vertex color, uvs and orco. 2018-05-30 12:25:20 +02:00
Clément Foucault
328f8dc21c DRW: Add new GPU hair system.
This new system use transform feedback to compute subdivided hair points
position. For now no smoothing is done between input points.

This new system decouple the strands data (uv, mcol) with the points
position, requiring less update work if only simulation is running.

In the future, we can have compute shader do the work of the feedback
transform pass since it's really what it's meant to. Also we could generate
the child particles during this pass, releasing some CPU time.

draw_hair.c has been created to handle all of the Shading group creations
as well as subdivision shaders.

We store one final batch per settings combination because multiple viewport
or render could use the same particle system with a different subdivision
count or hair shape type.
2018-05-30 12:25:20 +02:00