blender.git
4 weeks agoFix T61499: Missing Camera settings in props except Depth of Field
Philipp Oeser [Wed, 13 Feb 2019 09:15:40 +0000 (10:15 +0100)]
Fix T61499: Missing Camera settings in props except Depth of Field

rB55c281415b67 removed 'BLENDER_RENDER' as a COMPAT_ENGINE but the
cycles addon checks for this in its get_panels() function.

Adding this back for now.

Reviewers: brecht, billreynish

Maniphest Tasks: T61499

Differential Revision: https://developer.blender.org/D4346

4 weeks agoFix T61487: quick favorites crash outside of open preferences window
Philipp Oeser [Wed, 13 Feb 2019 10:02:47 +0000 (11:02 +0100)]
Fix T61487: quick favorites crash outside of open preferences window

4 weeks agoFix crash removing drivers
Sergey Sharybin [Wed, 13 Feb 2019 09:41:36 +0000 (10:41 +0100)]
Fix crash removing drivers

Was a use-after-free during relations update.

Now we do similar dependency graph tags, but without any
extra animation update logic, which was accessing various
pointers.

Was found when looking into a file from T56635.

4 weeks agoGP: Remove debug print
Antonioya [Wed, 13 Feb 2019 09:00:02 +0000 (10:00 +0100)]
GP: Remove debug print

4 weeks agoCleanup: unused DNA struct members
Campbell Barton [Wed, 13 Feb 2019 08:12:43 +0000 (19:12 +1100)]
Cleanup: unused DNA struct members

- Timeline theme.
- 3D view runtime variables.
- Exclude EditLatt from SDNA.

4 weeks agoFix T61411: Camera clip overlay enabled by expanding UI
Philipp Oeser [Wed, 13 Feb 2019 05:39:03 +0000 (16:39 +1100)]
Fix T61411: Camera clip overlay enabled by expanding UI

5 weeks agoCleanup: rename variable name for DNA utils
Campbell Barton [Wed, 13 Feb 2019 00:09:07 +0000 (11:09 +1100)]
Cleanup: rename variable name for DNA utils

Rename 'elem_dna' to 'elem_full' to signify it has array/pointer chars.

5 weeks agoCleanup: unused variable
Campbell Barton [Wed, 13 Feb 2019 00:08:38 +0000 (11:08 +1100)]
Cleanup: unused variable

5 weeks agoCleanup: style, duplicate includes
Campbell Barton [Wed, 13 Feb 2019 00:00:07 +0000 (11:00 +1100)]
Cleanup: style, duplicate includes

5 weeks agoI18N Messages: fix confusion with Light meanings.
Bastien Montagne [Tue, 12 Feb 2019 21:13:42 +0000 (22:13 +0100)]
I18N Messages: fix confusion with Light meanings.

Using ID_LIGHT or ID_ID for "Lamp" meaning, "Light" without context
being for 'not heavy'.

That rename of data-block was not really nice on that side of things :/

Related to T43295.

5 weeks agoCleanup: rename `BLT_I18NCONTEXT_ID_LAMP` -> `BLT_I18NCONTEXT_ID_LIGHT`.
Bastien Montagne [Tue, 12 Feb 2019 20:51:51 +0000 (21:51 +0100)]
Cleanup: rename `BLT_I18NCONTEXT_ID_LAMP` -> `BLT_I18NCONTEXT_ID_LIGHT`.

5 weeks agoFix T51771: UI Messages: Reserve 'Normal' to its geometric meaning.
Bastien Montagne [Tue, 12 Feb 2019 20:28:04 +0000 (21:28 +0100)]
Fix T51771: UI Messages: Reserve 'Normal' to its geometric meaning.

Using 'Regular' instead for the common meaning, this avoids having to
add some i18n context disambiguation...

5 weeks agoFix T61469: wrong object statistics when using instances.
Brecht Van Lommel [Tue, 12 Feb 2019 18:17:14 +0000 (19:17 +0100)]
Fix T61469: wrong object statistics when using instances.

The new code already loops over all instances, don't need to be counted again.

5 weeks agoFix T61453: crash rendering after selecting particle settings datablock.
Brecht Van Lommel [Tue, 12 Feb 2019 17:59:45 +0000 (18:59 +0100)]
Fix T61453: crash rendering after selecting particle settings datablock.

5 weeks agoGP: Move to new layer did not work with autolock
Antonioya [Tue, 12 Feb 2019 17:14:36 +0000 (18:14 +0100)]
GP: Move to new layer did not work with autolock

When the autolock layer option was enabled, the move to new layer operator was not working as expected.

5 weeks agoEdit Mode: Fix element selection on some old AMD GPUs
mano-wii [Tue, 12 Feb 2019 16:12:31 +0000 (14:12 -0200)]
Edit Mode: Fix element selection on some old AMD GPUs

Tested on an `AMD Radeon HD 7570M`.
It seems that a VBO containing only `unsigned bytes` or `unsigned shorts` can't be read correctly in a shader.
Strange that if the index buffer repeats the drawing of the vertices (as was done before rBa04dd15193e6) the problem disappears.
The disadvantage of this solution is that the memory size for a selection VBO increases by about 4 times.
But the loss in optimization is negligible.

Thanks to @fclem for pointing out the possible source of the problem and reviewing the fix.

5 weeks agoFix "typo" in show_object_viewport* RNA_def_property_update
Dalai Felinto [Tue, 12 Feb 2019 16:27:30 +0000 (14:27 -0200)]
Fix "typo" in show_object_viewport* RNA_def_property_update

5 weeks agoFix T60999: Duplifaced objects are not drawn in edit mode
Sergey Sharybin [Tue, 12 Feb 2019 16:04:59 +0000 (17:04 +0100)]
Fix T60999: Duplifaced objects are not drawn in edit mode

Seems to be rather trivial change to use proper cage mesh nowadays.

5 weeks agoFix T61462: Missing update when toggling GP layer visibility in the Outliner
Antonioya [Tue, 12 Feb 2019 16:01:09 +0000 (17:01 +0100)]
Fix T61462: Missing update when toggling GP layer visibility in the Outliner

5 weeks agoUse direct access to evaluated mesh from instancing
Sergey Sharybin [Tue, 12 Feb 2019 15:00:46 +0000 (16:00 +0100)]
Use direct access to evaluated mesh from instancing

It is supposed to be already evaluated. If for some reason it's not
doing such direct evaluation will not be reliable anyway (indirect
dependencies for example).

This fixes an assert part of T61431.

5 weeks agoDepsgraph: Special relation for instances and metaballs
Sergey Sharybin [Tue, 12 Feb 2019 14:58:45 +0000 (15:58 +0100)]
Depsgraph: Special relation for instances and metaballs

Ensures that object which is set for instance-vert or instance-face
is evaluated prior to metaball. This is because metaball will request
list of instances during evaluation.

This should fix issue reported T61431 in release build. The assert is
still there and is to be addressed separately.

5 weeks agoCleanup: Make parent relations a bit cleaner
Sergey Sharybin [Tue, 12 Feb 2019 14:37:57 +0000 (15:37 +0100)]
Cleanup: Make parent relations a bit cleaner

Mainly getting rid of old and somewhat misleading and unclear
comments.

5 weeks agoFix T61458: GP Ctrl + F doesn't do anything
Antonioya [Tue, 12 Feb 2019 15:38:02 +0000 (16:38 +0100)]
Fix T61458: GP Ctrl + F doesn't do anything

This keymap was used in the old grease pencil and now must be removed.

The keymaps for brush are:

F: Change Radius
Shift + F: Change strength

Ctrl+F -> Removed.

5 weeks agoFix T61428: Node editor's 'Interface' panel shows in all tabs
Philipp Oeser [Tue, 12 Feb 2019 14:35:13 +0000 (15:35 +0100)]
Fix T61428: Node editor's 'Interface' panel shows in all tabs

Reviewers: brecht

Maniphest Tasks: T61428

Differential Revision: https://developer.blender.org/D4343

5 weeks agoModifiers: Make Difference default operation for boolean modifier.
Bastien Montagne [Tue, 12 Feb 2019 12:51:33 +0000 (13:51 +0100)]
Modifiers: Make Difference default operation for boolean modifier.

Make Difference a default value for boolean modifier operation property.

Currently operation property of the boolean modifier is set to Intersect, which is the least frequently used boolean operation of the three available. It is also goes out of sync with Intersect (Boolean) tool, where Difference is a default operation.

Reviewers: mont29, brecht, sergey

Reviewed By: mont29, brecht, sergey

Subscribers: mont29, brecht, campbellbarton, sergey, billreynish

Tags: #modifiers

Differential Revision: https://developer.blender.org/D4340

5 weeks agoFix T61455: Import any add-on broken
Philipp Oeser [Tue, 12 Feb 2019 12:32:39 +0000 (13:32 +0100)]
Fix T61455: Import any add-on broken

recent split userpref.py out of wm.py (rB9ec944bbab7a) forgot to move
'module_filesystem_remove' there as well...

5 weeks agoFix T61430: invoke_popup() does not respect ui scale
Jacques Lucke [Tue, 12 Feb 2019 12:30:24 +0000 (13:30 +0100)]
Fix T61430: invoke_popup() does not respect ui scale

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4341

5 weeks agoDepsgraph: Run rigid body after modifiers are ready
Sergey Sharybin [Tue, 12 Feb 2019 11:32:03 +0000 (12:32 +0100)]
Depsgraph: Run rigid body after modifiers are ready

This makes it so modifiers are using object transform prior
to the rigid body simulation, and then result of modifier
stack is fed to the solver.

Solves dependency cycle which was happening when object's
modifier was dependent on the modifier transform.

While now it is not possible to change simulation, things
are somewhat more clear and reliable in other ways.
For example previously, solver was using derives mesh from
a previous step in time, which causes unfixable simulation
issues (with intersections and such)

Fixex T57589: 2.79 Rigid Body Sim. Does Not Behave The Same In 2.8
Fixex T61256: Compositing scenes causes crash, but rendering separately does not
Fixes T61262: Armature and rigid body crash
Fixes T61346: Rigid body with modifiers incorrect work

5 weeks agoWeight modifiers: Remove weird looking dependency
Sergey Sharybin [Tue, 12 Feb 2019 11:04:48 +0000 (12:04 +0100)]
Weight modifiers: Remove weird looking dependency

Modifiers are part of geometry component, no way they can
be dependent on the geometry component of the same object.

5 weeks agoDepsgraph: Add utility function for transform dependency
Sergey Sharybin [Tue, 12 Feb 2019 11:01:17 +0000 (12:01 +0100)]
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.

5 weeks agoFix fur on Spring characters
Sergey Sharybin [Tue, 12 Feb 2019 09:55:15 +0000 (10:55 +0100)]
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!).

5 weeks agoCleanup: move utility functions into dna_utils
Campbell Barton [Tue, 12 Feb 2019 06:56:35 +0000 (17:56 +1100)]
Cleanup: move utility functions into dna_utils

Rename old/new to src/dst since renaming happens in both directions
when versioning.

5 weeks agomakesdna: add shared utility module
Campbell Barton [Tue, 12 Feb 2019 06:03:16 +0000 (17:03 +1100)]
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.

5 weeks agomakesdna: use memarena for string allocations
Campbell Barton [Tue, 12 Feb 2019 05:47:39 +0000 (16:47 +1100)]
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.

5 weeks agoBLI_memarena: remove use of BLI_linklist
Campbell Barton [Tue, 12 Feb 2019 05:21:27 +0000 (16:21 +1100)]
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.

5 weeks agoCleanup: use printf define in makesdna
Campbell Barton [Mon, 11 Feb 2019 23:10:04 +0000 (10:10 +1100)]
Cleanup: use printf define in makesdna

5 weeks agoDNA: support versioning structs & struct members
Campbell Barton [Mon, 11 Feb 2019 22:29:18 +0000 (09:29 +1100)]
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.

5 weeks agoWM: default to opening maximized
Campbell Barton [Mon, 11 Feb 2019 22:08:09 +0000 (09:08 +1100)]
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

5 weeks agoFix T61391: MeshDeform Modifier does not work on a solidified planar mesh.
Bastien Montagne [Mon, 11 Feb 2019 19:20:12 +0000 (20:20 +0100)]
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.

5 weeks agoMerge branch 'blender2.7'
Brecht Van Lommel [Mon, 11 Feb 2019 17:39:31 +0000 (18:39 +0100)]
Merge branch 'blender2.7'

5 weeks agoCycles: add animation denoising test, fix operator to work with single frames.
Brecht Van Lommel [Mon, 11 Feb 2019 17:26:47 +0000 (18:26 +0100)]
Cycles: add animation denoising test, fix operator to work with single frames.

5 weeks agoCycles: backport samples metadata format changes to 2.7.
Sergey Sharybin [Wed, 6 Feb 2019 10:49:41 +0000 (11:49 +0100)]
Cycles: backport samples metadata format changes to 2.7.

The render layer name is now always included. Best to keep these consistent,
so that animation denoising and sample merging works the same for both and
tests can be the same. Ref D4311.

5 weeks agoFix T61376 Group Node Node Editor theme property is missing alpha channel
Sebastian Parborg [Mon, 11 Feb 2019 15:56:20 +0000 (16:56 +0100)]
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).

5 weeks agoGP: Avoid crash when bruhs setting are invalid
Antonioya [Mon, 11 Feb 2019 14:57:45 +0000 (15:57 +0100)]
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

5 weeks agoCleanup: comments
Campbell Barton [Mon, 11 Feb 2019 14:21:09 +0000 (01:21 +1100)]
Cleanup: comments

5 weeks agoUI: Use icon in Dopesheet 'Toggle Graph Editor' menu item.
Pablo Vazquez [Mon, 11 Feb 2019 14:46:00 +0000 (15:46 +0100)]
UI: Use icon in Dopesheet 'Toggle Graph Editor' menu item.

5 weeks agoUI: More descriptive labels for Metaball panel.
Pablo Vazquez [Mon, 11 Feb 2019 14:45:18 +0000 (15:45 +0100)]
UI: More descriptive labels for Metaball panel.

Also remove redundant "Resolution" label.

5 weeks agoMerge branch 'blender2.7'
Brecht Van Lommel [Mon, 11 Feb 2019 14:25:46 +0000 (15:25 +0100)]
Merge branch 'blender2.7'

5 weeks agoFix T61362: Hair particles does not appear when rendering
Sergey Sharybin [Mon, 11 Feb 2019 14:18:12 +0000 (15:18 +0100)]
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.

5 weeks agoDepsgraph: Use proper tag source for special case
Sergey Sharybin [Mon, 11 Feb 2019 14:16:38 +0000 (15:16 +0100)]
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.

5 weeks agoFix build error on macOS after recent changes.
Brecht Van Lommel [Mon, 11 Feb 2019 14:03:28 +0000 (15:03 +0100)]
Fix build error on macOS after recent changes.

5 weeks agoFix: Eevee SSS not rendering as expected
Clément Foucault [Mon, 11 Feb 2019 13:50:25 +0000 (14:50 +0100)]
Fix: Eevee SSS not rendering as expected

Remove forcing separate albedo when rendering. It was creating confusion.

5 weeks agoFix T61374 : vertex not visible/selectable if it is at objects origin
Clément Foucault [Mon, 11 Feb 2019 13:37:19 +0000 (14:37 +0100)]
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.

5 weeks agoCleanup: avoid string copy for comparing int id's
Campbell Barton [Mon, 11 Feb 2019 12:48:40 +0000 (23:48 +1100)]
Cleanup: avoid string copy for comparing int id's

More direct and readable.

5 weeks agoCycles: add animation denoising Python operator.
Lukas Stockner [Wed, 6 Feb 2019 11:57:10 +0000 (12:57 +0100)]
Cycles: add animation denoising Python operator.

This adds a cycles.denoise_animation operator, which denoises an animation
sequence or individual file. Renders must be saved as multilayer EXR files
with denoising data passes.

By default file path and frame range come from the current scene, and EXR
files are denoised in-place. Alternatively, a different input and/or output
file path can be provided.

Denoising settings come from the current view layer. Renders can be denoised
again with different settings, as the original noisy image is preserved along
with other passes and metadata.

There is no user interface yet for this feature, that comes later.

Code by Lukas with modifications by Brecht. This feature was originally
developed for Tangent Animation, thanks for the support!

Differential Revision: https://developer.blender.org/D3889

5 weeks agoMerge branch 'blender2.7'
Brecht Van Lommel [Mon, 11 Feb 2019 12:37:45 +0000 (13:37 +0100)]
Merge branch 'blender2.7'

5 weeks agoCycles: add animation denoising Python operator.
Lukas Stockner [Wed, 6 Feb 2019 11:57:10 +0000 (12:57 +0100)]
Cycles: add animation denoising Python operator.

This adds a cycles.denoise_animation operator, which denoises an animation
sequence or individual file. Renders must be saved as multilayer EXR files
with denoising data passes.

By default file path and frame range come from the current scene, and EXR
files are denoised in-place. Alternatively, a different input and/or output
file path can be provided.

Denoising settings come from the current view layer. Renders can be denoised
again with different settings, as the original noisy image is preserved along
with other passes and metadata.

There is no user interface yet for this feature, that comes later.

Code by Lukas with modifications by Brecht. This feature was originally
developed for Tangent Animation, thanks for the support!

5 weeks agoCleanup: split user preferences out of wm.py
Campbell Barton [Mon, 11 Feb 2019 12:17:05 +0000 (23:17 +1100)]
Cleanup: split user preferences out of wm.py

These operations are for handling preference related tasks so move into
into a preferences file.

Operators still need to be renamed.

5 weeks agoCycles: refactor Blender device settings handling into own file.
Brecht Van Lommel [Wed, 6 Feb 2019 15:15:45 +0000 (16:15 +0100)]
Cycles: refactor Blender device settings handling into own file.

5 weeks agoUI: show camera DOF UI for workbench engine
William Reynish [Mon, 11 Feb 2019 11:45:36 +0000 (22:45 +1100)]
UI: show camera DOF UI for workbench engine

5 weeks agoFix T61185: Missing modifiers update on changes to texture
Philipp Oeser [Tue, 5 Feb 2019 09:04:09 +0000 (10:04 +0100)]
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

5 weeks agoreadfile: skip negative sized thumbnails
Campbell Barton [Mon, 11 Feb 2019 08:09:27 +0000 (19:09 +1100)]
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.

5 weeks agoCleanup: unused speaker flag
Campbell Barton [Mon, 11 Feb 2019 06:55:15 +0000 (17:55 +1100)]
Cleanup: unused speaker flag

5 weeks agoCleanup: RNA boolean names (use prefix conventions)
Campbell Barton [Mon, 11 Feb 2019 06:49:35 +0000 (17:49 +1100)]
Cleanup: RNA boolean names (use prefix conventions)

5 weeks agoCleanup: move runtime vars into Camera_Runtime
Campbell Barton [Mon, 11 Feb 2019 05:54:23 +0000 (16:54 +1100)]
Cleanup: move runtime vars into Camera_Runtime

5 weeks agoCleanup: use "_Runtime" suffix for DNA
Campbell Barton [Mon, 11 Feb 2019 05:48:42 +0000 (16:48 +1100)]
Cleanup: use "_Runtime" suffix for DNA

Was done everywhere except bPoseChannel.

5 weeks agoPreferences: remove tweak/drag threshold distinction
Campbell Barton [Mon, 11 Feb 2019 04:34:19 +0000 (15:34 +1100)]
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.

5 weeks agoWM: command line args to start blender maximized
Campbell Barton [Mon, 11 Feb 2019 03:46:25 +0000 (14:46 +1100)]
WM: command line args to start blender maximized

Part of D4323 by @DragMZ

5 weeks agoCleanup: use 'struct Main' in header
Campbell Barton [Mon, 11 Feb 2019 03:09:32 +0000 (14:09 +1100)]
Cleanup: use 'struct Main' in header

Causes errors including in some cases.

5 weeks agoDNA: remove Object.display struct
Campbell Barton [Sun, 10 Feb 2019 23:32:11 +0000 (10:32 +1100)]
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.

5 weeks agoCleanup: comment indentation & spelling
Campbell Barton [Sun, 10 Feb 2019 23:51:25 +0000 (10:51 +1100)]
Cleanup: comment indentation & spelling

5 weeks agoBevel: Make modal keymap instead of hardcoded.
Howard Trickey [Sun, 10 Feb 2019 21:08:25 +0000 (16:08 -0500)]
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.

5 weeks agoUI: Color Picker, make HSV default.
Pablo Vazquez [Sun, 10 Feb 2019 20:29:45 +0000 (21:29 +0100)]
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.

5 weeks agoLink/Append: Instantiate collection rather than objects.
Bastien Montagne [Sun, 10 Feb 2019 16:13:37 +0000 (17:13 +0100)]
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.

5 weeks agoFix T61141: Append Particle Settings doesn't append the collection properly.
Bastien Montagne [Sun, 10 Feb 2019 13:36:19 +0000 (14:36 +0100)]
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.

5 weeks agoCleanup: unused struct member
Campbell Barton [Sun, 10 Feb 2019 11:48:22 +0000 (22:48 +1100)]
Cleanup: unused struct member

Also replace intptr_t -> int (no good reason to cast to intptr here).

5 weeks agoI18N: Add Kazakh language.
Bastien Montagne [Sun, 10 Feb 2019 10:04:53 +0000 (11:04 +0100)]
I18N: Add Kazakh language.

Disabled for until we get actual first tranlation in SVN repo. ;)

Related to T61102.

5 weeks agoCleanup: move clipping shader lib & define into struct
Campbell Barton [Sun, 10 Feb 2019 00:06:22 +0000 (11:06 +1100)]
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.

5 weeks agoCleanup: use shorter name for shader config
Campbell Barton [Sun, 10 Feb 2019 00:02:06 +0000 (11:02 +1100)]
Cleanup: use shorter name for shader config

The struct name is descriptive,
this isn't going to be confused with other variables.

5 weeks agoCleanup: Use ID_IS_LINKED instead of id.lib
Dalai Felinto [Sat, 9 Feb 2019 20:41:52 +0000 (18:41 -0200)]
Cleanup: Use ID_IS_LINKED instead of id.lib

5 weeks agoFix: objects in outliner cannot be disabled
Dalai Felinto [Sat, 9 Feb 2019 16:26:27 +0000 (14:26 -0200)]
Fix: objects in outliner cannot be disabled

But introduced on 191b8951f7a.
Reported on tracker as a comment on 3f537f30e6b0.

5 weeks agoFix T61276: Make Single User unlinks original object.
Bastien Montagne [Sat, 9 Feb 2019 12:20:59 +0000 (13:20 +0100)]
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.

5 weeks agoBKE_object: add util to count number of scenes using an object.
Bastien Montagne [Sat, 9 Feb 2019 12:18:22 +0000 (13:18 +0100)]
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).

5 weeks agoGP: Missing in previous commit
Antonioya [Sat, 9 Feb 2019 10:08:17 +0000 (11:08 +0100)]
GP: Missing in previous commit

5 weeks agoGP: Init stroke buffer always
Antonioya [Sat, 9 Feb 2019 09:59:25 +0000 (10:59 +0100)]
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.

5 weeks agoGNUmakefile: fix deps directory
Luca Rood [Sat, 9 Feb 2019 05:58:52 +0000 (16:58 +1100)]
GNUmakefile: fix deps directory

`uname -p` is unknown on some distros, use posix standard `uname -m`.

5 weeks agoFix T61332: Python3 syntax errors
Jacques Lucke [Sat, 9 Feb 2019 02:07:34 +0000 (13:07 +1100)]
Fix T61332: Python3 syntax errors

5 weeks agoOutliner visibility: Prevent changing linked objects and collections
Dalai Felinto [Fri, 8 Feb 2019 22:09:37 +0000 (20:09 -0200)]
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.

5 weeks agoOutliner Visibility: Alt+H operator to unhide all objects and collections
Dalai Felinto [Fri, 8 Feb 2019 21:52:28 +0000 (19:52 -0200)]
Outliner Visibility: Alt+H operator to unhide all objects and collections

5 weeks agoOutliner Visibility: H operator to hide collection or objects
Dalai Felinto [Fri, 8 Feb 2019 21:38:45 +0000 (19:38 -0200)]
Outliner Visibility: H operator to hide collection or objects

5 weeks agoOutliner visibility: Ctrl to isolate object
Dalai Felinto [Fri, 8 Feb 2019 21:14:07 +0000 (19:14 -0200)]
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.

5 weeks agoFix (unreported) crash when undoing after ID deletion.
Bastien Montagne [Fri, 8 Feb 2019 17:45:57 +0000 (18:45 +0100)]
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.

5 weeks agoBKE_main: add a util to generate/extend a GSet with all ID pointers of a Main database.
Bastien Montagne [Fri, 8 Feb 2019 17:44:37 +0000 (18:44 +0100)]
BKE_main: add a util to generate/extend a GSet with all ID pointers of a Main database.

5 weeks agoCleanup: API doc is to be in implementation, not header file.
Bastien Montagne [Fri, 8 Feb 2019 16:40:45 +0000 (17:40 +0100)]
Cleanup: API doc is to be in implementation, not header file.

5 weeks agoOutliner: Purge: correct tooltip, add more info for user.
Bastien Montagne [Fri, 8 Feb 2019 13:36:29 +0000 (14:36 +0100)]
Outliner: Purge: correct tooltip, add more info for user.

While ideally we could have a complete detailed list of deleted IDs,
that would require more work UI wise, think for now we can live with
just a rough summary.

Related to T61209.

5 weeks agoBKE_idcode: Add utils to convert from 'lbarray' index to ID type.
Bastien Montagne [Fri, 8 Feb 2019 13:34:13 +0000 (14:34 +0100)]
BKE_idcode: Add utils to convert from 'lbarray' index to ID type.

This can be useful to be able to match some random array data with
ListBase array of IDs generated by `set_listbasepointers()`.

5 weeks agoFix T61287: Object restrict viewport ignored in instanced collection
Dalai Felinto [Fri, 8 Feb 2019 15:51:13 +0000 (13:51 -0200)]
Fix T61287: Object restrict viewport ignored in instanced collection

make_duplis_collection() depends on the collection object cache,
which was not freed upon object viewport disable change.

The best way to reproduce the bug was to instance the default
collection, disable the cube, save and re-open the file.
Now even if you set the original cube to be enabled, you wouldn't see
the instanced one until you forced collection cache to be freed (e.g.,
changing a collection disable state.

5 weeks agoUI: Marker position slightly offset.
Pablo Vazquez [Fri, 8 Feb 2019 15:18:46 +0000 (16:18 +0100)]
UI: Marker position slightly offset.

Tested on various interface sizes and thick lines.

Reported by Blender Studio animators.

5 weeks agoFix T59339: Particle render without baking issues
Sergey Sharybin [Fri, 8 Feb 2019 14:05:29 +0000 (15:05 +0100)]
Fix T59339: Particle render without baking issues
Fix T61289: Emitting particles from instances not working properly

The first issue has been re-introduced by a code which was dealing
with missing hair after opening the file. That was re-setting all
particle systems all the time because modifier flags were not copied
back to original. This made every modifier run to be seem as an
initial file open.

Now we copy flags back to an original modifier. But also we are
trying to not do any resets unless needed in that case. This way
we can preserve in-memory caches.

Other part of the change is related on re-setting particle system
if number of mesh elements changed. But we only do it if the
modifier has been already evaluated once.

5 weeks agoBevel, fix crash when adjust offsets with inner arc miter.
Howard Trickey [Fri, 8 Feb 2019 14:24:43 +0000 (09:24 -0500)]
Bevel, fix crash when adjust offsets with inner arc miter.

Previous assumptions about boundary verts always being attached
to edges are now false.