blender.git
4 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

4 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.

4 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

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

4 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.

4 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

4 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

4 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.

4 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

4 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

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

4 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

4 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.

4 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

4 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.
{F144283}
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: https://developer.blender.org/D909

4 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
simulations.

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
present.

A documentation of its doings is available here: http://
wiki.blender.org/index.php/User:Kevindietrich/OpenVDBSmokeExport.

A guide to compile OpenVDB can be found here (Linux): http://
wiki.blender.org/index.php?title=Dev:Doc/Building_Blender/Linux/
Dependencies_From_Source#OpenVDB

Reviewers: sergey, lukastoenne, brecht, campbellbarton

Reviewed By: brecht, campbellbarton

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

Differential Revision: https://developer.blender.org/D1721

4 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.

4 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
called.

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

4 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.

4 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.

4 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.

4 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. :/

4 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.

4 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.

4 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.

4 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

4 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
FILL.

4 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

4 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…

4 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.

4 years agoOpenGL: pull glBegin/End out of loops
Mike Erwin [Fri, 22 Jan 2016 06:03:15 +0000 (01:03 -0500)]
OpenGL: pull glBegin/End out of loops

When drawing 2D grid and 3D axes.

4 years agoGPencil: Select Grouped (Shift G)
Joshua Leung [Fri, 22 Jan 2016 02:31:20 +0000 (15:31 +1300)]
GPencil: Select Grouped (Shift G)

This commit adds a "Select Grouped" operator. Although it is set up to
allow more types of "grouping" in future, it current only supports
a single mode (i.e. "Same Layer"). As a result, it does not pop up
any menus/submenus in all the usual places.

4 years agoOpenGL: fewer state changes for wireframe PBVH
Mike Erwin [Fri, 22 Jan 2016 02:07:17 +0000 (21:07 -0500)]
OpenGL: fewer state changes for wireframe PBVH

Wireframe drawing doesn’t use the following GL state, so don’t update
these:
- ShadeModel
- NormalPointer
- ColorPointer

Normal & color data are still uploaded as part of the interleaved VBO,
but those attributes are disabled for wireframe.

4 years agoHacky compile fix for mingw compile issue reported by bat3a on bf-committers
Joshua Leung [Fri, 22 Jan 2016 00:59:54 +0000 (13:59 +1300)]
Hacky compile fix for mingw compile issue reported by bat3a on bf-committers

I've been using this fix in another branch locally, so it seems to work fine.
The other #ifdef checks should be checked on too, as __MINGW32__ and __MINGW64__
do NOT seem to be defined when compiling that file

4 years agoFix: Breakdowner value would jump when starting the tool a second time during a Blend...
Joshua Leung [Fri, 22 Jan 2016 00:55:19 +0000 (13:55 +1300)]
Fix: Breakdowner value would jump when starting the tool a second time during a Blender session

As reported on the Blender Institute Podcast 009. See my comment on the cloud blog
for further details.

When used a second (or third, etc.) time, the breakdowner's (Shift-E) percentage value
would initially be the last-used value (e.g. 33% or 75%), before suddenly jumping
to another value as soon as the mouse moves. The cause of this behaviour was that it
was initially reusing the value from the previous time the operator was run, but then
as soon as the mouse moved, it would snap to the percentage implied by the mouse position.

(Note: The mapping from mouse position to percentage is "absolute" - i.e. the percentage
is based on how far across the 3D view the mouse is, instead of being some kind of
relative offset thing).

To make things a bit less jumpy, I've changed the behaviour so that the mouse position
always gets used immediately, instead of having it jump suddenly only when making
some mouse movement.

4 years agoSequencer: Speedup gaussian blur effect
Sergey Sharybin [Thu, 21 Jan 2016 19:11:37 +0000 (00:11 +0500)]
Sequencer: Speedup gaussian blur effect

Apply X and Y blur as separate step, this reduces number of accumulations
required and makes effect more realtime.

Another quick thing for the Nieve project.

4 years agoMS Visual Studio 2015 does not find std::inserter
Martijn Berger [Thu, 21 Jan 2016 16:21:32 +0000 (17:21 +0100)]
MS Visual Studio 2015 does not find std::inserter

4 years agoSculpt: pinch/inflate support for snake-hook
Campbell Barton [Thu, 21 Jan 2016 10:06:49 +0000 (21:06 +1100)]
Sculpt: pinch/inflate support for snake-hook

Snake-hook tended to loose volume along the stroke,
now with pinch > 0.5 its possible to sculpt shapes without loosing volume.

4 years agoSculpt: Add rake option to snake-hook
Campbell Barton [Thu, 21 Jan 2016 10:05:49 +0000 (21:05 +1100)]
Sculpt: Add rake option to snake-hook

This allows for dragging out shapes that rotate to follow the cursor motion.

Values over 1 can be set for 'interesting' artistic effects.

4 years agoCycles: Improve UI feedback for light samples.
Thomas Dinges [Thu, 21 Jan 2016 08:00:10 +0000 (09:00 +0100)]
Cycles: Improve UI feedback for light samples.

Fix T47213.
There was actually no real bug here, just clarify now in the UI that Mesh, World and Lamp samples only have an effect if we sample all lights (direct or indirect).

4 years agoAdd missing weight paint selection mirror
Campbell Barton [Thu, 21 Jan 2016 07:46:17 +0000 (18:46 +1100)]
Add missing weight paint selection mirror

Was lost resolving merge-conflict.

4 years agoCorrect comments & some explanation from last commit
Campbell Barton [Thu, 21 Jan 2016 00:03:37 +0000 (11:03 +1100)]
Correct comments & some explanation from last commit

4 years agoRemove errors for unsupported math operations
Campbell Barton [Wed, 20 Jan 2016 23:30:17 +0000 (10:30 +1100)]
Remove errors for unsupported math operations

4 years agoCleanup: line length, indentation
Campbell Barton [Wed, 20 Jan 2016 22:05:52 +0000 (09:05 +1100)]
Cleanup: line length, indentation

4 years agoWeight Paint: Make multi-paint & mirror work as if bone selection was symmetric
Alexander Gavrilov [Wed, 20 Jan 2016 21:03:15 +0000 (08:03 +1100)]
Weight Paint: Make multi-paint & mirror work as if bone selection was symmetric

The simplest way of handling mirroring in multi-paint is creating a
uniform symmetric selection and relying on existing symmetric weights
to direct changes to the appropriate vertex groups. This already works
if mirror bones are selected manually, and can be made easier to use
by doing it implicitly.

4 years agoRemove old multipaint related argument from wpaint_blend.
Alexander Gavrilov [Tue, 19 Jan 2016 12:17:13 +0000 (15:17 +0300)]
Remove old multipaint related argument from wpaint_blend.

With multipaint based on collective weight there is no need for this.

4 years agoWeight Paint: Multi-paint support for blur tool
Alexander Gavrilov [Tue, 19 Jan 2016 11:56:28 +0000 (14:56 +0300)]
Weight Paint: Multi-paint support for blur tool

Use the collective weight when using blurring.

This brings blur in sync with the rest of multi-paint modifications.

Also, blur has no business calling `defvert_verify_index` anyway when
it simply wants to read weights.

4 years agoDelete unused code, separate for better diff appearance.
Alexander Gavrilov [Tue, 19 Jan 2016 11:12:22 +0000 (14:12 +0300)]
Delete unused code, separate for better diff appearance.

4 years agoWeight Paint: multi-paint uses collective weights
Alexander Gavrilov [Tue, 19 Jan 2016 11:54:47 +0000 (14:54 +0300)]
Weight Paint: multi-paint uses collective weights

Similarly, the displayed weight distribution should be used as the
target of brush application instead of the invisible active group.

Multi-paint is split into a new function because all the calls to
defvert_verify_index at the top of the old code should never be
done in multi-paint mode.

4 years agoWeight Paint: 'Sample' now supports multi-paint
Alexander Gavrilov [Tue, 19 Jan 2016 15:57:52 +0000 (18:57 +0300)]
Weight Paint: 'Sample' now supports multi-paint

Since the coloring uses sum or average of the weights of all selected
groups, the weight pick tool should also use that instead of reading
the weight of the single active group that you can't see.

4 years agoWeight Paint: reduce alert color brightness
Alexander Gavrilov [Tue, 19 Jan 2016 17:30:50 +0000 (20:30 +0300)]
Weight Paint: reduce alert color brightness

This condition can actually happen quite often if weight painting for
a rig that uses separate control bones, so the color shouldn't be so
bright that it's hard to look at for a significant amount of time.

4 years agoCleanup: remove remainings of OMP in sculptpaint area.
Bastien Montagne [Wed, 20 Jan 2016 19:39:18 +0000 (20:39 +0100)]
Cleanup: remove remainings of OMP in sculptpaint area.

4 years agoParticle_system.c: OMP -> BLI_task.
Bastien Montagne [Wed, 20 Jan 2016 18:43:45 +0000 (19:43 +0100)]
Particle_system.c: OMP -> BLI_task.

The threaded code is twice quicker now (from an average of 20ms/frame to 10ms/frame
while baking 10000 particles here e.g.)!

Think this is mostly due to usage of 'dynamic' scheduler in OMP code though,
from my experience so far this tends to have dramatic effects over performances,
static scheduler is usually much much more efficient.

4 years agopaint_mask.c: OMP -> BLI_stack.
Bastien Montagne [Wed, 20 Jan 2016 16:05:06 +0000 (17:05 +0100)]
paint_mask.c: OMP -> BLI_stack.

4 years agoFix error in rBa6eae7339190.
Bastien Montagne [Wed, 20 Jan 2016 13:54:57 +0000 (14:54 +0100)]
Fix error in rBa6eae7339190.

4 years agoFix T43896: Knife Project fails when zoomed out
Campbell Barton [Wed, 20 Jan 2016 09:41:47 +0000 (20:41 +1100)]
Fix T43896: Knife Project fails when zoomed out

While knife-project still uses screen-space projection,
use much lower snap thresholds when projecting.

4 years agoFix T46243: New Depsgraph: changing action misses relations update tag
Sergey Sharybin [Wed, 20 Jan 2016 09:30:34 +0000 (10:30 +0100)]
Fix T46243: New Depsgraph: changing action misses relations update tag

4 years agoFix T47198: Broken UV/VCol in BI and Cycles with some degenerated faces - BI part.
Bastien Montagne [Wed, 20 Jan 2016 09:03:14 +0000 (10:03 +0100)]
Fix T47198: Broken UV/VCol in BI and Cycles with some degenerated faces - BI part.

Problem is actually similar in both engines - in some cases, we changed
'natural' quad splitting order to alternative one, without properkly 'notifying'
UV/VCol/other tessface data about it.

So code would use a 'wrong' triangle of UVs etc.

Fix for Cycles was committed by sergey as rBa6eae7339190d1.

4 years agoFix (partial) T47198: Cycles have broken UVs in some degenerated quads cases
Sergey Sharybin [Wed, 20 Jan 2016 08:13:04 +0000 (09:13 +0100)]
Fix (partial) T47198: Cycles have broken UVs in some degenerated quads cases

The issue was discontinuity in logic when importing vertices from blender
and then importing data layers regardless of how we split the face. Quite
interesting we didn't notice this issue before.

Thanks Bastien for the investigation, based on D1742 but redid it to make
patch a bit more clear to follow.

4 years agoFix for tangent regression w/ looptri changes
Campbell Barton [Wed, 20 Jan 2016 04:35:51 +0000 (15:35 +1100)]
Fix for tangent regression w/ looptri changes

LoopTri changes in 2.76 calculated all tangents as triangles,
this gave different results though in most cases it was hard to notice.

Though no bugs were reported we should keep our tangents compatible with other users of mikktspace.

4 years agoCleanup: style, use const
Campbell Barton [Wed, 20 Jan 2016 04:05:01 +0000 (15:05 +1100)]
Cleanup: style, use const

4 years agoerror in last commit
Campbell Barton [Wed, 20 Jan 2016 06:09:18 +0000 (17:09 +1100)]
error in last commit

4 years agoCleanup: naming convention
Campbell Barton [Wed, 20 Jan 2016 06:00:12 +0000 (17:00 +1100)]
Cleanup: naming convention

Follow isect_ray_tri_watertight_v3 naming.

4 years agoSupport multi-paint & show zero-weights as black
Alexander Gavrilov [Mon, 18 Jan 2016 19:00:56 +0000 (22:00 +0300)]
Support multi-paint & show zero-weights as black

Specifically, when only one bone is selected and it's not really active.
(With multiple bones on the other hand that behavior is forced on,
since multi-paint can't modify purely zero weight verts and that's important.)

4 years agoCarve: Remove empty implementation files
Sergey Sharybin [Tue, 19 Jan 2016 21:56:37 +0000 (22:56 +0100)]
Carve: Remove empty implementation files

4 years agoCycles: Fix OpenCL kernel compilation after the bake commit
Sergey Sharybin [Tue, 19 Jan 2016 21:51:43 +0000 (22:51 +0100)]
Cycles: Fix OpenCL kernel compilation after the bake commit

There is no function pointers in OpenCL specification. For as long
as we want to support this platform we should follow the specifications.

While the code is not totally optimal now, it should not be that huge
of performance issue on CPU since it does jump tables just nicely, so
it's not that much extra computation here.

4 years agoCycles: Pass missing shader filter argument to CUDA and OpenCL kernels
Sergey Sharybin [Tue, 19 Jan 2016 21:28:16 +0000 (22:28 +0100)]
Cycles: Pass missing shader filter argument to CUDA and OpenCL kernels

4 years agoUsual i18n/UI messages tweaks.
Bastien Montagne [Tue, 19 Jan 2016 19:31:06 +0000 (20:31 +0100)]
Usual i18n/UI messages tweaks.

4 years agoCycles: Add a debug flag to disable QBVH
Sergey Sharybin [Tue, 19 Jan 2016 17:38:41 +0000 (18:38 +0100)]
Cycles: Add a debug flag to disable QBVH

4 years agoSequencer: Implement Tone Map strip modifier
Sergey Sharybin [Tue, 19 Jan 2016 14:53:43 +0000 (15:53 +0100)]
Sequencer: Implement Tone Map strip modifier

Behaves same exact way as compositor node, but could be applied
in the sequencer and used as a grading tool.

Requested by the Nieve project artists.

4 years agoFix T47203: Render Crash due to missing zbuf_float handling in IMB scaling.
Bastien Montagne [Tue, 19 Jan 2016 12:24:03 +0000 (13:24 +0100)]
Fix T47203: Render Crash due to missing zbuf_float handling in IMB scaling.

4 years agoFix T47201: Cycles+OSL keeps image files open until Blender exits
Sergey Sharybin [Tue, 19 Jan 2016 09:55:40 +0000 (14:55 +0500)]
Fix T47201: Cycles+OSL keeps image files open until Blender exits

Now image will be opened for while render session is active, this is
needed to keep image cache working correctly. But stopping render
should now release all files descriptors.

4 years agoGTests: were using C++11 feature
Campbell Barton [Tue, 19 Jan 2016 09:44:57 +0000 (20:44 +1100)]
GTests: were using C++11 feature

4 years agoLibmv: Solve some strict warnings in tests
Sergey Sharybin [Tue, 19 Jan 2016 09:00:53 +0000 (14:00 +0500)]
Libmv: Solve some strict warnings in tests

4 years agoGTests: split array_utils tests
Campbell Barton [Tue, 19 Jan 2016 08:54:17 +0000 (19:54 +1100)]
GTests: split array_utils tests

4 years agoCMake: check for LLVM static library by default
Campbell Barton [Tue, 19 Jan 2016 01:37:26 +0000 (12:37 +1100)]
CMake: check for LLVM static library by default

Even when static option isn't enabled, use the static library path if the dynamic library isn't found.

4 years agoWeight Paint: Add lock-aware normalize
Campbell Barton [Mon, 18 Jan 2016 22:14:35 +0000 (09:14 +1100)]
Weight Paint: Add lock-aware normalize

D1713 from @angavrilov (with own edits)

The way current weight paint code works is that instead of making normalization lock aware, a separate `enforce_locks` function is called to do a different kind of normalization, hoping that by the time real normalize is called, there is nothing for it to do. The problem is that:

- That different normalization is based on adding the same amount to all unlocked groups, whereas true normalize uses multiplication to preserve ratio between them. The multiplicative approach should match the way weights operate better.
- If `enforce_locks` fails to achieve perfect normalization, true normalize will change locked groups.

Try to fix this by replacing `enforce_locks` with true lock-aware normalization support.

Supporting locked groups in normalize means that freezing the active group can make full normalization impossible if too much weight was added or removed, so it may be necessary to do two normalize passes. This is similar to how enforce_locks operates.

Also, now there is no need to go through the multi-paint branch just because of the locks. In the actual multi-paint case, the same normalize code can be used via a temporary flag array that represents the union of selected and locked groups.

User-visible effect should be:

- Auto-Normalize doesn't change behavior vertex to vertex depending on whether it has any locked groups.
- It never changes locked groups; if you lock some groups and start painting with seriously non-normalized weights, it's assumed you intended that.
- It never adds vertices to new groups, since the computer can't do that intelligently anyway - it was especially broken in case of mirroring.
- It always acts to preserve the ratio between groups it changes, instead of (sometimes, see point 1) adding or subtracting the same amount.

4 years agoGTests: array_utils
Campbell Barton [Mon, 18 Jan 2016 20:15:27 +0000 (07:15 +1100)]
GTests: array_utils

4 years agoBLI_array_utils: add binary and/or functions
Campbell Barton [Mon, 18 Jan 2016 20:00:55 +0000 (07:00 +1100)]
BLI_array_utils: add binary and/or functions

4 years agoIgnore const qualifier when comparing types
Campbell Barton [Mon, 18 Jan 2016 20:50:07 +0000 (07:50 +1100)]
Ignore const qualifier when comparing types

4 years agoCleanup: style
Campbell Barton [Mon, 18 Jan 2016 09:10:18 +0000 (20:10 +1100)]
Cleanup: style

4 years agorather then → rather than
Sybren A. Stüvel [Mon, 18 Jan 2016 09:20:08 +0000 (10:20 +0100)]
rather then → rather than

4 years agoOpenGL: remove ARB_fragment_program comment
Mike Erwin [Mon, 18 Jan 2016 04:26:23 +0000 (23:26 -0500)]
OpenGL: remove ARB_fragment_program comment

This a list of OpenGL extensions used. Minus one thanks to
kevindietrich’s smoke work!

https://developer.blender.org/D1694

4 years agoTransform: no need to store distance to snap point
Campbell Barton [Mon, 18 Jan 2016 02:15:38 +0000 (13:15 +1100)]
Transform: no need to store distance to snap point

Compare squared distance to snap target since the value is only ever used for comparison.

4 years agoFix T29153: Rotate & scale ignore snapping points
Campbell Barton [Mon, 18 Jan 2016 01:03:43 +0000 (12:03 +1100)]
Fix T29153: Rotate & scale ignore snapping points

Checking for 'Closest' here isn't needed since
TransSnap.snapTarget callback is already ensuring the selected target is the closest.

Also don't reuse the pre-calculated distance,
since its only valid to do this when there are no snap points
and this isn't a significant gain to avoid the extra calculation - run once per update.

4 years agoUI: use a callback for the progress tooltip
Campbell Barton [Mon, 18 Jan 2016 02:53:38 +0000 (13:53 +1100)]
UI: use a callback for the progress tooltip

Avoids constructing tip text and storing it when its not used.

Also quiet divide by zero warning when no progress was made.

4 years agoUI: redesign of the progress bar.
Kévin Dietrich [Mon, 18 Jan 2016 00:39:09 +0000 (01:39 +0100)]
UI: redesign of the progress bar.

A picture is worth a thousand words: http://wiki.blender.org/index.php/
File:UI_progress_bar.png

Reviewers: #user_interface, brecht, dingto

Reviewed by: brecht, dingto

Differential Revision: https://developer.blender.org/D1727

4 years agoBGE: Allow access to light shadow settings with python
Ulysse Martin [Sun, 17 Jan 2016 17:41:37 +0000 (18:41 +0100)]
BGE: Allow access to light shadow settings with python

This patch adds a new API which allow us to access light shadow settings from python. The new API can be used to write custom GLSL materials with shadows.

Reviewers: brecht, kupoman, agoose77, panzergame, campbellbarton, moguri, hg1

Reviewed By: agoose77, panzergame, campbellbarton, moguri, hg1

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1690

4 years agopaint_cursor: OMP -> BLI_task.
Bastien Montagne [Sun, 17 Jan 2016 16:16:57 +0000 (17:16 +0100)]
paint_cursor: OMP -> BLI_task.

4 years agoBump boost to 1.60
Martijn Berger [Sun, 17 Jan 2016 11:44:25 +0000 (12:44 +0100)]
Bump boost to 1.60

4 years agoCMake: clarify missing Python package message
Campbell Barton [Sun, 17 Jan 2016 05:01:32 +0000 (16:01 +1100)]
CMake: clarify missing Python package message

Blender builds properly without extra Python packages,
avoid FUD for new devs.

4 years agoCleanup: spelling
Campbell Barton [Sun, 17 Jan 2016 02:40:30 +0000 (13:40 +1100)]
Cleanup: spelling

Also use doxy formatting for warning/note.

4 years agoCleanup: style
Campbell Barton [Sun, 17 Jan 2016 02:40:22 +0000 (13:40 +1100)]
Cleanup: style

4 years agoRevert "Make 'incompatible pointer type' gcc warning an error by default."
Campbell Barton [Sun, 17 Jan 2016 02:18:41 +0000 (13:18 +1100)]
Revert "Make 'incompatible pointer type' gcc warning an error by default."

This reverts commit b5bd39b5182590fd4d5ddb24d7b7bdbe714d57bf.

This is problematic because it means minor differences in system headers can cause errors
(glew in this case errored for me both with system and Blender's bundled version).

Developers can enable -Werror=* locally for warnings that aren't reliable across different systems.

4 years agoRevert "Fix compile error in gpu_debug (incompatible-pointer-type)."
Campbell Barton [Sun, 17 Jan 2016 02:19:14 +0000 (13:19 +1100)]
Revert "Fix compile error in gpu_debug (incompatible-pointer-type)."

This reverts commit 75cfc81ec39ac9953f25eb0ae5f9e70d3c24ee7e.

4 years agoPoint Cache bake: make sure endframe is initialize with a decent value.
Kévin Dietrich [Sun, 17 Jan 2016 02:13:15 +0000 (03:13 +0100)]
Point Cache bake: make sure endframe is initialize with a decent value.

This is how the old code used to initialize it. Current value was
failing big time when baking all caches (always set to MAXFRAME), and it
was added right before commit to quiet a warning... (I know, I know...)

4 years agoDynamic Paint: use job system for the image sequence bake operator.
Kévin Dietrich [Sun, 17 Jan 2016 01:04:46 +0000 (02:04 +0100)]
Dynamic Paint: use job system for the image sequence bake operator.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D1732

4 years agoPoint Cache: use job system for bake operators.
Kévin Dietrich [Sun, 17 Jan 2016 01:01:41 +0000 (02:01 +0100)]
Point Cache: use job system for bake operators.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D1731

4 years agoFix compile error in gpu_debug (incompatible-pointer-type).
Kévin Dietrich [Sun, 17 Jan 2016 00:58:06 +0000 (01:58 +0100)]
Fix compile error in gpu_debug (incompatible-pointer-type).

4 years agoFix memory leak in (the still unused) WM_reportf.
Brecht Van Lommel [Sat, 16 Jan 2016 22:21:27 +0000 (23:21 +0100)]
Fix memory leak in (the still unused) WM_reportf.