6 years agoDoc: update Python 'gpu' module reference
Campbell Barton [Mon, 7 Sep 2015 06:02:46 +0000 (16:02 +1000)]
Doc: update Python 'gpu' module reference

- add missing uniforms.
- add uniform types.
- link to RNA equivalent.
- remove 'value' from uniforms (they were wrong, better use module members anyway).
- various corrections & edits.

Fixes T45505

6 years agoCleanup: gpu constants weren't so clearly arranged
Campbell Barton [Mon, 7 Sep 2015 06:01:25 +0000 (16:01 +1000)]
Cleanup: gpu constants weren't so clearly arranged

Also reminder to update docs w/ the API.

6 years agoFix viewport camera dof object distance
Campbell Barton [Sun, 6 Sep 2015 16:32:34 +0000 (02:32 +1000)]
Fix viewport camera dof object distance

Also use simpler method to calculate the depth.

6 years agoAdd icon for incremental grid snapping
Julian Eisel [Sat, 5 Sep 2015 21:02:54 +0000 (23:02 +0200)]
Add icon for incremental grid snapping

As decided in D910, we use a new icon for incremental grid snapping and use its old one for absolute grid snapping.

This also touches the library_data_broken icon .dat files, seems some changes on its .svg entry landed in upstream without updating the other icon files (already noticed this when committing icon for auto-offset, but removed it from commit - leaving it in now to avoid further confusion)

Icon by @plyczkowski (made a tiny edit as it looked a bit blurry in 16x16). Thx!

6 years agoFix T45944: Ctrl+Wheel to cycle values failes in toolshelf
Julian Eisel [Sat, 5 Sep 2015 17:28:24 +0000 (19:28 +0200)]
Fix T45944: Ctrl+Wheel to cycle values failes in toolshelf

Now, ctrl+wheel for cycling tabs is passed to hovered button if it supports cycling values (RNA menus, color/row/number/slider buttons, list boxes)

This might feel a bit glitchy if ctrl+wheel is used to cycle tabs and in newly opened tab, a button with cycling support is under the mouse, which will get mouse input from this point on instead of region. Think this is still better than old behavior.

6 years agoDepsgraph: Don't use legacy function when building without legacy depsgraph
Sergey Sharybin [Sat, 5 Sep 2015 12:51:58 +0000 (17:51 +0500)]
Depsgraph: Don't use legacy function when building without legacy depsgraph

6 years agoFix T45938: Ocean modifier animation not working with NLA action-strip (old depsgraph...
Joshua Leung [Sat, 5 Sep 2015 12:05:46 +0000 (00:05 +1200)]
Fix T45938: Ocean modifier animation not working with NLA action-strip (old depsgraph only)

When a modifier was animated by a NLA strip, this animation was not working when using
the old depsgraph. This was because the code which checks if a NLA strip affects any
modifiers was missing - specifically, it was originally left out as it was thought
that it was unlikely that many users would need this, but adding in those checks
would have a (slight) negative effect files where there are heaps of NLA strips
but modifiers animated this way were absent.

The new depsgraph however doesn't suffer from this problem, as these sorts of checks
need ot be built into the graph-building stage for everything to work, so these links
had already been added.

6 years agoMath Lib: isect_plane_*_v3 avoid negation
Campbell Barton [Sat, 5 Sep 2015 07:42:31 +0000 (17:42 +1000)]
Math Lib: isect_plane_*_v3 avoid negation

Unmeasurable speedup for plane intersection.

6 years agoMath Lib: simplify isect_plane_plane_v3
Campbell Barton [Sat, 5 Sep 2015 07:06:12 +0000 (17:06 +1000)]
Math Lib: simplify isect_plane_plane_v3

Unlike the 3 plane method, the 2 planes squared cross-product _is_ the determinant.

6 years agoFix T46015: normals_split_custom_set_from_vertices doesn't work with zero vectors
Bastien Montagne [Fri, 4 Sep 2015 20:41:10 +0000 (22:41 +0200)]
Fix T46015: normals_split_custom_set_from_vertices doesn't work with zero vectors

This was simply broken for vertex case (indexing loop normals with vert indices...).

Turns out to be rather verbose to replace on-the-fly zero normals by default ones correctly,
and do not want to make a full copy of the given custom normals array, so now this one is
editied in place (replacing zero vectors by correct default normals). Don't think this
could be a serious issue anyway.

6 years agoCycles: Fix for wrong optimization of bump node
Sergey Sharybin [Fri, 4 Sep 2015 15:03:45 +0000 (20:03 +0500)]
Cycles: Fix for wrong optimization of bump node

It can't be simply removed in cases when it's connected to input which is
different from Normal. This is because the input wouldn't be connected to
default Normal geometry input, possibly breaking shading setup.

The fix is not really ideal, but should work at least.

This fixes skin having too much glossy reflection in the file from T46013.

6 years agoCycles: Fix wrong check for zero-sized triangles
Sergey Sharybin [Fri, 4 Sep 2015 13:33:50 +0000 (18:33 +0500)]
Cycles: Fix wrong check for zero-sized triangles

Initial idea was to optimize calculation a bit by skipping calculation of actual
triangle edges and use vector from ray origin to triangles. In practice this
optimization didn't quite work in cases when origin point is too close to the

Let's do 2.76 with a bit more complicated calculation, still looking into exact
reasons why watertight intersections fails in certain cases, but actual fix might
bit be ready so soon.

This fixes wrong eyes on the lady from T46013.

6 years agoFix T46010: Bone offset between Rest Pose and Edit mode.
Bastien Montagne [Fri, 4 Sep 2015 14:38:24 +0000 (16:38 +0200)]
Fix T46010: Bone offset between Rest Pose and Edit mode.

That one was hairy... To summarize:
* We were setting Bone.head/tail (aka **local** rest location of bone) from EditBone data, using **EditBone's parent computed armature space**.
* We use those local head/tail to define Bone's restpose (in `BKE_armature_where_is_bone()`), using **Bone's parent armature space** (aka parent's arm_mat).
* Because of bone's roll nightmare, the two above parent's matrices will often not be the same.
  In an ideal world, this should not affect locations (head/tail), but in real world of float it does - noticeably, in some extreme cases.

So! This commit cleans up things a bit (`fix_bonelist_roll()` was already doing much more than just fixing roll mess, has been renamed
to `armature_finalize_restpose()`), and ensures we do use (final!) parent's arm_mat local space to compute children's local head/tail as well.
This allows us to avoid too much imprecision here.

Checked the patch also with a complete Victor's rig from Gooseberry, seems to have no nasty side effects - fingers crossed!

6 years agoCleanup: Better to assert over bad condition (which shall never happen anyway), than...
Bastien Montagne [Fri, 4 Sep 2015 10:35:43 +0000 (12:35 +0200)]
Cleanup: Better to assert over bad condition (which shall never happen anyway), than just return with un-initialized mat...

6 years agoFix for isect_tri_tri_epsilon_v3 w/ small faces
Campbell Barton [Fri, 4 Sep 2015 12:25:28 +0000 (22:25 +1000)]
Fix for isect_tri_tri_epsilon_v3 w/ small faces

tris with ~1e-05 edge lengths would fail

6 years agoMath Lib: Use plane intersect from graphics-gems
Campbell Barton [Fri, 4 Sep 2015 12:04:54 +0000 (22:04 +1000)]
Math Lib: Use plane intersect from graphics-gems

6 years agoMath Lib: avoid sqrt w/ triangle intersection
Campbell Barton [Fri, 4 Sep 2015 07:02:51 +0000 (17:02 +1000)]
Math Lib: avoid sqrt w/ triangle intersection

6 years agoCorrect own error in line_point_factor
Campbell Barton [Fri, 4 Sep 2015 06:48:25 +0000 (16:48 +1000)]
Correct own error in line_point_factor

Passing zero epsilon allowed divide by zero.

6 years agoArmature: Cheap edit-to-object mode speedup.
Bastien Montagne [Fri, 4 Sep 2015 10:12:49 +0000 (12:12 +0200)]
Armature: Cheap edit-to-object mode speedup.

`fix_bonelist_roll()` is already recursive, and was calling recursive `BKE_armature_where_is_bone()` twice!

Changed `BKE_armature_where_is_bone()` to controll whether we recurse over children or not.

With full Victor's rig, we gain 16% in `ED_armature_from_edit()` (from 31ms to 26ms).
With a dummy test-case 100 bones chain, we gain 80% in `ED_armature_from_edit()` (from 1.25ms to 0.25ms).

Not crucial, but still worth it. ;)

6 years agoFix T45019: Cycles wrong render of motion blur mesh
Sergey Sharybin [Fri, 4 Sep 2015 10:19:22 +0000 (15:19 +0500)]
Fix T45019: Cycles wrong render of motion blur mesh

The issue was caused by wrong detection whether number of verticies
changed or not. Basically, it wasn't working correct in cases when
number of verticies is increasing compared to the current frame.

6 years agoPartial revert of warning cleanup
Campbell Barton [Fri, 4 Sep 2015 04:24:22 +0000 (14:24 +1000)]
Partial revert of warning cleanup

These warnings are false-positives

6 years agoQuiet warnings
Julian Eisel [Thu, 3 Sep 2015 23:04:37 +0000 (01:04 +0200)]
Quiet warnings

We had too many warnings lately... was awaiting that someone would kill them - didn't happen -> goes to my commit ratio! :P

6 years agoView-Selected: use custom bones boundbox
Campbell Barton [Thu, 3 Sep 2015 18:18:49 +0000 (04:18 +1000)]
View-Selected: use custom bones boundbox

Support using custom pose-bone transform and object when calculating view bounds.

6 years agoSmall tri intersect fails when not normalized
Campbell Barton [Thu, 3 Sep 2015 15:56:51 +0000 (01:56 +1000)]
Small tri intersect fails when not normalized

Logic was ok, but would run into precision issues.

6 years agoCleanup: minor RST edits
Campbell Barton [Thu, 3 Sep 2015 15:11:26 +0000 (01:11 +1000)]
Cleanup: minor RST edits

6 years agoCheck for no-op edge separates to quiet asserts when inset individual.
Howard Trickey [Thu, 3 Sep 2015 14:37:42 +0000 (10:37 -0400)]
Check for no-op edge separates to quiet asserts when inset individual.

This causes no change in behavior, since code was alreadying doing
a no-op in bmesh_edge_separate if the edge is a boundary.
But it tripped an assert, annoying in debug builds.
We want to leave assert in bmesh_edge_separate in case callers
expect there to be separate loops after this always.
So putting test in caller.
(Same worry about bmesh_urmv_loop? I checked callers and they
appear OK to me - they deal with the no-op return.)

6 years agoFix T45937: Cycles hair not rendered if children count set to zero
Sergey Sharybin [Thu, 3 Sep 2015 13:54:50 +0000 (18:54 +0500)]
Fix T45937: Cycles hair not rendered if children count set to zero

6 years agoCycles: Fix missing packed images with newer versions of OSL
Sergey Sharybin [Thu, 3 Sep 2015 12:46:18 +0000 (17:46 +0500)]
Cycles: Fix missing packed images with newer versions of OSL

This isn't really complete fix, complete fix would require calculating
derivatives via OIIO API, but supporting this will either end up with
some code duplication or will require some non really safe changes at
this release cycle.

6 years agoFix T45946: Cycles texture interpolation bug
Sergey Sharybin [Thu, 3 Sep 2015 12:14:35 +0000 (17:14 +0500)]
Fix T45946: Cycles texture interpolation bug

Coordinate clamping was done in the wrong order.

6 years agoBGE docs: resolution & fullscreen changes don't work in the embedded player
Sybren A. Stüvel [Thu, 3 Sep 2015 13:05:36 +0000 (15:05 +0200)]
BGE docs: resolution & fullscreen changes don't work in the embedded player

The documentation for bge.render.{setWindowSize,setFullScreen,getFullScreen}
did not mention that those functions are no-ops when using the Blender-
embedded player.

6 years agoPyAPI: tweak to ensure_ext don't lower entire path
Campbell Barton [Thu, 3 Sep 2015 11:58:11 +0000 (21:58 +1000)]
PyAPI: tweak to ensure_ext don't lower entire path

6 years agoFix: Made bpy.path.ensure_ext compatible with compound extensions.
Sybren A. Stüvel [Thu, 3 Sep 2015 11:09:16 +0000 (13:09 +0200)]
Fix: Made bpy.path.ensure_ext compatible with compound extensions.

Extensions such as ".tar.gz" are now also supported. Before this patch,
ensure_ext('demo.tar.gz', '.tar.gz') would return 'demo.tar.tar.gz'.

This results in issues with the `ExportHelper` mix-in class; clicking
an existing file in the file dialogue warns about overwriting it
(highlighting the input box in red), but then saves to a different

Also added a unit test for the new behaviour.

Reviewers: mont29, campbellbarton

Reviewed By: campbellbarton

Differential Revision:

6 years agoFix T45984: Setting custom normals properly requires multiple calls to normals_split_...
Bastien Montagne [Thu, 3 Sep 2015 10:20:50 +0000 (12:20 +0200)]
Fix T45984: Setting custom normals properly requires multiple calls to normals_split_custom_set()

The detection of needed sharp edges (based on given loop normals) would not fully work
on first run in case we started with a complete smooth cyclic loop fan (edge between
first and last loop of the fan would not get checked).

6 years agoCycles: Fix nondeterministic pass ordering when using baker
Sergey Sharybin [Thu, 3 Sep 2015 08:52:56 +0000 (13:52 +0500)]
Cycles: Fix nondeterministic pass ordering when using baker

6 years agoCycles: Fix for uninitialized closure data
Sergey Sharybin [Thu, 3 Sep 2015 08:48:43 +0000 (13:48 +0500)]
Cycles: Fix for uninitialized closure data

This might confuse closure merger.

Spotted by Campbell Barton, thanks!

6 years agoImBuf: Fix crash generating preview for really huge image
Sergey Sharybin [Thu, 3 Sep 2015 07:48:17 +0000 (12:48 +0500)]
ImBuf: Fix crash generating preview for really huge image

In fact, any user of IMB_scalefastImBuf() is now robust against working
with really hires images.

6 years agoCompositor: Support changing distortion models in movie distortion node
Sergey Sharybin [Thu, 3 Sep 2015 07:10:19 +0000 (12:10 +0500)]
Compositor: Support changing distortion models in movie distortion node

Previously only polynomial model worked correct. now changing it to divisions
will work nicely as well.

6 years agoFix T45959: DistanceKey preview used wrong colors
Campbell Barton [Thu, 3 Sep 2015 02:23:23 +0000 (12:23 +1000)]
Fix T45959: DistanceKey preview used wrong colors

Same issue as recent fix in ChannelMatte

6 years agoAnimplayer passed -a, then warned its unknown
Campbell Barton [Wed, 2 Sep 2015 18:25:00 +0000 (04:25 +1000)]
Animplayer passed -a, then warned its unknown

Also modify a copy of argv

6 years agoFix T45979: animplayer crashes w/ DND and audio
Campbell Barton [Wed, 2 Sep 2015 18:12:03 +0000 (04:12 +1000)]
Fix T45979: animplayer crashes w/ DND and audio

Issues re-initializing audaspace

6 years agoFix second part of T45987: Node preview was still using wrong color space
Sergey Sharybin [Wed, 2 Sep 2015 17:45:39 +0000 (22:45 +0500)]
Fix second part of T45987: Node preview was still using wrong color space

6 years agoFix T45995: Auto-set preview range sets superfluous end key.
Bastien Montagne [Wed, 2 Sep 2015 15:48:05 +0000 (17:48 +0200)]
Fix T45995: Auto-set preview range sets superfluous end key.

get_keyframe_extents() would add an extra frame in case of mono-key fcurves in selected set...

Now do the 'not same start/end frames' check later, and also use floor/ceil instead of round
(we want to start at frame 3 if first key is at frame 3.8, reversed-same goes for end frame).

6 years agoCMake: use generator expressions
Campbell Barton [Wed, 2 Sep 2015 15:11:38 +0000 (01:11 +1000)]
CMake: use generator expressions

6 years agoCMake: Fix building w/o FindGit
Campbell Barton [Wed, 2 Sep 2015 14:41:07 +0000 (00:41 +1000)]
CMake: Fix building w/o FindGit

6 years agoAdd missing spin-lock to IMB_makeSingleUser
Campbell Barton [Wed, 2 Sep 2015 13:23:44 +0000 (23:23 +1000)]
Add missing spin-lock to IMB_makeSingleUser

6 years agoFix T45991: Transfer Weight tool UI is inconsistent and crashes blender.
Bastien Montagne [Wed, 2 Sep 2015 11:02:06 +0000 (13:02 +0200)]
Fix T45991: Transfer Weight tool UI is inconsistent and crashes blender.

Since data transfer when called from this tool has reversed behavior (it transfers **towards**
active object, as previous tool), we have to also reverse source/destination layers selection options.

Also fix 'reverse' option being saved, otherwise calling regular operator after 'transfer weights'
would stay in reverse mode, ugly!

6 years agoCleanup: style
Campbell Barton [Wed, 2 Sep 2015 08:39:19 +0000 (18:39 +1000)]
Cleanup: style

6 years agob5287b1 removed important CCG_key_top_level call
Campbell Barton [Wed, 2 Sep 2015 05:39:17 +0000 (15:39 +1000)]
b5287b1 removed important CCG_key_top_level call

Caused subsurf to crash w/o OSD

6 years agoEnable guarded-alloc when --debug-all is passed
Campbell Barton [Wed, 2 Sep 2015 03:39:55 +0000 (13:39 +1000)]
Enable guarded-alloc when --debug-all is passed

6 years agoCorrect help message for debug options
Campbell Barton [Wed, 2 Sep 2015 03:38:55 +0000 (13:38 +1000)]
Correct help message for debug options

6 years agoFix snapping edit-gpencil to edit-mesh
Campbell Barton [Wed, 2 Sep 2015 01:22:28 +0000 (11:22 +1000)]
Fix snapping edit-gpencil to edit-mesh

Reported in T45978

Was checking mesh selection state.

6 years agoFix T45931: Blender Fails to generate previews.
Bastien Montagne [Tue, 1 Sep 2015 15:45:16 +0000 (17:45 +0200)]
Fix T45931: Blender Fails to generate previews.

Root of the issue was, preview generator was filling ID preview with unsigned int,
when RNA only knows of signed integers (and thus generates a python exception
when converting uint outside of int range)...

Using the brand new and much simple float pixels accessor to PreviewImage now.

Why this was working perfectly OK (it seems...) under Linux, and why error (py exception)
was so badly and misleadingly reported on Windows, remains pitch black mystery to me.

6 years agoRNA PreviewImage: add float pixels accessors.
Bastien Montagne [Tue, 1 Sep 2015 15:42:12 +0000 (17:42 +0200)]
RNA PreviewImage: add float pixels accessors.

Raw int pixels can be nice in some cases (much less memory used), but converting to/from float values
(as e.g. expected by/from Image) is not simple in py, error prone and rather slow.

6 years agoAvoid reupdating pbvh data in upload functions, these should have been
Antony Riakiotakis [Tue, 1 Sep 2015 16:56:23 +0000 (19:56 +0300)]
Avoid reupdating pbvh data in upload functions, these should have been
taken care of in draw functions.

Those iterate the whole PBVH tree so better avoid doing them, twice or

6 years agoFix T45978: Ruler ignores new edit-mesh data
Campbell Barton [Tue, 1 Sep 2015 16:28:16 +0000 (02:28 +1000)]
Fix T45978: Ruler ignores new edit-mesh data

6 years agoFix T45974: Bones fail to snap to verts
Campbell Barton [Tue, 1 Sep 2015 15:34:03 +0000 (01:34 +1000)]
Fix T45974: Bones fail to snap to verts

Was an issue with individual-origins + snap

6 years agoFix uninitialized normal var w/ objects snapping
Campbell Barton [Tue, 1 Sep 2015 15:25:13 +0000 (01:25 +1000)]
Fix uninitialized normal var w/ objects snapping

6 years agoAssert vec_roll_to_mat3_normalized's gets a normalized vector
Campbell Barton [Tue, 1 Sep 2015 14:43:53 +0000 (00:43 +1000)]
Assert vec_roll_to_mat3_normalized's gets a normalized vector

6 years agoFix projection painting normal culling operating on individual
Antony Riakiotakis [Tue, 1 Sep 2015 12:59:48 +0000 (15:59 +0300)]
Fix projection painting normal culling operating on individual

This made the normal-related artifacts of projection painting much more
apparent. Now we do culling based on
whole polygons. Pure backface culling still uses individual

6 years agoDon't use GCC-only pragma for all compilers
Sergey Sharybin [Tue, 1 Sep 2015 12:39:43 +0000 (17:39 +0500)]
Don't use GCC-only pragma for all compilers

6 years agoFix T45976: Crash accessing BMesh customdata
Campbell Barton [Tue, 1 Sep 2015 09:57:48 +0000 (19:57 +1000)]
Fix T45976: Crash accessing BMesh customdata

Layers returned from items() and values() could have an invalid index.

6 years agoDepsgraph: Fix compilation error with legacy depsgraph disabled
Sergey Sharybin [Tue, 1 Sep 2015 09:47:39 +0000 (14:47 +0500)]
Depsgraph: Fix compilation error with legacy depsgraph disabled

Reported by Campbell on IRC, partial patch by him as well.

6 years agoFix T45825: Macro redo disable options incorrectly
Campbell Barton [Tue, 1 Sep 2015 08:41:37 +0000 (18:41 +1000)]
Fix T45825: Macro redo disable options incorrectly

A non repeatable operator would disable editing options for all operators after it.

6 years agoFix T45939: Crash w/ BMesh.*.sort()
Campbell Barton [Tue, 1 Sep 2015 05:39:52 +0000 (15:39 +1000)]
Fix T45939: Crash w/ BMesh.*.sort()

6 years agoBMesh: add asserts for BMesh sort ghash lookups
Campbell Barton [Tue, 1 Sep 2015 05:06:07 +0000 (15:06 +1000)]
BMesh: add asserts for BMesh sort ghash lookups

6 years agoCleanup: redundant cast
Campbell Barton [Tue, 1 Sep 2015 05:01:00 +0000 (15:01 +1000)]
Cleanup: redundant cast

6 years agoUse qsort_r for BMesh Py API
Campbell Barton [Tue, 1 Sep 2015 03:56:08 +0000 (13:56 +1000)]
Use qsort_r for BMesh Py API

6 years agoCleanup: pep8
Campbell Barton [Mon, 31 Aug 2015 17:51:50 +0000 (03:51 +1000)]
Cleanup: pep8

6 years agoTrade-marked BPlayer Fix (c)
Bastien Montagne [Mon, 31 Aug 2015 20:03:51 +0000 (22:03 +0200)]
Trade-marked BPlayer Fix (c)

6 years agoFix T45258, impossible to select brush when removing it from 2d
Antony Riakiotakis [Mon, 31 Aug 2015 18:37:38 +0000 (21:37 +0300)]
Fix T45258, impossible to select brush when removing it from 2d

Also system added a brush every time it found no paint brush in the
system which is not what we would want.

* Brush panel stays visible always, regardless of whether there is a
brush or not.
* We search for first available brush when we find no brush in paint
struct instead of always generating a new one.
* Generating and searching for a brush take a mode argument now. Needed
some refactoring to users of BKE_paint_init as well.
* Did some style cleanups for paint mode enums.

Patch is big but it's mostly argument refactoring.

6 years agoerror in last commit
Campbell Barton [Mon, 31 Aug 2015 17:02:14 +0000 (03:02 +1000)]
error in last commit

6 years agoFix T45954: Inset w/ interpolated vertex color
Campbell Barton [Mon, 31 Aug 2015 16:48:28 +0000 (02:48 +1000)]
Fix T45954: Inset w/ interpolated vertex color

Accumulating ubyte color was overflowing.

Thanks to @mont29 for suggested fix.

6 years agoCycles: Make the max value for World MIS Map Resolution a power of two.
Thomas Dinges [Mon, 31 Aug 2015 16:17:16 +0000 (18:17 +0200)]
Cycles: Make the max value for World MIS Map Resolution a power of two.

Old value likely was a copy / paste error.

6 years agoCleanup: Fix some typos in volume code comments.
Thomas Dinges [Mon, 31 Aug 2015 16:08:55 +0000 (18:08 +0200)]
Cleanup: Fix some typos in volume code comments.

6 years agoWrite thumbnail directly
Campbell Barton [Mon, 31 Aug 2015 15:52:27 +0000 (01:52 +1000)]
Write thumbnail directly

BlendThumbnail matches the on-disk format, so just write directly.

6 years agoFix T45955: Python's pdb can't show script source
Campbell Barton [Mon, 31 Aug 2015 13:41:13 +0000 (23:41 +1000)]
Fix T45955: Python's pdb can't show script source

6 years agoRevert fix for T45849 (part 2, tsk!)
Campbell Barton [Mon, 31 Aug 2015 12:45:04 +0000 (22:45 +1000)]
Revert fix for T45849 (part 2, tsk!)

6 years agoerror in comments
Campbell Barton [Mon, 31 Aug 2015 12:24:34 +0000 (22:24 +1000)]
error in comments

6 years agoAlternate fix for T45849: tri-tri intersect error
Campbell Barton [Mon, 31 Aug 2015 12:15:27 +0000 (22:15 +1000)]
Alternate fix for T45849: tri-tri intersect error

Project both triangles onto the same plane to simplify calculations.

6 years agoRevert fix for T45849, alternate fix coming up
Campbell Barton [Mon, 31 Aug 2015 12:12:19 +0000 (22:12 +1000)]
Revert fix for T45849, alternate fix coming up

epsilon check here didn't account for scale, causing T45919

6 years agoMath Lib: Add closest_to_plane helper functions
Campbell Barton [Mon, 31 Aug 2015 10:05:49 +0000 (20:05 +1000)]
Math Lib: Add closest_to_plane helper functions

- closest_to_plane3 (for float3 planes)
- closest_to_plane*_normalized_v3 (for unit length planes)

Use when the plane is known to be unit length

6 years agoFix T45959: DistanceKey output incorrect
Campbell Barton [Mon, 31 Aug 2015 06:20:21 +0000 (16:20 +1000)]
Fix T45959: DistanceKey output incorrect

6 years agoFix uninitialized vars in DistanceKey node
Campbell Barton [Mon, 31 Aug 2015 06:12:14 +0000 (16:12 +1000)]
Fix uninitialized vars in DistanceKey node

6 years agoFix incorrect cast
Campbell Barton [Mon, 31 Aug 2015 03:47:32 +0000 (13:47 +1000)]
Fix incorrect cast

6 years agoCycles: Avoid copying objects in some places of BVH build
Sergey Sharybin [Sun, 30 Aug 2015 14:47:45 +0000 (16:47 +0200)]
Cycles: Avoid copying objects in some places of BVH build

Gives barely measurable speedup of Spatial Split BVH build.

6 years agoPreview generation module: explicitly exclude any lib item.
Bastien Montagne [Sun, 30 Aug 2015 13:48:40 +0000 (15:48 +0200)]
Preview generation module: explicitly exclude any lib item.

Thanks to campbell for raising that point!

6 years agomissing NULL pointer check
Campbell Barton [Sun, 30 Aug 2015 10:11:10 +0000 (20:11 +1000)]
missing NULL pointer check

6 years agoAudaspace: fix for building with scons.
Jörg Müller [Sat, 29 Aug 2015 20:42:20 +0000 (22:42 +0200)]
Audaspace: fix for building with scons.

Removed duplicated code.
CMake so far built only the now removed version and scons tried to build both.

6 years agoCleanup: set `fd->mainlist` to NULL at the end of `blo_read_file_internal()`.
Bastien Montagne [Sat, 29 Aug 2015 14:47:32 +0000 (16:47 +0200)]
Cleanup: set `fd->mainlist` to NULL at the end of `blo_read_file_internal()`.

This is a local var, do not try to use it later!

6 years agoAdd some more missing ID types to TREESTORE_ID_TYPE...
Bastien Montagne [Sat, 29 Aug 2015 13:51:11 +0000 (15:51 +0200)]
Add some more missing ID types to TREESTORE_ID_TYPE...

6 years agoFix missing 'case idx' line in (debug-only & disabled) valgrind-friendly BKE_main_fre...
Bastien Montagne [Sat, 29 Aug 2015 13:07:09 +0000 (15:07 +0200)]
Fix missing 'case idx' line in (debug-only & disabled) valgrind-friendly BKE_main_free() code.

6 years agoFix T45736: Channel key error: color spaces modes
Sergey Sharybin [Fri, 28 Aug 2015 16:44:27 +0000 (18:44 +0200)]
Fix T45736: Channel key error: color spaces modes

Was missing conversion back to RGB space.

6 years agoFix remaining parts of T44881, missing update on loading file
Sergey Sharybin [Fri, 28 Aug 2015 16:28:48 +0000 (18:28 +0200)]
Fix remaining parts of T44881, missing update on loading file

6 years agoFix UI font drawing getting width w/o kerning
Campbell Barton [Fri, 28 Aug 2015 16:09:12 +0000 (02:09 +1000)]
Fix UI font drawing getting width w/o kerning

6 years agoPartial fix of T44881: Fix for missing particles update when changing seed
Sergey Sharybin [Fri, 28 Aug 2015 15:16:50 +0000 (17:16 +0200)]
Partial fix of T44881: Fix for missing particles update when changing seed

Was only visible with new dependency graph.

Changing emit_from still doesn't behave fully reliably tho, that needs some
closer investigation.

6 years agoFix assigning flag to bool
Campbell Barton [Fri, 28 Aug 2015 14:21:18 +0000 (00:21 +1000)]
Fix assigning flag to bool

6 years agoRevert "Blind attempt to fix T45931: Blender Fails to generate previews."
Bastien Montagne [Fri, 28 Aug 2015 15:01:09 +0000 (17:01 +0200)]
Revert "Blind attempt to fix T45931: Blender Fails to generate previews."

This reverts commit c4ab521e2609be02ab9680fc4eb7726a2af400ed, since it does not actually fix the issue...

6 years agoFix T45929: OpenSubdiv was doing extra object recalc tags
Sergey Sharybin [Fri, 28 Aug 2015 12:54:27 +0000 (14:54 +0200)]
Fix T45929: OpenSubdiv was doing extra object recalc tags

6 years agoReadfile: Minor optimization in undo/redo case: do not call `do_versions_userdef...
Bastien Montagne [Fri, 28 Aug 2015 12:06:01 +0000 (14:06 +0200)]
Readfile: Minor optimization in undo/redo case: do not call `do_versions_userdef` either.

6 years agoBlind attempt to fix T45931: Blender Fails to generate previews.
Bastien Montagne [Fri, 28 Aug 2015 11:22:03 +0000 (13:22 +0200)]
Blind attempt to fix T45931: Blender Fails to generate previews.

Cannot reproduce the issue here on linux, but have the feeling windows builds are much
more easily broken with referencing bad data from bpy. So here guessing direct loop
over when you do add and remove stuff from said xxx inside the loop
is not a good idea - which seems logical in the end. :P