blender.git
4 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Sun, 17 Feb 2019 14:57:34 +0000 (15:57 +0100)]
Merge branch 'blender2.7'

4 months agoFix T54504: Cycles wrong backwards compatibility with linked libraries.
Brecht Van Lommel [Sun, 17 Feb 2019 11:27:07 +0000 (12:27 +0100)]
Fix T54504: Cycles wrong backwards compatibility with linked libraries.

The code assumed all datablocks were read from .blend files saved with the
same version. This restructures the Cycles versioning code to take into
account libraries.

4 months agoDNA: rename dup_* struct members to instance_*
Campbell Barton [Sun, 17 Feb 2019 08:00:54 +0000 (19:00 +1100)]
DNA: rename dup_* struct members to instance_*

4 months agoCleanup: remove unused bStats struct
Campbell Barton [Sun, 17 Feb 2019 07:09:38 +0000 (18:09 +1100)]
Cleanup: remove unused bStats struct

4 months agoCleanup: rename Mesh.edit_btmesh -> edit_mesh
Campbell Barton [Sun, 17 Feb 2019 07:05:18 +0000 (18:05 +1100)]
Cleanup: rename Mesh.edit_btmesh -> edit_mesh

When bmesh was in a branch we had both edit_mesh and edit_btmesh,
now there is no reason to use this odd name.

4 months agoCleanup: move flag definition into screen header
Campbell Barton [Sun, 17 Feb 2019 01:44:03 +0000 (12:44 +1100)]
Cleanup: move flag definition into screen header

This has been moved to screen, move declaration as well.

4 months agoCleanup: move object bounding-box into runtime struct
Campbell Barton [Sun, 17 Feb 2019 01:24:08 +0000 (12:24 +1100)]
Cleanup: move object bounding-box into runtime struct

4 months agoBlenlib/Windows: Fix Build error with clang.
Ray Molenkamp [Sat, 16 Feb 2019 18:42:55 +0000 (11:42 -0700)]
Blenlib/Windows: Fix Build error with clang.

__cpuid comes from intrin.h which was implicitly included somewhere
for msvc builds, but not for clang.

4 months agoWindows: Fix building with llvm/clang 7.0.1
Ray Molenkamp [Sat, 16 Feb 2019 18:36:19 +0000 (11:36 -0700)]
Windows: Fix building with llvm/clang 7.0.1

For llvm 6 the visual studio integration was 'not great' and we had
our own, which broke when llvm 7.0.1 came out. llvm now has properly
supported integration available on the VS market place hence we can
retire our custom support.

4 months agoFix T61591 Bevel tool not executing on mouseup.
Howard Trickey [Sat, 16 Feb 2019 14:45:55 +0000 (09:45 -0500)]
Fix T61591 Bevel tool not executing on mouseup.

When modal map was introduced, left out handling of what
happens when bevel is made active tool in toolbar and user
starts bevel by clicking and dragging.

4 months agoFix T61593: Python can't access HUD region-type
Campbell Barton [Sat, 16 Feb 2019 10:25:29 +0000 (21:25 +1100)]
Fix T61593: Python can't access HUD region-type

4 months agoCleanup: rename SPACE_IPO -> SPACE_GRAPH
Campbell Barton [Sat, 16 Feb 2019 05:42:11 +0000 (16:42 +1100)]
Cleanup: rename SPACE_IPO -> SPACE_GRAPH

4 months agoDNA: rename theme space types
Campbell Barton [Sat, 16 Feb 2019 05:13:12 +0000 (16:13 +1100)]
DNA: rename theme space types

Follow enum naming convention, use "space_" prefix instead of "t".

4 months agoDNA: ensure new names exist when renaming
Campbell Barton [Sat, 16 Feb 2019 01:54:33 +0000 (12:54 +1100)]
DNA: ensure new names exist when renaming

Fail to build on errors in new names - without this renamed values
would be written to DNA breaking backwards & forwards compatibility.

Note that errors in old names aren't detected.

4 months agoDNA: rename near/far -> clip_start/clip_end
Campbell Barton [Sat, 16 Feb 2019 01:21:44 +0000 (12:21 +1100)]
DNA: rename near/far -> clip_start/clip_end

Rename for Camera, View3D (also CameraParams & Render not DNA)

4 months agoDNA: rename SpaceButs -> SpaceProperties
Campbell Barton [Fri, 15 Feb 2019 23:44:15 +0000 (10:44 +1100)]
DNA: rename SpaceButs -> SpaceProperties

4 months agoDNA: rename SpaceIpo -> SpaceGraph
Campbell Barton [Fri, 15 Feb 2019 23:16:16 +0000 (10:16 +1100)]
DNA: rename SpaceIpo -> SpaceGraph

4 months agoDNA: rename SpaceOops -> SpaceOutliner
Campbell Barton [Fri, 15 Feb 2019 22:47:19 +0000 (09:47 +1100)]
DNA: rename SpaceOops -> SpaceOutliner

4 months agoDNA: rename camera YF_dofdist -> dof_distance
Campbell Barton [Fri, 15 Feb 2019 22:40:19 +0000 (09:40 +1100)]
DNA: rename camera YF_dofdist -> dof_distance

4 months agoDNA: support DNA type & name aliases
Campbell Barton [Tue, 12 Feb 2019 00:43:33 +0000 (11:43 +1100)]
DNA: support DNA type & name aliases

This allows us to rename struct & struct members in the source code
without changing the file format.

This is useful because the code becomes increasingly confusing when
names such as oops, ipo & dupli aren't used anywhere except DNA headers.

dna_rename_defs.h is used to define renaming operations.

The renaming it's self will be done separately.

4 months agoDNA: warn about old versioning being incomplete
Campbell Barton [Fri, 15 Feb 2019 21:51:00 +0000 (08:51 +1100)]
DNA: warn about old versioning being incomplete

Also sync variable names w/ D4342

4 months agoFix T61512: Crash switching workspace with fullscreen area
Dalai Felinto [Fri, 15 Feb 2019 21:13:17 +0000 (19:13 -0200)]
Fix T61512: Crash switching workspace with fullscreen area

In this case we simply create a new screen area that copies the currently
fullscreened area.

Note: At the moment there is no indicative in the non-main window that we are in
fullscreen. That happens because this information is part of the bar and we have
no topbar in this window.

4 months agoFix T61210: Crash/inconsistency when clicking on obdata in outliner
Dalai Felinto [Fri, 15 Feb 2019 17:48:11 +0000 (15:48 -0200)]
Fix T61210: Crash/inconsistency when clicking on obdata in outliner

The problem
===========
For armature, if the active object was in pose mode and the newly
selected armature data (not the pose, but the edit armature) we would
get a crash.

For mesh objects, the issue would happen with the active object in object mode.
Then the new selected object would switch to edit mode, however the overall
mode would still be object mode, leading to unsynced mode across the objects.

The solution
============
Using shift to extend selection makes current selected (compatible)
objects to go to edit mode as well. Otherwise only the newly selected
object will switch to edit mode.

This also works if you are in edit mode for a curve, and click in a mesh icon.

This also changes the rules for multi-object editing (or rather, how we
put objects in and out of it). Now shirt is also taking into
consideration there. So if you simply click in another mesh object's
data, it will have only the newly selected object in edit mode.

To reproduce the old behaviour you need to use shift to include the
newly selected object in the multi-edit party.

Reviewers: campbellbarton

Subscribers: brecht

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

4 months agoFix T61575: missing Cycles viewport updates when changing settings.
Brecht Van Lommel [Fri, 15 Feb 2019 17:36:59 +0000 (18:36 +0100)]
Fix T61575: missing Cycles viewport updates when changing settings.

This reverts "Depsgraph: Don't tag original IDs", commit:
5f814cb3b47df9255724e979458e05a42ed40f9a.

4 months agoGP: Cleanup old ToDo
Antonioya [Fri, 15 Feb 2019 17:12:32 +0000 (18:12 +0100)]
GP: Cleanup old ToDo

4 months agoFix T61572: Crash when copy/pasting nodes
Philipp Oeser [Fri, 15 Feb 2019 13:29:10 +0000 (14:29 +0100)]
Fix T61572: Crash when copy/pasting nodes

was caused by rBc6e3a20ab60b, copied node was actually added to the
nodetree, resulting in an endless loop.

Reviewers: brecht

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

4 months agoAdd global control over disabling high-resolution smoke draw
Sergey Sharybin [Fri, 15 Feb 2019 16:55:24 +0000 (17:55 +0100)]
Add global control over disabling high-resolution smoke draw

Can be found in the viewport's simplify panel, allows to easily
disable high-res display for all the smokes in the scene.

4 months agoCleanup: More obvious name for the flag
Sergey Sharybin [Fri, 15 Feb 2019 16:28:25 +0000 (17:28 +0100)]
Cleanup: More obvious name for the flag

Not sure what BIG is, it is HIGH RESOLUTION.

4 months agoCleanup: Naming, BKE prefix
Sergey Sharybin [Fri, 15 Feb 2019 16:26:57 +0000 (17:26 +0100)]
Cleanup: Naming, BKE prefix

Done for smoke functions.

Smoke modifier functions seems an oddballs here,
but probably also to be renamed.

4 months agoFix T61567: Object loose its rigid body data when moving to collection
Dalai Felinto [Fri, 15 Feb 2019 14:55:54 +0000 (12:55 -0200)]
Fix T61567: Object loose its rigid body data when moving to collection

At some I unified the "move to collection" with the remove from all collections
functionality. That meant that even when we were still to keep the object in one
of the collections we would clear its rigid body data.

Now why to even remove the rigidbody data when removing an object from all
collections? That mimics the 2.79 behaviour when we were to unlink an
object from a scene. I suspect it has to do with the rigid body data
being tied to the scene rigid body. Which is a strange design anyways
(add to the list?) since an object can be in more than one scene.

4 months agoCleanup: Line wrapping
Sergey Sharybin [Fri, 15 Feb 2019 15:00:54 +0000 (16:00 +0100)]
Cleanup: Line wrapping

4 months agoDepsgraph: Speedup constraint source lookup
Sergey Sharybin [Fri, 15 Feb 2019 14:06:44 +0000 (15:06 +0100)]
Depsgraph: Speedup constraint source lookup

Is mainly used by drivers variables. The slow part was about
iterating over all pose channels to find the one which has a
given constraint.

Now we build a look up table, so this operation is way cheaper,

Brings down relations update time from 0.7sec to 0.4 with Spring
production file.

4 months agoDepsgraph: Move RNA lookup to an own query class
Sergey Sharybin [Fri, 15 Feb 2019 11:45:56 +0000 (12:45 +0100)]
Depsgraph: Move RNA lookup to an own query class

Currently should have no functional changes, but allows to
implement runction optimizations more localized and easily.

4 months agoDepsgraph: Correct logging of build time
Sergey Sharybin [Fri, 15 Feb 2019 14:33:50 +0000 (15:33 +0100)]
Depsgraph: Correct logging of build time

4 months agoCleanup: Indentation
Sergey Sharybin [Fri, 15 Feb 2019 11:30:06 +0000 (12:30 +0100)]
Cleanup: Indentation

4 months agoBevel: remove workspace text message when exiting bevel.
Howard Trickey [Fri, 15 Feb 2019 14:15:32 +0000 (09:15 -0500)]
Bevel: remove workspace text message when exiting bevel.

The message with shortcuts was hanging around after bevel
exited.

4 months agoBevel: fix twist on bevel of cylinder with >= 200 sides.
Howard Trickey [Fri, 15 Feb 2019 13:32:07 +0000 (08:32 -0500)]
Bevel: fix twist on bevel of cylinder with >= 200 sides.

This triggered an "almost parallel" case in setting the
offset meet points, which is OK but code needed improvement
put the meet point in a more accurate place.
This ia fix for part of the report T61214.

4 months agoDepsgraph: Show build time on --debug-depsgraph-time
Sergey Sharybin [Fri, 15 Feb 2019 11:27:36 +0000 (12:27 +0100)]
Depsgraph: Show build time on --debug-depsgraph-time

Previously was only shown on --debug-depsgraph-build which
had other unwanted noise.

4 months agoFix T61570: Monkey primitive fill color wrong
Antonioya [Fri, 15 Feb 2019 11:00:43 +0000 (12:00 +0100)]
Fix T61570: Monkey primitive fill color wrong

This was introduced by error in a previous commit.

4 months agoFix Spring characters being in the rest pose on file open
Sergey Sharybin [Fri, 15 Feb 2019 09:54:46 +0000 (10:54 +0100)]
Fix Spring characters being in the rest pose on file open

This partially reverts bf2c5217 and makes it so animation is evaluated
for datablocks which were never evaluated within the dependency graph.

Not ideal, but safest way currently.

Animation for already evaluated datablocks will only be evaluated on
manual edits, so the initial bugfix is still valid.

4 months agoCleanup: Argument wrapping
Sergey Sharybin [Fri, 15 Feb 2019 09:52:53 +0000 (10:52 +0100)]
Cleanup: Argument wrapping

4 months agoDepsgraph: Don't tag original IDs
Sergey Sharybin [Thu, 14 Feb 2019 11:20:51 +0000 (12:20 +0100)]
Depsgraph: Don't tag original IDs

This is unreliable for cases when multiple dependency graphs
are to be updated.

The only reason why it was attempted to be made is to deal
with cases when ID appears in the dependency graph for the
first time. But even then it should be smart enough bring
itself to an up-to-date state without any extra tricks.

4 months agoCleanup: Attempt to clarify some ID_RECALC flags
Sergey Sharybin [Thu, 14 Feb 2019 11:17:29 +0000 (12:17 +0100)]
Cleanup: Attempt to clarify some ID_RECALC flags

4 months agoCycles: Support multithreaded compilation of kernels
Brecht Van Lommel [Fri, 15 Feb 2019 07:18:38 +0000 (08:18 +0100)]
Cycles: Support multithreaded compilation of kernels

This patch implements a workaround to get the multithreaded compilation from D2231 working.
So far, it only works for Blender, not for Cycles Standalone. Also, I have only tested the Linux codepath in the helper function.
Depends on D2231.

Patch by lukasstockner97, jbakker, brecht

    job    |   scene_name    | compilation_time
----------+-----------------+------------------
    Baseline | empty           |            22.73
    D2264    | empty           |            13.94
    Baseline | bmw             |            56.44
    D2264    | bmw             |            41.32
    Baseline | fishycat        |            59.50
    D2264    | fishycat        |            45.19
    Baseline | barbershop      |           212.28
    D2264    | barbershop      |           169.81
    Baseline | victor          |            67.51
    D2264    | victor          |            53.60
    Baseline | classroom       |            51.46
    D2264    | classroom       |            39.02
    Baseline | koro            |            62.48
    D2264    | koro            |            49.03
    Baseline | pavillion       |            54.37
    D2264    | pavillion       |            38.82
    Baseline | splash279       |            47.43
    D2264    | splash279       |            37.94
    Baseline | volume_emission |           145.22
    D2264    | volume_emission |           121.10

This patch reduced compilation time as the split kernels and base
kernels are compiled in parallel. In cycles debug mode (256) you can set
unmark the opencl single program file, what reduces the compilation time
even further (bmw 17 seconds, barbershop 53 seconds).

Reviewers: brecht, dingto, sergey, juicyfruit, lukasstockner97

Reviewed By: brecht

Subscribers: Loner, jbakker, candreacchio, 3dLuver, LazyDodo, bliblubli

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

4 months agoCycles: Support multithreaded compilation of kernels
Brecht Van Lommel [Fri, 15 Feb 2019 07:18:38 +0000 (08:18 +0100)]
Cycles: Support multithreaded compilation of kernels

This patch implements a workaround to get the multithreaded compilation from D2231 working.
So far, it only works for Blender, not for Cycles Standalone. Also, I have only tested the Linux codepath in the helper function.
Depends on D2231.

Reviewers: brecht, dingto, sergey, juicyfruit, lukasstockner97

Reviewed By: brecht

Subscribers: Loner, jbakker, candreacchio, 3dLuver, LazyDodo, bliblubli

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

4 months agoFix DNA struct member versioning logic
Campbell Barton [Fri, 15 Feb 2019 07:09:02 +0000 (18:09 +1100)]
Fix DNA struct member versioning logic

Possible error changing names which are shared between structs.
While the problem doesn't occur at the moment, avoid future problems.

4 months agoCleanup: sync minor changes from D4342
Campbell Barton [Fri, 15 Feb 2019 06:20:11 +0000 (17:20 +1100)]
Cleanup: sync minor changes from D4342

Use naming conventions from the patch so they match when it's applied.

4 months agoUI: impossible to activate RMB menu on menu items
Campbell Barton [Fri, 15 Feb 2019 04:18:35 +0000 (15:18 +1100)]
UI: impossible to activate RMB menu on menu items

Right clicking on a menu item now closes it's sub-menus and opens
the button's context menu.

This is needed for adding them to the quick favourites menu.

Resolves T58729, T61015.

4 months agoFix T60905: Crash using smooth tool
Campbell Barton [Fri, 15 Feb 2019 02:32:31 +0000 (13:32 +1100)]
Fix T60905: Crash using smooth tool

Tools were relying on gizmos drawing to initialize their gizmos,
now tool gizmos are initialized immediately.

4 months agoFix T58090: Selected curve vertex should stand out
Campbell Barton [Fri, 15 Feb 2019 00:58:36 +0000 (11:58 +1100)]
Fix T58090: Selected curve vertex should stand out

D4002 by @slumber w/ edits.

Use text colors, blending to background if they don't contrast.

4 months agomakesdna: correct function docs
Campbell Barton [Thu, 14 Feb 2019 23:31:51 +0000 (10:31 +1100)]
makesdna: correct function docs

Also use doxy sections & remove parens from return values.

4 months agoctodata: make stripping the last byte optional
Campbell Barton [Thu, 14 Feb 2019 21:39:15 +0000 (08:39 +1100)]
ctodata: make stripping the last byte optional

4 months agoFix T61427: Bevel crash with patch miter.
Howard Trickey [Thu, 14 Feb 2019 22:21:50 +0000 (17:21 -0500)]
Fix T61427: Bevel crash with patch miter.

The adjustment phase had broken assumptions after adding miters,
and sent a null problem to eigen. Fixed code to check assumptions.

4 months agoFix outliner box select not working when using search filter.
Brecht Van Lommel [Thu, 14 Feb 2019 19:08:10 +0000 (20:08 +0100)]
Fix outliner box select not working when using search filter.

4 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Thu, 14 Feb 2019 19:00:37 +0000 (20:00 +0100)]
Merge branch 'blender2.7'

4 months agoCleanup: fix compiler warnings.
Brecht Van Lommel [Thu, 14 Feb 2019 18:28:19 +0000 (19:28 +0100)]
Cleanup: fix compiler warnings.

4 months agoFix T61470: incorrect saturation clamping in recent bugfix.
Brecht Van Lommel [Thu, 14 Feb 2019 18:03:59 +0000 (19:03 +0100)]
Fix T61470: incorrect saturation clamping in recent bugfix.

We should clamp the result after multiplication.

4 months agoUI: reword error message when Python script fails.
Francesco Siddi [Thu, 14 Feb 2019 17:16:18 +0000 (18:16 +0100)]
UI: reword error message when Python script fails.

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

4 months agoFix Cycles Embree crash on macOS, due to too small thread stack size.
Brecht Van Lommel [Thu, 14 Feb 2019 13:37:57 +0000 (14:37 +0100)]
Fix Cycles Embree crash on macOS, due to too small thread stack size.

4 months agoFix Cycles build error with OpenImageIO 2.x.
Brecht Van Lommel [Thu, 14 Feb 2019 12:57:28 +0000 (13:57 +0100)]
Fix Cycles build error with OpenImageIO 2.x.

4 months agoGP: Cleanup some lowercase texts
Antonioya [Thu, 14 Feb 2019 15:51:50 +0000 (16:51 +0100)]
GP: Cleanup some lowercase texts

4 months agoGP: Don't activate Fill for new materials
Antonioya [Thu, 14 Feb 2019 15:42:07 +0000 (16:42 +0100)]
GP: Don't activate Fill for new materials

As the fill color alpha is set to zero, it's better keep fill option disabled.

4 months agoGP: Avoid eraser in empty frames and add warning.
Antonioya [Thu, 14 Feb 2019 15:36:40 +0000 (16:36 +0100)]
GP: Avoid eraser in empty frames and add warning.

Also capture event to avoid Move transform.

Note: Now it's using a report message. Maybe this can be removed, but without the message, the event is captured by move transform.

4 months agoGP: Do not draw in Locked or Invisible layers
Antonioya [Thu, 14 Feb 2019 15:12:11 +0000 (16:12 +0100)]
GP: Do not draw in Locked or Invisible layers

It's weird to draw in a layer where the stroke cannot be seen or is not saved.

4 months agoCleanup: replace Main ID's foreach functions by macros.
Bastien Montagne [Thu, 14 Feb 2019 15:24:49 +0000 (16:24 +0100)]
Cleanup: replace Main ID's foreach functions by macros.

Am really no a big fan of using macros for that kind of things, but
meh... C solution to do that with functions (using callbacks) is
even worse. :(

4 months agoFix Object > Animation > Bake Action
Dalai Felinto [Thu, 14 Feb 2019 13:51:14 +0000 (13:51 +0000)]
Fix Object > Animation > Bake Action

4 months agoFix T61536: can't snap vertex to another vertex in edit mode using curves
Sebastian Parborg [Thu, 14 Feb 2019 13:49:47 +0000 (14:49 +0100)]
Fix T61536: can't snap vertex to another vertex in edit mode using curves

Previously, the curve self snapping would only snap to points that were
earlier in the curve structure. This was because of a simple coding
snafu of using break when meaning to use continue.

4 months agoFix T61520: Incorrect assignment of layers to compositor nodes in 2.8 when reading...
Philipp Oeser [Thu, 14 Feb 2019 09:48:56 +0000 (10:48 +0100)]
Fix T61520: Incorrect assignment of layers to compositor nodes in 2.8 when reading 2.79 .blend

Reviewers: brecht

Maniphest Tasks: T61520

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

4 months agoFix T56665: Assert when selecting object
Campbell Barton [Thu, 14 Feb 2019 12:32:53 +0000 (23:32 +1100)]
Fix T56665: Assert when selecting object

Selecting object w/ a different mode missed refreshing the screen
areas current tool.

4 months agoUI: add symmetrize to armature menu
Campbell Barton [Thu, 14 Feb 2019 07:32:04 +0000 (18:32 +1100)]
UI: add symmetrize to armature menu

Was lost on menu reorganization,
minor tweaks to make it match the context menu.

4 months agoFix T61472: Hide Unselected fails w/ no selection
Campbell Barton [Thu, 14 Feb 2019 06:50:41 +0000 (17:50 +1100)]
Fix T61472: Hide Unselected fails w/ no selection

Also skip mesh recalculation when no hide/reveal is performed.

4 months agoFix T61353: Crash converting a curve to a mesh
Campbell Barton [Thu, 14 Feb 2019 06:21:55 +0000 (17:21 +1100)]
Fix T61353: Crash converting a curve to a mesh

This was caused by curves pointing to each other
creating a cyclic dependency.

While the dependency graph detects this, generating a mesh for render
recursively generates data which cashes in this case.

Add in a check to detect cyclic links.

Note, this bug exists in 2.7x too - but only crashes on render
since 2.7x didn't use 'for_render' when converting data.

4 months agoDRW: de-duplicate vertex & weight paint engines
Campbell Barton [Thu, 14 Feb 2019 02:59:30 +0000 (13:59 +1100)]
DRW: de-duplicate vertex & weight paint engines

These were almost exact duplicates, use one engine for drawing both
kinds of vertex color.

4 months agoDRW: use light wire for weight paint mode
Campbell Barton [Thu, 14 Feb 2019 02:39:18 +0000 (13:39 +1100)]
DRW: use light wire for weight paint mode

Black wire can be hard to see against dark blue,
especially when shading is enabled.

Use light grey, matches 2.7x.

4 months agoDRW: Increase weight paint wire depth bias
Campbell Barton [Thu, 14 Feb 2019 02:50:15 +0000 (13:50 +1100)]
DRW: Increase weight paint wire depth bias

By default wire would z-fight against the surface.
Increase the bias, also don't adjust the 'w' component
since it causes bias that depends on the view direction.

4 months agoCleanup: vertex painting variable use
Campbell Barton [Thu, 14 Feb 2019 02:06:03 +0000 (13:06 +1100)]
Cleanup: vertex painting variable use

Assign to local variables when setting up passes,
avoids mix-up between similarly named struct members.

4 months agoFix vertex/weight paint showing edge selection
Campbell Barton [Thu, 14 Feb 2019 01:40:21 +0000 (12:40 +1100)]
Fix vertex/weight paint showing edge selection

When vertex/face selection are disabled - show all wire
ignoring selection & hidden state.

4 months agoFix T61360: Weight paint tools ignore face select
Campbell Barton [Thu, 14 Feb 2019 00:47:23 +0000 (11:47 +1100)]
Fix T61360: Weight paint tools ignore face select

Face selection was added in weight paint mode since 2.7x,
however tools hadn't been updated.

4 months agoFix T61497: Old keymap causes error on startup
Campbell Barton [Thu, 14 Feb 2019 00:11:53 +0000 (11:11 +1100)]
Fix T61497: Old keymap causes error on startup

When a keymap has an error loading, don't make it active
since it will be partially loaded and not usable.

4 months agoDNA: add in-place stripping utility
Campbell Barton [Wed, 13 Feb 2019 22:59:46 +0000 (09:59 +1100)]
DNA: add in-place stripping utility

Minor change from D4342

4 months agoKeymap: preference for alternate tap action for some pie menus
Campbell Barton [Wed, 13 Feb 2019 22:38:05 +0000 (09:38 +1100)]
Keymap: preference for alternate tap action for some pie menus

This allows secondary keys on tap.
Currently Z-key to toggle wireframe and tilde for navigation.

This is currently experimental, if users like this the preference
can be kept and used where appropriate.

4 months agoKeymap: Alt-N to flip normals
Campbell Barton [Wed, 13 Feb 2019 21:33:32 +0000 (08:33 +1100)]
Keymap: Alt-N to flip normals

Add shortcut since this has been removed from the context menu,
now it's in the mesh normals menu which isn't so convenient to access.

Shift-N is already used to recalculate normals,
this fits the convention of Alt removing/reversing.

4 months agoCleanup: indentation
Campbell Barton [Wed, 13 Feb 2019 21:43:44 +0000 (08:43 +1100)]
Cleanup: indentation

4 months agofix build on xcode with openmp
Arto Kitula [Wed, 13 Feb 2019 20:34:40 +0000 (22:34 +0200)]
fix build on xcode with openmp

4 months agoFix T61477: freestyle not updating in animation render (again).
Brecht Van Lommel [Wed, 13 Feb 2019 19:04:25 +0000 (20:04 +0100)]
Fix T61477: freestyle not updating in animation render (again).

Must use the right function to get animation updates now.

4 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Wed, 13 Feb 2019 18:02:43 +0000 (19:02 +0100)]
Merge branch 'blender2.7'

4 months agoFix T61505, T61280, bugs in button drag toggle after recent changes.
Brecht Van Lommel [Wed, 13 Feb 2019 17:56:46 +0000 (18:56 +0100)]
Fix T61505, T61280, bugs in button drag toggle after recent changes.

4 months agoFix T59062: Keyframed node properties stay linked after shading network duplication.
Bastien Montagne [Wed, 13 Feb 2019 16:19:18 +0000 (17:19 +0100)]
Fix T59062: Keyframed node properties stay linked after shading network duplication.

There is no reason not to duplicate Actions too here, especially when
Materials' Actions are pretty much impossible to edit from current UI
(afaik, DopeSheet editor does not has any way to change them?).

4 months agoFix T61470: inconsistent HSV node results with saturation > 1.0.
Brecht Van Lommel [Wed, 13 Feb 2019 15:58:54 +0000 (16:58 +0100)]
Fix T61470: inconsistent HSV node results with saturation > 1.0.

Values outside the 0..1 range produce negative colors, so now clamp to that
range everywhere. Also fixes improper handling of hue > 2.0 in some places.

4 months agoGP: Cleanup Paint Poll method
Antonioya [Wed, 13 Feb 2019 15:48:16 +0000 (16:48 +0100)]
GP: Cleanup Paint Poll method

The poll was checking things related to all annotations, but now the check must be only for grease pencil objects and 3D view.

4 months agoFix T61446: (second part) Some items in editor and mode selectors are not translatable.
Bastien Montagne [Wed, 13 Feb 2019 15:32:58 +0000 (16:32 +0100)]
Fix T61446: (second part) Some items in editor and mode selectors are not translatable.

That one is utterly ugly fix really, but unfortunately a proper one
would require some changes to our RNA (or more precisely, pyrna) code,
so that when we subscript a dynamically generated RNA collection, the
item is somehow duplicated (and probably 'assigned' to its py object?),
before the temp RNA array memory is freed...

4 months agoFix NodeTree types UI messages not being properly tagged for translation.
Bastien Montagne [Wed, 13 Feb 2019 15:18:19 +0000 (16:18 +0100)]
Fix NodeTree types UI messages not being properly tagged for translation.

Probably fix first part of T61446.

4 months agoFix T61515: Crash when unloading a scene with pynodes and idprop of type id.
Bastien Montagne [Wed, 13 Feb 2019 15:10:46 +0000 (16:10 +0100)]
Fix T61515: Crash when unloading a scene with pynodes and idprop of type id.

Usual legacy/history crap in NodeTree code... Datablocks's specific
freeing code should never, ever do refcounting management, this is
handled by higher-level code from BKE_library area.

4 months agoFix T61502: Cycles wrong other object texture coordinates in OSL.
Brecht Van Lommel [Wed, 13 Feb 2019 14:01:54 +0000 (15:01 +0100)]
Fix T61502: Cycles wrong other object texture coordinates in OSL.

The row/column major matrix conversion was done twice.

4 months agoFix T61506: Wrong user counting with ID properties in pynodes.
Bastien Montagne [Wed, 13 Feb 2019 13:58:38 +0000 (14:58 +0100)]
Fix T61506: Wrong user counting with ID properties in pynodes.

Nuke away old nodeCopyNode(), much better to use new BKE_node_copy_ex(),
which behaves as expected for the various optional flags that can be passed.

This also removes the need to handle ID refcounting in calling code
(ugly!) and allows us to remove an even uglier name from our codebase! :D

Note that this fixes three related issues actually, that bug was also
affecting copy/paste of nodes, and 'Separate with copy' operator (the
latter being actually fully wrong, since it was not refcounting
anything, not even node->id pointer...).

4 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Wed, 13 Feb 2019 13:34:26 +0000 (14:34 +0100)]
Merge branch 'blender2.7'

4 months agoFix missing Cycles cryptomatte metadata in renders.
Brecht Van Lommel [Wed, 13 Feb 2019 13:33:29 +0000 (14:33 +0100)]
Fix missing Cycles cryptomatte metadata in renders.

4 months agoCleanup: do not cleanup runtime data twice during ID copying...
Bastien Montagne [Wed, 13 Feb 2019 13:29:27 +0000 (14:29 +0100)]
Cleanup: do not cleanup runtime data twice during ID copying...

More or less same code was being executed twice during ID copying.

Makes no sense to add yet another switch-by-ID-type to handle
specificaly runtime data during ID copying, we already have
BKE_xxx_copy_data() functions for that.

4 months agoFix T61457, T61489, T61482: build errors and memory warning in Cycles.
Brecht Van Lommel [Tue, 12 Feb 2019 16:10:31 +0000 (17:10 +0100)]
Fix T61457, T61489, T61482: build errors and memory warning in Cycles.

For OIIO 2.x we must use unique_ptr. This also required updating the
guarded allocator for std::move to work. Since C++11 construct/destroy
have a default implementation that also works this case, so we just
leave it out.

4 months 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