Commit Graph

36324 Commits

Author SHA1 Message Date
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
Nicholas Bishop
4256ad7566 Update object bounding box during sculpt
Fixes the sculpt object being incorrectly clipped during drawing due
to an out-of-date bounding box making it seem that the object had gone
outside the view.

Added a BKE_pbvh function to get the top-level bounding box. In
sculpt_flush_update(), where the PBVH bounds are updated, the result
is copied to the object's bounding box.

Fixes bug [#33790]
projects.blender.org/tracker/?func=detail&aid=33790&group_id=9&atid=498
2013-01-20 00:19:57 +00:00
Nicholas Bishop
383987560b Disable OpenMP with dyntopo in paint_mesh_restore_co()
Otherwise, new entries might be inserted by sculpt_undo_push_node()
into the GHash used internally by BM_log_original_vert_co() by a
different thread.

Fixes bug [#33787]
http://projects.blender.org/tracker/?func=detail&aid=33787&group_id=9&atid=498
2013-01-19 23:52:33 +00:00
Nicholas Bishop
9a50f45469 Skip hidden faces in PBVH BMesh ray intersection test
Moved the GPU function gpu_bmesh_face_visible() to BKE_paint and
inverted the test to match equivalent tests for other mesh types:
paint_is_bmesh_face_hidden().

Changed BKE_pbvh_bmesh_node_save_orig() to not save hidden faces into
the triangle array.

Modified the non-use-original branch of pbvh_bmesh_node_raycast() to
skip hidden faces.

Fixes bug #33914:
projects.blender.org/tracker/index.php?func=detail&aid=33914&group_id=9&atid=498
2013-01-19 16:10:21 +00:00
Campbell Barton
3997630157 use malloc for BLI array reallocation. Existing code initializes memory. 2013-01-19 07:41:15 +00:00
Campbell Barton
23af6743c7 code cleanup: BLI_array.h's BLI_array_grow_items macro was unmanageable.
moved the main re-alloc logic into a C function.
2013-01-19 07:35:55 +00:00
Campbell Barton
162c331417 style cleanup 2013-01-19 06:12:25 +00:00
Campbell Barton
9051868564 patch [#33923] Patch for Node Theme Colors
from Gavin Howard (gdh)
2013-01-19 04:20:53 +00:00
Campbell Barton
9a4da5a2f1 utility function to get a mempool as a pointer array. 2013-01-19 03:51:17 +00:00
Campbell Barton
bf355362b1 replace error prints with asserts in BLI_mempool when an iterator function is called on a non-iterator flagged pool. 2013-01-19 03:16:52 +00:00
Campbell Barton
53e383ff9d patch [#33924] Spelling Corrections
from Gavin Howard (gdh)
2013-01-19 03:04:51 +00:00
Campbell Barton
5006a39c27 replace calloc with malloc for arrays that are filled in right after. 2013-01-19 02:37:04 +00:00
Campbell Barton
38825f891e use openmp for building bmesh arrays, also replace calloc with malloc. 2013-01-19 02:21:53 +00:00
Campbell Barton
f45d8827ba CDDM_merge_verts() was building an index array for all loops and not using it.
also use malloc over calloc since the values are filled in right after.
2013-01-19 02:01:18 +00:00
Campbell Barton
f251eb3f0c minor dyntopo speedup: was doing 2x ghash lookups for BM_log_face_removed(), BM_log_vert_removed(), only one needed. 2013-01-19 00:53:33 +00:00
Campbell Barton
a8abc11e42 dyntopo optimization - fast path for edges with 2 faces using it, was counting the edge-faces then using an iterator,
instead use BM_edge_loop_pair()
2013-01-19 00:17:10 +00:00
Campbell Barton
d4bf47350f Holding Alt now removes [-1, 1] clamping in vertex slide, Thanks to Psy-Fi for the original patch. 2013-01-18 23:20:17 +00:00
Campbell Barton
32ce3a6ca7 utility vector functions for flipping one vector about another:
nicer then interp_v3_v3v3(v, v1, v2, -1.0f);
2013-01-18 23:07:27 +00:00
Campbell Barton
b7a2402da6 fix for building with BSD & MinGW. 2013-01-18 21:05:37 +00:00
Campbell Barton
5f9ea0d7eb move draw all edges into the object settings (object panel), makes more sense here since its next to draw extra wire 2013-01-18 19:01:26 +00:00
Sergey Sharybin
a08a3ab931 Fix #33916: 2.65a regression: particles duplicating objects with halo - crash
allow_render_dupli_instance used to pass zero-based index to give_current_material
which is wrong.

Before rev53332 it wasn't so much visible because give_current_material used
to clamp index internally. But that was wrong behavior here anyway, and why
nobody noticed this for so long? :)
2013-01-18 12:29:18 +00:00
Sergey Sharybin
9660ba6c2b Fix #33910: Wipe effect starts and stops to early with blur enabled.
Made small tweaks which now limits blur width in a way it can not
be wider than distance between frame boundary and wipe effect center.
It eliminates weirdeness of how blur appears/disappears in cases
effect fac is close to 0/1.

Could be tweaked further but will require effect rewrite it seems.
2013-01-18 09:36:17 +00:00
Alex Fraser
55030a4c1a Applying sRGB color space transform when baking to vertex colors. Thanks to Campbell Barton and Sergey Sharybin for their help! 2013-01-18 09:19:43 +00:00
Sergey Sharybin
6a5cdde899 Fix #33913: Unable to set sequencer proxy custom directory as relative path
Added absolute->relative conversion for directory in file_browse_exec.
This is how other places deals with this, but perhaps we'd better change
file selection so both filepath and directory are affected by relative
option.
2013-01-18 08:44:55 +00:00
Campbell Barton
ee0eb394c9 use openmp sections for felling origindex arrays 2013-01-18 06:26:06 +00:00
Alexander Pinzon
9e8c509213 The problem of the peaks is corrected with the use of the normalized version. 2013-01-17 19:19:02 +00:00
Campbell Barton
8a0ad8f8b5 fix for text selection glitch, moving the mouse to the left would sometimes not entirely select the start of the text. 2013-01-17 19:12:11 +00:00
Campbell Barton
2b80a7d5da use define for text offset & seletion.
and no need to calloc memory for string selection.
2013-01-17 18:59:19 +00:00
Ton Roosendaal
a896366ca9 My bad - commit today for "Continuous Grab" fix ignored the comment that
bounds could be NULL :) Crash fixed.
2013-01-17 15:27:58 +00:00