blender.git
4 years agoFix T50122: SEGFAULT: OCIO configuration typo leads to segfault
Sergey Sharybin [Tue, 6 Dec 2016 13:19:17 +0000 (14:19 +0100)]
Fix T50122: SEGFAULT: OCIO configuration typo leads to segfault

4 years agoFix T50003, Bevel makes non-manifold mesh.
Howard Trickey [Tue, 6 Dec 2016 12:43:47 +0000 (07:43 -0500)]
Fix T50003, Bevel makes non-manifold mesh.

Problem was setting prev/next faces for edges around
a vertex on valence-2 vertices.

4 years agoFix T50020: adding a background image does not set image user data.
Kévin Dietrich [Mon, 5 Dec 2016 23:04:15 +0000 (00:04 +0100)]
Fix T50020: adding a background image does not set image user data.

4 years agoUI: add a message to indicate when using a modifier that wasn't
Kévin Dietrich [Mon, 5 Dec 2016 22:33:21 +0000 (23:33 +0100)]
UI: add a message to indicate when using a modifier that wasn't
compiled.

This adds a short message to the smoke, remesh and boolean modifiers' UI
when trying to use them when their compilation was turned off. This was
already implemented for the fluid and ocean simulation modifiers.

This also makes the 'quick fluid' and 'quick smoke' operator abort and
report when trying to use them when unavailable.

4 years agoDepsgraph: Use HIGH priority for scheduled tasks
Sergey Sharybin [Mon, 5 Dec 2016 15:31:34 +0000 (16:31 +0100)]
Depsgraph: Use HIGH priority for scheduled tasks

This kind of keeps threads "warmer" and should in theory give better
cache coherency bringing some %% of speedup. It was already tested
few months ago and it gave few % speedup in barber shop, but was
reverted due to some bone popping. The popping is now fixed so it
should be fine to use new scheduling policy.

4 years agoDepsgraph: avoid more transitive relations for rigid body simulation
Sergey Sharybin [Mon, 5 Dec 2016 15:30:30 +0000 (16:30 +0100)]
Depsgraph: avoid more transitive relations for rigid body simulation

4 years agoDepsgraph: Rigid body simulation doesn't need explicit time relation
Sergey Sharybin [Mon, 5 Dec 2016 15:03:10 +0000 (16:03 +0100)]
Depsgraph: Rigid body simulation doesn't need explicit time relation

It'll be dependent on time via Time Source -> Rebuild RB World chain.

4 years agoDepsgraph: Avoid transitive relation from local transform to final
Sergey Sharybin [Mon, 5 Dec 2016 14:59:31 +0000 (15:59 +0100)]
Depsgraph: Avoid transitive relation from local transform to final

There is always an uber eval node on the way. so we can avoid creating
some relations here in order to speed up both construction time and
evaluation.

4 years agoFix depsgraph: hair collision is actually enabled, so add the relations.
Alexander Gavrilov [Mon, 5 Dec 2016 10:35:24 +0000 (13:35 +0300)]
Fix depsgraph: hair collision is actually enabled, so add the relations.

4 years agoFix compilation error on recent Debian desktop
Sergey Sharybin [Mon, 5 Dec 2016 10:34:49 +0000 (11:34 +0100)]
Fix compilation error on recent Debian desktop

Something funny happened here, there were missing symbols from png
library to math functions.

4 years agoFix T50141: Nabla zero division on texture force field
Luca Rood [Sat, 3 Dec 2016 16:05:56 +0000 (14:05 -0200)]
Fix T50141: Nabla zero division on texture force field

This sets forces to zero, when Nabla is zero and a grayscale texture is
used or texture mode is Gradient or Curl.

Nabla equal to zero was causing a zero division, and forces ended up
being set to `nan`.

Reviewed By: mont29

Differential Revision: http://developer.blender.org/D2393

4 years agoCMake: disable QuickTime with macOS SDK 10.12+, no longer supported by Apple.
Brecht Van Lommel [Sun, 4 Dec 2016 19:23:55 +0000 (20:23 +0100)]
CMake: disable QuickTime with macOS SDK 10.12+, no longer supported by Apple.

4 years agoFix macOS 10.9 build when using OIIO without FFmpeg.
Brecht Van Lommel [Sun, 4 Dec 2016 12:49:34 +0000 (13:49 +0100)]
Fix macOS 10.9 build when using OIIO without FFmpeg.

4 years agoDocs: Show 'Other Options' last in --help
Campbell Barton [Sun, 4 Dec 2016 10:55:17 +0000 (21:55 +1100)]
Docs: Show 'Other Options' last in --help

Own error when changing order,
moving experimental features last made some sense,
but causes them to be listed twice.

Reorder and comment to avoid it happening again.

4 years agoCleanup: simplify bitmap line drawing
Campbell Barton [Sun, 4 Dec 2016 04:05:50 +0000 (15:05 +1100)]
Cleanup: simplify bitmap line drawing

- Expand overly dense & confusing delta assignments.
- Replace bit shift with multiply.

Also link to 'clipped' version of this function
which may be useful to add later.

4 years ago[msvc] Changes for new oiio/ffmpeg versions.
lazydodo [Sun, 4 Dec 2016 00:38:20 +0000 (17:38 -0700)]
[msvc] Changes for new oiio/ffmpeg versions.

4 years agoCMake: update for macOS 10.9 libs with ffmpeg 3.2.1 and webp support.
Brecht Van Lommel [Sat, 3 Dec 2016 13:56:58 +0000 (14:56 +0100)]
CMake: update for macOS 10.9 libs with ffmpeg 3.2.1 and webp support.

4 years agoFix macOS build with openimageio 1.7.8 and openexr.
Brecht Van Lommel [Sat, 3 Dec 2016 13:56:46 +0000 (14:56 +0100)]
Fix macOS build with openimageio 1.7.8 and openexr.

These macros conflict and are no longer needed with C99 or C++ anyway.

4 years agoCycles: Refactor Progress system to provide better estimates
Lukas Stockner [Sat, 26 Nov 2016 03:22:34 +0000 (04:22 +0100)]
Cycles: Refactor Progress system to provide better estimates

The Progress system in Cycles had two limitations so far:
 - It just counted tiles, but ignored their size. For example, when rendering a 600x500 image with 512x512 tiles, the right 88x500 tile would count for 50% of the progress, although it only covers 15% of the image.
 - Scene update time was incorrectly counted as rendering time - therefore, the remaining time started very long and gradually decreased.

This patch fixes both problems:
First of all, the Progress now has a function to ignore time spans, and that is used to ignore scene update time.
The larger change is the tile size: Instead of counting samples per tile, so that the final value is num_samples*num_tiles, the code now counts every sample for every pixel, so that the final value is num_samples*num_pixels.

Along with that, some unused variables were removed from the Progress and Session classes.

Reviewers: brecht, sergey, #cycles

Subscribers: brecht, candreacchio, sergey

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

4 years agoOCIO: Implement exposure/gamma for fallback implementation
Sergey Sharybin [Fri, 2 Dec 2016 15:57:00 +0000 (16:57 +0100)]
OCIO: Implement exposure/gamma for fallback implementation

Quite handy for debugging.

Unfortunately, this doesn't support viewport tweaks yet since those
require GLSL for colorspace conversion. Maybe this will be implemented
as well one day in the future..

4 years agoCycles: Implement AVX2 path for curve intersection functions
Sergey Sharybin [Fri, 2 Dec 2016 11:15:24 +0000 (12:15 +0100)]
Cycles: Implement AVX2 path for curve intersection functions

Gives little performance improvement on Linux and gives up to 2%
speedup on koro.blend on Windows.

Inspired by Maxym Dmytrychenko, thanks!

4 years agoCycles: Add AVX intrinsics helpers
Sergey Sharybin [Fri, 2 Dec 2016 09:42:31 +0000 (10:42 +0100)]
Cycles: Add AVX intrinsics helpers

They are defined for MSVC but seems to be missing in GCC and CLang-3.8.

Maybe some further tweaks to policy when to define those functions is
needed, but should be fine for now.

4 years agoFix T50062: Mask - Clicking in ActivePoint Parent makes Blender crash.
Bastien Montagne [Fri, 2 Dec 2016 09:45:03 +0000 (10:45 +0100)]
Fix T50062: Mask - Clicking in ActivePoint Parent makes Blender crash.

Mask primitive adding code was not initializing correctly id_type of
points' parents.

4 years agoCycles: Disable AVX2 crash workarounds
Sergey Sharybin [Fri, 2 Dec 2016 09:15:24 +0000 (10:15 +0100)]
Cycles: Disable AVX2 crash workarounds

I can no longer reproduce crash with neither of the files where
the crash was originally visible. This is something where other
changes (light threshold, sampling) had an effect and made code
to work as it is supposed to. Could have been optimizator issue
or something like that.

Let's see if we hit same issue again.

4 years agoFix (unreported) memleak in ImBuf mipmap code in some cases.
Bastien Montagne [Fri, 2 Dec 2016 08:44:41 +0000 (09:44 +0100)]
Fix (unreported) memleak in ImBuf mipmap code in some cases.

`IMB_remakemipmap` may 'shrink' the mipmap list without actually freeing
anything, so we need to check all possible levels in `imb_freemipmapImBuf`
to avoid memory leaks, not only those currently used.

4 years agoinstall_deps.sh: Update official (default) lib versions of py/oiio/osl/osd/ffmpeg.
Bastien Montagne [Thu, 1 Dec 2016 15:30:17 +0000 (16:30 +0100)]
install_deps.sh: Update official (default) lib versions of py/oiio/osl/osd/ffmpeg.

4 years agoFix (unreported) looptri array not being recalculated in ccgDM and emDM
Luca Rood [Wed, 23 Nov 2016 19:19:03 +0000 (17:19 -0200)]
Fix (unreported) looptri array not being recalculated in ccgDM and emDM

In ccgDM and emDM, looptri array recalculation was being handled
directly by `*DM_getLoopTriArray` (`getLoopTriArray` callback), while
`*DM_recalcLoopTri` (`recalcLoopTri` callback) was doing nothing.

This results in the array not being recalculated when other functions
that depend on the array data called the recalc function.

This moves all the recalculation code to `*DM_recalcLoopTri` and makes
`*DM_getLoopTriArray` call that.

This commit also makes a minor change to the `getNumLoopTri` function,
so that it returns the correct number without having to recalculate the
looptri array.

Reviewed By: mont29

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

4 years agoGPencil: Include various new operators into the 3D View menus too
Joshua Leung [Thu, 1 Dec 2016 13:19:59 +0000 (02:19 +1300)]
GPencil: Include various new operators into the 3D View menus too

Quite a few of the operators added for 2.78 were not included in the menus

4 years agoGPencil Sculpt: Numpad keys now work when doing sculpt sessions (i.e. when the operat...
Joshua Leung [Thu, 1 Dec 2016 06:36:30 +0000 (19:36 +1300)]
GPencil Sculpt: Numpad keys now work when doing sculpt sessions (i.e. when the operator is run using wait_for_input=True)

This just brings it in line with the drawing operator

4 years agoCompiler warning fix
Joshua Leung [Thu, 1 Dec 2016 06:34:35 +0000 (19:34 +1300)]
Compiler warning fix

4 years agoBuildbot: Disable glibc211 slaves
Sergey Sharybin [Thu, 1 Dec 2016 14:05:53 +0000 (15:05 +0100)]
Buildbot: Disable glibc211 slaves

4 years agoFix T50116: Light threshold broke branched path tracer
Sergey Sharybin [Thu, 1 Dec 2016 13:27:10 +0000 (14:27 +0100)]
Fix T50116: Light threshold broke branched path tracer

In fact, the issue was caused by light threshold being too high for
certain scenes. Lowered it down to 0.01.

4 years agoCycles: Fix correlation issues in certain cases
Sergey Sharybin [Sat, 26 Nov 2016 16:30:02 +0000 (17:30 +0100)]
Cycles: Fix correlation issues in certain cases

There were two cases where correlation issues were obvious:

- File from T38710 was giving issues in 2.78a again
- File from T50116 was having totally different shadow between
  sample 1 and sample 32.

Use some more simplified version of CMJ hash which seems to give
nice randomized value which solves the correlation.

This commit will break all unit test files, but it's a bug fix
so perhaps OK to commit this.

This also fixes T41143: Sobol gives nonuniform noise

Proper science paper about hash function is coming.

Reviewers: brecht

Reviewed By: brecht

Subscribers: lukasstockner97

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

4 years agoFix T50075: Assert during debug render of hair_geom_transmission.blend
Sergey Sharybin [Thu, 1 Dec 2016 11:11:11 +0000 (12:11 +0100)]
Fix T50075: Assert during debug render of hair_geom_transmission.blend

4 years agoAlembic: quiet compilation warnings on Windows.
Kévin Dietrich [Thu, 1 Dec 2016 07:32:02 +0000 (08:32 +0100)]
Alembic: quiet compilation warnings on Windows.

Most of them are harmless implicit conversions (e.g. Alembic deals with
doubles for storing time information when Blender uses both ints and
floats/doubles) or class/struct mismatch on forward declarations.

4 years agoFix T46795 : Reset GWLP_USERDATA to NULL at window destruction so any future events...
lazydodo [Thu, 1 Dec 2016 01:26:25 +0000 (18:26 -0700)]
Fix T46795 : Reset GWLP_USERDATA to NULL at window destruction so any future events will not try to reference this deleted class.

4 years agoCleanup id->newid usage, initial work.
Bastien Montagne [Wed, 30 Nov 2016 14:25:54 +0000 (15:25 +0100)]
Cleanup id->newid usage, initial work.

This aims at always ensuring that ID.newid (and relevant LIB_TAG_NEW)
stay in clean (i.e. cleared) state by default.

To achieve this, instead of clearing after all id copy call (would be
horribly noisy, and bad for performances), we try to completely remove
the setting of id->newid by default when copying a new ID.

This implies that areas actually needing that info (mainly, object editing
area (make single user...) and make local area) have to ensure they set
it themselves as needed.

This is far from simple change, many complex code paths to consider, so
will need some serious testing. :/

4 years agoOCIO: Cleanup style
Sergey Sharybin [Wed, 30 Nov 2016 11:52:48 +0000 (12:52 +0100)]
OCIO: Cleanup style

Was a ground work for some more improvements here, but got dragged
to some other studio maintenance job here.

The plan would be to enable exposure/gamma control for fallback mode
which will definitely be really handy for development and might be
handy for cases when OCIO config can not be read.

4 years agoAlembic: slight cleanup, reorder mesh code a bit.
Kévin Dietrich [Wed, 30 Nov 2016 08:33:47 +0000 (09:33 +0100)]
Alembic: slight cleanup, reorder mesh code a bit.

4 years agoFix T49813: crash after changing Alembic cache topology.
Kévin Dietrich [Wed, 30 Nov 2016 08:20:45 +0000 (09:20 +0100)]
Fix T49813: crash after changing Alembic cache topology.

Crash is due by mismatching loops and faces counts between the Alembic
data and the Blender derivedmesh which does not appear so
straightforward to fix (the crash happens deep in the derivedmesh code).

So for now, try to detect if the topology has changed and if so, both
only read vertices (vertex colors and UVs won't be read, as tied to face
loops) and add a warning message in the modifier's UI to let the user
know.

4 years agoUI: Remove 'x' icon from paths and lists
Julian Eisel [Tue, 29 Nov 2016 22:41:20 +0000 (23:41 +0100)]
UI: Remove 'x' icon from paths and lists

4 years agoFix compilation error with latest OIIO 1.7.8
Sergey Sharybin [Tue, 29 Nov 2016 11:40:38 +0000 (12:40 +0100)]
Fix compilation error with latest OIIO 1.7.8

There are some changes in OIIO includes so now need to do some
things differently.

4 years agoFix T50094: Crash when viewport rendering point density texture
Sergey Sharybin [Tue, 29 Nov 2016 10:39:14 +0000 (11:39 +0100)]
Fix T50094: Crash when viewport rendering point density texture

The idea is simple: cache PD resolution from cache_point_density() RNA
function because that one is supposed to be called while database is
locked for original synchronization.

Ideally we would also pass array size to the sampling function, but
it turned out to be quite problematic because API only accepts int type
and passing size_t might cause some weird behavior.

4 years agoCycles: Pass extra array size argument to builtin image pixels functions
Sergey Sharybin [Tue, 29 Nov 2016 10:03:11 +0000 (11:03 +0100)]
Cycles: Pass extra array size argument to builtin image pixels functions

This is a way to avoid possible memory corruption when render threads works
in parallel with UI thread.

Not guarantees complete safe, but makes things easier to check anyway.

4 years agoMath lib: Fix use function of wrong dimension
Sergey Sharybin [Tue, 29 Nov 2016 09:31:54 +0000 (10:31 +0100)]
Math lib: Fix use function of wrong dimension

Seems to be a typo in recent commit e1e49fd.

4 years agoFix T50029: BVHTree.FromPolygons memory leak
Campbell Barton [Tue, 29 Nov 2016 08:31:46 +0000 (19:31 +1100)]
Fix T50029: BVHTree.FromPolygons memory leak

4 years ago[msvc] remove /opt all together and revert to the default behavior /opt:ref for relea...
lazydodo [Tue, 29 Nov 2016 02:55:07 +0000 (19:55 -0700)]
[msvc] remove /opt all together and revert to the default behavior /opt:ref for release builds, /opt:noref for debug builds.

4 years agoComment: explain viewport & render pixel-size
Campbell Barton [Tue, 29 Nov 2016 02:12:26 +0000 (13:12 +1100)]
Comment: explain viewport & render pixel-size

It wasn't all that clear why both pixel-sizes are needed.

4 years ago[msvc] change linker options from /opt:noref to /opt:ref, saves about 20% off the...
lazydodo [Mon, 28 Nov 2016 20:22:10 +0000 (13:22 -0700)]
[msvc] change linker options from /opt:noref to /opt:ref, saves about 20% off the executable size

Nobody appears to know why this option was on (and just on for just x64 at that)

4 years agoUI: Add 'x' icon to text buttons to clear content
Julian Eisel [Mon, 28 Nov 2016 17:59:31 +0000 (18:59 +0100)]
UI: Add 'x' icon to text buttons to clear content

This is useful e.g. for search buttons to quickly clear the filter string. We might want to make this optional for python scripts.

4 years ago[msvc2017] remove eigen vector workaround for msvc2017.
lazydodo [Mon, 28 Nov 2016 17:12:21 +0000 (10:12 -0700)]
[msvc2017] remove eigen vector workaround for msvc2017.

4 years agoFix T50065: Audaspace: some values of the lower limit of Factory.limit causes the...
Joerg Mueller [Mon, 28 Nov 2016 16:23:44 +0000 (17:23 +0100)]
Fix T50065: Audaspace: some values of the lower limit of Factory.limit causes the factory not to play

Backport of upstream audaspace bugfix (ddd9a4d).

4 years agoRemove sensor-size to int conversion
Campbell Barton [Mon, 28 Nov 2016 06:29:27 +0000 (17:29 +1100)]
Remove sensor-size to int conversion

Currently harmless since the value is always set at its default (32).
Even so, it's confusing since its used with floats after.

4 years agoA number of other minor RNA fixes and precautionary safeguards against further crashe...
Joshua Leung [Sun, 27 Nov 2016 13:33:11 +0000 (02:33 +1300)]
A number of other minor RNA fixes and precautionary safeguards against further crashes here

4 years agoGPencil RNA API: "set_active" option for layer.new() and palette.new() is now true...
Joshua Leung [Sun, 27 Nov 2016 13:32:03 +0000 (02:32 +1300)]
GPencil RNA API: "set_active" option for layer.new() and palette.new() is now true/enabled by default

To bring the API more into line with the UI (and the general expected behaviour of
Blender when it comes to adding stuff), newly created layers and palettes will be
made the active ones by default. It's possible to override this behaviour still
(e.g. in cases where you're auto-generating a large number of them), but otherwise,
this change will help prevent errors like T50123.

4 years agoFix T50123 - GreasePencil: Modifying name of new color in new palette via bpy segfaults
Joshua Leung [Sun, 27 Nov 2016 13:28:12 +0000 (02:28 +1300)]
Fix T50123 - GreasePencil: Modifying name of new color in new palette via bpy segfaults

When there were no prior palettes, creating a new one didn't automatically make it active.
This caused problems when trying to rename the color, as the RNA code assumed that if there's
a color, it must come from the active palette.

This commit partially fixes the problem by ensuring that if there are no palettes, the first
one will always be made active.

4 years agoTypo fix
Joshua Leung [Sat, 26 Nov 2016 03:47:54 +0000 (16:47 +1300)]
Typo fix

4 years ago[msvc2015] Fix cmake warnings regarding backslashes in path of the run-time libraries
lazydodo [Sun, 27 Nov 2016 00:00:25 +0000 (17:00 -0700)]
[msvc2015] Fix cmake warnings regarding backslashes in path of the run-time libraries

4 years agofix T50118: Added missing assignment of Bone Roll
Gaia Clary [Sat, 26 Nov 2016 17:48:50 +0000 (18:48 +0100)]
fix T50118: Added missing assignment of Bone Roll

4 years agoFix T50104, Race condition in SVMShaderManager::device_update_shader
lazydodo [Fri, 25 Nov 2016 19:02:37 +0000 (12:02 -0700)]
Fix T50104, Race condition in SVMShaderManager::device_update_shader

4 years agoMath Lib: avoid temp array for rotate_m4
Campbell Barton [Fri, 25 Nov 2016 10:00:32 +0000 (21:00 +1100)]
Math Lib: avoid temp array for rotate_m4

No need to have temp array storage, avoid 2x loops.

4 years agoMath Lib: rotate matrix cleanup
Campbell Barton [Fri, 25 Nov 2016 05:20:30 +0000 (16:20 +1100)]
Math Lib: rotate matrix cleanup

- Remove 'rotate_m2', unlike 'rotate_m4' it created a new matrix
  duplicating 'angle_to_mat2' - now used instead.
  (better avoid matching functions having different behavior).

- Add 'axis_angle_to_mat4_single',
  convenience wrapper for 'axis_angle_to_mat3_single'.

- Replace 'unit_m4(), rotate_m4()' with a single call to 'axis_angle_to_mat4_single'.

4 years agoFix Torus default UV's offset outside 0-1 bounds
Campbell Barton [Fri, 25 Nov 2016 03:20:45 +0000 (14:20 +1100)]
Fix Torus default UV's offset outside 0-1 bounds

When major/minor segments didn't fit evenly into 4,
the UV's would move outside the UV bounds.

4 years agoRemove eekadoodle workaround for add torus
Campbell Barton [Fri, 25 Nov 2016 00:34:15 +0000 (11:34 +1100)]
Remove eekadoodle workaround for add torus

This is no longer needed since moving to MPoly/MLoop data structure.

Also use 3x3 matrix for transforming instead of quaternion
(slightly better performance).

4 years agoCycles: Avoid divisions by zero in volume sampling code
Sergey Sharybin [Thu, 24 Nov 2016 15:37:27 +0000 (16:37 +0100)]
Cycles: Avoid divisions by zero in volume sampling code

Was giving huge artifacts in the barber shop file here in the studio,

Maybe not fully optimal solution, but committing it for now to have
closer look later.

4 years agoRemove unused vector icons from RNA
Martijn Berger [Thu, 24 Nov 2016 12:43:29 +0000 (13:43 +0100)]
Remove unused vector icons from RNA

4 years agoFix prefs UI when built w/o Cycles
Campbell Barton [Thu, 24 Nov 2016 00:14:45 +0000 (11:14 +1100)]
Fix prefs UI when built w/o Cycles

4 years agoFix T50100: Cycles SeparateRGBNode Red socket defined wrong
Sergey Sharybin [Wed, 23 Nov 2016 10:33:09 +0000 (11:33 +0100)]
Fix T50100: Cycles SeparateRGBNode Red socket defined wrong

Spotted by David (bocs), thanks!

4 years agoDepsgraph: Fix matrix_world driver source
Sergey Sharybin [Wed, 23 Nov 2016 10:09:05 +0000 (11:09 +0100)]
Depsgraph: Fix matrix_world driver source

Reported by Dalai in IRC, thanks!

4 years agoCycles: Fix strict compilation warnings
Sergey Sharybin [Wed, 23 Nov 2016 09:59:54 +0000 (10:59 +0100)]
Cycles: Fix strict compilation warnings

4 years agoFix Cycles device backwards compatibility error if device type is unavailable.
Brecht Van Lommel [Tue, 22 Nov 2016 23:03:06 +0000 (00:03 +0100)]
Fix Cycles device backwards compatibility error if device type is unavailable.

4 years agoFix spelling in Cycles distance culling description.
Brecht Van Lommel [Sun, 20 Nov 2016 19:50:16 +0000 (20:50 +0100)]
Fix spelling in Cycles distance culling description.

4 years agoFix T49718: Wrong "Make Duplicates Real" behavior with "Keep Hierarchy"
Luca Rood [Tue, 22 Nov 2016 16:38:43 +0000 (14:38 -0200)]
Fix T49718: Wrong "Make Duplicates Real" behavior with "Keep Hierarchy"

All objects were being parented to a single instance of each parent
object, instead of their respective instances, when using dupliverts or
dupligroups.

Behavior was caused by the `persistent_id[0]` (vertex/face id) being
ignored when computing `parent_gh` hash, which caused all instances to
have the same hash, and thus only the first one was included.

Reviewed By: mont29

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

4 years agoCycles: Fix strict compilation warnings
Sergey Sharybin [Tue, 22 Nov 2016 15:38:37 +0000 (16:38 +0100)]
Cycles: Fix strict compilation warnings

Should be no functional changes.

4 years agoInstall_deps: fix warning message not showing up in case build fails.
Bastien Montagne [Tue, 22 Nov 2016 15:04:43 +0000 (16:04 +0100)]
Install_deps: fix warning message not showing up in case build fails.

Kinda stupid, but big nice warning about need to try clean build if
something fails was only showing in case install_deps completed
successfully... :P

4 years agoFix T50034: Blender changes processor affinity unauthorized
Sergey Sharybin [Tue, 22 Nov 2016 15:03:16 +0000 (16:03 +0100)]
Fix T50034: Blender changes processor affinity unauthorized

4 years agoGLog: Workaround compilation error on Hurd
Sergey Sharybin [Tue, 22 Nov 2016 11:43:59 +0000 (12:43 +0100)]
GLog: Workaround compilation error on Hurd

There is syscall headers but no SYS_Write syscall.

4 years agoCycles: Fix re-definition of some functions on x32 arch
Sergey Sharybin [Tue, 22 Nov 2016 11:34:23 +0000 (12:34 +0100)]
Cycles: Fix re-definition of some functions on x32 arch

4 years agoFix (unreported) crash when drawing armatures' poses in some cases.
Bastien Montagne [Tue, 22 Nov 2016 11:21:25 +0000 (12:21 +0100)]
Fix (unreported) crash when drawing armatures' poses in some cases.

Was affecting armatures' pose drawing code, could try to draw with
non-updated pose, which may contain NULL bone pointers (e.g. after some
data-block management tool execution, like make local, remapping, etc.).

4 years agoCycles: Another attempt to fix compilation on 32bit Linux
Sergey Sharybin [Tue, 22 Nov 2016 11:11:08 +0000 (12:11 +0100)]
Cycles: Another attempt to fix compilation on 32bit Linux

4 years agoCycles: Attempt to fix 32bit buildbot builds after recent commit
Sergey Sharybin [Tue, 22 Nov 2016 11:05:57 +0000 (12:05 +0100)]
Cycles: Attempt to fix 32bit buildbot builds after recent commit

4 years agoCycles: Implement texture size limit simplify option
Sergey Sharybin [Thu, 17 Nov 2016 11:13:22 +0000 (12:13 +0100)]
Cycles: Implement texture size limit simplify option

Main intention is to give some quick way to control scene's memory
usage by clamping textures which are too big. This is really handy
on the early production stages when you first create really nice
looking hi-res textures and only when it all works and approved
start investing time on optimizing your scene.

This is a new option in Scene Simplify panel and it acts as
following: when texture size is bigger than the given value it'll
be scaled down by half for until it fits into given limit.

There are various possible improvements, such as:

- Use threaded scaling using our own task manager.

  This is actually one of the main reasons why image resize is
  manually-implemented instead of using OIIO's resize. Other
  reason here is that API seems limited to construct 3D texture
  description easily.

- Vectorization of uchar4/float4/half4 textures.

- Use something smarter than box filter.

  Was playing with some other filters, but not sure they are
  really better: they kind of causes more fuzzy edges.

Even with such a TODOs in the code the option is already quite
useful.

Reviewers: brecht

Reviewed By: brecht

Subscribers: jtheninja, Blendify, gregzaal, venomgfx

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

4 years agoGPU: Consider latest Gallium driver an official ATI/AMD
Sergey Sharybin [Tue, 22 Nov 2016 10:38:27 +0000 (11:38 +0100)]
GPU: Consider latest Gallium driver an official ATI/AMD

This will make triple buffer used by default for such configuration.

Ideally we would switch to triple buffer on all platforms, but let's
do it in 2.8 branch and don't open can of worms in master now.

This should solve issues like T49945.

4 years agoGlog: Fix compilation error on ppc64el
Sergey Sharybin [Mon, 21 Nov 2016 20:04:48 +0000 (21:04 +0100)]
Glog: Fix compilation error on ppc64el

This was fixed in upstream already. Time to re-bundle?

4 years agoCLEW: Workaround compilation error on ppc64el
Sergey Sharybin [Mon, 21 Nov 2016 20:03:34 +0000 (21:03 +0100)]
CLEW: Workaround compilation error on ppc64el

Something was conflicting here, causing C++ to consider bool as
a __vector(4) bool.

4 years agoPartly revert own rBb97c567c1df1e, clear_proxy is actually safe.
Bastien Montagne [Mon, 21 Nov 2016 19:57:02 +0000 (20:57 +0100)]
Partly revert own rBb97c567c1df1e, clear_proxy is actually safe.

This is very confusing, in fact, and rna tooltip was wrong,
BKE_object_make_local_ex actually ensures we never have several proxies
of same object, since it always clears proxy when it has to copy object
to make it local...

What that RNA function is probably missing, though, is same logic as in
BKE_library_make_local to actually remap proxy from old linked object to
new local one.

4 years agoFix two very bad issues in new ID.make_local RNA function.
Bastien Montagne [Mon, 21 Nov 2016 14:19:34 +0000 (15:19 +0100)]
Fix two very bad issues in new ID.make_local RNA function.

I) `clear_proxy` parameter was not assigned to parm in RNA define code,
so 'pyfunc optional' flag was set to `new_id` parameter of `user_remap`
func - super ugly!

II) `clear_proxy` parameter itself, when set to False, would allow to
leave .blend file in invalid state (more than one proxy of same object),
this should never, ever be allowed in RNA API imho. Left the PAI
untouched for now, just disabled any effect from this parameter (hence
always clearing proxy when copying).

4 years agoCleanup: get rid of unused `BKE_constraints_relink()`.
Bastien Montagne [Mon, 21 Nov 2016 13:26:35 +0000 (14:26 +0100)]
Cleanup: get rid of unused `BKE_constraints_relink()`.

Libquery/generic ID remapping code handles this now.

4 years agoFix T49981: New Depsgraph - When camera is on inactive layer, it does not evaluate...
Sergey Sharybin [Mon, 21 Nov 2016 13:36:36 +0000 (14:36 +0100)]
Fix T49981: New Depsgraph - When camera is on inactive layer, it does not evaluate constraints

4 years agoCycles: Attempt to fix compilation error on ppc64el
Sergey Sharybin [Mon, 21 Nov 2016 12:32:41 +0000 (13:32 +0100)]
Cycles: Attempt to fix compilation error on ppc64el

There is some define conflict between system headers and clew,
so delay include of clew.h as much as possible.]

This is something which needed to be done in the code before
the refactor, hopefully such change will still work.

4 years agoDepsgraph: Fix infinite viewport object update in CYcles render mode
Sergey Sharybin [Mon, 21 Nov 2016 11:00:09 +0000 (12:00 +0100)]
Depsgraph: Fix infinite viewport object update in CYcles render mode

The issue was caused by wrong object re-tag needed to have proper dependnecies
update for OpenSubdiv.

4 years agoDepsgraph: use more explicit parenthesis
Sergey Sharybin [Mon, 21 Nov 2016 10:05:56 +0000 (11:05 +0100)]
Depsgraph: use more explicit parenthesis

4 years agoFix Xcode link error, missing definitions in RNA C++ API that other compilers ignored.
Brecht Van Lommel [Sun, 20 Nov 2016 16:46:29 +0000 (17:46 +0100)]
Fix Xcode link error, missing definitions in RNA C++ API that other compilers ignored.

4 years agoCycles: Don't shadow loop variable
Mai Lavelle [Sun, 20 Nov 2016 16:46:43 +0000 (11:46 -0500)]
Cycles: Don't shadow loop variable

4 years agoCycles: add basic backwards compatibility for device selection, move to System tab.
Brecht Van Lommel [Sat, 19 Nov 2016 00:15:08 +0000 (01:15 +0100)]
Cycles: add basic backwards compatibility for device selection, move to System tab.

For the multi-GPU case users still have to reconfigure the devices they want to use.

Based on patch from Lukas Stockner.

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

4 years agoCycles: refactor culling code into utility class.
Brecht Van Lommel [Sat, 12 Nov 2016 23:45:16 +0000 (00:45 +0100)]
Cycles: refactor culling code into utility class.

4 years agoCycles: distance culling for objects.
Carlo Andreacchio [Sat, 12 Nov 2016 23:16:50 +0000 (00:16 +0100)]
Cycles: distance culling for objects.

This can be used together with camera culling to keep nearby objects visible in
reflections, using a minimum distance within which objects are visible. It is
also useful to cull small objects far from the camera.

Reviewed By: brecht

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

4 years agoCleanup: harmless mistake in rangetree
Campbell Barton [Sat, 19 Nov 2016 22:11:26 +0000 (09:11 +1100)]
Cleanup: harmless mistake in rangetree

4 years agoGHOST/X11: Incorrect WM_STATE access
Campbell Barton [Sat, 19 Nov 2016 21:58:41 +0000 (08:58 +1100)]
GHOST/X11: Incorrect WM_STATE access

This worked by accident because of struct padding,
treat state as a CARD32 as documented.

Matches wine-x11 usage.

4 years agoFix T50081: Grease pencil parented rotation problem
Antonioya [Sat, 19 Nov 2016 21:41:37 +0000 (22:41 +0100)]
Fix T50081: Grease pencil parented rotation problem

When the parent object matrix change after the layer was parented, the
inverse matrix for strokes must be updated when editing strokes or the
transformations will be wrong.