Commit Graph

40841 Commits

Author SHA1 Message Date
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
b7dbb2f48e Correction to the previous commit 2014-03-25 16:22:47 +06:00
d4cc81d552 Fix T38870: Freezes when jumping in front of a keyframe.
Issue was caused by inverting a degenerate matrix when
evaluating drivers.

Solved by using tweaked inverse code (same as used in Cycles).

Should have no affect on cases when matrix is not degenerate.
2014-03-25 16:07:13 +06:00
62a0350957 Editmode drawing: avoid glBegin/End for every tri (emDM_drawMappedFacesMat,GLSL) 2014-03-25 20:36:11 +11:00
436d6ec2e9 Code cleanup: editmode opengl drawing 2014-03-25 20:36:11 +11:00
6452d9f02f Fix T39395: Switching to "Textured solid" and "GLSL" view will cause the FPS drop to 0
Issue was caused by the cache limitor which was removing 4k textures from the
memory when accessing other images.

This is pretty much awful situation and solved by making it so only image sequences
and movies ace cache-guarded.

Could be optimized further so images used by viewport are not being freed, but
that's much more tricky to do..

This is a nice candidature for 'a'.
2014-03-25 12:30:41 +06:00
bd57ec686c Fix T39397: Leaving leaving camera from quadview set ortho 2014-03-25 15:14:34 +11:00
a2c002acb9 Add a slight shadow to the radial operator text. It helps when brush
color is close to the cursor color.
2014-03-25 01:25:01 +02:00
f0ca40f9c1 Code cleanup: function calls 2014-03-25 10:10:00 +11:00
05deec3204 Code cleanup: rename easing functions with BLI_easing_ prefix 2014-03-25 09:59:10 +11:00
673b665471 Code cleanup: rename BLI_math_easing to BLI_easing
Many hard coded values and really specific to time & keyframes.
2014-03-25 09:59:10 +11:00
b701c92588 Code cleanup:
* Separate some common code for sculpt raycasting
* Cleanup to radial operator commit
2014-03-24 23:46:30 +02:00
7bb84912ef Code cleanup: ifdef debug only checks and simplify manifold test 2014-03-25 07:54:41 +11:00
b0a8e4ced1 Fix T39262: Regression in 2.70, wire-frame editmode tool replaced all 2014-03-25 07:53:09 +11:00
25835ec977 Fix possible use of invalid face index with wireframe tool 2014-03-25 07:53:09 +11:00
76d32a3f16 Improvements to radial control operator:
* Factor values get a minimum circle too, which denotes the maximum
value. This makes it easy to set the maximum value while previously
maximum was at center, much more difficult to set exactly.

* Added text indication of value at center of the widget.
2014-03-24 22:50:59 +02:00
e9a64e2770 Fix T39392: Python bindings for geometry.box_pack_2d() return invalid total height 2014-03-24 17:39:54 +01:00
3b68c6304d OSX/sculpt/omp: missing initialisation of size_t pcount_len, oddly worked fine without on OSX 10.9, fixes < 10.9 2014-03-24 13:33:26 +01:00
07578bed4d Fix T39383: Blender crash when renaming bone in outliner (weight paint mode).
Outliner rename callback is supposed to activate affected element before actually renaming,
but for bones this was not working because the function used to activate the object explicitely
ignored ID_OB case! Added a bool flag to allow handing this case without (possibly) breaking
the other usecases.
2014-03-24 13:08:29 +01:00
f8c247f21b Remove the code which checked whether early object update skip didn't fail
Was a safety check which never triggered, so likely could be removed now.
2014-03-24 15:15:43 +06:00
f48828b64e Fix T39318: Blender 2.70 crash when I link an asset
Issue is a regression since threaded objetc update and caused
by the fact that some objects might share the same proxy object.

It's all fine but object_handle_update() will call update for
a proxy object which screws up threaded update.

The thing is, proxy object is marked as depending on a scene
object and such a call makes it so the children objetc is
being updated.

This is really bad and depsgraph is to take all responsibility
on updating the proxy objects.

So for now used a simple solution (which is safe to backport
to 'a') which is skipping proxy update if the scene update is
threaded and based on the DAG traversal.

There are some still areas which calls object update directly
and for that cases proxy object is still being updated from
object_handle_update().
2014-03-24 15:10:16 +06:00
b69809c820 Fix T39331: Dissolve vertex crash 2014-03-24 16:37:10 +11:00
32d5d072a0 Code cleanup: float/double promotion 2014-03-24 13:31:14 +11:00
3214d4fd5a Code Cleanup: PBVH, avoid sqrt and use bool for raycast functions 2014-03-24 13:21:58 +11:00
551d1a1ed5 Code cleanup: style 2014-03-24 13:14:19 +11:00
25b4b5fb9f Fix for invalid abs() use (from daccaa7) 2014-03-24 12:57:18 +11:00
7d64054798 Change to sampling: Take biggest triangle side as detail size on
intersection, since detail determines the maximum allowed triangle edge
size
2014-03-23 21:49:01 +02:00
58c22d8fe8 Fix T39351: Blender crashes when enabling Mesh Analysis.
This code was using a //const// char array for fallback colors and then
writing to it (hidden to the compiler by explicit casting). Bad!
2014-03-23 11:37:04 +01:00
fcaa018249 Fix T39347: Pressing backspace during empty number input for translation results in 0.5828 increments
Interesting one, took me hours to understand the issue - a stupid typo checking the wrong value against the wrong flag (present since 2008!).
2014-03-23 10:59:52 +01:00
3bad243cb8 Further tweaking to numinput - enhance 'Reset' behavior.
Ways how it was resetting its values (backspace) was far from satisfaying. Now, e.g. when scaling, it will reset at 1 (or whatever mouse-value it was before entering numinput), instead of some ugly 0.0 value.

Implementation details:
* Values passed to applyNumInput() are stored as default ones (val_org), if it is not EDITED.
* applyNumInput() returns a boolean saying whether it actually set values or not.
* When backspace hits its ultimate step (where it clears all EDITED flags and reset all default values),
  it sets a temp FAKE_EDITED flag that will be used to apply one last time values of numinput
  (so that default values actually get applied!).

There are important things to note here for code using numinput:
* Values passed to applyNumInput() should be valid and are stored as default ones (val_org), if it is not EDITED.
* bool returned by applyNumInput should be used to decide whether to apply numinput-specific post-process to data.
* *Once applyNumInput has been called*, hasNumInput returns a valid value to decide whether to use numinput as drawstr source or not.

Those two steps have to be separated (so do not use a common call to hasNumInput() to do both in the same time!).
2014-03-23 09:29:04 +01:00
c359de2c3a Use eyeliner cursor for sampling. Thanks to Thomas Beck for the
suggestion :)
2014-03-23 00:33:55 +02:00
e732c5809c Detail sampling operator
Located on topology panel.

To use just click on button and click on mesh.
Operator will just use the dimensions of the triangles below to set the
constant detail setting.

Also changed pair of scale/detail size with nice separate float
percentage value.
2014-03-22 23:35:41 +02:00
0ef416722e Flood fill for dyntopo constant detail mode.
Nothing spectacular here, fill tools are easy. Just take the dyntopo
code and repeat until nothing more to do.

The tool can be located in the dyntopo panel when the dyntopo constant
detail is on.

Also added scale factor for constant detail. This may change when detail
sampling gets in, I am not very happy with having two numbers here,
still it will give some more control for now.
2014-03-22 17:47:18 +02:00
1206faeb99 Warning cleanup:
* Comparison in utf detection code always failed
* Cast to integer to silence grumpy 64bit gcc
2014-03-22 14:41:38 +02:00
85e0f69040 A few spelling fixes 2014-03-22 16:57:57 +13:00
f25c7a3f04 More driver linting messages - procedural animation and no-variables for average,etc.
Inspired by T39315, this commit adds a few more driver "linting" messages used for
providing users with tips on how to use drivers better. This time, we specifically
address 2 cases:

1) Drivers being abused for procedural animation, due to the misconception that
   procedurally generating F-Curves using F-Modifiers means that drivers are needed
   to wire such procedural motion-sources to properties.
2) Setting up Average/Sum/Min/Max driver types without any input variables - you can't
   expect anything to happen (unless of course, your intention was to lock the property
   to 0.0)
2014-03-22 16:56:17 +13:00
4acb57a7a7 Possible fix for T39330 period key is ignored in transform operations
Not 100% certain if this fixes, I will ask the user to verify through
buildbot.
2014-03-21 21:06:49 +02:00
0da3e97433 Fix T39279 Vertex paint modes do not work well with mirror modifier
Issue here is that coordinates used for projection would not fit the
closest candidate. So it was possible to paint against the mirrored part
of the mesh, which would get clipped on reprojection.

Fix avoids reprojection by storing squared distance, and screen space
coordinates, which we will need again later anyway. Also we now always
paint against the closest vertex always. This is ensured because squared
distances for uninitialized vertices will be MAXFLOAT, thus failing the
strength test.
2014-03-21 20:37:21 +02:00
44dc72334d Compile fix for Windows, M_PI was undefined. 2014-03-21 17:46:18 +01:00
12ce5ae5be Forgot to remove test printf 2014-03-21 15:32:07 +01:00
081b0b6599 Sculpt: Fix non openMP threads not set correct and use optimal omp threadcount for OSX
- i empirically found that using HT just gives overhead, even possibly slowing things down
- i propose other OS test this too again
- switching threaded on/off did not restored single threaded case ( credits to Sergey )
2014-03-21 15:27:00 +01:00
54a8753df3 Fix T39323: Animation playback is not synchronized when Screen Layout changes.
Own regression in rBd2a5ea04ed84.

This commit should be included if we do a 2.70 'a' release.
2014-03-21 15:17:50 +01:00
daccaa713b Patch T22084: Robert Penner Easing Equations for FCurves
This commit introduces support for a number of new interpolation types
which are useful for motion-graphics work. These define a number of
"easing equations" (basically, equations which define some preset
ways that one keyframe transitions to another) which reduce the amount
of manual work (inserting and tweaking keyframes) to achieve certain
common effects. For example, snappy movements, and fake-physics such
as bouncing/springing effects.

The additional interpolation types introduced in this commit can be found
in many packages and toolkits (notably Qt and all modern web browsers).
For more info and a few live demos, see [1] and [2].


Credits:
* Dan Eicher (dna)              - Original patch
* Thomas Beck (plasmasolutions) - Porting/updating patch to 2.70 codebase
* Joshua Leung (aligorith)      - Code review and a few polishing tweaks

Additional Resources:
[1] http://easings.net
[2] http://www.robertpenner.com/easing/
2014-03-22 03:00:27 +13:00
6e99fb04b6 Use the new BKE_libblock_copy_nolib function for bNodeTree datablocks
as well.

These were already doing the same thing, just not as nice. Only
difference is the do_action argument (false for BKE_libblock_copy_nolib)
but this is of no consequence because the function is only called for
trees nested inside material, scene, etc., which never have own actions.
2014-03-21 14:07:49 +01:00
c626462c0f Fix T39209: Localizing materials could cause heisenbug with concurrent
depsgraph updates.

Material datablocks were localized by first making a regular datablock
copy, which always gets inserted into the bmain list, and then removing
it again from bmain.

Problem is that this localization happens in preview threads, which can
run while the depsgraph is also updating GPU materials. In case the
copying of materials takes any amount of time, this can cause the
depsgraph call to material_changed to use an invalid, localized material
and access invalid GPUMaterial lists which have already been freed for
the actual material.

Solution is to not add localized datablocks to the bmain lists in the
first place. bmain should be totally immutable during preview or render
threads.
2014-03-21 13:50:20 +01:00
7148c97796 Fix T39312 Multipling two values in the Transform Tools Number Input not possible.
There was actually a few bugs in new event handling of numinput :/

In case of 2.70 'a' release, this commit should be considered imho.
2014-03-21 12:30:55 +01:00
1781928f9d Fix T39305: Matcap Crash when using Material Nodes in Blender Internal
This is a regression in d34d745, texture painting didn't set is_paint
if draw type < DT_SOLID which is weird.
2014-03-21 15:17:43 +06:00
0f95149a78 Fix T39306: Backface culling in Multitexture always uses mat game settings
Trying to use mat game settings in 3DView makes sense - but only when we are using "Game Engine" as 'renderer'!

Note GLSL code completely ignores mat game settings currently, could be added too...
2014-03-21 10:11:54 +01:00
77c1d17940 Fix T39186: Matroska audio support (mka, mkv without video stream)
.mka files were considered image files when adding to sequencer
using drag-n-drop.
2014-03-21 13:52:37 +06:00
3406ef8e03 Fix T39207: FCurve evaluation regressions following 2aff243 (again)
Yet another attempt at fixing the problems here. This time, I've added a new
function/version of the binary search utility so that we can pass in custom
thresholds (Note: This ability is only used for evaluation currently, with
everything else using a wrapper which still uses the old default threshold),
making it ok to start trusting the "exact" parameter.
2014-03-21 14:53:17 +13:00