Commit Graph

68027 Commits

Author SHA1 Message Date
07ff9e92bb Depsgraph: Add utility function for transform dependency
This is what modifiers are to use to indicate that they depend
on a transformation of the object itself.

Currently should be no functional changes, but in the future
this will allow to easily change transform operation depending
on whether there is a simulation associated with the object.
2019-02-12 12:07:59 +01:00
d3870471ed Fix fur on Spring characters
There is an issue of hair being completely messed up when
switching to a simulation view layer for Autumn.

Restoring back the code which was re-setting particles on
file load. This will re-set unbacked particles on file load
but this appears to be happening in 2.7 as well.

Can not reproduce bugs which were fixed in this area recently,
so maybe it's finally tackled (fingers crossed!).
2019-02-12 10:57:32 +01:00
65ffc414fe Cleanup: move utility functions into dna_utils
Rename old/new to src/dst since renaming happens in both directions
when versioning.
2019-02-12 17:56:35 +11:00
d968db82b7 makesdna: add shared utility module
Currently only a single function was duplicated which isn't so bad,
this change is to allow DNA versioning code to be shared between
dna_genfile.c and makesdna.c.
2019-02-12 17:09:57 +11:00
f96bfde4a5 makesdna: use memarena for string allocations
Include it since versioning code will need to perform
small string allocations too, which doesn't fit will into
the currently used fixed size buffers.
2019-02-12 16:52:54 +11:00
b539aee0c9 BLI_memarena: remove use of BLI_linklist
Preprare for using memarena w/ makesdna, BLI_linklist depends on
BLI_mempool. Since linked list use in here is simple, do it inline.
2019-02-12 16:28:10 +11:00
036ec5cae4 Cleanup: use printf define in makesdna 2019-02-12 10:10:04 +11:00
3ec4c2f842 DNA: support versioning structs & struct members
This is only to be used rarely because it's not forwards compatible.

Replace version patching of old 2.80 DNA with a more generic API.
2019-02-12 09:38:46 +11:00
2a6d03493c WM: default to opening maximized
Blender is typically used maximized or fullscreen,
load maximized instead of attempting to fill the screen bounds.

To load un-maximized use '--window-border' argument.

See D4332
2019-02-12 09:14:10 +11:00
7cca0f9998 Fix T61391: MeshDeform Modifier does not work on a solidified planar mesh.
`BKE_modifier_get_evaluated_mesh_from_evaluated_object()` used by
modifiers needing access to other objects' geometry probably skipped out
of the radar when cage and final evaluated meshes were added to
BMEditMesh? In any case, we do not need to duplicate (and then free!) a
temp mesh from editdata anymore, and we can even add instead a parameter
to get cage instead of final. Also makes modifiers code a bit simpler.
2019-02-11 20:24:07 +01:00
558d7dd90e Fix T61376 Group Node Node Editor theme property is missing alpha channel
It is now possible to adjust the group node background alpha.
The defaults are the same as before, but you can now adjust the alpha
level via the theme preferences (and the alpha value is no longer hard
coded).
2019-02-11 16:56:20 +01:00
b8dc7e9cb8 GP: Avoid crash when bruhs setting are invalid
This change avoids crashes for wrong settings, but we need find why the settings were wrong.

Related to T61413
2019-02-11 15:58:04 +01:00
452df3f392 Cleanup: comments 2019-02-12 01:51:03 +11:00
3117446967 Fix T61362: Hair particles does not appear when rendering
Fix T61406: Particles don't render

Consider initial dependency graph evaluation as a file load.

Is still resetting too much, but that we can solve later.
2019-02-11 15:24:11 +01:00
51d161a89e Depsgraph: Use proper tag source for special case
Special case of handling update tag of 0 was using wrong update
source, causing unwanted point cache resets on file load.
2019-02-11 15:24:11 +01:00
23c14a0bba Fix: Eevee SSS not rendering as expected
Remove forcing separate albedo when rendering. It was creating confusion.
2019-02-11 14:50:25 +01:00
d07cde8de8 Fix T61374 : vertex not visible/selectable if it is at objects origin
It was caused by Null normal if the vertex is at origin. Just add a small
bias to avoid this case.
2019-02-11 14:38:14 +01:00
1a8cd3a8a7 Cleanup: avoid string copy for comparing int id's
More direct and readable.
2019-02-11 23:53:33 +11:00
b10b77d4f0 Fix T61185: Missing modifiers update on changes to texture
Also update relations when modifier texture changes.

Basically same as rB6e00415a85a9, rBca2680aaeb1 but this time for
VertexWeight modifiers

Reviewers: sergey

Maniphest Tasks: T61185

Differential Revision: https://developer.blender.org/D4305
2019-02-11 10:38:30 +01:00
1724ff29e0 readfile: skip negative sized thumbnails
We may want to use 'TEST' BCode in the future for including data
besides thumbnails. This allows negative values to be used w/o
attempting to load a thumbnail.
2019-02-11 19:09:27 +11:00
3ce5e5a857 Cleanup: unused speaker flag 2019-02-11 17:55:52 +11:00
42368a2321 Cleanup: RNA boolean names (use prefix conventions) 2019-02-11 17:49:35 +11:00
826d9ac827 Cleanup: move runtime vars into Camera_Runtime 2019-02-11 16:58:52 +11:00
e215216958 Cleanup: use "_Runtime" suffix for DNA
Was done everywhere except bPoseChannel.
2019-02-11 16:50:23 +11:00
43156d8304 Preferences: remove tweak/drag threshold distinction
Currently the preferences have both tweak and drag threshold,
this is confusing because most actions users would consider
dragging use the 'tweak' setting.

Now one drag threshold is used for both, with a maximum limit of half
the button unit-size in case of dragging UI elements.
2019-02-11 15:48:46 +11:00
1daaa74b08 WM: command line args to start blender maximized
Part of D4323 by @DragMZ
2019-02-11 14:46:25 +11:00
f5249b4e30 Cleanup: use 'struct Main' in header
Causes errors including in some cases.
2019-02-11 14:10:13 +11:00
69b2f52681 DNA: remove Object.display struct
We have a display flag already, use it instead.

Object.display is kept in RNA, exposed via a nested struct,
we can move other display options there.
2019-02-11 10:55:22 +11:00
ffd0fee97c Cleanup: comment indentation & spelling 2019-02-11 10:51:25 +11:00
9ca6fc41ae Bevel: Make modal keymap instead of hardcoded.
Also added keys for toggling harden normals,
and cycling through miter types.
Still to do: add some shortcuts for affecting the
spread value for arc miters.
2019-02-10 16:08:25 -05:00
09f4505712 UI: Color Picker, make HSV default.
Most artists agree that RGB by default is not as flexible as HSV.
It's just the first time it opens anyway, since it will remember whatever
was set last like it always does.
2019-02-10 21:30:08 +01:00
5d2b23766b Link/Append: Instantiate collection rather than objects.
When one is indirectly linking collections, better add collection to the
scene, than instantiating its objects into master collection of the
scene. That is much cleaner.

Noted/related to T61141.
2019-02-10 17:15:15 +01:00
439437fa3a Fix T61141: Append Particle Settings doesn't append the collection properly.
ParticleSettings' duplicollection is now a proper refcounting user of
its collection, which will avoid losing it on save/reload.
2019-02-10 17:15:15 +01:00
96a7e06792 Cleanup: unused struct member
Also replace intptr_t -> int (no good reason to cast to intptr here).
2019-02-10 22:50:04 +11:00
0b6dbbc306 Cleanup: move clipping shader lib & define into struct
Also compare clipping with the draw context instead of
accessing the RegionView3D, currently they're matching
but this might not always be the case.
2019-02-10 11:16:31 +11:00
16d7967c2b Cleanup: use shorter name for shader config
The struct name is descriptive,
this isn't going to be confused with other variables.
2019-02-10 11:02:06 +11:00
Dalai Felinto
66c23ea2b4 Cleanup: Use ID_IS_LINKED instead of id.lib 2019-02-09 18:41:52 -02:00
Dalai Felinto
69f50e6ea9 Fix: objects in outliner cannot be disabled
But introduced on 191b8951f7.
Reported on tracker as a comment on 3f537f30e6.
2019-02-09 14:26:27 -02:00
af0eb938b8 Fix T61276: Make Single User unlinks original object.
In that case, we have to consider number of scenes using an object, not
number of collections.
2019-02-09 13:24:31 +01:00
bf4f01779d BKE_object: add util to count number of scenes using an object.
Issue is, ob->id.us is not relevant anymore here, since several
collection might be referencing it inside of a same scene, that is still
only one usage from user perspective...

Note that for now we are just counting scenes instantiating an object,
time will say wether we need more refined/complete check (as a reminder,
most [all?] other Object usages are *not* refcounting ones).
2019-02-09 13:24:31 +01:00
1bf8551f00 GP: Missing in previous commit 2019-02-09 11:08:17 +01:00
b85d5dd9b1 GP: Init stroke buffer always
Related to T61334

This initialization avoid any crash when user saves the file while he is drawing a stroke session.
2019-02-09 10:59:25 +01:00
7262ac6202 Fix T61332: Python3 syntax errors 2019-02-09 13:10:34 +11:00
Dalai Felinto
191b8951f7 Outliner visibility: Prevent changing linked objects and collections
We still change their base/layer collection visibility, just not what would change the
original ID datablock.
2019-02-08 20:09:37 -02:00
Dalai Felinto
e04d6794d0 Outliner Visibility: Alt+H operator to unhide all objects and collections 2019-02-08 19:59:02 -02:00
Dalai Felinto
744223afbf Outliner Visibility: H operator to hide collection or objects 2019-02-08 19:44:37 -02:00
Dalai Felinto
3f537f30e6 Outliner visibility: Ctrl to isolate object
Ideally it would be nice to make all the base parent collections visible as well.
However we do not know this from the outliner.
2019-02-08 19:15:41 -02:00
0e3d1eee15 Fix (unreported) crash when undoing after ID deletion.
Yes, we do can undo an ID deletion now.

However, this requires extra care in UI 'remapping' to new IDs step
(when undoing, we do not fully reload the UI from saved .blend).
Otherwise, new UI (i.e. one from saved .blend file) might reference
IDs that where freed in old bmain (the one before the undo), we cannot
use those to get ID name then, that would be a nasty use-after-free!

To prevent this, we generate a GSet of all valid ID pointers at that
time (i.e. those found in both old and new Main's), and ensure any ID
we try to remap by its name is in that GSet. Otherwise, there is no
possible remapping, just return NULL.
2019-02-08 18:54:52 +01:00
6ba8e71fa2 BKE_main: add a util to generate/extend a GSet with all ID pointers of a Main database. 2019-02-08 18:53:09 +01:00
4b4a231250 Cleanup: API doc is to be in implementation, not header file. 2019-02-08 18:53:09 +01:00