Commit Graph

61201 Commits

Author SHA1 Message Date
Sergey Sharybin
92d12ab38b Cycles: Correction to integrator's transparent shadows
It was possible that deleting transparent BSDF from shader wouldn't
disable transparent shadows in integrator when doing viewport render.
2015-09-08 11:47:39 +05:00
Sergey Sharybin
6b0544eaaf Cycles: Update TODO, camera in volume is supported already 2015-09-08 11:29:14 +05:00
Sergey Sharybin
0e12228bd9 Fix T46045: Missing viewport update when adding transparent shader to material 2015-09-08 11:28:02 +05:00
Campbell Barton
946b850b3e Fix T46040: Bake action cleans existing keyframes 2015-09-08 04:01:03 +10:00
Bastien Montagne
9de20963cd Fix beautiful textbook case of string overflow in BLI_testextensie_glob... 2015-09-07 19:23:11 +02:00
Howard Trickey
04e12c617d Fix T46029. Center ngon in bevel got no attributes or interpolation data. 2015-09-07 09:33:42 -03:00
Sergey Sharybin
1a7eca3c54 Fix T46034: OpenCL kernel compilation error in latest buildbot
Simply expanded expression, so no float4->float3 conversion happens.
2015-09-07 15:02:44 +05:00
Campbell Barton
77b0b661dd Doc: PyAPI docs, quiet warnings, fix URL's 2015-09-07 18:23:16 +10:00
Campbell Barton
e106a212e8 Fix T46032: Crash w/ file-browser preview 2015-09-07 17:20:09 +10:00
Campbell Barton
1c5b15eab3 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
2015-09-07 16:11:05 +10:00
Campbell Barton
7038c2c489 Cleanup: gpu constants weren't so clearly arranged
Also reminder to update docs w/ the API.
2015-09-07 16:11:05 +10:00
Campbell Barton
4ae181543f Fix viewport camera dof object distance
Also use simpler method to calculate the depth.
2015-09-07 02:32:34 +10:00
Julian Eisel
14dd88e817 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!
2015-09-05 23:36:52 +02:00
Julian Eisel
b529b82830 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.
2015-09-05 19:42:05 +02:00
Sergey Sharybin
1478ac35c7 Depsgraph: Don't use legacy function when building without legacy depsgraph 2015-09-05 17:52:29 +05:00
Joshua Leung
9683807459 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.
2015-09-06 00:07:06 +12:00
Campbell Barton
b8e0b2db56 Math Lib: isect_plane_*_v3 avoid negation
Unmeasurable speedup for plane intersection.
2015-09-05 17:44:02 +10:00
Campbell Barton
ba188cf98d Math Lib: simplify isect_plane_plane_v3
Unlike the 3 plane method, the 2 planes squared cross-product _is_ the determinant.
2015-09-05 17:10:07 +10:00
Bastien Montagne
ac51e2f326 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.
2015-09-04 22:41:10 +02:00
Sergey Sharybin
83a36b2829 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.
2015-09-04 20:06:31 +05:00
Sergey Sharybin
713ce037ab 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
triangle.

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.
2015-09-04 20:06:31 +05:00
Bastien Montagne
65a80708d4 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!
2015-09-04 16:50:29 +02:00
Bastien Montagne
c882cbd37c Cleanup: Better to assert over bad condition (which shall never happen anyway), than just return with un-initialized mat... 2015-09-04 16:50:29 +02:00
Campbell Barton
39752eb912 Fix for isect_tri_tri_epsilon_v3 w/ small faces
tris with ~1e-05 edge lengths would fail
2015-09-04 22:29:12 +10:00
Campbell Barton
1d71ad2eaa Math Lib: Use plane intersect from graphics-gems 2015-09-04 22:13:20 +10:00
Campbell Barton
d0e7ba3fd1 Math Lib: avoid sqrt w/ triangle intersection 2015-09-04 22:06:36 +10:00
Campbell Barton
2ea96df159 Correct own error in line_point_factor
Passing zero epsilon allowed divide by zero.
2015-09-04 22:06:36 +10:00
Bastien Montagne
f79c748246 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. ;)
2015-09-04 12:26:52 +02:00
Sergey Sharybin
52fda9b0db 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.
2015-09-04 15:19:22 +05:00
Campbell Barton
3e63c604e3 Partial revert of warning cleanup
These warnings are false-positives
2015-09-04 14:40:03 +10:00
Julian Eisel
ef629e0d50 Quiet warnings
We had too many warnings lately... was awaiting that someone would kill them - didn't happen -> goes to my commit ratio! :P
2015-09-04 01:04:37 +02:00
Campbell Barton
c3fef001ee View-Selected: use custom bones boundbox
Support using custom pose-bone transform and object when calculating view bounds.
2015-09-04 04:23:18 +10:00
Campbell Barton
54ad576666 Small tri intersect fails when not normalized
Logic was ok, but would run into precision issues.
2015-09-04 01:59:44 +10:00
Campbell Barton
e709da3def Cleanup: minor RST edits 2015-09-04 01:11:26 +10:00
Howard Trickey
10c93a582b 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.)
2015-09-03 10:42:16 -04:00
Sergey Sharybin
b899114a7e Fix T45937: Cycles hair not rendered if children count set to zero 2015-09-03 18:54:50 +05:00
Sergey Sharybin
a4bcd9bc96 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.
2015-09-03 18:16:30 +05:00
Sergey Sharybin
0bc4bc2e61 Fix T45946: Cycles texture interpolation bug
Coordinate clamping was done in the wrong order.
2015-09-03 18:16:30 +05:00
Sybren A. Stüvel
2c2f075929 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.
2015-09-03 15:05:36 +02:00
Campbell Barton
73b34ad06b PyAPI: tweak to ensure_ext don't lower entire path 2015-09-03 21:58:11 +10:00
Sybren A. Stüvel
8383a2d4cc 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
file.

Also added a unit test for the new behaviour.

Reviewers: mont29, campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1498
2015-09-03 13:09:16 +02:00
Bastien Montagne
e5e65b1099 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).
2015-09-03 12:20:50 +02:00
Sergey Sharybin
357e749957 Cycles: Fix nondeterministic pass ordering when using baker 2015-09-03 13:52:56 +05:00
Sergey Sharybin
f387fe2b65 Cycles: Fix for uninitialized closure data
This might confuse closure merger.

Spotted by Campbell Barton, thanks!
2015-09-03 13:48:43 +05:00
Sergey Sharybin
8e75abd29a 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.
2015-09-03 12:49:04 +05:00
Sergey Sharybin
2ed4f98548 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.
2015-09-03 12:19:47 +05:00
Campbell Barton
6789d02112 Fix T45959: DistanceKey preview used wrong colors
Same issue as recent fix in ChannelMatte
2015-09-03 12:28:27 +10:00
Campbell Barton
46d731612d Animplayer passed -a, then warned its unknown
Also modify a copy of argv
2015-09-03 04:27:44 +10:00
Campbell Barton
1f16b3280f Fix T45979: animplayer crashes w/ DND and audio
Issues re-initializing audaspace
2015-09-03 04:15:08 +10:00
Sergey Sharybin
390bc05b32 Fix second part of T45987: Node preview was still using wrong color space 2015-09-02 22:46:06 +05:00