Commit Graph

43519 Commits

Author SHA1 Message Date
Campbell Barton
2100fb4094 Code cleanup: avoid setting du/dv twice with ray intersection 2014-03-29 22:38:01 +11:00
Campbell Barton
fb0959f88d Code cleanup: replace dot with len_squared and is_zero checks 2014-03-29 22:24:12 +11:00
Antony Riakiotakis
6bba006bf2 Cleanup: Minor spelling fixes: 2014-03-29 11:56:32 +02:00
Antony Riakiotakis
6a1b7facf9 GPU_pbvh_buffers: Use triangles to render multires.
A question here might be: why?

The answer is that GPUs will convert this to triangles so we are wasting
memory during conversion of the element buffer to a triangle buffer
anyway.

The second reason is that some modern GPUs are slower rendering GL_QUADS

The third reason is that due to element caching, this should not in
theory be slower (cached elements do not get recalculated on the GPU).
2014-03-29 11:40:53 +02:00
Campbell Barton
eaaacfc7b8 UI: Color-Ramp handles
- display handles with solid color.
- active handle is highlighted.
- 1/4 of the colorband draws solid.
- use old-style handles when zoomed out.

D289 by Charlie Jolly with own modifications.
2014-03-29 15:36:50 +11:00
Antony Riakiotakis
aec4367226 Fix building without openmp continued 2014-03-29 00:11:35 +02:00
Campbell Barton
d3309ac5c9 Code cleanup: correct arg size 2014-03-29 08:42:59 +11:00
Jens Verwiebe
025421950b Forgot to clean a line in last commit 2014-03-28 22:42:21 +01:00
Jens Verwiebe
00a9e77259 Fix compiling sculpt without OpenMP available 2014-03-28 22:37:05 +01:00
Antony Riakiotakis
6d973b87a6 Fix T39468
Issue is that sampling functions did not pass a thread index to the
texture sampler so all threads were contesting for the same pool.

Paint cursors and sculpting that used openmp for threading suffered from
this. Now use omp_get_thread_num to pass the thread number.
2014-03-28 22:02:26 +02:00
Campbell Barton
8b43b9f255 Fix for mask vert add-slide dragging flipped direction 2014-03-29 06:44:40 +11:00
Bastien Montagne
e9d733a8bd Fix T39484: Time line: highlighted area for frame range one frame too short.
Just using same principle as the one already used for the 'cache bar': add -0.5/+0.5 offsets to start/end (also edited 'view all' op to match this).
2014-03-28 15:15:30 +01:00
Sergey Sharybin
1af69b6df3 Implement asymmetric and free handles type for masks
Summary:
The title actually says it all, it's just possible to
have independent free handles for mask splines. Also
it's now possible to have aligned handles displayed
as independent handles.

Required changes in quite a few places, but they're
rather straightforward.

From user perspective there's one really visible change
which is removed Handle Type menu from the panel. With
asymmetric handles it's not clear which handle type to
display there. So now the only way to change handle type
is via V-key menu.

Rewrote normal evaluation function to make it deal
with new type of handles we support. Now it works in
the following way:

- Offset the original spline by maximal weight
- Calculate vector between corresponding U positions
  on offset and original spline
- Normalize this vector.

Seems to be giving more adequate results and doesn't
tend to self-intersect as much as old behavior used to,

There're still some changes which needed to be done, but
which are planned for further patch:

- Support colors and handle size via themes.
- Make handles color-coded, just the same as done for
  regular bezier splines in 3D viewport.

Additional changes to make roto workflow even better:
- Use circles to draw handles
- Support AA for handles
- Change click-create-drag to change curvature of the
  spline instead of adjusting point position.

Reviewers: campbellbarton

CC: sebastian_k, hype, cronk

Differential Revision: http://developer.blender.org/D121
2014-03-28 17:54:38 +06:00
Sergey Sharybin
6e5e3b73f3 Fix T37599: Crash making linked objects local and undo
Root of the issues comes to the fact that it's possible to produce
a situation when library object data uses local object. This is
actually forbidden and not supported by .blend IO.

Made it so Make Local wouldn't produce such an unsupported states.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D372
2014-03-28 17:14:11 +06:00
Lukas Treyer
97cb76a45d Bevel Factor Mapping
Bevel Factor Mapping allows to control the relation between bevel factors
(number between 0 and 1) and the rendered start and end point of a beveled
spline.

There are three options: "Resolution", "Segments", "Spline". "Resolution"
option maps bevel factors as it was done < 2.71, "Spline" and "Segments"
are new.

* "Resolution“: Map the bevel factor to the number of subdivisions of a
  spline (U resolution).
* "Segments“: Map the bevel factor to the length of a segment and to the
  number of subdivisions of a segment.
* "Spline": Map the bevel factor to the length of a spline.

Reviewers: yakca, sergey, campbellbarton

CC: sanne

Differential Revision: https://developer.blender.org/D294
2014-03-28 16:44:33 +06:00
Campbell Barton
3977b7612f Fix T39288: Inset regression with extreme offset 2014-03-28 21:38:12 +11:00
Campbell Barton
2a25676168 Fix for inset bug (edge rail had feedback loop with direction)
also disable edge-rail by default.
2014-03-28 21:38:12 +11:00
Sergey Sharybin
f88776bb5c Fix T39410: Crashes when Saving HiRes .tif 2014-03-28 15:22:10 +06:00
Lukas Tönne
29888dcea0 Fix T39455: Nodes scaled wrong when some in a frame, some not.
Transform operators for nodes were not taking parent nodes (frames) into
account. Now use the nodeToView/nodeFromView functions to apply
transforms in local node space.
2014-03-28 10:07:11 +01:00
Sergey Sharybin
6babbf59bc Fix T39472: Changing Sequencer color space repeatedly changes movie strip's display gamma
Issue was caused by the old color space settings being lurking around
seq->anim after the changes in color space settings.
2014-03-28 13:58:39 +06:00
Mitchell Stokes
93c896d53b BGE code cleanup: Removing an unused include in KX_Light.cpp 2014-03-27 22:44:30 -07:00
Mitchell Stokes
df9d6737b9 BGE code cleanup: Removing OpenGL and bf_gpu code from KX_LightObject
The ultimate goal is to only allow the rasterizer to handle OpenGL and bf_gpu
calls. This commit creates a RAS_ILightObject interface and a RAS_OpenGLLight
implementation.
2014-03-27 22:32:06 -07:00
Campbell Barton
3ec0c73211 View3D: replace RV3D_VIEW_PERSPORTHO with RV3D_VIEW_USER
This is hardly used, and may be removed later (looks like quad view used by accident).

It could cause the 2d grid to draw with the view at an angle.
2014-03-28 15:57:33 +11:00
Campbell Barton
ac07046e55 BMesh: optimize quad_coord, avoid duplicate sqrt calls 2014-03-28 15:25:02 +11:00
Campbell Barton
5981567ec6 Code cleanup: use len_v2v2_int for view zoom-scale 2014-03-28 15:02:57 +11:00
Campbell Barton
7199e2288f Code cleanup: use sqrtf when input and output are float 2014-03-28 14:53:37 +11:00
Campbell Barton
e6e7438181 RNA API: rename Sequence.elements.push() -> append()
also for SpaceNodeEditorPath
2014-03-28 12:11:52 +11:00
Walid Shouman
f4a990bfcd Fix for curve smooth ignoring cyclic 2014-03-28 09:26:45 +11:00
Mitchell Stokes
7ff123ce5c Fix T39452: Meshes without materials causes a memory leak in the game engine
These types of meshes do not use material caching, and thus only the first created
material would be saved, but subsequent ones were not. Those subsequent materials
were then not being freed. Now we make sure to track all of the materials.

Note: Meshes that cannot make use of material caching (no materials or using face textures)
can still use up a large amount of RAM since a material is created per face.
2014-03-27 13:51:07 -07:00
Sergey Sharybin
84823220b8 Attempt to fix compilation error on release windows
MSVC was yelling on me because of unused variable.
2014-03-27 19:14:20 +06:00
Sergey Sharybin
d3a73d0845 Windows: Upgrade FFmpeg from 0.10 to 2.1.4
Fixes T39423: Blender crashes on iv41 encoded videos in thumbnail display mode

Libraries are still being committed to the svn, so compilation might be broken
for a while. Sorry for this, but can't really be avoided.

Also, some typos in scons are possible.
2014-03-27 16:52:59 +06:00
Antony Riakiotakis
688257d1a2 Fix T39435 paint overlay not always getting correctly refreshed.
Initialize the nodetree first, like paint stroke does.
2014-03-27 12:09:50 +02:00
Antony Riakiotakis
eca6264ab0 Fix T38928 Particle add brush would generate trash on meshes with use_modifier_stack enabled
Issue here is complex (Of course, this is particles!)

First issue is that use_modifier_stack will use the num parameter of the
particles instead of num_dmcache, something the brush code did not
account for at all. Now correctly set DMCACHE_ISCHILD in that case.

Second issue is that make_derived_deform will return a mesh with less
indices than the particle system derived mesh. This would mean that
subsequent sampling of the particle derived mesh to initialize the
particles woould also produce garbage. This was being done for
optimization but in that case it broke the system.

Reviewers: lukastoenne

Differential Revision: https://developer.blender.org/D429
2014-03-27 11:44:23 +02:00
Campbell Barton
5256a5d66c BMesh: let vert-connect make degenerate faces when only 2 verts selected 2014-03-27 12:52:34 +11:00
Campbell Barton
bec7c8c7aa BMesh: optimize BM_face_legal_splits for concave faces 2014-03-27 11:48:18 +11:00
Antony Riakiotakis
0adc1ba209 Attempt to fix T39412
do not use different stroke property names for different paint systems.
This was done due to different stroke sets being supported for each
system, but this lead to trouble if we changed the names (due to
different stroke sets being supported) and users created custom keymaps
with the old property name saved.

The first part of this fix addresses master. A similar commit will be
done to soc-2013-paint.
2014-03-27 00:04:59 +02:00
Campbell Barton
20a4e33837 Code cleanup: use consistent arg order for math api poly funcs 2014-03-27 08:30:14 +11:00
Campbell Barton
f26492d3e8 CTest: disable bl_run_operators.py, fun for finding crashes, takes a long time 2014-03-27 08:30:14 +11:00
Jeroen Bakker
d9557d01bd T39307: The fast gaussian blur is not an accurate formula. When deciding
which tiles are selected for input there was always a constant for correcting
the accuracy.

It seems that the constant was not enough and has been adjusted. (2 => 3).
2014-03-26 21:11:54 +01:00
Bastien Montagne
fd3de8b042 Fix T39424: VSE: Bake Sound to Curve CRASHES Blender
BKE_sequencer_offset_animdata() was simply assuming bezt member of fcurve was always valid, while it might be NULL (e.g. when fcurve is using FPoints instead, like when generated from sound file).
2014-03-26 20:01:09 +01:00
Lukas Tönne
cc6b106d34 Fix T39432: yet another particle bug caused by inconsistent num_dmcache
mystery.
2014-03-26 18:34:07 +01:00
Campbell Barton
3b0832dd86 Fix T39279: Vertex paint fails with mirror modifier 2014-03-26 13:57:27 +11:00
Dalai Felinto
b4d259f044 New resolve_tri_uv_v3 util function
Compute barycentric coordinates (u, v) for a point with respect to a
triangle.

This is needed for Cycles baking but we decided to push this
independently of the upcoming main baking changes.

Code adapted from Christer Ericson's Real-Time Collision Detection.

Cleanup, refactoring and review from Campbell Barton.
2014-03-25 21:58:52 -03:00
Campbell Barton
a7242c3162 Code cleanup: add _v2 suffix to resolve_tri/quad functions 2014-03-26 11:15:21 +11:00
Campbell Barton
bd65fc176d revert 0da3e97, fix for T39279
Following problems:
- painting onto a cube asserts immediately (vpaint/wpaint)
- crashes with valgrind (bad memory use)
- the original intended behavior of vertex projection paint no longer works as I intended.
  (its constantly refreshing geometry even when no modifiers are applied).

Best get code review for these kinds of changes.
2014-03-26 09:34:01 +11:00
Campbell Barton
8703e2fe7e Code cleanup: remove unused flags 2014-03-26 07:58:14 +11:00
Campbell Barton
a99a8a6070 Code cleanup: style and warnings 2014-03-26 07:53:56 +11:00
Sergey Sharybin
765d077a1a Zoom to mouse position didn't work in MCE when locked to a selection 2014-03-25 21:58:45 +06:00
Lukas Tönne
a7ed1db51f Fix T39319: Particle System Bug on Cycles Render.
Crashes due to bad dm face calculation in particle RNA/cycles hair.
This stuff is a total mess, but this kind of check is used in other
places and prevents crashing at least.
2014-03-25 12:34:30 +01:00
Sergey Sharybin
b7dbb2f48e Correction to the previous commit 2014-03-25 16:22:47 +06:00