Commit Graph

47594 Commits

Author SHA1 Message Date
Tamito Kajiyama
1db5b6d283 Fix for Stroke.Resample(float iSampling) and Stroke.UpdateLength() using
StrokeVertex.point2d() instead of .getPoint().  It is noted that .point2d()
returns a 3-dimensional vector representing a 2D-projected point, with the z
component indicating a normalized depth of the original 3D point, whereas
.getPoint() returns a plain 2-dimensional vector.  This fix should have been
done in revision 48510...

Also made fix for callers of Stroke.Resample() not calling stroke.UpdateLength().
2013-01-22 01:46:16 +00:00
Alexander Pinzon
044e3398b9 Improved performance for multiple iterations, keeping the same laplacian matrix. 2013-01-21 19:33:58 +00:00
Campbell Barton
d760a86927 code cleanup: minor changes, replace len_v3 with len_squared_v3 for comparison. 2013-01-21 18:45:31 +00:00
Sergey Sharybin
709a86a8d9 Multires baker: fix wrong normalization if baking happens to multiple images
Previously normalization will happen per image buffer individually, which
was wrong in cases different faces of the sane mesh uses different images.

Also solved possible threading issues when calculating min.max displacement.
2013-01-21 18:34:27 +00:00
Sergey Sharybin
effaa79ffb Multires baker: fix bad face->grid index conversion for displacement baker 2013-01-21 18:34:20 +00:00
Sergey Sharybin
64c85d89dd Multires baker: fix memory leak caused by threading issues
Didn't notice this before because of non-working guarded allocation
at the time threading was added to multires baker.
2013-01-21 18:34:14 +00:00
Howard Trickey
698aeec8b8 Vertex bevel: adjust vertex positions to make a more rounded pattern.
Also fixed debug quad drawing code to not join successive quads.
2013-01-21 18:19:34 +00:00
Jens Verwiebe
8954c99095 Fix compile with collada enabled 2013-01-21 17:38:11 +00:00
Campbell Barton
78405a89c8 fix [#33937] Planar decimate + triangulate operator leaves non-triangle faces
triangulate operation will now always triangulate, even on degenerate faces.
2013-01-21 17:25:08 +00:00
Campbell Barton
8cde4e5182 add an influence slider to mesh cache. 2013-01-21 16:43:04 +00:00
Bastien Montagne
bcdbc57994 Usual minor UI messages fixes... 2013-01-21 16:25:25 +00:00
Campbell Barton
caac27dcbc mesh-cache deform modifier,
supports MDD and PC2 formats.

see wiki docs:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Modifiers/Deform/Mesh_Cache
2013-01-21 15:41:00 +00:00
Bastien Montagne
4c0ebedc66 On second thought, exposes bpy.app.translations also when built without i18n support, this will avoid the need for py scripts to test for its presence everywhere! 2013-01-21 15:10:22 +00:00
Bastien Montagne
95758cf2cf Fix building for new collada... 2013-01-21 14:00:01 +00:00
Gaia Clary
c263753d17 Added gsoc-2012 collada improvements from bratwurst branch 2013-01-21 13:45:49 +00:00
Howard Trickey
7d286d9a80 Bevel vertex: fix rebuild of faces so they are connected when seg > 1. 2013-01-21 13:31:16 +00:00
Sergey Sharybin
e224996f3d Avoid using python keyword as operator property name 2013-01-21 12:44:40 +00:00
Bastien Montagne
e0063bd74f Print warnings when invalid py dict/key/value is found in translations data (do not error here, this is not critical and can be ignored/skiped, and it would break translations for other addons as well). 2013-01-21 12:01:47 +00:00
Sergey Sharybin
8380646798 Fix image pool crash when acquiring buffer for NULL image 2013-01-21 11:38:15 +00:00
Bastien Montagne
57221e13ee Expose locale_explode in bpy.app.translations, will be handy in i18n manipulation scripts/addons. 2013-01-21 10:57:24 +00:00
Bastien Montagne
3aa499f3f7 I18n fix: "" context is not the same as NULL context!
This bug did not appear earlier because the "" default context was actually never used, always NULL context was passed instead. But bpy.app.translations uses "" as default context in its keys (simplifies the hash/comp functions of internal py messages cache)...

So now, Blender prefers NULL (None in python) as default context value, but understands also "" as such.
2013-01-21 10:52:34 +00:00
Bastien Montagne
a679f6399f Fixes to BLF_locale_explode, was not handling all cases correctly (own fault) :/ 2013-01-21 10:46:01 +00:00
Campbell Barton
88dd983f3c fix regression in own recent commit, vertex flags were left uninitialized. 2013-01-21 09:54:33 +00:00
Sergey Sharybin
04affbe80e Support normalized displacement maps in cases maximal distance is not set
This will calculate maximal distance automatically and normalize displacement
to it. Before this change normalization will not happen at all in cases max
distance is not set manually.

This affects on "regular" baker only, there are still some fixes to come for
multiresolution baker, but that could be solved separately.
2013-01-21 09:05:05 +00:00
Sergey Sharybin
86991fbcb0 Fixed render time regression in Blender Internal
It was caused by image threading safe commit and it was noticeable
only on really multi-core CPU (like dual-socket Xeon stations), was
not visible on core i7 machine.

The reason of slowdown was spinlock around image buffer referencing,
which lead to lots of cores waiting for single core and using image
buffer after it was referenced was not so much longer than doing
reference itself.

The most clear solution here seemed to be introducing Image Pool
which will contain list of loaded and referenced image buffers, so
all threads could skip lock if the pool is used for reading only.
Lock only needed in cases when buffer for requested image user is
missing in the pool. This lock will happen only once per image so
overall amount of locks is much less that it was before.

To operate with pool:
- BKE_image_pool_new() creates new pool
- BKE_image_pool_free() destroys pool and dereferences all image
  buffers which were loaded to it
- BKE_image_pool_acquire_ibuf() returns image buffer for given
  image and user. Pool could be NULL and in this case fallback to
  BKE_image_acquire_ibuf will happen.

  This helps to avoid lots to if(poll) checks in image sampling
  code.

- BKE_image_pool_release_ibuf releases image buffer. In fact, it
  will only do something if pool is NULL, in all other case it'll
  equal to DoNothing operation.
2013-01-21 08:49:42 +00:00
Bastien Montagne
2b9ab8781d Various cleanup in i18n code (having funcs implemented in two different places is tricky, you quickly forget to add/edit one, we already have this problem with ugly bplayer stub... e.g. since r53938, BLF_locale_explode was not implemented in non-WITH_INTERNATIONAL builds). Also tried to simplify #ifdef's here... 2013-01-21 08:08:20 +00:00
Joshua Leung
40629671f4 Style cleanup 2013-01-21 06:32:09 +00:00
Joshua Leung
bfa065f10c Bugfix [#33852] Scale of a strip in NLA is changed after moving it long distance
using numeric input

When using numeric input to move strips, the strip extent clamping code could
end up prematurely truncating one endpoint. This was because the clamping code
uses the values of the other end (e.g. end for start, and start for end) as one
of the limits on its allowable range to prevent inverted strips.

Now we just set these values twice - the first time, one of the endpoints may
still get truncated (while the other one will be able to go to its correct
value), then the second time both will get set correctly (and validated too).
2013-01-21 06:31:17 +00:00
Joshua Leung
73a68c95a4 Fix compiling problems with translation stuff disabled 2013-01-21 05:42:19 +00:00
Campbell Barton
aa6374dc0a fix for own error in vertex slide, isolated verts mixed with regular selection would crash. 2013-01-21 03:00:10 +00:00
Campbell Barton
d05f46c12d minor changes to _build_translations_cache(), remove unneeded NULL checks and use slightly different funcs for getting strings. 2013-01-21 02:40:36 +00:00
Campbell Barton
38cee985bb code cleanup: style & warnings. 2013-01-21 02:30:40 +00:00
Howard Trickey
add25e43ad Bevel vertex only (shortcut: control-shift-B) initial commit. 2013-01-21 01:52:23 +00:00
Antony Riakiotakis
8e934014d7 Ommit extraneous check for paint tool in 3d mapping case (Only draw tool
uses this anyway) and avoid copying of coordinate for 3D case.
2013-01-21 01:01:15 +00:00
Antony Riakiotakis
aaad394b7f Fix #33939, if initialization of vert slide failed, code did not handle
the case well.
2013-01-21 00:39:54 +00:00
Antony Riakiotakis
e6f8261989 3D mapping for projective texture painting (only for draw brush). Useful
to draw with procedural textures on surface of object. 2D painting will
still paint as if tiled.

When we unify the paint systems, the texture sampling functions will
need to be changed. Sculpt uses a slightly different system that passes
both screen and 3d coordinates to the sampling function. This commit
however is not too disrupting for that however so it can go in now.
2013-01-20 21:32:14 +00:00
Bastien Montagne
952c83cb62 Fix for usual bplayer issue (own fault)... 2013-01-20 18:17:01 +00:00
Bastien Montagne
cef730d969 Python i18n API. Many thanks to Campbell and Brecht for the reviews and suggestions!
This commit adds:
* A new bpy.app.translations module giving some info about locales/translation stuff (current active locale, all locales currently known by blender, all translation contexts currently defined, etc.).

* The ability for addons to feature translations, using the (un)register functions of above module.

* Also cleans up "translate py string when storing into RNA prop" by removing "PROP_TRANSLATE" string's subtype, and adding a PROP_STRING_PY_TRANSLATE flag instead (this way it is no more exposed to python...).

Addon translations work with py dictionaries: each addon features a dict {lang: {(context, message): translation, ...}, ...}, which is registered when the addon is enabled (and unregistered when disabled). 

Then, when a key (context, message) is not found in regular mo catalog, a cache dict for current locale is built from all registered addon translations, and key is searched in it.

Note: currently addons writers have to do all the work by hand, will add something (probably extend "edit translation" addon) to automate messages extraction from addons soon(ish)! To get a look to expected behavior from addons, have a look at render_copy_settings/__init__.py and render_copy_settings/translations.py (rather stupid example currently, but...). Once we have a complete process, I'll also update relevant wiki pages.
2013-01-20 17:29:07 +00:00
Antony Riakiotakis
08bcbafe36 Fix #33941. We need to free the image editor ibuf too if no image is
found for cloning.
2013-01-20 17:25:46 +00:00
Campbell Barton
00ef8896fd fix for own error in recent BLI_array commit 2013-01-20 16:58:14 +00:00
Campbell Barton
f414d2980a code cleanup: remove some paranoid checks which would have crashed anyway earlier on.
Also some minor formatting.
2013-01-20 14:50:50 +00:00
Campbell Barton
159507dc2c fix for possible null pointer dereference in PE_create_particle_edit 2013-01-20 14:10:10 +00:00
Campbell Barton
7c75bfd744 minor change r53918 was supposed to resolve. 2013-01-20 11:54:43 +00:00
Jason Wilkins
80410a4ff6 removed incorrect comment in draw_nla_channel_list_gl 2013-01-20 10:04:11 +00:00
Jason Wilkins
6a522ac058 removed extraneous glEnable(GL_BLEND)/glDisable(GL_BLEND) in ui_draw_aligned_panel 2013-01-20 09:41:46 +00:00
Jason Wilkins
517ac5c57c edited wmSubWindowScissorSet for readability 2013-01-20 09:22:11 +00:00
Campbell Barton
8aa891ac6d correction for msvc2008 2013-01-20 08:43:44 +00:00
Campbell Barton
bc44e81dff fix own bug with uninitialized arrays in subdivide (from recent BLI_array.h update)
also quiet warning.
2013-01-20 08:05:23 +00:00
Nicholas Bishop
7db7d7f210 Use KKEY in sculpt mode to activate the snake hook brush
This brush is more useful now with dynamic topology, deserves its own
key binding.
2013-01-20 00:51:52 +00:00
Nicholas Bishop
4ca7bad748 Delete loose edges left behind by sculpting with collapse-short-edges
After deleting a face, check for unused edges and delete them.

Fixes bug [#33891]
projects.blender.org/tracker/?func=detail&aid=33891&group_id=9&atid=498
2013-01-20 00:46:33 +00:00