Commit Graph

49420 Commits

Author SHA1 Message Date
Campbell Barton
8305fd8841 Code Cleanup: style edits to bevel and remove unneeded boundvert_rep_face call 2014-01-09 00:50:32 +11:00
Howard Trickey
49aa701645 Add profile control parameter to Bevel.
Parameter controls concavity / convexity.
    <.25 means: concave inward
    .25 means: straight slanted
    >.25 means: concave outward
    .5 means: circular (the default)
    1 means: straight along original sides
For now, there is a hard lower limit of .15
because more work is needed to get decent
results in the range below that.

The profile is actually a superellipse, and the
parameter is 1/4 of the exponent in the implicit equation
for a superellipse, except at the extreme values of 0 and 1.
2014-01-08 07:40:01 -05:00
Campbell Barton
2dba2e72b7 Code Cleanup: de-duplicate text pasting which only used the first line 2014-01-08 17:39:12 +11:00
Campbell Barton
3fbd63c52e Text3d: improve error checking when pasting from files 2014-01-08 16:14:19 +11:00
Campbell Barton
4529fe9010 Fix for RE_engine_begin_result using a NULL pointer 2014-01-08 15:43:49 +11:00
Campbell Barton
8aaf4aaae8 Sequencer: prevent unknown scopes from crashing 2014-01-08 15:40:55 +11:00
Campbell Barton
b243b4fe40 Fix for inorrect use of BLI_utf8_invalid_strip, add assert to prevent it happening again. 2014-01-08 14:46:06 +11:00
Sergej Reich
3739f53a6e Fix T38112: Rigid Body can't be created for objects with linked mesh
Make poll function for rigid body add operators less strict.
2014-01-08 03:29:12 +01:00
Bastien Montagne
7647a2b751 Much better solution for negate/inverse in numinput.
Previous one was way over complicated, and did not worked with units!
2014-01-07 22:23:03 +01:00
Bastien Montagne
ab2bb94f6b Fix a small glitch with string generated by numinput, they could cut multi-bytes utf8 chars (like the '°' of angle values), now call BLI_utf8_invalid_strip() to prevent this. 2014-01-07 20:56:45 +01:00
Campbell Barton
d490e686f0 Fix T38100: laplacian smooth crash 2014-01-08 03:56:43 +11:00
Thomas Dinges
d2fd8c75b0 UI / Nodes: Revert Slider for "Value" node, this is no percentage nor a 0-1 range. 2014-01-07 16:35:52 +01:00
Lukas Tönne
e23bcbbb6d Fix for crash in anim render: The callbacks in bMovieHandle are expected
to exist and accessed without prior NULL checks (with exception of
get_next_frame and get_movie_path). The callbacks are not reliably
initialized however if none of the video formats is enabled (AVI being
the default). Added stub functions now that ensure access to
bMovieHandle callbacks is safe and doesn't crash.
2014-01-07 15:18:37 +01:00
Brecht Van Lommel
01df756bd1 Cycles Volume Render: scattering support.
This is done by adding a Volume Scatter node. In many cases you will want to
add together a Volume Absorption and Volume Scatter node with the same color
and density to get the expected results.

This should work with branched path tracing, mixing closures, overlapping
volumes, etc. However there's still various optimizations needed for sampling.
The main missing thing from the volume branch is the equiangular sampling for
homogeneous volumes.

The heterogeneous scattering code was arranged such that we can use a single
stratified random number for distance sampling, which gives less noise than
pseudo random numbers for each step. For volumes where the color is textured
there still seems to be something off, needs to be investigated.
2014-01-07 15:03:41 +01:00
Campbell Barton
b174e7b0b8 Fix for error in own recent commit 2014-01-08 00:57:58 +11:00
Bastien Montagne
e87095fa5d Cleanup: silence warnings. 2014-01-07 14:53:32 +01:00
Bastien Montagne
256a069987 Middle-clip tweaks:
* Now only middle-clip when both left and right parts of remaining strings are at least two times icon-width (thus most short labels will never be middle-clipped).
* Add a trailing ellipsis to right-clipped strings (unless it would take more than 20% of whole available width, in this case just clip chars, to keep as much data visible as possible!).
2014-01-07 14:53:32 +01:00
Campbell Barton
0213a43562 Armatures Editmode: option to recalculate roll from the angle to the parent 2014-01-08 00:35:11 +11:00
Campbell Barton
2328f94e1d Text3d: underline offset on curved path wasnt working right 2014-01-07 23:04:47 +11:00
Lukas Tönne
ebf23b5144 Fix T38075, crash from shader node add/replace tree view template.
The sanity check for copying socket default value was using the socket
idname for type compatibility checks, which is too strict. Subtypes
would not be recognized as copyable, but since only the plain data type
is needed below this is all that needs to be checked.

That alone would not cause crash (just missing default value copy),
but the tree view template was messing with the default_value DNA
directly by freeing it in advance, which is not necessary and should
be left to blenkernel when freeing the node. Otherwise this would
leave the node invalid without a default_value if the copy function
bails out.
2014-01-07 10:54:31 +01:00
Campbell Barton
54ebaad377 Text3d: Add support for underline characters with text-on-path 2014-01-07 20:19:20 +11:00
Campbell Barton
4a372102c7 Text3d: move text selection boxes from Curve to EditFont struct
resolves T38079
2014-01-07 17:12:24 +11:00
Campbell Barton
fee66f7bc8 Code cleanup: defines for statfs were getting out of hand for BSD's.
add __DragonFly__ and internal defines to avoid copy-pasting checks.

also remove __CYGWIN32__ check, since cygwin is no longer supported.
2014-01-07 13:39:00 +11:00
Howard Trickey
e164a500c8 Fix to own previous commit for bevel vertex only case.
In separating out the adj mesh change from a profile change,
I'd forgotten that some profiles need to be flat (in particular,
for vertex-only bevels). This fixes that.
2014-01-06 15:53:22 -05:00
Campbell Barton
bdd20e18ef Bevel: use stack memory for interp_vmesh()
Rather then using the memarena and never freeing.
2014-01-07 03:17:32 +11:00
Howard Trickey
e0a4a4afc3 Bevel: change 'adj' pattern to use subdivision.
This gets rid of a hacky way of setting the mesh
coordinates at corners, which created overlaps
in some cases.
Also, special case a cube-like corner with all
edges beveled, to snap to a sphere, giving more
expected curvature in that case.
2014-01-06 10:52:31 -05:00
Campbell Barton
4b30b22ecf Fix for recent kdtree py module with MSVC
also remove submodule includes from mathutils.h
2014-01-07 00:53:52 +11:00
Campbell Barton
4848f9029a Patch D133: Python wrapper for BLI_kdtree (adds mathutils.kdtree)
Originally by Dan Eicher, with my own fixes and adjustments (see patch page for details).

For details there are unit tests and api example usage.

	doc/python_api/sphinx-in-tmp/menu_id.png
2014-01-06 20:32:34 +11:00
Campbell Barton
90efa345c2 Python API: utility function for filling a tuple with a single value. 2014-01-06 16:46:00 +11:00
Campbell Barton
7b8e07b7d0 Fix for own error in recent text3d changes
Called important function from within an assert.
2014-01-06 14:41:33 +11:00
Campbell Barton
9686554633 Text3d: avoid assert, clamp position before getting the selection 2014-01-06 03:27:34 +11:00
Campbell Barton
ede891808c UI: pin icon was ignoring DPI 2014-01-06 03:10:15 +11:00
Campbell Barton
ca78e402eb UI: Use shift+lmb for toggling panel pinning (not to conflict with MMB emulation) 2014-01-06 03:00:54 +11:00
Campbell Barton
3027cdd0ba Fix own error in recent changes curve text storage,
Setting via rna crashed.
2014-01-06 02:40:17 +11:00
Campbell Barton
7f0239033b Text3d: font family dupli-objects now follow rotation of the curve path 2014-01-06 02:05:14 +11:00
Campbell Barton
5ff0d465ee Text3d: minor edits to the API, remove BKE_vfont_to_curve_nubase_ex 2014-01-06 01:49:21 +11:00
Campbell Barton
3b024d63fe Text3d: fix font family feature for unicode and correct tooltip 2014-01-06 01:37:19 +11:00
Campbell Barton
38bbd9c778 Text3d: paste additions
- Add paste from system clipboard which behaves like paste from file.
- Paste from file now replaces the selection rather then just adding to the end.
- Move paste operations into the 'Edit' menu.
- Added generic paste functions: font_paste_wchar, font_paste_utf8.
- Fix paste max length check not taking the selection length into account.
2014-01-06 00:39:13 +11:00
Sergey Sharybin
b0ab91c0a4 Code cleanup: fix type in malloc id string 2014-01-05 17:26:32 +06:00
Sergey Sharybin
039652a3e8 Fix memory leak caused by main library split
Evaluation Context wasn't freed for temporary mains.
2014-01-05 17:26:28 +06:00
Sergey Sharybin
a2bf25e8ff Fix crash when having multiple text objects sharing the same curve datablock
Issue was caused by BKE_vfont_to_curve() modifying curve->nurbs list which
gave threading issues.

Now added BKE_vfont_to_curve_nubase() which operates on a given nurbs list
base which is local in do_makeDispListCurveTypes().

By the looks of it it wouldn't give speed regression because previously it
also was creating nurbs for every font object sharing the same curve data.
2014-01-05 17:26:13 +06:00
Sergey Sharybin
ac3d33af73 Code cleanup: preprocessor indentation inside #ifdef block 2014-01-05 17:23:29 +06:00
Campbell Barton
99d050f88b Text3d: selection in editmode now follows rotated text along path 2014-01-05 22:20:33 +11:00
Campbell Barton
42bd5d7c80 Text3d: fix for smallcaps modifying the original text input in editmode.
Oversight in own recent commit to avoid allocating a new wchar_t array.
2014-01-05 21:15:25 +11:00
Campbell Barton
3eb818e53a Text3d: smallcaps wasnt working properly for text-on-path 2014-01-05 21:15:25 +11:00
Campbell Barton
4eed4b3bcd Text3d: remove sepchar, old feature which no longer has any UI access. 2014-01-05 21:15:24 +11:00
Campbell Barton
e20f357cc2 Text3d: error in own recent fix for thread safety 2014-01-05 21:15:24 +11:00
Antony Riakiotakis
d9697bc145 Fix T38024 crash when rebuilding sculpt mode buffers.
Main issue here is that glBuf* calls were invoked from threads different than
main thread. This caused a crash (since those do not have a GL context active).

Fix here is twofold:
* add an ID buffer in buffer pool that handles pbvh buffers and is freed
from main thread when gpu_buffer_pool_free_unused is called.

* do not create glbuffers in derivedmesh creation routine, rather tag nodes
for update and create those in the draw function
(guaranteed to be called from main thread)

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D169
2014-01-05 04:58:27 +02:00
Bastien Montagne
0074eac1ed More tweaks to clip middle:
* Do not apply margins with MENU (i.e. dropdowns) either.
* When middle clipping would remove only a few chars, rather clip right part!
2014-01-04 16:50:42 +01:00
Bastien Montagne
76d9244843 Fix core issue with clipping labels (labels have no margins, so border should be 0 in this case!). 2014-01-04 16:18:08 +01:00