Commit Graph

36360 Commits

Author SHA1 Message Date
1e3a2931ac fix [#33889] Unexpected weights after parenting with Empty Groups
out of range dvert's are now cleared before adding new-empty groups.
2013-01-22 10:51:57 +00:00
193df0f5a0 Fix #33951: Only margin is correctly baked for non-displacement baking
Was own mistake in recent changes.
2013-01-22 09:37:46 +00:00
95a13a2c02 Fix projection texture painting crash
It was caused by own mistake by not noticing externtex is used not
only by render engine. Now this function uses pool passed as argument
rather than using R.pool.
2013-01-22 08:05:00 +00:00
ee4e5da300 update stub 2013-01-22 06:55:15 +00:00
97d8e34d61 correct addon tutorial section on keymap register/unregister and add label next to image color-depth option.
having buttons labelled [8, 16] on their own is not very meaningful.
2013-01-22 06:41:12 +00:00
761b380b84 fix [#33841] Disabling and re-enabling live addon crashes blender (modal/draw handler) 2013-01-22 06:16:49 +00:00
d1a211188b property change reporting now uses the context again, rather then checking a dir() on context, hard-code common paths.
eg:
  bpy.context.scene.render.resolution_x = 1921
  bpy.context.object.data.use_auto_smooth = True
  bpy.context.object.active_material.diffuse_intensity = 1
  bpy.context.scene.world.exposure = 0.1

also remove duplicate GS() defines
2013-01-22 04:24:01 +00:00
043e1536e5 add rna paths to toolsettings and its substructs, useful for python scripting. 2013-01-22 03:11:11 +00:00
2cd25f4cf5 fix [#33836] issuing bpy.ops.render.render() in console crashes the program
don't check the event queue from threads, assert if this happens in future.
2013-01-22 02:21:21 +00:00
044e3398b9 Improved performance for multiple iterations, keeping the same laplacian matrix. 2013-01-21 19:33:58 +00:00
d760a86927 code cleanup: minor changes, replace len_v3 with len_squared_v3 for comparison. 2013-01-21 18:45:31 +00:00
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
effaa79ffb Multires baker: fix bad face->grid index conversion for displacement baker 2013-01-21 18:34:20 +00:00
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
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
8954c99095 Fix compile with collada enabled 2013-01-21 17:38:11 +00:00
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
8cde4e5182 add an influence slider to mesh cache. 2013-01-21 16:43:04 +00:00
bcdbc57994 Usual minor UI messages fixes... 2013-01-21 16:25:25 +00:00
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
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
95758cf2cf Fix building for new collada... 2013-01-21 14:00:01 +00:00
c263753d17 Added gsoc-2012 collada improvements from bratwurst branch 2013-01-21 13:45:49 +00:00
7d286d9a80 Bevel vertex: fix rebuild of faces so they are connected when seg > 1. 2013-01-21 13:31:16 +00:00
e224996f3d Avoid using python keyword as operator property name 2013-01-21 12:44:40 +00:00
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
8380646798 Fix image pool crash when acquiring buffer for NULL image 2013-01-21 11:38:15 +00:00
57221e13ee Expose locale_explode in bpy.app.translations, will be handy in i18n manipulation scripts/addons. 2013-01-21 10:57:24 +00:00
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
a679f6399f Fixes to BLF_locale_explode, was not handling all cases correctly (own fault) :/ 2013-01-21 10:46:01 +00:00
88dd983f3c fix regression in own recent commit, vertex flags were left uninitialized. 2013-01-21 09:54:33 +00:00
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
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
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
40629671f4 Style cleanup 2013-01-21 06:32:09 +00:00
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
73a68c95a4 Fix compiling problems with translation stuff disabled 2013-01-21 05:42:19 +00:00
aa6374dc0a fix for own error in vertex slide, isolated verts mixed with regular selection would crash. 2013-01-21 03:00:10 +00:00
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
38cee985bb code cleanup: style & warnings. 2013-01-21 02:30:40 +00:00
add25e43ad Bevel vertex only (shortcut: control-shift-B) initial commit. 2013-01-21 01:52:23 +00:00
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
aaad394b7f Fix #33939, if initialization of vert slide failed, code did not handle
the case well.
2013-01-21 00:39:54 +00:00
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
952c83cb62 Fix for usual bplayer issue (own fault)... 2013-01-20 18:17:01 +00:00
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
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
00ef8896fd fix for own error in recent BLI_array commit 2013-01-20 16:58:14 +00:00
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
159507dc2c fix for possible null pointer dereference in PE_create_particle_edit 2013-01-20 14:10:10 +00:00