blender-staging.git
2 years agoCleanup: Rename callback flags from library_query to `IDWALK_CB_...`
Bastien Montagne [Tue, 31 Jan 2017 08:47:59 +0000 (09:47 +0100)]
Cleanup: Rename callback flags from library_query to `IDWALK_CB_...`

Better to have clear way to tell whether flag is parameter for
BKE_library_foreach_ID_link(), parameter for its callback function, or
return value from this callback function.

2 years agoFix compilation error: too few arguments to function call.
Kévin Dietrich [Tue, 31 Jan 2017 05:59:11 +0000 (06:59 +0100)]
Fix compilation error: too few arguments to function call.

D2492 by @tomjpsun.

2 years agoFix bug not reported: Ruler/Protractor: Snap to vertices and edges was not considerin...
Germano Cavalcante [Tue, 31 Jan 2017 02:49:09 +0000 (23:49 -0300)]
Fix bug not reported: Ruler/Protractor: Snap to vertices and edges was not considering the depth variation

Taking advantage of the area, the depth is decreased 0.01 BU to each loop to give priority to elements in order: Vertice > Edge > Face. This increases the threshold and improves the snap to multiple elements

2 years agoSnap System: Return depth by snapping to edges and vertices, because the Ruler only...
Germano Cavalcante [Tue, 31 Jan 2017 01:49:44 +0000 (22:49 -0300)]
Snap System: Return depth by snapping to edges and vertices, because the Ruler only works right this way

The Ruler snaps to the element with the lowest depth.

2 years agoUse the same solution to test the pixel distance to the AABB, with BoundBox
Germano Cavalcante [Tue, 31 Jan 2017 01:27:38 +0000 (22:27 -0300)]
Use the same solution to test the pixel distance to the AABB, with BoundBox

The previous solution took arbitrary values to determine if the mouse was near or not to the Bound Box (it simply scaled the Bound Box).

Now the same function that detected the distance from the BVHTree nodes to the mouse is used in the Bound Box

2 years agoFreestyle: Use of the Fill Range by Selection operator in the mesh edit mode.
Tamito Kajiyama [Tue, 31 Jan 2017 00:04:05 +0000 (09:04 +0900)]
Freestyle: Use of the Fill Range by Selection operator in the mesh edit mode.

This revision extends the functionality of the "Fill Range by Selection" button in
the "Distance from Camera/Object" modifiers so that only selected mesh vertices
in the edit mode are taken into account  (instead of considering all vertices when
in the object mode) to compute the min & max distances from the reference.
This will give users much finer control on the range values.

2 years agoMake 'make local' twice quicker.
Bastien Montagne [Mon, 30 Jan 2017 20:47:48 +0000 (21:47 +0100)]
Make 'make local' twice quicker.

Use new Main->relations ID usages mapping in BKE_library_make_local().

This allows a noticeable simplification in code, and can be up to twice
quicker as previous code (Make Local: All from 2 to 1 minute e.g. in a
huge production file with thousands of linked data-blocks).

Note that new code has been successfuly tested with several complex cases
(production files from Agent327), as well as some testcases from recent
bug reports related to that function. But as always, nothing beats real
usage by real users, so please check this before we release 2.79. ;)

Main areas that would be affected: Make Local operations (L shortcut in
3DView), and append from libraries.

2 years agoOptimization: pass Main to BKE_library_foreach_ID_link() and use its relations.
Bastien Montagne [Mon, 30 Jan 2017 20:41:44 +0000 (21:41 +0100)]
Optimization: pass Main to BKE_library_foreach_ID_link() and use its relations.

Use Main->relations in BKE_library_foreach_ID_link(), when possible
(i.e. IDWALK_READONLY is set), and if the data is available of course.

This is quite minor optimization, no sensible improvements are expected,
but does not hurt either to avoid potentially tens of looping over e.g.
objects constraints and modifiers, or heap of drivers...

2 years agoFix missing non-ID nodetrees in ID relationships built from library_query.c
Bastien Montagne [Mon, 30 Jan 2017 20:34:23 +0000 (21:34 +0100)]
Fix missing non-ID nodetrees in ID relationships built from library_query.c

This shall fix both existing code (bpy mapping, and local/lib usages
checks), and new Main->relations generation.

2 years agoAdd optional, free-after-use usages mapping of IDs to Main.
Bastien Montagne [Mon, 30 Jan 2017 20:00:07 +0000 (21:00 +0100)]
Add optional, free-after-use usages mapping of IDs to Main.

The new MainIDRelations stores two mappings, one from ID users to ID
used, the other vice-versa.

That data is assumed to be short-living runtime, code creating it is
responsible to clear it asap. It will be much useful in places where we
handle relations between IDs for a lot of them at once.

Note: This commit is not fully functional, that is, the infamous, ugly,
PoS non-ID nodetrees will not be handled correctly when building relations.
Fix needed here is a bit noisy, so will be done in next own commit.

2 years agoFix T49632: Grease pencil in "Edit Strokes" mode: Snap tool did not snap points to...
Germano Cavalcante [Mon, 30 Jan 2017 21:30:19 +0000 (18:30 -0300)]
Fix T49632: Grease pencil in "Edit Strokes" mode: Snap tool did not snap points to active object
A simple confusion between enums: ~SNAP_NOT_ACTIVE~

2 years agoAlembic/CacheFile: fix crash de-referencing NULL pointer.
Kévin Dietrich [Mon, 30 Jan 2017 09:46:24 +0000 (10:46 +0100)]
Alembic/CacheFile: fix crash de-referencing NULL pointer.

2 years agoCleanup: Unused function and and variables in snap code
Sergey Sharybin [Mon, 30 Jan 2017 08:25:21 +0000 (09:25 +0100)]
Cleanup: Unused function and and variables in snap code

Please doublecheck ED_transform_snap_object_project_ray_ex() is really
valid, it's weird to have extra arguments here unused.

2 years agoSnap System: BVH: ignore AABBs behind ray
Germano Cavalcante [Mon, 30 Jan 2017 05:49:41 +0000 (02:49 -0300)]
Snap System: BVH: ignore AABBs behind ray

This provides a slight improvement in performance in specific cases, such as when the observer is inside a high poly object and executes snap to edge or vertex

2 years agoFix unreported bug: parameter ray_start repeated
Germano Cavalcante [Mon, 30 Jan 2017 05:26:00 +0000 (02:26 -0300)]
Fix unreported bug: parameter ray_start repeated

The bug would only be seen in terms of performance

2 years agoSolve compilation error: Field has incomplete type 'enum eViewProj'
Germano Cavalcante [Mon, 30 Jan 2017 05:19:18 +0000 (02:19 -0300)]
Solve compilation error: Field has incomplete type 'enum eViewProj'

Error reported by @tomjpsun
Patch D2491

2 years agoFreestyle: Fix (unreported) wrong distance calculation in the Fill Range by Selection...
Tamito Kajiyama [Mon, 30 Jan 2017 03:18:39 +0000 (12:18 +0900)]
Freestyle: Fix (unreported) wrong distance calculation in the Fill Range by Selection operator.

Distance calculation performed by the "Fill Range by Selection" button of the
"Distance from Camera" color, alpha and thickness modifiers was incorrect,
limiting the usefulness of the functionality.

The problem was that the distance between the camera and individual vertex
locations was calculated in the world space, which was inconsistent with the
distance calculation done by the modifiers in the camera space.

2 years agoRemove `BKE_boundbox_ray_hit_check`
Germano Cavalcante [Sun, 29 Jan 2017 17:19:58 +0000 (14:19 -0300)]
Remove `BKE_boundbox_ray_hit_check`

Remove `BKE_boundbox_ray_hit_check` since it is no longer being used and can be easily replaced by `isect_ray_aabb_v3_simple`

2 years ago[msvc] Set proper OpenSubdiv flags when not using find_package to find opensubdiv...
lazydodo [Sun, 29 Jan 2017 17:00:11 +0000 (10:00 -0700)]
[msvc] Set proper OpenSubdiv flags when not using find_package to find opensubdiv. Fixes T50548

2 years agoNew math_geom function `isect_ray_aabb_v3_simple`
Germano Cavalcante [Sun, 29 Jan 2017 16:56:58 +0000 (13:56 -0300)]
New math_geom function `isect_ray_aabb_v3_simple`

The new `isect_ray_aabb_v3_simple` function replaces the `BKE_boundbox_ray_hit_check` and can be used in BVHTree Root (first AABB). So it is much more efficient.

2 years agoRename func `set_SnapData` to `snap_data_set`
Germano Cavalcante [Sun, 29 Jan 2017 16:13:14 +0000 (13:13 -0300)]
Rename func `set_SnapData` to `snap_data_set`

Don't use CamelCase in functions and try to keep area affected first, and action last, in names

2 years agofix T50486: Don't always do the `ray_start_correction` in the ortho view
Germano Cavalcante [Sun, 29 Jan 2017 15:26:15 +0000 (12:26 -0300)]
fix T50486: Don't always do the `ray_start_correction` in the ortho view

You need to make sure that ray_start is really far away, because even in the Orthografic view, in some cases, the ray can start inside the object

2 years agoRemove struct `PreDefProject` and store all immutable parameters within the new struc...
Germano Cavalcante [Sun, 29 Jan 2017 15:07:14 +0000 (12:07 -0300)]
Remove struct `PreDefProject` and store all immutable parameters within the new struct `SnapData`

In order to simplify the reading of these functions, the parameters: `snap_to`, `mval`, `ray_start`, `ray_dir`, `view_proj` and `depth_range` are now stored in the struct `SnapData`

2 years agoFix T50550: GPUShader: compile error - Background image not showing in
Kévin Dietrich [Sun, 29 Jan 2017 15:00:14 +0000 (16:00 +0100)]
Fix T50550: GPUShader: compile error - Background image not showing in
viewport.

Caused by rBd6cf28c5e15739f864fbf04614c2a50708b4b152, which forgot to
update the GLSL code for the "Light Path" node.

2 years agoFix blurry icons
raa [Sun, 29 Jan 2017 14:21:42 +0000 (17:21 +0300)]
Fix blurry icons

2 years agofix D2489: Collada exporter broke edit data when exporting Armature while in Armature...
Gaia Clary [Sat, 28 Jan 2017 20:51:18 +0000 (21:51 +0100)]
fix D2489: Collada exporter broke edit data when exporting Armature while in Armature edit mode

2 years agofix D2489: Collada exporter broke edit data when exporting Armature while in Armature...
Gaia Clary [Sat, 28 Jan 2017 20:51:18 +0000 (21:51 +0100)]
fix D2489: Collada exporter broke edit data when exporting Armature while in Armature edit mode

2 years agoFix (IRC reported) DataTransfer modifier affecting base mesh in some cases.
Bastien Montagne [Fri, 27 Jan 2017 18:27:07 +0000 (19:27 +0100)]
Fix (IRC reported) DataTransfer modifier affecting base mesh in some cases.

Checking only whether mverts is same as base mesh one is not enough in
all cases, some modifiers (deform ones) can only generate new mvert
data, while keeping others from original mesh.

Now checking both mvert or medge, hopefully this will be enough to catch
all problematic cases this time.

Thanks @gaia for finding that problem. :)

2 years agoFix T50534, Part II: warn user when DataTransfer mod affects custom normals.
Bastien Montagne [Fri, 27 Jan 2017 18:06:10 +0000 (19:06 +0100)]
Fix T50534, Part II: warn user when DataTransfer mod affects custom normals.

Custom normals need Autosmooth setting to be enabled, always!

2 years agoFix T50534: Part I, cleanup loop normals generated during modifier stack evaluation.
Bastien Montagne [Fri, 27 Jan 2017 17:47:11 +0000 (18:47 +0100)]
Fix T50534: Part I, cleanup loop normals generated during modifier stack evaluation.

Those could stay around, and be displayed in 3DView even when autosmooth
was disabled (but would not be 'active').

2 years agoUI: Move Scene Game Properties to the Scene Tab (was in world)
Aaron Carlisle [Fri, 27 Jan 2017 16:35:19 +0000 (11:35 -0500)]
UI: Move Scene Game Properties to the Scene Tab (was in world)

2 years agoSnap Functions: Remove the use of the function 'BLI_bvhtree_find_nearest_to_ray'...
Germano Cavalcante [Fri, 27 Jan 2017 16:02:05 +0000 (13:02 -0300)]
Snap Functions: Remove the use of the function 'BLI_bvhtree_find_nearest_to_ray' in transform_snap_object
Although the "BLI_bvhtree_find_nearest_to_ray" function is more practical than the generic "BLI_bvhtree_walk_dfs", it does not work to snap in perspective view. This makes it necessary to add "ifs" and functions that make the code difficult to understand

patch: D2474

2 years agoCycles: Add option to replace GI with AO approximation after certain amount of bounces
Sergey Sharybin [Fri, 25 Nov 2016 17:59:43 +0000 (18:59 +0100)]
Cycles: Add option to replace GI with AO approximation after certain amount of bounces

This is a speed up option which is mainly useful for viewport. Gives nice speedup in
the barbershop scene of 2x when replacing GI with AO after 2nd bounce without loosing
too much details.

Reviewers: brecht

Subscribers: eyecandy, venomgfx

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

2 years agoFixup for rBac58a7fa (HSV doversion)
Dalai Felinto [Fri, 27 Jan 2017 10:24:23 +0000 (11:24 +0100)]
Fixup for rBac58a7fa (HSV doversion)

We are not bumping file version, but we cannot have the doversion code running twice.
In this particular case it was crashing files, since we were setting node->storage to NULL, and later on accessing it.

2 years agoCMake: Fix typo
Sergej Reich [Fri, 27 Jan 2017 04:24:58 +0000 (05:24 +0100)]
CMake: Fix typo

2 years agoDepsgraph: Fix typo in assert
Sergey Sharybin [Thu, 26 Jan 2017 16:22:54 +0000 (17:22 +0100)]
Depsgraph: Fix typo in assert

2 years agoDepsgraph: Link from material to object shading
Sergey Sharybin [Thu, 26 Jan 2017 16:01:37 +0000 (17:01 +0100)]
Depsgraph: Link from material to object shading

This is a ground work for the upcoming changes in Blender 2.8 branch
where we need to do special actions to reconstruct shaders when
material changes.

2 years agoDepsgraph: Add relation from node tree to material it's coming from
Sergey Sharybin [Thu, 26 Jan 2017 15:49:24 +0000 (16:49 +0100)]
Depsgraph: Add relation from node tree to material it's coming from

2 years agoDepsgraph: Remove owner argument from relations builder as well
Sergey Sharybin [Thu, 26 Jan 2017 15:35:23 +0000 (16:35 +0100)]
Depsgraph: Remove owner argument from relations builder as well

The idea was to link something to a parent, but the point is:
we must not pass owner deep and then have any parent-type-related
logic implemented in the "children".

2 years agoFix (unreported) crash when file browser attempts to show preview of some defective...
IRIE Shinsuke [Thu, 26 Jan 2017 15:15:49 +0000 (00:15 +0900)]
Fix (unreported) crash when file browser attempts to show preview of some defective font

Confirmed with the Wine's bundled fonts.

2 years agoDepsgraph: Remove owner node argument which was simply passed around
Sergey Sharybin [Thu, 26 Jan 2017 15:29:09 +0000 (16:29 +0100)]
Depsgraph: Remove owner node argument which was simply passed around

2 years agoCompositor: Make HSV node inputs a real sockets
Sergey Sharybin [Wed, 7 Dec 2016 12:52:12 +0000 (13:52 +0100)]
Compositor: Make HSV node inputs a real sockets

This is much more flexible solution which will allow doing some
more procedural features.

Reviewers: brecht, dfelinto, mont29

Reviewed By: mont29

Subscribers: Severin

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

2 years agoFix unfreed memory after cleaning render layers
Dalai Felinto [Thu, 26 Jan 2017 10:58:47 +0000 (11:58 +0100)]
Fix unfreed memory after cleaning render layers

The freestyle data was never freed when removing a renderlayer.

```
blender -b --factory-startup --debug-memory --python-expr "import bpy;bpy.ops.scene.render_layer_add();bpy.context.scene.render.layers.active_index=0;bpy.ops.scene.render_layer_remove()"
```

2 years agoAlembic: fix compile error on Linux.
Kévin Dietrich [Thu, 26 Jan 2017 05:18:07 +0000 (06:18 +0100)]
Alembic: fix compile error on Linux.

2 years agoFix T50287: Blender crashes when open a blend that contains an alembic
Kévin Dietrich [Thu, 26 Jan 2017 05:16:33 +0000 (06:16 +0100)]
Fix T50287: Blender crashes when open a blend that contains an alembic
file.

Missed in rB62a2ed97b.

2 years ago[Cycles/MSVC/Testing] Fix broken test code.
lazydodo [Wed, 25 Jan 2017 16:36:41 +0000 (09:36 -0700)]
[Cycles/MSVC/Testing] Fix broken test code.

Currently the tests don't run on windows for the following reasons

1) render_graph_finalize has an linking issue due missing a bunch of libraries (not sure why this is not an issue for linux)
2) This one is more interesting, in test/python/cmakelists.txt ${TEST_BLENDER_EXE_BARE} and ${TEST_BLENDER_EXE} are flat out wrong, but for some reason this doesn't matter for most tests, cause ctest will actually go out and look for the executable and fix the path for you *BUT* only for the command, if you use them in any of the parameters it'll happily pass on the wrong path.
3) on linux you can just run a .py file, windows is not as awesome and needs to be told to run it with pyton.
4) had to use the NAME/COMMAND long form of add_test otherwise $<TARGET_FILE:blender> doesn't get expanded, why? beats me.
5) missing idiff.exe for msvc2015/x64 in the libs folder.

This patch addresses 1-4 , but given I have no working Linux build environment, I'm unsure if it'll break anything there

5 has been fixed in rBL61751

Reviewers: juicyfruit, brecht, sergey

Reviewed By: sergey

Subscribers: Blendify

Tags: #cycles, #automated_testing

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

2 years agoFix T50115: stereoscopic video file memory leak
Dalai Felinto [Wed, 25 Jan 2017 14:15:37 +0000 (15:15 +0100)]
Fix T50115: stereoscopic video file memory leak

2 years agoFix T50032: Wrong render result when same image is used with and without alpha
Sergey Sharybin [Wed, 25 Jan 2017 13:02:59 +0000 (14:02 +0100)]
Fix T50032: Wrong render result when same image is used with and without alpha

2 years agoFix T50512: Linked Backround scene with animation not updating with new depsgraph
Sergey Sharybin [Wed, 25 Jan 2017 11:30:29 +0000 (12:30 +0100)]
Fix T50512: Linked Backround scene with animation not updating with new depsgraph

Was missing relations for the set scenes.

Perhaps not ideal solution, but should be good enough for now.

2 years agoDepsgraph: Do ID tag outside of build_scene
Sergey Sharybin [Wed, 25 Jan 2017 11:28:27 +0000 (12:28 +0100)]
Depsgraph: Do ID tag outside of build_scene

Otherwise it was possible to get ID tags cleared in the middle
of DEG construction when there are set scenes used.

2 years agoFix T50517: Rendering expecting time is negative
Sergey Sharybin [Wed, 25 Jan 2017 10:18:12 +0000 (11:18 +0100)]
Fix T50517: Rendering expecting time is negative

2 years agoRevert "UI: Add missing menu item"
Aaron Carlisle [Wed, 25 Jan 2017 06:33:10 +0000 (01:33 -0500)]
Revert "UI: Add missing menu item"

This reverts commit 1ad842d432ccacd1f822d7f2b8ff3c542d25e976.

2 years agoUI: Add missing menu item
Aaron Carlisle [Wed, 25 Jan 2017 05:59:10 +0000 (00:59 -0500)]
UI: Add missing menu item

2 years agoFix T49405: Crash when baking with adaptive subdivision
Mai Lavelle [Wed, 25 Jan 2017 05:35:20 +0000 (00:35 -0500)]
Fix T49405: Crash when baking with adaptive subdivision

Blenders baking system currently doesn't support the topology used by
adaptive subdivision and primitive ids will be wrong or out of range
leading to crashes. Updating the baking system to support other
topologies would be a bit involved, so for now we simply disable
subdivision while baking to avoid crashes.

2 years agoRemove commented code
Aaron [Tue, 24 Jan 2017 20:58:52 +0000 (15:58 -0500)]
Remove commented code

2 years agoFix T50386: Crash when spawning pie menus
Julian Eisel [Tue, 24 Jan 2017 20:35:38 +0000 (21:35 +0100)]
Fix T50386: Crash when spawning pie menus

D2455 by @raa, thanks!

2 years agoDepsgraph: Fix duplicated operation node when two objects are sharing same armature
Sergey Sharybin [Tue, 24 Jan 2017 16:15:39 +0000 (17:15 +0100)]
Depsgraph: Fix duplicated operation node when two objects are sharing same armature

2 years agoCycles: Don't rely on indirectly included algorithm
Sergey Sharybin [Tue, 24 Jan 2017 15:39:16 +0000 (16:39 +0100)]
Cycles: Don't rely on indirectly included algorithm

2 years agoFix typo in comment
Sergey Sharybin [Tue, 24 Jan 2017 13:56:35 +0000 (14:56 +0100)]
Fix typo in comment

2 years agoInstall deps: Bump OpenSubdiv version to 3.1.1
Sergey Sharybin [Tue, 24 Jan 2017 10:49:45 +0000 (11:49 +0100)]
Install deps: Bump OpenSubdiv version to 3.1.1

Required to have some crash fixes.

2 years agoGPencil: Fix unreported animation data missing when change palette name
Antonio Vazquez [Tue, 24 Jan 2017 08:15:41 +0000 (09:15 +0100)]
GPencil: Fix unreported animation data missing when change palette name

When a palette was renamed, the animation data was not changed.

This fix is related to commit 196520fe7d81

2 years agoUse new manual URL
Aaron Carlisle [Tue, 24 Jan 2017 00:09:45 +0000 (19:09 -0500)]
Use new manual URL

2 years agoUpdate script generating/uploading py API doc to new addresses (docs.blender.org).
Bastien Montagne [Mon, 23 Jan 2017 20:10:56 +0000 (21:10 +0100)]
Update script generating/uploading py API doc to new addresses (docs.blender.org).

2 years agoFix compilation error with legacy depsgraph disabled
Sergey Sharybin [Mon, 23 Jan 2017 17:08:41 +0000 (18:08 +0100)]
Fix compilation error with legacy depsgraph disabled

2 years agoCycles: Split ShaderData object and shader flags
Sergey Sharybin [Fri, 23 Dec 2016 10:31:19 +0000 (11:31 +0100)]
Cycles: Split ShaderData object and shader flags

We started to run out of bits there, so now we separate flags
which came from __object_flags and which are either runtime or
coming from __shader_flags.

Rule now is: SD_OBJECT_* flags are to be tested against new
object_flags field of ShaderData, all the rest flags are to
be tested against flags field of ShaderData.

There should be no user-visible changes, and time difference
should be minimal. In fact, from tests here can only see hardly
measurable difference and sometimes the new code is somewhat
faster (all within a noise floor, so hard to tell for sure).

Reviewers: brecht, dingto, juicyfruit, lukasstockner97, maiself

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

2 years agoCycles: Make object flag names more obvious that hey are object and not shader
Sergey Sharybin [Fri, 23 Dec 2016 09:49:59 +0000 (10:49 +0100)]
Cycles: Make object flag names more obvious that hey are object and not shader

2 years agoFix strict compiler warning in the gflags code
Sergey Sharybin [Mon, 23 Jan 2017 10:52:41 +0000 (11:52 +0100)]
Fix strict compiler warning in the gflags code

2 years agoSilence strict compiler warnings
Sergey Sharybin [Mon, 23 Jan 2017 10:46:02 +0000 (11:46 +0100)]
Silence strict compiler warnings

Similar thing to other areas where we mix Blender's char with OpenGL API.

2 years agoCycles: Fix typo in the panel name
Sergey Sharybin [Mon, 23 Jan 2017 09:35:15 +0000 (10:35 +0100)]
Cycles: Fix typo in the panel name

No user visible changes, it was a typo in the name of the class.

Spotted by povmaniac in IRC, thanks!

2 years agoCycles: Update current Cycles version
Sergey Sharybin [Mon, 23 Jan 2017 09:23:09 +0000 (10:23 +0100)]
Cycles: Update current Cycles version

2 years agoFix T50491: Cycles UI breaks when pushing F8.
Bastien Montagne [Sun, 22 Jan 2017 11:42:14 +0000 (12:42 +0100)]
Fix T50491: Cycles UI breaks when pushing F8.

Cycles add-on did not actually support reloading correctly.

When you want to correctly reload sub-modules (i.e. modules of an add-on
which is a package), you need to use importlib, a mere import will do
nothing with already loaded modules (RNA classes are sort of
pre-registered when they are evaluated, through the meta-class system).

2 years agoFix T49527: Blender stalls when changing armature ghosting range with stepsize = 0
Joshua Leung [Sat, 21 Jan 2017 13:54:35 +0000 (02:54 +1300)]
Fix T49527: Blender stalls when changing armature ghosting range with stepsize = 0

A big thanks to Steffen Mortensen (stifan) for finding the root cause of this bug!

2 years agoFix own mistake in rB051526da6279, confusing off_t with ptrdiff_t.
Bastien Montagne [Fri, 20 Jan 2017 20:57:48 +0000 (21:57 +0100)]
Fix own mistake in rB051526da6279, confusing off_t with ptrdiff_t.

2 years agoFix minor glitches in GP code.
Bastien Montagne [Fri, 20 Jan 2017 17:46:06 +0000 (18:46 +0100)]
Fix minor glitches in GP code.

Reported by coverity scan.

2 years agoFix/cleanup stupid check on array of char being non-NULL pointer...
Bastien Montagne [Fri, 20 Jan 2017 17:43:42 +0000 (18:43 +0100)]
Fix/cleanup stupid check on array of char being non-NULL pointer...

Reported by coverity scan.

2 years agoFix float buffer of tracking image accessed outside of check that it has been correct...
Bastien Montagne [Fri, 20 Jan 2017 17:41:56 +0000 (18:41 +0100)]
Fix float buffer of tracking image accessed outside of check that it has been correctly allocated.

Reported by coverity scan.

2 years agoCycles: Use more const qualifiers to avoid possible issues
Sergey Sharybin [Fri, 20 Jan 2017 16:54:17 +0000 (17:54 +0100)]
Cycles: Use more const qualifiers to avoid possible issues

2 years agoCycles: Cleanup, split one gigantic function into two smaller ones
Sergey Sharybin [Fri, 20 Jan 2017 16:52:48 +0000 (17:52 +0100)]
Cycles: Cleanup, split one gigantic function into two smaller ones

2 years agoFix compilation error with strict flags
Sergey Sharybin [Fri, 20 Jan 2017 16:47:09 +0000 (17:47 +0100)]
Fix compilation error with strict flags

2 years agoCleanup/fix some BLI_string_utf8 not using size_t/off_t as expected.
Bastien Montagne [Fri, 20 Jan 2017 12:03:21 +0000 (13:03 +0100)]
Cleanup/fix some BLI_string_utf8 not using size_t/off_t as expected.

2 years agoCleanup/fix last remnant usages of int instead of size_t for string length in BLI_str...
Bastien Montagne [Fri, 20 Jan 2017 11:21:04 +0000 (12:21 +0100)]
Cleanup/fix last remnant usages of int instead of size_t for string length in BLI_string_utils.

2 years agoD1873: Customize style for animation motion paths
Antonio Vazquez [Fri, 20 Jan 2017 15:49:14 +0000 (16:49 +0100)]
D1873: Customize style for animation motion paths

New options to define the style of the animation paths in order to get
better visibility in complex scenes.

Now is possible define the color, thickness and several options relative
to the style of the lines used to draw motion path.

2 years agoCycles: Store time in BVH nodes
Sergey Sharybin [Tue, 17 Jan 2017 14:34:18 +0000 (15:34 +0100)]
Cycles: Store time in BVH nodes

This way we can stop traversing BVH node early on.

Gives about 2-2.5x times render time improvement with 3 BVH steps.
Hopefully this gives no measurable performance loss for scenes with
single BVH step.

Traversal is currently only implemented for QBVH, meaning old CPUs
and GPU do not benefit from this change.

2 years agoCycles: Add option to split triangle motion primitives by time steps
Sergey Sharybin [Tue, 17 Jan 2017 14:13:01 +0000 (15:13 +0100)]
Cycles: Add option to split triangle motion primitives by time steps

Similar to the previous commit, the statistics goes as:

BVH Steps     Render time (sec)       Memory usage (MB)
    0                46                    260
    1                27                    373
    2                18                    598
    3                15                    826

Scene used for the tests is the agent's body from one of the barber
shop scenes (no textures or anything, just a diffuse material).

Once again this is limited to regular (non-spatial split) BVH,
Support of spatial split to this feature will come later.

2 years agoCycles: Add option to split curve motion primitives by time steps
Sergey Sharybin [Tue, 17 Jan 2017 13:37:32 +0000 (14:37 +0100)]
Cycles: Add option to split curve motion primitives by time steps

The idea is to create several smaller BVH nodes for each of the motion
curve primitives. This acts as a forced spatial split for the single
primitive.

This gives up render time speedup of motion blurred hair in the cost
of extra memory usage. The numbers goes as:

BVH Steps     Render time (sec)       Memory usage (MB)
    0               258                    191
    1               123                    278
    2                69                    453
    3                43                    627

Scene used for the tests is the agent's hair from one of the barber
shop scenes.

Currently it's only limited to scenes without spatial split enabled,
since the spatial split builder requires some changes to work properly
with motion steps coordinates.

2 years agoCycles: Add utility function to calculate curve boundbox from given 4 keys
Sergey Sharybin [Tue, 17 Jan 2017 13:23:29 +0000 (14:23 +0100)]
Cycles: Add utility function to calculate curve boundbox from given 4 keys

Also fixed some issues with motion keys calculation:

- Clamp lower and upper limits of curves so we can safely call those
  functions for the very first and very last curve segment.
- Fixed wrong indexing for the curve radius array.
- Fixed wrong motion attribute offset calculation.

2 years agoCycles: Cleanup, trailing whitespace
Sergey Sharybin [Tue, 17 Jan 2017 11:12:14 +0000 (12:12 +0100)]
Cycles: Cleanup, trailing whitespace

2 years agoCycles: Split motion triangle file once again, avoids annoying forward declarations
Sergey Sharybin [Tue, 17 Jan 2017 09:58:04 +0000 (10:58 +0100)]
Cycles: Split motion triangle file once again, avoids annoying forward declarations

2 years agoCycles: Move motion triangle intersection functions to own file
Sergey Sharybin [Tue, 17 Jan 2017 09:48:56 +0000 (10:48 +0100)]
Cycles: Move motion triangle intersection functions to own file

Mimics how regular triangles are working and makes it more clear where
the stuff is located in the kernel.

Needed to have some forward declarations because of the current placement
of things in the kernel.

2 years agoCycles: Cleanup, better variable name
Sergey Sharybin [Mon, 16 Jan 2017 19:27:05 +0000 (20:27 +0100)]
Cycles: Cleanup, better variable name

2 years agoCycles: Add utility function to fetch motion keys while on CPU side
Sergey Sharybin [Mon, 16 Jan 2017 19:26:17 +0000 (20:26 +0100)]
Cycles: Add utility function to fetch motion keys while on CPU side

2 years agoCycles: Cleanup, comments
Sergey Sharybin [Mon, 16 Jan 2017 19:08:19 +0000 (20:08 +0100)]
Cycles: Cleanup, comments

2 years agoCycles: Add utility function to fetch motion triangle when on CPU side
Sergey Sharybin [Mon, 16 Jan 2017 18:56:40 +0000 (19:56 +0100)]
Cycles: Add utility function to fetch motion triangle when on CPU side

2 years agoCycles: Cleanup, delete trailing whitespace
Sergey Sharybin [Mon, 16 Jan 2017 17:59:22 +0000 (18:59 +0100)]
Cycles: Cleanup, delete trailing whitespace

2 years agoCycles: Fix compilation error on with older GCC
Sergey Sharybin [Fri, 20 Jan 2017 10:55:48 +0000 (11:55 +0100)]
Cycles: Fix compilation error on with older GCC

Hopefully it works on all platforms now.

2 years agoFix T50460. Greying out issue with Cycles culling options.
Thomas Dinges [Fri, 20 Jan 2017 09:58:03 +0000 (10:58 +0100)]
Fix T50460. Greying out issue with Cycles culling options.

2 years agoFix compile error (-Werror=float-conversion).
Thomas Dinges [Fri, 20 Jan 2017 09:50:55 +0000 (10:50 +0100)]
Fix compile error (-Werror=float-conversion).

2 years agoDopeSheet: Show group colours behind keyframes too
Joshua Leung [Fri, 20 Jan 2017 05:14:28 +0000 (18:14 +1300)]
DopeSheet: Show group colours behind keyframes too

Following @AlonDan's feature request and @hjalti's screenshot yesterday,
I've decided to implement support for this to make it easier to scan which
keyframes correspond with which set of controls, especially when faced with
a large wall of keyframes.

In retrospect, I should've done this a long time ago!

2 years agoAPI: Do not show "Created using Sphinx" in the footer
Aaron [Thu, 19 Jan 2017 21:16:04 +0000 (16:16 -0500)]
API: Do not show "Created using Sphinx" in the footer

I talked to Campbell and he said there is no need for this

2 years agoBuild dir should be set after the sanity checks
Aaron [Thu, 19 Jan 2017 20:55:50 +0000 (15:55 -0500)]
Build dir should be set after the sanity checks

Error here is that if do not have 2012 it switch to 2015 but not change the build dir