Commit Graph

53479 Commits

Author SHA1 Message Date
Sergey Sharybin
e6ff0ec73d 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.
2014-04-14 14:10:00 +06:00
Sergey Sharybin
0d38f21cbc 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.
2014-04-14 13:48:20 +06:00
Thomas Dinges
f24bfcffef Cycles: Show Auto Smooth and Angle in the UI, after Split Normals are in. 2014-04-14 09:05:19 +02:00
Campbell Barton
7c78bcef6c Fix for crash un-indenting in the text editor 2014-04-14 13:28:09 +10:00
Jens Verwiebe
6e9c2d0c55 OSX/cmake: fix a recently reported dependency issue 2014-04-13 18:04:56 +02:00
Antony Riakiotakis
6f153046e0 Reduce overhead when sampling texture images for brushes. The tests can
be cached and reused.
2014-04-13 19:03:14 +03:00
Antony Riakiotakis
5d79c2662e 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.
2014-04-13 18:14:45 +03:00
Antony Riakiotakis
301d7d2f63 Fix T39430, incorrect color management in paint cursor when using
texture nodes.

Adopt a similar system to texture sampling for painting.
2014-04-13 17:20:23 +03:00
Thomas Dinges
06cd550528 Compile fix for Windows. 2014-04-13 16:09:02 +02:00
Bastien Montagne
e29698d3cd 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
2014-04-13 12:51:13 +02:00
Bastien Montagne
776f8d5a6f 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
2014-04-13 12:37:47 +02:00
Bastien Montagne
41b8f88732 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
2014-04-13 12:34:45 +02:00
Bastien Montagne
0b7f581397 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
2014-04-13 12:25:54 +02:00
Bastien Montagne
18e4224142 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
2014-04-13 12:19:00 +02:00
Bastien Montagne
a872d0b414 Revert "Fix T39484: Time line: highlighted area for frame range one frame too short."
This reverts own commit e9d733a8bd.

Turns out there is no consensus here, better to open a design task. :/
2014-04-13 12:15:20 +02:00
Campbell Barton
ad9af56a6e LinkList stack macros to swap and pop into a separate stack. 2014-04-13 20:12:07 +10:00
Campbell Barton
2025e4cbb9 Code cleanup: quiet warnings & style 2014-04-13 11:26:31 +10:00
Antony Riakiotakis
a2b3c93852 Slight modification to previous color wheel tweak.
Do not use compat version, we do not have a valid previous value really
to use here.
2014-04-12 19:33:28 +03:00
Thomas Dinges
f7d06cdb6b Code cleanup: RAS_ILightObject is class, not a struct.
Patch by John Pavel.
Differential Revision: https://developer.blender.org/D459
2014-04-12 20:12:07 +02:00
Campbell Barton
3cbd9ebcf2 Fix for sculpt mode last-stroke applying obmat twice 2014-04-12 16:35:11 +10:00
Campbell Barton
fb095afe4d 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.
2014-04-12 15:38:25 +10:00
Campbell Barton
668250deb8 BMesh: minor change to looping 2014-04-12 13:06:08 +10:00
Dalai Felinto
e2cbfb7ad7 Walk Navigation: no one should fall through the floor ever again (fix #T39561)
This could go in 2.70a
2014-04-11 18:55:08 -03:00
Antony Riakiotakis
fb7df275b8 Fix for color pickers:
HSL/HSV value would still get converted from linear values.
2014-04-11 23:45:59 +03:00
Sergey Sharybin
64e7065c93 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.
2014-04-11 19:17:22 +06:00
Antony Riakiotakis
2d655d370d 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.
2014-04-11 15:13:11 +03:00
Antony Riakiotakis
0b50ea5a88 Fix redraw and undo issues with hidden parts in dyntopo after recent
changes.
2014-04-11 15:02:31 +03:00
Sergey Sharybin
a3f5e6c76f 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.
2014-04-11 17:56:08 +06:00
Brecht Van Lommel
15169c71a6 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.
2014-04-11 13:20:41 +02:00
Sergey Sharybin
4f6c218f19 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.
2014-04-11 16:26:57 +06:00
Sergey Sharybin
6300d22dab 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?)
2014-04-11 16:17:59 +06:00
Sergey Sharybin
5a29b55c07 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.
2014-04-11 14:51:21 +06:00
Campbell Barton
c04e73f386 Math Lib: use less strict epsilon with BLI_ASSERT_UNIT_QUAT
was causing issues with pointcache
2014-04-11 18:20:30 +10:00
Campbell Barton
93ea10d8fb Fix for rigidbody treating the quat as a v3 with pointcache 2014-04-11 18:20:30 +10:00
Sergey Sharybin
8f2a7cde6d 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.
2014-04-11 13:56:26 +06:00
Tamito Kajiyama
b7b4f94e78 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.
2014-04-11 16:36:49 +09:00
Campbell Barton
52a5d58045 UI: split area_copy_data into ED_area_data_copy, ED_area_data_swap
Was confusing to have swap/copy in the one function.
2014-04-11 17:18:19 +10:00
Tamito Kajiyama
716803c0a0 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.
2014-04-11 15:16:46 +09:00
Campbell Barton
88298f1c40 Drawing: use const for wire color 2014-04-11 15:41:20 +10:00
Campbell Barton
3216e4b202 API Cleanup: Use BKE_constraint prefix for constraint api 2014-04-11 11:47:07 +10:00
Campbell Barton
a15b3c4d11 Code cleanup: use bool 2014-04-11 11:33:29 +10:00
Antony Riakiotakis
52af5fa31f 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.
2014-04-11 03:16:16 +03:00
Antony Riakiotakis
69d2af7643 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)
2014-04-11 02:29:59 +03:00
Campbell Barton
45f336c3a1 UI: correct own bad use of bool and document area_copy_data args 2014-04-11 09:17:43 +10:00
Campbell Barton
6238fb4c43 UI: de-duplicate UI_OT_copy_to_selected_button poll/exec 2014-04-11 08:33:54 +10:00
Campbell Barton
7cdaf56b30 Dyntopo: use hidden face flags in more places 2014-04-11 07:51:14 +10:00
Antony Riakiotakis
6292b60a3f 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.
2014-04-10 22:31:39 +03:00
Antony Riakiotakis
7bf62f0c60 ...and linking, sorry for that! 2014-04-10 22:00:54 +03:00
Antony Riakiotakis
c0a9397a06 Fix compilation 2014-04-10 21:59:03 +03:00
Sergey Sharybin
df63e8fd93 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.
2014-04-10 21:14:36 +06:00