blender.git
2 years agoMerge branch 'master' into viewport_bvh_select viewport_bvh_select
Julian Eisel [Thu, 8 Sep 2016 10:16:41 +0000 (12:16 +0200)]
Merge branch 'master' into viewport_bvh_select

2 years agoFix T49283: Crash in BKE_ptcache_make_particle_key.
Bastien Montagne [Thu, 8 Sep 2016 08:24:56 +0000 (10:24 +0200)]
Fix T49283: Crash in BKE_ptcache_make_particle_key.

This is really hack-fix actually, not sure why `get_pointcache_keys_for_time()` seems to assume
it will always find key for given part index at least for current frame, and whether this assumption
is wrong or whether bug happens elsewhere...

Anyway, this is to be wiped out in 2.8, so no point loosing too much time on it, for now merely
returning unchanged (i.e. zero'ed) ParticleKeys in case index2 is invalid. Won't hurt anyway,
even if this did not crash in release builds, would be returning giberish values.

2 years agoFix compilation error: Shadowing of variable
Sergey Sharybin [Thu, 8 Sep 2016 07:40:25 +0000 (09:40 +0200)]
Fix compilation error: Shadowing of variable

2 years agoFix strict compiler warnings
Sergey Sharybin [Thu, 8 Sep 2016 07:39:18 +0000 (09:39 +0200)]
Fix strict compiler warnings

2 years agoFix compilation error: missing forward declaration
Sergey Sharybin [Thu, 8 Sep 2016 07:38:24 +0000 (09:38 +0200)]
Fix compilation error: missing forward declaration

2 years agoFix T49286: Compilation error with XCode 7.0
Sergey Sharybin [Thu, 8 Sep 2016 07:27:51 +0000 (09:27 +0200)]
Fix T49286: Compilation error with XCode 7.0

Weirdly enough, this version of XCode seems to have static_assert()
even when NOT using C++11. This is totally weird and counter intuitive
since static_assert() is supposed to be C++11 onlky feature.

Can XCode stop using future, please? :)

2 years agoCycles: Fix OpenCL speed regression introduced with the improved bump mapping
Lukas Stockner [Wed, 7 Sep 2016 23:33:41 +0000 (01:33 +0200)]
Cycles: Fix OpenCL speed regression introduced with the improved bump mapping

The two SVM nodes added with e7ea1ae78c caused a slowdown on AMD cards when rendering with OpenCL, whether displacement was used or not.
In the Barcelona Pavillon scene on a RX480, this would cause a 12% slowdown.

Therefore, this commit adds a additional flag for feature-adaptive compilation so that the new SVM nodes are only enabled when they are needed (Node tree connected to the Displacement output and Displacement type set to Both).

Also, the nodes were also added to shaders when the Displacement Type was set to Bump (the default), which was unneccessary and is fixed now.

Thanks to linda2 on IRC for reporting and testing and to maiself for help with the displacement shader code.

This fix might be relevant for 2.78, but it should be tested further before including it.

2 years agoGPencil UI: Ensure "Move to Color" can be found from the colors panel dropdwon too
Joshua Leung [Wed, 7 Sep 2016 13:42:16 +0000 (01:42 +1200)]
GPencil UI: Ensure "Move to Color" can be found from the colors panel dropdwon too

2 years agoGP Interpolation: Mark created frames as being "breakdowns"
Joshua Leung [Wed, 7 Sep 2016 13:24:02 +0000 (01:24 +1200)]
GP Interpolation: Mark created frames as being "breakdowns"

This brings this tool more in line with the Breakdowner for armature animation,
with which it shares many commonalities.

2 years agoFix: GPencil drawing sessions now respect limits for maximum undo steps
Joshua Leung [Wed, 7 Sep 2016 13:09:55 +0000 (01:09 +1200)]
Fix: GPencil drawing sessions now respect limits for maximum undo steps

When drawing with Grease Pencil "continous drawing" for a long time
(i.e. basically, drawing a very large number of strokes), it could be
possible to cause lower-specced machines to run out of RAM and start
swapping. This was because there was no limit on the number of undo
states that the GP undo code was storing; since the undo states grow
exponentially on each stroke (i.e. each stroke results in another undo
state which contains all the existing strokes AND the newest stroke), this
could cause issues when taken to the extreme.

2 years agoCode Cleanup: Deduplicate undo node freeing code
Joshua Leung [Wed, 7 Sep 2016 11:53:13 +0000 (23:53 +1200)]
Code Cleanup: Deduplicate undo node freeing code

2 years agoFix T49273: Crash during access to dupli weights at launch time.
Bastien Montagne [Wed, 7 Sep 2016 10:45:58 +0000 (12:45 +0200)]
Fix T49273: Crash during access to dupli weights at launch time.

See commit's comments for details, but this boils down to: do not try to use
purely runtime cache data as a 'real' ID pointer in readcode, it's likely
doomed to fail in some cases, and is bad practice in any case!

Thix fix implies dupliweight's object will be invalid until first scene update
(i.e. first particles evaluation).

2 years agoGPencil: New interpolate strokes operators
Antonioya [Wed, 7 Sep 2016 07:54:50 +0000 (09:54 +0200)]
GPencil: New interpolate strokes operators

Two new modal operators to create a grease pencil interpolate drawing
for one frame or a complete sequence between two frames.  For drawing
the temporary strokes in the viewport, two drawing handlers have been
added to manage 3D and 2D stuff.

Video: https://youtu.be/qxYwO5sSg5Y

The operator shortcuts are Ctrl+E and Ctrl+Shift+E. During the modal
operator, the interpolation can be adjusted using the mouse (moving
left/right) or the wheel mouse.

2 years agoOpenSubdiv: Support multiple materials drawing in Cycles textured view
Sergey Sharybin [Wed, 7 Sep 2016 07:47:35 +0000 (09:47 +0200)]
OpenSubdiv: Support multiple materials drawing in Cycles textured view

Consider for inclusion into 2.78.

2 years agoAdd XK_ISO_Left_Tab to ghost's known X11 keydefines...
Bastien Montagne [Tue, 6 Sep 2016 20:32:17 +0000 (22:32 +0200)]
Add XK_ISO_Left_Tab to ghost's known X11 keydefines...

2 years agoCleanup previous commit...
Bastien Montagne [Tue, 6 Sep 2016 16:01:14 +0000 (18:01 +0200)]
Cleanup previous commit...

2 years agoGHOST X11 keyboard: Attempt to fix issues with modifier keys on some systems.
Bastien Montagne [Tue, 6 Sep 2016 15:54:40 +0000 (17:54 +0200)]
GHOST X11 keyboard: Attempt to fix issues with modifier keys on some systems.

Could not reproduce it here, but since users having the issue claims it comes from
rB16cb9391634dcc50e, let's try to use again ugly `XLookupKeysym()` for those modifier keys too...

2 years ago[cmake/cpack] allow override of package name
lazydodo [Tue, 6 Sep 2016 13:21:23 +0000 (07:21 -0600)]
[cmake/cpack] allow override of package name

Cpack generates a standard filename with git information in it, which might not always be wanted for release builds, this patch adds an option to override that default filename.

Reviewers: sergey, juicyfruit

Reviewed By: juicyfruit

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

ammended to fix: wrong variable name in main CMakeLists.txt

2 years agoRevert "Depsgraph: Prioritize evaluation of the new scheduled nodes"
Sergey Sharybin [Tue, 6 Sep 2016 14:43:26 +0000 (16:43 +0200)]
Revert "Depsgraph: Prioritize evaluation of the new scheduled nodes"

This reverts commit 9444cd56db1a4e43d03fa8c735cd893b2e74b913.

This commit caused some flickering in the bones when swapping IK to Fk.

While it's unclear why such change caused any regressions, let's revert
it to unlock the studio.

2 years ago[cmake/cpack] allow override of package name
lazydodo [Tue, 6 Sep 2016 13:21:23 +0000 (07:21 -0600)]
[cmake/cpack] allow override of package name

Cpack generates a standard filename with git information in it, which might not always be wanted for release builds, this patch adds an option to override that default filename.

Reviewers: sergey, juicyfruit

Reviewed By: juicyfruit

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

2 years agoFix T41883: Strip keyframes not respected for scenes rendered by other scenes
Sergey Sharybin [Tue, 6 Sep 2016 12:07:07 +0000 (14:07 +0200)]
Fix T41883: Strip keyframes not respected for scenes rendered by other scenes

2 years agoAdd script which scales splash screen down
Sergey Sharybin [Tue, 6 Sep 2016 10:27:58 +0000 (12:27 +0200)]
Add script which scales splash screen down

Based on reading documentation around. This particular version
is based on the ImageMagic documentation which could be found
there:

  http://www.imagemagick.org/Usage/filter/
  http://www.imagemagick.org/Usage/filter/nicolas/

Current filter is based on measuring mean error with the current
splash screen and choosing combination of parameters which
gives minimal mean error.

2 years agocleanup: macro whitespace \ alignment
Mike Erwin [Mon, 5 Sep 2016 17:30:57 +0000 (13:30 -0400)]
cleanup: macro whitespace \ alignment

Gotta be careful mixing tabs & spaces. This commit uses 4-space indent
to align the line continuation markers.

Follow-up to 3b52c4056aaf

2 years agoFix cast shadows (material option) in the viewport
Mike Erwin [Mon, 5 Sep 2016 17:05:00 +0000 (13:05 -0400)]
Fix cast shadows (material option) in the viewport

Fix cast shadows options (in material tab) not working in the viewport.
An off-by-one error. See D2194 for more.

Committing for Ulysse Martin (youle) who found & fixed this.

2 years agoFix T49252: Crash when image textures used with true displacement
Mai Lavelle [Mon, 5 Sep 2016 16:51:30 +0000 (12:51 -0400)]
Fix T49252: Crash when image textures used with true displacement

2 years agoUI: Ctrl+Tab and Ctrl+Shift+Tab to cycle through space context "tabs"
Julian Eisel [Mon, 5 Sep 2016 14:58:40 +0000 (16:58 +0200)]
UI: Ctrl+Tab and Ctrl+Shift+Tab to cycle through space context "tabs"

In User Preferences, Properties Editor and toolshelf, Ctrl+Tab and Ctrl+Shift+Tab now activates the next or previous space context (or category in case of toolshelf tabs), respectively.

For Properties Editor such functionality was completely missing, only toolshelf allowed cycling using ctrl+mousewheel (or only mousewheel while hovering tab region). Ctrl+Tab and Ctrl+Shift+Tab are common web browser shortcuts, so they're a reasonable choice to go with.
Reaching the first/last item doesn't cause the cycling to stop, we continue at the other end of the list then. (I didn't add this to Ctrl+Mousewheel toggling in toolshelf since I wanted to keep its behavior unchanged.)

We could get rid of (Ctrl+)Mousewheel cycling in toolshelf, but this may break user habits.

The cycling happens using a new operator, UI_OT_space_context_cycle, for toolshelf tabs it's hardcoded in panel handling code though.
Generalized rna_property_enum_step a bit and moved it to rna_access.c to allow external reuse.

Reviewed By: venomgfx
Differential Revision: https://developer.blender.org/D2189

2 years agoOpenSubdiv: Fix missing ORCO when enabling OSD but having dependency to the geometry
Sergey Sharybin [Mon, 5 Sep 2016 15:08:09 +0000 (17:08 +0200)]
OpenSubdiv: Fix missing ORCO when enabling OSD but having dependency to the geometry

Was causing huge viewport lags.

Reported by angavrilov in IRC, thanks!

Safe and nice for 2.78.

2 years agoFix T49251: moving smoke domain with additional resolution causes crash.
Alexander Gavrilov [Mon, 5 Sep 2016 12:50:12 +0000 (15:50 +0300)]
Fix T49251: moving smoke domain with additional resolution causes crash.

This is a bug in the multithreaded task manager in negative value range.

The problem here is that if previter is unsigned, the comparison in the
return statement is unsigned, and works incorrectly if stop < 0 &&
iter >= 0. This in turn can happen if stop is close to 0, because this
code is designed to overrun the stop by chunk_size*num_threads as
the threads terminate.

This probably should go into 2.78 as it prevents a crash.

2 years agoFix own mistake in recent rB8b2a45052093, broke saving render results as images in...
Bastien Montagne [Mon, 5 Sep 2016 11:12:05 +0000 (13:12 +0200)]
Fix own mistake in recent rB8b2a45052093, broke saving render results as images in some cases.

Reported by sebastian_k over IRC, thanks.

To be backported to 2.78.

2 years agoAttempt to fix compilation error with static boost on certain platforms
Sergey Sharybin [Mon, 5 Sep 2016 11:10:19 +0000 (13:10 +0200)]
Attempt to fix compilation error with static boost on certain platforms

This was reported in T49231.

2 years agoFix T35333: Update some WM/UI API functions docstrings.
Bastien Montagne [Mon, 5 Sep 2016 08:58:33 +0000 (10:58 +0200)]
Fix T35333: Update some WM/UI API functions docstrings.

Based on patch by @codemanx, but with slightly less verbose descriptions.

More detailed behavior etc. rather belongs to doc/python_api/examples/bpy.ops.x.py imho.

2 years agoFix T49226: Incorrect Material viewport shading of Cycles Normal Map node in Edit...
Sergey Sharybin [Fri, 2 Sep 2016 15:50:30 +0000 (17:50 +0200)]
Fix T49226: Incorrect Material viewport shading of Cycles Normal Map node in Edit mode for an object with Array modifier

Was incorrect indexing done in the array. Caused by 5abae51.

Not sure why it needed to be changed here, but array here is supposed to be
a loop data, so bringing back loop index as it originally was. The shading was
wrong in edit mode with BI active as well (so it's not like it's needed for
BI only).

Patch in collaboration with Alexander Gavrilov (angavrilov), thanks!

Should be double-checked and ported to 2.78.

2 years agoFix glUniform called from glBegin/glEnd blocks
Sergey Sharybin [Fri, 2 Sep 2016 14:17:20 +0000 (16:17 +0200)]
Fix glUniform called from glBegin/glEnd blocks

Was causing some invalid operations in OpenGL.

After more testing should be fine for 2.78.

2 years agoFix T49220: Vertex paint doesn't work with OpenSubdiv
Sergey Sharybin [Fri, 2 Sep 2016 13:15:42 +0000 (15:15 +0200)]
Fix T49220: Vertex paint doesn't work with OpenSubdiv

It's a bit tricky to align vertex color data between Blender and OpenSubdiv
so for now we simply disable OpenSubdiv in the paint modes.

Safe for 2.78.

2 years agoCMake: Skip addons_contrib for release candidate builds
Sergey Sharybin [Fri, 2 Sep 2016 12:42:01 +0000 (14:42 +0200)]
CMake: Skip addons_contrib for release candidate builds

Nowadays release candidates are supposed to be as close to the final
release as possible.

Safe for 2.78 release branch.

2 years agoAPI doc: add new pure-rsync py script to update API doc on Blender server.
Bastien Montagne [Mon, 5 Sep 2016 07:38:53 +0000 (09:38 +0200)]
API doc: add new pure-rsync py script to update API doc on Blender server.

The other one (sphinx_doc_gen.sh) needs an ssh account on the server to work - and I hate bash, too! :P

2 years agoWe are in bcon again, so master goes back to alpha in release cycle.
Bastien Montagne [Mon, 5 Sep 2016 07:23:49 +0000 (09:23 +0200)]
We are in bcon again, so master goes back to alpha in release cycle.

2 years agoCycles: Fix unreported - Missing node group for the Camera Node
Lukas Stockner [Mon, 5 Sep 2016 02:07:10 +0000 (04:07 +0200)]
Cycles: Fix unreported - Missing node group for the Camera Node

Thanks to linda2 for reporting in IRC.

2 years agoAlembic: fix parenting issues when an object has multiple curves/points
Kévin Dietrich [Mon, 5 Sep 2016 01:46:25 +0000 (03:46 +0200)]
Alembic: fix parenting issues when an object has multiple curves/points
subobjects.

2 years agoFix T49249: Alembic export with multiple hair systems crash blender
Kévin Dietrich [Mon, 5 Sep 2016 01:32:36 +0000 (03:32 +0200)]
Fix T49249: Alembic export with multiple hair systems crash blender

Crash was due to a name collision in Alembic objects caused by the fact
that names derive from the one of the Blender object. An object having
multiple particles system would thus give its name to various
subobjects.

Now use the name of the particles system for the Alembic object.

2 years agoCorrection to previous commit (PEP 8)
Julian Eisel [Sun, 4 Sep 2016 22:55:44 +0000 (00:55 +0200)]
Correction to previous commit (PEP 8)

2 years agoCombine all Proportional Editing options under one menu
Julian Eisel [Sun, 4 Sep 2016 21:40:41 +0000 (23:40 +0200)]
Combine all Proportional Editing options under one menu

Image of the result of this patch:

{F352849}

The only thing different from the above image and this patch is I added a colon after "Falloff" after I took the screen shot.

Reviewers: Severin, meta-androcto

Subscribers: plyczkowski

Tags: #bf_blender, #user_interface

Maniphest Tasks: T33436

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

2 years agoFix menu drawing printing 'unknown operator' warning when building without WITH_BULLET
Julian Eisel [Sun, 4 Sep 2016 22:10:13 +0000 (00:10 +0200)]
Fix menu drawing printing 'unknown operator' warning when building without WITH_BULLET

2 years agoFix a few OpenCL compiler warnings.
Brecht Van Lommel [Sat, 3 Sep 2016 21:06:12 +0000 (23:06 +0200)]
Fix a few OpenCL compiler warnings.

2 years agofix: not initialised variable can crash blender (related to modifiers with cage editi...
Gaia Clary [Sat, 3 Sep 2016 16:00:40 +0000 (18:00 +0200)]
fix: not initialised variable can crash blender (related to modifiers with cage editing enabled)

2 years agoFix T48911: Fix T48847: Issues with some shortcuts on non-US latin keyboards, and...
Bastien Montagne [Sat, 3 Sep 2016 15:50:56 +0000 (17:50 +0200)]
Fix T48911: Fix T48847: Issues with some shortcuts on non-US latin keyboards, and with non-first layouts.

This is a tentative fix, own tests here seem to be working OK,
but don't think it's safe enough to be backported to 2.78.

2 years agoFix T49228: Separate by material, materials dissappear after reload.
Bastien Montagne [Sat, 3 Sep 2016 10:51:50 +0000 (12:51 +0200)]
Fix T49228: Separate by material, materials dissappear after reload.

Yet another mismatch where code would decrease usercount (of Material here) but never increase it again
when re-assigning the datablock...

2 years agoFix T49229: ID user decrement error when deleting group instance twice.
Bastien Montagne [Sat, 3 Sep 2016 09:47:17 +0000 (11:47 +0200)]
Fix T49229: ID user decrement error when deleting group instance twice.

Another great example of inconsistency in usercount handling - dupli_group was considered
as refcounted by readfile.c code (and hence by library_query.c one, which is based on it),
but not by editor/BKE_object code, which never increased group's usercount when creating
an instance of it etc.

To be backported to 2.78.

2 years agoPoint submodules to latest master branches
Sergey Sharybin [Fri, 2 Sep 2016 09:43:36 +0000 (11:43 +0200)]
Point submodules to latest master branches

We did not update them for really long time and the currently used
hashes are quite old and probably wouldn't work without manually
updating all submodules.

Not as if it's something totally crucial (we ask to update submodules
all the times and that's what `make update` does) but updating hashes
will save some cloning/checkout time.

2 years agoBlender 2.78 commit!
Sergey Sharybin [Fri, 2 Sep 2016 09:37:25 +0000 (11:37 +0200)]
Blender 2.78 commit!

Includes:

- Version bump to 2.78
- Doxy file update
- New splash screen
- Wrapped some do_versions with version check
- Updated template to use proper font

After poking around a lot it seems Droid Sans was used during 2.7x series.
(or at least difference between using this font and comparing to previous
splash screens gives none visible difference).

2 years agoFix T49180: Cycles MIS Map for Animated Environment Texture Movie Doesn't Update...
Sergey Sharybin [Fri, 2 Sep 2016 07:58:41 +0000 (09:58 +0200)]
Fix T49180: Cycles MIS Map for Animated Environment Texture Movie Doesn't Update on Frame Change

Not really ideal fix at all, but we are at RC today, so better to play really safe.

2 years agoCycles: Silence strict compiler warning in release build
Sergey Sharybin [Fri, 2 Sep 2016 07:14:34 +0000 (09:14 +0200)]
Cycles: Silence strict compiler warning in release build

2 years agoFix T49222: Image Save settings are overridden by the File Save Screen ones.
Bastien Montagne [Fri, 2 Sep 2016 06:37:57 +0000 (08:37 +0200)]
Fix T49222: Image Save settings are overridden by the File Save Screen ones.

There were two inconsistencies in how 'save image' op initiated its settings:
* It would always use ImBuf->planes value.
* It would always use Image views settings.

Both of those settings should come from scene->r.im_format (as everything else)
when saving render/compo result...

2 years agoCycles microdisplacement: Improved automatic bump mapping
Mai Lavelle [Sun, 14 Aug 2016 15:44:25 +0000 (11:44 -0400)]
Cycles microdisplacement: Improved automatic bump mapping

Object coordinates can now be used in the displacement shader and will give
correct results, where as before bump mapping was calculated from the displace
positions and resulted in incorrect shading.

This works by evaluating the shader in two parts, first bump then surface, and
setting the shader state to match what it would be if the surface was
undisplaced for the bump shader evaluation. Currently only `P` is set as if
undisplaced, but other shader variables could be set as well, such as `I` or
`time`. Since these aren't set to anything meaningful for displacement I left
them out of this patch, we can decide what to do with them separately.

Reviewed By: brecht

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

2 years agoCycles: Store undisplaced coordinates for meshes when needed
Mai Lavelle [Sat, 13 Aug 2016 16:27:17 +0000 (12:27 -0400)]
Cycles: Store undisplaced coordinates for meshes when needed

Reviewed By: brecht

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

2 years agoCycles: remove duplicate shader storage
Mai Lavelle [Tue, 16 Aug 2016 23:42:08 +0000 (19:42 -0400)]
Cycles: remove duplicate shader storage

Storing multiple copies of a shader was needed when the displacement method was
a mesh option and could be different for each mesh. Now that its a shader option
this is unnecessary.

Reviewed By: brecht

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

2 years agoFix T49215
lazydodo [Thu, 1 Sep 2016 20:00:20 +0000 (14:00 -0600)]
Fix T49215

2 years agoFix T49224: Crash due to dangling value in 'Object.proxy_from' pointer.
Bastien Montagne [Thu, 1 Sep 2016 19:16:54 +0000 (21:16 +0200)]
Fix T49224: Crash due to dangling value in 'Object.proxy_from' pointer.

Why/how this may happen remains a mystery, so for now simply clearing this runtime-only
pointer on Object reading...

2 years agoCurve Fitting: correct initial handle sign
Campbell Barton [Thu, 1 Sep 2016 16:52:46 +0000 (02:52 +1000)]
Curve Fitting: correct initial handle sign

In practice the initial values are almost never used.

2 years agoMath Lib: avoid char > int conversion w/ line plot
Campbell Barton [Tue, 9 Aug 2016 06:57:26 +0000 (16:57 +1000)]
Math Lib: avoid char > int conversion w/ line plot

2 years agoFix crash calling wm.open_mainfile from menu with --debug-memory enabled
Julian Eisel [Thu, 1 Sep 2016 14:55:01 +0000 (16:55 +0200)]
Fix crash calling wm.open_mainfile from menu with --debug-memory enabled

Didn't do any bisecting, but guess it's caused rBb54e95a5c8dcb7 (2.74 is fine, 2.75 isn't).
I think this fix makes some other hacks redundant but need to check details (will do when we're back to bcon1 to avoid regressions).

2 years agoFix T49199: Combination of dialog + wm.open_mainfile causes crash
Julian Eisel [Thu, 1 Sep 2016 14:25:42 +0000 (16:25 +0200)]
Fix T49199: Combination of dialog + wm.open_mainfile causes crash

Issue was that the wm.open_mainfile OP caused all handlers to be removed and since rB45592291 cancelled (which is correct in general), the menu that triggered the OP should not be cancelled though.
Not sure if this is a nice fix or not, it's however the safest fix I found. A different fix would be to call UI_popup_block_close before WM_operator_call_ex (in dialog_exec_cb), but not sure how safe this is and want to further investigate if it makes other hacks/fixes redundant.

There's still a crash with --debug-memory that confused the heck out of me (since I always have --debug-memory enabled), but I'll commit fix for that separately.

2 years agoD2184 Stamp: Make drawing stamp labels optional.
Sybren A. Stüvel [Wed, 31 Aug 2016 16:51:32 +0000 (18:51 +0200)]
D2184 Stamp: Make drawing stamp labels optional.

When using metadata stamping, it's often handy to have "Camera" in
front of the camera name, "Marker" in front of the marker text, etc.,
but sometimes those get in the way. This patch allows an artist to
turn those labels on/off.

Reviewed by: sergey, mont29, venomgfx

2 years agopydoc: added missing 'compress' parameter to b.t.BlendDataLibraries.write
Sybren A. Stüvel [Thu, 1 Sep 2016 13:29:58 +0000 (15:29 +0200)]
pydoc: added missing 'compress' parameter to b.t.BlendDataLibraries.write

2 years agoOpenSubdiv: Fix missing object ORCO when Subsurf uses OpenSubdiv but disabled fore...
Sergey Sharybin [Thu, 1 Sep 2016 13:27:08 +0000 (15:27 +0200)]
OpenSubdiv: Fix missing object ORCO when Subsurf uses OpenSubdiv but disabled fore viewport

2 years agoCleanup: Reduce amount of misleading indentation
Sergey Sharybin [Thu, 1 Sep 2016 10:14:16 +0000 (12:14 +0200)]
Cleanup: Reduce amount of misleading indentation

Was polluting compile output too much.

2 years agoFix T49175: GLSL material crash with environment maps.
Brecht Van Lommel [Wed, 31 Aug 2016 00:17:11 +0000 (02:17 +0200)]
Fix T49175: GLSL material crash with environment maps.

2 years agoFix T49210: Issue with User Count on Images in some shader nodetrees when rendering...
Bastien Montagne [Wed, 31 Aug 2016 14:42:14 +0000 (16:42 +0200)]
Fix T49210: Issue with User Count on Images in some shader nodetrees when rendering previews

Our usercount handling was really... infuriating :|

Here, localization (i.e. 'shalow' copy that should not touch to usercounts) was incrementing
usercounts of the sole Textures IDs of lamps and worlds (on the weak and fallacious pretext
that related BKE_free... functions would decrement those counts)... Seriously...

So now, localize funcs do not increment any usercount anymore (since matching BKE_free... ones do
not decrement any either), and we do not call anymore that stupid unlink when freeing temp
localized copies of lamps/materials at end of preview generation.

Note that we probably still have a lot to do to cleanup that copy/localize code, pretty sure
we can dedpulicate a lot more.

2 years ago[Windows] Add support for code signing the final binaries.
lazydodo [Wed, 31 Aug 2016 12:26:05 +0000 (06:26 -0600)]
[Windows] Add support for code signing the final binaries.

The option is controlled with the WITH_WINDOWS_CODESIGN option and needs:

- Signtool must be found on the system, the standard windows sdk folders will be searched for it.
- The path to the pfx file (WINDOWS_CODESIGN_PFX)
- The password for the pfx , this can either be set by the WINDOWS_CODESIGN_PFX_PASSWORD variable but given that ends up in CMakeCache.txt (which might be undesirable) there is a backup option of setting the PFXPASSWORD environment variable on the system.

Reviewers: sergey, juicyfruit

Reviewed By: juicyfruit

Tags: #bf_blender, #platform:_windows

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

2 years agoCycles: don't crash if OSLRenderServices::osl_ts is unset
Mai Lavelle [Wed, 17 Aug 2016 12:42:10 +0000 (08:42 -0400)]
Cycles: don't crash if OSLRenderServices::osl_ts is unset

2 years agoCorrect render pass identifier usage in toolitps
Aaron Carlisle [Tue, 30 Aug 2016 20:05:27 +0000 (22:05 +0200)]
Correct render pass identifier usage in toolitps

2 years agoFix stupid mistake in previous commit 'cleanup' part.
Bastien Montagne [Tue, 30 Aug 2016 19:08:11 +0000 (21:08 +0200)]
Fix stupid mistake in previous commit 'cleanup' part.

Thanks to sergey for spotting it.

2 years agoFix bad usercount handling of materials in BKE_mesh_new_from_object().
Bastien Montagne [Tue, 30 Aug 2016 18:36:22 +0000 (20:36 +0200)]
Fix bad usercount handling of materials in BKE_mesh_new_from_object().

Curves and meshes (when no modifier application required) would increase their material usercount twice.

Not sure how/why it worked in previous code, but with new, stricter ID handling we need more
careful check of ID 'ownership' handling.

Reported by Sergey over IRC, thanks.

2 years agoCycles: Fix calculation of normals for subdivision meshes
Mai Lavelle [Tue, 30 Aug 2016 16:22:50 +0000 (12:22 -0400)]
Cycles: Fix calculation of normals for subdivision meshes

Not sure what happened here. Will have only effected Cycles standalone with
linear subdivision in use.

2 years agoFix type mismatch causing the buffer overflow in D810
Alexander Romanov [Tue, 30 Aug 2016 14:15:26 +0000 (17:15 +0300)]
Fix type mismatch causing the buffer overflow in D810

2 years agoFix T49201: Mesh with OpenSubdiv subsurf and a texture disappears in Material viewpor...
Sergey Sharybin [Tue, 30 Aug 2016 10:12:12 +0000 (12:12 +0200)]
Fix T49201: Mesh with OpenSubdiv subsurf and a texture disappears in Material viewport mode

2 years agoFix T49187: inconsistent Normal Map node output for backfacing polygons.
Alexander Gavrilov [Tue, 30 Aug 2016 09:48:59 +0000 (12:48 +0300)]
Fix T49187: inconsistent Normal Map node output for backfacing polygons.

There basically are two issues here: in smooth mode (and all non-tangent
normal map types) it doesn't invert the normal for backfacing polys;
on the other hand for flat shaded tangent type it is inverted too soon.

This fix does a brute force correction by checking the backfacing flag.

Reviewers: #cycles, brecht

Reviewed By: #cycles, brecht

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

2 years agoFix node editor to display node group names in the bottom left corner.
Alexander Gavrilov [Tue, 30 Aug 2016 09:32:31 +0000 (12:32 +0300)]
Fix node editor to display node group names in the bottom left corner.

Currently it pointlessly repeats the material name there, separated by
slashes. That obviously should display the nested group path instead.

2 years agoUsual i18n/UI messages fixes...
Bastien Montagne [Mon, 29 Aug 2016 19:08:33 +0000 (21:08 +0200)]
Usual i18n/UI messages fixes...

2 years agoFix T49158: Take II, some more untranslated UI messages...
Bastien Montagne [Mon, 29 Aug 2016 18:08:42 +0000 (20:08 +0200)]
Fix T49158: Take II, some more untranslated UI messages...

2 years agoCleanup: Indentation
Sergey Sharybin [Tue, 30 Aug 2016 08:29:53 +0000 (10:29 +0200)]
Cleanup: Indentation

2 years agoGPencil: Fix segment fault when undo
Antonioya [Mon, 29 Aug 2016 20:17:57 +0000 (22:17 +0200)]
GPencil: Fix segment fault when undo

When undo in UV/Image editor and press ESC key, there was segment fault
in Toolsettings because the reference was missing. Now the toolsetting
is loaded from context and not from local operator data.

2 years agoGPencil: Replace strcpy by BLI_strncpy
Antonioya [Mon, 29 Aug 2016 19:55:02 +0000 (21:55 +0200)]
GPencil: Replace strcpy by BLI_strncpy

2 years agoFix T49196
lazydodo [Mon, 29 Aug 2016 19:33:01 +0000 (13:33 -0600)]
Fix T49196

2 years agoCleanup/refactor spacefile's 'check dir' code.
Bastien Montagne [Mon, 29 Aug 2016 14:42:49 +0000 (16:42 +0200)]
Cleanup/refactor spacefile's 'check dir' code.

Was kinda split in two different places (one allowed to modify given path to always get a valid one,
the other only checking for validity of given path), not nice - and broken in asset branch case.

So rather extended a bit FileList->checkdirf to handle both cases (modifying and non-modifying path).

2 years agoFix for Bevel segments bug T49183; but doesn't fix whole report yet.
Howard Trickey [Mon, 29 Aug 2016 12:51:04 +0000 (08:51 -0400)]
Fix for Bevel segments bug T49183; but doesn't fix whole report yet.

2 years agoFix T49181: Movie clip animation lost when invoking action which reloads the clip
Sergey Sharybin [Mon, 29 Aug 2016 11:09:03 +0000 (13:09 +0200)]
Fix T49181: Movie clip animation lost when invoking action which reloads the clip

Was a bug since the very beginning of movie clip animation support
which was done on Feb 2012.

2 years agoMovie clip: Add missing animation data RNA declaration
Sergey Sharybin [Mon, 29 Aug 2016 11:03:50 +0000 (13:03 +0200)]
Movie clip: Add missing animation data RNA declaration

Was missing since the beginning of the days.

2 years agoFix T49172: mixdown sound op not exporting full length
Jörg Müller [Mon, 29 Aug 2016 08:54:32 +0000 (10:54 +0200)]
Fix T49172: mixdown sound op not exporting full length

Thanks Flavio Perez for the fix.

2 years agoFix compilation error caused by wrong array initialization
Sergey Sharybin [Mon, 29 Aug 2016 07:40:15 +0000 (09:40 +0200)]
Fix compilation error caused by wrong array initialization

We usually don't silence migh-be-uninitialized warning (which is the only
thing which could explain setting matrix to all zeroes) so we can catch
such errors when using tools like Valgrind.

I don't get warning here and the initializer was wrong, so removing it.

If it-s _REALLY_ needed please do a proper initialization.

2 years agoGPencil UI: Move the "quick toggles" for colors into their own row below the list
Joshua Leung [Mon, 29 Aug 2016 05:10:53 +0000 (17:10 +1200)]
GPencil UI: Move the "quick toggles" for colors into their own row below the list

Previously, they were in a column alongside the list, but because the lists were
rarely that long, there would always be a large gap left below the list.

2 years agoFix: Some settings (e.g. "volumetric strokes") from old files were not getting correc...
Joshua Leung [Mon, 29 Aug 2016 05:00:18 +0000 (17:00 +1200)]
Fix: Some settings (e.g. "volumetric strokes") from old files were not getting correctly ported to GPv2

2 years agoCode Cleanup: Fixes for some issues noticed during previous fix
Joshua Leung [Mon, 29 Aug 2016 04:39:27 +0000 (16:39 +1200)]
Code Cleanup: Fixes for some issues noticed during previous fix

2 years agoFix: GPencil Paste couldn't be used to paste strokes from one datablock to another
Joshua Leung [Mon, 29 Aug 2016 04:27:23 +0000 (16:27 +1200)]
Fix: GPencil Paste couldn't be used to paste strokes from one datablock to another

This was because the poll callback was checking for the presence of an active layer.
If you just create an empty datablock and try to paste, nothing would happen.

However, this check was kindof redundant anyway, as the operator would add a layer for
you if it didn't find one.

2 years agoSmall optimisation: Only calculate the inverse_diff_mat once per stroke instead of...
Joshua Leung [Mon, 29 Aug 2016 01:50:53 +0000 (13:50 +1200)]
Small optimisation: Only calculate the inverse_diff_mat once per stroke instead of for every point

(Later this calculation should be moved into the iteration macro instead, since
it only needs to be applied once per layer along with the diff_mat calculation)

2 years agoGPencil: "Reproject Strokes" operator
Joshua Leung [Sun, 28 Aug 2016 15:03:09 +0000 (03:03 +1200)]
GPencil: "Reproject Strokes" operator

A common problem encountered by artists was that they would accidentally move
the 3D cursor while drawing, causing their strokes to end up in weird places in
3D space when viewing the drawing again from other perspectives.

This operator helps fix up this mess by taking the selected strokes, projecting them
to screenspace, and then back to 3D space again. As a result, it should be as if
you had directly drawn the whole thing again, but from the current viewpoint instead.
Unfortunately, if there was originally some depth information present (i.e. you already
started reshaping the sketch in 3D), then that will get lost during this process.
But so far, my tests indicate that this seems to work well enough.

2 years agoGPencil: Include basic brush settings in "Grease Pencil Settings" panel for 2D Editors
Joshua Leung [Sun, 28 Aug 2016 14:04:06 +0000 (02:04 +1200)]
GPencil: Include basic brush settings in "Grease Pencil Settings" panel for 2D Editors

After the GP v2 changes, it wasn't possible to easily set the thickness of strokes
if you didn't know about the pie menus already. This just exposes the same set of
settings.

2 years agoCode Cleanup: Just some fixes for whitespace/typos that I noticed while working on...
Joshua Leung [Sun, 28 Aug 2016 13:37:14 +0000 (01:37 +1200)]
Code Cleanup: Just some fixes for whitespace/typos that I noticed while working on other stuff

2 years agoGPencil UI: Make "Tint" settings take full width of panel in 2D editors
Joshua Leung [Sun, 28 Aug 2016 13:36:13 +0000 (01:36 +1200)]
GPencil UI: Make "Tint" settings take full width of panel in 2D editors

Parenting options are not visible there (i.e. they're only for the 3D view),
so reserving space that isn't going to be used in those editors doesn't really
make much sense. Furthermore, those property regions are often quite narrow
too, so it doesn't help too much to keep these settings so narrow there.

2 years agoFix T49163: let Cycles only hide particles with missing motion data, not regular...
Brecht Van Lommel [Sun, 28 Aug 2016 19:20:06 +0000 (21:20 +0200)]
Fix T49163: let Cycles only hide particles with missing motion data, not regular objects.