Commit Graph

1047 Commits

Author SHA1 Message Date
Sergey Sharybin ac6d91b939 Be ready for changes in bf-translations repository
Made it so if there's release/datafiles/locale/po
folder, then all the .po files will be converted
to .mo at blender compile time and installed to
an appropriate location.

Uses small own implementation msgfmt which is
based on msgfmt.py from Python project, but also
supports contexts.

There's no functional changes for until we've
switched to use source .po files instead of
pre-compiled .mo.

P.S. Well, there's one change which is msgfmt.cc
     being compiled even if it's not used, but
     would rather not clutter code with checks
     since pretty soon we'll use this program
     anyway.
2013-11-08 20:44:48 +00:00
Sergey Sharybin 2010c6ad6c Made buildinfo aware of builds from GIT
- Use commit number since last annotated tag as a
  revision number replacement. It'll eb followed
  by 'M' symbol if there're local modification in
  the source tree.

- Commit short SHA1 is included. Helps getting
  information about commit used to build blender
  with much faster.

- If build is not done from master branch, this also
  will be noticed in the splash screen.

This commit also replaces revision stored in the
files with git-specific fields (change and hash).
This is kind of breaks compatibility, meaning
files which were saved before this change wouldn't
display any information about which revision they
were saved with. When we'll finally switch to git,
we'll see proper hash and change number since
previous release in the files, for until then
svn version will be used as a change number and
hash will be empty.

Not a huge deal, since this field was only used
by developers to help torubleshooting things and
isn't needed for blender itself.

Some additional tweaks are probably needed :)
2013-11-04 13:21:39 +00:00
Campbell Barton f9d5bccb06 code cleanup: spelling 2013-10-31 23:52:44 +00:00
Sergey Sharybin 4bd4037276 Lock-free memory allocator
Release builds will now use lock-free allocator by
default without any internal locks happening.

MemHead is also reduces to as minimum as it's possible.
It still need to be size_t stored in a MemHead in order
to make us keep track on memory we're requesting from
the system, not memory which system is allocating. This
is probably also faster than using a malloc's usable
size function.

Lock-free guarded allocator will say you whether all
the blocks were freed, but wouldn't give you a list
of unfreed blocks list. To have such a list use a
--debug or --debug-memory command line arguments.

Debug builds does have the same behavior as release
builds. This is so tools like valgrind are not
screwed up by guarded allocator as they're currently
are.

--
svn merge -r59941:59942 -r60072:60073 -r60093:60094 \
          -r60095:60096 ^/branches/soc-2013-depsgraph_mt
2013-10-10 11:58:01 +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
Campbell Barton f5eb880358 freeing mempool elements now fills freed memory with --debug for debug builds. 2013-10-03 14:44:33 +00:00
Irie Shinsuke e9859bb0e5 Don't install LICENSE-bmonofont-i18n.ttf.txt unless international fonts are enabled. 2013-09-25 19:18:28 +00:00
Sergey Sharybin 8917e63134 Add font licenses to installation files
So now release archive will have this files included.
2013-09-25 08:35:43 +00:00
Jens Verwiebe 3596ab932c OSX: Compilefix for ndof symbols get magled when used extern C, now use discrete c files embedded, patch by Jake Kauth 2013-09-13 15:18:17 +00:00
Campbell Barton 9e561a641e remove callback BLI_localErrorCallBack from scanfill, was here for years and only ever wrapped printf. 2013-08-28 02:14:24 +00:00
Campbell Barton 11aa7a76fa quiet warnings when building as a python module 2013-08-26 19:32:03 +00:00
Sergey Sharybin beffaa293e Made modifiers_getVirtualModifierList safe for threading
Move static variables to context filling in by this fcuntion
and owned by a callee function. This ensures no conflicts
between threads happens because of static variables used in
this function.

Also moved modifier types and virtual modifiers data to a
function called from creator. This is needed to be sure all
the information is properly initialied to the time when
threads starts to use this data.

--
svn merge -r57899:57900 ^/branches/soc-2013-depsgraph_mt
2013-08-19 09:05:34 +00:00
Jason Wilkins 4dfe00c802 _MSV_VER should be _MSC_VER 2013-07-21 17:16:04 +00:00
Brecht Van Lommel 1c01ad53d5 Remove SDL_VIDEODRIVER=dummy environment variable setting, this may interfere
with other applications launching SDL applications from Blender.

At the time this was added the game engine joystick code was unnecessarily
initializing the SDL video subsystem, and looking at the SDL source code that's
the only place this environment variable is read. That doesn't happen anymore,
though we do have WITH_GHOST_SDL now. But the environment variable is set after
GHOST has been initialized, otherwise this code would have actually broken that.
2013-07-04 11:28:52 +00:00
Campbell Barton 32d5b52f59 re-arrange '--help' output into more useful sections (added debug, python).
also minor style cleanup
2013-06-29 10:09:15 +00:00
Campbell Barton a050ddf279 remove unused callback 2013-06-26 03:42:45 +00:00
Campbell Barton 447e9a4cd5 add option to enable auto-execute scripts, but exclude certain directories. 2013-06-18 18:11:52 +00:00
Campbell Barton 970e9123b4 cmake: remove set_lib_path macro 2013-06-17 18:15:56 +00:00
Campbell Barton 412c043474 Python script auto-execution changes:
- script execution is off by default

- if a blend file attempts to execute a script
  this shows a message in the header with the action
  that was suppressed (script/driver/game-autostart) and 2 buttons to either reload the file trusted, or to ignore the message.

- the file selector will always default to use the trust setting in the user preferences,
  but reloading an open file will keep using the current setting (whatever was set before or set on the command-line).

- added SCons setting WITH_BF_PYTHON_SECURITY, this sets the default state for the user prefereces not to trust blend files on load.
  ... this option was in CMake before, but always off, now its enabled by default for SCons and CMake, and forced on in CMake for now.
2013-06-10 00:42:16 +00:00
Campbell Barton e7a487d1e9 code cleanup: group python reset functions in BPY_python_reset() 2013-06-09 23:31:53 +00:00
Sergey Sharybin 732c566f2f Fix #35587: Cycles: image movie to single image crashing
Crash was happening on windows platforms only and was caused
by some specifics about how CRT works.

Basically, blender and all of the .dll are compiled with /MT
flag, which means blender.exe and all .dll are using separate
environments. This makes it impossible to pass file descriptors
from blender to other dll, because it becomes invalid in the dll.

And this is exactly what was happening: OIIO was trying to open
movie file with all known plugins and one of them was zlib. And
the way OIIO was using zlib API is opening the file using Boost
and passing a file descriptor to zlib. And since zlib was a
dynamic library this lead to general issues using this descriptor
in zlib code.

Solved by linking to zlib statically. This allows to safely pass
file descriptor to zlib API. Alternative would be to compile all
the stuff with /MD flag, but that's much bigger and less robust
way to fix the issue.

Tested on windows using msvc2008, scons plus cmake both 32 and 64
bit versions. Seems to be working fine.

Further tweaks for mingw and msvc2012 could be needed tho.
2013-06-02 15:02:17 +00:00
Campbell Barton 7222d654b2 code cleanup: typo and stop manpage turning '$' into italic. 2013-05-25 02:21:50 +00:00
Sergey Sharybin 8360c14f14 Fix #35443: Animation player doesn't play some movie formats
Need to initialize FFmpeg for animation player.

This is a bit confusing, but the only way to do this
properly and clear is to call IMB_ffmpeg_init from
playback_mode command line callback.

This is because this callback is blocking and
"usual" FFmpeg initializetion (which happens after
command line parsing) was never called.

Could be switched to separate FFmpeg initializtion
and debug level set but let's keep simple for now.
2013-05-21 12:18:35 +00:00
Jürgen Herrmann b90108c108 CMakeLists.txt changes to use new static Jack libs with VC2012 2013-05-16 11:24:19 +00:00
Jürgen Herrmann 7b9a321a79 Patch for CMakeLists.txt to build with new OpenAL libs on VS2012.
Because of crashing issue with old Creative Labs OpenAL on Windows 8 x64.
2013-05-15 11:26:57 +00:00
Jürgen Herrmann d70497cefc Patch to CMake build system.
Install needed dlls for libjack.
2013-05-14 19:08:45 +00:00
Jürgen Herrmann 44dfc76154 CMake build system update
- Extending CMakeLists.txt to support builds with VC2012.
- Fix some typo in CMakeLists.txt
- Introduces experimental WITH_AVX_CPU to build with /arch:AVX (VC11 only)
2013-05-14 16:16:25 +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
Brecht Van Lommel a07dcd67eb Fix #35240: command line -t number of threads option did not work for cycles.
Now it works for blender internal, cycles and other multithreading code in
Blender in both background and UI mode.
2013-05-08 13:23:17 +00:00
Brecht Van Lommel f39464870c Attempt to fix #35228: hide a few LLVM symbols that are not in the llvm namespace
to try to avoid conflicts with Mesa GL llvmpipe on linux.
2013-05-06 09:44:56 +00:00
Sergey Sharybin 685e9b83c2 Fix for --debug-ffmpeg not giving enough information 2013-04-29 16:03:21 +00:00
Campbell Barton 03905043c6 minor changes to get numpy working with locally bundled python.
- enable site-packages for bundled python distrobution, py3.2 had a problem where it would try to parse headers we didnt include, but its resolved now.
- workaround for glitch I was having on arch-linux where lib64 would be be used for the bundled python directory when it was just a symlink.
2013-04-23 13:51:20 +00:00
Ton Roosendaal 53bb59f209 Accidentally left in test function. All's fine now! 2013-04-13 14:15:16 +00:00
Antony Riakiotakis 9e8047d37b Fix compilation, ifdef test_file just in case it is useful for later. 2013-04-13 14:05:31 +00:00
Ton Roosendaal d867cefa32 Bug fix #34896
The feature "Keep Session" was also loading that session when you double-click
on a .blend to open it, or when a .blend file was on commandline.

Moved this feature to the main() in creator.c, so it can check on it properly, skipping the
kept session when a file was loaded.
2013-04-13 12:03:20 +00:00
Campbell Barton a4520320ef fix [#34900] Building blender as a python module is broken in trunk
patch provided by reporter - Martijn Berger (juicyfruit)

also quiet warnings for headless mode.
2013-04-08 05:01:35 +00:00
Campbell Barton 83fff218cc svn merge ^/trunk/blender -r55700:55776 2013-04-04 13:37:07 +00:00
Campbell Barton 7bbaf4853a code cleanup: use bools in UI and WM code, quiet some shadow warnings, remove unused function uiEmboss() 2013-04-04 02:05:11 +00:00
Tamito Kajiyama 5524ed9ba2 Merged changes in the trunk up to revision 55700.
Conflicts resolved:
source/blender/editors/mesh/mesh_intern.h
2013-04-01 13:47:19 +00:00
Antony Riakiotakis eab20832d9 Fix typo with non-system bullet. 2013-03-28 00:58:50 +00:00
Tamito Kajiyama 385c72f5f2 Merged changes in the trunk up to revision 55546.
Conflicts resolved:
source/blenderplayer/bad_level_call_stubs/SConscript

Partly reverted changes to intern/cycles/blender/addon/ui.py in revision 52899
to make it easier to merge trunk changes.
2013-03-24 12:13:13 +00:00
Campbell Barton a79e10157d code cleanup: use NULL rather then 0 for pointers, and make vars static where possible.
also found unintentionally defined enum/struct variables that where only meant to be defining the type.
2013-03-22 05:34:10 +00:00
Campbell Barton 3966722057 code cleanup: misc warnings/style 2013-03-21 02:58:21 +00:00
Antony Riakiotakis 526d79d688 Fix: jittered brushes are not jittered, reported by kursad karatas.
Issue is sharing using global random generator which is shared with
particle system which resets the seed due to some scene/option
combination. Since it may be desirable to get predictable results with
particles, made sure brushes allocate their own random number generator
on startup and use that for jittering.
2013-03-19 14:25:12 +00:00
Tamito Kajiyama c1ceab1281 Merged changes in the trunk up to revision 55357.
Resolved conflicts:
release/datafiles/startup.blend
source/blender/editors/space_nla/nla_buttons.c

Also updated source/blender/blenkernel/intern/linestyle.c as a follow-up of
recent changes for the use of bool.
2013-03-18 00:48:59 +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
Tamito Kajiyama 66a2b84897 Merged changes in the trunk up to revision 54992.
Resolved conflicts:
release/scripts/startup/bl_ui/space_view3d.py
2013-03-03 15:07:49 +00:00
Campbell Barton 646b947cc3 fix for linking with recent armature refactor, was also missing file from CMakeLists.txt. 2013-02-28 00:45:07 +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
Tamito Kajiyama d120ec146d Merged changes in the trunk up to revision 54802. 2013-02-24 03:39:20 +00:00