blender.git
3 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
  flags.

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

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

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

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

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

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

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

3 years agoUpdate install_deps.sh for ArchLinux.
Ejner Fergo [Thu, 21 Apr 2016 08:44:46 +0000 (10:44 +0200)]
Update install_deps.sh 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: https://developer.blender.org/D1901

3 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

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

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

3 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: https://developer.blender.org/D1898

3 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/

3 years agoCycles: Use threads to sort reference arrays when searching for split
Sergey Sharybin [Mon, 18 Apr 2016 14:15:05 +0000 (16:15 +0200)]
Cycles: Use threads to sort reference arrays when searching for split

This commits implements threaded sorting of references when looking for
object spatial split. It mainly useful when doing initial binning, which
happens from main thread.

Gives nice speedup of BVH build for Bunny.blend: 36sec vs. 55sec for
the Rabbit mesh BVH build.

On more complex scenes the speedup is probably minimal, but still nice
to have more instant rendering for simplier scenes.

Some further tests with production scenes would be interesting.

Reviewers: juicyfruit, dingto, lukasstockner97, brecht

Reviewed By: brecht

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

3 years agoCycles: Avoid reference copy
Sergey Sharybin [Wed, 20 Apr 2016 13:03:39 +0000 (15:03 +0200)]
Cycles: Avoid reference copy

3 years agoFix T46903: Missing Render Border Menu items
Sergey Sharybin [Wed, 20 Apr 2016 13:02:03 +0000 (15:02 +0200)]
Fix T46903: Missing Render Border Menu items

While other borders are more like a toggle, it is an intrinsic behavior
of those operators. Render Border is intrinsicly split into two operators
and trying to expose it as a toggle will end up with rather confusing
situation when shortcut listed in the menu changes depending on the
context.

3 years agoFix T47794: Point density sometime seems stretched when rendered on GPU
Sergey Sharybin [Wed, 20 Apr 2016 12:42:04 +0000 (14:42 +0200)]
Fix T47794: Point density sometime seems stretched when rendered on GPU

3 years agoFix T48162: GPU render gives wrong results in certain volume setups
Sergey Sharybin [Wed, 20 Apr 2016 11:49:54 +0000 (13:49 +0200)]
Fix T48162: GPU render gives wrong results in certain volume setups

ideally this part of code should be de-duplicated across __VOLUME_INTERSECT_ALL
and regular code.

3 years agoFix T47812: GPU renders have warmer colors than CPU renders
Sergey Sharybin [Wed, 20 Apr 2016 10:29:08 +0000 (12:29 +0200)]
Fix T47812: GPU renders have warmer colors than CPU renders

Seems was a mistake in f2c54df, volume attributes are not supposed to
have repeated texture type.

3 years agoUpdate bundled openjpeg from 1.5.0 to 1.5.2
Sergey Sharybin [Wed, 20 Apr 2016 08:36:58 +0000 (10:36 +0200)]
Update bundled openjpeg from 1.5.0 to 1.5.2

Solves following issues:

- Quite reasonable amount of paranoid warnings were solved by an upstream
- Upstream seems to have all fixes needed for FreeBSD and OSX already
- Brings all fixes and such from upstream

3 years agoFix T47891: Edges throw shadow in edit mode
Campbell Barton [Wed, 20 Apr 2016 02:39:15 +0000 (12:39 +1000)]
Fix T47891: Edges throw shadow in edit mode

3 years agoFix T48086: Smart UV Project fails w/ small faces
Campbell Barton [Wed, 20 Apr 2016 01:49:14 +0000 (11:49 +1000)]
Fix T48086: Smart UV Project fails w/ small faces

Epsilon for small faces was too large.

Also suppress exception when all faces area are below the epsilon.

3 years agoMinor optimization for scanfill
Campbell Barton [Tue, 19 Apr 2016 23:52:27 +0000 (09:52 +1000)]
Minor optimization for scanfill

Replace angle with with cosine calculation.

3 years agoFix image-space mask-transform crash w/o an image
Campbell Barton [Tue, 19 Apr 2016 23:37:51 +0000 (09:37 +1000)]
Fix image-space mask-transform crash w/o an image

3 years agoCleanup: rename cos-angle to match BLI_math
Campbell Barton [Tue, 19 Apr 2016 21:45:16 +0000 (07:45 +1000)]
Cleanup: rename cos-angle to match BLI_math

3 years agoMinor optimization for limited-dissolve
Campbell Barton [Tue, 19 Apr 2016 09:13:39 +0000 (19:13 +1000)]
Minor optimization for limited-dissolve

Use dot product instead of angle.

3 years agoFix crash in rB37493fb9f - there is no guaranty CTX_wm_foo() will return a valid...
Bastien Montagne [Tue, 19 Apr 2016 20:51:46 +0000 (22:51 +0200)]
Fix crash in rB37493fb9f - there is no guaranty CTX_wm_foo() will return a valid pointer!

3 years agoCleanup unused header includes from previous commit.
Bastien Montagne [Tue, 19 Apr 2016 15:53:46 +0000 (17:53 +0200)]
Cleanup unused header includes from previous commit.

3 years agoCleanup: move operators & related code of files & append/link to relevant dedicated...
Bastien Montagne [Tue, 19 Apr 2016 15:08:31 +0000 (17:08 +0200)]
Cleanup: move operators & related code of files & append/link to relevant dedicated source files.

This commit adds a new `wm_files_link.c` which contains everything related to append/link code,
moved from `wm_operators.c` (rather small currently, but will expand quite a bit with future reload & asset works).

It also moves all load/save .bland files (and related userpref/startup stuff) from `wm_operators.c`
to `wm_files.c` (some helper funcs were already there).

This also makes `wm_operators.c` significantly lighter.

3 years agoFix T48198: Missing plus sign to open the tool shelf in text editor
Julian Eisel [Tue, 19 Apr 2016 19:01:55 +0000 (21:01 +0200)]
Fix T48198: Missing plus sign to open the tool shelf in text editor

Did not happen when using screen layout saved in default startup.blend

3 years agoToggle to standard cursor when opening menus/popups
Julian Eisel [Tue, 19 Apr 2016 14:04:44 +0000 (16:04 +0200)]
Toggle to standard cursor when opening menus/popups

Cursor is now set to standard arrow-cursor when opening menu, and reset to previous one when closing it. Previously it just stayed as it was before, e.g. the edit mode cross-cursor stayed active even if a menu was opened.

Fixes T48192.

3 years agoCycles: Improvements and fixes for the resumable render
Sergey Sharybin [Tue, 19 Apr 2016 10:54:29 +0000 (12:54 +0200)]
Cycles: Improvements and fixes for the resumable render

- Fix wrong current sample reported in the log
- Also includes fix for progressive refine log
- Explicitly print to the stdout that resumable render is enabled
- Print error message and abort when passing wrong values for the
  resumable render. Never waste someone's compute power for wrong
  render!

Fixes T48185: Cycles resumable num chunks breaks sample counter

3 years agoFix T48193: Incorrect keyframe_insert docs
Campbell Barton [Tue, 19 Apr 2016 08:25:56 +0000 (18:25 +1000)]
Fix T48193: Incorrect keyframe_insert docs

3 years agoMinor edits to last commit
Campbell Barton [Tue, 19 Apr 2016 03:07:01 +0000 (13:07 +1000)]
Minor edits to last commit

Avoid redundant tests

3 years agoFix T47998: Limited dissolve fails /w holes
Campbell Barton [Tue, 19 Apr 2016 02:11:51 +0000 (12:11 +1000)]
Fix T47998: Limited dissolve fails /w holes

Holes with flat surfaces could have their edges dissolved causing degenerate faces.
Now check that collapsing a vertices isn't creating self-overlapping faces.

3 years agoCleanup: pass event args as const
Campbell Barton [Sun, 17 Apr 2016 20:20:42 +0000 (06:20 +1000)]
Cleanup: pass event args as const

3 years agoCycles microdisplacement: add max subdivision setting
Mai Lavelle [Mon, 18 Apr 2016 20:35:49 +0000 (22:35 +0200)]
Cycles microdisplacement: add max subdivision setting

This is to prevent situations such as when the camera gets very close to a mesh
and causes it to be tessellated into an excessive amount of micropolygons. In
REYES this is known as the eye-splits problem.

Reviewed By: brecht

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

3 years agoCycles microdisplacement: fix handling of triangles in DiagSplit
Mai Lavelle [Mon, 18 Apr 2016 20:29:25 +0000 (22:29 +0200)]
Cycles microdisplacement: fix handling of triangles in DiagSplit

Theres still more room for improvement but this makes things useable.

Reviewed By: brecht

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

3 years agoFix: Make it easier to tell if Color Swatches are greyed out or not
Joshua Leung [Mon, 18 Apr 2016 12:42:59 +0000 (00:42 +1200)]
Fix: Make it easier to tell if Color Swatches are greyed out or not

This commit makes disabled/inactive color swatches look more obviously disabled
by halving their alpha values. It is necessary because the results of
ui_widget_color_disabled() (which is usually used when disabling widgets)
get overwritten by the color filling code here.

To avoid confusion, the checkerboard background (when the color genuinely has
alpha) will still only show in those cases. That is, when disabled, color swatches
won't show the checkerboard unless the color actually has an alpha component if it
wasn't disabled.

3 years agoFix T48186: Grease Pencil Smooth brush doesn't work properly - "erase" the stroke...
Joshua Leung [Mon, 18 Apr 2016 12:18:29 +0000 (00:18 +1200)]
Fix T48186: Grease Pencil Smooth brush doesn't work properly - "erase" the stroke thickness

As soon as you started trying to smooth a stroke, the thickness of the stroke
would quickly drop right down to near zero, if "affect pressure" was enabled.

This step got accidentally missed when restoring the affect pressure functionality to
the stroke smoothing brush code, following cleanups from the stroke quality patch.

3 years agoCycles microdisplacement: scene level render and preview dicing rates
Mai Lavelle [Sun, 17 Apr 2016 18:15:50 +0000 (20:15 +0200)]
Cycles microdisplacement: scene level render and preview dicing rates

This makes it easier to control overall dicing rate without having to tweak
every object. The preview rate makes viewport editing more interactive. The
default preview rate of 8 is roughly 64 times faster for some operations.

Reviewed By: brecht

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

3 years ago"View Frame" now works in the sequencer too
Joshua Leung [Sun, 17 Apr 2016 00:26:44 +0000 (12:26 +1200)]
"View Frame" now works in the sequencer too

3 years agoFix a few compiler warnings with OS X / clang.
Brecht Van Lommel [Sat, 16 Apr 2016 22:51:29 +0000 (00:51 +0200)]
Fix a few compiler warnings with OS X / clang.

3 years agoFix T48171: activating spacebar search menu over text button activates it or shows...
Brecht Van Lommel [Sat, 16 Apr 2016 22:22:42 +0000 (00:22 +0200)]
Fix T48171: activating spacebar search menu over text button activates it or shows tooltip.

3 years agoCycles: Refactor Image Texture limits.
Thomas Dinges [Sat, 16 Apr 2016 18:48:33 +0000 (20:48 +0200)]
Cycles: Refactor Image Texture limits.

Instead of treating Fermi GPU limits as default,
and overriding them for other devices,
we now nicely set them for each platform.

* Due to setting values for all platforms,
we don't have to offset the slot id for OpenCL anymore,
as the image manager wont add float images for OpenCL now.

* Bugfix: TEX_NUM_FLOAT_IMAGES was always 5, even for CPU,
so the code in svm_image.h clamped float textures with alpha on CPU after the 5th slot.

Reviewers: #cycles, brecht

Reviewed By: #cycles, brecht

Subscribers: brecht

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

3 years agoAnim Editors: "View Frame" Operator - Code Cleanups/Reshuffling + NLA/Timeline Support
Joshua Leung [Sat, 16 Apr 2016 15:44:10 +0000 (03:44 +1200)]
Anim Editors: "View Frame" Operator - Code Cleanups/Reshuffling + NLA/Timeline Support

* Reshuffled code for existing "View Frame" implementations, and removed leftover
  comment from some of the the copy-and-paste used to build it.
* Added support for this operator in the NLA and Timeline

3 years agoAssorted enum tweaks
Joshua Leung [Sat, 16 Apr 2016 15:28:45 +0000 (03:28 +1200)]
Assorted enum tweaks

* Knock out "Python" FModifier entry - It really hasn't been coded yet!
* Add icon for "Match Indices" driver eyedropper mode. It should help provide
  a bit more of a hint of what it does, but it also doesn't look quite as nice now.

3 years agoExperimental Drivers UI Tweak: Use icons for variable types
Joshua Leung [Sat, 16 Apr 2016 15:27:26 +0000 (03:27 +1200)]
Experimental Drivers UI Tweak: Use icons for variable types

This commit aims to streamline the driver variables layout a bit
* Each variable type now has an icon. (The loc diff and rot diff ones are placeholders,
  which could deserve something better/dedicated if we continue to use this)
* Instead of taking up an entire row, the variable type dropdown now only shows
  an icon, and is located before the variable name field.

Feedback wanted: Is this more/less confusing than it was?

3 years agoTweaks to Streamline Drivers UI - Don't use uiTemplateAnyID for properties where...
Joshua Leung [Sat, 16 Apr 2016 15:05:24 +0000 (03:05 +1200)]
Tweaks to Streamline Drivers UI - Don't use uiTemplateAnyID for properties where only objects can be used

3 years agoCycles: Insert util_texture.h in CMakeLists to make Cycles compile again after recent...
Thomas Beck [Sat, 16 Apr 2016 09:58:38 +0000 (11:58 +0200)]
Cycles: Insert util_texture.h in CMakeLists to make Cycles compile again after recent refactory.

3 years agoCleanup: Move texture definitions to util, to avoid bad level include.
Thomas Dinges [Fri, 15 Apr 2016 21:01:20 +0000 (23:01 +0200)]
Cleanup: Move texture definitions to util, to avoid bad level include.

3 years agoCurve draw fix w/ surface offset + only-first enabled
Campbell Barton [Fri, 15 Apr 2016 20:43:53 +0000 (06:43 +1000)]
Curve draw fix w/ surface offset + only-first enabled

In this case the initial offset needs to be applied to the rest of the stroke.

3 years agoFix T48157: 3D view's depth of field isn't displayed correctly with scene units scale.
Bastien Montagne [Fri, 15 Apr 2016 14:17:21 +0000 (16:17 +0200)]
Fix T48157: 3D view's depth of field isn't displayed correctly with scene units scale.

focus distance is given in BU, no need to scale it at all.

3 years agoFix T48139: Checker texture strange behavior in cycles
Sergey Sharybin [Fri, 15 Apr 2016 13:29:12 +0000 (15:29 +0200)]
Fix T48139: Checker texture strange behavior in cycles

Seems particular CUDA implementations has some precision issues,
which made integer coordinate (which was expected to always be
positive) to go negative.

3 years agoUI: copy to selected: add 'single'/'all' options to buttons' menu when relevant.
Bastien Montagne [Fri, 15 Apr 2016 13:17:18 +0000 (15:17 +0200)]
UI: copy to selected: add 'single'/'all' options to buttons' menu when relevant.

Same as reset or anim keyframe/driver operators... Inconsistency reported by Leon Cheung
through IRC, thanks.

3 years agoCode Cleanup: Fix up various odds and ends
Joshua Leung [Fri, 15 Apr 2016 10:08:13 +0000 (22:08 +1200)]
Code Cleanup: Fix up various odds and ends

3 years agoCode Cleanup: Remove unused define left over from earlier versions of this code
Joshua Leung [Fri, 15 Apr 2016 10:05:18 +0000 (22:05 +1200)]
Code Cleanup: Remove unused define left over from earlier versions of this code

3 years agoRemove a leftover from older code
Sergey Sharybin [Fri, 15 Apr 2016 13:06:08 +0000 (15:06 +0200)]
Remove a leftover from older code

3 years agoCycles: Optimization to spatial BVH build
Sergey Sharybin [Fri, 15 Apr 2016 12:27:23 +0000 (14:27 +0200)]
Cycles: Optimization to spatial BVH build

Simple fix: release lock earlier.

Reduces spatial split build time from 96 to 53sec on the Bunny.blend
(using studio Intel for benchmark).

NOTE: Timing difference is not that spectacular when comparing numbers
with builds before memory optimization, but even then it's about 20%
faster build.

3 years agoFix T48151: Brush texture overlay won't refresh automatically in UV editor when chang...
Bastien Montagne [Fri, 15 Apr 2016 11:13:00 +0000 (13:13 +0200)]
Fix T48151: Brush texture overlay won't refresh automatically in UV editor when changed in buttons window.

Simple solution is to get rid of this stupid `rna_TextureSlot_brush_update` func, and do what it was doing directly
in BR case of `rna_TextureSlot_update`. That way, all updates to brush texture will invalidate correctly the overlay.

Note that this double definition of texture pointer for brushes looks rather fishy, am really not convinced this helps
keeping things simple and clear at all (what happened here is that texture selector in image paint editor was using
'texture' member of brush itself, which was performing correct RNA update, while context-based brush texture selector
from buttons space was using 'texture' member of the TextureSlot struct, which had default texture update callback
which was not invalidating overlay).

3 years agoNew freehand curve drawing tool
Campbell Barton [Fri, 15 Apr 2016 08:10:05 +0000 (18:10 +1000)]
New freehand curve drawing tool

- Access with Shift-LMB or from the 'Create' toolbar tab.
- Uses curve fitting for bezier curves, with error and corner angle options.
- Optional tablet pressure to curve radius mapping.
- Depth can use the cursor or optionally draw onto the surface,
  for the entire stroke or using the stroke start.
- Stroke plane can optionally be perpendicular to, or aligned to the surface normal.
- Optional radius tapering and for start/end points.
- Supports operator redo and calling from Python.

3 years agoAdd lib for n-dimensional cubic curve fitting
Campbell Barton [Fri, 15 Apr 2016 08:02:17 +0000 (18:02 +1000)]
Add lib for n-dimensional cubic curve fitting

This will be used for calculating bezier curves from freehand drawing,
may be used for other areas too.

Original code from GraphicsGems, 1990 (FitCurve.c),
with updates from OpenToonz, under 3 clause BSD license.
with own minor modifications for integration with Blender:
- support adding extra custom-data.
- improved handle clamping.

3 years agoCycles: Support heat volume attribute
Sergey Sharybin [Fri, 15 Apr 2016 10:02:31 +0000 (12:02 +0200)]
Cycles: Support heat volume attribute

Similar to velocity, it was kind of supported by the mesh manager but
was missing a code in BlenderSession to get actual values.

In Cycles Heat is an attribute which goes from -1 to 1, where -1 is
the coldest ever temperature, 1 is the hottest ever one.

3 years agoCycles: Improve error print a bit
Sergey Sharybin [Fri, 15 Apr 2016 09:24:59 +0000 (11:24 +0200)]
Cycles: Improve error print a bit

3 years agoTests: Fix wrong hash after "no redundant zeroes" commit
Sergey Sharybin [Fri, 15 Apr 2016 08:37:20 +0000 (10:37 +0200)]
Tests: Fix wrong hash after "no redundant zeroes" commit

3 years agoDrivers Editing: Added "Copy/Paste" buttons beside "Add Variable" for copying all...
Joshua Leung [Fri, 15 Apr 2016 08:04:07 +0000 (20:04 +1200)]
Drivers Editing: Added "Copy/Paste" buttons beside "Add Variable" for copying all variables from one driver to another

This was a feature request from a few years back (IIRC from ZanQdo?) to make it
easier to reuse one set of driver variables across several different drivers.

Dev Notes:
* Finally it's done! All that trouble for two little buttons.
* Grr... cmake... grrr!

3 years agoNLA Copy/Paste Modifiers: Apply similar fixes as those done in Graph Editor
Joshua Leung [Sun, 10 Apr 2016 14:42:06 +0000 (02:42 +1200)]
NLA Copy/Paste Modifiers: Apply similar fixes as those done in Graph Editor

3 years agoFix T42148: Copying/Pasting FModifiers copies to all selected FCurves, not just activ...
Joshua Leung [Sun, 10 Apr 2016 14:39:10 +0000 (02:39 +1200)]
Fix T42148: Copying/Pasting FModifiers copies to all selected FCurves, not just active one

3 years agoFModifiers: Various tweaks for consistency + improved behaviour
Joshua Leung [Sat, 9 Apr 2016 06:05:22 +0000 (18:05 +1200)]
FModifiers: Various tweaks for consistency + improved behaviour

* Use an RNA enum callback for NLA FModifier types too
* Cleaned up tooltips for these operators in Graph and NLA editors
* Fix update notifiers after adding FModifiers in the Graph Editor

3 years agoFModifiers: "Add Modifiers" in Graph/NLA Editor buttons now uses a dropdown instead...
Joshua Leung [Sun, 3 Apr 2016 12:30:59 +0000 (00:30 +1200)]
FModifiers: "Add Modifiers" in Graph/NLA Editor buttons now uses a dropdown instead of a button

This brings the UI here more in line with the Constraints and Modifiers UI's.

TODO:
* The tooltips/descriptions on the operators now need fixing, as we can no longer
  use custom tooltips when defining these buttons.
* The operators need to be fixed to only operate on the active data

3 years agoCode Cleanup: Add proper defines (with ANIM_* prefix) for animation-related copy...
Joshua Leung [Sat, 2 Apr 2016 12:18:23 +0000 (01:18 +1300)]
Code Cleanup: Add proper defines (with ANIM_* prefix) for animation-related copy-paste buffer free callbacks

3 years agoGraph Editor: Move "View" panel to be the last
Joshua Leung [Fri, 1 Apr 2016 05:42:26 +0000 (18:42 +1300)]
Graph Editor: Move "View" panel to be the last

This change means that when going from having no FCurves active to having
an active FCurve, the properties panels will not get stuck with only showing
the "View" tab, which is not that useful a lot of the time.

3 years agoCycles: Yet another fix for camera in volume
Sergey Sharybin [Thu, 14 Apr 2016 15:20:17 +0000 (17:20 +0200)]
Cycles: Yet another fix for camera in volume

Was an embarrassing glitch in original optimization policy,
the for-loops can't be de-duplicated here.

3 years agoCompositor: Fix image and render layer always extending edges
Sergey Sharybin [Thu, 14 Apr 2016 09:20:00 +0000 (11:20 +0200)]
Compositor: Fix image and render layer always extending edges

It was no more possible to translate two images, put one on top of
another in order to do things like mapping VR views.

3 years agoRemove redundant abs ray/line point functions
Campbell Barton [Thu, 14 Apr 2016 03:00:53 +0000 (13:00 +1000)]
Remove redundant abs ray/line point functions

3 years agoMath Lib: ray_point_factor_v3 functions
Campbell Barton [Thu, 14 Apr 2016 01:45:37 +0000 (11:45 +1000)]
Math Lib: ray_point_factor_v3 functions

Gives a bit better precision than creating a line in some cases,
use for ED_view3d_win_to_3d.

3 years agoCycles: Resolve ridiculous amount of memory used by spatial split builder
Sergey Sharybin [Wed, 13 Apr 2016 12:22:53 +0000 (14:22 +0200)]
Cycles: Resolve ridiculous amount of memory used by spatial split builder

This was only visible on systems with lots of threads and root of the issue
was that we've been pre-allocating too much memory for all the threads.

Now we only pre-allocate data for the main thread and rest of the threads
does allocation on-demand.

This brings down memory usage from 36Gig to 6.9Gig when building spatial
split for the Bunny.blend file on our Intel beast.

Originally regression was happened by the threaded spacial split builder
commit.

3 years agoFix T47813: Cycles Standalone not respecting integrator sample_clamp_direct
Sergey Sharybin [Wed, 13 Apr 2016 08:39:21 +0000 (10:39 +0200)]
Fix T47813: Cycles Standalone not respecting integrator sample_clamp_direct

3 years agoCleanup string includes after versioning commits
Thomas Dinges [Thu, 31 Mar 2016 22:44:35 +0000 (00:44 +0200)]
Cleanup string includes after versioning commits

3 years agoShow version number in UI as well
Thomas Dinges [Thu, 31 Mar 2016 11:35:31 +0000 (13:35 +0200)]
Show version number in UI as well

3 years agoTweaks to the version string formation
Sergey Sharybin [Thu, 31 Mar 2016 07:44:09 +0000 (09:44 +0200)]
Tweaks to the version string formation

Couple of things:

- No need to use string streams to format the version string,
  we can do it at compile time and don't bother with anything
  at runtime.

- Function declaration was wring and would have caused linking
  conflicts in cases when util_version.h was included from
  multiple places.

We should have an utility function to get Cycles version so
applications which are linked to Cycles dynamically can query
the version, but that can't be done as an inlined function in
header and would need to be a function properly exported to a
global symbol table (aka, be implemented in a .cpp file).

3 years agoAdd a version number to Cycles standalone
Thomas Dinges [Wed, 30 Mar 2016 23:13:13 +0000 (01:13 +0200)]
Add a version number to Cycles standalone

Now Cycles has its own versioning, that is mainly interesting for external projects, which integrate the engine.

We start with version 1.7.0. Reasons for that:

* The engine is too mature for a 1.0 release.
* We assume that Cycles inside of Blender 2.61 was version 0.1. We count upwards in 0.1 steps, therefore Cycles inside of Blender 2.77 would be 1.7.

We use a common versioning scheme here, with 3 decimals for the major, minor and patch level.

At the moment cycles --version can be used to display the version, easy to parse for external projects. The info will be added to the UI later aswell.

3 years agoCycles: Minor cleanup, whitespace around keyword and preprocessor indent
Sergey Sharybin [Wed, 13 Apr 2016 06:58:52 +0000 (08:58 +0200)]
Cycles: Minor cleanup, whitespace around keyword and preprocessor indent

3 years agoCycles microdisplacement: preserve smooth normals for linear subdivison
Mai Lavelle [Tue, 12 Apr 2016 23:17:34 +0000 (01:17 +0200)]
Cycles microdisplacement: preserve smooth normals for linear subdivison

This way we prevent cracks in the model due to discontinuous normals, by using
smooth normals for displacement instead of always getting flat normals after
linear subdivision.

Reviewed By: brecht

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

3 years agoFix T47754: Meshes glitch on cycling Viewport Shading mode with Linked Groups
Sergey Sharybin [Tue, 12 Apr 2016 15:14:13 +0000 (17:14 +0200)]
Fix T47754: Meshes glitch on cycling Viewport Shading mode with Linked Groups

This is a regression since 4310128 which is cased by really bad logic:
there might be dependencies between dupli-objects, which means _if_ we
really want to ensure derived mesh on dupli creation we have to do it
before any matrix is overwritten.

I'm not sure if such derived mesh trick is really the only way to go
without major refactor, but seems simple fix for now will do it.

3 years agoMissed last commit
Campbell Barton [Tue, 12 Apr 2016 14:49:47 +0000 (00:49 +1000)]
Missed last commit

3 years agoCorrect UI messages: hyphenate 'add-ons'
Campbell Barton [Tue, 12 Apr 2016 14:29:01 +0000 (00:29 +1000)]
Correct UI messages: hyphenate 'add-ons'

3 years agoCycles: Add missing velocity attribute to builtin image loader
Sergey Sharybin [Tue, 12 Apr 2016 11:25:20 +0000 (13:25 +0200)]
Cycles: Add missing velocity attribute to builtin image loader

For some reason other parts of blender importer were assuming velocity
is supported, but actual loader was not aware of that.

Fixes T48064: Adding velocity attribute crashes render

3 years agoCycles: Avoid crash when accessing non-existing volume attribute
Sergey Sharybin [Tue, 12 Apr 2016 11:02:05 +0000 (13:02 +0200)]
Cycles: Avoid crash when accessing non-existing volume attribute

3 years agoCMake: consistency check now reports stale ignores
Campbell Barton [Tue, 12 Apr 2016 10:08:25 +0000 (20:08 +1000)]
CMake: consistency check now reports stale ignores

Also update ignore list.

3 years agoRemove exception for file which no longer exists
Sergey Sharybin [Tue, 12 Apr 2016 09:55:24 +0000 (11:55 +0200)]
Remove exception for file which no longer exists

3 years agoFix T47443: Circle & UV Sphere aren't aligned
Campbell Barton [Tue, 12 Apr 2016 09:40:39 +0000 (19:40 +1000)]
Fix T47443: Circle & UV Sphere aren't aligned

D1912 by @samb96

Change the starting point of the UV sphere so that it is aligned with the circle, cylinder, and cone primitives.

3 years agoRemove any wrangler utility scripts
Sergey Sharybin [Tue, 12 Apr 2016 09:07:23 +0000 (11:07 +0200)]
Remove any wrangler utility scripts

3 years agoCMake: ignore header
Campbell Barton [Tue, 12 Apr 2016 08:44:54 +0000 (18:44 +1000)]
CMake: ignore header

3 years agoCMake: Partially revert recent missing headers commit
Sergey Sharybin [Tue, 12 Apr 2016 06:54:34 +0000 (08:54 +0200)]
CMake: Partially revert recent missing headers commit

The header which was put to the CMake project is not by any means used
during compilation, it is only used when manually updating CUDA wrangler
from CUDA headers.

3 years agoCleanup: use bool
Campbell Barton [Tue, 12 Apr 2016 01:26:06 +0000 (11:26 +1000)]
Cleanup: use bool

3 years agoCMake: add missing headers
Campbell Barton [Tue, 12 Apr 2016 01:22:30 +0000 (11:22 +1000)]
CMake: add missing headers

3 years agoCycles microdisplacement: UI tweak to use split column
Mai Lavelle [Mon, 11 Apr 2016 22:02:59 +0000 (00:02 +0200)]
Cycles microdisplacement: UI tweak to use split column

Reviewed By: brecht, dingto

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

3 years agoCycles microdisplacement: refactor to move some tesselation code from SubdMesh to...
Mai Lavelle [Mon, 11 Apr 2016 21:46:00 +0000 (23:46 +0200)]
Cycles microdisplacement: refactor to move some tesselation code from SubdMesh to Mesh

Reviewed By: brecht

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

3 years agoCycles microdisplacement: change use subdivision bool to subdivision type enum
Mai Lavelle [Mon, 11 Apr 2016 21:07:42 +0000 (23:07 +0200)]
Cycles microdisplacement: change use subdivision bool to subdivision type enum

This is only the UI change, there is no underlying code change in this commit.

Reviewed By: brecht

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