Commit Graph

2669 Commits

Author SHA1 Message Date
Irie Shinsuke
5792e77239 Patch [#34373] Use i18n monospace font in Text editor and Python console
This patch allows Blender to display i18n monospace font in the text
editor and the Python interactive console. Wide characters that occupy
multiple columns such as CJK characters can be displayed correctly.
Furthermore, wrapping, selection, suggestion, cursor drawing, and
syntax highlighting should work.

Also fixes a bug [#34543]: In Text Editor false color in comment on cyrillic

To estimate how many columns each character occupies, this patch uses
wcwidth.c written by Markus Kuhn and distributed under MIT-style license:

  http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c

wcwidth.c is stored in extern/wcwidth and used as a static library.

This patch adds new API to blenfont, blenlib and blenkernel:

BLF_get_unifont_mono()
BLF_free_unifont_mono()
BLF_draw_mono()
BLI_wcwidth()
BLI_wcswidth()
BLI_str_utf8_char_width()
BLI_str_utf8_char_width_safe()
txt_utf8_offset_to_column()
txt_utf8_column_to_offset()
2013-03-12 07:25:53 +00:00
Campbell Barton
7d585ed475 patch [#34103] check_for_dupid.patch
from Lawrence D'Oliveiro (ldo)

- more comments
- more uses of bool type
- define symbol for length of in_use array in check_for_dupid
2013-03-10 05:46:24 +00:00
Campbell Barton
c36f20a7d2 style cleanup 2013-03-08 04:00:06 +00:00
Sergej Reich
643b0be4cb bullet: Update to current svn, r2636
Apply patches in patches directory, remove patches that were applied
upstream.
If you made changes without adding a patch, please check.

Fixes [#32233] exporting bullet format results in corrupt files.
2013-03-07 17:53:16 +00:00
Campbell Barton
f2bb536994 code cleanup: also change BKE_blender.h BLENDER_VERSION_CHAR to 'a' so as not to confuse things. 2013-03-05 14:47:49 +00:00
Campbell Barton
f44b54d2a7 patch [#34103]
from Lawrence D'Oliveiro (ldo)

More use of bool type, necessitating adding inclusion of BLI_utildefines.h, or moving it up in the inclusion order if it was already included, in various places
- storage.c: make some variables only used in bli_builddir local to that
- storage.c: BLI_file_descriptor_size should allow 0 as a valid file descriptor
- path_util.c: make pointers to non-reentrant storage returned from folder routines const, necessitating making variables holding these returned pointers const elsewhere as well
- path_util.c: BLI_string_to_utf8 closes iconv context in case of conversion error
-  blf_lang.c: fill_locales routine now has its own "languages" local variable to construct paths (was stealing internal storage belonging to BLI_get_folder before)
2013-03-05 03:17:46 +00:00
Dalai Felinto
8ea7b742f6 bge bugfix: [#34517] 2D Filter causes mouselook script drifting effect (patch by Daniel Stokes - Kupoman)
Fix for 2.66a

""We can't pass the results of canvas->GetViewPort() directly because canvas->SetViewPort() does some extra math""
Bug introduced during 2.65 series in the refactor to use canvas->SetViewPort instead of direct opengl calls for viewport
(53305, 53392, 53393)
2013-03-04 08:45:42 +00:00
Dalai Felinto
a3b47ede17 BGE bug-fix[#34523] 2dfilter produces render error (objects disappear) - likely an alpha problem
Fix for 2.66a

With help from Daniel Stokes and Mitchell Stokes.

This bug always existed in OSX, but started showing up in Windows and Linux on review (54745 + 54747)
[the patch to enable alpha buffer for all OSs]

A better fix would be to use RAS_IRasterizer::SetAlphaBlend(GPU_BLEND_SOLID);
but I think gpu_verify_alpha_blend() is not switching to SOLID because
GTS.alphablend is GPU_BLEND_SOLID (even though GL_ALPHA_TEST is enabled).

Anyways, this is not something worth tackling now, since in terms of functionality it shouldn't matter.
2013-03-04 08:22:20 +00:00
Campbell Barton
2921d48239 code cleanup: unused vars in collada, preprocessor formatting & warning in mingw.
also compiling without bullet needed a stub added.
2013-03-04 00:53:57 +00:00
Mitchell Stokes
db6d34daad BGE: Fix for bugs #34428, #20856, #20281. These were all multi-uv bugs caused by the BGE keeping too much uv information. When setting up shaders the BGE assumes each UV layer is unique, but the converter would store duplicates. 2013-03-02 18:05:52 +00:00
Brecht Van Lommel
2822a14e5d Fix #34483: game engine multi UV glsl materials not working correct after changes
to support more than 2 UV maps. This code indirectly depended on the order of
OpenGL attribute ID's assigned by the OpenGL driver being the same as the
attributes being declared in the GLSL shader code, which is not always the case.
2013-03-01 20:45:42 +00:00
Campbell Barton
0dd6988a1e add PHY headers to cmake's ketsji (else some IDE's won't show) 2013-02-26 23:08:42 +00:00
Brecht Van Lommel
4f3ca854e1 Fix various warnings with clang build, and adjust cmake clang warnings flags
to include a few more that gcc is using too.
2013-02-26 21:58:06 +00:00
Nathan Letwory
04c1a7f1bc Check if the variable is a string and split nicely, so compile command stays intact with proper include options. 2013-02-25 12:03:55 +00:00
Mitchell Stokes
2f2c0a6b02 BGE: Fixing a crash reported by Ace Dragon on BA. It looks like Object->totcol can give a number higher than the number of materials, so I've added some NULL checks. 2013-02-25 05:55:37 +00:00
Mitchell Stokes
7ba339ad32 BGE: Adding back the virtual destructor to PHY_IPhysicsController, which was accidentally removed in r54807. 2013-02-24 18:48:57 +00:00
Campbell Barton
963b1c1b16 fix for own commit r54806 with argument order and multisampling. 2013-02-24 10:50:33 +00:00
Mitchell Stokes
ed1d215cea BGE: Removing the source files for the PHY interfaces since they just contained virtual destructors. This means we had license and doc blocks for 3 lines of code, which seemed silly. This also means that ge_phys_common no longer needs to be built as a library. I tested this with CMake and SCons using GCC; hopefully this doesn't break other systems. 2013-02-24 07:09:39 +00:00
Campbell Barton
630a31a900 fix for fullscreen on X11 (used by the BGE, not blender application),
changing the screen resolution wasn't still allowed for larger virtual desktops.

added an exclusive option to ghost so the fullscreen window is ignored by the window manager and we get all events. (common practice for games on X11).
2013-02-24 05:05:29 +00:00
Campbell Barton
c42b51ed96 GHOST/X11 - free memory allocated by XF86VidModeGetAllModeLines(),
Comment from Zr says this crashes but looks like this was because there was no check if the function failed to allocate to begin with.
2013-02-23 23:15:38 +00:00
Campbell Barton
166de48ca4 code cleanup: confusingly written and named function for BGE materuial conversion: getImageFromMaterial() --> getMTexFromMaterial() 2013-02-23 07:36:40 +00:00
Campbell Barton
dddee08f27 code cleanup: bge material conversion was creating STR_String just to check for empty string for no reason (empty string was assigned irrespective). 2013-02-23 07:15:37 +00:00
Campbell Barton
e42e570ff4 BGE: fix for uninitialized tangents 2013-02-23 04:49:46 +00:00
Mitchell Stokes
87ab622463 BGE: Fix for bug #34377 "Multi UV mesh's materials not backwards compatible and Odd UV Coord behavior" reported by Alex Mairs (ctbm). The problem was the unused texture slot was still trying to be used. Now unused texture slots' mappings are set to DISABLE so they don't mess up the rest of the conversion process. 2013-02-23 04:15:47 +00:00
Mitchell Stokes
e4febef1fb BGE: Finally moving material IPOs to the 2.60 BGE animation system (BL_Action). It was kind of a fluke that they worked before. 2013-02-23 02:47:22 +00:00
Campbell Barton
f924750463 fix for error using uninitialized draw mode with 'm_failsafe_storage' in the BGE. 2013-02-23 02:45:12 +00:00
Campbell Barton
6c0b8ec064 add include for scons. 2013-02-23 02:03:53 +00:00
Campbell Barton
a528cb9905 code cleanup: bge - was converting float[] to MT_Vector's just to compare. use BLI_math instead. 2013-02-23 01:57:56 +00:00
Mitchell Stokes
c00191dbe3 BGE: Object color channels can now be animated separately without zeroing out the other channels. Problem reported by Dalai via IRC. 2013-02-23 01:17:01 +00:00
Mitchell Stokes
bd8f4cc4d6 BGE: Second fix for #34330 "Action Actuator "caching" the previous ran actions" reported by Dalai. Now the multiple layers should also be working. When doing fcurve/IPO animations, the controllers are cleared as soon as the action is done and must be setup again every time the action is played. 2013-02-23 00:46:58 +00:00
Mitchell Stokes
eab8a25e03 BGE: For BL_Action, use the object's scene rather than the "active" scene, which can potentially cause problems with multiple scenes. 2013-02-23 00:28:25 +00:00
Mitchell Stokes
d05cb9bca5 BGE: (partial?) fix for #34330 "Action Actuator "caching" the previous ran actions" reported by Dalai. The test file now works if all of the actions are using the same layer, but multiple layers can still cause problems. However, I am unsure as to what the "correct" behavior should be with multiple layers. They should probably blend somehow... 2013-02-22 23:55:06 +00:00
Mitchell Stokes
b3c0896967 BGE: Fix for bug #34219 "Webcam support under Linux in Standalone broken" reported by Thomas Achtner (offtools).
No one bothered to update the player for ffmpeg changes made in August 2012. This meant the player was no longer calling avdevice_register_all(), and  ffmpeg would fail to open web cam streams.
2013-02-22 20:37:14 +00:00
Dalai Felinto
0945c3b43b fixing typo in include (report and patch by Jochen Schmitt) 2013-02-22 17:45:04 +00:00
Alexander Kuznetsov
2c2a42a4e8 Fix for building without python. 2013-02-22 15:54:10 +00:00
Sergej Reich
c586159438 game engine: Revert to using regular gimpact for mesh shapes
This reverts part of r53019.
While the compound shape trick works well in some cases, overall it's
much slower and even causes crashes under certain conditions.

We could make this and option and fix the crashes, but it's better to
implement convex decomposition anyway so just reverting for now.

Fixes [#34353] Ray cast on Triangle mesh bounded Rigid Body Object causes blender crash to desktop without error.
2013-02-22 14:47:11 +00:00
Mitchell Stokes
6bac47f854 BGE: Fix for bug #34349 "Character walkDirection ADD mode -#INF error" reported by Angus Hollands (agoose77). If the walk directions canceled each other out, the actuator would try to normalize a zero vector, which caused the error. 2013-02-22 02:31:46 +00:00
Dalai Felinto
2ecf27f56f BGE projection code fix: old patch #28893 (to fix #28753) committed in rev.41131 changed the clipping for ortho camera from -far +far to +near +far. But also introduced this -far +far when using 3dviewport camera (which shouldn't). 2013-02-22 01:48:53 +00:00
Jens Verwiebe
074565330d Fix scons compile 2013-02-21 19:23:41 +00:00
Mitchell Stokes
815e00917d BGE cleanup: Removing the PHY__Vector classes and replacing them with MT_Vectors. The PHY__Vectors didn't offer anything (not even any real abstraction) and they required annoying MT_Vector <-> PHY_Vector conversions all over the place. No functional changes. 2013-02-21 18:30:11 +00:00
Mitchell Stokes
8c9906eb91 BGE: Fix for issue #34242 "It does not render in "P" mode for Game engine if you UV mapa a face of a cube" reported by joaclint.
Material caching can now be disabled for Multitexture and GLSL Materials.
2013-02-16 04:38:53 +00:00
Mitchell Stokes
8997e5ae06 BGE: Fix for issue #32606 "Raycasts are locked to the scene of calling object" reported by Josiah Lane (solarlune). The raycasting functions were using the active scene instead of the object's scene. 2013-02-11 18:29:19 +00:00
Campbell Barton
2005f7c6c0 style cleanup: also some typos 2013-02-11 00:49:00 +00:00
Mitchell Stokes
f75ca60a1c BGE: Make sure we are writting to the depth buffer when rendering alpha polygons for shadows. Otherwise alpha shadows won't work\! 2013-02-10 08:28:47 +00:00
Ton Roosendaal
00212f2b1f Bug fix #34157
Tss tss! :)
This bug (since Jan 26) made Material options get cleared on using GE once.
2013-02-09 12:30:42 +00:00
Mitchell Stokes
8eabdad3aa BGE: Fix to make KX_CharacterWrapper.jumpCount work a bit smoother. Previously jumpCount was only getting reset to 0 if the character was on the ground while jump() was being called. This works alright internally for double jumping, but it made things awkward if a user wanted to check jumpCount before calling jump() (i.e., before jumpCount was updated). 2013-02-09 06:32:17 +00:00
Brecht Van Lommel
faaee15407 Fix part of #34083: crash trying to play surround .wav file in the game engine
on Windows, it still doesn't play but it doesn't crash at least.
2013-02-07 21:29:31 +00:00
Bastien Montagne
dd83387e0b And one more "G.main" compile fix, this time for BGE ;) 2013-02-05 13:31:59 +00:00
Campbell Barton
69993c5d40 style cleanup: spaces -> tabs 2013-02-04 00:18:09 +00:00
Campbell Barton
9d4be17de4 style cleanup 2013-02-04 00:05:15 +00:00