2 years agoFix: Border select for GPencil keyframes was including those in the "datablock" chann...
Joshua Leung [Sun, 3 Sep 2017 00:40:49 +0000 (12:40 +1200)]
Fix: Border select for GPencil keyframes was including those in the "datablock" channels even though those weren't visible

This meant that it was easy to accidentally select too many keyframes

2 years agoFix: GPencil Sequence Interpolation for thickness/strength was inverted
Joshua Leung [Sat, 2 Sep 2017 15:38:44 +0000 (03:38 +1200)]
Fix: GPencil Sequence Interpolation for thickness/strength was inverted

For example, if you have two keyframes:
  k1 = 1px, k2 = 10px

it was doing:
  1px, 9px, 8px, ..., 3px, 2px, 10px
instead of:
  1px, 2px, 3px, ..., 8px, 9px, 10px

2 years agoFix T52227: Time Slide tool doesn't take NLA mapping into account
Joshua Leung [Sat, 2 Sep 2017 15:35:27 +0000 (03:35 +1200)]
Fix T52227: Time Slide tool doesn't take NLA mapping into account

To be backported to 2.79

2 years ago[deps/msvc] Debug flags for optimized debug libs were inverted for cxx.
Ray Molenkamp [Sat, 2 Sep 2017 23:14:42 +0000 (17:14 -0600)]
[deps/msvc] Debug flags for optimized debug libs were inverted for cxx.

2 years agoCorrect own error simplifying matrix checks
Campbell Barton [Sat, 2 Sep 2017 14:05:11 +0000 (00:05 +1000)]
Correct own error simplifying matrix checks

2 years agoCleanup: use title caps for labels
Campbell Barton [Sat, 2 Sep 2017 05:42:29 +0000 (15:42 +1000)]
Cleanup: use title caps for labels

Also consistent quoting (single quotes for enums, text uses double).

2 years agoBMesh: use predictable order for remove-doubles
Campbell Barton [Fri, 1 Sep 2017 17:27:55 +0000 (03:27 +1000)]
BMesh: use predictable order for remove-doubles

Each qsort implementation may give different results when values match.

Now fallback to sorting by index.

2 years agoFix T52472: VSE Audio Volume not set immediately
Joerg Mueller [Fri, 1 Sep 2017 10:27:21 +0000 (12:27 +0200)]
Fix T52472: VSE Audio Volume not set immediately

Audio mixing is done with volume interpolation. A new handle started at
volume 1, now starting at volume 0 for a smooth fade in.

2 years agoRNA: demote non-strict class naming to warning
Campbell Barton [Fri, 1 Sep 2017 07:06:14 +0000 (17:06 +1000)]
RNA: demote non-strict class naming to warning

This stops a lot of add-ons from registering,
while this must be resolved but there no need to force error just now.

2 years agoCycles: follow strict class naming convention
Campbell Barton [Fri, 1 Sep 2017 06:08:25 +0000 (16:08 +1000)]
Cycles: follow strict class naming convention

2 years agoRNA: strict naming for types in bpy.types
Campbell Barton [Thu, 31 Aug 2017 14:58:18 +0000 (00:58 +1000)]
RNA: strict naming for types in bpy.types

Blender scripts already do this, some addons will need updating.

2 years agoCleanup: strict naming conventions
Campbell Barton [Thu, 31 Aug 2017 14:57:36 +0000 (00:57 +1000)]
Cleanup: strict naming conventions

2 years agoIncrease max/min frame range to over a million
Dalai Felinto [Thu, 31 Aug 2017 14:06:08 +0000 (16:06 +0200)]
Increase max/min frame range to over a million

For some specific pipelines (e.g., holographic rendering) you can easily
need over a million frames (1k * 1k view angles).

It seems a corner case, but there is no real reason not to allow users
doing that.

That said we do loose subframe precision in the highest frame range. Which can
affect motionblur. The current maximum sub-frame precision we have is 16.
While the previous limit of 500k frames has a precision of 32.

Thanks to Campbell Barton for the help here.

To be backported to 2.79

2 years agoRNA: Limit which classes struct-map contains
Campbell Barton [Thu, 31 Aug 2017 13:32:21 +0000 (23:32 +1000)]
RNA: Limit which classes struct-map contains

Only add subclasses of: Menu, Panel, Header, UIList, Operator

This helps avoid unnecessary naming collisions,

See T52599 for details

2 years agoCycles: Cleanup, indentation and trailing whitespace
Sergey Sharybin [Thu, 31 Aug 2017 12:47:49 +0000 (14:47 +0200)]
Cycles: Cleanup, indentation and trailing whitespace

2 years agoCycles: Fix typo in comment
Sergey Sharybin [Thu, 31 Aug 2017 11:24:32 +0000 (13:24 +0200)]
Cycles: Fix typo in comment

2 years agoCorrect last commit
Campbell Barton [Thu, 31 Aug 2017 09:12:45 +0000 (19:12 +1000)]
Correct last commit

2 years agoRNA: existing type check used wrong identifier
Campbell Barton [Thu, 31 Aug 2017 08:42:48 +0000 (18:42 +1000)]
RNA: existing type check used wrong identifier

Own error in recent type checks, in many cases the 'idname'
is used for the struct identifier, not the 'identifier'
which is the Python class name in this context.

2 years agoCycles: Add tangent attribute tests
Sergey Sharybin [Wed, 30 Aug 2017 15:42:00 +0000 (17:42 +0200)]
Cycles: Add tangent attribute tests

2 years agoFix T52588: Shape key value driver variables of duplicated object sets refer to old...
Bastien Montagne [Wed, 30 Aug 2017 15:24:06 +0000 (17:24 +0200)]
Fix T52588: Shape key value driver variables of duplicated object sets refer to old objects.

Regression since 2.78, to be backported to 2.79.

2 years agoRefactor 'split faces' mesh code.
Bastien Montagne [Wed, 30 Aug 2017 14:42:53 +0000 (16:42 +0200)]
Refactor 'split faces' mesh code.

Previous version was trying to do a quick and simple process in the case
we were only considering smooth/flat status of faces.

Thing is, even then, the algorithm was not actually working in all
possible situations, e.g. two smooth faces having a single vertex in
common, but no common edges, would not have split that vertex, leading
to incorrect shading etc.

So now, tweaked slightly our split normals code to be able to generate
lnor spaces even when autosmooth is disabled, and we always go that way
when splitting faces.

Using smooth fans from clnor spaces is not only the only way to get 100%
correct results, it also makes face split code simpler.

2 years agoFixing T52477 - switching from custom ray/triangle intersection code to the one from...
Stefan Werner [Wed, 30 Aug 2017 09:47:33 +0000 (11:47 +0200)]
Fixing T52477 - switching from custom ray/triangle intersection code to the one from util_intersection.h. This fixes the bug and makes the code more readable and maintainable.

2 years agoCycles: Fix build with networking enabled
Mai Lavelle [Wed, 30 Aug 2017 04:19:44 +0000 (00:19 -0400)]
Cycles: Fix build with networking enabled

2 years agoFix Cycles Windows render errors with BVH2 CPU rendering.
Brecht Van Lommel [Tue, 29 Aug 2017 19:11:47 +0000 (21:11 +0200)]
Fix Cycles Windows render errors with BVH2 CPU rendering.

One problem is that it was always using __mm_blendv_ps emulation even if the
instruction was supported. The other that the emulation function was wrong.

Thanks a lot to Ray Molenkamp for tracking this one down.

2 years agoAlembic: Fix T52579: crash when replacing slightly different alembic files
Sybren A. Stüvel [Tue, 29 Aug 2017 14:58:13 +0000 (16:58 +0200)]
Alembic: Fix T52579: crash when replacing slightly different alembic files

Apparently with Maya in a certain configuration, it's possible to have an
Alembic object without schema in the Alembic file. This is now handled
properly, instead of crashing on a null pointer.

2 years agoFix T48079: Maintain Volume constraint overcompensates.
Alexander Gavrilov [Tue, 29 Aug 2017 12:23:47 +0000 (15:23 +0300)]
Fix T48079: Maintain Volume constraint overcompensates.

The coefficient has been wrong since introduction for some reason.

Not backwards compatible, should not be merged to 2.7*.

2 years agoSupport Copy To Selected and Alt-Click for F-Curves in the curve editor.
Alexander Gavrilov [Sat, 19 Aug 2017 16:58:39 +0000 (19:58 +0300)]
Support Copy To Selected and Alt-Click for F-Curves in the curve editor.

This affects the curve display color setting, but is really intended
for future per-curve options.

The id_data reference in the created rna pointers refers to the object
even if the curve is actually owned by its action, which is somewhat
inconsistent, but the same problem can be found in existing code.
Fixing it requires changes in animdata filter API.

2 years agoView2D: function to get view to region matrix
Campbell Barton [Tue, 29 Aug 2017 09:36:06 +0000 (19:36 +1000)]
View2D: function to get view to region matrix

2 years agoTransform: scale center override by aspect
Campbell Barton [Tue, 29 Aug 2017 06:01:16 +0000 (16:01 +1000)]
Transform: scale center override by aspect

Needed for image space.

2 years agoDepsgraph: Don't cast ID_Type to short
Sergey Sharybin [Mon, 28 Aug 2017 09:43:36 +0000 (11:43 +0200)]
Depsgraph: Don't cast ID_Type to short

2 years agoMake GS macro return proper IDType type
Sergey Sharybin [Mon, 28 Aug 2017 09:19:58 +0000 (11:19 +0200)]
Make GS macro return proper IDType type

Previously it was returning short, which was really easy to (a) compare against
non-ID type value (b) forget to handle some specific value in switch statement.

Both issues happened in the nearest past, so it's time to tighten some nuts

Most of the change related on silencing strict compiler warning now, but there
is also one tricky aspect: ID_NLA is not in the IDType enum. So there is still
cast to short to handle that switch. If someone has better ideas how to deal
with this please go ahead :)

2 years agoAtomics: Use system headers directly, without bad level dependency to BLI
Sergey Sharybin [Mon, 28 Aug 2017 09:06:15 +0000 (11:06 +0200)]
Atomics: Use system headers directly, without bad level dependency to BLI

This will make it easier to re-use library as-is in other projects,
such as Cycles standalone repo for example.

2 years agoBuildbot: Tweak nightly schedule of builds
Sergey Sharybin [Mon, 28 Aug 2017 07:12:53 +0000 (09:12 +0200)]
Buildbot: Tweak nightly schedule of builds

Basically, schedule linux 64 earlier on, so builds are ready for nightly benchmarks.

2 years agoTransform: center override
Campbell Barton [Mon, 28 Aug 2017 06:00:28 +0000 (16:00 +1000)]
Transform: center override

Hidden option to override transform center.
Needed for manipulators that define their own center.

2 years agoEditMesh: set edge-rin subdiv minimum to 1
Campbell Barton [Mon, 28 Aug 2017 03:01:11 +0000 (13:01 +1000)]
EditMesh: set edge-rin subdiv minimum to 1

This only made sense for bridge tool.

D2785 by @mbjorkegren

2 years agoDocs: BMesh.from_mesh behavior w/ multiple calls
Campbell Barton [Mon, 28 Aug 2017 02:40:36 +0000 (12:40 +1000)]
Docs: BMesh.from_mesh behavior w/ multiple calls

2 years agoFix T51400: Pasting hex code fails
Campbell Barton [Mon, 28 Aug 2017 02:18:39 +0000 (12:18 +1000)]
Fix T51400: Pasting hex code fails

The # prefix is supported,
the button didn't give enough space to paste it.

D2812 by @candreacchio

2 years agoFix T52498: Deleting force field doesn't remove "Surface" from modifier stack.
Bastien Montagne [Sun, 27 Aug 2017 10:20:21 +0000 (12:20 +0200)]
Fix T52498: Deleting force field doesn't remove "Surface" from modifier stack.

Logic in `ED_object_check_force_modifiers` was inconsistent between add
and remove modifier cases.

Should be safe enough for 2.79.

2 years agoBLI_rect: Function to calculate a matrix from 2 rctf's
Campbell Barton [Sun, 27 Aug 2017 06:01:06 +0000 (16:01 +1000)]
BLI_rect: Function to calculate a matrix from 2 rctf's

2 years agoMissing from last commit
Campbell Barton [Sun, 27 Aug 2017 05:24:41 +0000 (15:24 +1000)]
Missing from last commit

2 years agoCleanup: use stubs for eigen gtest
Campbell Barton [Sun, 27 Aug 2017 05:19:25 +0000 (15:19 +1000)]
Cleanup: use stubs for eigen gtest

2 years agoMissed last commit
Campbell Barton [Sat, 26 Aug 2017 17:48:18 +0000 (03:48 +1000)]
Missed last commit

2 years agoFix T52515: Crash on BMesh.to_mesh()
Campbell Barton [Sat, 26 Aug 2017 16:38:19 +0000 (02:38 +1000)]
Fix T52515: Crash on BMesh.to_mesh()

2 years agoWM: move theme check out of ED_view3d_draw_select_loop
Campbell Barton [Sat, 26 Aug 2017 14:48:52 +0000 (00:48 +1000)]
WM: move theme check out of ED_view3d_draw_select_loop

In 2.8x this needs to be in view3d_opengl_select,
so simplest to make in master too.

2 years agoFix minor Mesh -> BMesh conversion issues
Campbell Barton [Sat, 26 Aug 2017 11:59:54 +0000 (21:59 +1000)]
Fix minor Mesh -> BMesh conversion issues

- Vertex only meshes never restored their selection history.
- Select history was cleared on the source instead of the target.

Simple Optimizations:
- Avoid O(n^2) linked list looping that checked the entire list before
  adding elements (NULL values in the source array to prevent dupes).
- Re-use vert & edge lookup tables instead of allocating new ones.

2 years agoFix T52478: Error report "Shrinkwrap: out of memory" on invisible target.
Bastien Montagne [Sat, 26 Aug 2017 12:46:59 +0000 (14:46 +0200)]
Fix T52478: Error report "Shrinkwrap: out of memory" on invisible target.

Shrinkwrap must check it does have valid target data.

Safe for 2.79 release.

2 years agoFix T52538: Outliner crash when displaying groups and using Show Active on editmode...
Bastien Montagne [Sat, 26 Aug 2017 10:27:37 +0000 (12:27 +0200)]
Fix T52538: Outliner crash when displaying groups and using Show Active on editmode bone not in any groups

There's no guaranty that given ID is found in current outliner tree...

Safe for 2.79, though not a regression.

2 years ago[cycles/ctest] fix failing tests when output folder doesn't exist yet.
Ray Molenkamp [Fri, 25 Aug 2017 23:17:49 +0000 (17:17 -0600)]
[cycles/ctest] fix failing tests when output folder doesn't exist yet.

2 years agoFix for fix (tm): Residue of the debug code
Sergey Sharybin [Fri, 25 Aug 2017 19:33:44 +0000 (21:33 +0200)]
Fix for fix (tm): Residue of the debug code

2 years agoFix mistake in previous tangent space optimization
Sergey Sharybin [Fri, 25 Aug 2017 19:29:59 +0000 (21:29 +0200)]
Fix mistake in previous tangent space optimization

2 years agoCycles: Cleanup, naming of variable
Sergey Sharybin [Fri, 25 Aug 2017 19:03:50 +0000 (21:03 +0200)]
Cycles: Cleanup, naming of variable

Always use b_ prefix for C++ RNA data.

2 years agoCycles: Add assert to catch possibly wrong logic
Sergey Sharybin [Fri, 25 Aug 2017 19:02:27 +0000 (21:02 +0200)]
Cycles: Add assert to catch possibly wrong logic

2 years agoCycles: Mark pixels with negative values as outliers
Lukas Stockner [Thu, 24 Aug 2017 21:15:30 +0000 (23:15 +0200)]
Cycles: Mark pixels with negative values as outliers

If a pixel has negative components, something already went wrong, so the best option is to just ignore it.

Should be good for 2.79.

2 years agoFix T52481: After making all local, local proxies of linked data get broken after...
Bastien Montagne [Fri, 25 Aug 2017 14:11:35 +0000 (16:11 +0200)]
Fix T52481: After making all local, local proxies of linked data get broken after file save and reload.

Issue was nasty hidden one, the dual status (mix of local and linked)
of proxies striking again.

Here, remapping process was considering obdata pointer of proxies as
indirect usage, hence clearing the 'LIB_TAG_EXTERN' of obdata pointer.
That would make savetoblend code not store any 'lib placeholder' for
obdata data-block, which was hence lost on next file read.

Another (probably better) solution here would be to actually consider
obdata of proxies are fully indirect usage, and simply reassign proxies
from their linked object's obdata on file read...

However, that change shall be safer for now, probably good for 2.79 too.

2 years agoAnother optimization of tangent space calculation
Sergey Sharybin [Fri, 25 Aug 2017 12:54:44 +0000 (14:54 +0200)]
Another optimization of tangent space calculation

Don't use quick sort for small arrays, bubble sort works way faster for small
arrays due to cache coherency. This is what qsort() from libc is doing actually.
We can also experiment unrolling some extra small arrays, for example 3 and 4
element arrays.

This reduces tangent space calculation for dragon from 3.1sec to 2.9sec.

2 years agoOptimize tangent space calculation by inlining functions
Sergey Sharybin [Fri, 25 Aug 2017 12:50:04 +0000 (14:50 +0200)]
Optimize tangent space calculation by inlining functions

Brings tangent space calculation from 4.6sec to 3.1sec for dragon model in BI.
Cycles is also somewhat faster, but it has other bottlenecks.

Funny thing, using simple `static inline` already gives a lot of speedup here.
That's just answering question whether it's OK to leave decision on what to
inline up to a compiler..

2 years agoCycles: Add utility function to query current value of scoped timer
Sergey Sharybin [Fri, 25 Aug 2017 12:15:51 +0000 (14:15 +0200)]
Cycles: Add utility function to query current value of scoped timer

2 years agoCycles: Correct logging of sued CPU intrisics
Sergey Sharybin [Fri, 25 Aug 2017 12:11:45 +0000 (14:11 +0200)]
Cycles: Correct logging of sued CPU intrisics

2 years agoCycles: Fix stack overflow during traversal caused by floating overflow
Sergey Sharybin [Fri, 25 Aug 2017 12:00:33 +0000 (14:00 +0200)]
Cycles: Fix stack overflow during traversal caused by floating overflow

Would be nice to be able to catch this with assert as well, will see what would
be the best way to do this/.\

Need to verify with Mai that this solves crash for her and maybe consider
porting this to 2.79.

2 years agoWM: ensure 3D view theme is used in select-loop
Campbell Barton [Fri, 25 Aug 2017 12:10:27 +0000 (22:10 +1000)]
WM: ensure 3D view theme is used in select-loop

Yet another case where theme could be used uninitialized.

2 years agoWM: initialize WM and deps before handling events
Campbell Barton [Fri, 25 Aug 2017 10:26:52 +0000 (20:26 +1000)]
WM: initialize WM and deps before handling events

This avoids obscure bugs where operators could run from
events that happen before the UI and depsgraph have been initialized.

See: D2809 for details.

2 years agoThis copyright text (copied to binary distros) had a confusing statement about
Ton Roosendaal [Fri, 25 Aug 2017 09:11:19 +0000 (11:11 +0200)]
This copyright text (copied to binary distros) had a confusing statement about
scripts being "Artwork" which is your sole property and free to license.

I've removed the reference to scripts in this text.

This was from 2002! With our Python scripts becoming part of how Blender runs,
such scripts now are officially required to be compliant with GNU GPL.

For more information; check the FAQ or consult

2 years agoCorrect error in recent use of PyC_Long_*
Campbell Barton [Thu, 24 Aug 2017 16:09:23 +0000 (02:09 +1000)]
Correct error in recent use of PyC_Long_*

Regression in 46cf33bf0

2 years agoFix error using wrong theme settings w/ depth draw
Campbell Barton [Thu, 24 Aug 2017 13:19:27 +0000 (23:19 +1000)]
Fix error using wrong theme settings w/ depth draw

Clicks events before first draw would assert,
unlikely to cause user visible errors but
would assert in UI_ThemeGetColorPtr.

2 years agoFix T51907: New Depsgraph - Camera constraint is not evaluated properly
Sergey Sharybin [Thu, 24 Aug 2017 12:35:48 +0000 (14:35 +0200)]
Fix T51907: New Depsgraph - Camera constraint is not evaluated properly

This is more a workaround for until we've got proper visibility flush, which
will likely happen in blender2.8 branch.

2 years agoCycles: FIx issue with -0 being considered a non-finite value
Sergey Sharybin [Thu, 24 Aug 2017 12:32:56 +0000 (14:32 +0200)]
Cycles: FIx issue with -0 being considered a non-finite value

2 years agoCycles Bake: Fix overflow when using hundreds of images
Dalai Felinto [Thu, 24 Aug 2017 08:34:50 +0000 (10:34 +0200)]
Cycles Bake: Fix overflow when using hundreds of images

We have a hardcored limit of 1000 images to be baked.
However anything anove 100 would be leading to overflow in the code.

Caught by warning from builder bot (my compiler doesn't even complain
about this, but it should).

2 years agoFix Cycles CUDA transparent shadow error after recent fix in c22b52c.
Brecht Van Lommel [Thu, 24 Aug 2017 01:33:33 +0000 (03:33 +0200)]
Fix Cycles CUDA transparent shadow error after recent fix in c22b52c.

Fishy cat benchmark was rendering with wrong shadows. Cause is unclear,
adding printf or rearranging code seems to avoid this issue, possibly a
compiler bug. This reverts the fix and solves the OSL bug elsewhere.

2 years agoCode cleanup: remove shader context.
Brecht Van Lommel [Tue, 22 Aug 2017 13:00:52 +0000 (15:00 +0200)]
Code cleanup: remove shader context.

This was needed when we accessed OSL closure memory after shader evaluation,
which could get overwritten by another shader evaluation. But all closures
are immediatley converted to ShaderClosure now, so no longer needed.

2 years agoDocs: rename var and comment how it's used
Campbell Barton [Wed, 23 Aug 2017 16:05:11 +0000 (02:05 +1000)]
Docs: rename var and comment how it's used

switch_from_camera wasn't right since it was used for auto-perspective.

2 years agoCorrection to last fix
Campbell Barton [Wed, 23 Aug 2017 15:05:20 +0000 (01:05 +1000)]
Correction to last fix

2 years agoFix T52490: NDOF orbit doesn't lock in ortho view
Campbell Barton [Wed, 23 Aug 2017 14:47:47 +0000 (00:47 +1000)]
Fix T52490: NDOF orbit doesn't lock in ortho view

Regression in af3f7db caused by own fix for T51324

2 years agoFix bplayer (c)
Bastien Montagne [Wed, 23 Aug 2017 14:43:10 +0000 (16:43 +0200)]
Fix bplayer (c)

2 years agoFix T52396: Crash loading template w/o config dir
Campbell Barton [Wed, 23 Aug 2017 12:06:42 +0000 (22:06 +1000)]
Fix T52396: Crash loading template w/o config dir

2 years agoCycles: Add maximum depth stat to bvh builder
Mai Lavelle [Wed, 23 Aug 2017 04:40:35 +0000 (00:40 -0400)]
Cycles: Add maximum depth stat to bvh builder

2 years agoFix implementation of atomic update max and move to a central location
Mai Lavelle [Wed, 23 Aug 2017 04:40:04 +0000 (00:40 -0400)]
Fix implementation of atomic update max and move to a central location

While unlikely to have had any serious effects because of limited use, the
previous implementation was not actually atomic due to a data race and
incorrectly coded CAS loop. We also had duplicates of this code in a few
places, it's now been moved to a single location with all other atomic

2 years agoFix T51805: Overlapping volumes renders incorrect on AMD GPU
Sergey Sharybin [Wed, 23 Aug 2017 10:32:48 +0000 (12:32 +0200)]
Fix T51805: Overlapping volumes renders incorrect on AMD GPU

We need to make sure we can store all volume closures for all objects in volume
stack. This is a bit tricky to detect what would be the "nestness" level of
volumes so for now use maximum possible stack depth. Might cause some slowdown,
but better to give reliable render output than to fail quickly.

Should be safe for 2.79 after extra eyes.

2 years agoCleanup: mark VA_NARGS_COUNT as public
Campbell Barton [Wed, 23 Aug 2017 10:04:26 +0000 (20:04 +1000)]
Cleanup: mark VA_NARGS_COUNT as public

Was already used in two other headers, remove underscore prefix.

2 years agoCleanup: move variadic defines to their own header
Campbell Barton [Wed, 23 Aug 2017 10:00:48 +0000 (20:00 +1000)]
Cleanup: move variadic defines to their own header

So we can use in headers without pulling in many other defines.

2 years agoFix T52218: Missing update when reconnecting node
Sergey Sharybin [Wed, 23 Aug 2017 09:47:47 +0000 (11:47 +0200)]
Fix T52218: Missing update when reconnecting node

If node was connected to output, we tag tree for update no matter where
the node was re-plugged to.

Should be safe for 2.79.

2 years agoRNA: use string-join to simplify operator register
Campbell Barton [Wed, 23 Aug 2017 08:17:42 +0000 (18:17 +1000)]
RNA: use string-join to simplify operator register

Also sanity check macro-operator ID's.

2 years agoBLI_string_utils: string joining utility functions
Campbell Barton [Wed, 23 Aug 2017 08:16:46 +0000 (18:16 +1000)]
BLI_string_utils: string joining utility functions

Includes a version that takes a separator and macros for convenience.

2 years agoPyAPI: avoid instantiating args twice in macro
Campbell Barton [Wed, 23 Aug 2017 08:44:58 +0000 (18:44 +1000)]
PyAPI: avoid instantiating args twice in macro

Would cause problems if args included function calls.

2 years agoCleanup: remove space from filenames
Campbell Barton [Wed, 23 Aug 2017 05:50:44 +0000 (15:50 +1000)]
Cleanup: remove space from filenames

2 years agoTests: fix incorrect check for hidden dir
Campbell Barton [Wed, 23 Aug 2017 05:36:39 +0000 (15:36 +1000)]
Tests: fix incorrect check for hidden dir

Copy-pasted mistake in tests and tools.

2 years agoRNA: report error on struct naming collision
Campbell Barton [Wed, 23 Aug 2017 04:59:14 +0000 (14:59 +1000)]
RNA: report error on struct naming collision

Fixes T52463, error instead of crash.

2 years agoRNA: keep structs_map valid w/ ID duplicate & free
Campbell Barton [Wed, 23 Aug 2017 04:14:55 +0000 (14:14 +1000)]
RNA: keep structs_map valid w/ ID duplicate & free

2 years agoGHash: BLI_ghash_reinsert_key utility function
Campbell Barton [Wed, 23 Aug 2017 02:43:05 +0000 (12:43 +1000)]
GHash: BLI_ghash_reinsert_key utility function

Useful when ghash keys are reallocated.

2 years agoFix T52466: Silence search for button_context menu type.
Thomas Beck [Tue, 22 Aug 2017 19:33:58 +0000 (21:33 +0200)]
Fix T52466: Silence search for button_context menu type.

We were showing "search for unknown menutype WM_MT_button_context" messages in terminal which were not helpful for users, so now they are disabled.

To be backported to 2.79

2 years agoFix error in PointerProperty argument list
Campbell Barton [Tue, 22 Aug 2017 16:14:33 +0000 (02:14 +1000)]
Fix error in PointerProperty argument list

Regression in a7b3047

2 years agoFix T52483: Fill is incorrect for interpolated strokes
Antonio Vazquez [Tue, 22 Aug 2017 15:42:53 +0000 (17:42 +0200)]
Fix T52483: Fill is incorrect for interpolated strokes

The recalc flag must be enabled for new interpolated strokes.

2 years agoFix T52209: New Depsgraph - animated follow curve constraint sometimes freaks out...
Sergey Sharybin [Tue, 22 Aug 2017 14:27:33 +0000 (16:27 +0200)]
Fix T52209: New Depsgraph - animated follow curve constraint sometimes freaks out when the curve has a parent

2 years agoDepsgraph: Cleanup, make code friendlier to be edited in columns
Sergey Sharybin [Tue, 22 Aug 2017 14:24:58 +0000 (16:24 +0200)]
Depsgraph: Cleanup, make code friendlier to be edited in columns

2 years agoDepsgraph: Remove placeholder for path evaluation
Sergey Sharybin [Tue, 22 Aug 2017 14:10:52 +0000 (16:10 +0200)]
Depsgraph: Remove placeholder for path evaluation

Wasn't used in years, if it really needs to be dedicated operation it needs to
be revisited anyway.

2 years agoFix threading conflict when doing Cycles background render
Sergey Sharybin [Tue, 22 Aug 2017 13:50:05 +0000 (15:50 +0200)]
Fix threading conflict when doing Cycles background render

It is possible to have same image used multiple times at different frames,
which means we can not free it's buffers without any guard. From quick tests
this seems to be doing what it is supposed to.

Need more testing and port this to 2.79.

2 years agoFix T52454: Crash in DEG_graph_on_visible_update when activating scene layer
Sergey Sharybin [Tue, 22 Aug 2017 10:52:28 +0000 (12:52 +0200)]
Fix T52454: Crash in DEG_graph_on_visible_update when activating scene layer

Most likely needs in 2.79 final release.

2 years agoPyAPI: replace PyC_FromArray with typed functions
Campbell Barton [Tue, 22 Aug 2017 08:02:58 +0000 (18:02 +1000)]
PyAPI: replace PyC_FromArray with typed functions

This was meant to be generic but introduced possible type errors
and unnecessary complication.
Replace with typed PyC_Tuple_PackArray_* functions.

Also add PyC_Tuple_Pack_* macro which replaces some uses of
Py_BuildValue, with the advantage of not having to parse a string.

2 years agoFix panorama render crash with split kernel, due to incorrect buffer pointer.
Brecht Van Lommel [Mon, 21 Aug 2017 20:50:24 +0000 (22:50 +0200)]
Fix panorama render crash with split kernel, due to incorrect buffer pointer.

Also some refactoring to clarify variable usage scope.

2 years agoCycles: reorganize Performance panel layout, move viewport BVH type to debug.
Brecht Van Lommel [Mon, 21 Aug 2017 13:09:03 +0000 (15:09 +0200)]
Cycles: reorganize Performance panel layout, move viewport BVH type to debug.

2 years agoFix for recent fix in fc890cd, cstdint is c++11 only so don't use it yet.
Brecht Van Lommel [Mon, 21 Aug 2017 17:03:32 +0000 (19:03 +0200)]
Fix for recent fix in fc890cd, cstdint is c++11 only so don't use it yet.