Commit Graph

56413 Commits

Author SHA1 Message Date
Bastien Montagne
c14d34322b Fix typo breaking compilation with SSE2.
Spotted by sybrenstuvel (Sybren Stüvel), thanks!
2014-11-02 23:01:09 +01:00
Campbell Barton
b7174c9320 Fix connect-vertices failing for concave ngons
Also add:
- generic callback for bmesh elements.
- ability to pass an existing array to a bmesh operator.
2014-11-02 00:09:14 +01:00
Campbell Barton
e8b8ee7d28 OpenGL: double width lines is no-longer apple-only 2014-11-01 23:32:02 +01:00
Campbell Barton
5b93c6e6f3 Fix for 3D Ruler crash maximizing view 2014-11-01 23:32:02 +01:00
Campbell Barton
d658ea1b20 Cleanup: style 2014-11-01 23:32:02 +01:00
Bastien Montagne
31a83ee9f1 Cleanup: mostly use bools for booleans. 2014-11-01 22:25:57 +01:00
Bastien Montagne
9b8be0bc0c Cleanup/fix from latest coverity report.
Mostly harmless things, though the 'multires' error was a real bug.
2014-11-01 16:36:11 +01:00
Sergej Reich
cbf2fab9ea Cycles: Remove redundant alloc/free
Seems like a copy paste error.
2014-11-01 15:23:14 +01:00
Sergey Sharybin
aa91a36864 Libmv: Code cleanup, avoid C11 feature with structure re-definition 2014-11-01 03:18:40 +05:00
Sergey Sharybin
bf13f1a263 Cycles: Code cleanup, proper class vs. struct declaration 2014-11-01 03:09:46 +05:00
Sergey Sharybin
26e440838f Libmv: Code cleanup, mixed class/struct in declaration/definition 2014-11-01 02:57:05 +05:00
Thomas Dinges
29c71b2c09 Cleanup: Remove unused light function. 2014-10-31 22:54:05 +01:00
Sergey Sharybin
23b7f351aa Optimize vertex parent for edit mode without modifiers
No need to run lookup on the origindex in this case at all.
2014-10-31 20:15:32 +01:00
Sergey Sharybin
c7222a234d Optimize vertex parent in cases there are only deform and SS modifiers
In cases when the subsurf modifier is the last in the stack and there
are only deformation modifiers before it we can skip doing full orig
vertex lookup.

This is rather common situation here in animatic.
2014-10-31 20:06:19 +01:00
Sergey Sharybin
3248be1fbf SCons: Expose missing command line arguments controlling GLEW 2014-10-31 22:51:59 +05:00
Sergey Sharybin
95687f9751 Fix T42349: Windows Render command line Cycles Crash
The issue was caused by GLEW MX enabled in SCons by default so
basically previous commit already fixed the crash. But we need
to be safe here.

For now the fix is simple and not that clean, just check if
there's an OpenGL context available and if not we don't do any
GLSL magic.

This is to be cleaned up after some discussion with the viewport
project guys.
2014-10-31 22:51:49 +05:00
Sergey Sharybin
778afc8082 Disable GLEW_MX in scons
This was already disabled in CMake and we need to keep build systems
in 100% synchronized state.

P.S. Would it be a real fix to drop SCons?
2014-10-31 22:51:44 +05:00
Bastien Montagne
1070680a4b Followup to rB154af70f2b5b7b: always 'pack in' ongoing versionning code when bumping version. 2014-10-31 18:26:58 +01:00
Bastien Montagne
a8ea35da05 Themes auto-update from py script. 2014-10-31 18:16:28 +01:00
Bastien Montagne
72454fafb0 Fix T42454: Themes: Some colors were missed somehow in an update two years ago.
Had to fix it by hand (restting them to default values), theme maintainers,
please check your theme from time to time and track such ugly 'pitch black' fields.

And we devs should run theme update script much more often too - will do in next commit!
2014-10-31 18:16:28 +01:00
julianeisel
154af70f2b Fix T42432: Correct BLENDER_SUBVERSION
Bump up BLENDER_SUBVERSION to 2 to allow saving of widget emboss.
2014-10-31 17:54:18 +01:00
Campbell Barton
d4fde32b12 Cleanup: naming 2014-10-31 16:30:39 +01:00
Sergey Sharybin
23e14259d2 Code cleanup: synchronize const qualifiers between declaration and definition 2014-10-31 16:17:02 +01:00
Sergey Sharybin
2204687cbb Code cleanup: Remove unused variable 2014-10-31 16:13:13 +01:00
Sergey Sharybin
5d502264da Compositor: Don't let HSV correction to output negative colors 2014-10-31 14:58:00 +01:00
Sergey Sharybin
f9688d88ff Fix T42391: HSV correction shader node gives negative values
This mainly happens when over-saturating already saturated color.
After some discussion with Campbell and loads of tests we decided
to clamp the result RGB color. As an alternative we might want to
clamp corrected HSV values instead, but that would lead to some
larger changes in the render results.

TODO: The same is to be done for compositor nodes.
2014-10-31 14:58:00 +01:00
Antony Riakiotakis
a6a3989617 Texture Paint Add Simple UVs:
Add simple uvs now does a cube unwrap and pack operation. Result is not
optimal by far but it should not result in crashes and it will be quite
usable for simple cases.
2014-10-31 14:37:55 +01:00
Sergey Sharybin
46c11c7b7d Fix T42277: Apply track's mask on displaying preview not working 2014-10-31 12:59:55 +01:00
Sergey Sharybin
7bb910cd4e Fix T42344: EWA filter produces blured results
Derivatives variable names are swapped in the old EWA filter code,
need to adjust for that.

TODO: Make naming fore clear in there.
2014-10-31 12:35:20 +01:00
Sergey Sharybin
fcc2ca0089 Fix T42401: Gaussian blur node is visibly squared-off at larger sizes
The root of the issue comes to the way how we sample the gaussian filter in
RE_filter_value(). We need to scale x to -3*sigma..3*sigma segment in order
to get the whole bell.

The old code tried to do it, but failed dramatically, plus it used some weird
gaussian sampling formula. Replaced it with much more clear one, which gives
proper blur now.

There's no visible different in AA sampling in BI render tho.

Other filters like Mitchell still tends to give wrong square shaped blurs,
but they're much more difficult to resolve because they're just wrong in
the code -- for some reason smaller kernel size means more blur. Let's solve
this later.
2014-10-31 12:19:12 +01:00
Bastien Montagne
b154aa8c06 Fix T42447: Shrinkwrap constraint: mismatch in handling sclaing in projection case.
Constraint space conversion ignores object scale, which is OK in most cases. But here,
we are converting a normal from world to local space, and when later converting it
into target space to actually do the BVH raycast, we use TransformSpace which
does applies objects' scaling to normals, as expected.

Best solution here is to also take object's scale into account when converting
from local to world space.
2014-10-31 11:12:16 +01:00
Campbell Barton
5e6d878318 Revert "Scons/funstuff: notify when the binaries are compiled"
This reverts commit cdf53701599ace0b3410cbb75b0313bd969c417c.

Please always keep build-systems simple, boring & functional,
anyone who liked notification popups can write a simple build script.
2014-10-31 10:41:12 +01:00
Dalai Felinto
625843d84d View3d - walk: expose gravity toggle to keymap 2014-10-30 22:16:43 -02:00
Campbell Barton
be7b943cd2 Cleanup: use function to calc shell thickness 2014-10-30 22:31:03 +01:00
Antony Riakiotakis
e414853e18 Remove leftover error prints. 2014-10-30 21:48:44 +01:00
Antony Riakiotakis
37807d93bd Fix T42431 lagging on texture painting.
Issue here is that seam outset was being calculated wrong and as a
result we filled too many unneeded pixels. Code can be improved here by
clamping perhaps but left it as is for now. Thanks to Campbell for the
help resolving this!
2014-10-30 21:47:40 +01:00
Sergey Sharybin
f312f890f1 Libmv: Support disabled color channels in tracking settings
This was never ported to a new tracking pipeline and now it's done using
FrameAccessor::Transform routines. Quite striaghtforward, but i've changed
order of grayscale conversion in blender side with call of transform callback.

This way it's much easier to perform rescaling in libmv side.
2014-10-30 23:29:53 +05:00
Sergey Sharybin
606329d0f8 Libmv: Replace region tracker with autotracker in Blender
The title actually tells it all, this commit switches Blender to use the new
autotrack API from Libmv.

From the user point of view it means that prediction model is now used when
tracking which gives really nice results.

All the other changes are not really visible for users, those are just frame
accessors, caches and so for the new API.
2014-10-30 23:12:19 +05:00
Sergey Sharybin
7013d55580 Libmv: Add autotrack API to the C-API
Pretty much straightforward changes, nothing to be mentioned specially.
2014-10-30 23:07:46 +05:00
Keir Mierle
b15a056230 Libmv: Initial commit of unfinished AutoTrack API
This starts the creating the new AutoTrack API. The new API will
make it possible for libmv to do full autotracking, including
predictive tracking and also support multiple motion models (3D
planes etc).

The first goal (not in this patch) is to convert Blender to use
the new API without adding any new functionality.

This API currently contanins:

- Frame accessor to access frames which are stored in Blender side.
- New Tracks implementation
- New Reconstruction implementation

Currently this API only tested on doing the same frame-to-frame
tracking as the old API allowed to do. But it also supports now
predictive tracking which is based on the Kalman filter.
2014-10-30 23:03:34 +05:00
Campbell Barton
47faf618a6 Fix project-file generators (didn't close files) 2014-10-30 18:26:54 +01:00
Antony Riakiotakis
a634bcbdb4 Add a few more warnings so coders hopefully will take note that event
codes get stored in keymaps and should not be changed
2014-10-30 16:17:31 +01:00
Lukas Tönne
af9da0be43 Complementary fix for rB8054372: Follow the common naming scheme by
using negate_mat3_m4 instead of negate_m4.

This avoids changing the behavior and only flips the 3x3 part of the
matrix.
2014-10-30 15:31:18 +01:00
Antony Riakiotakis
f07cd77b48 Fix issue in fullscreen patch.
Don't change old event codes! Keymap diffing depends on those being the
same across versions to work.
2014-10-30 15:26:31 +01:00
Campbell Barton
be63ba315f Math Lib: pseudoinverse_m4_m4 changed input matrix 2014-10-30 14:49:57 +01:00
Bastien Montagne
d8094b62e2 Transform: snapping: normal-align: Cleanup!
Use BLI's `rotation_between_vecs_to_mat3` helper instead of own custom code,
both simplifies the code and fixes wrong handling when snapped normal was exactly
opposed to org one (i.e. 180° rot case).
2014-10-30 12:56:43 +01:00
Campbell Barton
c2dc51d827 Math Lib: add transpose_m3_m3, m3_m4, m4_m4 2014-10-30 12:15:14 +01:00
Thomas Dinges
4ff8744669 Cycles / CUDA: Better fix for missing sm_52 kernel, in case user compiles himself. 2014-10-30 11:42:59 +01:00
Thomas Dinges
d5ed153760 Cycles / OSL: Support microfacet() closure color function from OSL 1.5
This is basically just a wrapper class, which maps the generic call from the OSL spec to our closures.

Example usage:

shader microfacet_osl(
    color Color = color(0.8),
    int Distribution = 0,
    normal Normal = N,
    vector Tangent = normalize(dPdu),
    float RoughnessU = 0.0,
    float RoughnessV = 0.0,
    float IOR = 1.4,
    int Refract = 0,
    output closure color BSDF = 0)
{
    if (Distribution == 0)
        BSDF = Color * microfacet("ggx", Normal, Tangent, RoughnessU, RoughnessV, IOR, Refract);
    else
        BSDF = Color * microfacet("beckmann", Normal, Tangent, RoughnessU, RoughnessV, IOR, Refract);
}
2014-10-30 11:33:27 +01:00
Campbell Barton
0414ed1c48 Fix for mat3_to_rot_size modifying input matrix 2014-10-30 10:37:55 +01:00