Makes code in tracking.cc much easier to understand and modify,
without worring to breck compulation with Libmv disabled.
It is still possible compilation will break due to libmv-capi
changes, but that's not happening so much often.
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()
Note: this doesn't work yet for everything with latest stable bullet (2.81), need to look into why and likely apply some patches upstream.
However I managed to link blender by disabling some features, likely it can be made to work without too much trouble.
RangeTree is a simple C++ tree set for storing non-overlapping scalar
ranges. Original source from:
https://github.com/nicholasbishop/RangeTree
Also update the build systems to include RangeTree.
Carve proved it's a way to go, so the time have came to get rid of old
boolean operation module which isn't used anymore.
Still kept BOP interface but move it to BSP module. At some point it
could be cleaned up further (like perhaps removed extra abstraction
level or so) but would be nice to combine such a refactor with making
BSP aware of NGons.
Tested on linux using both cmake and scons, possible regressions on
windows/osx. Would check windoes build just after commit.
==================================
Merging Carve library integration project into the trunk.
This commit switches Boolean modifier to another library which handles
mesh boolean operations in much stable and faster way, resolving old
well-known limitations of intern boolop library.
Carve is integrating as alternative interface for boolop library and
which makes it totally transparent for blender sources to switch between
old-fashioned boolop and new Carve backends.
Detailed changes in this commit:
- Integrated needed subset of Carve library sources into extern/
Added script for re-bundling it (currently works only if repo
was cloned by git-svn).
- Added BOP_CarveInterface for boolop library which can be used by
Boolean modifier.
- Carve backend is enabled by default, can be disabled by WITH_BF_CARVE
SCons option and WITH_CARVE CMake option.
- If Boost library is found in build environment it'll be used for
unordered collections. If Boost isn't found, it'll fallback to TR1
implementation for GCC compilers. Boost is obligatory if MSVC is used.
Tested on Linux 64bit and Windows 7 64bit.
NOTE: behavior of flat objects was changed. E.g. Plane-Sphere now gives
plane with circle hole, not plane with semisphere. Don't think
it's really issue because it's not actually defined behavior in
such situations and both of ways might be useful. Since it's
only known "regression" think it's OK to deal with it.
Details are there http://wiki.blender.org/index.php/User:Nazg-gul/CarveBooleans
Special thanks to:
- Ken Hughes: author of original carve integration patch.
- Campbell Barton: help in project development, review tests.
- Tobias Sargeant: author of Carve library, help in resolving some
merge stoppers, bug fixing.
===========================
Commiting camera tracking integration gsoc project into trunk.
This commit includes:
- Bundled version of libmv library (with some changes against official repo,
re-sync with libmv repo a bit later)
- New datatype ID called MovieClip which is optimized to work with movie
clips (both of movie files and image sequences) and doing camera/motion
tracking operations.
- New editor called Clip Editor which is currently used for motion/tracking
stuff only, but which can be easily extended to work with masks too.
This editor supports:
* Loading movie files/image sequences
* Build proxies with different size for loaded movie clip, also supports
building undistorted proxies to increase speed of playback in
undistorted mode.
* Manual lens distortion mode calibration using grid and grease pencil
* Supervised 2D tracking using two different algorithms KLT and SAD.
* Basic algorithm for feature detection
* Camera motion solving. scene orientation
- New constraints to "link" scene objects with solved motions from clip:
* Follow Track (make object follow 2D motion of track with given name
or parent object to reconstructed 3D position of track)
* Camera Solver to make camera moving in the same way as reconstructed camera
This commit NOT includes changes from tomato branch:
- New nodes (they'll be commited as separated patch)
- Automatic image offset guessing for image input node and image editor
(need to do more tests and gather more feedback)
- Code cleanup in libmv-capi. It's not so critical cleanup, just increasing
readability and understanadability of code. Better to make this chaneg when
Keir will finish his current patch.
More details about this project can be found on this page:
http://wiki.blender.org/index.php/User:Nazg-gul/GSoC-2011
Further development of small features would be done in trunk, bigger/experimental
features would first be implemented in tomato branch.
discussed with Janne, Ton, Nathan and we agreed this kind of change at least needs discussion with module owners.
Its also too close to release to be making these kinds of changes.
commands used:
# reverse merge
svn merge -r36073:36072 .
# for some reason this gave a lot of property changes
svn revert `svn st | grep "^ M" | awk '{print $2}'`
# reverse merging didn't work here, removing while dir.
svn rm extern/eltopo/
# manually fixed conflict in
# ./source/blenderplayer/CMakeLists.txt
#
# also manually removed 2 lines from
# ./CMakeLists.txt
Plugged the eltopo library into the cloth solver.
I was playing with it earlier, and it's so easy to
use I decided to quickly put it in (trunk's) cloth.
See http://www.cs.ubc.ca/labs/imager/tr/2009/eltopo/eltopo.html
. The authors are on the bleeding edge of continuous collision
detection (one of them did ILM's cloth sim).
I
don't really have to time to plug it into softbody, particles,
bullet, fluid, etc, but doing so would be pretty straightforward.
I'll leave that up to someone else.
To use, turn on USE_ELTOPO (in cmake) or WITH_BF_ELTOPO in scons.
* cache for low res (deactivating high res for now)
* new way of view3d rendering of smoke (no longer 3 axes) -using 3dtexture now (introduced into gpu/intern)
* introducing LZO and LZMA libs into extern (makefiles missing for now)
* reducing memory usage after simulating for the frame ended (freeing temporary buffers)
* splitting smoke into 2 modifier for the cache-sake (it cannot handle more than 1 cache on the same modifier-index)
* no color on gui anymore
* fixing non-power-of-2 resolutions (hopefully)
* fixing select-deselect of domain drawing bug
* fixing drawobject.c coding style (making Ton happy) ;-)
HINT #1: If scons doesn't work -> cmakefiles are up-to-date, couldn't test scons (but i tried to mantain them, too)
CODERS HINT #1: we really need a way to disable adding all modifiers through "Add Modifiers" dropdown!
WARNING #1: before applying this commit, deactivate your SMOKE DOMAIN in your old files and save them then. You can open them then savely after that.
WARNING #2: File and cache format of smoke can be changed, this is not final!
* removed radiosity render code, DNA and RNA (left in radio render pass options), we'll get GI to replace this probably, better allow baking to vertex colors for people who used this.
* removed deprecated solid physics library, sumo integrations and qhull, a dependency
* removed ODE, was no longer being build or supported
* remove BEOS and AMIGA defines and references in Makefiles.
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19820:HEAD
Notes:
* Game and sequencer RNA, and sequencer header are now out of date
a bit after changes in trunk.
* I didn't know how to port these bugfixes, most likely they are
not needed anymore.
* Fix "duplicate strip" always increase the user count for ipo.
* IPO pinning on sequencer strips was lost during Undo.
I also did some small tweaks. removed ifdef's for pluginapi
didn't need them there.
Fixed it so the filesel shows jp2 as image files.
(I'm going to do makefiles next)
Kent
GLEW
====
Added the GLEW opengl extension library into extern/, always compiled
into Blender now. This is much nicer than doing this kind of extension
management manually, and will be used in the game engine, for GLSL, and
other opengl extensions.
* According to the GLEW website it works on Windows, Linux, Mac OS X,
FreeBSD, Irix, and Solaris. There might still be platform specific
issues due to this commit, so let me know and I'll look into it.
* This means also that all extensions will now always be compiled in,
regardless of the glext.h on the platform where compilation happens.
Game Engine
===========
Refactoring of the use of opengl extensions and other drawing code
in the game engine, and cleaning up some hacks related to GLSL
integration. These changes will be merged into trunk too after this.
The game engine graphics demos & apricot level survived my tests,
but this could use some good testing of course.
For users: please test with the options "Generate Display Lists" and
"Vertex Arrays" enabled, these should be the fastest and are supposed
to be "unreliable", but if that's the case that's probably due to bugs
that can be fixed.
* The game engine now also uses GLEW for extensions, replacing the
custom opengl extensions code that was there. Removes a lot of
#ifdef's, but the runtime checks stay of course.
* Removed the WITHOUT_GLEXT environment variable. This was added to
work around a specific bug and only disabled multitexturing anyway.
It might also have caused a slowdown since it was retrieving the
environment variable for every vertex in immediate mode (bug #13680).
* Refactored the code to allow drawing skinned meshes with vertex
arrays too, removing some specific immediate mode drawing functions
for this that only did extra normal calculation. Now it always splits
vertices of flat faces instead.
* Refactored normal recalculation with some minor optimizations,
required for the above change.
* Removed some outdated code behind the __NLA_OLDDEFORM #ifdef.
* Fixed various bugs in setting of multitexture coordinates and vertex
attributes for vertex arrays. These were not being enabled/disabled
correct according to the opengl spec, leading to crashes. Also tangent
attributes used an immediate mode call for vertex arrays, which can't
work.
* Fixed use of uninitialized variable in RAS_TexVert.
* Exporting skinned meshes was doing O(n^2) lookups for vertices and
deform weights, now uses same trick as regular meshes.