Commit Graph

61828 Commits

Author SHA1 Message Date
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
Clément Foucault
e0e3038b1e Hair Particles: DNA: Add properties for new GPU hairs.
Hair Particles shape properties are ported from cycles. Thoses properties
have the same defaults and have a do_version of their own. Cycles will use
theses properties instead of its custom ones.

Some realtime engine specific settings are also added to scene->r because
it's much easier to control as global values.

Bumping Version number so cycles can do its own do_version on top of the
default settings.
2018-05-30 12:25:20 +02:00
Clément Foucault
ec6da3d72e DRW: Add new per drawcall option to bypass culling. 2018-05-30 12:25:20 +02:00
Clément Foucault
201952aed2 GPUTexture: Add support for GL_RGBA16 texture format. 2018-05-30 12:25:20 +02:00
Clément Foucault
3bc0cb08b8 DRW: Add DRW_CALL_PROCEDURAL DRWCall type.
This mimics the behaviour of DRW_shgroup_empty_tri_batch_create and will
replace it eventually.

The advantage is that it's compatible with transform feedback.
2018-05-30 12:25:20 +02:00
Clément Foucault
7b9a0ed8c4 BLI: Utils: Add Macro that compute the number of digits in integers type.
Usefull if you want to create char chains to contains hashes of a certain
type.
2018-05-30 12:25:20 +02:00
Campbell Barton
08d325805f Keymap: add back sculpt keys
Shouldn't have been removed in recent keymap edits.
2018-05-30 12:18:26 +02:00
Bastien Montagne
72f4ac99c7 Cleanup/fix wrong modifiers targets handling in COW context.
Modifiers stack only get COW/evaluated IDs, so no need to go auery again
DEG for those. Further more, now unified handling of EditBMesh case (was
done on case-by-case basis in a few modifiers, not all for some reason).

We are still missing the ability to get final and cage deformed meshes
when in Edit mode though, this is to be defined/implemented in depsgraph.
2018-05-30 12:04:06 +02:00
Sergey Sharybin
e55c1a9b5a Depsgraph: Add TODO about backing up evaluated state of ID 2018-05-30 12:02:32 +02:00
Sergey Sharybin
edc1e65809 Add deformed evaluated mesh to object
This is a first step to have correspondence of legacy derivedDeform
within a new formulation. Only base ground for now to support file
reading, copy-on-write remapping and such.
2018-05-30 11:49:45 +02:00
Sergey Sharybin
6afa0a7a50 Fix T55253: Camera lens can't be edited after keyframing it
Bring back animation channel exception for tag flag=0.
2018-05-30 11:26:19 +02:00
Sergey Sharybin
9abbf73d3f Cleanup: Wrap object runtime eval members into own struct 2018-05-30 11:11:03 +02:00
Campbell Barton
a01244cade Outliner: support toggling non-active edit/pose mode objects
Support switching non-active objects in/out of a mode from the outliner.

- This allows users to change which objects are in a mode w/o
  having to exit the mode and change seleciton.
- Changing the mode of the active object applies to all other objects.
- By convention setting a mode selects, removing de-selects,
  this is done for convenience so switching to a mode from object mode
  maintains the set of objects in the current mode.

See: T55246
2018-05-30 10:29:41 +02:00
Campbell Barton
47a8d3b880 UI: Show outliner icon highlight w/ non-active edit-mode objects 2018-05-30 10:29:41 +02:00
Campbell Barton
e054b7f251 BKE_object: Add BKE_object_data_is_in_editmode 2018-05-30 10:29:41 +02:00
Campbell Barton
01f9e13c30 Cleanup: use 'e' prefix for enum types 2018-05-30 10:29:41 +02:00
Sergey Sharybin
d709705203 Cleanup: Naming, match policy with rest of copy-on-write design 2018-05-30 10:24:54 +02:00
Sergey Sharybin
301a27187c Cleanup: More typed allocation type enum usage
Majority of the code is EOL, but still handy for debug purposes.
2018-05-30 10:22:28 +02:00
Sergey Sharybin
b54cc68365 Cleanup: Use typed allocation type enum in custom data API 2018-05-30 10:20:22 +02:00
Sergey Sharybin
0ed2e254bb Use enum for custom data allocation type
Allows to easily see human readable value in debugger.
2018-05-30 10:17:09 +02:00
Campbell Barton
cb22caa8c7 Merge branch 'master' into blender2.8 2018-05-30 08:49:34 +02:00
Campbell Barton
18c12803bd Edit Mode: add success return value
Also remove fix for T6614, since BKE_object_obdata_is_libdata
no longer checks proxy.
2018-05-30 08:41:06 +02:00
Campbell Barton
0e0502cbdf Merge branch 'master' into blender2.8 2018-05-30 07:34:22 +02:00
Campbell Barton
2c03d6a12b DNA: add OB_DATA_SUPPORT_EDITMODE macro 2018-05-30 07:31:35 +02:00
Jeroen Bakker
9992079d59 EEVEE: LookDev, reset camera settings 2018-05-29 22:02:36 +02:00
Germano
36e6d44c90 Fix last commit. 2018-05-29 15:58:56 -03:00
Germano
00dc1c08aa Fix T55223: Crash when changing lattice resolution. 2018-05-29 15:39:44 -03:00
Campbell Barton
f8908f0d43 Correct last commit
Left unneeded code in space_context_cycle_invoke
2018-05-29 18:18:36 +02:00
Campbell Barton
e9cd2fb23b Keymap: partially implement changes from T55162
- Use Tab key for search.
- Number keys switch modes.
- The number of the current mode can open a submode menu
  (currently only works for edit-mode)
- Ctrl-Tab, Ctrl-Shift-Tab - cycle workspaces.
2018-05-29 17:52:27 +02:00
Jeroen Bakker
929c78e33c EEVEE: LookDev blurred background 2018-05-29 17:50:51 +02:00
Dalai Felinto
08b8fa0863 Cleanup 2018-05-29 17:33:14 +02:00
Dalai Felinto
85d845ef98 Fix crash when moving object parented to a curve
Note, we can probably remove scene from BKE_object_where_is_calc
and force to always use it from depsgraph.
2018-05-29 17:33:07 +02:00
Dalai Felinto
5eda9732b3 Use the correct time to evaluate object in BKE_object_where_is_calc functions 2018-05-29 17:05:32 +02:00
Dalai Felinto
e2bac484e0 Use correct time for curve parent evaluation
Time should alwaus come from depsgraph, not scene.
2018-05-29 17:05:32 +02:00
Jeroen Bakker
36e9ed98e7 StudioLight: Calculate Specular irradiance 2018-05-29 16:29:11 +02:00
Jeroen Bakker
f98c838b71 EEVEE: LookDev reversed the background fadeout 2018-05-29 16:22:53 +02:00
Jeroen Bakker
d5889f57ae EEVEE: LookDev fadeout to the world horizon color 2018-05-29 16:22:53 +02:00
Bastien Montagne
8f670dd855 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/BKE_material.h
	source/blender/blenkernel/BKE_mesh.h
	source/blender/blenkernel/intern/library_remap.c
	source/blender/blenkernel/intern/material.c
	source/blender/editors/object/object_relations.c
	source/blender/editors/render/render_preview.c
	source/blender/makesrna/intern/rna_object.c
2018-05-29 16:02:53 +02:00
Bastien Montagne
f7af08b5fe Cleanup: Get rid of G.main in BKE_material.
Note that in some cases, this only moves the G.main case to somne other
places - in particular, RNA getters/setters are becoming annoying here...
2018-05-29 15:49:21 +02:00
Campbell Barton
9d037153f7 Object Modes: disable mode switching on selection
See T55246
2018-05-29 15:47:08 +02:00
Howard Trickey
44b99d1052 For 2.8, bring back debug mode indices display. 2018-05-29 09:31:00 -04:00
Campbell Barton
43584f4a41 Missed own last commit 2018-05-29 15:17:34 +02:00
Dalai Felinto
bc54823376 Fix T55244: Parenting object(s) to curve crashes blender
There is a chance parts of Blender call BKE_object_workob_calc_parent
with ob->parent objects that are outside the depsgraph.

This we can tackle later since these are corner cases anyways,
and this fix fixes all parenting operators in Blender.
2018-05-29 15:11:20 +02:00