4 years agoCleanup: typo
Campbell Barton [Wed, 8 Jun 2016 12:30:53 +0000 (22:30 +1000)]
Cleanup: typo

4 years agoCleanup: typos
Campbell Barton [Wed, 8 Jun 2016 12:25:23 +0000 (22:25 +1000)]
Cleanup: typos

4 years agoFix edit-mesh draw not disabling stipple
Campbell Barton [Wed, 8 Jun 2016 11:35:02 +0000 (21:35 +1000)]
Fix edit-mesh draw not disabling stipple

Caused problem w/ basic-shader

4 years agoCycles: Fix crash after recent zero scale instance optimization
Sergey Sharybin [Wed, 8 Jun 2016 10:24:57 +0000 (12:24 +0200)]
Cycles: Fix crash after recent zero scale instance optimization

4 years agoBuildobt: Update master config
Sergey Sharybin [Wed, 8 Jun 2016 10:17:03 +0000 (12:17 +0200)]
Buildobt: Update master config

4 years agoBuildbot: Give 2015 builds different name
Sergey Sharybin [Wed, 8 Jun 2016 09:59:39 +0000 (11:59 +0200)]
Buildbot: Give 2015 builds different name

4 years ago3D Text: Use BLI_array_store for undo storage
Campbell Barton [Wed, 8 Jun 2016 09:22:19 +0000 (19:22 +1000)]
3D Text: Use BLI_array_store for undo storage

4 years ago3D Text: Store separate arrays for undo data
Campbell Barton [Wed, 8 Jun 2016 06:57:34 +0000 (16:57 +1000)]
3D Text: Store separate arrays for undo data

Don't store maximum length of text per undo step,
or attempt to pack all data in a single array.

Was storing 32766 characters per undo step, irrespective of actual text length.

4 years ago3D Text: move undo into its own file
Campbell Barton [Wed, 8 Jun 2016 06:38:27 +0000 (16:38 +1000)]
3D Text: move undo into its own file

4 years agoBLI_array_store: move helper functions into their own API
Campbell Barton [Wed, 8 Jun 2016 08:34:01 +0000 (18:34 +1000)]
BLI_array_store: move helper functions into their own API

4 years agoFix cloth stability when in perfect rest shape.
Lukas Tönne [Wed, 8 Jun 2016 08:32:11 +0000 (10:32 +0200)]
Fix cloth stability when in perfect rest shape.

The way cloth is coded, structural springs are only effective when stretched, while bending springs act only when shrunk. However, when cloth is exactly in its rest shape, neither have any effect, and effectively don't exist for the implicit solver.

This creates a stability problem in the initial frames of the simulation, especially considering that gravity seems to act so precisely that it doesn't disturb the strict equality of lengths, so in parts of the cloth this springless state can continue for quite a while.

Here is an example of things going haywire because of this and some suspicious logic in collision code acting together: {F314558}

Changing the condition so that structural springs are active even at exactly rest length fixes this test case. The use of >= is also supported by the original paper that the cloth implementation in blender is based on.

Reviewers: lukastoenne

Reviewed By: lukastoenne

Projects: #bf_blender

Differential Revision:

4 years agoBuildbot: Trickery for MSVC2015 and NVCC
Sergey Sharybin [Wed, 8 Jun 2016 08:31:04 +0000 (10:31 +0200)]
Buildbot: Trickery for MSVC2015 and NVCC

4 years agoCorrect assert
Campbell Barton [Wed, 8 Jun 2016 06:31:40 +0000 (16:31 +1000)]
Correct assert

4 years agoGPU: fix/workaround basic shader font-color
Campbell Barton [Wed, 8 Jun 2016 05:16:50 +0000 (15:16 +1000)]
GPU: fix/workaround basic shader font-color

All text was displaying black.

BLF uses alpha-only textures which aren't supported by the basic-shader,
Workaround this by using texture swizzle so the RGB components of the texture are set to 1.

4 years agoCycles: Fix two numerical issues in the volume code
Lukas Stockner [Wed, 8 Jun 2016 01:17:19 +0000 (03:17 +0200)]
Cycles: Fix two numerical issues in the volume code

This hopefully fixes T48383 by avoiding two numerical problems that I found in the volume code.

Reviewers: sergey, dingto, brecht

Reviewed By: sergey, dingto, brecht

Maniphest Tasks: T48383

Differential Revision:

4 years agoCleanup: Add comment on behavior of tweak events
Julian Eisel [Tue, 7 Jun 2016 21:10:53 +0000 (23:10 +0200)]
Cleanup: Add comment on behavior of tweak events

It's not obvious that they use the mouse coordinate of the initial key-press event (behavior since rBf1f33ba7be2d), so added comment.

Also corrected other comments.

4 years agoFix T48600: VSE strip 'side selection' fails in 'Both' case.
Bastien Montagne [Tue, 7 Jun 2016 20:37:31 +0000 (22:37 +0200)]
Fix T48600: VSE strip 'side selection' fails in 'Both' case.

Looks like a line was forgotten in the 'BOTH' case in code...

4 years agoCleanup - size_t is unsigned, so always >= 0!
Bastien Montagne [Tue, 7 Jun 2016 19:53:17 +0000 (21:53 +0200)]
Cleanup - size_t is unsigned, so always >= 0!

4 years agoGPU: Fix triple buffer w/ basic glsl shader
Campbell Barton [Tue, 7 Jun 2016 19:39:22 +0000 (05:39 +1000)]
GPU: Fix triple buffer w/ basic glsl shader

Needed to add GL_TEXTURE_RECTANGLE support to basic-shader.

4 years agoCuda 7.5 cannot be made to work with a supported cl.exe version in the same way as...
Martijn Berger [Tue, 7 Jun 2016 18:58:53 +0000 (20:58 +0200)]
Cuda 7.5 cannot be made to work with a supported cl.exe version in the same way as cuda 6.0 does allow, disabling cuda kernels on buildbot for now

4 years agoCuda 7.5 cannot be made to work with a supported cl.exe version in the same way as...
Martijn Berger [Tue, 7 Jun 2016 18:56:44 +0000 (20:56 +0200)]
Cuda 7.5 cannot be made to work with a supported cl.exe version in the same way as cuda 6.0 does allow, disabling cuda kernels on buildbot for now

4 years agoGPU: Fix for glDrawPixels drawing w/ glsl shader
Campbell Barton [Tue, 7 Jun 2016 18:03:25 +0000 (04:03 +1000)]
GPU: Fix for glDrawPixels drawing w/ glsl shader

The basic shader needs to be temporarily disabled in this case.
Add macros for temp store/restoring the state.

4 years agoGPU: make using the glsl basic-shader a flag
Campbell Barton [Tue, 7 Jun 2016 17:46:19 +0000 (03:46 +1000)]
GPU: make using the glsl basic-shader a flag

This allows for it to be more easily tested.

4 years agoFix T48589: Compositor Backdrop crashes Blender
Sergey Sharybin [Tue, 7 Jun 2016 14:44:15 +0000 (16:44 +0200)]
Fix T48589: Compositor Backdrop crashes Blender

4 years agoCycles: Limit degenerated triangle check got CUDA only
Sergey Sharybin [Tue, 7 Jun 2016 13:47:39 +0000 (15:47 +0200)]
Cycles: Limit degenerated triangle check got CUDA only

OpenCL seems to work fine here, and for some reason that comparison was
giving compilation error on OpenCL here.

Better to compile OpenCL kernel than to be fully robust to weird corner

4 years agoCycles: Fix regression introduced in c96a4c8
Mai Lavelle [Fri, 3 Jun 2016 00:57:04 +0000 (20:57 -0400)]
Cycles: Fix regression introduced in c96a4c8

A few places still needed to be updated to use the new Mesh::num_triangles()
method; wrong number from triangles.size() was causing crashes.

4 years agoFix (unreported) EditNormal modifier: broken 'flip poly' feature.
Bastien Montagne [Tue, 7 Jun 2016 11:04:05 +0000 (13:04 +0200)]
Fix (unreported) EditNormal modifier: broken 'flip poly' feature.

Newly computed custom normals were forgotten during poly flipping, leading
to wrong custom normals being assigned to wrong loop...

Dead simple, but was tough to track down this one!

4 years agoCleanup: warning
Campbell Barton [Tue, 7 Jun 2016 09:23:43 +0000 (19:23 +1000)]
Cleanup: warning

4 years agoWorld space switch for BI nodes.
Alexander Romanov [Tue, 7 Jun 2016 07:33:32 +0000 (10:33 +0300)]
World space switch for BI nodes.

At the moment light shading in Blender is produced in viewspace. Apparently, that's why
shader nodes work with normals in camera space. But it is not convenient for artists.
The more convenient approach is implemented in Cycles where normals are represented in world space.
Blend4Web Team designed the engine keeping in mind shader parameters readability,
so normals are interpreted in world space as well. And now our users have to use some tweaks, like
empty node group with the name "Replace", which is replacing one input by another on the engine side
(replacing working configuration in Blender Viewport by the configuration that has the same behavior in the engine).

This patch adds the ability to switch to world space for normals and lamp vector in BI and Viewport.
This patch is very important to us and we crave to see this patch in Blender 2.7 because
it will significantly simplify Blend4Web material creation workflow.



Reviewers: campbellbarton, brecht

Reviewed By: brecht

Subscribers: homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov

Differential Revision:

4 years agoreadfile: optimization for undo
Campbell Barton [Tue, 7 Jun 2016 06:07:13 +0000 (16:07 +1000)]
readfile: optimization for undo

Was using O(n^2) lookup on ID's with undo.

This caused undo to hang with 1000's of data-blocks
(especially with heavy scenes & outliner-space, which doesn't even need to be visible to cause a slow-down).

Internally this uses a ghash per id-type, which is lazy-initialized.
Each key uses the name and library since there may be name collisions between libraries.

Developer Notes:

- Adds small `BKE_main_idmap_*` API.
- Needed to change linking order for this to build.

4 years agoBLO_idcode: Move ID_ID last
Campbell Barton [Tue, 7 Jun 2016 06:05:04 +0000 (16:05 +1000)]
BLO_idcode: Move ID_ID last

This lets us use MAX_LIBARRAY to loop over id-codes in Main.

4 years agoreadfile: avoid library lookups for every id on undo
Campbell Barton [Mon, 6 Jun 2016 15:54:59 +0000 (01:54 +1000)]
readfile: avoid library lookups for every id on undo

Instead index libraries, makes minor speedup when using many libraries.

4 years agoCorrect exit-code check
Campbell Barton [Tue, 7 Jun 2016 03:57:50 +0000 (13:57 +1000)]
Correct exit-code check

4 years agoCycles: Use faster ray-quad-intersection test
Lukas Stockner [Mon, 6 Jun 2016 21:38:28 +0000 (23:38 +0200)]
Cycles: Use faster ray-quad-intersection test

The original quad intersection test works by just testing against the two triangles that define the quad.
However, in this case it's actually faster to use the same test that's also used for portals: Determining
the distance to the plane in which the quad lies, calculating the hitpoint and checking whether it's in the
quad by projecting onto the sides.

Reviewers: brecht, sergey, dingto

Reviewed By: dingto

Differential Revision:

4 years agoEditNormal modifier: add some 'maximum angle' limit.
Bastien Montagne [Mon, 6 Jun 2016 19:41:17 +0000 (21:41 +0200)]
EditNormal modifier: add some 'maximum angle' limit.

Allows to avoid generating flipped faces when using extreme normal modifications.

Related to T48576.

4 years agoAdded P key toggle to allow mouse movement to control bevel profile (modal).
Howard Trickey [Mon, 6 Jun 2016 17:15:13 +0000 (13:15 -0400)]
Added P key toggle to allow mouse movement to control bevel profile (modal).

The Shift key can be held while adjusting profile to make finer changes
to the profile (just as it already does when adjusting offset).

4 years agoCleanup: remove unused Library.idblock
Campbell Barton [Mon, 6 Jun 2016 14:34:54 +0000 (00:34 +1000)]
Cleanup: remove unused Library.idblock

4 years agoCleanup: warning
Campbell Barton [Mon, 6 Jun 2016 14:34:03 +0000 (00:34 +1000)]
Cleanup: warning

4 years agoFix T48571: Cycles/GPU - A lot of fireflies on SSS+Volume
Sergey Sharybin [Mon, 6 Jun 2016 13:56:22 +0000 (15:56 +0200)]
Fix T48571: Cycles/GPU - A lot of fireflies on SSS+Volume

Was some accumulated precision error happening.

4 years agoFix T48582: Rigidbody simulation issue with new depsgraph
Sergey Sharybin [Mon, 6 Jun 2016 12:37:15 +0000 (14:37 +0200)]
Fix T48582: Rigidbody simulation issue with new depsgraph

Being granular means we need to re-build depsgraph a bit more often..

The issue was caused by rigidbody requiring some special nodes to
handle physics which were not created with just tagging object for

4 years agoFix compilation error on 32 bit Windows
Sergey Sharybin [Mon, 6 Jun 2016 12:01:19 +0000 (14:01 +0200)]
Fix compilation error on 32 bit Windows

4 years agoFix T48550: Imperfections when Bake displacement map to plane if camera is not in...
Sergey Sharybin [Mon, 6 Jun 2016 11:53:36 +0000 (13:53 +0200)]
Fix T48550: Imperfections when Bake displacement map to plane if camera is not in front

The issue was caused by non-watertight nature of intersection, which is now addressed.

Hopefully it doesn't cause any regression caused by uninitialized precalculated storage.

4 years agoCycles: Fix compilation error on OSX
Sergey Sharybin [Mon, 6 Jun 2016 11:52:57 +0000 (13:52 +0200)]
Cycles: Fix compilation error on OSX

4 years agoDepsgraph: Russian electric tape bodge to have multiple proxies work
Sergey Sharybin [Mon, 6 Jun 2016 10:08:06 +0000 (12:08 +0200)]
Depsgraph: Russian electric tape bodge to have multiple proxies work

Makes behavior of proxy_from backlink working similar to the old dependency graph.

it's nasty, but needed here in the studio to get proxies fixes ASAP.

4 years agoreadfile: add assert to check libmap isn't sorted
Campbell Barton [Mon, 6 Jun 2016 09:09:46 +0000 (19:09 +1000)]
readfile: add assert to check libmap isn't sorted

4 years agoreadfile: minor optimization, no need to count flags
Campbell Barton [Mon, 6 Jun 2016 09:03:09 +0000 (19:03 +1000)]
readfile: minor optimization, no need to count flags

in this case we only need to check if any id's need to be read.

4 years agoCleanup: use const for old member in OldNew struct
Campbell Barton [Mon, 6 Jun 2016 08:03:45 +0000 (18:03 +1000)]
Cleanup: use const for old member in OldNew struct

4 years agoCleanup: rename flag -> tag
Campbell Barton [Mon, 6 Jun 2016 07:55:22 +0000 (17:55 +1000)]
Cleanup: rename flag -> tag

ID's have a flag member too, best avoid confusion here.

4 years agoCycles: Ignore zero size instances in BVH
Sergey Sharybin [Mon, 6 Jun 2016 07:15:34 +0000 (09:15 +0200)]
Cycles: Ignore zero size instances in BVH

In certain types of animation it's possible to have some objects
scaling to zero. In this case we can save render times by avoid
traversing such instances.

Better to do ti ahead of a time, so traversal stays simple.

Reviewers: lukasstockner97, dingto, brecht

Reviewed By: brecht

Differential Revision:

4 years agoCycles: Add support of processor groups
Sergey Sharybin [Fri, 3 Jun 2016 23:29:13 +0000 (01:29 +0200)]
Cycles: Add support of processor groups

Currently for windows only, this is an initial commit towards native
support of NUMA.

Current commit makes it so Cycles will use all logical processors on
Windows running on system with more than 64 threads.

Reviewers: juicyfruit, dingto, lukasstockner97, maiself, brecht

Subscribers: LazyDodo

Differential Revision:

4 years agoRNA: disable animating object dimensions
Campbell Barton [Mon, 6 Jun 2016 02:54:55 +0000 (12:54 +1000)]
RNA: disable animating object dimensions

4 years agoFix T48579: RNA shadows new custom properties
Campbell Barton [Mon, 6 Jun 2016 02:19:58 +0000 (12:19 +1000)]
Fix T48579: RNA shadows new custom properties

4 years agoFix T48580: path / branched path UI grayed out with OpenCL device that is not used.
Brecht Van Lommel [Sat, 4 Jun 2016 21:20:43 +0000 (23:20 +0200)]
Fix T48580: path / branched path UI grayed out with OpenCL device that is not used.

4 years agoFix T48587, constant fold should only be done for Mix Type.
Thomas Dinges [Sat, 4 Jun 2016 19:39:07 +0000 (21:39 +0200)]
Fix T48587, constant fold should only be done for Mix Type.

4 years agobuildbot work around cuda / msvc compatibility issues attempt 2/ passing a string...
Martijn Berger [Sat, 4 Jun 2016 15:41:11 +0000 (17:41 +0200)]
buildbot work around cuda / msvc compatibility issues attempt 2/ passing a string from python to cmake to nvcc is harder then it looks

4 years agobuildbot work around cuda / msvc compatibility issues
Martijn Berger [Sat, 4 Jun 2016 10:36:21 +0000 (12:36 +0200)]
buildbot work around cuda / msvc compatibility issues

4 years agoCMake, minor changes to make Visual studio 2015 use a compatible numpy and
Martijn Berger [Sat, 4 Jun 2016 09:42:48 +0000 (11:42 +0200)]
CMake, minor changes to make Visual studio 2015 use a compatible numpy and
the standard cmake CUDA/NVCC arguments flag allowing 2015 build to use
msvc 2013 for cuda

4 years agoCleanup: avoid temp string edit
Campbell Barton [Sat, 4 Jun 2016 00:51:34 +0000 (10:51 +1000)]
Cleanup: avoid temp string edit

4 years agochanged use_connect from bool to a 3 state value (-1,0,1)
Gaia Clary [Fri, 3 Jun 2016 16:26:12 +0000 (18:26 +0200)]
changed use_connect from bool to a 3 state value (-1,0,1)

4 years agofix T48389 (wip) added warning for loops that define holes (polygons with holes not...
Gaia Clary [Fri, 3 Jun 2016 16:22:56 +0000 (18:22 +0200)]
fix T48389 (wip) added warning for loops that define holes (polygons with holes not supported)

4 years agoWorkaround MSVC error
Campbell Barton [Fri, 3 Jun 2016 15:00:40 +0000 (01:00 +1000)]
Workaround MSVC error

4 years agoFix T48234: Glitch w/ action constraints sharing an action
Campbell Barton [Fri, 3 Jun 2016 14:54:28 +0000 (00:54 +1000)]
Fix T48234: Glitch w/ action constraints sharing an action

FCurve evaluation depended on FCurve.curval, which isn't threadsafe.
Now only use this value for debug display,
and pass the value instead of storing in the FCurve for all but debug-display.

4 years agoFix Playercompile
Jens Verwiebe [Fri, 3 Jun 2016 10:03:53 +0000 (12:03 +0200)]
Fix Playercompile

4 years agoCycles: Mark which CUDA device is used for display
Sergey Sharybin [Fri, 3 Jun 2016 09:52:08 +0000 (11:52 +0200)]
Cycles: Mark which CUDA device is used for display

It is really handy to know which one is display when having two cards of
same type in the machine.

4 years agoMake playback invoked form animation editors more usable
Sergey Sharybin [Fri, 3 Jun 2016 09:46:57 +0000 (11:46 +0200)]
Make playback invoked form animation editors more usable

This covers the following workflow. Animator will disable Update All 3D views
in order to get quick playback in a particular 3D editor. However, it also
handy to see playback in all editors and image editors to see comparison of
animation and reference footage.

So the idea here is to refresh reasonable editors when playback is invoked
from animation editors.

Commit to make Hjalti happy.

4 years agoCycles: Simplify check for degenerated faces on GPU
Sergey Sharybin [Fri, 3 Jun 2016 08:34:21 +0000 (10:34 +0200)]
Cycles: Simplify check for degenerated faces on GPU

Still not sure how to properly solve the issue, needs some trickery to get
actual optimized values from intersection function (using printf() avoids
some optimization and makes stuff render correct).

For the time being let's just simplify check.

4 years agoCleanup & simplify snapping functions
Germano Cavalcante [Fri, 3 Jun 2016 06:54:58 +0000 (16:54 +1000)]
Cleanup & simplify snapping functions

- the name of the enumerator `SNAP_NOT_OBEDIT` was changed to `SNAP_NOT_ACTIVE`.
- the parameter `snap_to_flag` was moved to outside `SnapObjectParams`.
- the member `use_object_edit` was renamed to `use_object_edit_cage`.
- added the arg `params` in `ED_transform_snap_object_project_ray`.
- simplifications in the loop of the function `snapObjectsRay`.

4 years agoFix possible uninitialized variable in snapping
Germano Cavalcante [Fri, 3 Jun 2016 06:26:27 +0000 (16:26 +1000)]
Fix possible uninitialized variable in snapping

Introduced in 0b5a0d84, thanks to Brecht for spotting.

4 years agoFix T48111: Auto-run fails w/ empty paths
Campbell Barton [Fri, 3 Jun 2016 05:28:32 +0000 (15:28 +1000)]
Fix T48111: Auto-run fails w/ empty paths

Enabling auto-run, then excluding a path but leaving it set to a blank value would ignore all paths.

4 years agoFix T48575: Particle crash using 'Parting' setting
Campbell Barton [Fri, 3 Jun 2016 05:11:56 +0000 (15:11 +1000)]
Fix T48575: Particle crash using 'Parting' setting

4 years agoAdd upstream information to wcwidth library
Campbell Barton [Thu, 2 Jun 2016 16:43:04 +0000 (02:43 +1000)]
Add upstream information to wcwidth library

4 years agoTheme: 2.4x, correct graph region color
Campbell Barton [Thu, 2 Jun 2016 15:57:34 +0000 (01:57 +1000)]
Theme: 2.4x, correct graph region color

4 years agoFix T48456: 2x pixel size clamps min brush size
Campbell Barton [Thu, 2 Jun 2016 15:07:29 +0000 (01:07 +1000)]
Fix T48456: 2x pixel size clamps min brush size

Using double pixel size prevented 1px brushes

D2044 by @jeske

4 years agoFix T47637: Multiple multires objects in Sculpt mode make blender crash.
Bastien Montagne [Thu, 2 Jun 2016 13:57:58 +0000 (15:57 +0200)]
Fix T47637: Multiple multires objects in Sculpt mode make blender crash.

That was a nice and funny hunt, albeit rather time consumming!

To summarize, so far code was using a static global gpu_buffer for pbvh vbo drawing
of 'grid' types (multires mostly?).

There were two issues here:
1) Global gpu buffer was assigned to GPU_PBVH_Buffers->index_buf, but then nearly no
check was done when freeing that buffer, to ensure we were not freeing the global one
(not totally sure this one was actually causing any issue, but was bad and unsafe anyway).
Was solved by adding a flag to GPU_PBVH_Buffers to indicate when we are using some
'common' buffer here, which freeing is handled separately.

2) Main issue: if several multires objects in sculpt mode with different grid size
were present simultaneously, the global gpu buffer had to be resized for each object draw
(i.e., freed and re-allocated), but then the pbvh nodes from other objects storing freed reference
to that global buffer had no way to know that it had been freed, which was causing the segfault & crash.
Was solved by getting rid of that global buffer, and instead allocating one 'grid_commmon_gpu_buffer' per pbvh.

Told ya baby, globals are *PURE EVIL*!

4 years agoFix for GLSL uniform being update from inside glBegin/glEnd
Sergey Sharybin [Thu, 2 Jun 2016 12:00:00 +0000 (14:00 +0200)]
Fix for GLSL uniform being update from inside glBegin/glEnd

This seems to be illegal and not productive anyway. Do it ahead of
a time now, which solves shading issues in edit mode and prevents
assert from happening.

4 years agoFix leak using UI_BTYPE_TEXT button w/o a callback
Julian Eisel [Thu, 2 Jun 2016 10:19:56 +0000 (20:19 +1000)]
Fix leak using UI_BTYPE_TEXT button w/o a callback

Moving ownership of the string to the button's 'rename_orig'
leaked when the button didn't have a uiAfterFunc.

4 years agoCleanup: warnings in previous commit
Campbell Barton [Thu, 2 Jun 2016 09:48:16 +0000 (19:48 +1000)]
Cleanup: warnings in previous commit

4 years agoMinor edits to last commit
Campbell Barton [Thu, 2 Jun 2016 08:42:09 +0000 (18:42 +1000)]
Minor edits to last commit

Failed with chunk merging disabled

4 years agoBLI_array_store: Move writing many chunks into a function
Campbell Barton [Thu, 2 Jun 2016 06:58:29 +0000 (16:58 +1000)]
BLI_array_store: Move writing many chunks into a function

Minor optimization, avoid some checks each iteration.

4 years agoBLI_array_store: store max size in BArrayInfo
Campbell Barton [Thu, 2 Jun 2016 08:01:03 +0000 (18:01 +1000)]
BLI_array_store: store max size in BArrayInfo

4 years agoAdd extra validation checks to array-store
Campbell Barton [Thu, 2 Jun 2016 06:41:41 +0000 (16:41 +1000)]
Add extra validation checks to array-store

4 years agoMinor changes to help text
Campbell Barton [Thu, 2 Jun 2016 05:22:33 +0000 (15:22 +1000)]
Minor changes to help text

D2040 by @Blendify, also move 'Experimental Features' above more general help text.

4 years agoShapeKey was missing lattice-flag
Campbell Barton [Thu, 2 Jun 2016 05:12:29 +0000 (15:12 +1000)]
ShapeKey was missing lattice-flag

missed from 7a8bd2eae

4 years agoFix T48566: Render-border minor offset issue
Campbell Barton [Thu, 2 Jun 2016 02:51:36 +0000 (12:51 +1000)]
Fix T48566: Render-border minor offset issue

4 years agoUsual UI/i18n message cleanup (get rid of last remaining 'addon' too).
Bastien Montagne [Wed, 1 Jun 2016 18:38:30 +0000 (20:38 +0200)]
Usual UI/i18n message cleanup (get rid of last remaining 'addon' too).

4 years agoRevert "BLI_ghash: Fix initial over-allocation of mempool chunks."
Bastien Montagne [Wed, 1 Jun 2016 15:38:50 +0000 (17:38 +0200)]
Revert "BLI_ghash: Fix initial over-allocation of mempool chunks."

Useless change in fact, sorry for the noise.

This reverts commit b08473680e141ab6f28f99fc3b1dbbc4add89bed.

4 years agoFix T48466: Multiple passes starting with 'Diffuse' in EXR file breaks its loading...
Bastien Montagne [Wed, 1 Jun 2016 15:25:05 +0000 (17:25 +0200)]
Fix T48466: Multiple passes starting with 'Diffuse' in EXR file breaks its loading in Blender.

Issue here is that for Blender, any pass which name starts with 'Diffuse' is considered
a diffuse pass - and it does not really support several passes of the same type in renderresult.

So for now, passtype_from_name() is now checking whether a pass of same type already exists
in render layers, and return 0 (uknown passtype) in this case.

4 years agoOptimize mempool iteration
Campbell Barton [Wed, 1 Jun 2016 14:04:51 +0000 (00:04 +1000)]
Optimize mempool iteration

Around ~10% improvement in own tests.

4 years agoFix T48415: Segfault on opening .blend in which a 'surface' force object was saved...
Bastien Montagne [Wed, 1 Jun 2016 13:26:58 +0000 (15:26 +0200)]
Fix T48415: Segfault on opening .blend in which a 'surface' force object was saved in Edit mode.

In that case, surface modifier won't run (until surface object goes back to Object mode),
and its bvhtree remains NULL.

4 years agoRevert "Correct invalid pointer-pair compare check"
Campbell Barton [Wed, 1 Jun 2016 13:07:52 +0000 (23:07 +1000)]
Revert "Correct invalid pointer-pair compare check"

This reverts commit d5e0e681cea846facb4f2777921f6612be3ee193.

Tsk, these functions return false on a match.

4 years agoFix bug where corner boundary was straight when it should curve.
Howard Trickey [Wed, 1 Jun 2016 12:51:08 +0000 (08:51 -0400)]
Fix bug where corner boundary was straight when it should curve.

Some adjustments to how bevel edge 'profiles' are adjusted in some
cases. For the bug fix, wanted to handle cases of middle of three
coplanar beveled cases to make profile curve rather than linear
Also undid an earlier decision to make profile plane be perpendicular
to beveled edge i the non-coplanar case.

4 years agoBLI_ghash: Fix initial over-allocation of mempool chunks.
Bastien Montagne [Wed, 1 Jun 2016 10:58:59 +0000 (12:58 +0200)]
BLI_ghash: Fix initial over-allocation of mempool chunks.

Code intended to create only one pool by default here, but code in `mempool_maxchunks()` would make it two.

4 years agoFix wrong vertex colors in edit mode
Sergey Sharybin [Wed, 1 Jun 2016 09:52:31 +0000 (11:52 +0200)]
Fix wrong vertex colors in edit mode

4 years agoBI: fix counting of tangents, that was reset during recursion of init_render_nodetree
Alexander Romanov [Wed, 1 Jun 2016 09:28:48 +0000 (12:28 +0300)]
BI: fix counting of tangents, that was reset during recursion of init_render_nodetree

4 years agoGLSL: Attempt to fix errors in setting UV attributes
Sergey Sharybin [Wed, 1 Jun 2016 08:26:18 +0000 (10:26 +0200)]
GLSL: Attempt to fix errors in setting UV attributes

4 years agoDepsgraph: Fix missing updates when modifying armature
Sergey Sharybin [Wed, 1 Jun 2016 08:10:39 +0000 (10:10 +0200)]
Depsgraph: Fix missing updates when modifying armature

4 years agoFix/Workaround T48560: Color picker V fail w/ user defined RNA
Campbell Barton [Wed, 1 Jun 2016 06:07:11 +0000 (16:07 +1000)]
Fix/Workaround T48560: Color picker V fail w/ user defined RNA

Set the maximum soft-max to 1.0 when its left at FLT_MAX.
Since this causes problems using the slider.

4 years agoIncrease range of Font object textboxs
Dalai Felinto [Tue, 31 May 2016 22:06:13 +0000 (19:06 -0300)]
Increase range of Font object textboxs

The current values were arbitrary. I'm keeping them as ui_range, but
internally there is no reason we can't use larger values.

4 years agoBLI_mempool: Use an 'odd' FREEWORD for big/little endian
Campbell Barton [Tue, 31 May 2016 16:52:05 +0000 (02:52 +1000)]
BLI_mempool: Use an 'odd' FREEWORD for big/little endian

This also changes freeword to an intptr_t to ensure
not only the first 4 bits of a pointer are tested on 64bit systems.

4 years agoFix T46207: Slow OpenCL GPU bake and blown out baking Cycles render
Sergey Sharybin [Tue, 31 May 2016 15:47:54 +0000 (17:47 +0200)]
Fix T46207: Slow OpenCL GPU bake and blown out baking Cycles render