Commit Graph

49420 Commits

Author SHA1 Message Date
Campbell Barton
551096d6fd BLI_open: check returned value for -1 instead of < 0 2014-04-22 16:40:17 +10:00
Tamito Kajiyama
1b523b54e6 Code cleanup: replace int with boolean. 2014-04-22 09:39:53 +09:00
Bastien Montagne
9b0ab89067 Follow up to previous commit: tweak RE_RAYTRACE_EPSILON (correction value used
when checking neighbor faces against shadowing).
2014-04-21 20:27:19 +02:00
Bastien Montagne
3de8f255d7 Fix T39735: New auto smooth creates artifacts with flat shaded faces(BI)
This actually had nothing specific to new split normals, it was an internal limitation
of BI raytracer, which would check against neighbor face shadowing only when they shared
a common vertex, now it also performs checks when both faces have a vertex with a common
"ancestor" (org index).

Note this allows to also fix same issue when using SplitEdges modifier (and potentially
others?), but only when AutoSmooth is enabled (due to some compute/mem overhead, we
do not want to enable this code systematically).

Thanks to Brecht for advices and review!
2014-04-21 20:27:19 +02:00
Jens Verwiebe
88a22632a3 OSX: always create a window in normal state, not fullscreen or iconized … 2014-04-21 19:43:10 +02:00
Bastien Montagne
ea753710bf Fix another shading issue with new split normals (deform modifier after a subsurf one).
Just always tag tessellated CDlayers as dirty when we recompute split normals!

Also simplified a bit end of mesh_calc_modifiers.
2014-04-21 17:58:05 +02:00
Campbell Barton
9d5ed605fe BMesh Inset: remove hack to store coords in normals 2014-04-22 01:36:59 +10:00
Campbell Barton
9bff19fbfd GHash, Edgehash: add lookup_default() funcs.
Returns a fallback argument when the key isn't found.
2014-04-22 01:36:59 +10:00
Campbell Barton
64b6ea032d PBVH: replace ghash with gset for storing unique faces 2014-04-22 01:36:59 +10:00
Andrea Weikert
5afb0abfbd Basic support for UNC paths on Windows
Differential Revision: https://developer.blender.org/D298

Allows users on Windows to enter UNC paths in the filebrowser and to link to .blend files on a UNC path. Functionality is limited still, we can't browse the network yet and have no support to check user rights so far.

What works:
- enter an UNC path in the file browser manually or via copy/paste
- navigation within the UNC share subfolders
- link to a file on a UNC share

What does not (yet) work:
- browse the network for computers and shares
- browse to a folder that requires entering user credentials

Contributors:
Rob McKay - original patch
Campbell Barton - style fixes

Reviewers:
Campbell Barton, Brecht van Lommel
2014-04-21 17:06:09 +02:00
Thomas Dinges
87628cc5fb Fix GLSL after 7765b73f6d (Transparent Depth). 2014-04-21 16:32:08 +02:00
Carlo Andreacchio
7765b73f6d Cycles: add Transparent Depth output to Light Path node.
This can for example be useful if you want to manually terminate the path at
some point and use a color other than black.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D454
2014-04-21 14:44:36 +02:00
Campbell Barton
f55ca54be1 Object drawing: test the flag, without comparing the value 2014-04-21 19:29:48 +10:00
Bastien Montagne
11cddaa5d9 Split Normals: more fix for EditMode shading and modifiers (subsurf special case, this time).
CCGDM did not generate a valid tessellated loop normals CD layer...
2014-04-21 10:47:57 +02:00
Campbell Barton
43d695e82e Code cleanup: view2d api naming 2014-04-21 18:47:17 +10:00
Bastien Montagne
a5e30fc79c Fix player build. 2014-04-21 10:19:13 +02:00
Campbell Barton
e4a2df9fec View2d: check UI_view2d_view_to_region_clip succeeds before using the result 2014-04-21 18:11:47 +10:00
Campbell Barton
9ae0e585b0 View2d: API Cleanup for view<->region conversion
View2D had some inconsistencies making it error prone in some cases.

- Inconstant checking for NULL x/y args.
  Disallow NULL args for x/y destination pointers, instead add:
  - UI_view2d_region_to_view_x/y
  - UI_view2d_view_to_region_x/y

- '_no_clip' suffix wasn't always used for non-clipping conversion,
  switch it around and use a '_clip' suffix for all funcs that clip.

- UI_view2d_text_cache_add now clips before adding cache.

- '_clip' funcs return a bool to quickly check if its in the view.

- add conversion for rectangles, since this is a common task:
  - UI_view2d_view_to_region_rcti
  - UI_view2d_region_to_view_rctf
2014-04-21 16:59:40 +10:00
Bastien Montagne
6ee8670fca Fix T39818: Strips from file with long filename broke auto-naming - animation can't be apply on it. 2014-04-21 08:30:20 +02:00
Campbell Barton
b1e1f86eb7 Fix for UI_view2d_to_region_float (was ignoring x,y args)
use this for grease pencil stroke conversion to avoid float->int->float conversion.
2014-04-21 14:30:13 +10:00
Campbell Barton
3a950dc643 Skin mark/clear: replace GHash with GSet 2014-04-21 13:13:15 +10:00
Bastien Montagne
dcd2a8fcc4 Fix stupid typo that broke split normal shading in edit mode, when there was some deform modifiers. 2014-04-20 23:12:18 +02:00
Campbell Barton
b264f613df Fix incorrect ghash free 2014-04-21 04:00:35 +10:00
Campbell Barton
25c9ea8cb3 GHash, EdgeHash: hint on unlikely branch
also avoid searching buckets for empty hashes
2014-04-21 02:50:07 +10:00
Campbell Barton
3ba7a75a6c Correct cast from recent bool changes 2014-04-21 02:48:39 +10:00
Campbell Barton
55d75f5020 Code cleanup: correct abs use
also minor cleanup to rotation code
2014-04-21 02:02:21 +10:00
Campbell Barton
1a1bc281e6 Code cleanup: style 2014-04-21 01:01:33 +10:00
Brecht Van Lommel
1e3f8b517b Nodes: make default group nodes slighly wider, to match other node width defaults. 2014-04-20 14:47:46 +02:00
Brecht Van Lommel
97409c93fa Fix error making datablock with fake user local, the user count would be wrong afterwards. 2014-04-20 14:47:46 +02:00
Campbell Barton
f77207b1c3 Math Lib: faster version of rotation_between_vecs_to_mat3
Use axis/angle calculation but avoid calls to sin/cos
2014-04-20 20:56:40 +10:00
Mitchell Stokes
b4cb467359 BGE: Fixing memory leaks when deactivating Sensors, Controllers, or actuators.
Found by Coverity and confirmed with Valgrind.
2014-04-19 14:51:29 -07:00
Campbell Barton
a51a0ca772 Math Lib: add shell_v3v3_normalized_to_dist and v2 version
bypass angle calculation to avoids (asin, sqrt, cos).
2014-04-19 22:17:10 +10:00
Campbell Barton
d6a53bb38f Minor change to recent commit (avoid transpose) 2014-04-19 19:48:07 +10:00
Campbell Barton
0ed6725aae Math Lib: minor optimization to barycentric_transform
replace rotation_between_vecs_to_quat with axis_dominant_v3_to_m3.
2014-04-19 15:52:01 +10:00
Campbell Barton
fabc46b41f Math Lib: add rotation_between_vecs_to_mat3
- behaves like rotation_between_vecs_to_quat
- avoids calling sin,cos calls (approx 1.6x faster).
2014-04-19 15:36:47 +10:00
Campbell Barton
fc9c790563 Math Lib: minor optimization for axis_angle_normalized_to_mat3 2014-04-19 14:10:22 +10:00
Campbell Barton
dc847607b6 Change Vector.slerp to accept nonunit vectors 2014-04-18 20:49:39 +10:00
Campbell Barton
e5f4f4d484 CMake was missing header 2014-04-18 20:46:14 +10:00
Tamito Kajiyama
4a837141c3 Code cleanup: de-duplicated includes. 2014-04-18 15:02:46 +09:00
Tamito Kajiyama
f60a66f417 Freestyle: New options for sorting to arrange the stacking order of lines.
Line styles now have a set of new options for rearranging the stacking order of lines.
This gives artists more control to determine which lines should be drawn on top of others.
Two available sort keys are the distance from camera and curvilinear 2D length.
Since the distance of a line from camera may vary over vertices, another option called
integration type is used to compute the sort key for a line from the values computed at
individual vertices.  Available integration types are MEAN, MIN, MAX, FIRST and LAST
(see the tool tips for more detail).
2014-04-18 15:02:45 +09:00
Tamito Kajiyama
6161e4420e Quite compiler warnings. 2014-04-18 15:02:43 +09:00
Antony Riakiotakis
ad8a35a659 Dyntopo: Solve issue with test file by Jens.
Seems like custom data indices can be mangled when many layers are
present in the mesh, so use more strict calculation of offset (copied
over from BM_CD_LAYER_ID).

I was under the impression that all custom data would be deleted on
entering dyntopo, it seems this is not the case though.
2014-04-18 00:11:05 +03:00
Antony Riakiotakis
169f831394 Make sure we invalidate the node ID layer each time the PBVH is reset.
It makes code more tidy (avoids having to call invalidation on a myriad
places). Also makes sure other invalidation cases (some mesh change,
e.g.) work as expected.
2014-04-17 20:53:40 +03:00
Bastien Montagne
f7de9efb74 BI: cleanup in autosmooth area. 2014-04-17 18:23:14 +02:00
Antony Riakiotakis
dc40a97fc1 Optimize and symmetrize operators missed reset of node layer. 2014-04-17 19:13:58 +03:00
Antony Riakiotakis
38eef8deee Refactor to Dyntopo node customdata commit.
Don't use a dedicated node layer but use temporary int layer instead.
Works like a charm as long as we are careful resetting the layer when
needed (after pbvh clearing and always after bmesh has been filled in
undo)

Tip by Campbell, thanks!
2014-04-17 19:03:08 +03:00
Antony Riakiotakis
0ba3f76470 Recreating a bmesh log did not account for modified faces.
It shouldn't create issues in practice because modified face ids should
have been reclaimed from an added face on a previous entry, but add for
completeness.
2014-04-17 19:03:07 +03:00
Campbell Barton
bb507e4941 View3D: use smoothview for localview switching 2014-04-18 00:27:16 +10:00
Campbell Barton
69d127cade Code cleanup: use const for array args 2014-04-18 00:27:16 +10:00
Campbell Barton
300f4482e8 View3D: no need to mask mask out localview for each object 2014-04-18 00:27:15 +10:00