blender.git
3 years agoBuildbot: Attempt to use proper Clang for CUDA binaries
Sergey Sharybin [Mon, 19 Sep 2016 14:11:19 +0000 (16:11 +0200)]
Buildbot: Attempt to use proper Clang for CUDA binaries

3 years agoCycles: Cleanup code style in split kernel
Sergey Sharybin [Mon, 19 Sep 2016 14:04:45 +0000 (16:04 +0200)]
Cycles: Cleanup code style in split kernel

3 years agoFix T49375: align rotation with snap target isn't toggleable in edit mode.
Bastien Montagne [Mon, 19 Sep 2016 13:49:43 +0000 (15:49 +0200)]
Fix T49375: align rotation with snap target isn't toggleable in edit mode.

Based on D2237, but fixed patch always hiding 'snap on self' button...

Should be safe for 2.78.

3 years agoCycles: More tweaks to make specialized BVH traversal matching
Sergey Sharybin [Mon, 19 Sep 2016 13:29:37 +0000 (15:29 +0200)]
Cycles: More tweaks to make specialized BVH traversal matching

3 years agoCycles: Avoid redundant intersection pre-calculation
Sergey Sharybin [Mon, 19 Sep 2016 13:14:21 +0000 (15:14 +0200)]
Cycles: Avoid redundant intersection pre-calculation

3 years agoCycles: Cleanup, sync some comments across different traversal
Sergey Sharybin [Mon, 19 Sep 2016 13:01:30 +0000 (15:01 +0200)]
Cycles: Cleanup, sync some comments across different traversal

3 years agoCycles: Cleanup, always use parenthesis
Sergey Sharybin [Mon, 19 Sep 2016 12:59:24 +0000 (14:59 +0200)]
Cycles: Cleanup, always use parenthesis

Makes it simpler to compare different traversal algorithms.

3 years agoLowercase includes for psapi.h and dbghelp.h windows includes.
Martijn Berger [Mon, 19 Sep 2016 12:20:37 +0000 (14:20 +0200)]
Lowercase includes for psapi.h and dbghelp.h windows includes.
This makes cross compilation a little less painful

3 years agoFix T49385: Copy buffer is not from pose mode. Report Error
Sergey Sharybin [Mon, 19 Sep 2016 12:17:05 +0000 (14:17 +0200)]
Fix T49385: Copy buffer is not from pose mode. Report Error

Quick fix for now, need to unlock studio here as well.

Proper fix would be to modify API a bit and pass flags which will
prevent expand called on bmain perhaps. But this we should discuss
a bit,

3 years agoCycles: Move BVH constants to an own files, so they are easily re-usable
Sergey Sharybin [Mon, 19 Sep 2016 11:00:41 +0000 (13:00 +0200)]
Cycles: Move BVH constants to an own files, so they are easily re-usable

3 years agoRemove null-check of argument which is attributed as non-null
Sergey Sharybin [Mon, 19 Sep 2016 08:18:10 +0000 (10:18 +0200)]
Remove null-check of argument which is attributed as non-null

This was logically incorrect and was causing warning and compilation
errors with strict compiler flags.

3 years agoCacheFile: make sure SpinLock is destroyed when exiting Blender.
Kévin Dietrich [Mon, 19 Sep 2016 07:02:31 +0000 (09:02 +0200)]
CacheFile: make sure SpinLock is destroyed when exiting Blender.

Missed in rB62b1cdd6.

3 years agoCycles: Fix typo that would sometimes result in subsurf modifier being disabled
Mai Lavelle [Mon, 19 Sep 2016 02:11:07 +0000 (22:11 -0400)]
Cycles: Fix typo that would sometimes result in subsurf modifier being disabled

3 years agoVarious cleanups related to button locking
Julian Eisel [Mon, 19 Sep 2016 00:25:59 +0000 (02:25 +0200)]
Various cleanups related to button locking

* Rename uiBut.lockstr to disabled_info
* Remove unreachable code
* Replace duplicated check with assert
* Replace overly ambitious check with assert
* Add comments

3 years agoCleanup: Completely replace/remove uiBut.lock
Julian Eisel [Sun, 18 Sep 2016 23:49:17 +0000 (01:49 +0200)]
Cleanup: Completely replace/remove uiBut.lock

Old leftover from pre 2.5 days. Now handled through UI_BUT_DISABLED button flag.

3 years agoMinor corrections for previous commit
Julian Eisel [Sun, 18 Sep 2016 19:54:24 +0000 (21:54 +0200)]
Minor corrections for previous commit

Was using wrong argument name in doxygen comment. Also reduced scope of vars.

Sorry for the noise :/

3 years agoBLI_listbase: Add/use utility to move link (BLI_listbase_link_move)
Julian Eisel [Sun, 18 Sep 2016 19:36:34 +0000 (21:36 +0200)]
BLI_listbase: Add/use utility to move link (BLI_listbase_link_move)

We were calling BLI_remlink and then BLI_insertlinkbefore/after quite often. BLI_listbase_link_move simplifies code a bit and makes it easier to follow. It also returns if link position has changed which can be used to avoid unnecessary updates.

Added it to a number of list reorder operators for now and made use of return value. Behavior shouldn't be changed.

Also some minor cleanup.

3 years agoFix T49245: Adaptive Subdivision with Auto Smooth causes weird mesh appearance
Mai Lavelle [Sun, 18 Sep 2016 17:21:29 +0000 (13:21 -0400)]
Fix T49245: Adaptive Subdivision with Auto Smooth causes weird mesh appearance

3 years agoGPencil: Don't show error popup when strokes can't be reordered further
Julian Eisel [Sun, 18 Sep 2016 16:46:22 +0000 (18:46 +0200)]
GPencil: Don't show error popup when strokes can't be reordered further

Was spawning error popup each time user tried to move a stroke higher or lower than the list allowed. We don't do that anywhere else and it's not really useful info for the user. So rather not bother her.

3 years agoCycles: Fix update of subdivision meshes when global dice rates change
Mai Lavelle [Sun, 18 Sep 2016 16:04:12 +0000 (12:04 -0400)]
Cycles: Fix update of subdivision meshes when global dice rates change

When subdivision settings were moved from meshes to objects this was missed,
should work fine now.

3 years agoCycles: Soft minimum for dice rates
Mai Lavelle [Sun, 18 Sep 2016 00:45:00 +0000 (20:45 -0400)]
Cycles: Soft minimum for dice rates

Use 0.5 as a soft minimum for dice rates to help from setting them too
low. Lower values can still be set by typing in the value.

3 years agoCycles: Adaptive isolation
Mai Lavelle [Fri, 16 Sep 2016 22:07:24 +0000 (18:07 -0400)]
Cycles: Adaptive isolation

Idea here is to select the lowest isolation level that wont compromise quality.
By using the lowest level we save memory and processing time. This will also
help avoid precision issues that have been showing up from using the highest
level (T49179, T49257).

This is a pretty simple heuristic that gives ok results. There's more we could
do here, such as filtering for vertices/edges adjacent geometric features that
need isolation instead of checking them all, but the logic there could get a
bit involved.

There's potential for slight popping of edges during animation if the dice
rate is low, but I don't think this should be a problem since low dice rates
really shouldn't be used in animation anyways.

Reviewed By: brecht, sergey

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

3 years agoGPencil: Fix memory leak using stroke arrange OP
Julian Eisel [Sun, 18 Sep 2016 15:25:12 +0000 (17:25 +0200)]
GPencil: Fix memory leak using stroke arrange OP

3 years agoFix T49384: crash in tangent space calculation with NaN mesh vertices.
Brecht Van Lommel [Sun, 18 Sep 2016 11:06:15 +0000 (13:06 +0200)]
Fix T49384: crash in tangent space calculation with NaN mesh vertices.

3 years ago[Windows/make.bat] Clean only after all parameters have been processed so the full...
lazydodo [Sat, 17 Sep 2016 15:19:54 +0000 (09:19 -0600)]
[Windows/make.bat] Clean only after all parameters have been processed so the full path is known, and require a convenience target to be set. Also added a helpful error message if any of the required data is not available.

3 years agoFix T49383: Color pickers are available if the color is locked
Antonioya [Sat, 17 Sep 2016 07:01:09 +0000 (09:01 +0200)]
Fix T49383: Color pickers are available if the color is locked

If the color is locked, the row is disabled, but the picker is still
available.

This error was present in older versions for layer color.

3 years agoOpenGL render: Bugfix (unreported) after rB6f92604e539b2114763150fb1ace60d28e59a889
Thomas Beck [Fri, 16 Sep 2016 22:21:34 +0000 (00:21 +0200)]
OpenGL render: Bugfix (unreported) after rB6f92604e539b2114763150fb1ace60d28e59a889

Crashes occured immediately when clicking on "OpenGL render image" because there was only a task pool created previously when it was an animation. Solved it by introducing a variable is_animation to the openglrender and omitting the task_pool call when it's no animation.

@sergey: Please check my changes, moved the pool_ok and the lock into the is_animation clause.

3 years agoPose Library pose list: Default to 5 rows to match the new up/down buttons
Sybren A. Stüvel [Fri, 16 Sep 2016 16:21:20 +0000 (18:21 +0200)]
Pose Library pose list: Default to 5 rows to match the new up/down buttons

The buttons now nicely align with the pose list itself.

3 years agoBuildbot: Disable QuickTime for the time being
Sergey Sharybin [Fri, 16 Sep 2016 15:49:56 +0000 (17:49 +0200)]
Buildbot: Disable QuickTime for the time being

Buildbot machine was updated to the new SDK which seems to have
QTKit removed.

For until we've installed older SDK or ported our code to a new
AVFramework disabling QuickTime.

3 years agoPose library sorting: return OPERATOR_CANCELLED when no-op
Sybren A. Stüvel [Fri, 16 Sep 2016 15:32:46 +0000 (17:32 +0200)]
Pose library sorting: return OPERATOR_CANCELLED when no-op

A no-op happens when trying to move the top pose further up, or the
bottom pose further down.

3 years agoImprove description of move operator direction properties
Julian Eisel [Fri, 16 Sep 2016 15:03:44 +0000 (17:03 +0200)]
Improve description of move operator direction properties

These may be exposed in UI (keymap editor & redo panel), so better avoid using identifiers like "UP" "DOWN". They are redundant anyway (already displayed).

3 years agoFix jumping view when expanding graph editor channel over view bounds
Julian Eisel [Fri, 16 Sep 2016 14:38:57 +0000 (16:38 +0200)]
Fix jumping view when expanding graph editor channel over view bounds

Didn't change versioning_250.c entries, flags will be overridden anyway.

3 years agoFix vertical scrollbar adding to region width in graph editor
Julian Eisel [Fri, 16 Sep 2016 14:20:28 +0000 (16:20 +0200)]
Fix vertical scrollbar adding to region width in graph editor

Had to calculate draw region width based on region size excluding scrollbars.

3 years agoRemove debug only code
Sergey Sharybin [Fri, 16 Sep 2016 14:11:38 +0000 (16:11 +0200)]
Remove debug only code

Thanks Severin for spotting it!

3 years agoTweak for pinned/always visible curves in Graph Editor
Sergey Sharybin [Fri, 16 Sep 2016 13:56:09 +0000 (15:56 +0200)]
Tweak for pinned/always visible curves in Graph Editor

Allow such kind of pin for armature bones.

3 years agoAdded buttons to move a pose in a pose library up/down.
Sybren A. Stüvel [Fri, 16 Sep 2016 13:07:23 +0000 (15:07 +0200)]
Added buttons to move a pose in a pose library up/down.

This will break the pose library preview add-on, since that add-on uses
file indices rather than pose names.

3 years agoPicky correction to previous commit
Julian Eisel [Fri, 16 Sep 2016 13:09:21 +0000 (15:09 +0200)]
Picky correction to previous commit

A bit nicer to do empty-string check for operator poll message as well.

3 years agoUI: Allow showing why button is disabled in tooltip
Julian Eisel [Fri, 16 Sep 2016 12:50:47 +0000 (14:50 +0200)]
UI: Allow showing why button is disabled in tooltip

Uses red alert color. Operators that failed poll check already did this.

3 years agoOpenSubdiv: Remove redundant section define from shader compilation
Sergey Sharybin [Fri, 16 Sep 2016 10:28:06 +0000 (12:28 +0200)]
OpenSubdiv: Remove redundant section define from shader compilation

3 years agoOpenSubdiv: Split shader source files
Sergey Sharybin [Fri, 16 Sep 2016 10:25:40 +0000 (12:25 +0200)]
OpenSubdiv: Split shader source files

Was a bit annoying to do tweaks in a file which contained all
vertex, geometry and fragment shaders.

3 years agoGPencil: Remove toggle option for pop-up specials menu
Antonioya [Fri, 16 Sep 2016 09:57:48 +0000 (11:57 +0200)]
GPencil: Remove toggle option for pop-up specials menu

According UI rules, no toggle options in pop-ups menus, so remove it.

3 years agoFix T49349: Baking action doesnt bake multiple objects.
Bastien Montagne [Fri, 16 Sep 2016 09:49:42 +0000 (11:49 +0200)]
Fix T49349: Baking action doesnt bake multiple objects.

Tooltip was wrong here, it can only bake a single (active) object, 'only selected' option
is for pose bones only...

3 years agoGPencil: Add a new special menu for editing and replace subdivision shortcut
Antonioya [Fri, 16 Sep 2016 09:48:41 +0000 (11:48 +0200)]
GPencil: Add a new special menu for editing and replace subdivision shortcut

Replace the W shortcut for subdivision by a new menu for edit specials
in order to keep consistency in UI.

Subdivision is not used all the time, so it's better assign this
shortcut to menu.

3 years agoFix T49372: Fresnel node: difference between 2.76 and 2.78 GLSL output
Sergey Sharybin [Fri, 16 Sep 2016 09:48:42 +0000 (11:48 +0200)]
Fix T49372: Fresnel node: difference between 2.76 and 2.78 GLSL output

3 years agoGPencil: New subdivide stroke operator
Antonioya [Thu, 15 Sep 2016 11:29:26 +0000 (13:29 +0200)]
GPencil: New subdivide stroke operator

In some situations the artist needs to subdivide a stroke created with
few points before, specially for sculpting.

The subdivision is done for any pair of continuous selected points in
the same stroke.

The operator can be activated in edit mode with W key and has a
parameter for number of cuts.

3 years agoOpenGL render: Move file writing to a separate thread
Sergey Sharybin [Fri, 16 Sep 2016 08:28:41 +0000 (10:28 +0200)]
OpenGL render: Move file writing to a separate thread

The idea is to have a dedicated thread which is responsive for all the
file writing to a separate thread, so slow disk will not slow down
OpenGL itself.

Gives really nice speedup around 1.5x when exporting barber shop layout
file to h264 video.

3 years agoFix T49369: Blender crashes/closes down application at alembic export of
Kévin Dietrich [Fri, 16 Sep 2016 07:27:44 +0000 (09:27 +0200)]
Fix T49369: Blender crashes/closes down application at alembic export of
any object

There were a couple of crashes caused by stupid typos in
rB631af9f930d2fd2c76751204ff22239aa95f761d and
rB78ea06fea4a74181c25254ed72d50d8a743b6954, as well as a shamefull lack
of 'testing before committing' which only affect exporting.

One crash was due to using RNA_boolean_get instead of RNA_enum_get, the
other one was a tricky case of order of deletion happening in the
destructors of AbcExporter and ArchiveWriter.

Should not affect RC or release.

3 years agoCleanup: Redundant forward declaration
Sergey Sharybin [Thu, 15 Sep 2016 14:46:19 +0000 (16:46 +0200)]
Cleanup: Redundant forward declaration

3 years agoFix mistake in previous commit
Sergey Sharybin [Thu, 15 Sep 2016 14:34:10 +0000 (16:34 +0200)]
Fix mistake in previous commit

Was copying things in other way around and was not performing
proper color space conversion.

3 years agoOpenGL render: Avoid byte-float-byte roundtrip
Sergey Sharybin [Thu, 15 Sep 2016 13:34:37 +0000 (15:34 +0200)]
OpenGL render: Avoid byte-float-byte roundtrip

It was annoyingly slow to do roundtrip from byte OpenGL render to
float render result and back to byte image format (which is used
in 99% of cases for the OpenGL previews),

Now we use render result's rect32 to store render result which is
already supposed to be in the display space.

Gives about 30% speed improvement for OpenGL previews here.

3 years agoOpenCOlorIO: Add explicit linearSRGB -> sRGB lookup table
Sergey Sharybin [Thu, 15 Sep 2016 13:08:20 +0000 (15:08 +0200)]
OpenCOlorIO: Add explicit linearSRGB -> sRGB lookup table

Previously converting from linear space to SRGB was doing rather
slow inverted 1D lookup. Adding explicit inverse LUT gives 20%
speedup of OpenGL render.

Next question is: why do we even bother with sRGB conversion here,
OpenGL is already in the proper space so in theory we can avoid
quite some color space conversions. In any case, having this case
optimized in nice anyway.

3 years agoOpenGL render: Add developer option to easily enable time information
Sergey Sharybin [Thu, 15 Sep 2016 13:04:19 +0000 (15:04 +0200)]
OpenGL render: Add developer option to easily enable time information

3 years agoBring blender_release.cmake uptodate with the changes from D2227
lazydodo [Thu, 15 Sep 2016 12:34:57 +0000 (06:34 -0600)]
Bring blender_release.cmake uptodate with the changes from D2227

3 years ago[windows] add some helpers to make.bat to facilitate making release builds.
lazydodo [Wed, 14 Sep 2016 23:50:16 +0000 (17:50 -0600)]
[windows] add some helpers to make.bat to facilitate making release builds.

New features:
1) Release target that checks for both cuda 7.5 and 8 with WITH_CYCLES_CUDA_BINARIES=ON and CYCLES_CUDA_BINARIES_ARCH=sm_20;sm_21;sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61 options set.
2) Option to switch between x86 and x64 builds, the default remains (auto detect the architecture) but can be overridden.
3) Option to switch between vs12(2013) and vs14(2015) default is 2013.

Reviewers: juicyfruit, sergey

Reviewed By: sergey

Tags: #platform:_windows

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

3 years agoDepsgraph: Avoid some false-positive time dependencies of scripted drivers
Sergey Sharybin [Thu, 15 Sep 2016 10:12:59 +0000 (12:12 +0200)]
Depsgraph: Avoid some false-positive time dependencies of scripted drivers

This was quite weak to consider all scripted expression to be time-dependent.
Current solution is somewhat better but still crappy. Not sure how can we make
it really nice.

3 years agoFix filebrowser not getting back to valid dir in Release builds.
Bastien Montagne [Thu, 15 Sep 2016 10:12:19 +0000 (12:12 +0200)]
Fix filebrowser not getting back to valid dir in Release builds.

Stupid mistake wrapping path validation code inside a BLI_assert, which means it was
only called in Debug builds...

Found by Sergey, thanks.

Should be backported to 2.78.

3 years agoFix crash in some cases when deleting particle systems.
Bastien Montagne [Thu, 15 Sep 2016 09:50:56 +0000 (11:50 +0200)]
Fix crash in some cases when deleting particle systems.

Those 'never null' ID pointers are really a PITA to handle... luckily we don't have much of those around!

Found by Sybren, thanks.

Should be backported to 2.78.

3 years agoFix Py's IDs user mapping: do not consider ShapeKeys' from here.
Bastien Montagne [Thu, 15 Sep 2016 09:12:31 +0000 (11:12 +0200)]
Fix Py's IDs user mapping: do not consider ShapeKeys' from here.

This is internal pointer helper for scene evaluation and tools, though exposed to bpy API,
it can give false 'dependency cycles' in bpy.data.user_map() results.

That's followup to rBe007552442634 really, both should be backported to 2.78

3 years agoOpenGL render: Skip GP passes if viewport has GP visibility disabled
Sergey Sharybin [Thu, 15 Sep 2016 09:23:11 +0000 (11:23 +0200)]
OpenGL render: Skip GP passes if viewport has GP visibility disabled

3 years agoFix Py's IDs user mapping: do not consider proxy_from here.
Bastien Montagne [Thu, 15 Sep 2016 08:11:47 +0000 (10:11 +0200)]
Fix Py's IDs user mapping: do not consider proxy_from here.

This is internal pointer helper for scene evaluation and tools, it's not exposed to bpy API anyway,
and can give false 'dependency cycles' in bpy.data.user_map() results.

Found by sybren in his Splode work.

3 years agoUse temp .blend file copybuffer for pose copy-paste
Sergey Sharybin [Wed, 14 Sep 2016 15:50:11 +0000 (17:50 +0200)]
Use temp .blend file copybuffer for pose copy-paste

Uses similar way of storing temp data as object copy paste, just
uses different read entrypoint which does not modify current bmain.

This gives ability to easily copy-paste poses from one blender to
another one.

Hopefully doesn't introduce user-measurable differences.

Request from Peer here in the studio.

Reviewers: mont29

Reviewed By: mont29

Subscribers: hjalti, fsiddi

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

3 years agoRevert "Cycles: Tweak empty boundbox children"
Sergey Sharybin [Thu, 15 Sep 2016 07:39:33 +0000 (09:39 +0200)]
Revert "Cycles: Tweak empty boundbox children"

This reverts commit ecbfa31caaadb03c53c0fe1459718b99613c8804.

Original commit broke logic in nodes re-fitting. That area can
access non-existing children momentarely. Not sure what would
be best solution here, for now simply reverting the change/

3 years agoFix T49179: Parts of mesh disappear with adaptive subdivision
Mai Lavelle [Wed, 14 Sep 2016 23:34:43 +0000 (19:34 -0400)]
Fix T49179: Parts of mesh disappear with adaptive subdivision

Problem was zero length normal caused by a precision issue in patch evaluation.
This is somewhat of a quick fix, but is better than allowing possible NaNs to
occur and cause problems elsewhere.

3 years agoCycles: Deduplicate light pass code
Lukas Stockner [Wed, 14 Sep 2016 18:09:37 +0000 (20:09 +0200)]
Cycles: Deduplicate light pass code

3 years agoCycles: Stop lamp sampling if the lamp isn't visible
Lukas Stockner [Fri, 9 Sep 2016 13:51:40 +0000 (15:51 +0200)]
Cycles: Stop lamp sampling if the lamp isn't visible

Both spot and area light have large areas where they're not visible.
Therefore, this patch stops the light sampling code when one of these cases (outside of the spotlight cone or behind the area light) occurs, before the lamp shader is evaluated.
In the case of the area light, the solid angle sampling can also be skipped.

In a test scene with Sample All Lights and 18 Area lamps and 9 Spot lamps that all point away from the area that the camera sees, render time drops from 12sec to 5sec.

Reviewers: brecht, sergey, dingto, juicyfruit

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

3 years agoCycles: Also support the constant emission speedup for mesh lights
Lukas Stockner [Wed, 14 Sep 2016 16:53:35 +0000 (18:53 +0200)]
Cycles: Also support the constant emission speedup for mesh lights

Reviewers: brecht, sergey, dingto, juicyfruit

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

3 years agoFix T49352: Blender's file browser do not display previews.
Bastien Montagne [Wed, 14 Sep 2016 15:26:42 +0000 (17:26 +0200)]
Fix T49352: Blender's file browser do not display previews.

Own stupid 'logical inversion' mistake in rBa2677100fef06af.

3 years agofix Mac build with Xcode 8
Mike Erwin [Wed, 14 Sep 2016 14:23:48 +0000 (16:23 +0200)]
fix Mac build with Xcode 8

Small issues in GHOST
- use NSApplicationDelegate protocol for our app delegate
- make sure NSApp is initialized before using
(cherry picked from commit df7be04ca6d4b6dccc998445386228699d72d072)

3 years agoCleanup: Fix epic indent failure in previous commit :/
Bastien Montagne [Wed, 14 Sep 2016 14:18:36 +0000 (16:18 +0200)]
Cleanup: Fix epic indent failure in previous commit :/

3 years agoFix missing PaintCurves list in bpy.data
Bastien Montagne [Wed, 14 Sep 2016 14:13:21 +0000 (16:13 +0200)]
Fix missing PaintCurves list in bpy.data

Minimal list features for now, no add/remove stuff, that we can add later...

Reported by sybren.

Should be safe for 2.78.

3 years agoFix memory leak in copy pose operator
Sergey Sharybin [Wed, 14 Sep 2016 13:56:23 +0000 (15:56 +0200)]
Fix memory leak in copy pose operator

3 years agoFix T49342: TypeError when autocompleting bpy.app.something.
Bastien Montagne [Wed, 14 Sep 2016 13:40:35 +0000 (15:40 +0200)]
Fix T49342: TypeError when autocompleting bpy.app.something.

Regression from rB036c006cefe471. We can't use self here, self is bpy.app, not pydescriptor of python path getsetter...

So for now, do not try to replace getsetter by actual value in bpy.app's dict,
just return static var generated on first run.

Should be safe for 2.78.

3 years agoFix T49341: Bad motion blur behavior in Cycles when using Speed effect in Sequencer
Sergey Sharybin [Wed, 14 Sep 2016 12:58:55 +0000 (14:58 +0200)]
Fix T49341: Bad motion blur behavior in Cycles when using Speed effect in Sequencer

Cycles was thinking it always rendering integer frame, which is not correct.

3 years agoAttempt to fix broken path remapping in own rB443b3ca9b9cb.
Bastien Montagne [Wed, 14 Sep 2016 10:58:01 +0000 (12:58 +0200)]
Attempt to fix broken path remapping in own rB443b3ca9b9cb.

3 years agoCMake: decouple WITH_CYCLES_OPENSUBDIV from WITH_OPENSUBDIV, and enable on OS X.
Brecht Van Lommel [Tue, 13 Sep 2016 20:55:18 +0000 (22:55 +0200)]
CMake: decouple WITH_CYCLES_OPENSUBDIV from WITH_OPENSUBDIV, and enable on OS X.

Reviewed By: sergey

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

3 years agoFix two issues related to 'partial' .blend files:
Bastien Montagne [Wed, 14 Sep 2016 09:35:16 +0000 (11:35 +0200)]
Fix two issues related to 'partial' .blend files:

I) Filename was not put in temp Main generated to save selected data only,
this was breaking readcode when trying to open partial file, leading to missing
filename in final loaded Main data.

II) Read code would confuse partial .blend files with Undo ones, when they had no screen in them
(which happens to 99.999% of partial .blend files I guess).

Reported by @sybren, thanks.

Should be safe enough for 2.78 release.

3 years agoFileBrowser: Always do full cache refresh while we are still listing...
Bastien Montagne [Tue, 13 Sep 2016 17:02:27 +0000 (19:02 +0200)]
FileBrowser: Always do full cache refresh while we are still listing...

Does not seem to be a problem with embeded filelisting code, but was breaking with some experimental asset engines.

3 years agoCycles: Implement threaded SVM nodes compilation
Sergey Sharybin [Fri, 9 Sep 2016 10:27:51 +0000 (12:27 +0200)]
Cycles: Implement threaded SVM nodes compilation

The title says it all actually. From tests with barber shop scene here
gives 2-3x speedup for shader compilation on my oldie i7 machine. The
gain is mainly due to textures metadata query from jpeg files (which
seems to requite de-compression before metadata can be read). But in
theory could give nice improvements for scenes with huge node trees
as well (i'm talking about node trees of complexity of fractal which
we had reports about in the past).

Reviewers: juicyfruit, dingto, lukasstockner97, brecht

Reviewed By: brecht

Subscribers: monio, Blendify

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

3 years agoFix bpy.data.user_map() ignoring unused datablocks.
Bastien Montagne [Tue, 13 Sep 2016 11:22:03 +0000 (13:22 +0200)]
Fix bpy.data.user_map() ignoring unused datablocks.

Should be backported to 2.78.
Found by Sybren here in studio, thanks!

3 years agoOutliner: Report linked datablock edit failure when trying to rename linked data...
Philipp Oeser [Tue, 13 Sep 2016 11:12:44 +0000 (13:12 +0200)]
Outliner: Report linked datablock edit failure when trying to rename linked data in outliner

3 years agoFix T49323: Ineffective bone roll calculation with low rig scale
Sergey Sharybin [Tue, 13 Sep 2016 10:38:47 +0000 (12:38 +0200)]
Fix T49323: Ineffective bone roll calculation with low rig scale

The code was expecting vector to be normalized, however after
applying inverted object matrix it was possible to have scale
applied to it.

3 years agoFix T49336: Outliner allows to edit restrict flags for linked objects
Sergey Sharybin [Tue, 13 Sep 2016 09:33:55 +0000 (11:33 +0200)]
Fix T49336: Outliner allows to edit restrict flags for linked objects

3 years agoCycles: Tweak empty boundbox children
Sergey Sharybin [Tue, 13 Sep 2016 09:05:11 +0000 (11:05 +0200)]
Cycles: Tweak empty boundbox children

The idea here is to make assert failure to fail sooner on an incorrect
node address rather than later with stack overflow.

3 years agoFix T49290: Specific .blend with hair crashes in MacOS 2.78 RC1 on render
Sergey Sharybin [Tue, 13 Sep 2016 08:59:48 +0000 (10:59 +0200)]
Fix T49290: Specific .blend with hair crashes in MacOS 2.78 RC1 on render

The issue was caused by some false-positive empty non-AABB intersection.
Tried to tweak it a bit so it does not record intersection anymore.

Hopefully will work for all platforms. Tested here on iMac and Debian.

3 years agoAPI doc update script: Fix generated zipfile name, was broken in 'release' case...
Bastien Montagne [Tue, 13 Sep 2016 06:38:10 +0000 (08:38 +0200)]
API doc update script: Fix generated zipfile name, was broken in 'release' case...

3 years agoFix error in --debug-handlers printing
Julian Eisel [Mon, 12 Sep 2016 16:39:25 +0000 (18:39 +0200)]
Fix error in --debug-handlers printing

Was missing else block (and also missing newline character). Caused by e672e7a070e698.

3 years agoFix code which was commented by accident
Sergey Sharybin [Mon, 12 Sep 2016 14:29:54 +0000 (16:29 +0200)]
Fix code which was commented by accident

Well, more like some last-minute checks which i did not see before commit.

Let's increase commit ratio!

3 years agoFix T49327: Cycles OSL Mode: RGB Curves node only outputs gray scale images
Sergey Sharybin [Mon, 12 Sep 2016 14:14:40 +0000 (16:14 +0200)]
Fix T49327: Cycles OSL Mode: RGB Curves node only outputs gray scale images

To be backported to 2.78 release.

3 years agoCycles: Fix compilation error after recent commits
Sergey Sharybin [Mon, 12 Sep 2016 14:06:50 +0000 (16:06 +0200)]
Cycles: Fix compilation error after recent commits

3 years agoGraph editor: Add channel option to make it persistent on display
Sergey Sharybin [Mon, 12 Sep 2016 13:31:28 +0000 (15:31 +0200)]
Graph editor: Add channel option to make it persistent on display

The idea is to allow certain animation channels to be always visible in
animation editors. So, for example, one can pin Camera animation to the
editor so it is always possible to refine/tweak camera animation when
animating something else in the scene.

There is probably some more polishing required, and some current
limitations could be solved in the future but should be a good starting
point already.

Currently only works for object without recursing into deeper datablock
(so for example, it's not possible to pin object material animation).

Studio request by Colin Levy.

3 years agoFix T49296, assert failure in Bevel code.
Howard Trickey [Mon, 12 Sep 2016 11:27:29 +0000 (07:27 -0400)]
Fix T49296, assert failure in Bevel code.

The mesh interpolation function failed to fill a fractions-of-the-way
array properly when the distances are very small but nonzero.

3 years agoCycles: Fix wrong SSS in combination with hair on AVX2 platform
Sergey Sharybin [Mon, 12 Sep 2016 10:48:35 +0000 (12:48 +0200)]
Cycles: Fix wrong SSS in combination with hair on AVX2 platform

Not sure why exactly that happened, need a closer look.

3 years agoCycles: Use XDG's .cache folder for cached kernels
Sergey Sharybin [Mon, 5 Sep 2016 14:41:08 +0000 (16:41 +0200)]
Cycles: Use XDG's .cache folder for cached kernels

Basically just moves cached kernels from ~/.config/blender/BLENDER_VERSION to
~/.cache/cycles/kernels. This has following benefits:

- Follows XDG specification more closely,
  not as if it's totally crucial or measurable by users, but still nice.

- Prevents unexpected sizes of config folder, makes disk space used in more
  predictable for users way.

- Allows to share kernels across multiple Blender versions,
  which makes it easier debugging at the times close to release.

- "Copy Previous Settings" operator will no longer be copying possibly
  gigabytes of cached kernels, which used to lead to really nast disk usage
  and annoying delays of copying settings.

- In the future we can have some smart logic to clear old unused cached
  kernels.

Currently only done for Linux and OSX. Windows still follows old "cache"
folder logic, but it's not really important for now because we don't
support kernel compilation on this platform yet.

Reviewers: dingto, juicyfruit, brecht

Reviewed By: brecht

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

3 years agoCycles: Fix shading and crashes resulting from constant folding on displacement
Mai Lavelle [Sun, 11 Sep 2016 17:39:12 +0000 (13:39 -0400)]
Cycles: Fix shading and crashes resulting from constant folding on displacement

Constant folding was removing all nodes connected to the displacement output
if they evaluated to a constant, causing there to be no valid graph for
displacement even when there was displacement to be applied, and sometimes
caused crashes.

3 years agoCycles: Replace object index hack with actual checks for SD_TRANSFORM_APPLIED
Mai Lavelle [Sat, 3 Sep 2016 01:37:17 +0000 (21:37 -0400)]
Cycles: Replace object index hack with actual checks for SD_TRANSFORM_APPLIED

Using ones complement for detecting if transform has been applied was confusing
and led to several bugs. With this proper checks are made.

Also added a few transforms where they were missing, mostly affecting baking
and displacement when `P` is used in the shader (previously `P` was in the
wrong space for these shaders)

Also removed `TIME_INVALID` as this may have resulted in incorrect
transforms in some cases.

Reviewed By: brecht

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

3 years agoCycles: Fix bump mapping to use object space when used with true displacement
Mai Lavelle [Fri, 2 Sep 2016 04:41:04 +0000 (00:41 -0400)]
Cycles: Fix bump mapping to use object space when used with true displacement

Bump mapping was happening in world space while displacement happens in object
space, causing shading errors when displacement type was used with bump mapping.

To fix this the proper transforms are added to bump nodes. This is only done
for automatic bump mapping however, to avoid visual changes from other uses of
bump mapping. It would be nice to do this for all bump mapping to be consistent
but that will have to wait till we can break compatibility.

Reviewed By: brecht

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

3 years agoRevert "GPencil: Add IFACE_ macro to some strings"
Antonioya [Sun, 11 Sep 2016 11:05:29 +0000 (13:05 +0200)]
Revert "GPencil: Add IFACE_ macro to some strings"

This reverts commit b50a5b92c15e0f110ca978352c2ba59bc3e97dd3 because BKE_report functions are already automatically handled by translation system.

3 years agoGPencil: Add IFACE_ macro to some strings
Antonioya [Sun, 11 Sep 2016 10:27:39 +0000 (12:27 +0200)]
GPencil: Add IFACE_ macro to some strings

3 years agoGPencil: Change interpolate stroke factor
Antonioya [Sun, 11 Sep 2016 10:22:30 +0000 (12:22 +0200)]
GPencil: Change interpolate stroke factor

Now the factor works similar to other Blender areas to make the factor
more consistent for artists. The value 0% means equal to original
stroke, 100% equal to final stroke (50% means half way). Any value below
0% or greater than 100% create an overshoot of the stroke.

3 years ago[CMAKE/Platform/Windows] Only perform version check if the actual compiler is MSVC
lazydodo [Sat, 10 Sep 2016 23:58:56 +0000 (17:58 -0600)]
[CMAKE/Platform/Windows] Only perform version check if the actual compiler is MSVC