blender.git
3 years agoTweak to GPencil layers UI layout
Joshua Leung [Sun, 8 May 2016 14:04:28 +0000 (02:04 +1200)]
Tweak to GPencil layers UI layout

I'm still not happy with this layout as it is now, but it seems a bit less unbalanced
than what I'd been trying before. So, let's leave this as-is for now.

3 years agoTweaks for a tooltip I missed during earlier review for D1886
Joshua Leung [Sun, 8 May 2016 14:00:23 +0000 (02:00 +1200)]
Tweaks for a tooltip I missed during earlier review for D1886

3 years agoA "better" (?) fix for msvc silliness - used in one other place in all of Blender
Joshua Leung [Sun, 8 May 2016 13:46:18 +0000 (01:46 +1200)]
A "better" (?) fix for msvc silliness - used in one other place in all of Blender

3 years agoFix compiling on MSVC - M_PI undefined
Joshua Leung [Sun, 8 May 2016 13:31:13 +0000 (01:31 +1200)]
Fix compiling on MSVC - M_PI undefined

3 years agoAction Editor: Initial support for a Properties Region
Joshua Leung [Sun, 8 May 2016 02:38:30 +0000 (14:38 +1200)]
Action Editor: Initial support for a Properties Region

This commit adds some of the initial support for a properties region in the
Action Editor. There are currently no panels to display, as there is still
a lot of work required to port over the required internal architecture to
support the panels seen in the Graph Editor.

3 years agoD1886: GPencil - Add smooth iterations parameter to get better quality
Antonio Vazquez [Sun, 8 May 2016 01:38:54 +0000 (13:38 +1200)]
D1886: GPencil - Add smooth iterations parameter to get better quality

After some test, a new iteration parameter has been added in order to
apply repetitive smoothing to the stroke. By default 1 iteration is applied,
but can used any number between 1 and 3.

The repetition uses different levels of intensity from 100% of the defined smooth
factor for the first loop, 50% for the second and 25% for the third. We use in each
loop a smaller value in order to avoid deform too much the stroke.

3 years agoFix for D1705: Update to fix the bug with extra triangles that produces glitches...
Antonio Vazquez [Sat, 7 May 2016 11:40:59 +0000 (23:40 +1200)]
Fix for D1705: Update to fix the bug with extra triangles that produces glitches in some situations

3 years agoGPencil Fills: Small reshuffle of UI buttons
Joshua Leung [Sun, 1 May 2016 12:58:53 +0000 (00:58 +1200)]
GPencil Fills: Small reshuffle of UI buttons

Now, stroke-related things (thickness, volumetric, points) and fill-related things
(HQ fill) are in the relevant columns, instead of having some in each column.

3 years agoCode Cleanup: Just a bit more tidying up comments/whitespace/etc.
Joshua Leung [Sat, 30 Apr 2016 00:47:07 +0000 (12:47 +1200)]
Code Cleanup: Just a bit more tidying up comments/whitespace/etc.

There is still some instability in how the triangulations are happening,
where the triangle count of the resulting triangulation fluctuates resulting
in weird artifacts sometimes.

To reproduce, try drawing some U-shapes, and keep reloading the file.

3 years agoFix for potential bug with new GP Fill
Joshua Leung [Thu, 28 Apr 2016 15:25:48 +0000 (03:25 +1200)]
Fix for potential bug with new GP Fill

While trying to track down why I still keep getting some random "extra" triangles
showing up when reloading files with fills, I noticed that there's an index mismatch
here that may cause problems in some rare cases:

There are "gps->totpoints" items in tmp_triangles, but there should only be
"gps->tot_triangles" triangles in the gps->triangles array. If for whatever reason
some of the triangles in tmp_triangles are invalid, this could have meant that
while a tmp_triangles candidate was skipped, a corresponding slot for a valid
triangle also got skipped.

3 years agoCode Cleanups: A bunch of tweaks to tidy up things from the GPencil Fill patch
Joshua Leung [Thu, 28 Apr 2016 15:12:53 +0000 (03:12 +1200)]
Code Cleanups: A bunch of tweaks to tidy up things from the GPencil Fill patch

3 years agoD1705: Fix Grease Pencil Fill for Concave Shapes
Antonio Vazquez [Thu, 28 Apr 2016 13:10:33 +0000 (01:10 +1200)]
D1705: Fix Grease Pencil Fill for Concave Shapes

Improve filling for concave shapes using a triangulation of the stroke.
The triangulation information is saved in an internal cache and only is
recalculated if the stroke changes.

The triangulation is not saved in .blend file.

Reviewers: aligorith

Maniphest Tasks: T47102

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

3 years agoFix T48373: Crash when using dynamic paint with brush material.
Bastien Montagne [Sun, 8 May 2016 09:39:45 +0000 (11:39 +0200)]
Fix T48373: Crash when using dynamic paint with brush material.

`dynamicPaint_doMaterialTex` was called from inside an omp parallel section with brush->dm
itself, and not the local dm copy. Generating looptri data is not thread safe at all...

3 years agoCycles: Cleanup: Swap order of the RNG-state-initializing for-loops
Lukas Stockner [Sat, 7 May 2016 23:22:28 +0000 (01:22 +0200)]
Cycles: Cleanup: Swap order of the RNG-state-initializing for-loops

Swap the for-loops in the RenderBuffer reset code to follow the convention
of looping over y in the outer loop.
The improved cache performance won't really be noticable here, but it's nicer
if it follows the usual style.

3 years agoClamp dot-product to avoid precision error
Campbell Barton [Sat, 7 May 2016 14:02:34 +0000 (00:02 +1000)]
Clamp dot-product to avoid precision error

Would only happen in degenerate cases.

3 years agoCleanup: Remove unneded (void) line, we don't have ifdefs here anymore.
Thomas Dinges [Sat, 7 May 2016 13:55:28 +0000 (15:55 +0200)]
Cleanup: Remove unneded (void) line, we don't have ifdefs here anymore.

3 years agoCleanup: whicespace
Campbell Barton [Sat, 7 May 2016 13:58:04 +0000 (23:58 +1000)]
Cleanup: whicespace

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

3 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

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

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

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

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

3 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

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

3 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:

* Environment flag CYCLES_CUDA_ADAPTIVE_COMPILE or
* Debug menu (Debug value 256) in the Cycles UI.

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

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

3 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

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

3 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)

3 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

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

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

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

3 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: https://developer.blender.org/D1969

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

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

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

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

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

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

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

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

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

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

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

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

Values set but not used

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

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

3 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

3 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).

3 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

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

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

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

3 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

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

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

3 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

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

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

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

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

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

3 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

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

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

3 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

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

3 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
articles:

  https://stackoverflow.com/questions/6475373/optimizations-for-pow-with-const-non-integer-exponent

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

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

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

3 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!

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

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

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

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

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

3 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

3 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!

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

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

3 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

3 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

3 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

3 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)

3 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!

3 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

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

3 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

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

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

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

3 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).

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

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

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

3 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
happening.

3 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