6 years agoFixed warning about redefining the __SSE__ macro in VS2013
Sybren A. Stüvel [Wed, 5 Nov 2014 16:09:27 +0000 (17:09 +0100)]
Fixed warning about redefining the __SSE__ macro in VS2013

6 years agoFix T42255: "Copy Constraints" operator has to tag the affected object
Lukas Tönne [Wed, 5 Nov 2014 13:51:02 +0000 (14:51 +0100)]
Fix T42255: "Copy Constraints" operator has to tag the affected object
and pose for depsgraph.

Otherwise the update order can be incorrect until the next sort is

6 years agoEditmesh: report a warning when fill fails
Campbell Barton [Wed, 5 Nov 2014 13:19:14 +0000 (14:19 +0100)]
Editmesh: report a warning when fill fails

also prevent assert with zero normal

6 years agoDebug: print output on --debug-fpe
Campbell Barton [Wed, 5 Nov 2014 11:27:38 +0000 (12:27 +0100)]
Debug: print output on --debug-fpe

in practice often we want to breakpoint here (instead of flooding output)
but its confusing the option does nothing in release builds.

Devs can comment out locally.

6 years agoSimplify node frame detach operators, based on T34670 by @julien.
Lukas Tönne [Wed, 5 Nov 2014 10:35:48 +0000 (11:35 +0100)]
Simplify node frame detach operators, based on T34670 by @julien.

* The `NODE_OT_parent_clear` operator has been removed. This was a very
simplistic operator that detached every selected node, which is not very
useful in case of hierarchical frames. The `NODE_OT_detach` operator
only detaches the top parent nodes in the selection, keeping the
hierarchy of selected nodes intact.

* The `ALT+P` shortcut has been reassigned to the `NODE_OT_detach`
operator which replaces the previous `NODE_OT_clear` mapping with
similar behavior (also gives a menu entry shortcut now).

* Shortcuts for `NODE_OT_detach_translate_attach` have been removed, due
to crowded and messy keymap and unintuitive shortcut `ALT+F`. This macro
operator is still registered, in case hardcore users want to make their
own keymaps, but not mapped by default. Node keymaps may need some
redesign in the future for these things.

6 years agoCode cleanup: Replace magic number with verbose name for math node operations
Sergey Sharybin [Wed, 5 Nov 2014 10:27:52 +0000 (11:27 +0100)]
Code cleanup: Replace magic number with verbose name for math node operations

Should be no functional changes, just much less cryptic code.

6 years agoCycles: Don't check shader for volume when checking if camera is inside volume
Sergey Sharybin [Tue, 4 Nov 2014 18:57:15 +0000 (19:57 +0100)]
Cycles: Don't check shader for volume when checking if camera is inside volume

Intersection code already ignores objects without volume closure so checking it
afterwards is not needed.

6 years agoFix T42411: Camera inside volume + particle dupli (object/group) doesn't work
Sergey Sharybin [Tue, 4 Nov 2014 18:55:05 +0000 (19:55 +0100)]
Fix T42411: Camera inside volume + particle dupli (object/group) doesn't work

The issue was caused by missing current object instance initialization after
object was ignored for instance push.

6 years agoBMesh dissolve: enable use_verts for edge dissolve (by default)
Campbell Barton [Tue, 4 Nov 2014 16:05:23 +0000 (17:05 +0100)]
BMesh dissolve: enable use_verts for edge dissolve (by default)

6 years agoFix T42408: FSAA affects Cycles Image Compositing
Sergey Sharybin [Tue, 4 Nov 2014 15:41:12 +0000 (20:41 +0500)]
Fix T42408: FSAA affects Cycles Image Compositing

Use FSAA settings only if current render engine is BI or GE/

That's for until we'll support FSAA in Cycles or other render engines.

6 years agoFix T42289: 'Make single user' not registered in history
Sergey Sharybin [Tue, 4 Nov 2014 13:52:38 +0000 (18:52 +0500)]
Fix T42289: 'Make single user' not registered in history

6 years agoFix-for-fix ik-spline clamp existing files too
Campbell Barton [Tue, 4 Nov 2014 13:03:58 +0000 (14:03 +0100)]
Fix-for-fix ik-spline clamp existing files too

6 years agoFix T42445: Clamp flag has no effect on result value in Math and MixRGB shader nodes...
Sergey Sharybin [Tue, 4 Nov 2014 11:50:29 +0000 (16:50 +0500)]
Fix T42445: Clamp flag has no effect on result value in Math and MixRGB shader nodes (Blender Render)

Quite striaghtforward implementation, with the only weird thing that for some reason
my video driver wasn't happy with calling the function "clamp" giving some weirdo
shader compilation error messages.

Called the GPU function clamp_val which can handle float and vec3.

6 years agoAdd utility macros to clamp all elements of 2,3,4 component vectors
Sergey Sharybin [Tue, 4 Nov 2014 11:31:42 +0000 (16:31 +0500)]
Add utility macros to clamp all elements of 2,3,4 component vectors

6 years agoCode cleanup: Replace magic constants with defines
Sergey Sharybin [Tue, 4 Nov 2014 11:28:16 +0000 (16:28 +0500)]
Code cleanup: Replace magic constants with defines

From quich search didn't see where the flags are used apart from
RNA currently, but i might have missed something.

6 years agoCycles: Remove compatibility code for OSL-1.4
Sergey Sharybin [Tue, 4 Nov 2014 10:52:41 +0000 (15:52 +0500)]
Cycles: Remove compatibility code for OSL-1.4

That code was mainly needed for the transition period, now we've
got all platforms updated to new OSL.

Plus there are some crucial fixes baking in the current upstream
sources which we'll need to have for the next Blender release.

6 years agoCycles: Be ready for new OIIO and OSL libraries
Sergey Sharybin [Tue, 4 Nov 2014 10:49:28 +0000 (15:49 +0500)]
Cycles: Be ready for new OIIO and OSL libraries

Even tho it's not 100% clear when we'll switch to OSL-1.6 we'd better
start preparing earlier for this, so we don't spend time on this later.

Plus this code helps troubleshooting some OSL issues, which requires
testing with latest versions of OSL.

6 years agoCleanup for previous own commit (sorry...)
Bastien Montagne [Tue, 4 Nov 2014 09:31:59 +0000 (10:31 +0100)]
Cleanup for previous own commit (sorry...)

6 years agoAdd missing `CustomData_duplicate_referenced_layer_n` and deduplicate code.
Bastien Montagne [Tue, 4 Nov 2014 09:06:08 +0000 (10:06 +0100)]
Add missing `CustomData_duplicate_referenced_layer_n` and deduplicate code.

CustomData_duplicate_referenced_layer_n not used in master currently, but need it
in mesh tranfer branch.

6 years agoFix use-after free (own error)
Campbell Barton [Tue, 4 Nov 2014 08:48:41 +0000 (09:48 +0100)]
Fix use-after free (own error)

6 years agoCMake: Attempted to copy manual for py-module
Campbell Barton [Tue, 4 Nov 2014 08:37:01 +0000 (09:37 +0100)]
CMake: Attempted to copy manual for py-module

6 years agoCleanup: spelling (D831)
Campbell Barton [Mon, 3 Nov 2014 22:26:43 +0000 (23:26 +0100)]
Cleanup: spelling (D831)

6 years agoFix T42233: Python property ignores 'PROPORTIONAL'
Campbell Barton [Mon, 3 Nov 2014 19:56:52 +0000 (20:56 +0100)]
Fix T42233: Python property ignores 'PROPORTIONAL'

6 years agoOptimization of parallel range
Sergey Sharybin [Mon, 3 Nov 2014 17:24:08 +0000 (18:24 +0100)]
Optimization of parallel range

It now supports different scheduling schemas: dynamic and static.
Static one is the default and it splits work into equal number of
range iterations.

Dynamic one allocates chunks of 32 iterations which then being
dynamically send to a thread which is currently idling.

This gives slightly better performance. Still some tricks are
possible to have. For example we can use some smarter static scheduling
when one thread might steal tasks from another threads when it runs
out of work to be done.

Also removed unneeded spin lock in the mesh deform evaluation,
on the first glance it seemed to be a reduction involved here but
int fact threads are just adding value to the original vertex
coordinates. No write access to the same element of  vertexCos
happens from separate threads.

6 years agoCleanup: remove rarely used IDProp iterator
Campbell Barton [Mon, 3 Nov 2014 16:04:12 +0000 (17:04 +0100)]
Cleanup: remove rarely used IDProp iterator

6 years agoCleanup: defines -> enums, bitshifts for bitflags definitions.
Bastien Montagne [Mon, 3 Nov 2014 15:48:06 +0000 (16:48 +0100)]
Cleanup: defines -> enums, bitshifts for bitflags definitions.

6 years agoFix indetation in last commit
Jens Verwiebe [Mon, 3 Nov 2014 14:06:46 +0000 (15:06 +0100)]
Fix indetation in last commit

6 years agoOSX/fsmenu: fix compiling on older gcc reported by Mike S
Jens Verwiebe [Mon, 3 Nov 2014 14:05:48 +0000 (15:05 +0100)]
OSX/fsmenu: fix compiling on older gcc reported by Mike S

6 years agoCompilation error fix for buildbot
Sergey Sharybin [Mon, 3 Nov 2014 10:24:53 +0000 (15:24 +0500)]
Compilation error fix for buildbot

Ghost depends on glew-mx, so glew-mx should be passed to linker after the ghost.

We're also using spaces for indentation in python, including scons rules.

6 years agoBMesh: arg reorder
Campbell Barton [Mon, 3 Nov 2014 07:30:33 +0000 (08:30 +0100)]
BMesh: arg reorder

6 years agoFix typo breaking compilation with SSE2.
Bastien Montagne [Sun, 2 Nov 2014 21:59:33 +0000 (22:59 +0100)]
Fix typo breaking compilation with SSE2.

Spotted by sybrenstuvel (Sybren Stüvel), thanks!

6 years agoFix connect-vertices failing for concave ngons
Campbell Barton [Sat, 1 Nov 2014 22:31:01 +0000 (23:31 +0100)]
Fix connect-vertices failing for concave ngons

Also add:
- generic callback for bmesh elements.
- ability to pass an existing array to a bmesh operator.

6 years agoOpenGL: double width lines is no-longer apple-only
Campbell Barton [Sat, 1 Nov 2014 15:16:46 +0000 (16:16 +0100)]
OpenGL: double width lines is no-longer apple-only

6 years agoFix for 3D Ruler crash maximizing view
Campbell Barton [Sat, 1 Nov 2014 15:06:14 +0000 (16:06 +0100)]
Fix for 3D Ruler crash maximizing view

6 years agoCleanup: style
Campbell Barton [Sat, 1 Nov 2014 13:31:09 +0000 (14:31 +0100)]
Cleanup: style

6 years agoCleanup: mostly use bools for booleans.
Bastien Montagne [Sat, 1 Nov 2014 21:25:57 +0000 (22:25 +0100)]
Cleanup: mostly use bools for booleans.

6 years agoCleanup/fix from latest coverity report.
Bastien Montagne [Sat, 1 Nov 2014 15:34:35 +0000 (16:34 +0100)]
Cleanup/fix from latest coverity report.

Mostly harmless things, though the 'multires' error was a real bug.

6 years agoCycles: Remove redundant alloc/free
Sergej Reich [Sat, 1 Nov 2014 14:23:14 +0000 (15:23 +0100)]
Cycles: Remove redundant alloc/free

Seems like a copy paste error.

6 years agoLibmv: Code cleanup, avoid C11 feature with structure re-definition
Sergey Sharybin [Fri, 31 Oct 2014 22:18:40 +0000 (03:18 +0500)]
Libmv: Code cleanup, avoid C11 feature with structure re-definition

6 years agoCycles: Code cleanup, proper class vs. struct declaration
Sergey Sharybin [Fri, 31 Oct 2014 22:09:46 +0000 (03:09 +0500)]
Cycles: Code cleanup, proper class vs. struct declaration

6 years agoLibmv: Code cleanup, mixed class/struct in declaration/definition
Sergey Sharybin [Fri, 31 Oct 2014 21:53:36 +0000 (02:53 +0500)]
Libmv: Code cleanup, mixed class/struct in declaration/definition

6 years agoCleanup: Remove unused light function.
Thomas Dinges [Fri, 31 Oct 2014 21:54:05 +0000 (22:54 +0100)]
Cleanup: Remove unused light function.

6 years agoOptimize vertex parent for edit mode without modifiers
Sergey Sharybin [Fri, 31 Oct 2014 19:15:32 +0000 (20:15 +0100)]
Optimize vertex parent for edit mode without modifiers

No need to run lookup on the origindex in this case at all.

6 years agoOptimize vertex parent in cases there are only deform and SS modifiers
Sergey Sharybin [Fri, 31 Oct 2014 19:06:19 +0000 (20:06 +0100)]
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.

6 years agoSCons: Expose missing command line arguments controlling GLEW
Sergey Sharybin [Fri, 31 Oct 2014 17:34:25 +0000 (22:34 +0500)]
SCons: Expose missing command line arguments controlling GLEW

6 years agoFix T42349: Windows Render command line Cycles Crash
Sergey Sharybin [Fri, 31 Oct 2014 17:28:39 +0000 (22:28 +0500)]
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.

6 years agoDisable GLEW_MX in scons
Sergey Sharybin [Fri, 31 Oct 2014 17:12:21 +0000 (22:12 +0500)]
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?

6 years agoFollowup to rB154af70f2b5b7b: always 'pack in' ongoing versionning code when bumping...
Bastien Montagne [Fri, 31 Oct 2014 17:26:58 +0000 (18:26 +0100)]
Followup to rB154af70f2b5b7b: always 'pack in' ongoing versionning code when bumping version.

6 years agoThemes auto-update from py script.
Bastien Montagne [Fri, 31 Oct 2014 17:14:20 +0000 (18:14 +0100)]
Themes auto-update from py script.

6 years agoFix T42454: Themes: Some colors were missed somehow in an update two years ago.
Bastien Montagne [Fri, 31 Oct 2014 17:12:28 +0000 (18:12 +0100)]
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!

6 years agoFix T42432: Correct BLENDER_SUBVERSION
julianeisel [Fri, 31 Oct 2014 16:54:18 +0000 (17:54 +0100)]

Bump up BLENDER_SUBVERSION to 2 to allow saving of widget emboss.

6 years agoCleanup: naming
Campbell Barton [Fri, 31 Oct 2014 14:32:59 +0000 (15:32 +0100)]
Cleanup: naming

6 years agoCode cleanup: synchronize const qualifiers between declaration and definition
Sergey Sharybin [Fri, 31 Oct 2014 15:17:02 +0000 (16:17 +0100)]
Code cleanup: synchronize const qualifiers between declaration and definition

6 years agoCode cleanup: Remove unused variable
Sergey Sharybin [Fri, 31 Oct 2014 15:13:13 +0000 (16:13 +0100)]
Code cleanup: Remove unused variable

6 years agoCompositor: Don't let HSV correction to output negative colors
Sergey Sharybin [Fri, 31 Oct 2014 13:51:59 +0000 (14:51 +0100)]
Compositor: Don't let HSV correction to output negative colors

6 years agoFix T42391: HSV correction shader node gives negative values
Sergey Sharybin [Fri, 31 Oct 2014 13:42:48 +0000 (14:42 +0100)]
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.

6 years agoTexture Paint Add Simple UVs:
Antony Riakiotakis [Fri, 31 Oct 2014 13:37:36 +0000 (14:37 +0100)]
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.

6 years agoFix T42277: Apply track's mask on displaying preview not working
Sergey Sharybin [Fri, 31 Oct 2014 11:59:55 +0000 (12:59 +0100)]
Fix T42277: Apply track's mask on displaying preview not working

6 years agoFix T42344: EWA filter produces blured results
Sergey Sharybin [Fri, 31 Oct 2014 11:35:20 +0000 (12:35 +0100)]
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.

6 years agoFix T42401: Gaussian blur node is visibly squared-off at larger sizes
Sergey Sharybin [Fri, 31 Oct 2014 11:15:38 +0000 (12:15 +0100)]
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.

6 years agoFix T42447: Shrinkwrap constraint: mismatch in handling sclaing in projection case.
Bastien Montagne [Fri, 31 Oct 2014 10:07:52 +0000 (11:07 +0100)]
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.

6 years agoRevert "Scons/funstuff: notify when the binaries are compiled"
Campbell Barton [Fri, 31 Oct 2014 09:35:33 +0000 (10:35 +0100)]
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.

6 years agoView3d - walk: expose gravity toggle to keymap
Dalai Felinto [Fri, 31 Oct 2014 00:16:43 +0000 (22:16 -0200)]
View3d - walk: expose gravity toggle to keymap

6 years agoCleanup: use function to calc shell thickness
Campbell Barton [Thu, 30 Oct 2014 21:31:03 +0000 (22:31 +0100)]
Cleanup: use function to calc shell thickness

6 years agoRemove leftover error prints.
Antony Riakiotakis [Thu, 30 Oct 2014 20:48:44 +0000 (21:48 +0100)]
Remove leftover error prints.

6 years agoFix T42431 lagging on texture painting.
Antony Riakiotakis [Thu, 30 Oct 2014 20:47:25 +0000 (21:47 +0100)]
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!

6 years agoLibmv: Support disabled color channels in tracking settings
Sergey Sharybin [Thu, 30 Oct 2014 18:13:53 +0000 (23:13 +0500)]
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.

6 years agoLibmv: Replace region tracker with autotracker in Blender
Sergey Sharybin [Sun, 22 Jun 2014 14:19:48 +0000 (20:19 +0600)]
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.

6 years agoLibmv: Add autotrack API to the C-API
Sergey Sharybin [Sun, 22 Jun 2014 08:53:21 +0000 (14:53 +0600)]
Libmv: Add autotrack API to the C-API

Pretty much straightforward changes, nothing to be mentioned specially.

6 years agoLibmv: Initial commit of unfinished AutoTrack API
Keir Mierle [Sun, 22 Jun 2014 08:34:23 +0000 (14:34 +0600)]
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.

6 years agoFix project-file generators (didn't close files)
Campbell Barton [Thu, 30 Oct 2014 17:24:57 +0000 (18:24 +0100)]
Fix project-file generators (didn't close files)

6 years agoAdd a few more warnings so coders hopefully will take note that event
Antony Riakiotakis [Thu, 30 Oct 2014 15:16:29 +0000 (16:16 +0100)]
Add a few more warnings so coders hopefully will take note that event
codes get stored in keymaps and should not be changed

6 years agoComplementary fix for rB8054372: Follow the common naming scheme by
Lukas Tönne [Thu, 30 Oct 2014 14:26:41 +0000 (15:26 +0100)]
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

6 years agoFix issue in fullscreen patch.
Antony Riakiotakis [Thu, 30 Oct 2014 14:24:56 +0000 (15:24 +0100)]
Fix issue in fullscreen patch.

Don't change old event codes! Keymap diffing depends on those being the
same across versions to work.

6 years agoMath Lib: pseudoinverse_m4_m4 changed input matrix
Campbell Barton [Thu, 30 Oct 2014 13:49:57 +0000 (14:49 +0100)]
Math Lib: pseudoinverse_m4_m4 changed input matrix

6 years agoTransform: snapping: normal-align: Cleanup!
Bastien Montagne [Thu, 30 Oct 2014 11:54:05 +0000 (12:54 +0100)]
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).

6 years agoMath Lib: add transpose_m3_m3, m3_m4, m4_m4
Campbell Barton [Thu, 30 Oct 2014 11:13:00 +0000 (12:13 +0100)]
Math Lib: add transpose_m3_m3, m3_m4, m4_m4

6 years agoCycles / CUDA: Better fix for missing sm_52 kernel, in case user compiles himself.
Thomas Dinges [Thu, 30 Oct 2014 10:42:59 +0000 (11:42 +0100)]
Cycles / CUDA: Better fix for missing sm_52 kernel, in case user compiles himself.

6 years agoCycles / OSL: Support microfacet() closure color function from OSL 1.5
Thomas Dinges [Thu, 30 Oct 2014 10:33:27 +0000 (11:33 +0100)]
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);
        BSDF = Color * microfacet("beckmann", Normal, Tangent, RoughnessU, RoughnessV, IOR, Refract);

6 years agoFix for mat3_to_rot_size modifying input matrix
Campbell Barton [Thu, 30 Oct 2014 09:37:27 +0000 (10:37 +0100)]
Fix for mat3_to_rot_size modifying input matrix

6 years agoFix negate_m3 (taking 4x4 matrix)
Campbell Barton [Thu, 30 Oct 2014 09:26:22 +0000 (10:26 +0100)]
Fix negate_m3 (taking 4x4 matrix)

Cycles bake used incorrectly.

6 years agoDeduplicate some code by using a function pointer to the real kernel
Martijn Berger [Thu, 30 Oct 2014 09:17:42 +0000 (10:17 +0100)]
Deduplicate some code by using a function pointer to the real kernel
This has no performance impact what so ever and is already used in the adaptive sampling patch

6 years agoFix T42444: Neg scale rotated object flips 2x axis
Campbell Barton [Thu, 30 Oct 2014 09:15:43 +0000 (10:15 +0100)]
Fix T42444: Neg scale rotated object flips 2x axis

This is a very old bug and a few attempts have been made to fix it before,
Old code was checking worldspace axis flipping, instead of axis flipping WRT the axis-alignment of the object.

6 years agoFix T42441: Smoke doesn't render in 3DView if domain object's maximum draw type is...
Bastien Montagne [Thu, 30 Oct 2014 08:34:17 +0000 (09:34 +0100)]
Fix T42441: Smoke doesn't render in 3DView if domain object's maximum draw type is set to "wire"

Added an exception in convertblender.c's is_object_hidden(), so that an object with active
smoke modifier is never considered hidden.

6 years agoUI: Fix tooltip text color not resetting correctly
julianeisel [Thu, 30 Oct 2014 00:50:48 +0000 (01:50 +0100)]
UI: Fix tooltip text color not resetting correctly

The "Reset to Default Theme" operator didn't reset the tooltip text color correctly.

6 years agoUI: let multi-num-drag change different ID values
Campbell Barton [Wed, 29 Oct 2014 21:35:09 +0000 (22:35 +0100)]
UI: let multi-num-drag change different ID values

Handy for property-chart addon.

6 years agoFix T42395: Stored "render data" in particles mismatches the particle
Lukas Tönne [Wed, 29 Oct 2014 17:47:11 +0000 (18:47 +0100)]
Fix T42395: Stored "render data" in particles mismatches the particle
amount and crashes after Cycles render.

This is a hack to fix this, but at this point the system is hopelessly
broken anyway and no good fix other than total rewriting is possible.

6 years agoCorrect stub
Campbell Barton [Wed, 29 Oct 2014 16:27:01 +0000 (17:27 +0100)]
Correct stub

6 years agoFix T42294: Bullet rigidbody point cache reading was using uninitialized
Lukas Tönne [Wed, 29 Oct 2014 13:59:29 +0000 (14:59 +0100)]
Fix T42294: Bullet rigidbody point cache reading was using uninitialized
key values for velocity.

6 years agoCleanup: warnings, typos
Campbell Barton [Wed, 29 Oct 2014 13:11:19 +0000 (14:11 +0100)]
Cleanup: warnings, typos

6 years agoFix for Ctrl+Del/Backspace not setting text dirty
Campbell Barton [Wed, 29 Oct 2014 12:51:27 +0000 (13:51 +0100)]
Fix for Ctrl+Del/Backspace not setting text dirty

6 years agoFix T42394: Copy Rigid Body Tools would not work as expected if dest ob had no rigidb...
Bastien Montagne [Wed, 29 Oct 2014 12:06:08 +0000 (13:06 +0100)]
Fix T42394: Copy Rigid Body Tools would not work as expected if dest ob had no rigidbody yet.

Adding new object to RigidBodyWorld obgroup is not a good way to do that, since it only
takes effect (create rigid_body for new objects) when you change current frame.

Better to use rigidbody.object_add() operator here!

6 years agoFix T42389: Removed outdated comment from example script.
Lukas Tönne [Wed, 29 Oct 2014 12:05:21 +0000 (13:05 +0100)]
Fix T42389: Removed outdated comment from example script.

There was some confusion about the bl_icon attribute being optional. In
fact the functionality for hiding a tree type in the editor header is
now controlled by writing a poll function for the tree type instead,
which is more flexible and clean.

6 years agoCycles: Optimize math node without links to a single value node
Sergey Sharybin [Sun, 26 Oct 2014 14:40:04 +0000 (19:40 +0500)]
Cycles: Optimize math node without links to a single value node

Pretty straightforward implementation. Just needed to move some functions
around to make them available at shader compile time.

6 years agoCycles: Add a soft min/max UI value for volume step size, usually a range from 0...
Thomas Dinges [Wed, 29 Oct 2014 11:15:29 +0000 (12:15 +0100)]
Cycles: Add a soft min/max UI value for volume step size, usually a range from 0.01 to 1.0 is fine.

6 years agoRevert "Fix T42222"
Campbell Barton [Wed, 29 Oct 2014 10:10:07 +0000 (11:10 +0100)]
Revert "Fix T42222"

This reverts commit 507712db3fd7aa7bb903f6860f5a4eb29aa2be02.

Error was quite an old compiler, which had further warnings/errors.

Old compilers can just have this defined in BLI_math

6 years agoCleanup: Style fixes for closures, mainly bitflags and conditions.
Thomas Dinges [Wed, 29 Oct 2014 08:56:21 +0000 (09:56 +0100)]
Cleanup: Style fixes for closures, mainly bitflags and conditions.

6 years agoCleanup: Remove unused function in Translucent BSDF.
Thomas Dinges [Wed, 29 Oct 2014 08:42:19 +0000 (09:42 +0100)]
Cleanup: Remove unused function in Translucent BSDF.

6 years agoPlayer: fix conflicting type introduced in 2f0bdcb306999
Jens Verwiebe [Tue, 28 Oct 2014 20:39:54 +0000 (21:39 +0100)]
Player: fix conflicting type introduced in 2f0bdcb306999

6 years agoOSX/GHOST: fix T42305, appswitching not reliable, proposed by Fabio Arnold
Jens Verwiebe [Tue, 28 Oct 2014 19:43:52 +0000 (20:43 +0100)]
OSX/GHOST: fix T42305, appswitching not reliable, proposed by Fabio Arnold