3 years agoMoved function declarations for modifier stack eval into BKE_modifier_calc.h. temp_depsgraph_split_ubereval
Lukas Tönne [Thu, 21 Apr 2016 09:24:42 +0000 (11:24 +0200)]
Moved function declarations for modifier stack eval into BKE_modifier_calc.h.

3 years agoAvoid shadowing 'mask' function parameter by a local variable.
Lukas Tönne [Thu, 21 Apr 2016 08:06:10 +0000 (10:06 +0200)]
Avoid shadowing 'mask' function parameter by a local variable.

3 years agoMoved code for modifier evaluation out of DerivedMesh.c.
Lukas Tönne [Thu, 21 Apr 2016 07:34:02 +0000 (09:34 +0200)]
Moved code for modifier evaluation out of DerivedMesh.c.

These files contained a confusing mix of DM code (for manipulating DMs
and various utility functions relating to these types), and the code
for evaluating object modifier stacks. These are two very distinct
areas and putting them in a single huge file doesn't promote code
clarity at all.

This commit only moves code, but does not alter any of it. This is
important for log continuity, so history of specific functions can be
clearly traced back!

3 years agoMerge branch 'master' into temp_depsgraph_split_ubereval
Lukas Tönne [Wed, 20 Apr 2016 14:45:29 +0000 (16:45 +0200)]
Merge branch 'master' into temp_depsgraph_split_ubereval

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:

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

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

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:

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:

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:

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:

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.

* 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

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:

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:

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:

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:

3 years agoCycles microdisplacement: perform subdivision dicing in raster space
Mai Lavelle [Mon, 11 Apr 2016 20:49:09 +0000 (22:49 +0200)]
Cycles microdisplacement: perform subdivision dicing in raster space

NOTE: this is only the first of many patches towards completing the subdivison
and displacement system in Cycles. These patches will be reviewed and committed
one by one over the coming weeks.

Reviewed By: brecht, sergey

Differential Revision:

3 years agoCycles: Cleanup, make some comments easier to read on split editors
Sergey Sharybin [Mon, 11 Apr 2016 15:58:16 +0000 (17:58 +0200)]
Cycles: Cleanup, make some comments easier to read on split editors

3 years agoCycles: Remove hair support from volume BVH traversal
Sergey Sharybin [Mon, 11 Apr 2016 14:45:55 +0000 (16:45 +0200)]
Cycles: Remove hair support from volume BVH traversal

There are couple of reasons:

- Volume shader on hair does behave really weird anyway and it's
  not something considered a bug really.

- Volume BVH traversal were only used by camera-in-volume check,
  which doesn't really make sense to take hair into account since
  it'll be rendered wrong anyway.

Such a removal makes both code easier to extend further (as in,
no need to worry about those traversal for hair bvh) and also
reduces stress on GPU compilers.

3 years agoCycles: Remove unused SAH from BVH pack
Sergey Sharybin [Mon, 11 Apr 2016 14:18:33 +0000 (16:18 +0200)]
Cycles: Remove unused SAH from BVH pack

3 years agoCycles: Rename tri_woop to tri_storage
Sergey Sharybin [Mon, 11 Apr 2016 12:54:58 +0000 (14:54 +0200)]
Cycles: Rename tri_woop to tri_storage

It's no longer a pre-computed data and just a storage of triangle
coordinates which are faster to access to.

3 years agoFix T48084: Solidify uses alternate quad-direction
Campbell Barton [Mon, 11 Apr 2016 12:56:17 +0000 (22:56 +1000)]
Fix T48084: Solidify uses alternate quad-direction

This prevents twisted quads from self-intersecting.

This change makes the duplicate surface match the first vertex in the face,
so the diagonal indices match in the face copy.

3 years agoFix T48082: Unwrap overwrites face selection
Campbell Barton [Mon, 11 Apr 2016 10:24:46 +0000 (20:24 +1000)]
Fix T48082: Unwrap overwrites face selection

Sync selection option made adding a new UV layer select all edit-mesh faces.
Now just select the UV's, ignoring sync-select option.

3 years agoFix T48103: Wrong renders on AMD OpenCL when Light Falloff node is used
Sergey Sharybin [Mon, 11 Apr 2016 08:54:41 +0000 (10:54 +0200)]
Fix T48103: Wrong renders on AMD OpenCL when Light Falloff node is used

3 years agoBGE: Fix T48071: Global logic manager
Porteries Tristan [Sun, 10 Apr 2016 15:36:10 +0000 (17:36 +0200)]
BGE: Fix T48071: Global logic manager

Previously the logic manager was used as a global variable for SCA_ILogicBrick::m_sCurrentLogicManager,
this request to always update it before run any python script and allow call function like
ConvertPythonTo[GameObject/Mesh]. The bug showed in T48071 is that as exepted the global
m_sCurrentLogicManager is not updated with the proper scene logic manager.
Instead of trying to fix it by updating the logic manager everywhere and wait next bug report to add
a similar line. The following patch propose a different way:
- Every logic brick now contain its logic manager to SCA_ILogicBrick::m_logicManager, this value is
  set and get by SCA_ILogicBrick::[Set/Get]LogicManager, It's initialized from blender conversion and
  scene merging.
- Function ConvertPythonTo[GameObject/mesh] now take as first argument the logic manager to find name
  coresponding object or mesh. Only ConvertPythonToCamera doesn't do that because it uses the
  KX_Scene::FindCamera function.

Reviewers: moguri

Differential Revision: