blender.git
3 years agoLibmv: Solve strict compiler warnings in stubs
Sergey Sharybin [Thu, 14 Jan 2016 10:56:05 +0000 (15:56 +0500)]
Libmv: Solve strict compiler warnings in stubs

3 years agoAdd compression modes for TIFF images
Quentin Wenger [Thu, 14 Jan 2016 10:02:13 +0000 (15:02 +0500)]
Add compression modes for TIFF images

This patch aims at providing multiple compression modes for TIFF output,
particularly uncompressed mode.

At this moment  have None, Deflate, LZW and Pack Bits modes been integrated,
mimicking The GIMP export modes (except JPEG mode, which returned encoding
errors).

More modes could be added if needed.

Default remains Deflate.

Reviewers: campbellbarton, mont29, sergey

Differential Revision: https://developer.blender.org/D1709

3 years agoCycles: Tweak inline policy for some functions
Sergey Sharybin [Thu, 14 Jan 2016 09:53:05 +0000 (14:53 +0500)]
Cycles: Tweak inline policy for some functions

The goal is to make Experimental kernel closer in performance to the
official kernel, avoiding spills and such.

There should not be big impact on official kernel, own tests showed
few percent performance drop on laptop's GPU. CPU was always the
same speed on AVX, AVX2 and SSE4.1 CPUs i've been testing here.

This seems to be the last essential step before we can get rid of
Experimental kernel and enable SSS officially on GPU without causing
some major performance issues.

Surely some more tweaks are possibly required, but that we can do
for until cows go home anyway.

3 years agoCycles: Reduce scope of some defines set in CMakeLists
Sergey Sharybin [Tue, 12 Jan 2016 15:50:43 +0000 (20:50 +0500)]
Cycles: Reduce scope of some defines set in CMakeLists

Should be no functional changes at all, just speeds up re-compilation
when some features needs to be disabled for development purposes.

For example, when running lots of Valgrind it's handy to disable any
GPU devices because otherwise you'll be wasting quite some time in
the driver while enumerating devices.

Reviewers: dingto, lukasstockner97, brecht, juicyfruit

Differential Revision: https://developer.blender.org/D1730

3 years agoFix typo in image editor grease pencil panel
Campbell Barton [Thu, 14 Jan 2016 07:59:05 +0000 (18:59 +1100)]
Fix typo in image editor grease pencil panel

3 years agoFix image save ignoring options
Campbell Barton [Thu, 14 Jan 2016 07:51:48 +0000 (18:51 +1100)]
Fix image save ignoring options

Saving an image didn't un-set previously enabled options.
(saving 16bit png as 8 bit didn't work for eg).

3 years agoCMake: Silence messages about unordered map and shared pointer on second run
Sergey Sharybin [Thu, 14 Jan 2016 07:57:58 +0000 (12:57 +0500)]
CMake: Silence messages about unordered map and shared pointer on second run

This variables are being cached anyway and can only be changed on first run,
no need to keep reporting them again and again.

3 years agoCMake: Fix typo in CUDA dynload commit
Sergey Sharybin [Thu, 14 Jan 2016 07:48:14 +0000 (12:48 +0500)]
CMake: Fix typo in CUDA dynload commit

3 years agoCMake: Add additional search path for OpenSubdiv
Sergey Sharybin [Thu, 14 Jan 2016 07:46:01 +0000 (12:46 +0500)]
CMake: Add additional search path for OpenSubdiv

This patch will match where install_deps puts OpenSubdiv.

3 years agoinstall_deps: Cleanup, delete trailing whitespace
Sergey Sharybin [Thu, 14 Jan 2016 07:44:47 +0000 (12:44 +0500)]
install_deps: Cleanup, delete trailing whitespace

Based on patch D1644 by Jeffrey Hoover

3 years agoCMake: De-duplicate checks around unordered maps and shared pointer
Sergey Sharybin [Thu, 14 Jan 2016 07:38:46 +0000 (12:38 +0500)]
CMake: De-duplicate checks around unordered maps and shared pointer

Previously several areas were calling TEST_SHARED_PTR_SUPPORT and
TEST_UNORDERED_MAP_SUPPORT which isn't that bad on it's own but
was causing some quite verbose output with same information line
printed multiple times. additionally, what's more worse, define flags
for Ceres were duplicated in main CMakeLists and Ceres's CMakeLists.

Now we've got a single place where checks for those classes are
happening and other areas are simply checking for variables set by
those check macros, keeping CMake output clean and nice.

3 years agoCycles: Add option to directly link against CUDA libraries
Sergey Sharybin [Thu, 14 Jan 2016 07:24:09 +0000 (12:24 +0500)]
Cycles: Add option to directly link against CUDA libraries

The main purpose of such linking is to make Blender compatible with
NVidia's debuggers and profilers which are doing some LD_PRELOAD
magic to intercept some function calls. Such magic conflicts with
our CUDA wrangler magic and causes segmentation faults.

The option is disabled by default, so there's no affect on any of
artists.

In order to make Blender linked directly against CUDA library use
the WITH_CUDA_DYNLOAD CMake option (it's marked as advanced).

3 years agoWeight Painting: Respect locks w/ auto-normalize
Campbell Barton [Thu, 14 Jan 2016 04:16:55 +0000 (15:16 +1100)]
Weight Painting: Respect locks w/ auto-normalize

3 years agoFix weight paint normalizing w/ locked groups
Campbell Barton [Thu, 14 Jan 2016 03:05:15 +0000 (14:05 +1100)]
Fix weight paint normalizing w/ locked groups

Reported as part of T47123

Checks for locked groups assumed auto-normalize
and would distribute wight between groups even with auto-normalize disabled.

3 years agoFix incorrect weight normalize w/ locks
Campbell Barton [Thu, 14 Jan 2016 02:43:26 +0000 (13:43 +1100)]
Fix incorrect weight normalize w/ locks

D1712 by @angavrilov

3 years agoCorrect NULL checks in recent weight-paint fix
Campbell Barton [Thu, 14 Jan 2016 02:19:07 +0000 (13:19 +1100)]
Correct NULL checks in recent weight-paint fix

3 years agoCleanup: use const qualifier in makesdna
Campbell Barton [Thu, 14 Jan 2016 02:00:49 +0000 (13:00 +1100)]
Cleanup: use const qualifier in makesdna

3 years agoCleanup: use BM_mesh_* prefix for BMesh functions
Campbell Barton [Thu, 14 Jan 2016 02:00:11 +0000 (13:00 +1100)]
Cleanup: use BM_mesh_* prefix for BMesh functions

3 years agoUI: show error when pasting fails
Campbell Barton [Thu, 14 Jan 2016 01:53:42 +0000 (12:53 +1100)]
UI: show error when pasting fails

3 years agoFix T47170: Sculpt w/ constructive modifier crash
Campbell Barton [Wed, 13 Jan 2016 23:04:24 +0000 (10:04 +1100)]
Fix T47170: Sculpt w/ constructive modifier crash

Regression in 4d33c37c9

Only copy normal arrays from sculpt to the DerivedMesh when the mesh is deformed.

Constructive modifiers calculate their own normals.

3 years agoAdd object & pose-mode select more/less menus
Campbell Barton [Wed, 13 Jan 2016 22:41:11 +0000 (09:41 +1100)]
Add object & pose-mode select more/less menus

Exposes object parent/child select, which wasn't in any menus.

3 years agoAdd object mode select more/less
Campbell Barton [Wed, 13 Jan 2016 22:38:26 +0000 (09:38 +1100)]
Add object mode select more/less

Simple operator that selects using parent/child links.

3 years agoBI "Real Sky" option works incorrectly for environment texture.
Alexander Romanov [Wed, 13 Jan 2016 08:38:48 +0000 (11:38 +0300)]
BI "Real Sky" option works incorrectly for environment texture.

How to check?

1) Set Rendered mode for 3d View
2) Set "Blend Sky" and "Real Sky" flags for world.
Rotate view you will see right color blending from Horizon to Zenith color.
3) Add environment texture
Rotate view and you will see incorrect texture mapping that is not correspond to color blending that was observed in previous step.

So I conclude that this is a bug.

This issue must be solved before the patch D1414 because BI behavior is the viewport target.

Example: {F273051}

Alexander (Blend4Web Team)

Reviewers: sergey

Reviewed By: sergey

Subscribers: Evgeny_Rodygin, AlexKowel, yurikovelenov

Differential Revision: https://developer.blender.org/D1729

3 years agoUse const qualifier in do_sky_tex
Sergey Sharybin [Wed, 13 Jan 2016 08:18:41 +0000 (13:18 +0500)]
Use const qualifier in do_sky_tex

Will be needed for D1729.

3 years agoRemove outdated assert
Campbell Barton [Wed, 13 Jan 2016 04:11:46 +0000 (15:11 +1100)]
Remove outdated assert

3 years agoPolyfill2d: improve sweep clipping logic
Campbell Barton [Wed, 13 Jan 2016 02:49:34 +0000 (13:49 +1100)]
Polyfill2d: improve sweep clipping logic

Now only reverse the fill direction when reaching a non-concave corner.
Gives ~4x speedup here in tests with complex ngon.

3 years agoFinal OMP -> BLI_task commit for sculpt code.
Bastien Montagne [Tue, 12 Jan 2016 18:56:59 +0000 (19:56 +0100)]
Final OMP -> BLI_task commit for sculpt code.

3 years agoBMesh: select next can now step over existing selection
Campbell Barton [Tue, 12 Jan 2016 17:05:27 +0000 (04:05 +1100)]
BMesh: select next can now step over existing selection

3 years agoAdd bmesh.select_history.discard
Campbell Barton [Tue, 12 Jan 2016 17:03:47 +0000 (04:03 +1100)]
Add bmesh.select_history.discard

Follows convention for set, useful to avoid error handling with remove().

3 years agoFix os.path.is_subdir w/ trailing slash
Campbell Barton [Tue, 12 Jan 2016 15:58:53 +0000 (02:58 +1100)]
Fix os.path.is_subdir w/ trailing slash

3 years agoCycles: Use proper primitive for the motion subsurface refine
Sergey Sharybin [Tue, 12 Jan 2016 12:09:29 +0000 (17:09 +0500)]
Cycles: Use proper primitive for the motion subsurface refine

3 years agoCycles: Use special debug panel to fine-tune debug flags
Sergey Sharybin [Tue, 12 Jan 2016 11:00:48 +0000 (16:00 +0500)]
Cycles: Use special debug panel to fine-tune debug flags

This panel is only visible when debug_value is set to 256 and has no
affect in other cases. However, if debug value is not set to this
value, environment variables will be used to control which features
are enabled, so there's no visible changes to anyone in fact.

There are some changes needed to prevent devices re-enumeration on
every Cycles session create.

Reviewers: juicyfruit, lukasstockner97, dingto, brecht

Reviewed By: lukasstockner97, dingto

Differential Revision: https://developer.blender.org/D1720

3 years agoFix T47164: [Scene.raycast] - True result when it should be False.
Bastien Montagne [Tue, 12 Jan 2016 08:37:56 +0000 (09:37 +0100)]
Fix T47164: [Scene.raycast] - True result when it should be False.

We cannot use FLT_MAX as initi distance for raycast...

Renamed TRANSFORM_DIST_MAX_RAY to BVH_RAYCAST_DIST_MAX, moved it into BLI_kdopbvh,
and use in RNA raycast callbacks (and all other places using that API).

3 years agoSupport for copy/paste groups
Campbell Barton [Mon, 11 Jan 2016 19:31:50 +0000 (06:31 +1100)]
Support for copy/paste groups

Developer node, now bases are instanced by give_base_to_objects,
needed for correct OB_FROMGROUP base-flag assignment.

3 years agoCycles: Always inline triangle precalc for CUDA devices
Sergey Sharybin [Mon, 11 Jan 2016 16:40:12 +0000 (21:40 +0500)]
Cycles: Always inline triangle precalc for CUDA devices

Since the SSS changes compiling Experimental sm_52 kernel seems
to work just fine.

3 years agoCycles: Fix for SSS objects being black when combined with motion blur
Sergey Sharybin [Mon, 11 Jan 2016 16:15:09 +0000 (21:15 +0500)]
Cycles: Fix for SSS objects being black when combined with motion blur

3 years agoFix T47147: small particles incorrectly rendered as large particles (particle size...
Bastien Montagne [Mon, 11 Jan 2016 16:01:09 +0000 (17:01 +0100)]
Fix T47147: small particles incorrectly rendered as large particles (particle size influenced by texture).

In fact, code would behave strangely here with any negative value, applying a 'wrapped positive clamping'
(comes from original 2.5 commit feature, rBfafbd9d71b95776d1c7583476de74fccefab7f10)...

This commit is conservative - it keeps same behavior for all particle properties affected by textures,
except for size and length, where we apply a real [0, 1] clamping.

Easy to change in future in case new odd cases popup.

3 years agoFix tip about hair grid display (was copy/paste from hair guides one...).
Bastien Montagne [Mon, 11 Jan 2016 11:41:45 +0000 (12:41 +0100)]
Fix tip about hair grid display (was copy/paste from hair guides one...).

3 years agoCleanup: use Linux line ends!!!
Bastien Montagne [Mon, 11 Jan 2016 11:40:08 +0000 (12:40 +0100)]
Cleanup: use Linux line ends!!!

3 years agoFix T47148: Hair grid dos not work.
Bastien Montagne [Mon, 11 Jan 2016 11:35:19 +0000 (12:35 +0100)]
Fix T47148: Hair grid dos not work.

Actually, it was the whole 'cloth' simulation of hairs that was broken,
since grid data could not be initialized correctly.

Stupid mistake from looptri conversion, rBc582e186d90291a19a4e404111c492f1fd2c41a4

3 years agoUpdate add-on descriptions
Campbell Barton [Mon, 11 Jan 2016 09:28:42 +0000 (20:28 +1100)]
Update add-on descriptions

Also replace addon -> add-on

3 years agoUI: Move checkbox for toggling addons to the LHS
Campbell Barton [Mon, 11 Jan 2016 09:22:14 +0000 (20:22 +1100)]
UI: Move checkbox for toggling addons to the LHS

Without this, its a little annoying to expand, then enable an addon.
This matches panel headers too.

3 years agoBah, forgot to increase boost magic number...
Bastien Montagne [Mon, 11 Jan 2016 08:57:32 +0000 (09:57 +0100)]
Bah, forgot to increase boost magic number...

3 years agoinstall_deps: add wave to boost built modules, seems needed by OSL1.6.9...
Bastien Montagne [Mon, 11 Jan 2016 08:54:12 +0000 (09:54 +0100)]
install_deps: add wave to boost built modules, seems needed by OSL1.6.9...

3 years agoinstall_deps: fix typo preventing installation of libsndfile on Fedora-like distro.
Bastien Montagne [Mon, 11 Jan 2016 08:23:31 +0000 (09:23 +0100)]
install_deps: fix typo preventing installation of libsndfile on Fedora-like distro.

3 years agoFix T47158: Labels w/ icons use button text color
Campbell Barton [Mon, 11 Jan 2016 08:35:39 +0000 (19:35 +1100)]
Fix T47158: Labels w/ icons use button text color

Icon buttons with text labels now use the same color as labels.

This was causing problems with theming since there was no way to set color
for all labels without also changing button text color.

3 years agoError in last commit (assumed mirror existed)
Campbell Barton [Mon, 11 Jan 2016 07:37:45 +0000 (18:37 +1100)]
Error in last commit (assumed mirror existed)

3 years agoFix T47152: Normalize fails w/ mirror group
Campbell Barton [Mon, 11 Jan 2016 06:36:55 +0000 (17:36 +1100)]
Fix T47152: Normalize fails w/ mirror group

When the mirrored vertex group was created on the first stroke,
the mirrored weight failed to normalize.

aused by the valid vgroup map being created before adding the mirror vertex group.

3 years agoFix T47154: Sequencer add/subtract ignored alpha
Campbell Barton [Mon, 11 Jan 2016 05:08:34 +0000 (16:08 +1100)]
Fix T47154: Sequencer add/subtract ignored alpha

3 years agoFix error in white-balance w/ float buffer
Campbell Barton [Mon, 11 Jan 2016 03:59:18 +0000 (14:59 +1100)]
Fix error in white-balance w/ float buffer

3 years agoFix memory & file-handle leak w/ custom data write
Campbell Barton [Mon, 11 Jan 2016 02:14:30 +0000 (13:14 +1100)]
Fix memory & file-handle leak w/ custom data write

3 years agoFix T47101 - Grease Pencil eraser doesn't work when activated using D+RMB when using...
Joshua Leung [Mon, 11 Jan 2016 02:11:07 +0000 (15:11 +1300)]
Fix T47101 - Grease Pencil eraser doesn't work when activated using D+RMB when using a tablet

When using D+RMB using a tablet (e.g. holding down the side button of the stylus
while hovering it over the surface of the tablet) to erase, the tablet would
report zero-pressure. This causes problems when using the new pressure-sensitive
Grease Pencil eraser, causing it to have no effect.

3 years agoReport errno string when writing files fails
Campbell Barton [Mon, 11 Jan 2016 01:32:29 +0000 (12:32 +1100)]
Report errno string when writing files fails

Screenshot ignored errors, some render code printed 'Saved' without checking for failure.

note: errno is now cleared from IMB_saveiff so all callers don't need to.

3 years agoCleanup: use const image-format arg
Campbell Barton [Mon, 11 Jan 2016 01:01:08 +0000 (12:01 +1100)]
Cleanup: use const image-format arg

3 years agoWM: show file selector errors in header
Campbell Barton [Mon, 11 Jan 2016 00:29:08 +0000 (11:29 +1100)]
WM: show file selector errors in header

Was too easy to miss errors from the file selector, now show in the info header.

3 years agoFix GL regression from D1645
Campbell Barton [Mon, 11 Jan 2016 00:23:18 +0000 (11:23 +1100)]
Fix GL regression from D1645

Push/Pop mismatch caused GL_STACK_UNDERFLOW

3 years agoDNA: remove 'long' type
Campbell Barton [Sun, 10 Jan 2016 22:18:46 +0000 (09:18 +1100)]
DNA: remove 'long' type

Turns out even in files this was used, it was only for runtime members that are now ignored.

3 years agoDNA: print errors to stderr
Campbell Barton [Sun, 10 Jan 2016 21:51:27 +0000 (08:51 +1100)]
DNA: print errors to stderr

Wasn't showing error output in some cases.

Also reduce variable scope in calculate_structlen

3 years agoCleanup: warnings (misleading-indentation)
Campbell Barton [Sun, 10 Jan 2016 22:22:35 +0000 (09:22 +1100)]
Cleanup: warnings (misleading-indentation)

3 years agoCycles: Add utility funcs to UI code, to check GPU usage.
Thomas Dinges [Sun, 10 Jan 2016 20:50:44 +0000 (21:50 +0100)]
Cycles: Add utility funcs to UI code, to check GPU usage.

Can be useful sometimes, and we already have this for CPU. Required for
some further work here.

3 years agoOpenGL Smoke: fix color issue, and clarify meaning of variables in the shader.
Brecht Van Lommel [Sun, 10 Jan 2016 16:53:08 +0000 (17:53 +0100)]
OpenGL Smoke: fix color issue, and clarify meaning of variables in the shader.

3 years agoSmoke: fix for missing viewport color update.
Kévin Dietrich [Sun, 10 Jan 2016 10:37:34 +0000 (11:37 +0100)]
Smoke: fix for missing viewport color update.

Active color wasn't copied over if it differs from what the user plugged
in in the UI. Also use a darker color for the default color so smoke
doesn't doen't appear too bright.

Reported in IRC by mib2berlin.

3 years agoSome minor fixes from coverity reports.
Bastien Montagne [Sun, 10 Jan 2016 08:45:57 +0000 (09:45 +0100)]
Some minor fixes from coverity reports.

3 years agoOpenGL: port smoke drawing code to GLSL.
Kévin Dietrich [Sun, 10 Jan 2016 06:36:23 +0000 (07:36 +0100)]
OpenGL: port smoke drawing code to GLSL.

Beside the obvious ARB -> GLSL change, the texture slicing algorithm had
to be rewritten.

Although this new algorithm has the same behaviour as the old one (view
aligned slicing), it works with an arbitrary number of slices (which
could eventually be set by the user), which means we can preallocate the
buffer. The previous algorithm would slice from the begining to the end
of the volume's bbox, and draw the slices as it generates them.

Also support for ARB program was removed.

Patch by myself, with some minor fixes by Brecht.

Reviewers: brecht, #opengl_gfx

Differential Revision: https://developer.blender.org/D1694

3 years agoCycles: Fix Uninitialized Value compiler warning in the scoped_timer
Lukas Stockner [Sat, 9 Jan 2016 23:45:29 +0000 (00:45 +0100)]
Cycles: Fix Uninitialized Value compiler warning in the scoped_timer

Although the code made it impossible to use time_start_ uninitialized, at least GCC did
still produce multiple warnings about it.
Since time_dt() is an extremely cheap operation and functionality does not change in any way when
removing the check in the constructor, this commit removes the check and therefore the warning.

3 years agoCycles: Read Wave texture profile in the XML parser
Lukas Stockner [Sat, 9 Jan 2016 23:24:12 +0000 (00:24 +0100)]
Cycles: Read Wave texture profile in the XML parser

3 years agoCycles: Adding Hilbert Spiral as a tile order for rendering
Lukas Stockner [Sat, 9 Jan 2016 23:11:34 +0000 (00:11 +0100)]
Cycles: Adding Hilbert Spiral as a tile order for rendering

This patch adds the "Hilbert Spiral", a custom-designed continuous space-filling curve, as a tile order for rendering in Cycles.
It essentially works by dividing the tiles into tile blocks which are processed in a spiral outwards from the center. Inside each
block, the tiles are processed in a regular Hilbert curve pattern. By rotating that pattern according to the spiral direction,
a continuous curve is obtained, which helps with cache coherency and therefore rendering speed.

The curve is a compromise between the faster-rendering Bottom-to-Top etc. orders and the Center order, which is a bit slower,
but starts with the more important areas. The Hilbert Spiral also starts in the center (unless huge tiles are used) and is still
marginally slower than Bottom-to-Top, but noticeably faster than Center.

Reviewers: sergey, #cycles, dingto

Reviewed By: #cycles, dingto

Subscribers: iscream, gregzaal, sergey, mib2berlin

Differential Revision: https://developer.blender.org/D1166

3 years agoDNA: remove endian switching long checks
Campbell Barton [Sat, 9 Jan 2016 20:45:10 +0000 (07:45 +1100)]
DNA: remove endian switching long checks

This wasn't correct, and long was only ever used in cases we can now ignore.

3 years agoCleanup: style, gpu module
Campbell Barton [Sat, 9 Jan 2016 20:12:10 +0000 (07:12 +1100)]
Cleanup: style, gpu module

3 years agoByte swap doubles on file read
Campbell Barton [Sat, 9 Jan 2016 17:53:59 +0000 (04:53 +1100)]
Byte swap doubles on file read

3 years agoPyAPI: Redraw notifier when debug value changes
Campbell Barton [Sat, 9 Jan 2016 11:48:50 +0000 (22:48 +1100)]
PyAPI: Redraw notifier when debug value changes

3 years agoCleanup: warning/spelling
Campbell Barton [Sat, 9 Jan 2016 11:56:28 +0000 (22:56 +1100)]
Cleanup: warning/spelling

3 years agoFix T47060: Uv form dupli not working with Cycles when the hair/particles mesh has...
Bastien Montagne [Sat, 9 Jan 2016 11:31:45 +0000 (12:31 +0100)]
Fix T47060: Uv form dupli not working with Cycles when the hair/particles mesh has more than one uv sets.

In fact, it was not working with BI either - 'UV from dupli' would always take active UVLayer,
not render_active one.

Fixed now for both Cycles and BI, and for both particles and 'simple' dupli_face.

3 years agoFix broken build from rBd7da51b727725
Bastien Montagne [Sat, 9 Jan 2016 08:42:14 +0000 (09:42 +0100)]
Fix broken build from rBd7da51b727725

Please avoid specialized typed enums in headers as widely used as BKE_object.h,
we do not want to include DNA_modifiers_type.h everywhere...

3 years agoFix (unreported) other joke in our localizing code - setting LIB_TAG_LOCAL tag!
Bastien Montagne [Sat, 9 Jan 2016 08:27:40 +0000 (09:27 +0100)]
Fix (unreported) other joke in our localizing code - setting LIB_TAG_LOCAL tag!

This fake tag is zero, so it does not set anything - and it does not clear
indirect/extern ones either...

3 years agoFix T47121: Image node on linked and localized material loses image after reopening...
Bastien Montagne [Sat, 9 Jan 2016 08:22:42 +0000 (09:22 +0100)]
Fix T47121: Image node on linked and localized material loses image after reopening project.

Code 'localizing' the node of an ID (a material, here) was kind of a joke,
setting id.lib to NULL is not enough, by far! Now calling ntreeMakeLocal().

And ntreeMakeLocal was also missing indirect->extern switch for its directly used IDs,
which explains why they were lost after a save/reload.

Note that here again, a big part of this 'localizing' code should be made generic
using library_query stuff, but this is for id-remap, not current master...

3 years agoMSVC 2015 do not redefine snprintf
Martijn Berger [Sat, 9 Jan 2016 07:55:58 +0000 (08:55 +0100)]
MSVC 2015 do not redefine snprintf

3 years agoSmoke (fire): Move spectrum code from C++ (intern/) to C code (BLI)
Kévin Dietrich [Sat, 9 Jan 2016 03:48:31 +0000 (04:48 +0100)]
Smoke (fire): Move spectrum code from C++ (intern/) to C code (BLI)

This change is for a few reasons:
- it works with color, and (therefore) will need to be color managed, at
some point. This will be much easier to do if the code is closer to the
actual color management code (in Blender's core, so to speak).
- it has nothing to do with the actual fire simulation, as it is just
used to create a lookup table
- it can be reused for other purposes (i.e. in Blender internal
renderer, if people are interrested in a blackbody node à la Cycles)
- cleanup: some functions (`contrain_rgb`, `xyz_to_rgb`) already exist
in BLI

Reviewers: brecht

Reviewed By: brecht

Subscribers: brecht

Differential Revision: https://developer.blender.org/D1719

3 years agoSmoke, Dynamic Paint: de-duplicate object subframe update function.
Kévin Dietrich [Sat, 9 Jan 2016 03:37:53 +0000 (04:37 +0100)]
Smoke, Dynamic Paint: de-duplicate object subframe update function.

As in the title. In the smoke version, there was also an extra
'for_render' parameter that wasn't used, and wasn't used by the callers
either, so it was removed altogether.

Reviewers: brecht

Reviewed By: brecht

Subscribers: brecht

Differential Revision: https://developer.blender.org/D1718

3 years agoCleanup: make use of PIL time instead of redefining own timers.
Kévin Dietrich [Sat, 9 Jan 2016 03:25:48 +0000 (04:25 +0100)]
Cleanup: make use of PIL time instead of redefining own timers.

Also added a DEBUG_TIME macro in the related files to comment time funcs out.

Reviewers: brecht

Reviewed By: brecht

Subscribers: brecht

Differential Revision: https://developer.blender.org/D1717

3 years agoAudaspace: Sequencer sound bugfix and mono UI.
Jörg Müller [Sat, 9 Jan 2016 01:35:30 +0000 (02:35 +0100)]
Audaspace: Sequencer sound bugfix and mono UI.

- Fixed a bug that the sound when changed in the properties panel was not updated.
- Added the option to make a sound mono while adding a sound strip.
- Added the option to make a sound mono in the sequencer properties panel.

Related bug report: T47140

3 years agoText Editor: Autocomplete suggestion wrap-around
Campbell Barton [Fri, 8 Jan 2016 23:03:30 +0000 (10:03 +1100)]
Text Editor: Autocomplete suggestion wrap-around

D1716 by @someonewithpc

3 years agoReadfile: use hash lookup for bones
Campbell Barton [Fri, 8 Jan 2016 22:12:06 +0000 (09:12 +1100)]
Readfile: use hash lookup for bones

Bone loop for reconstructing links was O(n^2)

3 years agoFix T47047: Toolbars opening at maximum zoom level
Campbell Barton [Fri, 8 Jan 2016 18:42:37 +0000 (05:42 +1100)]
Fix T47047: Toolbars opening at maximum zoom level

There were 2 issues:
- toolbars were set initialized in user-defaults
  so their scroll & zoom level were set.
- initializing new 2d views included the scroll width,
  which scaled the new views zoom level, especially when dragging out.

3 years agoCMake: Make OSL's .oso shaders building also dependent on OSL compiler!
Bastien Montagne [Fri, 8 Jan 2016 18:41:04 +0000 (19:41 +0100)]
CMake: Make OSL's .oso shaders building also dependent on OSL compiler!

Otherwise, you can update OSL and not get .oso files regenerated, which is a quite
funny way to crash Blender...

3 years agoinstall_deps: bump OIIO and OSL to 1.6.9.
Bastien Montagne [Fri, 8 Jan 2016 17:57:58 +0000 (18:57 +0100)]
install_deps: bump OIIO and OSL to 1.6.9.

And we can even use vanilia version of OSL now! :D

3 years agoinstall_deps: raise boost official version to 1.60.
Bastien Montagne [Fri, 8 Jan 2016 16:59:44 +0000 (17:59 +0100)]
install_deps: raise boost official version to 1.60.

3 years agoinstall_deps: bump ffmpeg to 2.8.4.
Bastien Montagne [Fri, 8 Jan 2016 16:52:02 +0000 (17:52 +0100)]
install_deps: bump ffmpeg to 2.8.4.

3 years agoAdd new '--no-confirm' option to avoid user interaction (needs to run ths script...
Bastien Montagne [Fri, 8 Jan 2016 15:30:16 +0000 (16:30 +0100)]
Add new '--no-confirm' option to avoid user interaction (needs to run ths script as sudo then)

3 years agoFix bisect flagging w/ multiple cuts on an ngon
Campbell Barton [Fri, 8 Jan 2016 15:06:45 +0000 (02:06 +1100)]
Fix bisect flagging w/ multiple cuts on an ngon

Caused symmetrize to fail for concave ngons crossing the midpoint multiple times.

3 years agoMath Lib: use x-span for fill_poly_v2i_n callback
Campbell Barton [Fri, 8 Jan 2016 12:29:42 +0000 (23:29 +1100)]
Math Lib: use x-span for fill_poly_v2i_n callback

Instead of running the callback per-pixel,
pass the x-span to the callback.

3 years agoRemove raskter library
Sergey Sharybin [Fri, 8 Jan 2016 11:29:29 +0000 (16:29 +0500)]
Remove raskter library

it's no longer used by any of the parts of Blender.

3 years agoTracking: Cleanup, reduce scope of some variables
Sergey Sharybin [Fri, 8 Jan 2016 11:25:19 +0000 (16:25 +0500)]
Tracking: Cleanup, reduce scope of some variables

3 years agoTracking: Use BLI mask rasterization for track masks
Sergey Sharybin [Fri, 8 Jan 2016 11:24:36 +0000 (16:24 +0500)]
Tracking: Use BLI mask rasterization for track masks

3 years agoSequencer: Tweak to how/when the "use_framerate" option is enabled
Joshua Leung [Fri, 8 Jan 2016 11:12:33 +0000 (00:12 +1300)]
Sequencer: Tweak to how/when the "use_framerate" option is enabled

In response to feedback from plasmasolutions that having this option "always on"
caused some examples of more destructive errors, this commit introduces an attempt
at seeking a better balance between doing what people expect when casually importing
clips, and not clobbering existing timelines.

Specifically:
1) When there's nothing in the scene, the option will default to being enabled.
   This accounts for users doing this for the first time with no strips
2) When there are already sequence strips, the option will default to being disabled.
   In this case, changing the framerate could be dangerous. Hopefully this new check
   is sufficient.
3) There's always still the option for users to control what exactly happens. However,
   there have been reports that this cannot always be seen/set?

3 years agoKoro request: add 'active layer' and 'selected' options to view3D' paste operator.
Bastien Montagne [Fri, 8 Jan 2016 10:05:39 +0000 (11:05 +0100)]
Koro request: add 'active layer' and 'selected' options to view3D' paste operator.

Those two are ON by default, since I think it's most common expected behavior
(as with append/link ops).

3 years agoFix T47138: Page Down key pages up, instead of down, in Outliner.
Bastien Montagne [Fri, 8 Jan 2016 08:55:39 +0000 (09:55 +0100)]
Fix T47138: Page Down key pages up, instead of down, in Outliner.

Usual operator properties 'saving' after first execution... Double fix here, since being
explicit in keymap is good practice too.

3 years agoFix T47135: VSE importing sound is one frame longer than video.
Bastien Montagne [Fri, 8 Jan 2016 08:39:04 +0000 (09:39 +0100)]
Fix T47135: VSE importing sound is one frame longer than video.

Issue is with rounding up of length reported by audaspace for audio part - when it matches nearly exactly
the actual video length, using ceil() would make it one frame longer. Now apply a small (0.0001 frame)
negative offset to prevent this effect.

3 years agoSimplify checker mapping in BI when both Odd and Even are disabled
Sergey Sharybin [Fri, 8 Jan 2016 08:20:34 +0000 (13:20 +0500)]
Simplify checker mapping in BI when both Odd and Even are disabled

This also solves artifact mentioned in comment in T46984.

3 years agoBMesh: Select Previous, set active face now works
Campbell Barton [Fri, 8 Jan 2016 05:33:09 +0000 (16:33 +1100)]
BMesh: Select Previous, set active face now works