Commit Graph

58707 Commits

Author SHA1 Message Date
Campbell Barton
9c91c75ea6 Merge branch 'master' into blender2.8 2018-01-11 13:24:41 +11:00
Campbell Barton
9d62e6e782 UI: don't draw outline when it's not calculated
Outline drawing was running even when there were no verts to draw.
Causes an assert in 2.8.
2018-01-11 13:23:55 +11:00
Campbell Barton
ac2ebf9c54 Fix T53455: Object disappear w/ TrackTo constraint
Regression caused by own commit 16fbb47c88,
this is really an edge case though since calling normalize twice fixes.
2018-01-11 10:57:30 +11:00
Philipp Oeser
d0cc5d8948 Fix T53752: Draw curve fails w/ stylus 2018-01-11 10:23:52 +11:00
Campbell Barton
6112cde3f9 Merge branch 'master' into blender2.8 2018-01-11 10:19:00 +11:00
Campbell Barton
f330005266 Cleanup: BKE naming conventions for datablock add/localize
Conventions were already followed nearly everywhere.
2018-01-11 10:01:01 +11:00
Julian Eisel
3f16810150 Cleanup: Naming, avoid passing bContext to low-level function, etc 2018-01-10 23:02:10 +01:00
Julian Eisel
748e95ad50 Fix crash when deleting collections
With factory settings, steps to reproduce were:
* Select "Collection 1" (in "RenderLayer")
* Delete
It might crash at this point, although maybe this crash is ASAN only.

However, this was also doing some weird things that I've corrected now. It
called outliner_build_tree in an operator callback. This should only be
called in the main redraw function or so, not in regular handlers.
Instead, we manually cleanup the tree to keep it valid.
2018-01-10 22:45:44 +01:00
Sergey Sharybin
76bdd40bfd Subsurf: Loop array should not be called mv
mv is a mesh vertex, not loop.
2018-01-10 14:58:49 +01:00
Sergey Sharybin
fca202566f Subsurf: Remove increment of unused variable 2018-01-10 14:58:09 +01:00
Sergey Sharybin
181124ad13 Fix compilation error
Seems of new padding were added in 2.8 branch.
2018-01-10 14:15:13 +01:00
Sergey Sharybin
5d38c14116 Merge branch 'master' into blender2.8 2018-01-10 13:22:03 +01:00
Sergey Sharybin
2737837b09 Fix wrong data type used for undo memory limit 2018-01-10 13:20:36 +01:00
Sergey Sharybin
f21f18b572 Task scheduler: Use const qualifier in callbacks for parallel range 2018-01-10 12:53:59 +01:00
Sergey Sharybin
5614193745 Task scheduler: Use restrict pointer qualifier
Those pointers are never to be aliased, so let's be explicit about this and hope
compiler does save some CPU ticks.
2018-01-10 12:49:51 +01:00
Sergey Sharybin
518c65460e Task scheduler: Use more const qualifiers 2018-01-10 12:27:43 +01:00
Sergey Sharybin
f68b2fd233 RNA: Increase memory limit settings to their possible max on platform
This is quite common to have 64GB memory now, and even 128. There is no reason
to add any artificial caps on the cache and undo memory here. We can not protect
against using too much memory in one cases and allow use of full computer
potential in others.

Now 32 bit will use 2GB max (as it used to be), but 64bit will use whatever
number of megabytes fits into integer.

Reviewers: campbellbarton, mont29

Subscribers: sebastian_k

Differential Revision: https://developer.blender.org/D2972
2018-01-10 11:09:10 +01:00
Sergey Sharybin
f0610563ee math utils: Add size_t version of min and max functions 2018-01-10 11:06:44 +01:00
Campbell Barton
f59303bead Fix color for manipulator drawing
Was drawing black after the first draw call.
For now set the shader before each draw call,
noted as TODO to investigate a nicer way to handle.
2018-01-10 20:50:14 +11:00
Campbell Barton
2b56faebe5 Merge branch 'master' into blender2.8 2018-01-10 19:58:05 +11:00
Campbell Barton
18f53d8822 Cleanup: comment block alignment 2018-01-10 19:57:02 +11:00
Campbell Barton
bc02c5de49 Alternate fix for brush user count
This reverts change to BKE_brush_add,
callers now remove the extra user.

Note this isn't very convenient for callers but
is consistent with other ID types.

In the future we will probably remove this and have new
ID's created with zero users.
2018-01-10 19:34:34 +11:00
Campbell Barton
3f837341c8 Correction to brush user commit
RNA API was compensating for the extra user.
2018-01-10 18:31:54 +11:00
Campbell Barton
6e6b79de35 Fix brush user count
New brushes had 2 users on adding.
Caused assert removing them after.
2018-01-10 17:45:34 +11:00
Campbell Barton
5ff33ecdf0 Merge branch 'master' into blender2.8 2018-01-10 14:01:09 +11:00
Germano
5c3dc01f54 Draw Manager: Edit Mode: Curve: uniforms were not being setted 2018-01-10 00:40:02 -02:00
Germano
7d865bc4ab Fix T53748: uniform globalsBlock was not being added was not being added to the shaders of the curves handles 2018-01-10 00:08:51 -02:00
Campbell Barton
cacba951ea Correct typos 2018-01-10 12:43:29 +11:00
Campbell Barton
fdd3d969a6 Fix T53491: Absolute tablet motion detection fails
When using a tablet, detecting absolute motion only worked
when activating a tool with the tablet.

Pressing Enter to run a tool for e.g. would use relative motion.

Now store is_motion_absolute in the event,
set for new events based on the most recent motion events.
2018-01-10 12:41:45 +11:00
bjornmose
9aada45e52 fix t53701 minimal changes to get it working right 2018-01-10 01:51:04 +01:00
mano-wii
3c6e19b30b Curve/Surface Display: UV support 2018-01-10 10:11:32 +11:00
Bastien Montagne
0f6ed7d111 Fix (unreported) potential crash.
RNA_pointer_as_string could return NULL instead of a valid string in some cases.
2018-01-09 19:51:50 +01:00
Clément Foucault
a0655ed487 Eevee: Fix AO in planar reflections. 2018-01-09 19:01:24 +01:00
Clément Foucault
8aaf7bc438 Eevee: Fix Planar probe refresh. 2018-01-09 18:59:13 +01:00
Sergey Sharybin
5fe87a0a8c Task scheduler: Use single thread branch when range fits into single chunk 2018-01-09 18:10:47 +01:00
Sergey Sharybin
4a3b303bb0 Task scheduler: Fix wrong tasks calculation when chunk size is too big 2018-01-09 18:07:34 +01:00
Clément Foucault
9135530f79 Eevee: Support for dupli lamps without shadows. 2018-01-09 18:01:56 +01:00
Clément Foucault
9f94f17ea4 Eevee: Fix crash with volumetrics. 2018-01-09 17:29:56 +01:00
Sergey Sharybin
6deb908a5c Merge branch 'master' into blender2.8 2018-01-09 16:15:33 +01:00
Sergey Sharybin
932d448ae0 Task scheduler: Use const qualifiers in parallel range 2018-01-09 16:09:33 +01:00
Sergey Sharybin
8cffb0a141 Task scheduler: Avoid over-allocation of tasks for parallel ranges
This seems to only cause extra rthreading overhead on systems with 10s of
threads, without actually solving anything.
2018-01-09 16:09:33 +01:00
Sergey Sharybin
c4e42d70a4 Task scheduler: Add minimum number of iterations per thread in parallel range
The idea is to support following: allow doing parallel for on a small range,
each iteration of which takes lots of compute power, but limit such range to
a subset of threads.

For example, on a machine with 44 threads we can occupy 4 threads to handle
range of 64 elements, 16 elements per thread, where each block of 16 elements
is very complex to compute.

The idea should be to use this setting instead of global use_threading flag,
which is only based on size of array. Proper use of the new flag will improve
threadability.

This commit only contains internal task scheduler changes, this setting is not
used yet by any areas.
2018-01-09 16:09:33 +01:00
Sergey Sharybin
3144f0573a Task scheduler: Simplify parallel range function
Basically, split it up and avoid extra abstraction level.
2018-01-09 16:09:33 +01:00
Sergey Sharybin
4c4a7e84c6 Task scheduler: Use single parallel range function with more flexible function
Now all the fine-tuning is happening using parallel range settings structure,
which avoid passing long lists of arguments, allows extend fine-tuning further,
avoid having lots of various functions which basically does the same thing.
2018-01-09 16:09:33 +01:00
Sergey Sharybin
d2708b0f73 Task scheduler: Get rid of extended version of parallel range callback
Wrap all arguments into TLS type of argument. Avoids some branching and also
makes it easier to extend things in the future.
2018-01-09 16:09:33 +01:00
Bastien Montagne
1cab3be7a7 Significant step toward supporting IDProperties in new RNA diff code.
Still not fully working, more work TODO (IDProps are rather tedious to
handle in RNA... :/ ).

Partial fix of T53715: 2.8: Removing keymap items no longer works.
Some shortcuts can now be edited/deleted again, but some remain
mysteriously frozen!
2018-01-09 15:54:33 +01:00
Clément Foucault
2ee5e05107 DRWInstanceData: Bump the max data size. 2018-01-09 15:37:28 +01:00
Clément Foucault
2bb08f0ad2 DRW & GPUViewport: Cleanup unused code. 2018-01-09 14:54:11 +01:00
Clément Foucault
377915b081 DRW: Make use of DRWInstanceData.
This modify the selection code quite a bit but it's for the better.
When using selection we use the same batching / instancing process but we draw each element at a time using a an offset to the first element we want to draw and by drawing only one element.
This result much less memory allocation and better draw time.
2018-01-09 14:54:11 +01:00
Clément Foucault
aa0097ad5e DRW: Add instance data memory manager.
This is a special memory manager that keeps memory blocks ready to send as vbo data.
Since we loose which memory block was used each DRWShadingGroup we need to redistribute them in the same order/size to avoid to realloc each frame.
This is why DRWInstanceDatas are sorted in a list for each different data size.
2018-01-09 14:54:11 +01:00