Commit Graph

68300 Commits

Author SHA1 Message Date
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
9541ce2c26 Missed last commit
Harmless but not renamed as intended.
2019-02-22 10:40:51 +11:00
536c3b6578 Cleanup: rename readfile API functions
- blo_bhead_first (was blo_firstbhead)
- blo_bhead_next (was blo_nextbhead)
- blo_bhead_prev (was blo_prevbhead)
- blo_bhead_id_name (was bhead_id_name)
- blo_filedata_free (was blo_freefiledata)
- blo_filedata_from_file (was blo_openblenderfile)
- blo_filedata_from_memory (was blo_openblendermemory)
- blo_filedata_from_memfile (was blo_openblendermemory)
2019-02-22 10:31:17 +11:00
98306c31bd Missed last commit 2019-02-22 09:34:00 +11:00
b2906c2a4a Cleanup: comments, use bool for 'eof' variable
Also remove unused members headerdone, inbuffer & filedes,
use typed enum for file data flags.
2019-02-22 09:29:59 +11:00
d00f54e574 Transform: redo resize now constrains axis values
Before 1bfbfa2810 this wasn't essential because the constraints
prevented the axes from being applied.

Now redo ignores constraints - the input values must be constrained.
2019-02-22 08:52:33 +11:00
4d4ae491c8 makesrna: Remove usage of dynamically linked pthreads4w
With pthreads now being static, there is no more reason to copy the dll.
2019-02-21 14:21:31 -07:00
8ed6985017 Windows: Use static pthreads library. 2019-02-21 14:19:15 -07:00
Mikhail Rachinskiy
4dd575e5ab UI: enum property menus now expand down, consistent with other menus.
Differential Revision: https://developer.blender.org/D4359
2019-02-21 18:20:05 +01:00
Harley Acheson
1de1cedf4c UI: better widget drawing with thick line width.
When the line width was larger than the UI scale, there was not enough
space for thicker widget outlines to draw properly. Now widgets are made
a little larger to accommodate the thicker outlines.

Differential Revision: https://developer.blender.org/D4368
2019-02-21 18:03:34 +01:00
Harley Acheson
86bbadaaee UI: improve corner splitting feedback by showing custom cursors.
* Two cursors for horizontal and vertical split.
* Four cursors for each join direction.
* One cursor to indicate when splitting is not possible.

Differential Revision: https://developer.blender.org/D4264
2019-02-21 18:03:34 +01:00
Harley Acheson
a1e531ebbd UI: increase corner splitting hit area to include screen edges.
Differential Revision: https://developer.blender.org/D4242
2019-02-21 18:03:34 +01:00
1999651da5 makesrna: Fix windows build.
makesrna requires the pthread dll to be available before it can run.
2019-02-21 10:02:54 -07:00
fc55861efa Fix T60646: From instancer texture coordinate doesn't work in viewport
Made it so that generated coordinate is always calculated.

Ideally, it will only be done depending on a current  shading,
but code is quite deep, and doing smarter thing here will end
up in way bigger refactor.

First, make things working, and then make them fast if they
pop up in a profiles.
2019-02-21 17:25:34 +01:00
9e1f3421bb Fix for Fix (c) T61787: Duplicating a collection instance does not duplicate the dupli_group.
Wrong logic in bitflags handling in own previous commit...
2019-02-21 16:14:34 +01:00
63fd2c99e8 Fix (unreported) Broken DataTransfer modifier when source object is in Edit mode.
Just use common API func to get evaluated mesh of other object in
modifiers, instead of doing our own cooking. ;)
2019-02-21 15:48:29 +01:00
0625a10efb Fix T61787: Duplicating a collection instance does not duplicate the dupli_group.
Transfomr init code called just after duplication (presumably before
regular depsgraph update is executed) would erase new objects'
transflags.

This is more like a hack than a real fix, but since that transform piece
of code is already a hack... Other solution would have been to force DEG
to run after object duplication, think it's better to go with that
solution for now.

Not to mention to fact that dupli flags are put into transflag... ;)
2019-02-21 15:40:17 +01:00
3b88e30181 Cleanup: typos in comments. 2019-02-21 15:40:17 +01:00
fab573bac0 Fix T59338: Blender crashes immediately after loading attached file in ~80% of my attempts.
Issue was a concurrent modification of an evaluated mesh by two
other meshes using it as source for custom normals data transfer.

Note that this fixes the crash (modifiers are strictly forbidden to modify
any data besides their own!), but now will have to add a new CD type to
be able to specifically request 'computed' clnors data layer, and not
only 'encoded' one, for source mesh...
2019-02-21 15:40:17 +01:00
8986c92b65 Merge branch 'blender2.7' 2019-02-21 15:33:07 +01:00
1d38a83139 Fix T61802: EXR preview JPEGs don't have the correct color
Missing color management, probably from the very beginnings of
the OCIO integration.
2019-02-21 15:29:02 +01:00
d518438479 Subdiv: Enable topology cache for animation
This commit makes it so both Subdivision Surface and Multiresolution
modifiers are caching OpenSubdiv topology. This cuts down evaluation
time quite a bit, especially for meshes which don't have many extra
ordinary verticies.

Only working for animation. Other modifications like edit mode needs
more work to make topology cache preserved by copy-on-write.
2019-02-21 15:25:02 +01:00
John Quillan
fdee84fd56 Fix T61733: wrong alpha for sequencer screen, multiply, .. blend modes.
It was copying the alpha from the foreground instead of background image,
which is not usually what is needed and inconsistent with the compositor.

Differential Revision: https://developer.blender.org/D4371
2019-02-21 13:29:13 +01:00
4f0b61f15b Fix T61791: Motion path step is not taken into account 2019-02-21 13:28:53 +01:00
d542c6a5f3 Fix T61786: local view not exiting correctly after recent changes. 2019-02-21 12:08:01 +01:00
1bfbfa2810 Transform: remove constraints from the redo panel
Constraint options had confusing behavior:

- When non were pressed, the orientation was ignored.
- When any were pressed, the orientation was used,
  but only unconstrained axed could be adjusted.

Now constraining is only used for modal execution
so there is no need to show these in the interface.

When an orientation is selected, the XYZ values always transform
using that space.

Note, transform system should be refactored to support different
orientations w/o having to use constraints.

Addresses T57204
2019-02-21 21:59:15 +11:00
510810c72d Cleanup: Line wrapping 2019-02-21 11:08:33 +01:00
7412f30930 Clip: Check memory allocation during prefetch
Aimed to make prefetching more stable for cases when
it causes Blender to run out of memory.
2019-02-21 10:52:03 +01:00
f4d9e49f28 Fix redo regression w/ transform constraints
Adjusting a constrained transform would always use global space.
2019-02-21 17:52:13 +11:00
941c03e2bf Fix transform reading all ob-data as a mesh 2019-02-21 17:27:57 +11:00
8b235dd2e3 makesrna: Fix build error on windows.
rB94f83a4ebd929e7c4f405b1c78d9db842dfe1689 introduced a dependency on pthreads
but did not add it to the linker inputs.
2019-02-20 21:56:11 -07:00
a0881a4e94 Fix assert w/ multi-dimensional array printing
Own oversight adding assert, result from MEM_allocN_len may be padded.
2019-02-21 14:49:27 +11:00
3d5585fac4 Fix T61563: Info space prints matrices as flat tuple
Add support for printing multi-dimensional arrays.
2019-02-21 12:42:29 +11:00
1303bd57f5 Units: Use units for smoke
-Use factor for flame_vorticity, slice_depth, density & volume_density
-Use distance for surface_distance
-Use factor for mix factor in Data Transfer modifier
-Use prop_translation for pivot constraint offset
2019-02-20 21:50:27 +01:00
1af810b4ff Units: Use correct units for transform operators
-Use distance for Shrink/Fatten Distance
-Use factor for Smooth Factor
-Use Factor for Randomize Uniform and Normal values
-Use Distance for Randomize distance amount
-Randomize Transform Scale was wrongly using distance
2019-02-20 21:10:32 +01:00
e2cefc7dad fix T61122 : Collada exporter exported alpha value (always 0) from deprecated material attribute 2019-02-20 20:47:08 +01:00
5df82b60d1 Local view: add operator property to disable framing selected objects.
Default behavior is unchanged still, but can be changed in the keymap.
From testing I think this needs better visual feedback to indicate that
you are in local view, if the view does not move it's not as clear.
2019-02-20 19:06:18 +01:00
c4f961a54c Local view: don't restore selection when exiting local view.
Losing the selection can be inconvenient, and it's easy to select all local
objects before exiting local view if needed.
2019-02-20 19:06:18 +01:00
Pablo Vazquez
12a6059f8a UI: Use checkbox for shape keys 'mute'.
Muting functions as enable/disable toggle, it's not viewport-only.
2019-02-20 18:56:26 +01:00
3f65cad5ae Units: Use pixels for denoising radius property, and set Cycles motion blur duration to factor.
Also fix own mistake of using of spaces instead of tabs in RNA.
2019-02-20 18:02:26 +01:00
27c72e22aa Cleanup: fix some versioning code running when not needed. 2019-02-20 16:22:23 +01:00
ee7c9790a2 Fix crash when rendering and drawing curves at the same time
Need to stop modifying original DNA data, this is not safe
for threading and easily avoidable.
2019-02-20 16:09:52 +01:00
7ed5e9f2f7 UI: Make Shutter Speed properties consistent in Eevee & Cycles.
-Use PROP_FACTOR for both (It is a factor of the total frame length)
-Set soft max to 1 and hard max to 2 for both.
2019-02-20 16:04:56 +01:00