Commit Graph

53000 Commits

Author SHA1 Message Date
Antony Riakiotakis
47ec0394ca Fix T40679.
Cleanest way here is not do bounding box collision for editmeshes at
all. Decision is taken because:

* Usually we want to do the snapping to the edited mesh anyway (when we
don't the mesh is skipped completely, so we don't need to worry for
extra checks)

* Bounding box is calculated from derived mesh. This means that for
subsurfed meshes for instance, the bounding box may be significantly
smaller than the size of the edit mesh.
2014-06-18 18:40:11 +03:00
Antony Riakiotakis
d9de1b367e Revert "Fix flickering when transform snapping in edit mode and cursor is"
Looks like the cleanest way to handle this is to no do bounding box collision
for edit mode at all. But this is easy to enforce

This reverts commit 7b5fe4f316.

Conflicts:
	source/blender/editors/transform/transform_snap.c
2014-06-18 18:20:55 +03:00
Campbell Barton
0eb060c7b4 Move tests into tests/ top-level dir 2014-06-18 22:03:46 +10:00
Sergey Sharybin
7259ac821e Code cleanup: use bool instead of int 2014-06-18 16:05:42 +06:00
Bastien Montagne
87930eb7c2 Hopefully fix compilation with old MSVC2008/WIN32... 2014-06-18 10:32:25 +02:00
Campbell Barton
bb9719b7ab Code cleanup: replace direct operator calls with ED_object_toggle_modes 2014-06-18 16:29:03 +10:00
Campbell Barton
24c7adde0f Code cleanup: de-duplicate flag check in ED_object_toggle_modes 2014-06-18 16:23:50 +10:00
Campbell Barton
52a71c9db3 Transform: PET quick checks to speedup wire-only edge case 2014-06-18 16:09:58 +10:00
Campbell Barton
3c63eee7b4 Code cleanup: replace 0 with OB_MODE_OBJECT 2014-06-18 16:01:51 +10:00
Campbell Barton
b16bf6c3d4 Resolve memory leask with reports on initialization 2014-06-18 15:49:40 +10:00
Campbell Barton
24090ead01 Quiet warning 2014-06-18 15:48:22 +10:00
Campbell Barton
2ccbdec6e5 Transform: PET only treat faces as connected diagonally across quads
Was an intentional change, but worse for concave ngons, resolves T40675
2014-06-18 15:20:55 +10:00
Tamito Kajiyama
f0a3ea54f8 Fix for weak floating-point number comparison.
Was causing assertion failures in MinGW-w64.
2014-06-18 14:18:41 +09:00
Campbell Barton
a82d3f85c6 Correct casts for IS_EQ and other macro tweaks
- ensure GET_INT_FROM_POINTER us only used to get values
- rename STACK_POP_ELSE -> STACK_POP_DEFAULT
2014-06-18 14:02:41 +10:00
Campbell Barton
3a101d8c92 Fix memory leaks in subsurf 2014-06-18 12:07:51 +10:00
Dalai Felinto
fd0b74280e Bake-API: allow custom UV to be baked
Note: the custom UV option is only available when calling the operator
via a script. It's currently not exposed in the UI since it's intended
to be used by scripters

To test it:
bpy.ops.object.bake(type='UV', use_clear=True, uv_layer='MyNewUV')

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D546
2014-06-17 12:16:43 -03:00
Bastien Montagne
fa257adf96 Fix some loss of precision in BKE's unit code.
When converting text to value, units' "value" had only 6 digits of precision,
leading to annoying loss of precision esp. when mixing big and small units
(like e.g. miles and inches).
2014-06-17 16:06:12 +02:00
Bastien Montagne
94b574ee02 Add a first basic set of tests for the new bpy.utils.units module/API
Only contains 'LENGTH' type tests currently.
2014-06-17 16:04:48 +02:00
Bastien Montagne
f94b87bbb8 New python API for units handling.
Exposes all supported unit systems & types, and to_value()/to_string() functions.

Reviewed and enhanced by CampbellBarton, many thanks!

Differential Revision: https://developer.blender.org/D416
2014-06-17 16:03:40 +02:00
Bastien Montagne
ab5f4c4dfa BLI: Add two helpers to search a given string in an array of strings. 2014-06-17 15:58:07 +02:00
Campbell Barton
8f30414c29 Fix T40620: BGE Python - Ray sensor has wrong axis constants 2014-06-17 22:13:44 +10:00
Campbell Barton
a21caf32cc Fix for bad NULL check 2014-06-17 22:04:40 +10:00
Campbell Barton
10af70cef8 Support for building without Python 2014-06-17 22:00:13 +10:00
Campbell Barton
c40cc0bf6d Remove redundant check 2014-06-17 22:00:13 +10:00
Sergey Sharybin
10c74ec034 Fix T40638: Crash in Particle System, Connect Hair 2014-06-17 14:58:50 +06:00
Campbell Barton
fdc57e4e29 Correct argument name 2014-06-17 17:33:57 +10:00
Campbell Barton
2886f75f46 Fix T40639: operators ignore win.cursor_warp() 2014-06-17 14:11:15 +10:00
Jorge Bernal
8c16f4c7d0 BGE: New Property sensor evaluation types
This patch adds "Less Than" and "Greater Than" evaluation types to the property sensor.
The Wiki Docs modifications http://wiki.blender.org/index.php/User:Lordloki/Doc:2.6/Manual/Game_Engine/Logic/Sensors/Property
Also, I have attached a screenshot and a blend to check.

Reviewers: dfelinto, moguri

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D476
2014-06-16 14:56:36 -07:00
Campbell Barton
f9b7617104 Fix T40646: Knife project fails with clipping 2014-06-17 04:07:03 +10:00
Campbell Barton
e848cb9e48 Fix for knife when in ortho camera view 2014-06-17 04:07:03 +10:00
Campbell Barton
f2a0062042 Use ARRAY_SIZE to replace (sizeof(a) / sizeof(*a)) 2014-06-17 02:47:57 +10:00
Campbell Barton
a6e290166b Quiet warning 2014-06-17 02:08:10 +10:00
Joshua Leung
37fce22201 Bugfix: Units for time translate transforms (action/nla editors) was messed up
When autosnap mode was nearest frame or nearest marker, this was incorrectly
converting the units to seconds, making this display unusable for anything.
2014-06-16 21:46:03 +12:00
Joshua Leung
8e722b0232 Feature Request T40643: Animation channels can be renamed by double-clicking on them too 2014-06-16 21:46:02 +12:00
Campbell Barton
c95d093e81 Code cleanup: move editfont drawing into its own function. 2014-06-16 17:23:44 +10:00
Campbell Barton
3f444d9984 Object Drawing: minor refactor, don't check glsl in wire-mode
also don't call glBlendFunc for hidden objects.
2014-06-16 17:23:44 +10:00
Bastien Montagne
5ca44ff952 Fix T40648: Bevel Tool - Amount value slider maximum does not adapt to Amount Type settings automaticly. 2014-06-16 09:03:54 +02:00
Campbell Barton
31e15b56a4 Fix T40617: Ortho view selects objects behind camera 2014-06-16 16:55:57 +10:00
Tamito Kajiyama
f325ddb0d7 Fix Python fails to execute text-blocks including non-mbcs chars (T35176, D595) 2014-06-16 15:29:25 +10:00
Tamito Kajiyama
8365cebe32 Freestyle: Python API docstring updates. 2014-06-16 10:12:52 +09:00
Tamito Kajiyama
840891e22a D545: Freestyle Python API: new methods for Stroke and StrokeVertexIterator.
This revision extends the Freestyle Python API to make for style module writing
easier.

- freestyle.types.Stroke: A proper support for reversed() is implemented.  It
works the same with other Python sequence objects (returns an iterator starting
from the end).  This is in effect equivalent to Stroke.stroke_vertices_end().

- freestyle.types.StrokeVertexIterator: An incremented, decremented and reversed
method are added.  The first two methods return a new StrokeVertexIterator
object that has been incremented and decremented, respectively. The reversed
method returns a new StrokeVertexIterator object that will traverse stroke
vertices in the opposite direction.

- freestyle.types.Interface0DIterator: Its constructor now accepts a Stroke
object to create an Interface0DIterator that traverses stroke vertices.  This is
in effect equivalent to Stroke.vertices_begin().  The new API makes stroke
shaders involving function calls much simpler as illustrated below:

  # in the old API
  it = stroke.stroke_vertices_begin()
  for vert in it:
      result = somefunc(Interface0DIterator(it))

  # in the new API
  it = Interface0DIterator(stroke)
  for vert in it:
      result = somefunc(it)


Differential Revision: https://developer.blender.org/D545

Reviewers: kjym3
2014-06-16 10:12:51 +09:00
Campbell Barton
ea3bca75d9 Curve: remove unused displist members 2014-06-15 14:56:59 +10:00
Campbell Barton
4b4bb410e0 Curve: replace calloc with malloc for values immediately written into 2014-06-15 14:36:33 +10:00
Campbell Barton
57372f4ef8 Curve: use zero length array for BevList for less confusing syntax 2014-06-15 14:23:23 +10:00
Campbell Barton
716430ab64 Code cleanup: comments 2014-06-15 12:15:53 +10:00
Campbell Barton
fff18e049a Text Editor: dropping id's now paste in Python data path (like pyconsole) 2014-06-15 12:15:53 +10:00
Howard Trickey
b5213b2dea Fix T40007 Bevel tool resets after getting to 1.
If the side of a beveled edge hit another vertex, the offset
amount reset to zero. This was the result of commit rB1582dd5e4d7c
which clamped the amount to zero to avoid creating spikes with
obtuse angles. Now we clamp the amount to the closest end of
the edge to where the amount wants to be.
Also fixes the first part of T40365.
2014-06-14 17:47:44 -04:00
Campbell Barton
fa17e3b14c UI: refactor text cache to use zero length arrays
also correct some bad casts
2014-06-15 04:32:41 +10:00
Campbell Barton
9c1728457b BLI_gsqueue: refactor to use zero length array 2014-06-15 04:32:37 +10:00
Campbell Barton
d6287b213b BLI_gsqueue: use size_t for elem_size (was casting all over) 2014-06-15 03:49:25 +10:00