Commit Graph

75472 Commits

Author SHA1 Message Date
Ray Molenkamp
4f97f58513 MSVC: Fix lite build.
MSVC still defines __cplusplus as 199711L until it's in full conformance with the newer c++ standards, however the things we need from the standard are fully supported, hence a check for the msvc version was needed.
2018-03-20 08:26:11 -06:00
Clément Foucault
cdf0df10a6 DRW: Fix bound_ubo_slots allocation size. 2018-03-20 15:16:10 +01:00
Clément Foucault
8a9be95cfb DRW: Fix ubo binding code. 2018-03-20 15:08:23 +01:00
Sybren A. Stüvel
09c88fed1f Fixed: cache clearing when using multiple Alembic files. 2018-03-20 12:54:48 +01:00
Campbell Barton
1782abf6e2 Fix BLI_assert for MSVC
Also use `_BLI_ASSERT` prefix for internal defines.
2018-03-20 11:56:11 +01:00
Bastien Montagne
04b8b1a167 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/intern/library_query.c
2018-03-20 11:33:59 +01:00
Bastien Montagne
60ff803998 Fix missing ID pointer handling in materials in ID remapping code. 2018-03-20 11:32:16 +01:00
Sergey Sharybin
46a391b668 Fix missing array duplication when copying material
Texture paint slots were copied as a pointer, causing double-free.
2018-03-20 11:22:47 +01:00
Campbell Barton
1662c514c0 Cleanup: unused variables
Missed in own recent changes.
2018-03-20 08:03:58 +01:00
Joshua Leung
c8a7c4f245 Merge branch 'master' into blender2.8 2018-03-20 16:13:37 +13:00
Joshua Leung
8e5c407fc4 Fix compile error with MSVC2013 - Can't use __func__ (from BLI_assert) in inlined functions
ERROR: blenlib/intern/math_base_inline.c:371 - '__func__' : undeclared identifier (C:\blenderdev\master2\blender\source\blender\editors\lattice\editlattice_tools.c)  [C2065]
2018-03-20 16:03:43 +13:00
Bogdan Nagirniak
b65933e7b3 Fix T54019: copying and linking bugs with custom ID pointer properties. 2018-03-19 22:14:02 +01:00
Germano
84536d1d3c GPU Bufferes: Small optimization when updating buffers
With the API recently added to gawain, it is now possible to update the vbos linked to the batch.
So the batch does not have to be destroyed.
The optimization is more sensitive when sculpt is made on low poly meshs
2018-03-19 18:09:00 -03:00
Matthias Ellerbeck
8ecf35d850 Fix T54240: automatic node link moving should take into account type.
Without this a "Clearcoat" link could be moved to "Clearcoat Normal"
for example, which doesn't make much sense.

Differential Revision: https://developer.blender.org/D3105
2018-03-19 21:52:49 +01:00
Campbell Barton
254bb922e8 Cleanup: avoid passing bContext to particle API
Also add EvaluationContext to PEData
2018-03-19 19:04:50 +01:00
Campbell Barton
402486ea7b Merge branch 'master' into blender2.8 2018-03-19 18:18:49 +01:00
Campbell Barton
b8eca8e07d Cleanup: use utility header for particle looping 2018-03-19 18:18:04 +01:00
Campbell Barton
5e81d993af Merge branch 'master' into blender2.8 2018-03-19 18:14:05 +01:00
Campbell Barton
a3486e735f Cleanup: move particle undo into own file
Also avoid extern declarations which can get out of sync.
2018-03-19 17:46:49 +01:00
Campbell Barton
a5fc0ae150 Cleanup: move armature undo into own file 2018-03-19 17:45:20 +01:00
Campbell Barton
566f4e06ba Cleanup: move metaball undo into own file 2018-03-19 16:59:34 +01:00
Campbell Barton
e7ca9d3477 Cleanup: move curve undo into own file 2018-03-19 16:30:53 +01:00
Campbell Barton
c78ebf9f26 Cleanup: split lattice into own library
Was mixed with object functionality.
2018-03-19 15:45:50 +01:00
Campbell Barton
8859927e6f Merge branch 'master' into blender2.8 2018-03-19 11:17:52 +01:00
Campbell Barton
342a18287f Cleanup: type conversion warning 2018-03-19 09:12:48 +01:00
Jeroen Bakker
7729966af1 Fixed typo Python API
`mathutils.geometry.barycentric_transform` used `tri_a[1-3]` for the
target triangle, but in fact they are `tri_b[1-3]`
2018-03-19 08:19:48 +01:00
Bastien Montagne
e95282e783 Merge branch 'master' into blender2.8 2018-03-18 16:05:02 +01:00
Bastien Montagne
0301df40e5 Fix ugly recursive pattern in RNA PointCache data layout.
PointCache was having a collection of items of PointCache type, having a
collection of items of PointCache type, having...

Nuff said.

For now, chose the 'ugly' way to fix it, that is, the one that changes
nothing to API and scripts using it: we define another 'PointCacheItem'
RNA type for items of our point cache collection, which has exact same
interface as PointCache except for the collection.

This is doomed to be rewritten at some point anyway, not worth spending
time trying to define a really correct data layout for now.
2018-03-18 15:37:23 +01:00
Campbell Barton
2a9f000806 Cleanup: kdopbvh, only set parent nodes once 2018-03-18 05:08:12 +01:00
Campbell Barton
a51fdd89fd Cleanup: use MEM_SAFE_FREE 2018-03-18 05:08:12 +01:00
Campbell Barton
2aa0bde3dc mathutils: replace interp w/ blend when standalone 2018-03-18 05:08:12 +01:00
Clément Foucault
4a3d94c073 Eevee: Volumetrics: Fix crash when using smoke volumes. 2018-03-17 19:08:14 +01:00
Clément Foucault
1ed287058d DRW: Fix error in texture binding / unbinding. 2018-03-17 18:48:14 +01:00
Clément Foucault
87d88581aa GWN: Vertex Buffer refactor.
We now alloc a vbo id on creation and let OpenGL manage its memory directly.
We use glMapBuffer to get this memory location.

This enables us to reuse and modify any vertex buffer directly without
destroying it with its associated Batches.

This commit does not really improve performance but will let us implement
more optimizations in the future.

We can also resize the buffer even if this can be slow if we need to keep
the existing data.

The addition of the usage hint makes dynamic buffers not a special case
anymore, simplifying things a bit.
2018-03-17 17:02:07 +01:00
Clément Foucault
dd44248219 DRW: Move cache time to GPUViewport for profiling
This enables us to average this timer over time like the others.
2018-03-17 17:02:07 +01:00
Gaia Clary
9ed7093aa6 Merge branch 'master' into blender2.8 2018-03-17 14:24:06 +01:00
Gaia Clary
64fbd50e4c Refactor: Collada: remove param, changed order of params in Function call
* In the Collada Module parameters are typically ordered
  in a similar way. I changed this to:

    extern std::string get_joint_id(Object *ob, Bone *bone);

* The Object parameter was not used in get_joint_sid().
  I changed this to:

	extern std::string get_joint_sid(Bone *bone);
2018-03-17 14:16:19 +01:00
Bastien Montagne
dc08df659e Merge branch 'master' into blender2.8 2018-03-16 17:50:07 +01:00
Bastien Montagne
e15591a1d7 Fix (unreported) a broken 'RNA diff collection' case.
When a name property is defined for collection's struct, but no name is
actually set, we want to also fallback to index case. We cannot handle
empty names to address items of a collection!
2018-03-16 17:49:54 +01:00
Bastien Montagne
c722fd2184 Some more minor cleanups. 2018-03-16 17:49:54 +01:00
Bastien Montagne
5389964eea Add an assert to BKE_icon_changed() that we are actually dealing with ID icon.
Otherwise, ID->obj is an opaque pointer, wrong usage here could lead to
a vast amount of bad things.
2018-03-16 17:17:19 +01:00
Bastien Montagne
1a71d5ae85 Fix T54310: Assert when enable Brush custom icon.
We had a mix of two issues here actually:
* First, Brush are currently using their own sauce for custom previews,
this is not great, but moving them to use common ImagePreview system of
IDs is a low-priority TODO. For now, they should totally ignore their
own ImagePreview.
* Second, BKE_icon_changed() would systematically create a PreviewImage
for ID types supporting it, which does not really makes sense, this
function is merely here to 'tag' previews as outdated. Actual creation
of previews is deferred to later, when we actually need them.
2018-03-16 17:06:43 +01:00
Bastien Montagne
67e2806dcb Cleanup: naming and const parameter. 2018-03-16 16:44:23 +01:00
Sergey Sharybin
36e7de9eb3 Merge branch 'master' into blender2.8 2018-03-16 12:26:37 +01:00
Sergey Sharybin
da4efaeb87 Depsgraph: Support colored addresses in debug prints
Enabled with --debug-depsgraph-pretty, only works with ANSI terminals.

Thanks Bastien for review!
2018-03-16 12:24:51 +01:00
Sergey Sharybin
295d8510af Add Truecolor ANSI console constants
They are used to start and end colored output in console.
Use with care, it is up to you to check that console actually
supports Truecolor ANSII.

In thew future we can extend this to other consoles and platforms.
2018-03-16 12:16:29 +01:00
Sergey Sharybin
f0596bf660 Hash: Add utility function to convert address to rgb values
Some magic hashing, will become handy to make debug messages
easier to follow.
2018-03-16 12:11:55 +01:00
Sergey Sharybin
5baf0de6e7 Merge branch 'master' into blender2.8 2018-03-16 11:24:41 +01:00
Sergey Sharybin
3baf31e73a Depsgraph: Move evaluation debug prints to depsgraph
This way we can easily control format and keep it consistent.

And also possibly do other trickery, like coloring addresses!
2018-03-16 11:14:38 +01:00
Campbell Barton
5de9c8f6f0 Cleanup: move mesh mirror functions to own file 2018-03-17 00:55:11 +11:00