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

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

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

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

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

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

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

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

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

3 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

3 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

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

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

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

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

3 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

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

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

3 years agoFix T47639: OpenGL render with smoke and fire incorrect when using
Kévin Dietrich [Sun, 28 Aug 2016 14:50:49 +0000 (16:50 +0200)]
Fix T47639: OpenGL render with smoke and fire incorrect when using
transparency.

The issue is that we are rendering to a 0..1 clamped sRGB buffer with
unpremultiplied alpha, where the correct thing to do would be to render
to an unclamped linear premultiplied alpha buffer. Then we would just
make fire purely emissive without affecting the alpha channel at all,
but that doesn't work here.

So for now, draw fire and smoke separately using different shaders and
blend modes, like it used to before the smoke programs were rewritten
(see rB0372b642).

3 years agoFix T49167: Normals in wrong coordinate space when adaptive subdivision is used
Mai Lavelle [Sat, 27 Aug 2016 21:57:36 +0000 (17:57 -0400)]
Fix T49167: Normals in wrong coordinate space when adaptive subdivision is used

Meshes with Cycles subdivision were being transformed to world space leading to
normals to sometimes be calculated in that space, while they should be in
object space. Also caused dicing to happen at the wrong rate for scaled meshes.

3 years agoFix missing viewport update changing BI lamp shadow method
Julian Eisel [Sat, 27 Aug 2016 21:22:48 +0000 (23:22 +0200)]
Fix missing viewport update changing BI lamp shadow method

3 years agoGPencil: Added entry for the "Select Strokes Using Active COlor" operator to the...
Joshua Leung [Sat, 27 Aug 2016 12:09:16 +0000 (00:09 +1200)]
GPencil: Added entry for the "Select Strokes Using Active COlor" operator to the Colors panel dropdown

It was already present in a few of the Pie Menus, but it was hard to find it,
so I've included it here too for good measure.

3 years agoCode Cleanup (Non-functional tweaks)
Joshua Leung [Fri, 26 Aug 2016 07:54:16 +0000 (19:54 +1200)]
Code Cleanup (Non-functional tweaks)

General reshuffling of defines and spacing/brace usage for consistency.
In particular:
* When defining types, don't mix pointers and non-pointer types on same line
  to avoid confusion
* As much as possible, have all defines at the top of each block instead of
  scattered haphazardly throughout the code

3 years agoGPencil: Cleanup change color operator
Antonioya [Sat, 27 Aug 2016 10:52:30 +0000 (12:52 +0200)]
GPencil: Cleanup change color operator

It is faster to assign the color to the pointer instead to force the new
lookup in drawing function.

3 years agoFix T49151: ParticleSettings' usercount not decremented when removing a psys from...
Bastien Montagne [Fri, 26 Aug 2016 18:29:40 +0000 (20:29 +0200)]
Fix T49151: ParticleSettings' usercount not decremented when removing a psys from an object.

3 years agoCycles: Make UI for subdivision more clear
Mai Lavelle [Wed, 24 Aug 2016 15:26:19 +0000 (11:26 -0400)]
Cycles: Make UI for subdivision more clear

Users have been getting a bit confused by the way things are worded/arranged in
the UI. This patch makes a few changes to the UI to make it more clear how to
use subdivision:

- make Subdivide UVs option inactive when adaptive subdivision is enabled as UV
  subdivision is currently unsupported
- add "px" to dicing rates in the Geometry Panel
- display the final dicing rate in the modifier
- reworded "Dicing Rate" in the modifier to "Dicing Scale" to make more clear
  that this is a multiplier for the scene dicing rate and added a note the the
  tooltip pointing the user to that setting in the Geometry Panel

Reviewed By: brecht

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

3 years agoUsual i18n/UI messages fixes...
Bastien Montagne [Fri, 26 Aug 2016 14:14:56 +0000 (16:14 +0200)]
Usual i18n/UI messages fixes...

3 years agoFix T49158: Untranslatable elements in UI.
Bastien Montagne [Fri, 26 Aug 2016 13:44:37 +0000 (15:44 +0200)]
Fix T49158: Untranslatable elements in UI.

We cannot skip 'collections clesse' when generating i18n messages from RNA, some of them
are visible and UI...

3 years agoFix linking issue with OpenEXR and Zlib.
Kévin Dietrich [Fri, 26 Aug 2016 12:28:39 +0000 (14:28 +0200)]
Fix linking issue with OpenEXR and Zlib.

Link Zlib after OpenEXR.

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

3 years agoFix over creation of cache files handles (leading to memory leaks).
Kévin Dietrich [Fri, 26 Aug 2016 12:25:03 +0000 (14:25 +0200)]
Fix over creation of cache files handles (leading to memory leaks).

Multiple threads could create multiple handles for the same cache file,
so protect handle creation with a mutex, to make sure only one is
created.

3 years agoFix cache constraint not reference counting cache files.
Kévin Dietrich [Fri, 26 Aug 2016 12:21:59 +0000 (14:21 +0200)]
Fix cache constraint not reference counting cache files.

3 years agoFix T49168: crash when evaluating a cache constraint with a NULL cache
Kévin Dietrich [Fri, 26 Aug 2016 12:21:06 +0000 (14:21 +0200)]
Fix T49168: crash when evaluating a cache constraint with a NULL cache
file.

3 years agoDepsgraph: Report number of objects to which update as flished
Sergey Sharybin [Fri, 26 Aug 2016 12:04:03 +0000 (14:04 +0200)]
Depsgraph: Report number of objects to which update as flished

This is an easiest way in the new depsgraph to get an idea how much objects
were handled on update.

3 years agoCleanup: Remove unused variable
Sergey Sharybin [Fri, 26 Aug 2016 12:01:03 +0000 (14:01 +0200)]
Cleanup: Remove unused variable

3 years agoDepsgraph: Report overall number of updates objects
Sergey Sharybin [Fri, 26 Aug 2016 12:00:15 +0000 (14:00 +0200)]
Depsgraph: Report overall number of updates objects

3 years agoCleanup: Use more meaningful names and move calculation into am if statement
Sergey Sharybin [Fri, 26 Aug 2016 11:57:46 +0000 (13:57 +0200)]
Cleanup: Use more meaningful names and move calculation into am if statement

3 years agoFix T49139: Memory leak in UV image editor related to Undo (and possibly Waveform...
Bastien Montagne [Fri, 26 Aug 2016 10:54:49 +0000 (12:54 +0200)]
Fix T49139: Memory leak in UV image editor related to Undo (and possibly Waveform and Vectorscope).

Assigning NULL to scopes' data pointer in 'non-UI readfile' context was terribly wrong for sure,
if we'd really want to reset them here we should freed them first.

But we can rather just ignore them here, those are purely runtime data managed by image editor,
no need to touch them here.

3 years agoFix: Use submenu for GPencil -> Select Grouped
Joshua Leung [Fri, 26 Aug 2016 04:38:31 +0000 (16:38 +1200)]
Fix: Use submenu for GPencil -> Select Grouped

3 years agoCode Cleanup
Joshua Leung [Fri, 26 Aug 2016 04:25:39 +0000 (16:25 +1200)]
Code Cleanup

* Stroke editing functions should be in gpencil_edit.c not gpencil_data.c
  (the latter is only for handling "CRUD" operations on things like
   layers, brushes, and palettes)
* Deduplicate the GP_STROKE_BUFFER_MAX define

3 years agoFix: Color of frame/selected object indicator in 3D View didn't indicate GPencil...
Joshua Leung [Fri, 26 Aug 2016 04:07:25 +0000 (16:07 +1200)]
Fix: Color of frame/selected object indicator in 3D View didn't indicate GPencil keyframes
when there was no active object

3 years agoGPencil: Select Grouped -> By Color
Joshua Leung [Fri, 26 Aug 2016 04:04:15 +0000 (16:04 +1200)]
GPencil: Select Grouped -> By Color

Added a way to select all the currently visible strokes that use the same
color as the selected stroke. This can be accessed via the Select Grouped (Shift-G)
operator as an alternative to selecting by layer.

3 years agoGPencil RNA: Set pressure and strength to 1.0 by default for new stroke points added...
Joshua Leung [Fri, 26 Aug 2016 03:59:38 +0000 (15:59 +1200)]
GPencil RNA: Set pressure and strength to 1.0 by default for new stroke points added via stroke.points.add()

This commit adds optional "pressure" and "strength" arguments to the
stroke.points.add() method. These are given default values of 1.0,
so that old scripts can be ported over to the new API with less effort
while reducing confusion about why auto generated strokes won't appear.

3 years agoCycles: Remove some redundant checks
Mai Lavelle [Thu, 25 Aug 2016 14:45:48 +0000 (10:45 -0400)]
Cycles: Remove some redundant checks

3 years agoFixed little error in comment
Sybren A. Stüvel [Thu, 25 Aug 2016 14:22:26 +0000 (16:22 +0200)]
Fixed little error in comment

"amount" is for uncountable things, "number" is for countable things.

3 years agoDepsgraph: Prioritize evaluation of the new scheduled nodes
Sergey Sharybin [Thu, 25 Aug 2016 14:08:41 +0000 (16:08 +0200)]
Depsgraph: Prioritize evaluation of the new scheduled nodes

The idea here is again to finish objects evaluation as soon as possible.

Seems to be giving another 3% speedup in the barber scenes.

3 years agoDepsgraph: Merge some traversal back on
Sergey Sharybin [Thu, 25 Aug 2016 13:51:19 +0000 (15:51 +0200)]
Depsgraph: Merge some traversal back on

After previous commit there is no longer measurable difference
in speed and doing all stuff in one go is preferrable here anyway.

3 years agoDepsgrpah: Use deque for the flush queue
Sergey Sharybin [Thu, 25 Aug 2016 13:12:21 +0000 (15:12 +0200)]
Depsgrpah: Use deque for the flush queue

The idea of the change is to avoid queue growing too long
and handle all the operations as quick as possible.

Gives about 3% speedup on one of the barber shots here.

3 years agoFix T48788: Diffuse color in BI Textured Solid mode is not updating properly in Sculp...
Sergey Sharybin [Thu, 25 Aug 2016 11:48:23 +0000 (13:48 +0200)]
Fix T48788: Diffuse color in BI Textured Solid mode is not updating properly in Sculpting mode

Was caused by 6276726, so for the time being revert the optimization part of change.

3 years agoCycles: Cleanup, indentation
Sergey Sharybin [Thu, 25 Aug 2016 10:33:07 +0000 (12:33 +0200)]
Cycles: Cleanup, indentation

3 years agoCycles: Fix crash after recent subd fixes
Sergey Sharybin [Thu, 25 Aug 2016 09:31:36 +0000 (11:31 +0200)]
Cycles: Fix crash after recent subd fixes

Was happening when object only had curves (doe example, object with hair
particle system and emitter rendering disabled).

3 years agoCycles: Support proper visibility check in single volume intersection step for QBVH
Sergey Sharybin [Thu, 25 Aug 2016 09:13:35 +0000 (11:13 +0200)]
Cycles: Support proper visibility check in single volume intersection step for QBVH

3 years agoCycles: Implement proper visibility check in QBVH volume all intersection
Sergey Sharybin [Thu, 25 Aug 2016 09:09:06 +0000 (11:09 +0200)]
Cycles: Implement proper visibility check in QBVH volume all intersection

3 years agoFix T49078: Cycles tries to render volume from another render layer when camera is...
Sergey Sharybin [Thu, 25 Aug 2016 08:55:16 +0000 (10:55 +0200)]
Fix T49078: Cycles tries to render volume from another render layer when camera is in volume

3 years agoFix T49112: Alembic unicode path issues on Windows.
Kévin Dietrich [Thu, 25 Aug 2016 03:19:41 +0000 (05:19 +0200)]
Fix T49112: Alembic unicode path issues on Windows.

Now we pass streams to Alembic instead of passing the filename string.
That way we can open the stream ourselves with the proper unicode
encoding.

Note that this only applies to Ogawa archive, as HDF5 does not support
streams.

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

3 years agoWindows Packaging : Make package-name confirm to the windows[32/64] naming scheme...
lazydodo [Wed, 24 Aug 2016 15:37:42 +0000 (09:37 -0600)]
Windows Packaging : Make package-name confirm to the windows[32/64] naming scheme we use.

3 years agoCycles: Fix crash when empty mesh has subdivision
Mai Lavelle [Tue, 23 Aug 2016 18:49:10 +0000 (14:49 -0400)]
Cycles: Fix crash when empty mesh has subdivision

OpenSubdiv doesn't like empty meshes, so we need to be careful not to
subdivide when the mesh is empty.

3 years agoCycles Standalone: Fix support for subdivision meshes
Mai Lavelle [Tue, 23 Aug 2016 17:57:45 +0000 (13:57 -0400)]
Cycles Standalone: Fix support for subdivision meshes

Changes from microdisplacement work broke previous support for subdivision
meshes, sometimes leading to crashes; this makes things work again. Files
that contain "patch" nodes will need to be updated to use meshes instead, as
specifying patches was both inefficient and completely unsupported by the new
subdivision code.

3 years agoFix T49148: Blender Crash With B select on Skeleton Sketching
Sergey Sharybin [Wed, 24 Aug 2016 12:17:26 +0000 (14:17 +0200)]
Fix T49148: Blender Crash With B select on Skeleton Sketching

3 years agoCycles: Consolidate the various split CL kernel feature defines within the AMD platform
Edward O'Callaghan [Wed, 24 Aug 2016 10:30:05 +0000 (12:30 +0200)]
Cycles: Consolidate the various split CL kernel feature defines within the AMD platform

Reviewers: sergey

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

3 years agoFix T49128: Ghost of Previous Mask appears in Double Edge Mask
Sergey Sharybin [Wed, 24 Aug 2016 09:20:13 +0000 (11:20 +0200)]
Fix T49128: Ghost of Previous Mask appears in Double Edge Mask

Patch by Ted Schundler (tschundler), thanks!

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

3 years agoFix T49130: "Inner Edge" / "Buffer Edge" options in the Double Edge Mask are wired...
Sergey Sharybin [Wed, 24 Aug 2016 09:00:21 +0000 (11:00 +0200)]
Fix T49130: "Inner Edge" / "Buffer Edge" options in the Double Edge Mask are wired to the wrong settings

Patch by Ted Schundler (tschundler), thanks!

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

3 years agoFix T49121: VSE and border render incompatible
Sergey Sharybin [Wed, 24 Aug 2016 08:19:44 +0000 (10:19 +0200)]
Fix T49121: VSE and border render incompatible

For now just check for such incompatible configuration, real fix
requires quite some work to be done.

3 years agoCycles OpenCL: use AoS rather than SoA storage for ShaderData.
Brecht Van Lommel [Tue, 23 Aug 2016 23:44:48 +0000 (01:44 +0200)]
Cycles OpenCL: use AoS rather than SoA storage for ShaderData.

Fixes part of the performance regressions compared to 2.76b, see T49046, T48876.

3 years agoUsual i18n/UI messages fixes.
Bastien Montagne [Tue, 23 Aug 2016 20:03:18 +0000 (22:03 +0200)]
Usual i18n/UI messages fixes.

3 years agoFix T49150: make new 'operator categories' in search menu i18n-aware.
Bastien Montagne [Tue, 23 Aug 2016 19:48:16 +0000 (21:48 +0200)]
Fix T49150: make new 'operator categories' in search menu i18n-aware.

3 years agoD2078 Windows : add option to prevent find_package from picking up the wrong librarie...
lazydodo [Tue, 23 Aug 2016 14:47:23 +0000 (08:47 -0600)]
D2078 Windows : add option to prevent find_package from picking up the wrong libraries and use hardcoded paths instead.

3 years agoCycles: Fix/workaround for missing AA on Pascal (GTX10x0) cards
Sergey Sharybin [Tue, 23 Aug 2016 14:32:09 +0000 (16:32 +0200)]
Cycles: Fix/workaround for missing AA on Pascal (GTX10x0) cards

3 years agoCleanup: Output argument name and const qualifier
Sergey Sharybin [Tue, 23 Aug 2016 13:56:10 +0000 (15:56 +0200)]
Cleanup: Output argument name and const qualifier

3 years agoFix T49140: Noise and jitter present at some areas when using ambient oclusion in...
Sergey Sharybin [Tue, 23 Aug 2016 13:54:36 +0000 (15:54 +0200)]
Fix T49140: Noise and jitter present at some areas when using ambient oclusion in Blender internal renderer

3 years agoOpenCL: Support multiple ABI libraries on Linux
Sergey Sharybin [Tue, 23 Aug 2016 10:23:37 +0000 (12:23 +0200)]
OpenCL: Support multiple ABI libraries on Linux

Solves issue reported in T49144.

3 years agoattempt to fix compilation error on windows
Sergey Sharybin [Tue, 23 Aug 2016 10:01:55 +0000 (12:01 +0200)]
attempt to fix compilation error on windows

3 years ago2D stabilization: Fix broken auto-scale all the recent work
Sergey Sharybin [Tue, 23 Aug 2016 09:48:29 +0000 (11:48 +0200)]
2D stabilization: Fix broken auto-scale all the recent work

Auto-scale is expected to work just fine now.

Only thing changed now is the pivot point for the scale: it is now
the same as rotation pivot, so scaling happens around weighted median
of the translation tracks. This seems to be what is actually required
for the VFX workflow.

3 years agoChange Request: use weight centre of location tracks as pivot
Ichthyostega [Mon, 22 Aug 2016 05:02:22 +0000 (07:02 +0200)]
Change Request: use weight centre of location tracks as pivot

Previously, this extension used the translation compensated image centre
as reference point for rotation measurement and compensation. During
user tests, it turned out that this setup tends to give poor results
with very simple track configurations.

This can be improved by useiing the weighted average of the location
tracks for each frame as pivot point. But there is a technical problem:
the existing public API functions do not allow to pass the pivot point
for each frame alongside with the stabilisation data. Thus this
change implements a trick to package a compensation shift into
the translation offset, so the rotation can be performed around
a fixed point (center of frame). The compensation shift will then shift
the image as if it had been rotated around the desired pivot point.

3 years ago2D stabilization: by default init anchor_frame to frame 1
Ichthyostega [Mon, 22 Aug 2016 15:29:19 +0000 (17:29 +0200)]
2D stabilization: by default init anchor_frame to frame 1

It is common in blender to use 1-based counting for
frame sequences (while 0-based is allowed). Thus
initializing to use frame 1 as reference for stabilization
is likely to produce smooth start values in most cases

3 years ago2D stabilization: change presentation of target_scale in UI
Ichthyostega [Fri, 19 Aug 2016 12:33:49 +0000 (14:33 +0200)]
2D stabilization: change presentation of target_scale in UI

Alongside with this change, we fix disabling of Autoscale,
because this feature works even when rotation/scale is disabled.

3 years ago2D stabilization: flip orientation of the scale parameter
Ichthyostega [Mon, 22 Aug 2016 15:22:06 +0000 (17:22 +0200)]
2D stabilization: flip orientation of the scale parameter

values > 1 will zoom in and values < 1 zoom out

Rationale: the changed orientation is more natural
from a user POV and doing it this way is also more
consistent with the calculation of the other
target_* parameters.

Compatibility: This will break *.blend files saved
with the previous version of this patch from the
last days (test period). It will *not* break any
old/migrated files: Previously, the DNA field "scale"
was only used to cache autoscale. Only with the
Stabilisator rework, "scale" becomes a first class
persistent DNA field. There is migration code to
init this field to 1.0

3 years agoFix inconsistency: expected scale not be subject to scale influence
Ichthyostega [Fri, 19 Aug 2016 13:12:52 +0000 (15:12 +0200)]
Fix inconsistency: expected scale not be subject to scale influence

We should treat all three "target" ("expected") parameters in a similar way:
The "influence" control should only work on the measurement part of stabilisation,
i.e. it should only control the automatic part of stabilisation, while
the target parameters are deliberately set by the user and thus should
even be in effect when the automatic stabilsation is turned down.

It used to be so for location and rotation, but for the scale part,
I re-used the existing code for autoscale, which also had the scale influence
work on the autoscale factor. This was sensible in the old version,
since scale_influence was the only way to control the result. But now,
the user has always total control trough the "target_*" parameters
and thus we should prefer to treat all similar.

3 years agoBuild Packaging : Set proper package name on Windows.
lazydodo [Mon, 22 Aug 2016 14:15:03 +0000 (08:15 -0600)]
Build Packaging : Set proper package name on Windows.

3 years agoFix T49136: full constant Curves with zero Fac input crashes in assert.
Alexander Gavrilov [Mon, 22 Aug 2016 08:11:45 +0000 (11:11 +0300)]
Fix T49136: full constant Curves with zero Fac input crashes in assert.

The if branches were reordered when the original patch was
committed, which broke the implicit non-NULL guarantee on link.

To prevent re-occurrence, add a couple of unit tests.

3 years agoNDOF: fix crash on Mac with old drivers
Mike Erwin [Mon, 22 Aug 2016 03:09:19 +0000 (23:09 -0400)]
NDOF: fix crash on Mac with old drivers

For best results use the latest 3Dconnexion driver. But latest is only
supported on Mac OS 10.9+. We go all the way back to Mac OS 10.6 so
have to deal with older driver versions.

See the original dlclose line for my faulty assumption. Waiting to
unload the driver later fixes the crash. Newer drivers don’t seem to
have this issue.

Also removed WITH_INPUT_NDOF guards as NDOFManager.h takes care of
this. Follow-up to b10d005 a few days ago.

3 years agoSculpting: Avoid calculating and chaching viewport matrices
Julian Eisel [Sun, 21 Aug 2016 21:59:18 +0000 (23:59 +0200)]
Sculpting: Avoid calculating and chaching viewport matrices

Really couldn't find where this was used.

3 years agoUpdate .gitignore to some more generated/non-git-stored files.
Bastien Montagne [Sun, 21 Aug 2016 20:40:57 +0000 (22:40 +0200)]
Update .gitignore to some more generated/non-git-stored files.

3 years agoUpdate sphinx_doc_gen.py to work with recent changes (GPv2).
Bastien Montagne [Sun, 21 Aug 2016 20:38:06 +0000 (22:38 +0200)]
Update sphinx_doc_gen.py to work with recent changes (GPv2).

3 years agoIcons: Fix small alignment and shadow issue in prvicons. Add missing copyright notice.
Ines Almeida [Sun, 21 Aug 2016 17:10:02 +0000 (19:10 +0200)]
Icons: Fix small alignment and shadow issue in prvicons. Add missing copyright notice.

3 years agoCleanup: let's try to avoid too much indirect header imports, makes things harder...
Bastien Montagne [Sun, 21 Aug 2016 11:20:49 +0000 (13:20 +0200)]
Cleanup: let's try to avoid too much indirect header imports, makes things harder when some cope changes...

3 years agoFix T49060: crashes during render with no apparent reason...
Bastien Montagne [Sat, 20 Aug 2016 14:03:33 +0000 (16:03 +0200)]
Fix T49060: crashes during render with no apparent reason...

Was a concurrent access of pointcache from both particle system and UI (time space).

Pointcache not being threadsafe is really an issue to be addressed for its next version,
for now simply locking spacetime (like we already do with 3DView), not ideal fix
but it's working and safe for release.

3 years agoFix T49119: Batch-Generate Previews operator fails.
Bastien Montagne [Sat, 20 Aug 2016 12:48:33 +0000 (14:48 +0200)]
Fix T49119: Batch-Generate Previews operator fails.

previews render utils needed to be updated slightly against new behavior of maindata.remove.

3 years agoFix OpenSubdiv driver crash due to recently added uninitialized field.
Alexander Gavrilov [Sat, 20 Aug 2016 10:48:29 +0000 (13:48 +0300)]
Fix OpenSubdiv driver crash due to recently added uninitialized field.

For some reason my NVidia linux driver crashes in
glDeleteTextures when the ID is total garbage.

3 years agoFix crash in OpenVDB highres smoke cache when seeking to frame 0.
Alexander Gavrilov [Sat, 20 Aug 2016 09:03:40 +0000 (12:03 +0300)]
Fix crash in OpenVDB highres smoke cache when seeking to frame 0.

This code obviously should also use the cache_fields flag variable,
like the code for reading the lowres data in the same function.
This is because fluid_fields actually represents the old state before
smoke was reallocated to match cache_fields read from the file, and if
it has some fields enabled that aren't allocated any more, it crashes.

This also fixes a reverse glitch: when a file was loaded with
the current frame in the middle of a baked smoke+fire simulation,
smoke appeared immediately, but the fire didn't until the frame
was changed. The reason is the same: after file load no fields
are initially allocated and thus fluid_fields is 0.

3 years agoAlembic export UI: avoid displaying empty box.
Kévin Dietrich [Sat, 20 Aug 2016 07:30:38 +0000 (09:30 +0200)]
Alembic export UI: avoid displaying empty box.

3 years agoFix T49090: color picking draws wrong when using subsurf in material draw mode.
Brecht Van Lommel [Fri, 19 Aug 2016 21:04:43 +0000 (23:04 +0200)]
Fix T49090: color picking draws wrong when using subsurf in material draw mode.

ccgDM_drawMappedFacesMat was missig a smooth shade model restore, some other
functions were redundantly setting it since we can assume it to be the default
state already.

3 years agoFix T49105: Array modifier displayed in Edit mode crashes on selection, with End...
Bastien Montagne [Fri, 19 Aug 2016 15:00:34 +0000 (17:00 +0200)]
Fix T49105: Array modifier displayed in Edit mode crashes on selection, with End Cap enabled.

Origindex can be invalid, code was not fully protected against it...

3 years agoFix broken keymap loading with disabled ndof - revert part of recent rBb10d0058d72da30
Bastien Montagne [Fri, 19 Aug 2016 13:51:44 +0000 (15:51 +0200)]
Fix broken keymap loading with disabled ndof - revert part of recent rBb10d0058d72da30

ifdef’ing out defines in DNA/RNA is not a good idea, was breaking alternative keymaps loading
from splash screen e.g. (reported by Sergey over IRC, thanks).

3 years ago2D stabilization: Make interface more compact
Sergey Sharybin [Fri, 19 Aug 2016 10:21:13 +0000 (12:21 +0200)]
2D stabilization: Make interface more compact

Joins some things to the same row and uses aligned columns to get
minimum use of vertical space.

Probably still some tweaks required, but getting there :)

3 years agoAlembic: fix crash accessing invalid objects.
Kévin Dietrich [Fri, 19 Aug 2016 03:22:35 +0000 (05:22 +0200)]
Alembic: fix crash accessing invalid objects.

3 years agoFix T49111: Automatically add file path suffix for Alembic and Collada
Kévin Dietrich [Fri, 19 Aug 2016 02:42:12 +0000 (04:42 +0200)]
Fix T49111: Automatically add file path suffix for Alembic and Collada
export.

This aligns the behaviour of the file selection with the other
exporters. The Alembic case would fail if the filepath did not have an
extension set.

Also set a default file name for the Alembic export operator in case the
Blender file was not saved before exporting.

3 years agoCleanup: Remove redundant comment
Julian Eisel [Thu, 18 Aug 2016 23:20:35 +0000 (01:20 +0200)]
Cleanup: Remove redundant comment

3 years agoCycles: Fix wrong allocator used for spatial builder
Sergey Sharybin [Thu, 18 Aug 2016 18:47:14 +0000 (20:47 +0200)]
Cycles: Fix wrong allocator used for spatial builder

3 years agoCleanup: some bad sizeof() usages.
Bastien Montagne [Thu, 18 Aug 2016 14:18:58 +0000 (16:18 +0200)]
Cleanup: some bad sizeof() usages.

3 years agoCleanup/security fix: do not use strcpy (at least in new code).
Bastien Montagne [Thu, 18 Aug 2016 13:45:20 +0000 (15:45 +0200)]
Cleanup/security fix: do not use strcpy (at least in new code).

This function is only really secure in a very limited amount of cases,
and can especially bite you later if you change some buffer sizes...
So not worth bothering with it, just always use BLI_strncpy instead.