5 years agoCycles: Make kernel compilable for 3.7 compute capability
Sergey Sharybin [Thu, 28 Jan 2016 10:56:09 +0000 (11:56 +0100)]
Cycles: Make kernel compilable for 3.7 compute capability

It is used by GK210 GPUs which could be found in, i.e. Tesla K80.

5 years agoFix/Workaround T46412: Defocus node not working on Windows 32 bit
Sergey Sharybin [Thu, 28 Jan 2016 10:39:17 +0000 (11:39 +0100)]
Fix/Workaround T46412: Defocus node not working on Windows 32 bit

The issue was caused by some functions in compositor returning
garbage values. Partially the issue was caused by vc12_xp toolset
we're using, but even with regular vc120 toolset nodes like bokeh
image did not work correct.

This is a bit weird solution, which could indicate some sort
of compiler bug, but is also actually makes sense because we do
use SSE intrinsics in the compositor now. Maybe it all gets
interfered in some way.

In any case, if someone wants to find a real solution for the
issue please go ahead.

This shouldn't have affect on supported platform because we
already demand CPU to have SSE2 support.

5 years agoWM: allow filesel to execute a modal operator
Campbell Barton [Thu, 28 Jan 2016 08:52:49 +0000 (19:52 +1100)]
WM: allow filesel to execute a modal operator

5 years agoOpenGL: optimize ED_screen_draw
Mike Erwin [Thu, 28 Jan 2016 07:51:22 +0000 (02:51 -0500)]
OpenGL: optimize ED_screen_draw

One draw call for all screen area outlines instead of one per line.
(Two for retina displays)

One draw call for area split line instead of two.

En/Disable GL_BLEND once for area join arrow instead of twice.

5 years agocleanup: spelling, comments, alignment
Mike Erwin [Thu, 28 Jan 2016 06:35:50 +0000 (01:35 -0500)]
cleanup: spelling, comments, alignment

fixed pet peeve “frustrum” and other non-functional changes.

5 years agoCleanup: warnings & style
Campbell Barton [Thu, 28 Jan 2016 06:23:12 +0000 (17:23 +1100)]
Cleanup: warnings & style

5 years agocleanup: spelling / typos
Mike Erwin [Thu, 28 Jan 2016 05:30:50 +0000 (00:30 -0500)]
cleanup: spelling / typos

no functional changes

5 years agoUsual i18n/UI messages fixes.
Bastien Montagne [Wed, 27 Jan 2016 21:20:26 +0000 (22:20 +0100)]
Usual i18n/UI messages fixes.

5 years agoFix T47252: FileBrowser: buffer overflow with scripts defining too long 'filter_glob...
Bastien Montagne [Wed, 27 Jan 2016 17:04:50 +0000 (18:04 +0100)]
Fix T47252: FileBrowser: buffer overflow with scripts defining too long 'filter_glob' string.

Fixed this with three changes:
* filter_glob is now 255 char max (63 could be a bit limited in some rare cases).
* IO templates now explicitely define max len of that property (such that scripters are aware of the limit).
* ED_fileselect_set_params() is now safe regarding too long strings from a 'filter_glob' op property.

5 years agoFix clear keyframes op not reporting when called over a locked fcurve.
Bastien Montagne [Wed, 27 Jan 2016 16:23:55 +0000 (17:23 +0100)]
Fix clear keyframes op not reporting when called over a locked fcurve.

Debug print here is not that useful to common user, and keyframe deletion
does report warning, so do the same for clear op.

Reported by venomgfx over IRC, thanks.

5 years agoTracking: Remove unfinished code from automation experiments
Sergey Sharybin [Wed, 27 Jan 2016 15:25:22 +0000 (16:25 +0100)]
Tracking: Remove unfinished code from automation experiments

5 years agoTracking: Update plane track solution after joining point tracks
Sergey Sharybin [Wed, 27 Jan 2016 15:20:17 +0000 (16:20 +0100)]
Tracking: Update plane track solution after joining point tracks

Was in fact long term TODO, it all should work fine now.

5 years agoTracking: De-duplicate code for tracking a sequence and single frame
Sergey Sharybin [Wed, 27 Jan 2016 15:01:20 +0000 (16:01 +0100)]
Tracking: De-duplicate code for tracking a sequence and single frame

It was not so much better from performance point of view to have
a special case here and it only made us having two entry points
to the same things, which was rather annoying.

Should no be functional changes for artists.

5 years agoTracking: Solve some TODOs
Sergey Sharybin [Wed, 27 Jan 2016 13:27:37 +0000 (14:27 +0100)]
Tracking: Solve some TODOs

Should not be functional changes.

5 years agoAtomics: Use _InterlockedAnd8 direction for 342bit MSVC
Sergey Sharybin [Wed, 27 Jan 2016 13:16:02 +0000 (14:16 +0100)]
Atomics: Use _InterlockedAnd8 direction for 342bit MSVC

That's what MSDN tells you to do and that's how to solve the compilation
error problem with it.

5 years agoTracking: Remove code which was dead for quite some time now
Sergey Sharybin [Wed, 27 Jan 2016 13:13:19 +0000 (14:13 +0100)]
Tracking: Remove code which was dead for quite some time now

5 years agoTracking: Cleanup, de-duplicate some code
Sergey Sharybin [Wed, 27 Jan 2016 13:06:55 +0000 (14:06 +0100)]
Tracking: Cleanup, de-duplicate some code

5 years agoBuildbot: Enable OpenVDB BLOSC for the Linux builders
Sergey Sharybin [Wed, 27 Jan 2016 11:49:42 +0000 (12:49 +0100)]
Buildbot: Enable OpenVDB BLOSC for the Linux builders

5 years agoOpenVDB: Get rid of hardcoded TBB variables and enabled for Linux buildbot
Sergey Sharybin [Wed, 27 Jan 2016 11:26:26 +0000 (11:26 +0000)]
OpenVDB: Get rid of hardcoded TBB variables and enabled for Linux buildbot

5 years agoOMP -> BLI_task: BKE's pbvh.c
Bastien Montagne [Wed, 27 Jan 2016 11:14:00 +0000 (12:14 +0100)]
OMP -> BLI_task: BKE's pbvh.c

Should be the last bit of sculpt/paint code, now this is fully using BLI_task.

Note that PBVH normals update is now about 20% quicker than with OMP code
(from 27ms to 21ms with a big stroke over a 500k vertices monkey), even though
a missing thread-protection was added... atomic primitives ftw!

For the records, with the missing `#pragma omp critical` section added,
previous code was like four times slower (above 100ms).

5 years agoPIL_time_utiledefines: add TIMEIT_AVERAGED variants to block timing macros.
Bastien Montagne [Wed, 27 Jan 2016 10:48:30 +0000 (11:48 +0100)]
PIL_time_utiledefines: add TIMEIT_AVERAGED variants to block timing macros.

This variant behave exactly as TIMEIT_START etc., but it also sums up all times in
a static var and prints out average execution time - very useful when dealing
with small/quick pieces of code that get executed often, to get some meaningful results.

5 years agoatomic_ops: add atomic_fetch_and_and_uint8 wrapper.
Bastien Montagne [Wed, 27 Jan 2016 10:46:27 +0000 (11:46 +0100)]
atomic_ops: add atomic_fetch_and_and_uint8 wrapper.

Needed by incomming changes in pbvh.c.

Note that we make it much simpler than for other primitives in this file - think
we could revise its content to make it simpler one day...

5 years agoFix T46624: Preview is not always correctly updated
Sergey Sharybin [Wed, 27 Jan 2016 10:04:21 +0000 (11:04 +0100)]
Fix T46624: Preview is not always correctly updated

It is possible that preview was not updated to correspond a
new context when width of preview is the same for two contexts.

5 years agoSequencer: Fix crash when trying to change filepath of Sound strip
Sergey Sharybin [Wed, 27 Jan 2016 10:01:41 +0000 (11:01 +0100)]
Sequencer: Fix crash when trying to change filepath of Sound strip

It was not implemented and fallback RNA-based approach was not
correct since there's no filepath property of sound strip.

5 years agoBuildbot: Fix for missing spnav for Linux builds
Sergey Sharybin [Wed, 27 Jan 2016 09:21:51 +0000 (10:21 +0100)]
Buildbot: Fix for missing spnav for Linux builds

5 years agoFix T47250: OpenVDB crash
Kévin Dietrich [Wed, 27 Jan 2016 09:13:31 +0000 (10:13 +0100)]
Fix T47250: OpenVDB crash

Issue was that the domain matrix was not initialized properly on the
first frame (in smokeModifier_init), which caused OpenVDB to throw an
exception for trying to create a VDB grid with non-affine transform.

5 years agoWorld textures displaying for viewport in BI.
Alexander Romanov [Wed, 27 Jan 2016 09:06:57 +0000 (12:06 +0300)]
World textures displaying for viewport in BI.

This patch supports "Image or Movie" and "Environment map" types of world texture for the viewport.
It supports:

  - "View", "AngMap" and "Equirectangular" types of mapping.

  - Different types of texture blending (according to BI world render).

  - Same color blending as when it lacked textures (but render via glsl).


Example: {F275180}
Original author: @valentin_b4w

Alexander (Blend4Web Team).

Reviewers: sergey, valentin_b4w, brecht, merwin

Reviewed By: merwin

Subscribers: campbellbarton, merwin, blueprintrandom, youle, a.romanov, yurikovelenov, AlexKowel, Evgeny_Rodygin

Projects: #rendering, #opengl_gfx, #bf_blender:_next

Differential Revision:

5 years agoWM: Support showing reports for modal operators
Campbell Barton [Wed, 27 Jan 2016 06:33:35 +0000 (17:33 +1100)]
WM: Support showing reports for modal operators

This isn't common use, but modal operators may make reports while they're running.
Now they're displayed in the info header.

5 years agoNDOF: enable 3D mouse support on Mac by default
Mike Erwin [Wed, 27 Jan 2016 02:08:57 +0000 (21:08 -0500)]
NDOF: enable 3D mouse support on Mac by default

We used to require the 3Dconnexion driver installed at build-time so
this was turned off.

I reworked the code last year to remove the driver dependency so
there’s no reason not to enable this.

5 years agoFix bplayer (c)
Bastien Montagne [Tue, 26 Jan 2016 21:01:30 +0000 (22:01 +0100)]
Fix bplayer (c)

5 years agoCleanup: forgot to comment again debug timing print in paint_stroke.c
Bastien Montagne [Tue, 26 Jan 2016 20:58:54 +0000 (21:58 +0100)]
Cleanup: forgot to comment again debug timing print in paint_stroke.c

5 years agoCleanup: remove OMP's 'critical' sections in BKE_pbvh_node_add_proxy/free_proxies.
Bastien Montagne [Tue, 26 Jan 2016 13:30:44 +0000 (14:30 +0100)]
Cleanup: remove OMP's 'critical' sections in BKE_pbvh_node_add_proxy/free_proxies.

Not so useful now that we use BLI_task! Not sure why those were ever added actually,
readng carefully that code only modified data here is the PBVHNode, which is only
used/affected by one thread at a time ever. And shared read data (PBVH itself) is
not modified during brush execution itself, so it's safe to use it threaded too.

5 years agoMinor correction to API docs
Campbell Barton [Tue, 26 Jan 2016 20:51:53 +0000 (07:51 +1100)]
Minor correction to API docs

5 years agoCleanup: minmac -> minmax & RE_render_ext naming
Campbell Barton [Tue, 26 Jan 2016 20:32:48 +0000 (07:32 +1100)]
Cleanup: minmac -> minmax & RE_render_ext naming

Use more conventional API word-ordering for RE_render_ext

5 years agoCMake: Correction in comment in previous commit
Sergey Sharybin [Tue, 26 Jan 2016 14:42:53 +0000 (15:42 +0100)]
CMake: Correction in comment in previous commit

5 years agoCMake: Corrections around disabling Boost
Sergey Sharybin [Tue, 26 Jan 2016 14:41:06 +0000 (15:41 +0100)]
CMake: Corrections around disabling Boost

Were some missing dependencies in the checks.

5 years agoFix bplayer (c)
Bastien Montagne [Tue, 26 Jan 2016 13:03:53 +0000 (14:03 +0100)]
Fix bplayer (c)

5 years agomesh_evaluate.c: OMP -> BLI_task, and some more parallelization.
Bastien Montagne [Tue, 26 Jan 2016 09:15:08 +0000 (10:15 +0100)]
mesh_evaluate.c: OMP -> BLI_task, and some more parallelization.

Only concerns poly normals computing, have usual 10% speedup of affected code for OMP -> BLI_task switching.

Also parallelized the 'weighted accum' part (used when computing both polys and vertices normals,
when using modifiers e.g.), which gives nice 325% speedup (from 66ms to 20ms for a 500k poly monkey
with simple deform modifier e.g.). ;)

5 years agoFix T46679: ZMask layers don't update w/ animation
Campbell Barton [Tue, 26 Jan 2016 12:29:51 +0000 (23:29 +1100)]
Fix T46679: ZMask layers don't update w/ animation

Make sure z-mask layers aren't excluded for animation evaluation.

5 years agoFix T47214: Keyed Particles don't render correctly when used for point density input
Sergey Sharybin [Tue, 26 Jan 2016 11:50:55 +0000 (12:50 +0100)]
Fix T47214: Keyed Particles don't render correctly when used for point density input

The issue was caused by different AABB used by Cycles and texture sampler.

Instead of trying to keep this two functions in sync we now do have an
utility call in the point density node to query the AABB.

5 years agoCMake: Keep Schur specializations OFF by default config
Sergey Sharybin [Tue, 26 Jan 2016 10:47:53 +0000 (11:47 +0100)]
CMake: Keep Schur specializations OFF by default config

Now when doing full build is real easy on all platforms, we can
only keep it enabled for the blender_full configuration.

5 years agoCompositor: Speedup movie (un)distortion operation
Sergey Sharybin [Tue, 26 Jan 2016 10:42:55 +0000 (11:42 +0100)]
Compositor: Speedup movie (un)distortion operation

Avoid per-pixel camera intrincs object construction and synchronization.

Here on a bit synthetic file it gives about 40% speedup with a single node.

5 years agoFix compilation error after recent luma changes on certain platforms
Sergey Sharybin [Tue, 26 Jan 2016 08:57:25 +0000 (09:57 +0100)]
Fix compilation error after recent luma changes on certain platforms

See T47243 for some more details.

5 years agoCorrect commented printfs
Campbell Barton [Mon, 25 Jan 2016 21:05:20 +0000 (08:05 +1100)]
Correct commented printfs

5 years agoUpgrade Bullet to version 2.83.
Brecht Van Lommel [Sun, 17 Jan 2016 20:35:32 +0000 (21:35 +0100)]
Upgrade Bullet to version 2.83.

I tried to carefully preserve all patches since the last upgrade.

Improves T47195, cloth collision detection bug.

Differential Revision:

5 years agoCorrect own error in recent BVH nearest ray
Campbell Barton [Mon, 25 Jan 2016 20:36:32 +0000 (07:36 +1100)]
Correct own error in recent BVH nearest ray

5 years agoFix T46456: Crash when aborting stroke while using dyntopo.
Bastien Montagne [Mon, 25 Jan 2016 19:22:30 +0000 (20:22 +0100)]
Fix T46456: Crash when aborting stroke while using dyntopo.

Basically, the 'fake undo' restoring orig coordinates in this case cannot work with dyntopo,
since it assumes nothing was added/removed.

For now, just prevent this 'restoration' when dyntopo is used, this is no ideal solution
from user PoV - but it's better than plain ugly crash!

Complete solution seems much more involved and outside of scope of bug handling, added a TODO note:

5 years agoFix various potential bugs from coverity reports (NULL dereference, negative number...
Bastien Montagne [Mon, 25 Jan 2016 15:55:08 +0000 (16:55 +0100)]
Fix various potential bugs from coverity reports (NULL dereference, negative number assigned to uint...).

Note: the wm_jobs needs proper fix, we cannot have that kind of inconsistencies in some 'public' API!

5 years agoSmoke viewport: also draw voxel size indicator when adaptive domain is
Kévin Dietrich [Mon, 25 Jan 2016 14:05:45 +0000 (15:05 +0100)]
Smoke viewport: also draw voxel size indicator when adaptive domain is
not used.

This is kinda how it was in the openvdb branch but was accidentaly put
in the adaptive domain draw scope during final review.

5 years agoImBuf: Make luminance calculation inlined
Sergey Sharybin [Tue, 19 May 2015 16:03:24 +0000 (21:03 +0500)]
ImBuf: Make luminance calculation inlined

Title actually tells it all, it is rather simple function which totally makes
sense to be inlined.

This gives up to 5% of speedup when updating scopes for a large image.

Reviewers: campbellbarton

Differential Revision:

5 years agoFix T46902: Revert zeroing velocity in BGE logic brick
Sybren A. Stüvel [Mon, 25 Jan 2016 12:43:28 +0000 (13:43 +0100)]
Fix T46902: Revert zeroing velocity in BGE logic brick

This reverts commit 3dbc123061aa063efd1fca358f5e295b0ce7b302, "BGE:
allow setting velocity to zero in a motion actuator" as it caused more
issues than it solved. Zeroing linear or angular velocity with logic
bricks is discussed further in

5 years agoCorrect line-width for armatures
Campbell Barton [Mon, 25 Jan 2016 11:20:13 +0000 (22:20 +1100)]
Correct line-width for armatures

5 years agoFix T47233: fcurves.find() won't work with drivers
Joshua Leung [Mon, 25 Jan 2016 11:11:10 +0000 (00:11 +1300)]
Fix T47233: fcurves.find() won't work with drivers

Doing something like:["Cube.001"].data.shape_keys.animation_data.drivers.find('eval_time')

wouldn't work, because the drivers.find(datapath, index) method wasn't implemented
yet. Previously, it was only implemented for FCurves in actions.

5 years agoKeep image dimension used by space image and some other tools sync
Sergey Sharybin [Mon, 25 Jan 2016 11:04:50 +0000 (12:04 +0100)]
Keep image dimension used by space image and some other tools sync

When using an empty render result (after re-opening the file, i.e.)
some tools (like masking) could have used wrong image resolution
because of not being aware of special cases supported by the image
space to display the render result.

This should fix selecting mask points when mask is opened op top
if an empty render result.

5 years agoA few urgent glLineWidth fixes for anim editors
Joshua Leung [Mon, 25 Jan 2016 10:45:45 +0000 (23:45 +1300)]
A few urgent glLineWidth fixes for anim editors

This fixes some of the issues noted by venomgfx that were caused by

Specifically, this commit fixes:
* Timeline: Keyframe lines
* Graph Editor: Curves and Handles

5 years agoSequencer: Add option to use absolute mask animation time
Sergey Sharybin [Mon, 25 Jan 2016 10:16:49 +0000 (11:16 +0100)]
Sequencer: Add option to use absolute mask animation time

This is handy for cases when mask is created on top of the edit and
used for tasks like color grading and other enhancement.

That was the main purpose of the masks which was totally broken in
6786ef6. Now it's possible to have masks created as both a part of
input movie roto process (which then better be re-mapped to the strip
timing) and as a grading tool (which should be using scene timing
for the animation).

Thanks artists from the Nieve for screaming about such a broken case.

5 years agoDocs: quiet warnings in reference doc syntax
Campbell Barton [Mon, 25 Jan 2016 09:25:56 +0000 (20:25 +1100)]
Docs: quiet warnings in reference doc syntax

5 years agoDocs: avoid plank comma in API reference
Campbell Barton [Mon, 25 Jan 2016 09:25:28 +0000 (20:25 +1100)]
Docs: avoid plank comma in API reference

5 years agoFix T47218: OpenGL render with missing alpha, due to recent OpenGL refactoring.
Brecht Van Lommel [Mon, 25 Jan 2016 08:32:17 +0000 (09:32 +0100)]
Fix T47218: OpenGL render with missing alpha, due to recent OpenGL refactoring.

Patch by Ralf Hölzemer.

5 years agoTransform: optimize vertex snap w/ nearest-to-ray
Germano Cavalcante [Mon, 25 Jan 2016 07:18:42 +0000 (18:18 +1100)]
Transform: optimize vertex snap w/ nearest-to-ray

Use BLI_bvhtree_find_nearest_to_ray for vertex snapping,
avoids doing screen-space lookup on each vertex.

5 years agoBLI_kdopbvh: Add BLI_bvhtree_find_nearest_to_ray
Germano Cavalcante [Mon, 25 Jan 2016 07:18:30 +0000 (18:18 +1100)]
BLI_kdopbvh: Add BLI_bvhtree_find_nearest_to_ray

Support for casting a ray through all nodes to find the closest
(not the first hit as with ray casting).

5 years agoMath Lib: Add dist_squared_ray_to_aabb_v3 utility
Germano Cavalcante [Mon, 25 Jan 2016 07:17:45 +0000 (18:17 +1100)]
Math Lib: Add dist_squared_ray_to_aabb_v3 utility

5 years agoFix regression in sequencer overlay draw option
Campbell Barton [Mon, 25 Jan 2016 00:41:13 +0000 (11:41 +1100)]
Fix regression in sequencer overlay draw option

Drawing alpha backdrop would obscure image data behind the overlay.

5 years agoCorrect fix for T47047
Campbell Barton [Sun, 24 Jan 2016 21:33:22 +0000 (08:33 +1100)]
Correct fix for T47047

Caused new 2d views to initialize w/o scrollbars

5 years agoFix lock release deadlock when acquiring pass with no data ready yet
Sergey Sharybin [Sun, 24 Jan 2016 20:25:52 +0000 (01:25 +0500)]
Fix lock release deadlock when acquiring pass with no data ready yet

There is no reason to do separate image buffer release when there's
found buffer but with empty rects because of the following reasons:

- All the acquire() calls are followed with corresponding release()
  calls, regardless of whether image buffer was empty, missing or

- It was done wrong -- since lock was passed as NULL, it'll only
  de-reference the image buffer itself, this causes following:

  * Wrong user counter since there'll subsequent release() call with
    the proper lock passed to it.
  * Global locks are to be released prior to the spin locks,
    and such an extra release violated this rule.

5 years agoFix missing render result release when alt-wheeling render pass menu
Sergey Sharybin [Sun, 24 Jan 2016 20:23:02 +0000 (01:23 +0500)]
Fix missing render result release when alt-wheeling render pass menu

5 years agoFix T47210: Compostiting, Bad AA using distort + undistort nodes
Sergey Sharybin [Sun, 24 Jan 2016 19:25:38 +0000 (00:25 +0500)]
Fix T47210: Compostiting, Bad AA using distort + undistort nodes

Compositor tried to be too much smart and avoid unneeded re-calculations of
the distortion model, but the way it was implemented is by falling back to
the nearest interpolation first.

We can't really cheat here, better to just look into faster models estimation.

5 years agoFix T47217: Crash when tracking specific scene
Sergey Sharybin [Sun, 24 Jan 2016 18:38:24 +0000 (23:38 +0500)]
Fix T47217: Crash when tracking specific scene

5 years agoFix yet another case broken after glLineWidth() changes
Sergey Sharybin [Sun, 24 Jan 2016 18:15:58 +0000 (23:15 +0500)]
Fix yet another case broken after glLineWidth() changes

Original patch didn't have any tests or what? =\

5 years agoCycles: Tweak Cycles samples again.
Thomas Dinges [Sun, 24 Jan 2016 12:31:07 +0000 (13:31 +0100)]
Cycles: Tweak Cycles samples again.

Now we use 128 for final, and 32 for preview. These values should be a bit
better (power of two, also faster with CMJ).

5 years agoCycles: Fix typo in flags check
Sergey Sharybin [Sun, 24 Jan 2016 12:05:02 +0000 (17:05 +0500)]
Cycles: Fix typo in flags check

5 years agoCleanup: Remove outdated comment in volume code.
Thomas Dinges [Sun, 24 Jan 2016 11:31:36 +0000 (12:31 +0100)]
Cleanup: Remove outdated comment in volume code.

Thanks to jesterking for finding this one.

5 years agoAdd missing line width in the 2d view grid drawing
Sergey Sharybin [Sun, 24 Jan 2016 11:24:36 +0000 (16:24 +0500)]
Add missing line width in the 2d view grid drawing

5 years agoMore missing calls to glLineWidth
Campbell Barton [Sun, 24 Jan 2016 11:06:05 +0000 (22:06 +1100)]
More missing calls to glLineWidth

5 years agoDepsgraph: Add missing relations between driver and particle settings
Sergey Sharybin [Sun, 24 Jan 2016 11:01:57 +0000 (16:01 +0500)]
Depsgraph: Add missing relations between driver and particle settings

While it's not really working reliably to drive something on runtime
it's handy to have such possibility to tune particle system using
proxies in the scene files.

Just another quick thing for the Nieve project.

5 years agoFix glLineWidth state use w/ grid floor and brush
Campbell Barton [Sun, 24 Jan 2016 09:30:41 +0000 (20:30 +1100)]
Fix glLineWidth state use w/ grid floor and brush

5 years agoFix tile highlight corners are too fat since recent changes in glLineWidth policy
Sergey Sharybin [Sun, 24 Jan 2016 09:01:21 +0000 (14:01 +0500)]
Fix tile highlight corners are too fat since recent changes in glLineWidth policy

5 years agoFix Smooth Weight expand logic
Alexander Gavrilov [Thu, 21 Jan 2016 20:03:14 +0000 (23:03 +0300)]
Fix Smooth Weight expand logic

Since weight_other is equal to weight_accum_prev[i_other], the original
lines actually are no-op. The visible effect is that when smoothing just
two vertices with weights 1 and 0, the expand value has no effect until
it reaches exactly 1. This change makes it gradual.

5 years agoDocs: minor edits to code comments
Campbell Barton [Sun, 24 Jan 2016 03:25:01 +0000 (14:25 +1100)]
Docs: minor edits to code comments

5 years agoPrevent accidental fall-through in switch
Campbell Barton [Sun, 24 Jan 2016 01:21:13 +0000 (12:21 +1100)]
Prevent accidental fall-through in switch

5 years agoCleanup: style
Campbell Barton [Sun, 24 Jan 2016 01:13:37 +0000 (12:13 +1100)]
Cleanup: style

5 years agoCorrect error in recent vector transform commit
Campbell Barton [Sun, 24 Jan 2016 01:12:42 +0000 (12:12 +1100)]
Correct error in recent vector transform commit

5 years agoCycles: Make Clang 3.6 happy with const debug flags reference
Sergey Sharybin [Sat, 23 Jan 2016 20:33:53 +0000 (01:33 +0500)]
Cycles: Make Clang 3.6 happy with const debug flags reference

For some reason it did not like the explicit const qualifier for a
custom type.

5 years agoFix T47132: Cycles Rendering Tiles Indicator Limited to 16
Sergey Sharybin [Sat, 23 Jan 2016 20:31:36 +0000 (01:31 +0500)]
Fix T47132: Cycles Rendering Tiles Indicator Limited to 16

5 years agoVector Transform node support for GLSL mode and the internal renderer
Alexander Romanov [Sat, 23 Jan 2016 12:27:36 +0000 (15:27 +0300)]
Vector Transform node support for GLSL mode and the internal renderer

The Vector Transform node is a useful node which is present in the Cycles renderer.
This patch implements the Vector Transform node for GLSL mode and the internal renderer.

Example: {F273060}

Alexander (Blend4Web Team)

Reviewers: brecht, campbellbarton, sergey

Reviewed By: campbellbarton, sergey

Subscribers: psy-fi, duarteframos, RobM, lightbwk, sergey, AlexKowel, valentin_b4w, Evgeny_Rodygin, yurikovelenov

Projects: #bf_blender:_next

Differential Revision:

5 years agoImplementation of OpenVDB as a possible cache format for smoke
Kévin Dietrich [Sat, 23 Jan 2016 07:39:29 +0000 (08:39 +0100)]
Implementation of OpenVDB as a possible cache format for smoke

This commits implements OpenVDB as an extra cache format in the Point
Cache system for smoke simulations. Compilation with the library is
turned off by default for now, and shall be enabled when the library is

A documentation of its doings is available here: http://

A guide to compile OpenVDB can be found here (Linux): http://

Reviewers: sergey, lukastoenne, brecht, campbellbarton

Reviewed By: brecht, campbellbarton

Subscribers: galenb, Blendify, robocyte, Lapineige, bliblubli,
jtheninja, lukasstockner97, dingto, brecht

Differential Revision:

5 years agoOpenGL: combine multiple GL_LINES into fewer draw calls
Mike Erwin [Sat, 23 Jan 2016 07:27:32 +0000 (02:27 -0500)]
OpenGL: combine multiple GL_LINES into fewer draw calls

Incidentally, one of the removed glBegin(GL_LINE) calls should’ve used
GL_LINES with an S, which was a GL_INVALID_ENUM error.

5 years agoOpenGL: tiny state-change fix
Mike Erwin [Sat, 23 Jan 2016 06:13:36 +0000 (01:13 -0500)]
OpenGL: tiny state-change fix

Only re-enable blending if the function that disables it was actually

Still not ideal flipping this on & off repeatedly, but now there are
fewer flips.

5 years agoOpenGL: call glLineWidth less often
Mike Erwin [Sat, 23 Jan 2016 05:58:32 +0000 (00:58 -0500)]
OpenGL: call glLineWidth less often

Each LINES draw call is now responsible for its own line width. No need
to set it back to its 1.0 default after every draw.

This eliminates half our calls to glLineWidth , similar to last week’s
work on glPointSize.

5 years agoMath Lib: optimize segment-plane clipping
Campbell Barton [Sat, 23 Jan 2016 02:44:20 +0000 (13:44 +1100)]
Math Lib: optimize segment-plane clipping

Calculate the clipped min/max factor along the segment,
only applying to the coordinates at the end (will give better precision too).

Also make split input/output args.

5 years agoCycles: Change several default values (first batch).
Thomas Dinges [Fri, 22 Jan 2016 22:19:23 +0000 (23:19 +0100)]
Cycles: Change several default values (first batch).

This changes the following defaults:

- Render settings:

  * Samples: 100
  * Preview Samples: 50
  * Filter: Blackmann-Harris
  * Tile Order: Hilbert Spiral

- Lamp settings:

  * Use MIS: On

- Material settings:

  * Volume Sampling: Multiple Importance

Old files are not affected, I tested the versioning code back and forth.
More changes are to come (World, BVH...) but that needs a bit more work.

5 years agoFix part of T47025: Shadow pass error: Black shadow.
Bastien Montagne [Fri, 22 Jan 2016 18:32:47 +0000 (19:32 +0100)]
Fix part of T47025: Shadow pass error: Black shadow.

Skipping computing of shadow pass when diffuse color is pitch black is fine... unless
you actually need/want that shadow pass!

The 'noisy' issue with picture texture remains a bit mysterious to me currently. :/

5 years agoFix T45523: "View All" in Graph Editor does not respect Y axis with small values
Joshua Leung [Fri, 22 Jan 2016 12:56:23 +0000 (01:56 +1300)]
Fix T45523: "View All" in Graph Editor does not respect Y axis with small values

The previous threshold used to prevent the Graph Editor from imploding if
presented with a flat (or nearly flat, accounting for floating point precision)
curve was too coarse, meaning that in some cases, the "View All" tool would end
up behaving weirdly.

5 years agoDopesheet: Make frame range for new editor instances saner, by basing them on the...
Joshua Leung [Fri, 22 Jan 2016 12:50:11 +0000 (01:50 +1300)]
Dopesheet: Make frame range for new editor instances saner, by basing them on the current frame range

This brings the dopesheet more in line with the NLA and Graph Editors, where
similar initial ranges were also used. The benefit is that it should save
animators a small amount of time getting the dopesheet timeline into the
right zoom level before starting work.

5 years agoFix T46657: VSE: Strip length jumps to a negative number.
Bastien Montagne [Fri, 22 Jan 2016 11:09:31 +0000 (12:09 +0100)]
Fix T46657: VSE: Strip length jumps to a negative number.

5 years agoOpenGL: cleanup
Mike Erwin [Fri, 22 Jan 2016 07:44:33 +0000 (02:44 -0500)]
OpenGL: cleanup

- LINE_STRIP to LINES when only drawing one
- group state changes for easier reading
- general cleanup

5 years agoOpenGL: remove unneeded state changes
Mike Erwin [Fri, 22 Jan 2016 06:57:31 +0000 (01:57 -0500)]
OpenGL: remove unneeded state changes

UI_panel_category_draw_all was setting PolygonMode to LINES before
drawing LINES.

stitch_draw was setting PolygonMode to its default FILL value — any
function that deviates from the default should’ve changed it back to

5 years agoOpenGL: draw box outlines with lines, not rectangles
Mike Erwin [Fri, 22 Jan 2016 06:45:39 +0000 (01:45 -0500)]
OpenGL: draw box outlines with lines, not rectangles

2 reasons:
- fewer state changes (PolygonMode)
- glRect goes away in later GL versions

5 years agoOpenGL: remove glGet with unused result
Mike Erwin [Fri, 22 Jan 2016 06:29:05 +0000 (01:29 -0500)]
OpenGL: remove glGet with unused result

This code is disabled but still…

5 years agoOpenGL: remove extra vertex in arrowhead
Mike Erwin [Fri, 22 Jan 2016 06:11:23 +0000 (01:11 -0500)]
OpenGL: remove extra vertex in arrowhead

Now draws 2 lines instead of 3 (with a zero-length middle).
Same visual result.