Commit Graph

12883 Commits

Author SHA1 Message Date
Bastien Montagne
8535b9bd15 Fix T38722: Adding units in Imperial setting results in inconsistent values
Now always check for a default unit, and evaluate the whole expression in this "unit space".
Not an ideal solution, but should handle most cases nicely
(we can't address all possible corner cases anyway).

Note default unit is searched in current string first (bigger unit of current system wins),
then in previous string.

Note this also replaces ',' by '+' in default separation between units,
helps solving issues with parenthesis (e.g. (1'1")*2.5 would fail in existing code)!
This would break if someone uses py ops with lower precedence than '+' (like bitwise
operations, and comparison), but these are not expected usecase here anyway.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D340
2014-08-20 12:12:03 +02:00
Campbell Barton
4b4ae8374f Cleanup: style 2014-08-20 08:47:32 +10:00
Campbell Barton
5e6b79c1f5 Fix crash in BKE_mesh_validate_arrays 2014-08-19 21:11:57 +10:00
Campbell Barton
37da1dadb6 Fix mesh validate skipping first vertex 2014-08-19 18:49:54 +10:00
Campbell Barton
95ae98caea Fix T41479: BLI_bvhtree_find_nearest inaccurate
Gives noticeably better results for shrink-wrap (even in simple cases)
2014-08-19 17:58:07 +10:00
Campbell Barton
1dbadf16a8 Fix for BKE_deform_flip_side_name getting fooled by extra separator characters
D740 by ldo with own edits
2014-08-19 16:18:07 +10:00
Sergey Sharybin
e1eb2e99f7 Correction to previous curve bevlist commit 2014-08-18 21:16:21 +06:00
Sergey Sharybin
6c7467e0da Fix T41085: Blender crashes when using "spline" or "segments" for bevel curve factor.
Root of the issue goes to the fact that bevel list calculation might drop some points
if they're at the same position. This made spline length calculation goes wrong.

Now the length of the bevel segments is stored in the bevel list, so values are
always reliable.

Initial patch by Lukas Treyer with some tweaks from me.
2014-08-18 17:38:20 +06:00
Bastien Montagne
e85bcfab04 Fix T41467: Modifier view buttons changing positions.
Commits early in this year (to save some space) broke this. Hopefully this time
it works in all cases - lastCageIndex is no more influenced by realtime/edit active states.
Also, inactivate buttons instead of hiding them, can be useful to set those data
even though it does not have any immediate effect.

Took the opportunity to switch cage buttons to RNA, btw.
2014-08-17 09:50:45 +02:00
Campbell Barton
b6df448176 Cleanup 2014-08-15 19:59:31 +10:00
Antony Riakiotakis
01c5a65f7b Fix uninitialized imagepaint values on new scene, report by kopias on
irc
2014-08-15 11:45:15 +02:00
Bastien Montagne
b22831e5ce Modifiers: consider all constructive modifiers as 'preview' ones as well.
Indeed, constructive modifiers are highly likely to modify CDLayers like vgroups or vcols!

See vertexgroup2.blend file ({F93770}) in T40523, especially obvious with subsurf modifier.
2014-08-15 10:10:57 +02:00
Campbell Barton
2b796ed03d ColorRamp HSV, HSL Blend Modes
D297 by charlie with own edits
2014-08-15 15:31:13 +10:00
Campbell Barton
f2821e392b hint checks to re-alloc as unlikely
also edit comments for knife tool
2014-08-14 11:07:33 +10:00
Campbell Barton
28054d8e38 remove MAXFLOAT define 2014-08-14 10:36:07 +10:00
Antony Riakiotakis
eca7c96a28 Maybe slightly controversial pie commit:
Make pie menu item placement touch the radius from the internal side of
the buttons rather than placing on the center on the cirtcle. This
allows us to get rid of the separate visual angle property, also allows
for tighter placement of pies with a smaller radius without easily
overlapping.

Also pie menu title now always appears above the threshold indicator.
2014-08-13 15:11:19 +02:00
Campbell Barton
ff42afb6c5 Math Lib: rename barycentric_transform -> transform_point_by_tri_v3
also add transform_point_by_seg_v3
2014-08-13 14:55:45 +10:00
Campbell Barton
3529913629 Math Lib: name signed versions of dist_to_plane_v3 explicitly
also add unsigned versions
2014-08-13 14:34:58 +10:00
Campbell Barton
7df4fc5eaf Spelling 2014-08-13 09:34:37 +10:00
Campbell Barton
ab06ec7a24 Rewritten Array Modifier D443
Patch by PatB with own edits

- replace BMesh with CDDM functions.
- faster remove-vertex merging.
- extend CDDM_merge_verts to be more flexible.
2014-08-12 13:52:17 +10:00
Campbell Barton
06020eb02e Cleanup: unused var 2014-08-12 13:33:39 +10:00
Tamito Kajiyama
e457dfec32 Freestyle: Updated BKE_linestyle_default_shader() to include the UV Along Stroke shader node. 2014-08-12 10:10:41 +09:00
Tamito Kajiyama
52d357a0b5 Freestyle: Added new UV Along Stroke shader node. 2014-08-12 10:10:40 +09:00
Tamito Kajiyama
4fc2b8dcc6 Added BKE_linestyle_use_textures() to check if stroke textures are enabled. 2014-08-12 10:10:32 +09:00
Tamito Kajiyama
722951eceb Freestyle: Added "blend_type" and "use_clamp" options to the Output Line Style shader node. 2014-08-12 10:10:27 +09:00
Tamito Kajiyama
833353b25e Freestyle: Fix for a crash in BKE_linestyle_default_shader() due to a typo. 2014-08-12 10:10:26 +09:00
Tamito Kajiyama
cb75f79b8a Freestyle: Add BKE_linestyle_default_shader() for creating the default line style shader node tree.
Changes to ED_node_shader_default() were reverted since the code there was actually
not suitable for setting up the default line style node tree properly.
2014-08-12 10:10:22 +09:00
Tamito Kajiyama
4677684cfd Changed ntreeCopyTree_ex() to accept a pointer to struct Main. 2014-08-12 10:10:19 +09:00
Tamito Kajiyama
d8f60d01e9 Fix for a wrong ID datablock referenced due to a typo in BKE_copy_linestyle(). 2014-08-12 10:10:18 +09:00
Tamito Kajiyama
846ec6e00c Added new Output Line Style shader node for defining a node-based line material. 2014-08-12 10:10:17 +09:00
Campbell Barton
d124bd1cd4 Spelling 2014-08-12 10:31:07 +10:00
Bastien Montagne
bd623d9da3 Fix T41403: Grid Particles only partially generated.
Getting dominant axis (biggest dimension of bbox) was wrong, now using BLI code for that.
2014-08-11 20:23:39 +02:00
Sergey Sharybin
3e41c8ad6f Fix compilation error with debug scons
The issue is that we've got hell with DEBUG and _DEBUG,
theu're defined really inconsistent acros CMake and SCons.

Used more reliable NDEBUG definition for IDP_spit.
2014-08-11 20:58:42 +06:00
Antony Riakiotakis
028fd29eeb Pie Menus C code backend.
This commit merges the code in the pie-menu branch.

As per decisions taken the last few days, there are no pie menus
included and there will be an official add-on including overrides of
some keys with pie menus. However, people will now be able to use the
new code in python.

Full Documentation is in http://wiki.blender.org/index.php/Dev:Ref/

Thanks:
Campbell Barton, Dalai Felinto and Ton Roosendaal for the code review
and design comments

Jonathan Williamson, Pawel Lyczkowski, Pablo Vazquez among others for
suggestions during the development.

Special Thanks to Sean Olson, for his support, suggestions, testing and
merciless bugging so that I would finish the pie menu code. Without him
we wouldn't be here. Also to the rest of the developers of the original
python add-on, Patrick Moore and Dan Eicher and finally to Matt Ebb, who
did the research and first implementation and whose code I used to get
started.
2014-08-11 11:02:26 +02:00
Sergey Sharybin
5d1d23d5bd Fix T41395: Set Object As Camera - Monkey Render bug? 2014-08-11 14:12:09 +06:00
Campbell Barton
44aa221600 Utility functions for getting boundbox size/scale 2014-08-11 13:25:25 +10:00
Thomas Dinges
e3ed13cbd4 Cleanup: Remove special code for Visual Studio 2008.
Goodbye VC2008, it has been a pleasure (more or less) :D SCons / CMake cleaenup will follow.
Differential Revision: https://developer.blender.org/D715
2014-08-07 13:52:15 +02:00
Campbell Barton
ea30641d90 Fix T41047: Text objects flipping 2014-08-07 09:14:54 +10:00
Campbell Barton
ea9d94cf28 Spelling 2014-08-06 05:41:14 +10:00
Campbell Barton
9855edcacf Fix T41328: Saving a copy changes lib paths 2014-08-06 02:48:37 +10:00
Campbell Barton
a3fac84c73 Cleanup: indentation 2014-08-05 13:36:35 +10:00
Campbell Barton
a90e49e40a Tweaks to macros 2014-08-04 11:43:10 +10:00
Campbell Barton
cc28e02a85 Cleanup: replace int cast with floorf when comparing time 2014-08-04 10:22:45 +10:00
Campbell Barton
7848bf00b8 Correct cu->pathlen treated as a float 2014-08-04 10:15:25 +10:00
Campbell Barton
9c3025cd26 Spelling 2014-08-02 16:53:52 +10:00
Bastien Montagne
3c9e11df37 Cleanup: Move SpaceTransform helpers from BKE_shrinkwrap to BLI_math_matrix. 2014-08-01 16:31:06 +02:00
Bastien Montagne
c11777b211 Cleanup: Move object_get_derived_final from BKE_shrinkwrap to BKE_DerivedMesh
Note this func needs some love, but this will be for later (should never have been in shrinkwrap code!).
2014-08-01 16:31:06 +02:00
Campbell Barton
7f32cf4605 Prevent macros hiding casts from const pointers 2014-08-01 22:03:03 +10:00
Sergey Sharybin
54472df750 Fix T41236: Rendered viewport doesn't update with material actions
The issue was caused by NLA evaluation without actions not setting
id's flag as updated (as that's happening when action writes data
to the ID datablock).

Added the same flag set for the NLA evaluation as what's happening
for actions.
2014-07-31 22:06:05 +06:00
Campbell Barton
da638d49e3 Style cleanup 2014-08-01 02:03:09 +10:00