5 years agoMerge branch 'temp_remove_particles' into blender2.8
Lukas Tönne [Mon, 2 May 2016 09:00:26 +0000 (11:00 +0200)]
Merge branch 'temp_remove_particles' into blender2.8

5 years agoFix compilation error on Armel architecture
Sergey Sharybin [Mon, 2 May 2016 07:55:08 +0000 (09:55 +0200)]
Fix compilation error on Armel architecture

__GCC_HAVE_SYNC_COMPARE_AND_SWAP_n are not defined on this architecture
for some reason, however those functions are available.

Adding a workaround for newly used __sync_fetch_and_and() function.

5 years agoFix T48325: Data transfer modifier vertex group selector doesn't work with freestyle...
Bastien Montagne [Sun, 1 May 2016 13:36:09 +0000 (15:36 +0200)]
Fix T48325: Data transfer modifier vertex group selector doesn't work with freestyle data.

Freestyle edge/face marks are (afaik) our only actual customdata bitflags... Original work
kinda assumed we had no such things. :P

5 years agoFix Cycles external OSL shader not working with relative file paths.
Brecht Van Lommel [Sat, 30 Apr 2016 22:50:49 +0000 (00:50 +0200)]
Fix Cycles external OSL shader not working with relative file paths.

5 years agoFix T48118: Vertex Groups not masking particle hair emission correctly
Bastien Montagne [Sat, 30 Apr 2016 14:51:06 +0000 (16:51 +0200)]
Fix T48118: Vertex Groups not masking particle hair emission correctly

Own regression from rB019ce363b01bba0af, not totally sure why removing the heading
zero value in element_sum broke binary search distribution in random branch, but...

New code makes thing sooo much simpler, by simply getting rid of all zero-weight
items in element_sum (at the cost of adding a temporary extra index mapping array),
that way neither random nor 'even ordered' distribution code has to wory anymore
about skipping zero-weighted items!

5 years agoSlight adjustment to curve fitting tangents
Campbell Barton [Sat, 30 Apr 2016 06:27:43 +0000 (16:27 +1000)]
Slight adjustment to curve fitting tangents

Don't let the point spacing give bias to a side.

5 years agoFix for typo comparing double events
Campbell Barton [Sat, 30 Apr 2016 06:18:29 +0000 (16:18 +1000)]
Fix for typo comparing double events

Also remove doubles when filling the final array.

5 years agoCleanup: warnings. spelling
Campbell Barton [Fri, 29 Apr 2016 18:04:18 +0000 (04:04 +1000)]
Cleanup: warnings. spelling

5 years agoFix (unreported) bad 'NULL freeing' with placeholder images.
Bastien Montagne [Fri, 29 Apr 2016 16:05:49 +0000 (18:05 +0200)]
Fix (unreported) bad 'NULL freeing' with placeholder images.

Looks like code expects some initialized Image data after all, so do it
for placeholders as well (using default generated UV grid).

5 years agoFix crash (segfault) in node editor.
Bastien Montagne [Fri, 29 Apr 2016 15:37:00 +0000 (17:37 +0200)]
Fix crash (segfault) in node editor.

In some cases, we can have nodegroups without attached nodetree, this case is checked
in top `node_group_has_output()` entry point, but not in recursive `node_group_has_output_dfs()`.

Issue appeared after rB42824f4403db3a35, presumably because check on node flag itself
was skipping that case, which is no more possible when using ID tags.

Reported by sebastian_k over IRC, thanks.

5 years agoFix broken Collada from rBrB6d0cae56e84306ed.
Bastien Montagne [Fri, 29 Apr 2016 14:56:20 +0000 (16:56 +0200)]
Fix broken Collada from rBrB6d0cae56e84306ed.

5 years agoinstall_deps: add support for OpenVDB.
Ejner Fergo [Fri, 29 Apr 2016 14:45:09 +0000 (16:45 +0200)]
install_deps: add support for OpenVDB.

Note that recent DEB-based distro have packages for this, even simpler!

Differential Revision:

5 years agoinstall_deps: add check for glew version, too old ones are not compatible with OSD.
Ejner Fergo [Fri, 29 Apr 2016 14:42:11 +0000 (16:42 +0200)]
install_deps: add check for glew version, too old ones are not compatible with OSD.

In case too old system glew is detected, use the one shipped with blender.

Part of D1933.

5 years agoinstall_deps: bunch of cleanups, tweaks and micro-fixes.
Ejner Fergo [Fri, 29 Apr 2016 14:35:37 +0000 (16:35 +0200)]
install_deps: bunch of cleanups, tweaks and micro-fixes.

This commit mostly:
* removes some (very) old messages or hacks (like those for ubuntu 10.4...).
* Moves lib-specific dependencies installations to upper level
  (simpler to manage, and those are small enough packages).
* Uses new dnf package manager for fedora (sigh, we now have tree different commands for fed/suse/rehl).
* fixes or enhances some options for commandline tools.
* Force anew building of oiio package, due to insane dependencies of this one in recent distro.

Part of D1933.

5 years agoFix T48290: Hook fails after deleting geometry
Campbell Barton [Fri, 29 Apr 2016 12:33:06 +0000 (22:33 +1000)]
Fix T48290: Hook fails after deleting geometry

Now CD_SHAPEKEY_INDEX customdata is stored in edit-mode when hooks and vertex parents are used.

This also fixes a bug where undo would loose key-index data.

Move to structs for BM_mesh_bm_to/from_me to avoid passing many argument, which mostly aren't used.

5 years agoBMesh: when multiple vertices have the same key-index, use the first
Campbell Barton [Fri, 29 Apr 2016 11:47:05 +0000 (21:47 +1000)]
BMesh: when multiple vertices have the same key-index, use the first

Simple error case where many vertices share an original index,
now use the first match instead of the last.

5 years agoFix T48298: Cycles World environment Texture node, movie doesn't update frame
Sergey Sharybin [Fri, 29 Apr 2016 08:54:40 +0000 (10:54 +0200)]
Fix T48298: Cycles World environment Texture node, movie doesn't update frame

5 years agoRemove redundant selection flush call
Campbell Barton [Fri, 29 Apr 2016 07:29:23 +0000 (17:29 +1000)]
Remove redundant selection flush call

5 years agoMinor optimization to bmesh shape key conversion
Campbell Barton [Fri, 29 Apr 2016 05:02:04 +0000 (15:02 +1000)]
Minor optimization to bmesh shape key conversion

Avoid linked linked loop and custom-data lookups per vertex,
use a table of shape-keys with array offsets instead.

5 years agoFix T48301: Cycles incorrect render with CMJ and viewport samples 0.
Brecht Van Lommel [Thu, 28 Apr 2016 21:46:00 +0000 (23:46 +0200)]
Fix T48301: Cycles incorrect render with CMJ and viewport samples 0.

Max samples 2147483647 was causing integer overflow.

5 years agoMerge branch 'master' into temp_remove_particles temp_remove_particles
Lukas Tönne [Thu, 28 Apr 2016 15:33:19 +0000 (17:33 +0200)]
Merge branch 'master' into temp_remove_particles

5 years agoFix T48300: 3D view tools outside the 3d view crash
Campbell Barton [Thu, 28 Apr 2016 14:00:43 +0000 (00:00 +1000)]
Fix T48300: 3D view tools outside the 3d view crash

5 years agoPython: install pyconfig.h on OSX, needed for PIP
Campbell Barton [Thu, 28 Apr 2016 10:43:14 +0000 (20:43 +1000)]
Python: install pyconfig.h on OSX, needed for PIP

5 years agoFix T47715: EXCEPTION_ACCESS_VIOLATION crash when removing modifiers or rendering
Sergey Sharybin [Thu, 28 Apr 2016 10:29:42 +0000 (12:29 +0200)]
Fix T47715: EXCEPTION_ACCESS_VIOLATION crash when removing modifiers or rendering

The issue was caused by missing indirect dependencies from other scenes in the
current scene depsgraph, which was causing some threading conflicts.

Not sure what would be ideal solution here, for now use stupid but rather robust
approach to solve that. Maybe there's something better to do here tho.

5 years agoDepsgraph optimization: Don't schedule tasks for empty "NOOP" nodes.
Lukas Tönne [Thu, 28 Apr 2016 09:10:54 +0000 (11:10 +0200)]
Depsgraph optimization: Don't schedule tasks for empty "NOOP" nodes.

Currently a lot of the nodes in the new dependency graph are empty placeholders
for organizational purposes. These nodes would, however, still be assigned a task
which gets scheduled and takes up some time for worker threads to pop from the
queue and run. This can be avoided by skipping these nodes during depsgraph
scheduling, and scheduling their childrent right away. Gives a few percent speedup
in BlenRig.

5 years agoFix for O(N^2) runtime tagging in the new depsgraph.
Lukas Tönne [Thu, 28 Apr 2016 10:00:51 +0000 (12:00 +0200)]
Fix for O(N^2) runtime tagging in the new depsgraph.

Some of the tagging functions would be called for every operation, and then
in turn tag their ID nodes with all their operations again. With extensive rigs
we get ID nodes with a lot (10,000+) operation nodes, which leads to millions
of unnecessary tagging calls.

5 years ago3D Text: avoid checking null character's text on path
Campbell Barton [Thu, 28 Apr 2016 05:56:41 +0000 (15:56 +1000)]
3D Text: avoid checking null character's text on path

Redundant and causes complications when improving text code.

5 years agoImage view selected didn't account for region size
Campbell Barton [Thu, 28 Apr 2016 03:25:26 +0000 (13:25 +1000)]
Image view selected didn't account for region size

Now fit the selection with a 1.4x margin (matching 3d view).

Also move border fitting into own function.

5 years agoBMesh: limited-dissolve, add check for wire edges
Campbell Barton [Thu, 28 Apr 2016 02:48:13 +0000 (12:48 +1000)]
BMesh: limited-dissolve, add check for wire edges

Recent degenerate check crashed on chains of wire edges

5 years agoMinor code simplification in previous commit.
Brecht Van Lommel [Wed, 27 Apr 2016 20:58:00 +0000 (22:58 +0200)]
Minor code simplification in previous commit.

5 years agoFix compiler warning on OS X / clang.
Brecht Van Lommel [Wed, 27 Apr 2016 19:41:40 +0000 (21:41 +0200)]
Fix compiler warning on OS X / clang.

5 years agoNodes: sort builtin compositor/shader/texture nodes alphabetically in menus
Brecht Van Lommel [Tue, 26 Apr 2016 22:58:25 +0000 (00:58 +0200)]
Nodes: sort builtin compositor/shader/texture nodes alphabetically in menus

Reviewed By: lukastoenne, dingto, Severin, carter2422

Differential Revision:

5 years agoFix artifacts w/ low near clear in bglPolygonOffset
Alexander Romanov [Wed, 27 Apr 2016 09:14:13 +0000 (19:14 +1000)]
Fix artifacts w/ low near clear in bglPolygonOffset

5 years agoSequencer: skip text-effect rendering w/ no alpha
Campbell Barton [Wed, 27 Apr 2016 05:55:50 +0000 (15:55 +1000)]
Sequencer: skip text-effect rendering w/ no alpha

5 years agoSequencer text strip color options
Campbell Barton [Wed, 27 Apr 2016 05:49:13 +0000 (15:49 +1000)]
Sequencer text strip color options

D1930 by @NiKoZLaB

5 years agoFix alpha blending w/ font drawing & byte buffer
Campbell Barton [Wed, 27 Apr 2016 05:47:49 +0000 (15:47 +1000)]
Fix alpha blending w/ font drawing & byte buffer

5 years agoFix mask active-point being lost on load/undo
Campbell Barton [Wed, 27 Apr 2016 04:33:51 +0000 (14:33 +1000)]
Fix mask active-point being lost on load/undo

5 years agoMask: always add a new spline when adding a new vert
Campbell Barton [Wed, 27 Apr 2016 04:09:36 +0000 (14:09 +1000)]
Mask: always add a new spline when adding a new vert

Previously, adding a new vertex with Ctrl-LMB would move an existing
when there was an active spline but no active point.

This function is used as a fallback, extending an existing active point is already handled.

5 years agoNew mask points now compensate parent offset
Campbell Barton [Wed, 27 Apr 2016 03:54:48 +0000 (13:54 +1000)]
New mask points now compensate parent offset

5 years agoFix T48282: Newly added mask points don't follow parent
Campbell Barton [Wed, 27 Apr 2016 03:11:17 +0000 (13:11 +1000)]
Fix T48282: Newly added mask points don't follow parent

5 years agoCleanup: use const, duplicate header
Campbell Barton [Wed, 27 Apr 2016 02:49:37 +0000 (12:49 +1000)]
Cleanup: use const, duplicate header

5 years agoFix Cycles GLSL image texture node not respecting color space property.
Brecht Van Lommel [Tue, 26 Apr 2016 22:23:05 +0000 (00:23 +0200)]
Fix Cycles GLSL image texture node not respecting color space property.

5 years agoCode cleanup: minor cleanups for GPU_link return values, normal map node.
Brecht Van Lommel [Tue, 26 Apr 2016 22:09:44 +0000 (00:09 +0200)]
Code cleanup: minor cleanups for GPU_link return values, normal map node.

5 years agoFix Font filebrowser not showing thumbnails when those are enabled by default in...
Bastien Montagne [Tue, 26 Apr 2016 15:17:01 +0000 (17:17 +0200)]
Fix Font filebrowser not showing thumbnails when those are enabled by default in userpref.

Reported by Leon Cheung over IRC, thanks.

5 years agoFix T47992: Stereo 3D Anaglyph rendered Images saved too light
Sergey Sharybin [Tue, 26 Apr 2016 15:15:33 +0000 (17:15 +0200)]
Fix T47992: Stereo 3D Anaglyph rendered Images saved too light

5 years agoCycles: Improve logging about motion blur a bit
Sergey Sharybin [Tue, 26 Apr 2016 14:17:11 +0000 (16:17 +0200)]
Cycles: Improve logging about motion blur a bit

5 years agoHair edit: Add operator to uniform length of selected hairs
Sergey Sharybin [Tue, 26 Apr 2016 14:05:52 +0000 (16:05 +0200)]
Hair edit: Add operator to uniform length of selected hairs

Request by Andy, should help him a lot doing weird and wonderful hair styles.

A bit experimental yet, details of behavior might be changed after some real
usage feedback.

5 years agoCorrect error in recent snap-context commit
Campbell Barton [Tue, 26 Apr 2016 13:01:11 +0000 (23:01 +1000)]
Correct error in recent snap-context commit

Edges currently don't use a BVH-tree,
but would still create and attempt to free the tree.

5 years agoFix T48176: Shrinkwrap crashes when multiple objects uses same target
Sergey Sharybin [Tue, 26 Apr 2016 12:42:58 +0000 (14:42 +0200)]
Fix T48176: Shrinkwrap crashes when multiple objects uses same target

Annoying bug caused by temp nature of looptri layer for CCGDM.

Fixed in a similar to CCG loops by using lock when allocating and
filling looptri arrays.

Real fix would be to make sure this array is allocated on object
evaluation using DAG's eval_flag, but that's more involved change
which we'll work on later.

5 years agoFix (unreported) possible freed memory usage when reloading a .blend file.
Bastien Montagne [Tue, 26 Apr 2016 12:24:57 +0000 (14:24 +0200)]
Fix (unreported) possible freed memory usage when reloading a .blend file.

Operator would call `WM_file_read()` directly whith G.main->name as filepath, which
gets freed whith main during new reading of file... Now use a local copy instead.

5 years agoFix missing pose bone hash table in stub poses of action constraints.
Lukas Tönne [Tue, 26 Apr 2016 12:11:03 +0000 (14:11 +0200)]
Fix missing pose bone hash table in stub poses of action constraints.

This is a follow-up fix for rBa10b2fe. The Action constraint uses a hackish
stub object and pose, which doesn't have a hash table for fast lookups.
This doesn't seem to be a big issue with the old depsgraph, but in the new
depsgraph it creates a large number of cache misses and significant slowdown,
possibly because of additional threading and less simple bone loops.

5 years agoSupport multiple tangents for BI render & viewport
Alexander Romanov [Tue, 26 Apr 2016 08:43:02 +0000 (18:43 +1000)]
Support multiple tangents for BI render & viewport

Normal Map node support for GLSL mode and the internal render (multiple tangents support).

The Normal Map node is a useful node which is present in the Cycles render.
It makes it possible to use normal mapping without additional material node in a node tree.
This patch implements Normal Map node for GLSL mode and the internal render.

Previously only the active UV layer was used to calculate tangents.

5 years agoFix T48211: Modifying an F-Curve modifier property is not updating the 3D window
Sergey Sharybin [Tue, 26 Apr 2016 10:15:05 +0000 (12:15 +0200)]
Fix T48211: Modifying an F-Curve modifier property is not updating the 3D window

5 years agoFix T48259: Vertex painting doesn't trigger refresh of cycles rendered viewport
Sergey Sharybin [Tue, 26 Apr 2016 09:15:28 +0000 (11:15 +0200)]
Fix T48259: Vertex painting doesn't trigger refresh of cycles rendered viewport

5 years agoFix UI message typo.
Bastien Montagne [Tue, 26 Apr 2016 08:12:47 +0000 (10:12 +0200)]
Fix UI message typo.

5 years agoMinor cleanup in object select code
Campbell Barton [Tue, 26 Apr 2016 04:33:31 +0000 (14:33 +1000)]
Minor cleanup in object select code

- break when object in hit-buffer.
- don't measure distance to object centers that can't be projected.
- take pixelsize into account for distance pixel distance limit.

5 years agoFix T48203: Pose-Mode overrides Alt-RMB menu select
Campbell Barton [Tue, 26 Apr 2016 04:24:52 +0000 (14:24 +1000)]
Fix T48203: Pose-Mode overrides Alt-RMB menu select

Now always use menu-select when using Alt-RMB

5 years agoCleanup: use const for outliner args
Campbell Barton [Tue, 26 Apr 2016 03:08:38 +0000 (13:08 +1000)]
Cleanup: use const for outliner args

Also c99 edits for outliner_find_id

5 years agoOutliner: "Show Active" support for active bone
Philipp Oeser [Tue, 26 Apr 2016 02:54:51 +0000 (12:54 +1000)]
Outliner: "Show Active" support for active bone

Resolves T48229

5 years agoUI messages fixes - no final point ;)
Bastien Montagne [Mon, 25 Apr 2016 18:16:34 +0000 (20:16 +0200)]
UI messages fixes - no final point ;)

5 years agoCycles: Proper pack of leaves which are bigger than single float4
Sergey Sharybin [Mon, 25 Apr 2016 16:56:52 +0000 (18:56 +0200)]
Cycles: Proper pack of leaves which are bigger than single float4

5 years agoFix for missing pose bone hash in the new dependency graph.
Lukas Tönne [Mon, 25 Apr 2016 13:38:50 +0000 (15:38 +0200)]
Fix for missing pose bone hash in the new dependency graph.

The hash table is used to look up bone poses, particularly during constraint
evaluation. Without this the default BLI_findstring method on a plain ListBase
is used, which is really slow for extensive rigs.

5 years agoFix T48202: Project paint hangs on UV's w/ sharp corners
Campbell Barton [Mon, 25 Apr 2016 12:15:50 +0000 (22:15 +1000)]
Fix T48202: Project paint hangs on UV's w/ sharp corners

Using 'shell-thickness' to offset UV's meant very sharp corners would offset far outside the image
causing project-paint to hang while collecting all pixels for each UV face.

Clamp the maximum offset to prevent this.

5 years agoCycles: Fix issues with stack allocator in MSVC
Sergey Sharybin [Mon, 25 Apr 2016 11:50:27 +0000 (13:50 +0200)]
Cycles: Fix issues with stack allocator in MSVC

Couple of issues here:

- Was a bug in heap memory allocation when run out
  of allowed stack memory.

- Debug MSVC was failing because it uses separate
  allocator for some sort of internal proxy thing,
  which seems to be unable to be using stack memory
  because allocator is being created in non-persistent
  stack location.

5 years agoCycles: Move vector re-allocation out of loops
Sergey Sharybin [Mon, 25 Apr 2016 10:25:30 +0000 (12:25 +0200)]
Cycles: Move vector re-allocation out of loops

5 years agoRefactor BKE_blender into separate headers
Campbell Barton [Sun, 24 Apr 2016 12:42:41 +0000 (22:42 +1000)]
Refactor BKE_blender into separate headers

- BKE_blender_version.h (only version defines & versionstr).
- BKE_blender_copybuffer.h (currently only used for view3d copy/paste).
- BKE_blender_undo.h (global undo functions).
- BKE_blendfile.h (high level blend file read/write API).

5 years agoFix T48085: Select linked w/ seam delimit gives random results
Campbell Barton [Mon, 25 Apr 2016 08:17:13 +0000 (18:17 +1000)]
Fix T48085: Select linked w/ seam delimit gives random results

This changes behavior so seams aren't used for the bmesh walker.

5 years agoCycles: Don't pass RNA pointers by vlaue
Sergey Sharybin [Mon, 25 Apr 2016 08:04:06 +0000 (10:04 +0200)]
Cycles: Don't pass RNA pointers by vlaue

5 years agoRecent pydriver update missed setting 'curval'
Campbell Barton [Mon, 25 Apr 2016 05:25:32 +0000 (15:25 +1000)]
Recent pydriver update missed setting 'curval'

Using PyObject's for drivers (82b0a9e36) still needs to set the 'current value'
for debug info to display in the UI.

Resolves T48251

5 years agoCleanup: use bool
Campbell Barton [Mon, 25 Apr 2016 04:57:25 +0000 (14:57 +1000)]
Cleanup: use bool

5 years agoFix T48263: Armature modifier crash w/ non-armature objects
Campbell Barton [Mon, 25 Apr 2016 04:38:06 +0000 (14:38 +1000)]
Fix T48263: Armature modifier crash w/ non-armature objects

5 years agoDocs: note that BMesh loops are accessed via faces
Campbell Barton [Mon, 25 Apr 2016 01:57:52 +0000 (11:57 +1000)]
Docs: note that BMesh loops are accessed via faces

Resolves T48258

5 years agoEvent system: Let event pass through after menu poll fails
Julian Eisel [Sat, 23 Apr 2016 14:49:34 +0000 (16:49 +0200)]
Event system: Let event pass through after menu poll fails

Part 2 of Fix for T48200. Without this, it's not possible to exit GPencil edit mode using tab key with pies enabled.

Menus are somehow similar to operators, which let the event pass through too after operator poll returns 0. So think we should handle them similar here.
Can't guarantee this is totally safe though ;)

5 years agoCleanup: cmake
Campbell Barton [Sat, 23 Apr 2016 14:16:15 +0000 (00:16 +1000)]
Cleanup: cmake

5 years agoFix T48250: suppress CMake ranlib warnings to avoid issue with Qt Creator
Tianwei Shen [Sat, 23 Apr 2016 13:44:26 +0000 (15:44 +0200)]
Fix T48250: suppress CMake ranlib warnings to avoid issue with Qt Creator

Reviewed By: campbellbarton, brecht

Differential Revision:

5 years agoFix weird wording in driver operator tooltip
Julian Eisel [Sat, 23 Apr 2016 12:49:30 +0000 (14:49 +0200)]
Fix weird wording in driver operator tooltip

5 years agoPyAPI: support writing compressed library blends
Campbell Barton [Sat, 23 Apr 2016 12:08:42 +0000 (22:08 +1000)]
PyAPI: support writing compressed library blends

5 years agoGHOST/X11: print description of error event
Campbell Barton [Sat, 23 Apr 2016 08:38:43 +0000 (18:38 +1000)]
GHOST/X11: print description of error event

5 years agoFix T48173: event.mouse_prev_x/y unreliable.
Brecht Van Lommel [Sun, 17 Apr 2016 21:14:17 +0000 (23:14 +0200)]
Fix T48173: event.mouse_prev_x/y unreliable.

5 years agoFix T48216: Cycles light fallof node gives black emission in baking.
Brecht Van Lommel [Sat, 23 Apr 2016 00:58:37 +0000 (02:58 +0200)]
Fix T48216: Cycles light fallof node gives black emission in baking.

5 years agoFix T48223: 3D View not refresh after changing Blending mode in NLA.
Bastien Montagne [Fri, 22 Apr 2016 14:48:57 +0000 (16:48 +0200)]
Fix T48223: 3D View not refresh after changing Blending mode in NLA.

This fixes a lot of things in NLA RNA update handling (which basically did not update anything previously).

There are more update issues with this editor though...

5 years agoFix (unreported) crash when listing available fmodifier types.
Bastien Montagne [Fri, 22 Apr 2016 13:23:59 +0000 (15:23 +0200)]
Fix (unreported) crash when listing available fmodifier types.

Some types are defined but not yet implemented...

5 years agoFix T48230: Home key when only one keyframe makes the DopeSheet acting weird.
Bastien Montagne [Fri, 22 Apr 2016 12:38:46 +0000 (14:38 +0200)]
Fix T48230: Home key when only one keyframe makes the DopeSheet acting weird.

Simply apply same minimal range as in graph editor when we get a zero one from keyframes.

5 years agoFix curve snap to surface w/ offset & taper
Campbell Barton [Fri, 22 Apr 2016 11:28:39 +0000 (21:28 +1000)]
Fix curve snap to surface w/ offset & taper

Adjusting the pressure wasn't re-adjusting the offset.

5 years agoBLF: use float vector passing color args
Campbell Barton [Fri, 22 Apr 2016 10:02:03 +0000 (20:02 +1000)]
BLF: use float vector passing color args

5 years agoFix T48236: OpenVDB smoke cache glitches out with smokeless flames.
Kévin Dietrich [Fri, 22 Apr 2016 09:46:02 +0000 (11:46 +0200)]
Fix T48236: OpenVDB smoke cache glitches out with smokeless flames.

Issue was that before writing to disk grids are clipped against the
density field's tree to optimize for memory/disk space, which in the
case of simulations with no density field results in all grids having
empty trees.

For now avoid clipping against empty grids, but perhaps in the future it
can be interresting to have some UI parameters to let the user choose
the grid used for clipping.

5 years agoSilence some annoying warnings when doing full build with strict flags
Sergey Sharybin [Fri, 22 Apr 2016 08:59:15 +0000 (10:59 +0200)]
Silence some annoying warnings when doing full build with strict flags

This mainly touches extern libraries and few debug-only places in intern.

Some summary:

- External libraries are not strict at all about missing declarations,
  so we can rather safely remove such warning together with other strict

- Bullet has some static functions which are not used.
  Those were commented out.

- Carve now has some unused debug-only functions commented out as well.
  While we're on the way of getting rid of Carve, it makes sense to make
  things a bit cleaner for the time being.

- In LZMA we have some parts disabled which gives some set but unused
  variables which is rather correct.

- Elbeem had quite some variables set and never used because their usage
  is inside of debug-only code which is commented out.

Note about patching upstream libraries: surely one might say that we
have to make local patchset against this, but own experience says it
only gives extra work trying to merge such tweaks to a new upstream
version and usually it's just faster to re-apply such fixes again after
bundling new upstream library.

5 years agoCycles: Reduce verbosity of logging
Sergey Sharybin [Fri, 22 Apr 2016 08:55:26 +0000 (10:55 +0200)]
Cycles: Reduce verbosity of logging

Mainly makes logging less verbose when doing progressive sampling in viewport.

Such kind of verbosity is not really possible to be filtered out with `grep`
so let's reshuffle few lines of code.

5 years agoNDof device: Check for socket exists before connecting to spnavd
Sergey Sharybin [Fri, 22 Apr 2016 08:14:30 +0000 (10:14 +0200)]
NDof device: Check for socket exists before connecting to spnavd

This allows us to get rid of annoying and misleading error printed to the console
about being unable to connect to something.

5 years agoTransform Snap: optionally cache the BVH tree
Campbell Barton [Fri, 22 Apr 2016 06:11:47 +0000 (16:11 +1000)]
Transform Snap: optionally cache the BVH tree

Use the SnapObjectContext to store the bvh tree for reuse.

5 years agoTransform Snap: initial snap context refactor
Campbell Barton [Thu, 21 Apr 2016 01:29:32 +0000 (11:29 +1000)]
Transform Snap: initial snap context refactor

This introduces a snap-context that can be re-used for casting rays into the scene
(by operators such as walk-mode, ruler and transform code).

This can be used to cache data between calls too.

5 years agoCleanup: warnings (double promote, string format)
Campbell Barton [Fri, 22 Apr 2016 02:18:57 +0000 (12:18 +1000)]
Cleanup: warnings (double promote, string format)

5 years agoFix T48212: Typos in bpy enum props examples.
Bastien Montagne [Thu, 21 Apr 2016 10:16:32 +0000 (12:16 +0200)]
Fix T48212: Typos in bpy enum props examples.

5 years agoUpdate for ArchLinux.
Ejner Fergo [Thu, 21 Apr 2016 08:44:46 +0000 (10:44 +0200)]
Update for ArchLinux.

The script is updated for ArchLinux, since all dependencies are included in Arch's official repositories.

I've made a few changes, such as enabling OCIO and OSD without requiring locally installed lib-path, and a fix to ''get_package_version_ARCH()' so it ignores package epoch (as in the case of ffmpeg).

I intend to look at OpenVDB next.

Reviewers: mont29

Differential Revision:

5 years agoCleanup: math lib use w/ walk mode
Campbell Barton [Thu, 21 Apr 2016 02:43:35 +0000 (12:43 +1000)]
Cleanup: math lib use w/ walk mode

5 years agoMesh Deform Modifier - leave bind settings visible after binding
Ines Almeida [Wed, 20 Apr 2016 18:51:59 +0000 (19:51 +0100)]
Mesh Deform Modifier - leave bind settings visible after binding

The 'precision' and 'dynamic' settings for binding are now always visible.
The settings that can not be edited after binding are disabled (not inactive).

I find it useful to see with what settings a mesh was bound, in case
the file is not mine or if I simply lost track of it.

5 years agoCycles: Multi-thread object transform update
Sergey Sharybin [Wed, 20 Apr 2016 16:12:26 +0000 (18:12 +0200)]
Cycles: Multi-thread object transform update

Simple idea, use threads when dealing with "Copying Transformations to device"
scene update step. Only do it if there's enough objects in the scene.

Hopefully only brings less synchronization time and doesn't break anything.

From tests on my desktop this brings down transform update time from 58sec to
11sec on victor_cpu.blend scene from out benchmark.

5 years agoMerge branch 'master' into temp_remove_particles
Lukas Tönne [Wed, 20 Apr 2016 14:25:16 +0000 (16:25 +0200)]
Merge branch 'master' into temp_remove_particles

5 years agoCycles: Stop rendering when bad_alloc happens
Sergey Sharybin [Wed, 20 Apr 2016 14:15:11 +0000 (16:15 +0200)]
Cycles: Stop rendering when bad_alloc happens

This is an attempt to gracefully handle out-of-memory events
and stop rendering with an error message instead of a crash.

It uses bad_alloc exception, and usually i'm not really fond
of exceptions, but for such limited use for errors from which
we can't recover it should be fine.

Ideally we'll need to stop full Cycles Session, so viewport
render and persistent images frees all the memory, but that
we can support later, since it'll mainly related on telling
Blender what to do.

General rules are:

- Use as less exception handles as possible, try to find a
  most geenric pace where to handle those.

  For example, ccl::Session.

- Threads needs own handling, exception trap from one thread
  will not catch exceptions from other threads.

  That's why BVH build needs own thing.

Reviewers: brecht, juicyfruit, dingto, lukasstockner97

Differential Revision:

5 years agoCycles: Throw bad_alloc exception when custom allocators failed to allocate memory
Sergey Sharybin [Wed, 20 Apr 2016 13:49:52 +0000 (15:49 +0200)]
Cycles: Throw bad_alloc exception when custom allocators failed to allocate memory

This mimics behavior of default allocators in STL and allows all the routines
to catch out-of-memory exceptions and hopefully recover from that situation/