Commit Graph

61026 Commits

Author SHA1 Message Date
Sergey Sharybin
5cf519ac51 OpenSubdiv: Better approximation of vertex normals
Use vertex varying data which gives better approximation of normals.
Still not ideal but should be closer for higher poly meshes to correct
normal.

The only way to have proper smooth normals seems to be to implement
patch evaluation in tessellation shader, but that's a bit PITA with
current GLSL usage in our draw code.
2015-08-25 13:16:55 +02:00
Campbell Barton
51d969c6a9 Fix T45891: Crash generating previews 2015-08-25 18:34:44 +10:00
Sergey Sharybin
c6d7562896 Fix T45729: Cycles Bake break when building a special mesh
The issue was caused by CD_SHAPEKEY_INDEX layer being added to edge data,
now we make sure all the layers are nicely re-allocated.
2015-08-25 10:30:46 +02:00
Campbell Barton
540f9a3b11 Quiet warning with arg types 2015-08-25 17:27:18 +10:00
Campbell Barton
a7dd20983a Fix T45814: Writing MP4, h.264 not supported 2015-08-25 08:51:04 +10:00
Campbell Barton
1080a7d5e1 Cleanup: style 2015-08-25 08:50:53 +10:00
Sergey Sharybin
7d516f11f7 Fix for previous commit
uint is only used in Cycles, Blender is not really ready for this.

Pointed out by Thomas Szepe, thanks!
2015-08-24 23:11:45 +02:00
Bastien Montagne
c5018c65b9 BLI_fileops: Some fixes and cleanup.
* Fix BLI_file_touch, used to add one dummy byte ((unsigned char)EOF) to empty files!
* Get rid of static global temp string in WIN32 area (very bad, and useless!).
* Get rid of paranoid NULL checks in WIN32's BLI_gzopen().
* Add non-relative filename asserts to WIN32 file operations too.
* ifdef-out BLI_move and BLI_create_symlink, unused (and the later is not even implemented for windows).

Partly based on patch and points raised by Jason Wilkins (jwilkins) in T32870, thanks!
2015-08-24 22:14:38 +02:00
Sergey Sharybin
e8a0478c63 Fix T45833: Light group instances are not rendered in the 3D viewport
The issue was introduced in c9ac51e by trying to use original's objects layers
for light visibility check instead of using duplicator's layers.
2015-08-24 22:02:41 +02:00
Sergey Sharybin
2fb639deed Fix T45778: Objects scaled to 0 cause black artifacts with Static BVH
The issue was caused by some numeric instability in triangle intersection which
was visible on avx2 CPUs and GPUs (at least sm_20 here) but maybe some others
too.

Committing rather a workaround for now to be safe for the release, still need
some investigation.

From tests with grass field from Gooseberry project didn't see measurable
slowdown.
2015-08-24 21:23:49 +02:00
Campbell Barton
3633499f4e Fix T45737: Vertex colors show washed-out
Blender-Internal and GLSL-nodes missed converting sRGB to linear color.
2015-08-25 01:02:28 +10:00
Campbell Barton
46d275b626 Fix DM_get_loop_array, was checking edge-data
Fixes T45728
2015-08-25 00:47:27 +10:00
Lukas Tönne
68a9328a58 Fix T45084 correcting bending_damping for cloth stiffness, by Martin Norris. 2015-08-24 14:09:01 +02:00
Campbell Barton
70b7dc993e Fix T45823: PSD files save as JPG without warning
Don't allow image save (which overwrites without asking),
unless the input format can be written to.
2015-08-24 21:34:49 +10:00
Sergey Sharybin
aac6ee6b87 Fix T45885: Cycles coordinate extension modes not working as expected
Fix T45769: Image Texture Node clipping bug

Simple mistakes in the normalized/pixel-space coordinates handling.

Render tests for this feature are coming.
2015-08-24 10:40:37 +02:00
Bastien Montagne
8cc8ce3d46 Fix some issues from lates coverity scan.
Unlikely, but still valid.
2015-08-24 09:59:50 +02:00
Sergey Sharybin
8031f36261 Tests: Ignore preview render script in module loading tests 2015-08-24 09:46:41 +02:00
Sergey Sharybin
2960630b7b Cycles: Use better policy for primitive array resize for spatial split
Gives around 50% of spatial split BVH build speedup with grass field from
cassette player shot from Gooseberry.
2015-08-24 09:46:41 +02:00
Sergey Sharybin
7be6dba091 Cycles: Implement reseve() for aligned array class
The title says it all actually, just support reserving memory in the array class.
2015-08-24 09:46:40 +02:00
Sergey Sharybin
2230130099 Cycles: Speedup of Spatial BVH split code
Avoid memmove() happening on every insert of duplicated node to the references
list. Temporary pre-allocated vector is used for new references which is then
being inserted into actual array in one go later.

Gives around 4x speedup building spatially split BVH for the grass field in the
cassette player shot from Gooseberry.
2015-08-24 09:46:40 +02:00
Sergey Sharybin
334208e670 Cycles: Implementation of object reference nodes spatial split
This commit implements object reference node spatial split making it possible
to use spatial split for top-level BVH.

The code is not in use yet because enabling spatial split on top level BVH is
not coming for free and it needs to be investigated if it's worth in terms of
improved render times.
2015-08-24 09:46:40 +02:00
Sergey Sharybin
c88c5db360 Cycles: Make primitive split code easier for re-use by reference splitting function 2015-08-24 09:46:40 +02:00
Sergey Sharybin
99c1870ad5 Cycles: Move primitive splitting into own functions
This way it's easy to add more reference types allowed for splitting to the
BVH reference split function without making this function too much big. This
way it's possible to experiment with such features as splitting object instance
references.

So far should not be any functional changes.
2015-08-24 09:46:40 +02:00
Sergey Sharybin
9b57d70f3b Cycles: BVH statistics print was missing for spatially split BVH tree 2015-08-24 09:46:40 +02:00
Campbell Barton
30067b499a Fix editmesh GLSL tangent drawing
The generic tangent calculation relied on CDDM arrays which aren't available in edit-mode.

Add a tangent calculation callback, which has its own implementation for editmesh data.
2015-08-24 15:20:23 +10:00
Campbell Barton
4f61de6588 Fix T45884: Crash copying keyframes
BLI_str_quoted_substrN could crash if the prefix wasn't found
2015-08-24 09:29:00 +10:00
Campbell Barton
231ee60ab5 mathutils.BVHTree: support overlap self-intersect
Use same logic as BKE_bmbvh_overlap
2015-08-24 08:23:24 +10:00
Campbell Barton
8a623b066e BVHTree.FromBMesh() missed epsilon arg 2015-08-24 08:23:24 +10:00
Bastien Montagne
2ee0187ed2 Fix T45882: Sudden shutdown if the filebrowser is part of the area layout.
There is no guarantee in sfile's listener that FileList has already been created...
2015-08-23 20:27:59 +02:00
Antony Riakiotakis
25bb5cb30c Fix T45860, missing extension in GLSL after recent own fix. 2015-08-23 18:20:08 +03:00
Porteries Tristan
8444f7ba2b BGE: Fix T42679: Python physics environment not setted for python control script. 2015-08-23 14:34:04 +02:00
Campbell Barton
2672ee77a0 Cleanup: spelling/style 2015-08-23 21:12:48 +10:00
Thomas Beck
83e16a4a87 This commit makes it possible to select the sort mode whenever we invoke an operator.
It's needed especially for the menu entry "recover auto save" where you'd like to have the files sorted by date most of the time but it could be useful in other places too.
There should be no functional change in other areas, I just added the missing parameter (FILE_SORT_ALPHA).

Was a request from @sebastian_k at #BCon13, so at least one guy needs it ;)

Reviewers: mont29

Reviewed By: mont29

Subscribers: sebastian_k

Differential Revision: https://developer.blender.org/D1476
2015-08-23 12:40:21 +02:00
Joshua Leung
b88d8916e4 Fix T45633 - Animated modifiers don't update in new depsgraph
* Resolved some todo's where FModifier paths were getting identified using the
  wrong pattern.
* Added the missing animation -> modifier link. The "hacky" part here is just
  to do with how we check if that link is needed; the link though should exist
  in the graph.
2015-08-23 22:23:25 +12:00
Campbell Barton
e7775833a7 Math Lib: Use same logic for 2d/3d functions
dist_squared_to_line_v2, dist_to_line_v2
2015-08-23 19:10:37 +10:00
Campbell Barton
0cb23fafe7 Math Lib: minor optimization interp_weights_poly 2015-08-23 17:07:35 +10:00
Campbell Barton
58c9a0b11a Cleanup: spelling 2015-08-22 21:17:32 +10:00
Campbell Barton
c1c07b68b8 Use epsilon for line-intersect collinear test
Also remove 2x vector normalize since other parts of the code already check this.

Fixes T45849
2015-08-22 21:12:46 +10:00
Bastien Montagne
6c8db9fd5f FileBrowser: Tweak display of size/time of entries.
We have no size for blenlib entries, nor do we have time for those and 'parent' entry.

Thanks to Sergey for notifying this on IRC.
2015-08-22 11:02:12 +02:00
Campbell Barton
86690915f1 outliner: tweak GPLayer color button overlap 2015-08-22 16:49:58 +10:00
Campbell Barton
a22f3cccec Fix outliner grease pencil color button 2015-08-22 16:49:57 +10:00
Joshua Leung
4d146bdf13 Fix T45689: Pose Libraries cannot be used when using lib-linked actions as poselibs
This commit makes some tweaks that make it at least possible to use lib-linked
actions as Pose Libraries. Specifically:
* The apply poses button is no longer greyed out

* It is possible to select different poses from the list of poses

* All pose library operators which edit the poses stored in the poselib
  now have improved poll callbacks which perform extra checks for lib-linked
  actions (which cannot be edited, as all those changes will be lost)


Caveats:
* Due to the way the UI list template works, it doesn't seem to be possible to
  make it not grey out the items in the list. (While the double-click to rename
  thing shouldn't be allowed, items should at least look like they can be clicked on)

* The difference between clickable vs not-clickable isn't too great, making it hard
  to tell that that while the Add/Remove/Sanitise toggles are not usable,
  the Apply Poses is actually functional. But, this is a more of a  UI-toolbox
  level issue
2015-08-22 18:16:55 +12:00
Joshua Leung
79e3a27c7a Typo fix 2015-08-22 16:53:58 +12:00
Porteries Tristan
24e56d4c39 BGE: Fix constraint free crash in RemoveConstraint.
Fix silly error getRigidBodyA() instead of getRigidBodyB()
2015-08-21 22:17:35 +02:00
Bastien Montagne
7d0b29be69 Fix T45658: linked library object loses particle settings.
Simply make ParticleSettings datablock linkable, see absolutely no reason why those
were the only 'real data' ID type not linkable so far...
2015-08-21 18:31:23 +02:00
Joshua Leung
94c8f5a447 Anim Editors: All keyframe selection operators now perform undo pushes
This brings them into line with other editing tools (e.g. object/mesh selection),
and should help fix bugs like T45374 and T45846
2015-08-22 02:48:02 +12:00
Joshua Leung
b617dec065 Fix T45864: Wrong NLA Control Curves keyed when using the Graph Editor sliders
This commit simplifies the logic for finding the control curves for NLA strips,
thus eliminating a whole bunch of weird errors that were happening here. It should
also fix a number of other related issues here.
2015-08-22 02:48:01 +12:00
Bastien Montagne
09b7ec1864 Fix T45865: Auto Blend is not recalculated when adjusting start/end/scale etc. of strip through RNA. 2015-08-21 16:18:20 +02:00
Campbell Barton
59e166c568 BVH-raycast: Use watertight intersections
By default watertight intersections are used,
For callbacks where its not needed,
BLI_bvhtree_ray_cast_ex can be called without the BVH_RAYCAST_WATERTIGHT flag.

Fixes T45286
2015-08-21 17:48:33 +10:00
Campbell Barton
71919efd78 Math Lib: watertight intersection function
From Cycles with some very minor differences.
2015-08-21 17:45:04 +10:00