5 years agoCorrect render-border line width
Campbell Barton [Sat, 7 May 2016 13:53:35 +0000 (23:53 +1000)]
Correct render-border line width

5 years agoCorrect error in wrapped array-span-iteration
Campbell Barton [Sat, 7 May 2016 13:47:58 +0000 (23:47 +1000)]
Correct error in wrapped array-span-iteration

5 years agoFix T48368: Cycles mix RGB constant folding bug after recent refactor.
Brecht Van Lommel [Sat, 7 May 2016 12:08:00 +0000 (14:08 +0200)]
Fix T48368: Cycles mix RGB constant folding bug after recent refactor.

5 years agoCurve Fitting: better fallback when least-square solution fails
Campbell Barton [Sat, 7 May 2016 10:32:28 +0000 (20:32 +1000)]
Curve Fitting: better fallback when least-square solution fails

Take curvature into account when calculating handle length.

Gives significantly better results for curve dissolve and 10-20% more efficient freehand drawing.

5 years agoFix error copying cubic data
Campbell Barton [Sat, 7 May 2016 09:15:27 +0000 (19:15 +1000)]
Fix error copying cubic data

5 years agoFix T48362: Spin tool broken after recent commit.
Bastien Montagne [Sat, 7 May 2016 09:58:33 +0000 (11:58 +0200)]
Fix T48362: Spin tool broken after recent commit.

Typo in rBrBa48d74079, spin tool was now using the wrong view axis.

5 years agoFix cycles-xml with OSL support after changes inroduced in 1422f0dd1697d7b671a7b447fd...
Martijn Berger [Sat, 7 May 2016 08:50:21 +0000 (10:50 +0200)]
Fix cycles-xml with OSL support after changes inroduced in 1422f0dd1697d7b671a7b447fd58db7dfe775821

5 years agoSome fixes for CUDA runtime compile:
Thomas Dinges [Fri, 6 May 2016 21:11:41 +0000 (23:11 +0200)]
Some fixes for CUDA runtime compile:
* When Baking wasn't used we got an error.
* On top of Volume Nodes (NODES_FEATURE_VOLUME), we now also check if we need volume sampling code,
so we can disable that as well and save some further compilation time.

5 years agoCycles: Make CUDA adaptive feature compile a Debug flag.
Thomas Dinges [Fri, 6 May 2016 20:34:15 +0000 (22:34 +0200)]
Cycles: Make CUDA adaptive feature compile a Debug flag.

If the CUDA Toolkit is installed and the user is on Linux,
adaptive, feature based CUDA runtime compile is now possible to enable via:

* Debug menu (Debug value 256) in the Cycles UI.

5 years agoFix T47657: Using template_list() with invoke_props_dialog()
Bastien Montagne [Fri, 6 May 2016 19:56:54 +0000 (21:56 +0200)]
Fix T47657: Using template_list() with invoke_props_dialog()

popups have no wm_region in context, using wm_menu here.

Not working perfect, but at least it prevents crash.

5 years agoFix T48262: Crash when trying to render a scene without camera.
Bastien Montagne [Fri, 6 May 2016 19:41:56 +0000 (21:41 +0200)]
Fix T48262:  Crash when trying to render a scene without camera.

5 years agoImage Editor: Add border zoom
Campbell Barton [Fri, 6 May 2016 18:22:48 +0000 (04:22 +1000)]
Image Editor: Add border zoom

Use Shift-B, UV border-select-pinned is now Ctrl-B.

Patch from @rav66

5 years agoFix recent issue in recent BVH snap/cache
Campbell Barton [Fri, 6 May 2016 16:59:19 +0000 (02:59 +1000)]
Fix recent issue in recent BVH snap/cache

The derivedMesh could free a tree stored by the cache.
Now check the cached tree is valid.

5 years agoCorrect in-range assert (zero is valid)
Campbell Barton [Fri, 6 May 2016 16:13:39 +0000 (02:13 +1000)]
Correct in-range assert (zero is valid)

5 years agoDerivedMesh: don't allocate a new material array each draw
Campbell Barton [Fri, 6 May 2016 15:58:28 +0000 (01:58 +1000)]
DerivedMesh: don't allocate a new material array each draw

5 years agoClip invisible parts of image when drawing in 2D textures and GLSL Modes
Sergey Sharybin [Fri, 6 May 2016 14:54:07 +0000 (16:54 +0200)]
Clip invisible parts of image when drawing in 2D textures and GLSL Modes

This commit avoids draw of invisible parts of image in image editor,
making it faster to re-draw the image.

Especially handy when painting on a high-res image when zoomed-in.

5 years agoCleanup: Move full SVM statistics to VLOG(2) verbosity level.
Thomas Dinges [Fri, 6 May 2016 12:39:41 +0000 (14:39 +0200)]
Cleanup: Move full SVM statistics to VLOG(2) verbosity level.

5 years agoCleanup: Rename texture slots to float4 and byte, to distinguish from future float...
Thomas Dinges [Fri, 6 May 2016 11:42:50 +0000 (13:42 +0200)]
Cleanup: Rename texture slots to float4 and byte, to distinguish from future float (single channel) and half_float slots.

Should be no functional changes, tested CPU and CUDA.

5 years agoCode refactor: Change Cycles ImageManager arrays.
Thomas Dinges [Fri, 6 May 2016 09:57:30 +0000 (11:57 +0200)]
Code refactor: Change Cycles ImageManager arrays.

This commit simplifies the code for the image arrays. Instead of having 2 arrays for float and byte textures,
we now use an array here. This simplifies the code (avoids code duplication), and makes it possible to easily extend it
with float1 and half-float types in the future.

Only tested with CPU yet, plus some cleanup / code de-duplication is still possible here.

Reviewers: #cycles, sergey

Reviewed By: #cycles, sergey

Subscribers: jesterking, sergey

Differential Revision:

5 years agoTweak precision for interocular distance and convergence plane
Sergey Sharybin [Fri, 6 May 2016 10:32:23 +0000 (12:32 +0200)]
Tweak precision for interocular distance and convergence plane

Previous number of digits after point was not really useful, especially
for the interocular distance where it's quite common to go sub-cm precision.

5 years agoSpeedup of regular 2D painting
Sergey Sharybin [Fri, 6 May 2016 09:48:07 +0000 (11:48 +0200)]
Speedup of regular 2D painting

Yet another commit which makes painting aware of multi-threaded systems.

5 years agoCloth: Fix shrinking to properly respond to animated min/max and weight.
Alexander Gavrilov [Mon, 18 Apr 2016 15:49:03 +0000 (18:49 +0300)]
Cloth: Fix shrinking to properly respond to animated min/max and weight.

Enable dynamic restlen recomputation based on sew flag and update the
shrink factor math within it to call the new utility function.

5 years agoCloth: Change ClothVertex::xrest to actually store the rest position.
Alexander Gavrilov [Mon, 18 Apr 2016 15:48:22 +0000 (18:48 +0300)]
Cloth: Change ClothVertex::xrest to actually store the rest position.

Originally the value was only needed when building the springs,
so a pointer to the input data was somewhat ok. However, recalculating
spring length dynamically requires keeping the actual value around.

5 years agoPart of D1903: Dynamic base mesh for cloth simulation
Luca Rood [Mon, 11 Apr 2016 09:21:17 +0000 (12:21 +0300)]
Part of D1903: Dynamic base mesh for cloth simulation

A function that recalculates cloth spring lengths.

5 years agoCloth: Ignore zero-restlen sewing springs in average length computation.
Alexander Gavrilov [Mon, 18 Apr 2016 15:47:38 +0000 (18:47 +0300)]
Cloth: Ignore zero-restlen sewing springs in average length computation.

The average length is used to adjust self-collision and stiffness
to match mesh density, and in either case considering the always zero
restlen sewing springs doesn't actually make much sense.

The struct_springs variable is also used for other things like total
spring count, so a new one needed for the true struct springs.

5 years agoCloth: Use Geometrical Mean for averaging cloth shrink factor.
Alexander Gavrilov [Mon, 18 Apr 2016 15:47:16 +0000 (18:47 +0300)]
Cloth: Use Geometrical Mean for averaging cloth shrink factor.

This comes out of considering a one-dimensional transition in weight
on a rectangular cloth grid. At the transition face loop, one side
of each rectangular face would be scaled by k1, and the opposite one
by k2, thus turning the rectangle into a trapezoid. Averaging would
be used to choose the scale factor for the remaining two sides.

If Geometrical Mean, i.e. sqrt(k1*k2) is used, it so happens that the
diagonals of the trapezoid also end up scaled by sqrt(k1*k2) compared
to the original rectangle. This means that the same scale factor is
correct for both structural and shear springs, which is not the case
with simple average.

5 years agoCloth: Fix the shrink feature to be controlled by the sewing spring flag.
Alexander Gavrilov [Thu, 28 Apr 2016 14:53:34 +0000 (17:53 +0300)]
Cloth: Fix the shrink feature to be controlled by the sewing spring flag.

Previously it was all over the place: without a vertex group it was
always enabled, and with it it depended on the Self Collision option
due to a likely editing mistake. Now it should be in sync with what
disables the fields in the UI.

The verts->shrink_factor field is changed to just cache the vertex
weight, with the shrink_min/shrink_max interpolation done later.
This is because cloth_apply_vgroup only runs if there are vertex
groups, and thus the factor may not update after property changes.

In addition, bending springs are now also affected by the shrink
factor to avoid visible distortion in object shape at high shrink.

5 years agoCloth: Invalidate cache when sewing springs are toggled on or off.
Alexander Gavrilov [Mon, 18 Apr 2016 15:46:32 +0000 (18:46 +0300)]
Cloth: Invalidate cache when sewing springs are toggled on or off.

5 years agoForce Fields: Fix Texture with both Use Coordinates and 2D enabled.
Alexander Gavrilov [Mon, 18 Apr 2016 15:45:34 +0000 (18:45 +0300)]
Force Fields: Fix Texture with both Use Coordinates and 2D enabled.

From description, Use Coordinates evaluates the texture using
target coordinates in the local space of the force field object.
2D is supposed to ignore the Z coordinate. Thus one would assume
that if both are enabled, the force field effect would move with
the force field object, and Z would be 0.

However, instead first the 2D option projects points onto a plane
passing through the global zero and orthogonal to the local Z,
and only then the resulting point is transformed into local space.
Z is not locked at 0, so procedural textures like Spherical Blend
don't work as expected.

To fix this, apply local transform first, and then just clear Z if 2D.

5 years agoImplement threaded partial display buffer update
Sergey Sharybin [Fri, 6 May 2016 08:04:29 +0000 (10:04 +0200)]
Implement threaded partial display buffer update

This speeds up update of display buffer when affected area is big enough.

Mainly helpful for cases when doing long fast strokes when painting.

5 years agoCleanup: warnings
Campbell Barton [Fri, 6 May 2016 06:49:25 +0000 (16:49 +1000)]
Cleanup: warnings

Values set but not used

5 years agoFix T48356: Bridge tool creates self-intersecting loop
Campbell Barton [Fri, 6 May 2016 00:20:16 +0000 (10:20 +1000)]
Fix T48356: Bridge tool creates self-intersecting loop

When loops are planar to eachother, initialize their winding based on surrounding geometry.

5 years agoFix error bridging edge loops flipping
Campbell Barton [Thu, 5 May 2016 22:51:44 +0000 (08:51 +1000)]
Fix error bridging edge loops flipping

Calculating the winding failed when faces exist on both sides of the edge.

5 years agoCycles: Comment out unused function arguments
Sergey Sharybin [Thu, 5 May 2016 21:46:50 +0000 (23:46 +0200)]
Cycles: Comment out unused function arguments

5 years agoMulti-thread generated image creation
Sergey Sharybin [Thu, 5 May 2016 21:33:40 +0000 (23:33 +0200)]
Multi-thread generated image creation

Gives about 2x speedup on laptop when creating new hires generated image,
regardless of it's type (color, color grid, uv grid).

5 years agoCorrect snap checks for edges & faces
Campbell Barton [Thu, 5 May 2016 21:44:07 +0000 (07:44 +1000)]
Correct snap checks for edges & faces

Snap targets can't contain vertices which are being transformed

5 years agoDon't overwrite existing snap context
Campbell Barton [Thu, 5 May 2016 20:47:21 +0000 (06:47 +1000)]
Don't overwrite existing snap context

Re-activating transform would overwrite previous context, leaking memory.

5 years agoCleanup: style
Campbell Barton [Thu, 5 May 2016 20:29:39 +0000 (06:29 +1000)]
Cleanup: style

5 years agoMissed last commit
Campbell Barton [Thu, 5 May 2016 20:27:42 +0000 (06:27 +1000)]
Missed last commit

5 years agobvhutils: remove bitmap counting
Campbell Barton [Thu, 5 May 2016 20:10:37 +0000 (06:10 +1000)]
bvhutils: remove bitmap counting

All callers pass in valid number

5 years agoCleanup: rename getepsilon -> get_epsilon
Campbell Barton [Thu, 5 May 2016 20:03:03 +0000 (06:03 +1000)]
Cleanup: rename getepsilon -> get_epsilon

5 years agoAdd asserts to check bvhutils args are correct
Campbell Barton [Thu, 5 May 2016 20:00:36 +0000 (06:00 +1000)]
Add asserts to check bvhutils args are correct

Would have prevented previous error going unnoticed.

5 years agoFix crash adding byte color grid images
Sergey Sharybin [Thu, 5 May 2016 20:04:31 +0000 (22:04 +0200)]
Fix crash adding byte color grid images

5 years agoCode cleanup: simplify SVM stack assignment.
Brecht Van Lommel [Mon, 2 May 2016 18:12:42 +0000 (20:12 +0200)]
Code cleanup: simplify SVM stack assignment.

5 years agoCode cleanup: remove some unused functions.
Brecht Van Lommel [Mon, 2 May 2016 19:30:37 +0000 (21:30 +0200)]
Code cleanup: remove some unused functions.

5 years agoCode refactor: reduce special node types, use generic constant folding.
Brecht Van Lommel [Sun, 1 May 2016 22:05:16 +0000 (00:05 +0200)]
Code refactor: reduce special node types, use generic constant folding.

5 years agoFix Cycles emission node being unnecessarily tagged as spatially varying.
Brecht Van Lommel [Sun, 1 May 2016 22:37:42 +0000 (00:37 +0200)]
Fix Cycles emission node being unnecessarily tagged as spatially varying.

5 years agoFix OS X build error after SSE changes, BLI_math_base.h conflicts with EXR headers.
Brecht Van Lommel [Thu, 5 May 2016 19:39:10 +0000 (21:39 +0200)]
Fix OS X build error after SSE changes, BLI_math_base.h conflicts with EXR headers.

5 years agoFix for fix, sorry for the noise
Campbell Barton [Thu, 5 May 2016 19:46:07 +0000 (05:46 +1000)]
Fix for fix, sorry for the noise

5 years agoMissed last commit
Campbell Barton [Thu, 5 May 2016 19:42:00 +0000 (05:42 +1000)]
Missed last commit

5 years agoCorrect own mistake int recent transform API edits
Campbell Barton [Thu, 5 May 2016 19:40:07 +0000 (05:40 +1000)]
Correct own mistake int recent transform API edits

Need to return number of enabled elements.

5 years agoFix error not using the cached BVH tree
Campbell Barton [Thu, 5 May 2016 19:17:34 +0000 (05:17 +1000)]
Fix error not using the cached BVH tree

5 years agoTransform/Snap: EditMesh/BKE_bvhutils API improvements
Germano Cavalcante [Thu, 5 May 2016 18:49:21 +0000 (04:49 +1000)]
Transform/Snap: EditMesh/BKE_bvhutils API improvements

Separate the creation of trees from EditMesh from the creation of trees from DerivedMesh.
This was meant to simplify the API, but didn't work out so well.

`bvhtree_from_mesh_*` actually is working as `bvhtree_from_derivedmesh_*`.
This is inconsistent with the trees created from EditMesh. Since for create them does not use the DerivedMesh.

In such cases the dm is being used only to cache the tree in the struct DerivedMesh. What is immediately released once
bvhtree is being used in functions that change(tag) the DM cleaning the cache.

- Use a filter function so users of SnapObjectContext can define how edit-mesh elements are handled.
- Remove em_evil.
- bvhtree of EditMesh is now really cached in the snap functions.
- Code becomes organized and easier to maintain.

This is an important patch for future improvements in snapping functions.

5 years agoOptimize linear<->sRGB conversion for SSE2 processors
Sergey Sharybin [Thu, 5 May 2016 17:25:08 +0000 (19:25 +0200)]
Optimize linear<->sRGB conversion for SSE2 processors

Using SSE2 intrinsics when available for this kind of conversions.

It's not totally accurate, but accurate enough for the purposes where
we're using direct colorspace conversion by-passing OCIO.

Partially based on code from Cycles, partially based on other online

Makes projection painting on hi-res float textures smoother.

This commit also enables global SSE2 in Blender. It shouldn't
bring any regressions in supported hardware (we require SSE2 since
2.64 now), but should keep an eye on because compilers might have
some bugs with that (unlikely, but possible).

5 years agoDocs: scanfill.c purpose
Campbell Barton [Thu, 5 May 2016 14:37:31 +0000 (00:37 +1000)]
Docs: scanfill.c purpose

5 years agoFix T48320: Freestyle renders wrong edges of objects which in the other RenderLayer.
Tamito Kajiyama [Thu, 5 May 2016 14:09:22 +0000 (23:09 +0900)]
Fix T48320: Freestyle renders wrong edges of objects which in the other RenderLayer.

FSAA sample files in EXR format are no longer always updated (after some
changes between 2.73 and 2.74 releases), and the reported bug was caused
by old samples from a previous frame that were being merged by mistake.

The present revision addresses the documented issue by entirely skipping
the rendering of auto-generated scenes when there are no Freestyle strokes
to render, which suppresses sample merging of the render layers that were
not rendered.

5 years agoOptimize projection painting with big brushes
Sergey Sharybin [Thu, 5 May 2016 12:45:00 +0000 (14:45 +0200)]
Optimize projection painting with big brushes

Multi-threaded partial buffer update, gives about 2x speedup with
big brushes.

Thanks Campbell for testing and benchmarking!

5 years agoOptimize threaded scanline processor
Sergey Sharybin [Thu, 5 May 2016 12:18:11 +0000 (14:18 +0200)]
Optimize threaded scanline processor

Avoid memory allocation for task data.

5 years agoSimplify scanline threaded processor used by GPU_verify_image
Sergey Sharybin [Thu, 5 May 2016 11:15:51 +0000 (13:15 +0200)]
Simplify scanline threaded processor used by GPU_verify_image

Just avoid some unneeded initialization functions when the threaded
processor is simple enough to only depend on current chunk start
scanline and number of scanlines.

5 years agoFix project paint using uninitialized edit-region
Campbell Barton [Thu, 5 May 2016 10:57:54 +0000 (20:57 +1000)]
Fix project paint using uninitialized edit-region

First stroke always had the minimum rectangle set to 0,0 which could cause a largre region of pixels to be
unnecessarily updated.

5 years agoCurve Fitting: avoid clamping fallback handles.
Campbell Barton [Thu, 5 May 2016 10:30:08 +0000 (20:30 +1000)]
Curve Fitting: avoid clamping fallback handles.

5 years agoOptimize Blank and Color Grid generated images
Sergey Sharybin [Thu, 5 May 2016 10:02:40 +0000 (12:02 +0200)]
Optimize Blank and Color Grid generated images

Avoid unnecessary pixels linearization gives nice speedup.

5 years agoCorrect error in recent smoothview edits
Campbell Barton [Thu, 5 May 2016 09:58:03 +0000 (19:58 +1000)]
Correct error in recent smoothview edits

5 years agoFix typo in previous commit
Sergey Sharybin [Thu, 5 May 2016 09:33:13 +0000 (11:33 +0200)]
Fix typo in previous commit

Thanks Julian Eisel (Severin) for the heads up!

5 years agoOptimization for initial display of high res textures in viewport
Sergey Sharybin [Thu, 5 May 2016 09:25:31 +0000 (11:25 +0200)]
Optimization for initial display of high res textures in viewport

Multi-thread all the color space conversion operations.

Gives speedup from 0.8 to 0.1 seconds on a model with 4k etxture on it.

5 years agoImage Paint: fix for calls to GPU_free_image while painting
Campbell Barton [Thu, 5 May 2016 08:52:11 +0000 (18:52 +1000)]
Image Paint: fix for calls to GPU_free_image while painting

The width and height of of the region to update are often zero,
skip calling GPU_paint_update_image in this case.

5 years agoFix T48210: Editing all selected buttons fails to auto-key
Campbell Barton [Wed, 4 May 2016 16:37:46 +0000 (02:37 +1000)]
Fix T48210: Editing all selected buttons fails to auto-key

5 years agoUI: avoid getting the active button when its already known
Campbell Barton [Wed, 4 May 2016 16:21:29 +0000 (02:21 +1000)]
UI: avoid getting the active button when its already known

5 years agoView3D: apply smoothview before modal view operations
Campbell Barton [Wed, 4 May 2016 16:01:18 +0000 (02:01 +1000)]
View3D: apply smoothview before modal view operations

5 years agoCleanup: rename ED_view3d_smooth_view_finish (to force_finish)
Campbell Barton [Wed, 4 May 2016 15:51:25 +0000 (01:51 +1000)]
Cleanup: rename ED_view3d_smooth_view_finish (to force_finish)

5 years agoFix error in BM_face_exists_overlap_subset
Campbell Barton [Wed, 4 May 2016 15:26:39 +0000 (01:26 +1000)]
Fix error in BM_face_exists_overlap_subset

Was re-using loop index, thanks to @bzztploink for spotting!

5 years agoCycles: Fix hair minimal size doesn't work on GPU and SSE2 only CPUs
Sergey Sharybin [Wed, 4 May 2016 15:14:14 +0000 (17:14 +0200)]
Cycles: Fix hair minimal size doesn't work on GPU and SSE2 only CPUs

5 years agoCompositor: negative color support for ASC-CDL offset
Campbell Barton [Wed, 4 May 2016 13:56:38 +0000 (23:56 +1000)]
Compositor: negative color support for ASC-CDL offset

Since the color wheel can't handle negative colors usefully, use a basis value for the initial RGB.

5 years agoFix T48346: Transparent shadows do not work for instanced objects
Sergey Sharybin [Wed, 4 May 2016 12:46:30 +0000 (14:46 +0200)]
Fix T48346: Transparent shadows do not work for instanced objects

5 years agoCurve Draw: option to apply absolute offset
Campbell Barton [Wed, 4 May 2016 05:45:55 +0000 (15:45 +1000)]
Curve Draw: option to apply absolute offset

Offset used curve radius, which isn't useful drawing without any bevel radius.

5 years agoFix T48340: Smooth view cancels previous view action
Campbell Barton [Tue, 3 May 2016 17:38:20 +0000 (03:38 +1000)]
Fix T48340: Smooth view cancels previous view action

Previously users needed to wait for view orbit to finished,
so quickly pressing keys would gave different result.

5 years agoFix 3D View panel header color wrong after theme reset
Julian Eisel [Tue, 3 May 2016 16:26:58 +0000 (18:26 +0200)]
Fix 3D View panel header color wrong after theme reset

Caused by wrong alpha value in rB34b30f847429ac (used 0.01, should've been 0.1). Also made sure all editors initialize same default theme values for panels and cleaned up code a bit.
Works fine with old userpref.blend files.

5 years agoFix broken build without IME and/or I18N (caused by rBcb6307162b4c12).
Bastien Montagne [Tue, 3 May 2016 14:56:52 +0000 (16:56 +0200)]
Fix broken build without IME and/or I18N (caused by rBcb6307162b4c12).

5 years agoFix T48328: Outliner: Armature EditMode: crash when selecting bone of a shared amratu...
Bastien Montagne [Tue, 3 May 2016 13:05:24 +0000 (15:05 +0200)]
Fix T48328: Outliner: Armature EditMode: crash when selecting bone of a shared amrature in another object's bone list.

Basically, issue is that outliner stores editbones for an edited armature, which are only valid during EditMode.

When more than one object use the same armature, selecting ebones from same armature but under non-edited object
would first select that object (and hence switch out of editmode), and then try to select editbone while editdata
no more exist.

Solution for now is to not change active object in this case - it's not totally ideal (not consistent),
but other solutions (like switching edited object without leaving editmode, or rebuilding (part of)
outliner tree in-between) are horribly hackish and most likely prone to epic failure anyway.

5 years agoCache whether current translation language supports IME or not
Sergey Sharybin [Tue, 3 May 2016 10:38:21 +0000 (12:38 +0200)]
Cache whether current translation language supports IME or not

Solves the weak point mentionedi n previous commit.

5 years agoFix T47841: Shift-space doesn't type space in type-in fields on Windows
Sergey Sharybin [Tue, 3 May 2016 10:18:53 +0000 (12:18 +0200)]
Fix T47841: Shift-space doesn't type space in type-in fields on Windows

Shift-space was reserved for IME support, however IME will only
be enabled on certain languages. We can avoid any IME-related
exceptions form other languages without too much trouble.

There's one weak point around ui_ime_is_lang_supported() tho,
which is it might be doing string comparison a bit too much
often now, this we can avoid by handling those checks from BLT.

5 years agoFix T47424: Blender Internal material node 'mapping' not showing results of animation
Sergey Sharybin [Tue, 3 May 2016 09:44:17 +0000 (11:44 +0200)]
Fix T47424: Blender Internal material node 'mapping' not showing results of animation

Not very efficient solution -- it'll update mapping node on init ntree exec and will
not work for viewport GLSL shading perhaps, but it's as good as it could be within
current dependency graph.

The issue here is that manual edit of values will cause cached matrix re-evaluation.
but using animation does not use rna update callbacks hence no matrix update was

5 years agoCleanup: no need to cast for pointer comparison
Campbell Barton [Tue, 3 May 2016 08:16:06 +0000 (18:16 +1000)]
Cleanup: no need to cast for pointer comparison

5 years agoFix T48169: 1 pixel offset painting 2D textures
Campbell Barton [Tue, 3 May 2016 07:49:18 +0000 (17:49 +1000)]
Fix T48169: 1 pixel offset painting 2D textures

Painting at negative locations was using int-rounding.

5 years agoCleanup: use offset macro
Campbell Barton [Tue, 3 May 2016 06:40:14 +0000 (16:40 +1000)]
Cleanup: use offset macro

5 years agoUI: limit listview arrow/wheel bindings
Campbell Barton [Tue, 3 May 2016 06:17:14 +0000 (16:17 +1000)]
UI: limit listview arrow/wheel bindings

Allow Ctrl-Up for eg to be used when in a list view.

5 years agoUI: don't show tips when navigating ui-list
Campbell Barton [Tue, 3 May 2016 04:59:45 +0000 (14:59 +1000)]
UI: don't show tips when navigating ui-list

5 years agoCleanup: use const for units API
Campbell Barton [Tue, 3 May 2016 03:52:07 +0000 (13:52 +1000)]
Cleanup: use const for units API

Also make return args explicit.

5 years agoMath Lib: inline project_plane_v3_v3v3
Campbell Barton [Tue, 3 May 2016 03:30:16 +0000 (13:30 +1000)]
Math Lib: inline project_plane_v3_v3v3

5 years agoMissed setting handles in curve dissolve
Campbell Barton [Mon, 2 May 2016 14:06:12 +0000 (00:06 +1000)]
Missed setting handles in curve dissolve

5 years agoCorrect header (can't use uint here)
Campbell Barton [Mon, 2 May 2016 11:08:02 +0000 (21:08 +1000)]
Correct header (can't use uint here)

5 years agoFix bl_load_py_modules test
Campbell Barton [Mon, 2 May 2016 11:01:10 +0000 (21:01 +1000)]
Fix bl_load_py_modules test

- scripts that execute directly need to include their basedir in the sys.path
- modules which are in a directory without an weren't importing.

5 years agoCurve: new dissolve tool
Campbell Barton [Mon, 2 May 2016 08:11:09 +0000 (18:11 +1000)]
Curve: new dissolve tool

removes vertices, re-fitting the surrounding handles.

5 years agoCurve Fitting: expose function for fitting a single curve
Campbell Barton [Mon, 2 May 2016 08:06:25 +0000 (18:06 +1000)]
Curve Fitting: expose function for fitting a single curve

5 years agoBLI_array_utils: helper for stepping over contiguous ranges
Campbell Barton [Mon, 2 May 2016 08:01:00 +0000 (18:01 +1000)]
BLI_array_utils: helper for stepping over contiguous ranges

5 years agoFix compilation error on Armel architecture
Sergey Sharybin [Mon, 2 May 2016 07:55:08 +0000 (09:55 +0200)]
Fix compilation error on Armel architecture

__GCC_HAVE_SYNC_COMPARE_AND_SWAP_n are not defined on this architecture
for some reason, however those functions are available.

Adding a workaround for newly used __sync_fetch_and_and() function.

5 years agoFix T48325: Data transfer modifier vertex group selector doesn't work with freestyle...
Bastien Montagne [Sun, 1 May 2016 13:36:09 +0000 (15:36 +0200)]
Fix T48325: Data transfer modifier vertex group selector doesn't work with freestyle data.

Freestyle edge/face marks are (afaik) our only actual customdata bitflags... Original work
kinda assumed we had no such things. :P

5 years agoFix Cycles external OSL shader not working with relative file paths.
Brecht Van Lommel [Sat, 30 Apr 2016 22:50:49 +0000 (00:50 +0200)]
Fix Cycles external OSL shader not working with relative file paths.

5 years agoFix T48118: Vertex Groups not masking particle hair emission correctly
Bastien Montagne [Sat, 30 Apr 2016 14:51:06 +0000 (16:51 +0200)]
Fix T48118: Vertex Groups not masking particle hair emission correctly

Own regression from rB019ce363b01bba0af, not totally sure why removing the heading
zero value in element_sum broke binary search distribution in random branch, but...

New code makes thing sooo much simpler, by simply getting rid of all zero-weight
items in element_sum (at the cost of adding a temporary extra index mapping array),
that way neither random nor 'even ordered' distribution code has to wory anymore
about skipping zero-weighted items!

5 years agoSlight adjustment to curve fitting tangents
Campbell Barton [Sat, 30 Apr 2016 06:27:43 +0000 (16:27 +1000)]
Slight adjustment to curve fitting tangents

Don't let the point spacing give bias to a side.