5 years agoCleanup: stdbool no longer optional, remove checks
Campbell Barton [Sat, 16 Jan 2016 04:34:49 +0000 (15:34 +1100)]
Cleanup: stdbool no longer optional, remove checks

5 years agoCleanup: use enum constant for DNA comparison
Campbell Barton [Sat, 16 Jan 2016 04:00:22 +0000 (15:00 +1100)]
Cleanup: use enum constant for DNA comparison

5 years agoBlender Internal: subframe render support
Campbell Barton [Sat, 16 Jan 2016 02:06:16 +0000 (13:06 +1100)]
Blender Internal: subframe render support

Note this doesn't expose the option to the interface,
it just means scripts that set the subframe can render (as with Cycles).

5 years agoCleanup: style
Campbell Barton [Sat, 16 Jan 2016 02:01:10 +0000 (13:01 +1100)]
Cleanup: style

5 years agoFix T47181: Blender OSL script node crash (OSL 1.6.9)
Lukas Stockner [Sat, 16 Jan 2016 00:32:22 +0000 (01:32 +0100)]
Fix T47181: Blender OSL script node crash (OSL 1.6.9)

Compiling OSL scripts with errors in them would cause Blender to crash since the OSL version
bump to 1.6.9 instead of printing the error to the console as it did before.

With version 1.6.2, OSL added a pointer to an OpenImageIO ErrorHandler as an argument to the
OSLCompiler constructor. However, since it defaults to the NULL pointer, Blender still compiled
fine after the OSL version bump.
It turns out, though, that this pointer is used without further checks inside the OSL code, which
makes it crash when it tries to report an error unless a valid ErrorHandler pointer is specified.
Therefore, this commit simply passes a pointer to the static default handler that OIIO offers,
which prints the error to the console just like OSL did before.

Using this feature for a more advanced error handling and displaying from the Blender side would
be possible and seems reasonable, but for now it's not really relevant for fixing this bug.

5 years agoCycles-Bake: Custom Baking passes
Dalai Felinto [Fri, 15 Jan 2016 15:00:56 +0000 (13:00 -0200)]
Cycles-Bake: Custom Baking passes

The combined pass is built with the contributions the user finds fit.

It is useful for lightmap baking, as well as non-view dependent effects

The manual will be updated once we get closer to the 2.77 release.
Meanwhile the new page can be found here:

Reviewers: sergey, brecht

Differential Revision:

5 years agoFix T47185: Wrong items order with template_icon_view.
Bastien Montagne [Fri, 15 Jan 2016 14:19:14 +0000 (15:19 +0100)]
Fix T47185: Wrong items order with template_icon_view.

5 years agoChanges around update normals from PBVH to CDDM
Sergey Sharybin [Fri, 15 Jan 2016 11:29:57 +0000 (16:29 +0500)]
Changes around update normals from PBVH to CDDM

- Only do this if PBVH is not used for display, this should correspond
  to whats' happening in sculpt.c now.

- No need to do such synchronization for solid drawing, it supports
  optimal display from PBVH.

In fact, such synchronization is only needed in the following case:

Drawing callback does not support PBVH draw and sculpt session is
configured to use PBVH for display and related operations.

5 years agoTracking: Make plane track sliding aware of closest mouse
Sergey Sharybin [Fri, 15 Jan 2016 10:37:46 +0000 (15:37 +0500)]
Tracking: Make plane track sliding aware of closest mouse

Also made threshold aware of zoom, so now it's always 12px threshold
regardless of how much you're zoomed in.

5 years agoTracking: Split tracking_ops into smaller files
Sergey Sharybin [Fri, 15 Jan 2016 09:02:26 +0000 (14:02 +0500)]
Tracking: Split tracking_ops into smaller files

The file started to be rather really huge and difficult to follow.
Should be no functional changes.

5 years agoTracking: Cleanup, use more strict code style
Sergey Sharybin [Fri, 15 Jan 2016 08:48:24 +0000 (13:48 +0500)]
Tracking: Cleanup, use more strict code style

Should be no functional changes.

5 years agoCleanup: used pre-defined atoms in ghost
Campbell Barton [Fri, 15 Jan 2016 07:39:40 +0000 (18:39 +1100)]
Cleanup: used pre-defined atoms in ghost

5 years agoTracking: Use sliding zone which is closer to the mouse
Sergey Sharybin [Fri, 15 Jan 2016 07:23:24 +0000 (12:23 +0500)]
Tracking: Use sliding zone which is closer to the mouse

Previously it was simplier logic which only checked whether the mouse
is inside of some area around sliding zone, which was resulting in
wrong sliding zone used when zoomed out.

5 years agoFix T31063: X11 window resize fails on PPC
Campbell Barton [Fri, 15 Jan 2016 05:26:41 +0000 (16:26 +1100)]
Fix T31063: X11 window resize fails on PPC

X11 property access was using wrong sized types that only worked for little endian systems.

5 years agoFix crash w/ scripts run from the command line that load files
Campbell Barton [Thu, 14 Jan 2016 22:57:54 +0000 (09:57 +1100)]
Fix crash w/ scripts run from the command line that load files

Also refactor context backup/restore into functions.

5 years agoDNA: partial revert of long removal
Campbell Barton [Thu, 14 Jan 2016 22:16:24 +0000 (09:16 +1100)]
DNA: partial revert of long removal

924c626 broke loading on systems with different endian.
We could support reading values from SDNA, it isn't really worth the extra hassle.

Long support is still removed, just keep enum values the same.

5 years agoFix T47168: Project image looses float precision
Campbell Barton [Thu, 14 Jan 2016 20:32:30 +0000 (07:32 +1100)]
Fix T47168: Project image looses float precision

5 years agoDoc: more detailed ImBuf.rect/rect_float comments
Campbell Barton [Thu, 14 Jan 2016 20:08:28 +0000 (07:08 +1100)]
Doc: more detailed ImBuf.rect/rect_float comments

5 years agoCleanup: warning, whitespace
Campbell Barton [Thu, 14 Jan 2016 18:24:15 +0000 (05:24 +1100)]
Cleanup: warning, whitespace

5 years agoImprove multi-paint tip
Campbell Barton [Thu, 14 Jan 2016 10:56:25 +0000 (21:56 +1100)]
Improve multi-paint tip

5 years agoUsual fixes and tweaks for UI messages.
Bastien Montagne [Thu, 14 Jan 2016 15:37:06 +0000 (16:37 +0100)]
Usual fixes and tweaks for UI messages.

5 years agoFix broken i18n messages extracting script with new py code.
Bastien Montagne [Thu, 14 Jan 2016 15:00:15 +0000 (16:00 +0100)]
Fix broken i18n messages extracting script with new py code.

Some py devs are way too smart for our own good... :P

5 years agoCycles: One more attempt to fix issue mentioned in previous commit
Sergey Sharybin [Thu, 14 Jan 2016 14:12:11 +0000 (19:12 +0500)]
Cycles: One more attempt to fix issue mentioned in previous commit

5 years agoCycles: Fix typo in the debug panel commit
Sergey Sharybin [Thu, 14 Jan 2016 14:07:06 +0000 (19:07 +0500)]
Cycles: Fix typo in the debug panel commit

5 years agoCycles: Fix string compiler warnings after recent changes
Sergey Sharybin [Thu, 14 Jan 2016 12:04:30 +0000 (17:04 +0500)]
Cycles: Fix string compiler warnings after recent changes

5 years agoCycles: Cleanup, spelling and indentation
Sergey Sharybin [Thu, 14 Jan 2016 12:01:39 +0000 (17:01 +0500)]
Cycles: Cleanup, spelling and indentation

5 years agoCycles: Remove the experimental CUDA kernel.
Thomas Dinges [Thu, 14 Jan 2016 11:51:11 +0000 (12:51 +0100)]
Cycles: Remove the experimental CUDA kernel.

This commit removes the experimental CUDA kernel, making SSS and CMJ
regular features.

Several improvements have been made in the past few
weeks (thanks Sergey!) which make SSS render several times faster (2-3x
compared to 2.76b) on the GPU, and the increased VRAM usage has also been
fixed. Therefore the experimental kernel is no longer needed.

Differential Revision:

Manual has been updated: too:

5 years agoCompositor: Add option to extend image bounds when blurring
Sergey Sharybin [Wed, 9 Dec 2015 14:31:39 +0000 (19:31 +0500)]
Compositor: Add option to extend image bounds when blurring

It is handy when doing some roto work and it's required to blur some
mask or overaly before alpha-overing it on top of the footage.

Quite straightforward option with the only limitation that variable
size blur is not supported.

Reviewers: campbellbarton

Subscribers: hype, sebastian_k

Differential Revision:

5 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

5 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

More modes could be added if needed.

Default remains Deflate.

Reviewers: campbellbarton, mont29, sergey

Differential Revision:

5 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.

5 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:

5 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

5 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).

5 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.

5 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

5 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.

5 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

5 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.

5 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

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

5 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

5 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.

5 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

5 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

5 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

5 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

5 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

5 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.

5 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.

5 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.

5 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:

5 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.

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

5 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.

5 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.

5 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

5 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().

5 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

5 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

5 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:

5 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).

5 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.

5 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.

5 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

5 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.

5 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...).

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

5 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

5 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

5 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.

5 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...

5 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...

5 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.

5 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.

5 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)

5 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.

5 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

5 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

5 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

5 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.

5 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.

5 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

5 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.

5 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

5 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.

5 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

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

5 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.

5 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.

5 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.

5 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.

5 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:

5 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.

5 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

5 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:

5 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.

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

5 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

5 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

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