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

8 hours 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

8 hours 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".

12 hours 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.

12 hours 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)

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

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

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

15 hours 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

15 hours 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.

16 hours 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

17 hours 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.

20 hours 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:

20 hours 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:

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

21 hours 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:

21 hours 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.

21 hours 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.

21 hours 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.

23 hours 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.

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

23 hours 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.

23 hours 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.

23 hours 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

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

24 hours 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

24 hours 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.

26 hours 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.

27 hours 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.

28 hours 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.

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

29 hours 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.

29 hours 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

30 hours 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:

31 hours 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.

31 hours 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.

33 hours 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.

35 hours 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.

37 hours 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.

38 hours 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.

39 hours 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

39 hours 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.

43 hours 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.

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

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

43 hours 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.

45 hours 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:

45 hours 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.

46 hours 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.

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

46 hours 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.

46 hours 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.

46 hours 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.

46 hours 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. :(

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

2 days 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.

2 days 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:

2 days 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.

2 days 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.

2 days 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.

2 days 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.

2 days 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.

2 days 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.

2 days 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.

2 days 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.

2 days 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.

2 days 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.

2 days 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.

2 days 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

2 days 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.

2 days 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.

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

2 days 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

2 days 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.

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

2 days 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.

2 days 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?).

2 days 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.

2 days 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.

2 days 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...

2 days 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.

2 days 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.

3 days 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.

3 days 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...).

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

3 days 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.

3 days 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.

3 days 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.

3 days 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:

3 days 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

3 days 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

Was found when looking into a file from T56635.

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

3 days 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.

3 days 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

3 days 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.

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

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

3 days 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.

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

3 days 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...