Commit Graph

66005 Commits

Author SHA1 Message Date
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
Joshua Leung
53de752858 Bugfix [#33946] Bake Action fails in SVN for Objects
The problems here were caused by a cleanup commit (r. 53369).
BTW, the code here is pretty convoluted mess.
2013-01-21 02:40:51 +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
Stuart Broadfoot
4c67b23c8d Cycles Hair: Fix of cardinal curve intersection routine
Fixed some of my own mistakes in the cardinal curve intersection routine.
2013-01-21 00:58:14 +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
Nicholas Bishop
3447f2ade1 Add missing virtual destructor for VirtualMemoryAllocator
Fixes a warning from GCC 4.7.2.
2013-01-20 15:36:32 +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
Jason Wilkins
160dd1dc3b More win32 multimon (r53923). Changed getNumDisplays so that it will actually succeed. 2013-01-20 14:40:31 +00:00
Campbell Barton
159507dc2c fix for possible null pointer dereference in PE_create_particle_edit 2013-01-20 14:10:10 +00:00
Jason Wilkins
5a8d04bbb6 Add multimon support to GHOST_DisplayManagerWin32.cpp (It seemed to work before, but recent changes to GHOST_ASSERT caused it to abort if WITH_ASSERT_ABORT was configured). 2013-01-20 13:46:53 +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
Tamito Kajiyama
806e727370 Suppressed MSVC warning C4521: multiple copy constructors specified. 2013-01-18 22:10:20 +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