Commit Graph

68343 Commits

Author SHA1 Message Date
e31f0fad97 Cleanup: order of modifiers' headers includes.
BLI should always comes first, before DNA, BKE etc. And
`BLI_utildefines.h` should come before any other BLI (since it's some
sort of system include really, among other things...).

Thisi should help to reduce the noise in patches when adding stuff
like uint64_t members to DNA structs... ;)
2019-02-25 11:39:14 +01:00
1419399f03 Fix T61919: Rename "Smooth Vertex" -> "Smooth Vertices" 2019-02-25 11:12:17 +01:00
012483b6e4 Fix T60880: Assert deleting grease pencil object from outliner 2019-02-25 16:52:20 +11:00
9a311c58aa writefile: disable buffering when writing ZLIB
While Buffering output is useful for file writing and memfile
compression it's redundant when the output is already buffered.
It doesn't make a significant difference for ZLIB
however it makes a moderate improvement for LZ4, see T56162.
2019-02-25 13:27:23 +11:00
893fa59831 readfile: re-enable read on demand for WIN32
Revert workaround for T61855. It's likely this was caused by slow seek
for compressed files since the same behavior happens on Linux T61880.
2019-02-25 09:02:19 +11:00
5d7ce96b5d GP: Don't set cache as dirty with Onion 2019-02-24 17:00:12 +01:00
ccfda7dc2c GP: Disable Onion calculation when Overlay is OFF
Now, it's not required to disable the Onion in Overlay panel.
2019-02-24 16:03:03 +01:00
20dfa8aa28 readfile: minor changes to support other compression formats
Allow different readers to re-use the file descriptor.
2019-02-24 23:42:05 +11:00
6bab905c9d readfile: Disable delayed data reading for compressed blend files
Seeking gzip files is very slow, disable it.

Resolves T61880
2019-02-24 12:47:48 +11:00
8ed82e82e6 readfile: use regular file access when not a gzip
Allows for different behavior w/ compressed files,
will also make it simpler to support other compression types,
see: T56162
2019-02-24 12:41:37 +11:00
519982fd3e Cleanup: de-duplicate readfile file opening 2019-02-24 10:48:36 +11:00
2f8d8b5e5e GPUBuffer: Fix fast navigate in on smoooth multires grid 2019-02-23 22:36:04 +01:00
f680ab9c4e Fix strips text offset when zooming VSE timeline
Glyph cache is cleared by UI_view2d_zoom_cache_reset, when zooming V2D, but is required to calculate text height in UI_view2d_text_cache_draw

This caused text in strips to "jump around"

There was a comment in UI_view2d_zoom_cache_reset:
While scaling we can accumulate fonts at many sizes (~20 or so).
Not an issue with embedded font, but can use over 500Mb with i18n ones! See [#38244].
2019-02-23 11:37:24 -08:00
82b3b1a3c6 Revert "Glyph cache is cleared by UI_view2d_zoom_cache_reset, when zooming V2D, but is required to calculate text height in UI_view2d_text_cache_draw"
Accidentaly committed unwanted changes.

This reverts commit 6bcdcc96c2.
2019-02-23 11:33:48 -08:00
5cc0bfa73a fix T61122 : Collada Importer: Added support for transparency for Materials.
This fix sets the Base color in the principled BSDF Shader and in
 the Material->r,g,b,a values. So the transparency and color are the
 same when switching the "use nodes" option for the material
2019-02-23 19:35:31 +01:00
5d822f4508 fix T61122 : Added support for Materials with Nodes disabled.
- The Collada exporter did not take care of
  material transparency when nodes are turned off.

- recent change to use ma->alpha_threshold seems to have
  been wrong. transparency is now taken from ma->a when
  nodes are turned off.
2019-02-23 18:17:46 +01:00
0207d20cd4 fix T59951: View all sequences does not take into account region overlap
fix centering preview

Reviewed by: Brecht

Differential revision: https://developer.blender.org/D4388
2019-02-23 06:16:52 -08:00
6bcdcc96c2 Glyph cache is cleared by UI_view2d_zoom_cache_reset, when zooming V2D, but is required to calculate text height in UI_view2d_text_cache_draw
This caused text in strips to "jump around"

There was a comment in UI_view2d_zoom_cache_reset:
While scaling we can accumulate fonts at many sizes (~20 or so).
Not an issue with embedded font, but can use over 500Mb with i18n ones! See [#38244].

Reviewed by: Brecht

Differential revision: https://developer.blender.org/D4389
2019-02-23 06:14:44 -08:00
6eb59c5778 Cleanup: GCC redundant declarations
Previous waning suppression was only tested with clang.
2019-02-23 22:18:34 +11:00
8214a1ae34 GP: Define new Draw Mode
Add a new Draw Mode to display panel in order to define the z-.depth order of the strokes using the real 3D position and not the 2D layer position.

This change makes possible to use VR with grease pencil drawings because the depth of the strokes change with camera position. Also, provide an alternative solution to tasks: T57859, T60325, 

The parameter only works with 3D space depth ordering. The Back and Front depths are incompatible with 3D Space mode.

Options are:
- Back
- Front
- 3D Space->2D Layers (default)
-3D Space->3D Location (new mode)
2019-02-23 11:46:24 +01:00
702a2ba0ef Cleanup: quiet undeclared variable warnings 2019-02-23 19:20:20 +11:00
af5cfa7544 Cleanup: quiet undeclared variable warning 2019-02-23 19:20:20 +11:00
9d309b7978 Cleanup: quiet undeclared variable warning
Also move view_ubo into G_draw.
2019-02-23 19:20:20 +11:00
7a5854f4ce Cleanup: quiet undeclared variable warning
Move bpy_context_module declaration to bpy_rna.h.
2019-02-23 19:20:20 +11:00
6ab634ccc4 Cleanup: use specific names for global variables
hash & hashsizes are generic names, be more specific & define the
generic names locally.

Quiet undeclared variable warnings.
2019-02-23 19:20:20 +11:00
9d78b7edb9 Cleanup: use function instead of extern variable
Quiet undeclared variable warning.
2019-02-23 19:20:19 +11:00
085e9e3bed Cleanup: move variable declarations to headers
Quiet undeclared variable warning.
2019-02-23 12:59:13 +11:00
779860d34e readfile: disable delayed data reading for WIN32
Seeking the file causes slow down on Windows.

Resolves T61855
2019-02-23 09:26:37 +11:00
Dalai Felinto
655faca105 Fix: Workbench assert on non-image texture node
This was not report, but it would happen if you open the sample file
from T61858 and changed to solid view with texture.
2019-02-22 18:01:30 -03:00
Dalai Felinto
e9f738754d Cleanup: Remove redudant function call
BKE_main_id_clear_newpoints is already called from copy_object_set_idnew().
2019-02-22 16:41:23 -03:00
0ca623362d Fix T61837: Assert in Eevee multiresolution modfier in sculpt mode
Note that this commit remove the support (that was not really working)
for shadows in sculpt mode.
2019-02-22 17:14:27 +01:00
3b132778de Multires: Support smooth shading when sculpting
On CCG side it is done similar to displacement, where we have
a dedicated functor which evaluates displacement. Might be seemed
as an overkill, but allows to decouple SubdivCCG from mesh entirely,
and maybe even free up coarse mesh in order to save some memory.

Some weak-looking aspect is the call to update normals from the
draw manager. Ideally, the manager will only draw what is already
evaluated. But it's a bit tricky to find a best place for this since
we avoid dependency graph updates during sculpt as much as possible.
The new code mimics the old code, this is how it was in 2.7.

Fix shading part of T58307.
2019-02-22 17:02:51 +01:00
7372058649 Wireframe: Add object and random coloring option in wireframe mode
The option is separated from the solid mode color option.

Random color uses the same method as solid mode.

Selection state is indicated by a brighter color that is outside the
brightness range of the unselected state colors. The active state is
indicated by the outlines that is, now, still drawn in wireframe mode.

Coloring of the selection / active outline is not optimal because it
can look ugly in some cases of color combination. But the outline color
is using index range coloring so it's not trivial to change the color of
the outline per object. For now we use the same outline color used in solid
mode for consistency and also still add an emphasis on the selected objects.

The Single color option uses the theme color. Maybe it would be nice to
change the name of it in a latter commit to avoid confusion.
2019-02-22 16:06:23 +01:00
Dalai Felinto
e278b38b92 Fix T61788: Hidden objects reappear after rendering
The change in outliner and viewport visibility (897e047374) was made
assuming the bases of the render and viewport depsgraph were
independent. Thus we were deliberately setting base visibility when
rendering:

```
/* When rendering, visibility is controlled by the enable/disable option. */
if (mode == DAG_EVAL_RENDER) {
    base->flag |= BASE_VISIBLE;
}
```

However, we were syncing data back to the original depsgraph, leading to
hidden viewport objects to re-appear.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4391
2019-02-22 11:53:59 -03:00
ce79d86c08 Merge branch 'blender2.7' 2019-02-22 15:53:44 +01:00
3b86c99260 Fix previous commit
Somehow quote got missing the last moment.
2019-02-22 15:53:22 +01:00
86dd9bf53d Merge branch 'blender2.7' 2019-02-22 15:50:36 +01:00
427f3978e1 Always show version when running in background mode
The goal is to make it easy to know which exact blender version
and built was used for a job on a farm. This includes but not
exclusively render farms. But same is handy for simulation tasks
as well.
2019-02-22 15:47:54 +01:00
Dalai Felinto
bef82f72d2 Fix T61600: Physics properties inactive when appending objects
This problem existed in 2.79 as well. The rigid body setting is related
to the scene the object was created.

We now clear all the rigid body properties of the appended objects to
prevent them from lingering in this state where they have settings yet
cannot be used in the simulation.

Reviewers: mont29, brecht

Differential Revision: https://developer.blender.org/D4380
2019-02-22 11:20:27 -03:00
2278763681 Multires: Don't force smooth shading
There is still work needed to be done from multires side to fully
support smooth shading. So can't just always have smooth shading.

Roll back to a proper code in GPU side, the rest will be handled
from CCG side.
2019-02-22 14:45:32 +01:00
947d78b00b Multires: Fix ownership problem causing crashes
Fixes crash when leaving multires mode.

Fixes T61836: Saving while in multires makes blender crash
2019-02-22 13:35:07 +01:00
68aea23c27 Revert "makesrna: Fix build error on windows."
This reverts commit 8b235dd2e3.
2019-02-22 19:45:25 +11:00
4da53fc3e3 Cleanup: function wrapping, spelling 2019-02-22 18:37:19 +11:00
6bca694bef Comments: add doxy sections to readfile.c
Some minor changes to arrange code into useful sections too.
2019-02-22 18:23:52 +11:00
7bfb6c242b readfile: support blend files over 2gb
Should work for 4gb+ files too however I wasn't able to test that.
2019-02-22 16:56:22 +11:00
358e07f447 readfile: reduce memory usage at load time
Delay loading all DATA sections of the blend file until they're needed.

Loading all data-blocks caused high peak memory usage especially with
libraries - since a lot of data may exist which isn't used directly.

In one test (spring project: 10_010_A.anim.blend),
peaked at ~12.5gig, dropping back to ~2.5gig once loaded.
With this change peaks memory usage reaches ~2.7gig while loading.

Besides this there are some minor gains from not having to read data
from the file-system and we can skip an alloc + memcpy reading data
written with the same version of Blender.
2019-02-22 14:55:18 +11:00
f3e9dff03d Cleanup: rename seek to file_offset
Prepare for seek callback to be added.
2019-02-22 14:05:03 +11:00
1381a4a948 Sculpt Overlay: Fix mask drawn as flat shaded when smooth shading enabled
Removes the flat shader variant since the attrib is specified for each vert
loop in flat shaded mode. It was something leftover from the previous
implementation.
2019-02-22 04:03:59 +01:00
e35b7e7326 GPUBuffers: Fix/cleanup multires implementation
The multires sculpt drawing was a not working in smooth mode.
Also hidding was not supported by the wireframe overlay and flat shaded
faces.

Codewise it is cleaner and index buffers are only updated if the
smoothing changes.
2019-02-22 04:03:59 +01:00
bfbf3b9558 Cleanup: make BHeadN private in readfile.c
Also add macro for accessing BHeadN from BHead.
2019-02-22 13:47:04 +11:00