Commit Graph

94 Commits

Author SHA1 Message Date
Jens Verwiebe
e3a5f0501e Fix cmake/player compile by adding the xtra osx lib, check if this breaks other OS 2013-11-05 18:57:45 +00:00
Dalai Felinto
4abb8fde95 Photoshop PSD support
We now support the combined layer of Photoshop files (stored as layer 0
in the file). This way users can keep their files as multilayer PSD and
Blender always handle them as flat images.

For perfect alpha this requires an OpenImageIO update:
342cc2633f

Photoshop sample files:
https://github.com/OpenImageIO/oiio-images

Brecht has some pending fixes to push for OIIO as well, so we may as
well wait to update our libraries.

What works:
===========
* 8bit images (with or without alpha)
* 16bits images (alpha discarded)
* Photoshop files saved with 'Maximum Compatibility'
* Cycles, Blender internal,  BGE (and player)

Known limitations
(due to OIIO dependency):
=========================
* Images with less than 4 channels show a wrong thumbnail (bug may be in  OIIO)
* Packed images are not supported
* We do not write PSD files.

Note: old Blenders have support for PSD via Quicktime library. But due
to license issues this was discontinued.

Many thanks for Brecht van Lommel for reviewing the patch, suggesting
multiple improvements and to help solving the alpha issue.
2013-10-08 21:17:24 +00:00
Antony Riakiotakis
3e0722328e The usual fix for blenderplayer. I didn't have time to test scons but looks like the missing library on CMake is already present there. 2013-05-13 20:42:18 +00:00
Mitchell Stokes
e5bbf2441a BGE: Tweaking the linking order of the Blenderplayer (CMake) to avoid needing to put BLI code in stubs.c. This fixes an infinite loop with the Edge Split modifier in the Blenderplayer. SCons still has to be tested. 2013-05-13 02:49:18 +00:00
Sergey Sharybin
32faec1a53 Remplace bunch of annoying ifdefs in tracking.c with a libmv-capi_stub.cc
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.
2013-05-12 22:17:37 +00:00
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
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
Sergey Sharybin
4cf9034f6d Remove extern_ssba workaround
SSBA seemed to be working OK last time i've checked it
with MSVC and optimization enabled.

Also, we'll likely replace it with own BA soon, which
works fine with MSVC anyway.
2013-02-22 10:06:54 +00:00
Sergey Sharybin
e55848179a Fix for blenderplayer build after recent motrack changes 2013-02-20 13:03:14 +00:00
Sergey Sharybin
7dc33e3ef8 Move opencl and reigidbody from source/blender/ to intern/
This modules does not depend on any blender-specific data
structures or algorithms and due to our policy better be
placed to intern/

Shall be no functional changes, tested CMake and SCons on
Linux, hopefully other platforms will work as well.

P.S. SVN history shall be preserved for the files.
2013-02-01 06:24:49 +00:00
Sergej Reich
5c85deb285 rigidbody: Add rigidbody module
It's mostly a C API for bullet that interfaces nicely with blender.
It could act as a generic interface for rigid body simulations but right
now it's very specific to bullet.

TODO: Fix building without bullet.

Part of GSoC 2010 and 2012.
Authors: Joshua Leung (aligorith), Sergej Reich (sergof)
2013-01-23 05:56:13 +00:00
Nicholas Bishop
a8811094ea Import the RangeTree library into extern
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.
2012-12-30 18:20:52 +00:00
Campbell Barton
d3d5c57c32 move source/darwin into release/darwin since these files are for osx packaging. 2012-11-18 07:41:38 +00:00
Bastien Montagne
5ff3017900 Replacing gettext i18n backend by boost::locale one.
This commit adds a small and simplistic C wrapper around boost's locale library as intern/locale, and heavily simplifies/reduces Blender's own i18n code (under blenfont/ dir). And it adds back UI translation on windows' official builds (with msvc)!

Note to platform maintainers: iconv and gettext (libintl) can now be removed from precompiled libs (not gettext binaries, under windows, of course ;) ).

Note to MinGW32/64 users: boost_locale lib has not yet been uploaded for those build env, please disable WITH_INTERNATIONAL for now (hopefully will be fixed very soon, have contacted psy-fy).
2012-11-11 16:54:26 +00:00
Alexander Pinzon
87108a7bc6 Solved the problem when WITH_PLAYER activated.
blenderplayer had not added the library Opennl, was added to the CMakeLists.txt file.
2012-10-24 19:24:55 +00:00
Campbell Barton
226a5ee834 remove LOD_Decimator (c++ decimator), now replaced by bmesh decimator. also remove CTR c++ classes that are no longer used. 2012-10-22 02:39:26 +00:00
Sergey Sharybin
a73dd3476e Color Management, Stage 2: Switch color pipeline to use OpenColorIO
Replace old color pipeline which was supporting linear/sRGB color spaces
only with OpenColorIO-based pipeline.

This introduces two configurable color spaces:

- Input color space for images and movie clips. This space is used to convert
  images/movies from color space in which file is saved to Blender's linear
  space (for float images, byte images are not internally converted, only input
  space is stored for such images and used later).

  This setting could be found in image/clip data block settings.

- Display color space which defines space in which particular display is working.

  This settings could be found in scene's Color Management panel.

When render result is being displayed on the screen, apart from converting image
to display space, some additional conversions could happen.

This conversions are:

- View, which defines tone curve applying before display transformation.
  These are different ways to view the image on the same display device.
  For example it could be used to emulate film view on sRGB display.

- Exposure affects on image exposure before tone map is applied.

- Gamma is post-display gamma correction, could be used to match particular
  display gamma.

- RGB curves are user-defined curves which are applying before display
  transformation, could be used for different purposes.

All this settings by default are only applying on render result and does not
affect on other images. If some particular image needs to be affected by this
transformation, "View as Render" setting of image data block should be set to
truth. Movie clips are always affected by all display transformations.

This commit also introduces configurable color space in which sequencer is
working. This setting could be found in scene's Color Management panel and
it should be used if such stuff as grading needs to be done in color space
different from sRGB (i.e. when Film view on sRGB display is use, using VD16
space as sequencer's internal space would make grading working in space
which is close to the space using for display).

Some technical notes:

- Image buffer's float buffer is now always in linear space, even if it was
  created from 16bit byte images.

- Space of byte buffer is stored in image buffer's rect_colorspace property.

- Profile of image buffer was removed since it's not longer meaningful.

- OpenGL and GLSL is supposed to always work in sRGB space. It is possible
  to support other spaces, but it's quite large project which isn't so
  much important.

- Legacy Color Management option disabled is emulated by using None display.
  It could have some regressions, but there's no clear way to avoid them.

- If OpenColorIO is disabled on build time, it should make blender behaving
  in the same way as previous release with color management enabled.

More details could be found at this page (more details would be added soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management

--
Thanks to Xavier Thomas, Lukas Toene for initial work on OpenColorIO
integration and to Brecht van Lommel for some further development and code/
usecase review!
2012-09-15 10:05:07 +00:00
Campbell Barton
47e313ec0c cmake option to build without iksolver 2012-08-18 13:36:29 +00:00
Sergey Sharybin
f05257f969 Remove redundant referenced to bf_intern_bop 2012-08-09 09:36:53 +00:00
Sergey Sharybin
1a5998bc4e Remove old boolean operation module
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.
2012-08-02 16:42:30 +00:00
Campbell Barton
263be14811 rename WITH_BUILTIN_GLEW, WITH_SYSTEM_GLEW & negate. 2012-06-23 13:42:14 +00:00
Sergey Sharybin
59ef51aa27 Initial Ceres integration into Blender
Currently only put sources of Ceres library into extern/libmv/third_party and
setup CMake and SCons building systems.

Integration details:

- Even CMake build files are not re-used from Ceres's trunk: they're using some
  automatic stuff detection like glog, pthreads, protobuf and so and it's not
  so clear how to re-use that files without modifications.
  And IMO it's easier if build files are getting re-generated automatically to
  match Blender-specific setup rather than keeping changes made locally in
  Blender in sync when re-bundling Ceres library. Especially in case when it's
  already needed to support SCons build system.
- Integrated only actual sources, all tests were stripped. Probably it'll be nice
  to have them, but they'll need clear integration with current module test stuff
  in Blender.
- Suitesparse was disabled. It'll help a lot having it, but there are some difficulties
  making cholmod working fine on windows. Would be added in future
- collections_port.cc was also stripped. It's not used by Ceres's upstream and
  it gives compilation error (undefined uint32 -- looks like namespace issue).
- Currently all schur eliminators are included. Not sure if it makes sense,
  also not sure if it makes sense having them switchable on and off -- IMO better
  to have single configuration which works and does not require special tweaks
  after everything was set up.

To bundle updated version of Ceres:
- Go to extern/libmv/third_party/ceres folder
- Run ./bundle.sh

This will checkout fresh Ceres snapshot of Windows branch (which is currently
most interesting from integration into Blender POV), apply all patches listed
in patches/series and copy needed files into Blender's working copy. This will
also re-generate CMake/SCons build rules.

If you'll need extra files from Ceres repository which are not present in
Blender, you'll need to copy them manually and then run ./mkfiles.sh from
extern/libmv/third_party/ceres folder which will update list of files used
by Blender.

Thanks to Leir Mierle and Sameer Agarwal (and all others who helped developing
Ceres) this library and thanks to Keir Mierle with help integrating it into Blender!
2012-06-10 15:27:41 +00:00
Mitchell Stokes
8beea054f7 Fixing some potential heap corruption issues in the Blenderplayer when it is built with CMake. This fix forces Blender and the Blenderplayer to use the same SDNA, since inconsistencies between Blender's and the Blenderplayer's SDNA is what lead to the corruption issues. 2012-06-07 01:44:22 +00:00
Campbell Barton
68a9dd54ec mask mode for clip editor developed by Sergey Sharybin, Pete Larabell and myself.
see:
http://wiki.blender.org/index.php/User:Nazg-gul/MaskEditor


note - mask editing tools need continued development, feather option is not working 100%
2012-06-04 16:42:58 +00:00
Campbell Barton
0b7593a3dc finish cleanup for plugins 2012-05-29 10:31:42 +00:00
Campbell Barton
d4b6927179 remove NULL check in TREESTORE macro, the return NULL value wasny checked for by any callers (ie - it would crash later if the arg was NULL anyway)
also comment on the speed of check_persistent()
2012-05-27 14:43:18 +00:00
Antony Riakiotakis
b06f238bb0 Fix blenderplayer utf8 cmake for MinGW (linking order matters for gcc) 2012-03-21 12:35:39 +00:00
Alexander Kuznetsov
c2531e47b6 Fix for compiling bplayer on cmake/win after adding utf support.
Reported by Miika
2012-03-20 23:10:46 +00:00
Antony Riakiotakis
bb5e545bf4 Fix blenderplayer linking with recent additions to bmesh python. We should really start building with player on so that mistakes like this can be detected early. 2012-02-22 18:57:17 +00:00
Campbell Barton
379527581b svn merge ^/trunk/blender -r44204:44213 2012-02-17 21:07:18 +00:00
Sergey Sharybin
c628f04a7c - Fixed linking errors of blender player with CMake and XDND enabled
- Rest of changes to make XDND switch-off-able: link against extern_xdnd only
  if XDND is enabled
2012-02-17 20:59:21 +00:00
Campbell Barton
bbe69705a5 svn merge ^/trunk/blender -r43420:43436 2012-01-17 02:20:23 +00:00
Sergey Sharybin
f075f2babb Corrected fix for linking issues with blenderplayer enabled 2012-01-16 18:49:10 +00:00
Sergey Sharybin
de50e6324a Fix for compilation error using cmake+msvc 2012-01-16 18:24:30 +00:00
Campbell Barton
063dd4f60a svn merge ^/trunk/blender -r42197:42221 2011-11-28 17:09:13 +00:00
Antony Riakiotakis
911be02fcd remove duplicate extern_colamd from blenderplayer cmake 2011-11-28 08:38:08 +00:00
Campbell Barton
cb890a49fb svn merge ^/trunk/blender -r41602:41638 . 2011-11-08 02:57:28 +00:00
Sergey Sharybin
27d42c63d9 Camera tracking integration
===========================

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.
2011-11-07 12:55:18 +00:00
Campbell Barton
94f8e3198d svn merge -r41266:41287 ^/trunk/blender 2011-10-26 03:26:52 +00:00
Campbell Barton
15e6d6cd75 svn merge ^/trunk/blender -r41226:41227 . 2011-10-24 12:43:08 +00:00
Campbell Barton
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Campbell Barton
4a157de23d svn merge ^/trunk/blender -r40587:40643 2011-09-28 07:34:48 +00:00
Jens Verwiebe
7ba71fff8c OSX: fix player bundle_creation 2011-09-27 10:51:57 +00:00
Campbell Barton
effea8c29b svn merge ^/trunk/blender -r40511:40587 2011-09-27 03:12:31 +00:00
Dalai Felinto
aeafb960b1 OSX - cmake: blenderplayer part 2: Jens Verwiever co-patch
Using OSX Bundle (in oppose to Blender dummy .app) as start point for binary.
That way we don't need to move the blenderplayer after the bundle is finished and we can rebuild it without doing `make install`
I will test more tomorrow, but it should be working now
2011-09-26 07:54:30 +00:00
Campbell Barton
0383fb5341 svn merge -r40104:40117 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-09-11 08:28:16 +00:00
Dalai Felinto
ff04beb3e4 partial fix for blenderplayer linking problems (decast retour)
This fix the problem of linking the extern components for the KX module.
The remaining linking issues are related to actual bad level access so the fix is a bit more complex.

Remaining linking issues (osx cmake gcc)
###########
Undefined symbols:
  "_buildNavMeshDataByDerivedMesh", referenced from:
      KX_NavMeshObject::BuildVertIndArrays(float*&, int&, unsigned short*&, int&, unsigned short*&, float*&, int&, unsigned short*&, int&, int&)in libge_logic_ketsji.a(KX_NavMeshObject.cpp.o)
      _applyModifier in libbf_modifiers.a(MOD_navmesh.cpp.o)
  "_polyIsConvex", referenced from:
      _applyModifier in libbf_modifiers.a(MOD_navmesh.cpp.o)
  "_polyNumVerts", referenced from:
      KX_NavMeshObject::BuildVertIndArrays(float*&, int&, unsigned short*&, int&, unsigned short*&, float*&, int&, unsigned short*&, int&, int&)in libge_logic_ketsji.a(KX_NavMeshObject.cpp.o)
  "_polyFindVertex", referenced from:
      KX_NavMeshObject::BuildVertIndArrays(float*&, int&, unsigned short*&, int&, unsigned short*&, float*&, int&, unsigned short*&, int&, int&)in libge_logic_ketsji.a(KX_NavMeshObject.cpp.o)
      KX_NavMeshObject::BuildVertIndArrays(float*&, int&, unsigned short*&, int&, unsigned short*&, float*&, int&, unsigned short*&, int&, int&)in libge_logic_ketsji.a(KX_NavMeshObject.cpp.o)
      KX_NavMeshObject::BuildVertIndArrays(float*&, int&, unsigned short*&, int&, unsigned short*&, float*&, int&, unsigned short*&, int&, int&)in libge_logic_ketsji.a(KX_NavMeshObject.cpp.o)
############
2011-09-11 08:21:26 +00:00
Campbell Barton
fc95382a97 svn merge -r38400:38500 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-07-26 03:55:23 +00:00
Campbell Barton
cadfac5a0f svn merge -r38000:38200 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-07-25 17:51:30 +00:00
Campbell Barton
97d0846d2c svn merge -r37335:37500 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-07-24 13:03:48 +00:00