Jörg Müller [Tue, 8 Nov 2016 23:06:49 +0000 (00:06 +0100)]
Fix: setting an audio callback before audio device initialization.
Sergey Sharybin [Tue, 8 Nov 2016 16:54:14 +0000 (17:54 +0100)]
Depsgraph: Use atomics to tag ID when evaluating driver
This is required since new dependency graph evaluates drivers in threads
so it was possible to have some partially written ID tag there.
Sergey Sharybin [Tue, 8 Nov 2016 16:11:35 +0000 (17:11 +0100)]
Atomics: Add 32 bit version of fetch and AND/OR
Campbell Barton [Tue, 8 Nov 2016 13:04:58 +0000 (00:04 +1100)]
BMesh: remove edge search when flipping faces
Replace search with direct lookup.
Sergey Sharybin [Tue, 8 Nov 2016 10:54:04 +0000 (11:54 +0100)]
Fix memory leak when Blender is build without Bullet and files with RB is opened
Sergey Sharybin [Tue, 8 Nov 2016 10:16:37 +0000 (11:16 +0100)]
Fix T49838: Noise randomization for frame should be done per interframes as well
Add subframe to the animated seed hash calculation.
Should be no difference for the regular files, only for cases when scene is
rendered from sequencer with a speed effect, which is not really a common thing.
Sergey Sharybin [Tue, 8 Nov 2016 09:54:38 +0000 (10:54 +0100)]
Cycles: Only use new light sample threshold for new files
This is a late follow-up commit to the light sample threshold changes which
caused difference in rendering all existing .blend files which is not something
we are happy about: it is fine to use new optimized defaults for new files, but
existing ones should always be rendering in the same way as they used to be.
Sorry for the inconveniece, but such thing should have been done to begin with.
If this setting was modified it will not be reset to zero.
Now all render tests should be passing again.
P.S. Also really annoying to bump subversion for such reasons, but currently we
don't have better way to achieve what we want.
Sergey Sharybin [Tue, 8 Nov 2016 09:40:21 +0000 (10:40 +0100)]
Fix T49937: Blender is crashing because of Lamp Data Node
Lamp Data node requires shadow sample array which is only enabled when
Shadows are enabled in the shading settings.
This commit prevents crash but might not give expected render results
in such a configuration.
Campbell Barton [Mon, 7 Nov 2016 20:05:29 +0000 (07:05 +1100)]
BMesh: remove redundant edge-split loop initialize
Would always set both first1 and first2.
Thomas Dinges [Mon, 7 Nov 2016 19:59:09 +0000 (20:59 +0100)]
Forgot this in last commit. (Brick GLSL).
Thomas Dinges [Mon, 7 Nov 2016 19:55:12 +0000 (20:55 +0100)]
Fix Brick Texture GLSL, broken after Mortar Smooth addition.
Campbell Barton [Fri, 4 Nov 2016 20:05:20 +0000 (07:05 +1100)]
BMesh: remove redundant array size
Correct unhelpful comment & some comment edits.
Rename 'disk_is_flagged' -> 'bm_vert_is_manifold_flagged',
since the check is quite specific.
Campbell Barton [Mon, 7 Nov 2016 17:12:10 +0000 (04:12 +1100)]
BMesh: minor improvement to edge-split assignment
Sergey Sharybin [Thu, 11 Feb 2016 12:51:47 +0000 (13:51 +0100)]
Fix compilation error when CUDA toolkit is not installed
After CUDA dynload changes having CUDA toolkit became required
in order to compile Cycles. This only happened due to wrong
default value to the option.
Sergey Sharybin [Mon, 7 Nov 2016 13:29:11 +0000 (14:29 +0100)]
Buildbot: Update copy of buildbot master configuration
Lukas Stockner [Mon, 7 Nov 2016 12:22:53 +0000 (13:22 +0100)]
Cycles: Remove device settings from performance tab
This was included in the commit by accident, it doesn't belong there.
Sergey Sharybin [Mon, 7 Nov 2016 11:50:45 +0000 (12:50 +0100)]
Depsgraph: Disable timing profile
Martijn Berger [Mon, 7 Nov 2016 11:32:00 +0000 (12:32 +0100)]
fix building depsgraph after recent changes
Sergey Sharybin [Mon, 7 Nov 2016 11:09:42 +0000 (12:09 +0100)]
Depsgraph: Do not rely on indirectly included cstring
Also add comment why exactly cstring is needed.
Sergey Sharybin [Fri, 4 Nov 2016 16:46:41 +0000 (17:46 +0100)]
Proxy: Construct pchan hash when syncing armature proxy
This makes bone lookup much faster (by avoiding liner string lookup)
and speeds up depsgraph construction time on file open.
Sergey Sharybin [Fri, 4 Nov 2016 16:45:14 +0000 (17:45 +0100)]
Despgraph: Optimize cycles detection algorithm
The idea is simple: when falling back to one of the nodes which was partially
handled we "resume" checking outgoing relations from the index which we stopped.
This gives about 15-20% depsgraph construction time save.
Sergey Sharybin [Thu, 3 Nov 2016 16:47:38 +0000 (17:47 +0100)]
Depsgraph: Speedup initial rig build time
We don't need to sort bone channels, it's all taken care about
by the depsgraph itself.
Gives up to 30% initial rig construction time speedup.
Sergey Sharybin [Thu, 3 Nov 2016 15:25:26 +0000 (16:25 +0100)]
Depsgraph: Move key implementation from header to dedicated file
Sergey Sharybin [Thu, 3 Nov 2016 15:03:12 +0000 (16:03 +0100)]
Depsgraph: Move class implementation from header to implementation files
This is more proper way to go:
- Avoids re-compilation of all dependent files when implementation changes
without changed API,
- Linker should have much simpler time now de-duplicating and getting rid
of redundant implementations.
Sergey Sharybin [Thu, 3 Nov 2016 13:45:47 +0000 (14:45 +0100)]
Depsgraph: Fully switch from string to const char*
This brings up to 10-20% depsgraph build time improvement in the layout
files from the studio repository.
Sergey Sharybin [Thu, 3 Nov 2016 13:31:27 +0000 (14:31 +0100)]
Depsgraph: Add extra name tag for operation nodes
The idea here is to address issue that name on it's own is not
always unique: for example, when adding driver operations the
name used for nodes is the RNA path (and multiple drivers can
write to different array indices of the path). Basically, now
it's possible to pass extra integer value to distinguish
operations in such cases.
So now we've already switched from sprintf() to construct unique
operation name to pass RNA path and array index.
There should be no functional changes yet, but this work is
required for further work about replacing string with const
char*.
Sergey Sharybin [Thu, 3 Nov 2016 13:22:41 +0000 (14:22 +0100)]
Depsgraph: Cleanup, operation has name, not description
Hopefully should make things more clear here.
Sergey Sharybin [Thu, 3 Nov 2016 13:18:19 +0000 (14:18 +0100)]
Depsgraph: Remove unused function
A residue from times where we thought to do partial graph updates,
which we are not committing any time soon.
Sergey Sharybin [Thu, 3 Nov 2016 11:14:47 +0000 (12:14 +0100)]
Depsgraph: Use const char for component API
Sergey Sharybin [Thu, 3 Nov 2016 11:08:47 +0000 (12:08 +0100)]
Depsgraph: Remove some includes which seems unused
Sergey Sharybin [Thu, 3 Nov 2016 11:01:45 +0000 (12:01 +0100)]
Depsgraph: Use const char instead of string in part of drivers construction
Sergey Sharybin [Thu, 3 Nov 2016 10:50:18 +0000 (11:50 +0100)]
Depsgraph: Switch away form string to const char* for node names
There is no real reason to have nodes storing heap-allocated name
and description. Doing this increases amount of allocations during
dependency graph building, which usually means somewhat slowness.
We're temporarily loosing some eyecandy in the graphviz visualizer,
but those we can bring back as a part of graphiz dump (which happens
much less often than depsgraph build).
This will happen in multiple commits for the ease of bisect in the
future just in case this causes any regression. This commit contains
ID creation API changes.
Sergey Sharybin [Thu, 3 Nov 2016 10:36:35 +0000 (11:36 +0100)]
Depsgraph: Remove prototype of unused and non-implemented method
Alexander Gavrilov [Mon, 7 Nov 2016 09:56:58 +0000 (12:56 +0300)]
Expose Bullet rotational spring settings in the UI.
Bullet spring constraint already supports rotational springs, but
they are not exposed in blender UI, likely due to a simple oversight.
Supporting them is as simple as adding a few DNA/RNA properties
with appropriate UI and passing them on to Bullet.
Reviewers: sergof
Reviewed By: sergof
Differential Revision: https://developer.blender.org/D2331
Lukas Stockner [Mon, 7 Nov 2016 01:33:53 +0000 (02:33 +0100)]
Cycles: Refactor Device selection to allow individual GPU compute device selection
Previously, it was only possible to choose a single GPU or all of that type (CUDA or OpenCL).
Now, a toggle button is displayed for every device.
These settings are tied to the PCI Bus ID of the devices, so they're consistent across hardware addition and removal (but not when swapping/moving cards).
From the code perspective, the more important change is that now, the compute device properties are stored in the Addon preferences of the Cycles addon, instead of directly in the User Preferences.
This allows for a cleaner implementation, removing the Cycles C API functions that were called by the RNA code to specify the enum items.
Note that this change is neither backwards- nor forwards-compatible, but since it's only a User Preference no existing files are broken.
Reviewers: #cycles, brecht
Reviewed By: #cycles, brecht
Subscribers: brecht, juicyfruit, mib2berlin, Blendify
Differential Revision: https://developer.blender.org/D2338
Lukas Stockner [Sun, 6 Nov 2016 18:12:45 +0000 (19:12 +0100)]
Cycles: Fix T49952: Bad MIS sampling of backgrounds with single bright pixels
With this fix, using a MIS map resolution equal to the image size for closest imterpolation or twice the size for linear interpolation gets rid of all fireflies.
Previously, a much higher resolution was needed to get acceptable noise levels.
lazydodo [Sat, 5 Nov 2016 20:04:23 +0000 (14:04 -0600)]
MSVC Runtime copy : Remove erroneously left in diagnostic message from CMakeLists.txt
lazydodo [Sat, 5 Nov 2016 19:58:32 +0000 (13:58 -0600)]
[msvc2015] Add support for copying the vc runtime.
There's more dll's hanging out in the ucrt folder, but I just grabbed the ones blender requested (not sure if that's a wise idea, but it seems to work)
Reviewers: sergey, juicyfruit
Reviewed By: juicyfruit
Differential Revision: https://developer.blender.org/D2335
Martijn Berger [Sat, 5 Nov 2016 13:23:00 +0000 (14:23 +0100)]
change default for quicktime suport for macOS to off
Martijn Berger [Fri, 4 Nov 2016 13:49:54 +0000 (14:49 +0100)]
cycles, cuDeviceComputeCapability is deprecated as of cuda 5.0
Bastien Montagne [Fri, 4 Nov 2016 08:55:46 +0000 (09:55 +0100)]
Fix T49905: Segfault when copying object data of linked object.
We have to clear `newid` of all datablocks, not only object ones.
Note that this whole stuff is still using some kind of older, primitive
'ID remapping', would like to see whether we can replace it with new,
more generic one, but that's for another day.
Bastien Montagne [Fri, 4 Nov 2016 07:30:22 +0000 (08:30 +0100)]
Fix (unreported) asserts in `make_object_duplilist_real()`.
Code would try to add multiple time the same key in `parent_gh` (for this
ghash a lot of dupliobjects may generate same key).
Was making the tool unusable in debug builds.
Also optimise things a bit by avoiding creating parent_gh when only
`use_base_parent` is set.
Bastien Montagne [Fri, 4 Nov 2016 07:11:40 +0000 (08:11 +0100)]
Fix T49918: Make duplicates real crash on clicking operator toggles.
handle_mutex may be NULL here...
Bastien Montagne [Thu, 3 Nov 2016 20:06:10 +0000 (21:06 +0100)]
Fix T49903: Blender crashes -> Append Group incl. Object using boolean modifier
New code dealing with getting rid of lib-only cycles of data-blocks
could add several time the same datablock to the list of candidates. Now
this is avoided, and pointers are further cleaned up as double-safety
measure.
Bastien Montagne [Thu, 3 Nov 2016 19:08:04 +0000 (20:08 +0100)]
install_deps cleanup: some Debian stuff was still present in the 'generic compile-only' part of the script.
Bastien Montagne [Wed, 2 Nov 2016 14:11:58 +0000 (15:11 +0100)]
Add 'Set From Faces' tool to custom split normals.
Feature request during bconf, makes sense to have it even as an hack for
now, since this is probably one of the most common use cases. This should
be redone in bmesh once we have proper custom noramls handling in edit mode...
Sergey Sharybin [Thu, 3 Nov 2016 12:24:41 +0000 (13:24 +0100)]
Depsgraph: Add code for timing despgraph builder
Lukas Stockner [Thu, 3 Nov 2016 11:38:00 +0000 (12:38 +0100)]
Cycles: Fix missing underscore in geom_object.h
Sergey Sharybin [Thu, 3 Nov 2016 10:31:49 +0000 (11:31 +0100)]
Fix T49826: NEW-DEPSGRAPH - Texture is not updated after changing its space color
The issue was caused by image ID nodes not being in the depsgraph.
Now, tricky part: we only add nodes but do not add relations yet. Reasoning:
- It's currently important to only call editor's ID update callback to solve
the issue, without need to flush changes somewhere deeper.
- Adding relations might cause some unwanted updates, so will leave that for
a later investigation.
Sergey Sharybin [Thu, 3 Nov 2016 10:19:42 +0000 (11:19 +0100)]
Depsgraph: Fix wrong comparison of ID type vs. node type
Sergey Sharybin [Thu, 3 Nov 2016 09:25:31 +0000 (10:25 +0100)]
Fix T49857: Blender crashes after adding texture node to compositing tree
Lukas Stockner [Thu, 3 Nov 2016 02:15:39 +0000 (03:15 +0100)]
Cycles: Fix OpenCL build error caused by light termination commit
Lukas Stockner [Thu, 3 Nov 2016 02:08:14 +0000 (03:08 +0100)]
Cycles: Fix T49901: OpenCL build error after recent light texture coordinate commit
Basically, the problem here was that the transform that's used to bring texture coordinates
to world space is either fetched while setting up the shader (with Object Motion is enabled) or
fetched when needed (otherwise). That helps to save ShaderData memory on OpenCL when Object Motion isn't needed.
Now, if OM is enabled, the Lamp transform can just be stored inside the ShaderData as well. The original commit just assumed it is.
However, when it's not (on OpenCL by default, for example), there is no easy way to fetch it when needed, since the ShaderData doesn't
store the Lamp index.
So, for now the lamps just don't support local texture coordinates anymore when Object Motion is disabled.
To fix and support this properly, one of the following could be done:
- Just always pre-fetch the transform. Downside: Memory Usage increases when not using OM on OpenCL
- Add a variable to ShaderData that stores the Lamp ID to allow fetching it when needed
- Store the Lamp ID inside prim or object. Problem: Cycles currently checks these for whether an object was hit - these checks would need to be changed.
- Enable OM whenever a Texture Coordinate's Normal output is used. Downside: Might not actually be needed.
Sergey Sharybin [Wed, 2 Nov 2016 17:05:38 +0000 (18:05 +0100)]
Depsgraph: Fix race condition writing drivers to array property
Animation system has separate fcurves for each of array elements and
dependency graph creates separate nodes for each of fcurve, This is
needed to keep granularity of updates, but causes issues because
animation system will actually write the whole array to property when
modifying single value (this is a limitation of RNA API).
Worked around by adding operation relation between array drivers
so we never write same array form multiple threads.
Sergey Sharybin [Wed, 2 Nov 2016 14:35:18 +0000 (15:35 +0100)]
tests: Update hash for OBJ
Was a recent update of UV precision.
Sergey Sharybin [Wed, 2 Nov 2016 14:32:11 +0000 (15:32 +0100)]
Libmv: Update tests to make tests pass after recent Ceres update
Just a precision issue, difference is around 1e-7. Should be fine to
simply update expected value.
Sergey Sharybin [Wed, 2 Nov 2016 14:09:32 +0000 (15:09 +0100)]
Solve threading conflict when calculating smooth normals
It was possible to have synchronization issues whe naccumulating smooth
normal to a vertex, causing shading artifacts during playback.
Bug found by Dalai, thanks!
Gaia Clary [Wed, 2 Nov 2016 13:11:46 +0000 (14:11 +0100)]
COLLADA: Removed obsolete Export select option 'Both' which created invalid data (duplicate transformation information for nodes)
Sergey Sharybin [Wed, 2 Nov 2016 11:23:00 +0000 (12:23 +0100)]
Depsgraph: Fix some errors printed to the console
They were not real issues, it's just some areas of code tried to create
relations between non-existing nodes without checking whether such
relations are really needed.
Now it should be easier to see real bugs printed.
Hopefully should be no regressions here.
Martijn Berger [Wed, 2 Nov 2016 09:54:47 +0000 (10:54 +0100)]
Cycles standalone, compile fix UINT_MAX is not defined in device_cuda.cpp
Sergey Sharybin [Wed, 2 Nov 2016 09:42:15 +0000 (10:42 +0100)]
CMake: Make ld.gold linker optional
Some platforms are having hard time using this linker so added an option
to not use it. The options is an advanced one and enabled by default so
should not cause any changes for current users.
Sergey Sharybin [Wed, 2 Nov 2016 09:32:46 +0000 (10:32 +0100)]
CMake: Fix use of some option which was never defined
This way it seems more logical to me.
lazydodo [Tue, 1 Nov 2016 21:30:12 +0000 (15:30 -0600)]
[msvc/make.bat] Detect spaces in the build path and error out.
Dalai Felinto [Tue, 1 Nov 2016 21:09:42 +0000 (22:09 +0100)]
Change frame for animations should not bein the UNDO stack
Request from Hjalti Hjalmarsson for the animation work.
Basically a common part of the workflow of animation is to change the pose, scrub back and forth a few times and roll back the changes when unsatisfied.
However if you go back and forth too many times the UNDO stack would be full, and it would not be possible to bring back the previous pose.
I'm leaving clip_editor change frames as it is for now. But we can
probably change the behaviour there as well.
Bastien Montagne [Tue, 1 Nov 2016 13:59:12 +0000 (14:59 +0100)]
Add 'copy array' for rna buttons
ctrl-alt-c/v allows to copy/paste whole RNA array, e.g. location, rotation, etc., from UI buttons.
Request from Andy at the studio.
Bastien Montagne [Tue, 1 Nov 2016 12:39:31 +0000 (13:39 +0100)]
Fix T49856: Blender 2.78 crashes after loading data from a blendfile
Issue here was that py API code was keeping references (pointers) to the
liniked data-blocks, which can actually be duplicated and then deleted
during the 'make local' process...
Would have like to find a better way than passing optional GHash to get
the oldid->newid mapping, but could not think of a better idea.
Sergey Sharybin [Tue, 1 Nov 2016 10:29:33 +0000 (11:29 +0100)]
Ceres: Update to the latest actual version
Brings all the fixes and improvements done in upstream within the last 13 months.
Sybren A. Stüvel [Mon, 31 Oct 2016 14:31:47 +0000 (15:31 +0100)]
Added 'delete unlocked vertex groups' option.
Campbell Barton [Mon, 31 Oct 2016 11:52:06 +0000 (22:52 +1100)]
BMesh: radial loop (internal API symmetry)
Radial append/remove had swapped args and *slightly* different behavior.
- bmesh_radial_append(edge, loop)
- bmesh_radial_loop_remove(loop, edge)
Match logic for append/remove,
Logic for the one case where the edge needs to be left untouched
has been moved to: `bmesh_radial_loop_unlink`.
Campbell Barton [Mon, 31 Oct 2016 11:07:23 +0000 (22:07 +1100)]
BMesh: simplify vert & edge removal
Campbell Barton [Sat, 29 Oct 2016 11:31:01 +0000 (22:31 +1100)]
BMesh: remove redundant walker member & assignment
Lukas Stockner [Sun, 30 Oct 2016 23:40:05 +0000 (00:40 +0100)]
Cycles: Deduplicate AO calculation
No functional changes.
Julian Eisel [Sun, 30 Oct 2016 23:08:13 +0000 (00:08 +0100)]
UI: Don't show empty panel right-click menu
Lukas Stockner [Sun, 30 Oct 2016 15:25:35 +0000 (16:25 +0100)]
Cycles: Fix OpenCL compilation with the new brick texture
Lukas Stockner [Sun, 30 Oct 2016 12:51:03 +0000 (13:51 +0100)]
Cycles: Style Fix: Light sampling threshold description
Kévin Dietrich [Sun, 30 Oct 2016 11:29:05 +0000 (12:29 +0100)]
Viewport smoke: add support to render the volume using a color ramp.
This is yet another debug option that allows to render an arbitrary
simulation field by using a color ramp to inspect its voxel values.
Note that when using this, fire rendering is turned off.
Reviewers: plasmasolutions, gottfried
Differential Revision: https://developer.blender.org/D1733
Lukas Stockner [Sat, 29 Oct 2016 22:56:39 +0000 (00:56 +0200)]
Cycles: Initialize the RNG state from the kernel instead of the host
This allows to save a memory copy, which will be particularly useful for network rendering.
Reviewers: sergey, brecht, dingto, juicyfruit, maiself
Differential Revision: https://developer.blender.org/D2323
Lukas Stockner [Sat, 29 Oct 2016 21:47:30 +0000 (23:47 +0200)]
Cycles: Add optional probabilistic termination of light samples based on their expected contribution
In scenes with many lights, some of them might have a very small contribution to some pixels, but the shadow rays are traced anyways.
To avoid that, this patch adds probabilistic termination to light samples - if the contribution before checking for shadowing is below a user-defined threshold, the sample will be discarded with probability (1 - (contribution / threshold)) and otherwise kept, but weighted more to remain unbiased.
This is the same approach that's also used in path termination based on length.
Note that the rendering remains unbiased with this option, it just adds a bit of noise - but if the setting is used moderately, the speedup gained easily outweighs the additional noise.
Reviewers: #cycles
Subscribers: sergey, brecht
Differential Revision: https://developer.blender.org/D2217
Kévin Dietrich [Sun, 30 Oct 2016 02:42:46 +0000 (03:42 +0100)]
Fix compile errors for when WITH_ALEMBIC is OFF.
Lukas Stockner [Sat, 29 Oct 2016 23:33:10 +0000 (01:33 +0200)]
Cycles: Add smoothing option to the Brick Texture
This option allows to create a smoother transition between Bricks and Mortar - 0 applies no smoothing, and 1 smooths across the whole mortar width.
Mainly useful for displacement textures.
The new default value for the smoothing option is 0.1 to give some smoothing that helps with antialiasing, but existing nodes are loaded with smoothing 0 to preserve compatibility.
Reviewers: sergey, dingto, juicyfruit, brecht
Reviewed By: brecht
Subscribers: Blendify, nutel
Differential Revision: https://developer.blender.org/D2230
Lukas Stockner [Sat, 29 Oct 2016 18:06:52 +0000 (20:06 +0200)]
Fix T49846: OpenCL rendering compilation failure
Lukas Stockner [Sat, 29 Oct 2016 16:54:42 +0000 (18:54 +0200)]
Cycles: Implement texture coordinates for Point, Spot and Area Lamps
When using the Normal output of the Texture Coordinate node on Point and Spot lamps, the coordinates now depend on the rotation of the lamp.
On Area lamps, the Parametric output of the Geometry node now returns UV coordinates on the area lamp.
Credit for the Area lamp part goes to Stefan Werner (from D1995).
Kévin Dietrich [Sat, 29 Oct 2016 14:22:33 +0000 (16:22 +0200)]
Fix T49878: Alembic crash with long object name
Crash comes from writing to char array (ID::name) out its bound and thus
overriding memory in the ID struct.
Kévin Dietrich [Sat, 29 Oct 2016 10:23:09 +0000 (12:23 +0200)]
Alembic: store a pointer to the object reader in the cache modifiers and
constraints.
This avoids traversing the archive everytime object data is needed and
gives an overall consistent ~2x speedup here with files containing
between 136 and 500 Alembic objects. Also this somewhat nicely de-
duplicates code between data creation (upon import) and data streaming
(modifiers and constraints).
The only worying part is what happens when a CacheFile is deleted and/or
has its path changed. For now, we traverse the whole scene and for each
object using the CacheFile we free the pointer and NULL-ify it (see
BKE_cachefile_clean), but at some point this should be re-considered and
make use of the dependency graph.
Kévin Dietrich [Sat, 29 Oct 2016 09:04:51 +0000 (11:04 +0200)]
Alembic export: fix frame range values being reset at every update, draw
call.
Kévin Dietrich [Fri, 28 Oct 2016 16:26:34 +0000 (18:26 +0200)]
Cleanup: avoid using G.main.
Kévin Dietrich [Fri, 28 Oct 2016 16:21:43 +0000 (18:21 +0200)]
Alembic Export: set start and end frame to that of the scene for
convenience.
Users will most likely export an entire animation rather than a single
frame, so it can save a few clicks.
Kévin Dietrich [Fri, 28 Oct 2016 16:01:42 +0000 (18:01 +0200)]
CacheFile: fix missing depsgraph update.
Kévin Dietrich [Fri, 28 Oct 2016 15:56:09 +0000 (17:56 +0200)]
CacheFile: only enable scale property slider if we are editing the cache
through a constraint.
It doesn't make sense and is a bit confusing to have this property
enabled in the modifier context.
Nathan Letwory [Fri, 28 Oct 2016 08:54:01 +0000 (11:54 +0300)]
Compile fix for Windows.
__inline instead of inline is needed.
Bastien Montagne [Thu, 27 Oct 2016 11:23:29 +0000 (13:23 +0200)]
Fix T49743: Adding torus in edit mode local mode shows error
The 'local' layers were not correctly set when redoing 'add object'
addons using object_utils.py helper (we always want to restore layers
from view in local view, even if we set 'real' layers from operator
afterwards).
Bastien Montagne [Thu, 27 Oct 2016 07:51:10 +0000 (09:51 +0200)]
Fix T49829: Removal of custom icon previews during add-on unregister crashes Blender.
Issue was happening when removal of custom icons was done while they
were still being rendered by preview job.
Now add a 'deffered deletion' system, to prevent main thread to delete
preview image until loading thread is done with them.
Note that ideally, calling `ED_preview_kill_jobs()` on custom icon
removal would have been simpler, but we don't have easy access to
context here...
Sergey Sharybin [Thu, 27 Oct 2016 10:51:03 +0000 (12:51 +0200)]
Cycles: More workarounds for weird crashes on AVX2
Oh man, is it a compiler bug? Is it something we do stupid?
For now more crap to prevent crashes. During the conference will talk to
Maxyn about how can we troubleshoot such weird issues.
Sergey Sharybin [Wed, 26 Oct 2016 20:14:41 +0000 (22:14 +0200)]
Cycles: Another attempt to fix crashes on AVX2 processors
Basically don't use rcp() in areas which seems to be critical after
second look. Also disabled some multiplication operators, not sure
yet why they might be a problem.
Tomorrow will be setting up a full test with all cases which were
buggy in our farm to see if this fix is complete.
Sergey Sharybin [Wed, 26 Oct 2016 18:49:33 +0000 (20:49 +0200)]
Cycles: Fix compilation error of AVX2 kernel without SSE math
Sergey Sharybin [Wed, 26 Oct 2016 13:23:58 +0000 (15:23 +0200)]
Cycles: Completely disable transform SSE for now
Was causing issues on another frame.
On a tight schedule, disabling for now so artists are happy.
Still looking into root of the issue!
Sergey Sharybin [Wed, 26 Oct 2016 12:27:31 +0000 (14:27 +0200)]
Cycles: Fix crashes after recent optimization commits
There is some precision issues for big magnitude coordinates which started
to give weird behavior of release builds. Some weird memory usage in BVH
which is tricky to nail down because only happens in release builds and GDB
reports all variables as optimized out when trying to use RelWithDebInfo.
There are two things in this commit:
- Attempt to make vectorized code closer to original one, hoping that it'll
eliminate precision issue.
This seems to work for transform_point().
- Similar trick did not work for transform_direction() even tho absolute
error here is much smaller. For now disabled that function, need a more
careful look here.
Campbell Barton [Thu, 13 Oct 2016 04:51:20 +0000 (15:51 +1100)]
RangeTree API rewrite
Rewrite the current range-tree API used by dyn-topo undo
to avoid inefficiencies from stdc++'s set use.
- every call to `take_any` (called for all verts & faces)
removed and added to the set.
- further range adjustment also took 2x btree edits.
This patch inlines a btree which is modified in-place,
so common resizing operations don't need to perform a remove & insert.
Ranges are stored in a list so `take_any` can access the first item
without a btree lookup.
Since range-tree isn't a bottleneck in sculpting, this only gives minor speedups.
Measured approx ~15% overall faster calculation for sculpting,
although this number time doesn't include GPU updates and depends on how
much edits fragment the range-tree.
Campbell Barton [Wed, 26 Oct 2016 09:26:32 +0000 (20:26 +1100)]
BLI_bitmap_draw_2d: optimize polygon filling
Existing method was fine for basic polygons but didn't scale well
because its was checking all coordinates for every y-pixel.
Heres an optimized version.
Basic logic remains the same this just maintains an ordered list of intersections,
tracking in-out points, to avoid re-computing every row,
this means sorting is only done once when out of order segments are found,
the segments only need to be re-ordered if they cross each other.
Speedup isn't linear, test with full-screen complex lasso gave 11x speedup.
Campbell Barton [Wed, 26 Oct 2016 09:14:48 +0000 (20:14 +1100)]
Cleanup: rename functions in BLI_bitmap_draw_2d