blender-staging.git
7 years agoAdd Edge sharp/smooth to 3DView shading panel, as well as new Vert sharp/smooth.
Bastien Montagne [Wed, 16 Apr 2014 13:18:14 +0000 (15:18 +0200)]
Add Edge sharp/smooth to 3DView shading panel, as well as new Vert sharp/smooth.

7 years agoFix for half pixel offset rasterizing masks
Campbell Barton [Wed, 16 Apr 2014 13:25:10 +0000 (23:25 +1000)]
Fix for half pixel offset rasterizing masks

7 years agoMath Lib: optimize axis_dominant_v3_to_m3, approx 6x speedup
Campbell Barton [Wed, 16 Apr 2014 11:04:17 +0000 (21:04 +1000)]
Math Lib: optimize axis_dominant_v3_to_m3, approx 6x speedup

build the matrix directly rather then calculating with axis/angle

also remove unused function calc_poly_plane

7 years agoMath Lib: increase epsilon for ortho_basis_v3v3_v3
Campbell Barton [Wed, 16 Apr 2014 07:24:27 +0000 (17:24 +1000)]
Math Lib: increase epsilon for ortho_basis_v3v3_v3

passing in a unit length vector wouldn't always compute unit length vectors because the epsilon tested was too small.

7 years agoFix T39445: Async LibLoad Crash
Mitchell Stokes [Wed, 16 Apr 2014 08:15:40 +0000 (01:15 -0700)]
Fix T39445: Async LibLoad Crash

There was some deadlock due to trying manage Python's GIL. Instead of
continuing to fight with it, anything needing to call into Python while
conversion during lib loading is just delayed until it can be done in
the main thread.

7 years agoFix T39745: "Origin to geometry" not working with Text objects. (regression)
Campbell Barton [Wed, 16 Apr 2014 03:18:42 +0000 (13:18 +1000)]
Fix T39745: "Origin to geometry" not working with Text objects. (regression)

7 years agoFix T39509: Crash when assign an empty as a LoD
Daniel Stokes [Tue, 15 Apr 2014 19:44:49 +0000 (19:44 +0000)]
Fix T39509: Crash when assign an empty as a LoD

Missing check when looking for appropriate LoD

7 years agoDyntopo:
Antony Riakiotakis [Wed, 16 Apr 2014 02:31:02 +0000 (05:31 +0300)]
Dyntopo:

Store PBVH node ID in CustomData. This avoids a number of hash deletions
and checks/insertions on big hashes.

7 years agoDyntopo: slightly change node invalidation, only vertices can change BB
Antony Riakiotakis [Tue, 15 Apr 2014 23:10:24 +0000 (02:10 +0300)]
Dyntopo: slightly change node invalidation, only vertices can change BB
recalculation, only faces can change normal invalidation.

7 years agoFix T39607: Audio not in synch when the blend file loads.
Jörg Müller [Tue, 15 Apr 2014 17:17:50 +0000 (19:17 +0200)]
Fix T39607: Audio not in synch when the blend file loads.

The problem here was that animation buffers got initialized with zeros in the beginning for unknown parts. Now it gets initialized with the first known value.
The bug's result was that the animation of the pitch started with 0 on first playback and thus any seeking while the pitch is zero resulted in seeking to the beginning.

7 years agoFix regression, sculpting on mesh with matcaps (without multires/
Antony Riakiotakis [Tue, 15 Apr 2014 17:12:35 +0000 (20:12 +0300)]
Fix regression, sculpting on mesh with matcaps (without multires/

7 years agoBuilding with C++ guarded alloc works again
Campbell Barton [Tue, 15 Apr 2014 16:22:49 +0000 (02:22 +1000)]
Building with C++ guarded alloc works again

7 years agoFix T39685: triangulation modifier creates zero-area faces
Campbell Barton [Tue, 15 Apr 2014 15:17:00 +0000 (01:17 +1000)]
Fix T39685: triangulation modifier creates zero-area faces

7 years agoUse binary search threshold when deciding whether to create ActKeyColumns too...
Joshua Leung [Tue, 15 Apr 2014 15:22:02 +0000 (03:22 +1200)]
Use binary search threshold when deciding whether to create ActKeyColumns too...

7 years agoOptimisations for building "Long Keyframes"
Joshua Leung [Tue, 15 Apr 2014 15:21:06 +0000 (03:21 +1200)]
Optimisations for building "Long Keyframes"

For a long time, one of the bottlenecks when drawing summary channels in the dopesheet
(especially with many objects) was how the long keyframes feature (i.e showing holds
between keyframes) got built. Specifically, it was the step where we check on the previous
keyframe to see whether there's a hold between those two.

The old code performed some elaborate checks, which made sense back when we used to handle
certain summary channels (e.g. object-action/ipo, and groups IIRC) differently. However,
nowadays, everything just does it by going over the FCurves one by one, so the offending
code wasn't really providing much benefit. Unless I've forgotten some other reason why
that old method is necessary, this commit should provide a decent speedup here, making
things somewhat interactive now (if still a bit jerky).

Other Tweaks:
1) Introduced float-precision threshold when checking to see whether an existing long
   keyframe could be reused. This should hopefully reduce the number of fp-jitter issues
   when creating summaries for many channels, reducing the number of duplicates created.
2) Precompute colours used for shading the long keyframes, instead of recomputing for
   each block.

7 years agoMove binary-search threshold used for FCurves to BKE_fcurve.h header
Joshua Leung [Tue, 15 Apr 2014 15:08:01 +0000 (03:08 +1200)]
Move binary-search threshold used for FCurves to BKE_fcurve.h header

Since this is now pretty much the de-facto "minimum distance between keyframes",
we might as well expose this in this header so that other places which need similar
thresholds can perform similar checks (needed for my next commit)

7 years agoFix T39234: popup menus behave poorly when they have not enough width for all their...
Bastien Montagne [Tue, 15 Apr 2014 14:49:49 +0000 (16:49 +0200)]
Fix T39234: popup menus behave poorly when they have not enough width for all their columns.

Issue fixed by:
* Not having constant width for all columns, but adapt each to its content's width;
* Adapting undo's menu height to undo list length (so that we never have more than three columns).

It is still possible to get issues in extreme cases (small screen, high DPI size,
long op names everywhere...), but this should now be rare corner cases.

Also fixes a minor glitch with undo menu (first column had one item less than the others...).

7 years agoStructural cleanup and improvements for the compositor.
Lukas Tönne [Tue, 15 Apr 2014 14:06:12 +0000 (16:06 +0200)]
Structural cleanup and improvements for the compositor.

Many parts of the compositor are unnecessarily complicated. This patch
aims at reducing the complexity of writing nodes and making the code
more transparent.

== Separating Nodes and Operations ==

Currently these are both mixed in the same graph, even though they have
very different purposes and are used at distinct stages in the
compositing process. The patch introduces dedicated graph classes for
nodes and for operations.

This removes the need for a lot of special case checks (isOperation etc.)
and explicit type casts. It simplifies the code since it becomes clear
at every stage what type of node we are dealing with. The compiler can
use static typing to avoid common bugs from mixing up these types and
fewer runtime sanity checks are needed.

== Simplified Node Conversion ==

Converting nodes to operations was previously based on "relinking", i.e.
nodes would start with by mirroring links in the Blender DNA node trees,
then add operations and redirect these links to them. This was very hard
to follow in many cases and required a lot of attention to avoid invalid
states.

Now there is a helper class called the NodeConverter, which is passed to
nodes and implements a much simpler API for this process. Nodes can add
operations and explicit connections as before, but defining "external"
links to the inputs/outputs of the original node now uses mapping
instead of directly modifying link data. Input data (node graph) and
result (operations graph) are cleanly separated.

== Removed Redundant Data Structures ==

A few redundant data structures have been removed, notably the
SocketConnection. These are only needed temporarily during graph
construction. For executing the compositor operations it is perfectly
sufficient to store only the direct input link pointers. A common
pointer indirection is avoided this way (which might also give a little
performance improvement).

== Avoid virtual recursive functions ==

Recursive virtual functions are evil. They are very hard to follow
during debugging. At least in the parts this patch is concerned with
these functions have been replaced by a non-virtual recursive core
function (which might then call virtual non-recursive functions if
needed). See for example NodeOperationBuilder::group_operations.

7 years agoMath Lib: avoid having to pass a pre-calculated normal tot area_poly_v3
Campbell Barton [Tue, 15 Apr 2014 14:27:35 +0000 (00:27 +1000)]
Math Lib: avoid having to pass a pre-calculated normal tot area_poly_v3

add normal_poly_v3

7 years agoVarious fixes/improvements regarding BMesh's elem_index_dirty and BM_LOOP handling.
Bastien Montagne [Tue, 15 Apr 2014 14:18:27 +0000 (16:18 +0200)]
Various fixes/improvements regarding BMesh's elem_index_dirty and BM_LOOP handling.

Most notably, BM_LOOP and BM_FACE index recompute should now be fully decoupled.

7 years agoFix T39743: Crash when deleting faces in with new autosmooth.
Bastien Montagne [Tue, 15 Apr 2014 14:15:43 +0000 (16:15 +0200)]
Fix T39743: Crash when deleting faces in with new autosmooth.

Odd I did not catch this one... :/

7 years agoFix T37675: blender internal viewport render wrong for volumes after rotation.
Brecht Van Lommel [Tue, 15 Apr 2014 13:54:56 +0000 (15:54 +0200)]
Fix T37675: blender internal viewport render wrong for volumes after rotation.

We really should not have Object.imat_ren, that's the wrong place to put render
data. But just update it now on rotation rather than doing a bigger refactor to
remove it.

7 years agoFix cycles standalone not writing images in background mode properly.
Brecht Van Lommel [Tue, 15 Apr 2014 13:19:05 +0000 (15:19 +0200)]
Fix cycles standalone not writing images in background mode properly.

7 years agoFix T39284: clamp cycles volume density to be >= 0, to avoid accidental strange shading.
Brecht Van Lommel [Tue, 15 Apr 2014 12:33:13 +0000 (14:33 +0200)]
Fix T39284: clamp cycles volume density to be >= 0, to avoid accidental strange shading.

7 years agoFix T39610: Shared mesh used for Mesh Deform causes crash
Sergey Sharybin [Tue, 15 Apr 2014 12:36:24 +0000 (18:36 +0600)]
Fix T39610: Shared mesh used for Mesh Deform causes crash

For now disable using linked edit mesh in the meshdeform modifier.

This is because editbmesh_get_derived_cage_and_final() might easily
conflict with the thread which evaluates object which is in the edit
mode for this mesh.

We'll support this case once granular dependency graph is landed.

7 years agoFix T39607: Audio not in synch when the blend file loads.
Bastien Montagne [Tue, 15 Apr 2014 12:23:13 +0000 (14:23 +0200)]
Fix T39607: Audio not in synch when the blend file loads.

Root of issue is probably in AUDASPACE itself (or even in OpenAL?).
Issue not present with SDL backend, only OpenAL afaik.

For now, workaround in Blender is to call seek twice when starting play
(not needed when resuming from pause).

7 years agoSome style cleanup in sound area.
Bastien Montagne [Tue, 15 Apr 2014 08:59:42 +0000 (10:59 +0200)]
Some style cleanup in sound area.

7 years agoOSX/python: update to py 3.4
Jens Verwiebe [Tue, 15 Apr 2014 12:12:06 +0000 (14:12 +0200)]
OSX/python: update to py 3.4

7 years agoCode cleanup: indentation
Campbell Barton [Tue, 15 Apr 2014 09:21:29 +0000 (19:21 +1000)]
Code cleanup: indentation

7 years agoFix compilation (size_t not defined) by including stddef.h in BLI_sys_types.h
Bastien Montagne [Tue, 15 Apr 2014 07:11:45 +0000 (09:11 +0200)]
Fix compilation (size_t not defined) by including stddef.h in BLI_sys_types.h

7 years agoFix T39742: Crash with Cycles + new autosmooth crash
Bastien Montagne [Tue, 15 Apr 2014 06:29:22 +0000 (08:29 +0200)]
Fix T39742: Crash with Cycles + new autosmooth crash

Nice little mistake, since the invalid mem access only happened once (the first time),
was close to valid mem, and was only used to read, it would not crash often...

7 years agoFix my last commit cad4bfe: Added 'use_' prefix to Freestyle edge/face mark properties.
Tamito Kajiyama [Tue, 15 Apr 2014 05:44:08 +0000 (14:44 +0900)]
Fix my last commit cad4bfe: Added 'use_' prefix to Freestyle edge/face mark properties.

7 years agoRevert part of last commit,
Campbell Barton [Tue, 15 Apr 2014 04:44:28 +0000 (14:44 +1000)]
Revert part of last commit,

RNA is low level data access, setting mesh values shouldn't change draw options.

Also its redundant to name attrs Face.freestyle_face_mark,
removed edge/face from attr names

7 years agoGHash: add BLI_ghashutil_uinthash_v4 for hashing 4 ints at once
Campbell Barton [Tue, 15 Apr 2014 04:39:23 +0000 (14:39 +1000)]
GHash: add BLI_ghashutil_uinthash_v4 for hashing 4 ints at once

7 years agoFreestyle: Added missing mesh property definitions for Freestyle Edge/Face marks.
Tamito Kajiyama [Tue, 15 Apr 2014 04:29:03 +0000 (13:29 +0900)]
Freestyle: Added missing mesh property definitions for Freestyle Edge/Face marks.

This revision also addresses the issue of these properties not shown in the Outliner
in the Datablocks display mode.  Now Freestyle edge/face marks can be keyframed
through the Outliner.

7 years agoGHash: add typed hash functions (were all (void *))
Campbell Barton [Tue, 15 Apr 2014 04:17:54 +0000 (14:17 +1000)]
GHash: add typed hash functions (were all (void *))

- BLI_ghashutil_strhash_n takes string length, to avoid terminating the string before hashing.
- BLI_ghashutil_inthash/uinthash take ints, to avoid casting to (void *)

This also showed up incorrect use of inthash, which was using a pointer.

7 years agoStyle cleanup: C & pep8
Campbell Barton [Tue, 15 Apr 2014 03:11:48 +0000 (13:11 +1000)]
Style cleanup: C & pep8

7 years agoFix T39740: New Autosmooth instant crash entering Edit Mode
Bastien Montagne [Mon, 14 Apr 2014 21:42:38 +0000 (23:42 +0200)]
Fix T39740: New Autosmooth instant crash entering Edit Mode

One should always be wary of last minute changes, especially in comples code area... :/

7 years agoFix video FFmpeg nt being able to produce video files due to usage of deprecated...
Sergey Sharybin [Mon, 14 Apr 2014 18:15:09 +0000 (00:15 +0600)]
Fix video FFmpeg nt being able to produce video files due to usage of deprecated settings

7 years agoFix T39700: Plane deform still works forever
Sergey Sharybin [Mon, 14 Apr 2014 17:58:02 +0000 (23:58 +0600)]
Fix T39700: Plane deform still works forever

Clamped the EWA sampling region to buffer size now. Solves the issue,
but needs more tests to be sure weights are correct.

7 years agoFix T39736: Ctrl+V reports "Objects Pasted" regardless if it worked or not.
Bastien Montagne [Mon, 14 Apr 2014 17:49:18 +0000 (19:49 +0200)]
Fix T39736: Ctrl+V reports "Objects Pasted" regardless if it worked or not.

7 years agoFix cycles standalone not saving renders in background mode.
Brecht Van Lommel [Mon, 14 Apr 2014 12:08:32 +0000 (14:08 +0200)]
Fix cycles standalone not saving renders in background mode.

7 years agoFix for the eyedropper fixes from today
Sergey Sharybin [Mon, 14 Apr 2014 11:56:04 +0000 (17:56 +0600)]
Fix for the eyedropper fixes from today

Missing color copy, noticed by @campbellbarton, thanks!

7 years agoFix T39702: VSE channel preview: strips used as effect operands no more visible
Sergey Sharybin [Mon, 14 Apr 2014 11:50:47 +0000 (17:50 +0600)]
Fix T39702: VSE channel preview: strips used as effect operands no more visible

7 years agoCMake: enable OpenMP for all platforms by default
Sergey Sharybin [Mon, 14 Apr 2014 09:38:34 +0000 (15:38 +0600)]
CMake: enable OpenMP for all platforms by default

This is done in SCons and the only reason to disable OpenMP on
Windows was to deal with the express version of compilers.

Now when we are about to switch to msvc2013 by default we can
safely enable OpenMP there since even express version of this
beast supports OpenMP.

7 years agoFix T39704: Texture painting fails with different float image working space
Sergey Sharybin [Mon, 14 Apr 2014 08:08:10 +0000 (14:08 +0600)]
Fix T39704: Texture painting fails with different float image working space

This was rather a TODO item related on supporting the proper painting color
space, but added a small tweaks which will make things working for now in
most of the situation (assuming the default view of display is ivnertible,
as it is to be expected to be anyway).

Shouldn't give much overhead since the conversion processors are cached in
the color management code.

And for the note: no, projection painting does not requite such a tweak
because viewport works in sRGB space anyway.

7 years agoFix the eyedropper not working properly with different scene linear spaces
Sergey Sharybin [Mon, 14 Apr 2014 07:45:09 +0000 (13:45 +0600)]
Fix the eyedropper not working properly with different scene linear spaces

Either was some residue from the past or somebody didn't implement this in
the right way.

Also fixed memory leak in ED_space_clip_color_sample() caused by missing
image buffer release.

7 years agoCycles: Show Auto Smooth and Angle in the UI, after Split Normals are in.
Thomas Dinges [Mon, 14 Apr 2014 07:05:19 +0000 (09:05 +0200)]
Cycles: Show Auto Smooth and Angle in the UI, after Split Normals are in.

7 years agoFix for crash un-indenting in the text editor
Campbell Barton [Mon, 14 Apr 2014 03:26:12 +0000 (13:26 +1000)]
Fix for crash un-indenting in the text editor

7 years agoOSX/cmake: fix a recently reported dependency issue
Jens Verwiebe [Sun, 13 Apr 2014 16:04:35 +0000 (18:04 +0200)]
OSX/cmake: fix a recently reported dependency issue

7 years agoReduce overhead when sampling texture images for brushes. The tests can
Antony Riakiotakis [Sun, 13 Apr 2014 16:03:14 +0000 (19:03 +0300)]
Reduce overhead when sampling texture images for brushes. The tests can
be cached and reused.

7 years agoCleanup:
Antony Riakiotakis [Sun, 13 Apr 2014 15:14:45 +0000 (18:14 +0300)]
Cleanup:

Naming:

Change pressure to size_pressure, it notes correctly that this value is
updated and expected to be used for size updating only.
Change name of cursor function and since it is used for uv sculpting
only now move to the relevant file. Also cleanup unneeded functionality
from function.

Stroke:

Separate updating of stroke variables to invariants (updated when
stroke->init = false) and variants.

7 years agoFix T39430, incorrect color management in paint cursor when using
Antony Riakiotakis [Sun, 13 Apr 2014 14:20:06 +0000 (17:20 +0300)]
Fix T39430, incorrect color management in paint cursor when using
texture nodes.

Adopt a similar system to texture sampling for painting.

7 years agoCompile fix for Windows.
Thomas Dinges [Sun, 13 Apr 2014 14:09:02 +0000 (16:09 +0200)]
Compile fix for Windows.

7 years agoSplit Normals I (5/5): Add support of split normals to Cycles.
Bastien Montagne [Sun, 13 Apr 2014 10:51:06 +0000 (12:51 +0200)]
Split Normals I (5/5): Add support of split normals to Cycles.

Idea and code by Brecht, many thanks!

Reviewers: brecht

Reviewed By: brecht

CC: campbellbarton, dingto
Differential Revision: https://developer.blender.org/D369

7 years agoSplit Normals I (4/5): Add support of split normals to BI renderer.
Bastien Montagne [Sun, 13 Apr 2014 10:37:40 +0000 (12:37 +0200)]
Split Normals I (4/5): Add support of split normals to BI renderer.

Note that this commit completely replaces old behavior of the auto_smooth feature in BI.

Also note that split normals are only handled when no "advanced geometry post-processing" is used
(something like Displace will obviously break it, since it has to re-compute normals after displacement...).

Reviewers: brecht

Reviewed By: brecht

CC: campbellbarton
Differential Revision: https://developer.blender.org/D368

7 years agoSplit Normals I (3/5): Add 3Dview shading support of split normals.
Bastien Montagne [Sun, 13 Apr 2014 10:29:21 +0000 (12:29 +0200)]
Split Normals I (3/5): Add 3Dview shading support of split normals.

Mostly monkey coding in gpu ("modern" VBO drawing) and DM variants ("legacy" drawing) code...

Reviewers: brecht

Reviewed By: brecht

CC: campbellbarton
Differential Revision: https://developer.blender.org/D367

7 years agoSplit Normals I (2/5): Add basic BMesh support of split normals.
Bastien Montagne [Sun, 13 Apr 2014 10:25:02 +0000 (12:25 +0200)]
Split Normals I (2/5): Add basic BMesh support of split normals.

* Merely a re-implementation of core split algorithm for BMesh, taking advantage of topological data available.
* This code needs valid loop indices, so added BM_LOOP support to BM_mesh_elem_index_ensure() & co.

Reviewers: campbellbarton

Reviewed By: campbellbarton

CC: brecht
Differential Revision: https://developer.blender.org/D366

7 years agoSplit Normals I (1/5): basis for split normals (nearly nothing user-visible here):
Bastien Montagne [Sun, 13 Apr 2014 10:18:51 +0000 (12:18 +0200)]
Split Normals I (1/5): basis for split normals (nearly nothing user-visible here):

* Add a new calcLoopNormals function to DerivedMesh struct, and implement it for CDDM and CCGDM (subsurf).
  EditDerivedBMesh (edit mode DM) only gets a dummy one in this commit.
* Add a tessellated version of CD_LOOPNORMAL layer (CD_TESSLOOPNORMAL), with relevant code to handle it
  (tessellation, rna access, etc.).
* Change auto_smooth options of Mesh (angle now in radian internaly, and toggle is now used to enable/disable
  split normals in DM creation process). Note BI render code is not touched here, hence its behavior regarding
  this option is now incoherent, will be addressed in a separate commit.

Reviewers: campbellbarton

CC: brecht
Differential Revision: https://developer.blender.org/D365

7 years agoRevert "Fix T39484: Time line: highlighted area for frame range one frame too short."
Bastien Montagne [Sat, 12 Apr 2014 13:48:49 +0000 (15:48 +0200)]
Revert "Fix T39484: Time line: highlighted area for frame range one frame too short."

This reverts own commit e9d733a8bd9ebf803d4afac419670974792a3c0d.

Turns out there is no consensus here, better to open a design task. :/

7 years agoLinkList stack macros to swap and pop into a separate stack.
Campbell Barton [Sun, 13 Apr 2014 10:12:07 +0000 (20:12 +1000)]
LinkList stack macros to swap and pop into a separate stack.

7 years agoCode cleanup: quiet warnings & style
Campbell Barton [Sun, 13 Apr 2014 01:26:31 +0000 (11:26 +1000)]
Code cleanup: quiet warnings & style

7 years agoSlight modification to previous color wheel tweak.
Antony Riakiotakis [Sat, 12 Apr 2014 16:27:16 +0000 (19:27 +0300)]
Slight modification to previous color wheel tweak.

Do not use compat version, we do not have a valid previous value really
to use here.

7 years agoCode cleanup: RAS_ILightObject is class, not a struct.
Thomas Dinges [Sat, 12 Apr 2014 18:12:07 +0000 (20:12 +0200)]
Code cleanup: RAS_ILightObject is class, not a struct.

Patch by John Pavel.
Differential Revision: https://developer.blender.org/D459

7 years agoFix for sculpt mode last-stroke applying obmat twice
Campbell Barton [Sat, 12 Apr 2014 06:35:11 +0000 (16:35 +1000)]
Fix for sculpt mode last-stroke applying obmat twice

7 years agoView3D: refactor ED_view3d_draw_offscreen and view3d_main_area_draw_objects
Campbell Barton [Sat, 12 Apr 2014 05:34:59 +0000 (15:34 +1000)]
View3D: refactor ED_view3d_draw_offscreen and view3d_main_area_draw_objects

de-duplicate object drawing code between offscreen buffer and regular view3d.

Also skip drawing grease pencil and setting pixelspace when drawing from lamps.

7 years agoBMesh: minor change to looping
Campbell Barton [Fri, 11 Apr 2014 10:28:31 +0000 (20:28 +1000)]
BMesh: minor change to looping

7 years agoWalk Navigation: no one should fall through the floor ever again (fix #T39561)
Dalai Felinto [Fri, 11 Apr 2014 21:55:08 +0000 (18:55 -0300)]
Walk Navigation: no one should fall through the floor ever again (fix #T39561)

This could go in 2.70a

7 years agoFix for color pickers:
Antony Riakiotakis [Fri, 11 Apr 2014 20:45:59 +0000 (23:45 +0300)]
Fix for color pickers:

HSL/HSV value would still get converted from linear values.

7 years agoFix part T39643: Compositor renders blank Render Layer from other Scenes
Sergey Sharybin [Fri, 11 Apr 2014 13:15:39 +0000 (19:15 +0600)]
Fix part T39643: Compositor renders blank Render Layer from other Scenes

Fixed the part with missing tiles highlight and render info when rendering
different scene via the render layers node.

Displaying of the rendered result for a different scene after the render
is finished is still not "fixed". That's an intended behavior actually
to display render result for an active scene.

7 years agoFix T39627
Antony Riakiotakis [Mon, 7 Apr 2014 17:43:47 +0000 (20:43 +0300)]
Fix T39627

HSL sliders jumping. The issue here is that we store HSV in display
space.
To correctly account for that, made sure HSV/HSL is now using the
displayed
color to compute the values in the sliders. RGB values still show
the property values (linear for linear, gamma corrected for gamma
corrected)

We could change the way we store HSV uniformly (ie in all the code), but
we would need to add many more conversions in the picker code to account
for storing it that way. Also it doesn't make sense: Color pickers
should help with -visible- color selection. It may
be worth changing the RGB sliders as well.
My fix takes into account the way HSV is stored in HSVCube as well in
the code.

7 years agoFix redraw and undo issues with hidden parts in dyntopo after recent
Antony Riakiotakis [Fri, 11 Apr 2014 12:02:02 +0000 (15:02 +0300)]
Fix redraw and undo issues with hidden parts in dyntopo after recent
changes.

7 years agoFix T39266: Weird Skin modifier shutdown
Sergey Sharybin [Fri, 11 Apr 2014 11:40:07 +0000 (17:40 +0600)]
Fix T39266: Weird Skin modifier shutdown

Fix wrong quat being calculated for curve's path.
Also avoid some divisions by zero.

Happened in cases when all the curve points have the same coord.

7 years agoBlender Internal: remove BLI BVH for raytracing.
Brecht Van Lommel [Fri, 11 Apr 2014 11:08:57 +0000 (13:08 +0200)]
Blender Internal: remove BLI BVH for raytracing.

It has no benefits over other BVH types, as far as I know it was only added
because it was possible. This also fixes T39344.

7 years agoFix T39584: Effects strips render black
Sergey Sharybin [Fri, 11 Apr 2014 10:26:57 +0000 (16:26 +0600)]
Fix T39584: Effects strips render black

It's possible that effetc strip would be placed to the same
'machine' as it's inputs. We don't want to clear such strips
from the stack.

7 years agoFix T39640: Crash on maximizing/minimizing UV/Image Editor
Sergey Sharybin [Fri, 11 Apr 2014 10:17:59 +0000 (16:17 +0600)]
Fix T39640: Crash on maximizing/minimizing UV/Image Editor

Added a NULL-pointer check for now, actual issue might be
burried somewhere else (aka maybe traversal of the WM is
not actually correct here?)

7 years agoFix T39206: Plane deform works incredibly slow
Sergey Sharybin [Fri, 11 Apr 2014 08:48:54 +0000 (14:48 +0600)]
Fix T39206: Plane deform works incredibly slow

The issue was caused by the readEWA spending loads of time trying
to sample regions outside of the buffer.Solved by adding an early
exit check.

We could also clamp the sampling region to the rect, but it's
not so much clear whether weight will be correct in such case
so left it for the future.

7 years agoMath Lib: use less strict epsilon with BLI_ASSERT_UNIT_QUAT
Campbell Barton [Fri, 11 Apr 2014 08:17:59 +0000 (18:17 +1000)]
Math Lib: use less strict epsilon with BLI_ASSERT_UNIT_QUAT

was causing issues with pointcache

7 years agoFix for rigidbody treating the quat as a v3 with pointcache
Campbell Barton [Fri, 11 Apr 2014 08:16:48 +0000 (18:16 +1000)]
Fix for rigidbody treating the quat as a v3 with pointcache

7 years agoFix compilation error after recent BLF change
Sergey Sharybin [Fri, 11 Apr 2014 07:56:26 +0000 (13:56 +0600)]
Fix compilation error after recent BLF change

FT headers seems to be inconsistent here, FT_KERNING_UNFITTED
is defined as an enum element, but FT_Get_Kerning expects UInt.

Just case for now.

7 years agoFix for Freestyle Python API modules not found in the Python Console.
Tamito Kajiyama [Fri, 11 Apr 2014 07:35:46 +0000 (16:35 +0900)]
Fix for Freestyle Python API modules not found in the Python Console.

Addition of the path to the Freestyle Python API modules to 'sys.path' was delayed until
the first Freestyle rendering, so that any import attempt of the modules in the Python
Console always failed.  Now the update of 'sys.path' is done at Blender start-up.
This allows the Freestyle-specific modules to be imported without running Freestyle,
facilitating quick interactive testing in the Console.

7 years agoUI: split area_copy_data into ED_area_data_copy, ED_area_data_swap
Campbell Barton [Fri, 11 Apr 2014 07:16:51 +0000 (17:16 +1000)]
UI: split area_copy_data into ED_area_data_copy, ED_area_data_swap

Was confusing to have swap/copy in the one function.

7 years agoFix for Sinus Displacement and 2D Offset stroke geometry modifiers.
Tamito Kajiyama [Fri, 11 Apr 2014 06:16:03 +0000 (15:16 +0900)]
Fix for Sinus Displacement and 2D Offset stroke geometry modifiers.

These modifiers were not working properly when they were applied to strokes
whose backbone was already modified by other geometry shaders.  This problem
was due to the use of Normal2DF0D that compute 2D vertex normals based on
the underlying FEdges up on which initial stroke geometry is defined.  Now vertex
normals are computed on the basis of modified stroke vertices.

A helper function 'stroke_normal' for computing normals of stroke vertices was
added to the 'freestyle.utils' API module.

7 years agoDrawing: use const for wire color
Campbell Barton [Fri, 11 Apr 2014 05:41:20 +0000 (15:41 +1000)]
Drawing: use const for wire color

7 years agoAPI Cleanup: Use BKE_constraint prefix for constraint api
Campbell Barton [Fri, 11 Apr 2014 01:47:07 +0000 (11:47 +1000)]
API Cleanup: Use BKE_constraint prefix for constraint api

7 years agoCode cleanup: use bool
Campbell Barton [Fri, 11 Apr 2014 01:25:41 +0000 (11:25 +1000)]
Code cleanup: use bool

7 years agoChange GPU deletion at GPU buffer update time. This should be detected
Antony Riakiotakis [Fri, 11 Apr 2014 00:16:16 +0000 (03:16 +0300)]
Change GPU deletion at GPU buffer update time. This should be detected
and done at PBVH update time, since it is possible to have no triangles
to display in a buffer if node is hidden.

7 years agoSupport logging of modified faces in dyntopo.
Antony Riakiotakis [Thu, 10 Apr 2014 23:29:37 +0000 (02:29 +0300)]
Support logging of modified faces in dyntopo.

This is meant to support undo when hiding parts of the mesh.
Also avoid rebuilding the PBVH in that case as well (no nodes split)

7 years agoUI: correct own bad use of bool and document area_copy_data args
Campbell Barton [Thu, 10 Apr 2014 23:17:43 +0000 (09:17 +1000)]
UI: correct own bad use of bool and document area_copy_data args

7 years agoUI: de-duplicate UI_OT_copy_to_selected_button poll/exec
Campbell Barton [Thu, 10 Apr 2014 22:33:54 +0000 (08:33 +1000)]
UI: de-duplicate UI_OT_copy_to_selected_button poll/exec

7 years agoDyntopo: use hidden face flags in more places
Campbell Barton [Thu, 10 Apr 2014 21:51:14 +0000 (07:51 +1000)]
Dyntopo: use hidden face flags in more places

7 years agoDyntopo: Minor display optimization.
Antony Riakiotakis [Thu, 10 Apr 2014 19:31:39 +0000 (22:31 +0300)]
Dyntopo: Minor display optimization.

While hiding, flush the hidden flags to the faces. This avoids iterating
through all the loops while updating the GPU buffers.

7 years ago...and linking, sorry for that!
Antony Riakiotakis [Thu, 10 Apr 2014 19:00:54 +0000 (22:00 +0300)]
...and linking, sorry for that!

7 years agoFix compilation
Antony Riakiotakis [Thu, 10 Apr 2014 18:59:03 +0000 (21:59 +0300)]
Fix compilation

7 years agoSpeedup track preview widget for byte images
Sergey Sharybin [Thu, 10 Apr 2014 15:14:36 +0000 (21:14 +0600)]
Speedup track preview widget for byte images

This gives a huge speedup gain for cases when you've got
rather huge markers on a byte images.

Done by skipping IMB_float_from_rect()/IMB_rect_from_float()
for such cases. We can sample the buffers without color space
conversion.

7 years agoFix numpad emulation in non-US keyboards
Campbell Barton [Thu, 10 Apr 2014 10:31:00 +0000 (20:31 +1000)]
Fix numpad emulation in non-US keyboards

Patch D455 from Benoît Legat with own minor edits.

7 years agoBMesh: DM_to_bmesh_ex, no need to calloc
Campbell Barton [Thu, 10 Apr 2014 01:03:57 +0000 (11:03 +1000)]
BMesh: DM_to_bmesh_ex, no need to calloc

7 years agoRevert "Mempool: simplify memory chunk list building"
Campbell Barton [Thu, 10 Apr 2014 00:39:40 +0000 (10:39 +1000)]
Revert "Mempool: simplify memory chunk list building"

This reverts commit c82371fc06ffb8d2970c985b44167e9a5e0222f1.

Caused regression in iterator

7 years agoRemove extra glEnd() call.
Antony Riakiotakis [Wed, 9 Apr 2014 22:25:12 +0000 (01:25 +0300)]
Remove extra glEnd() call.

7 years agoBGE: Allow skinned meshes with modifiers to do skinning updates in parallel.
Mitchell Stokes [Thu, 10 Apr 2014 00:04:17 +0000 (17:04 -0700)]
BGE: Allow skinned meshes with modifiers to do skinning updates in parallel.