3 years agoRemove old depsgraph from modifiers relations update context
Sergey Sharybin [Thu, 22 Feb 2018 13:09:13 +0000 (14:09 +0100)]
Remove old depsgraph from modifiers relations update context

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 22 Feb 2018 13:08:27 +0000 (14:08 +0100)]
Merge branch 'master' into blender2.8

3 years agoDepsgraph: Remove unused bmain from modifiers relations update context
Sergey Sharybin [Thu, 22 Feb 2018 13:07:08 +0000 (14:07 +0100)]
Depsgraph: Remove unused bmain from modifiers relations update context

3 years agoFix compilation error with legacy depsgraph disabled
Sergey Sharybin [Thu, 22 Feb 2018 12:05:38 +0000 (13:05 +0100)]
Fix compilation error with legacy depsgraph disabled

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 22 Feb 2018 12:05:00 +0000 (13:05 +0100)]
Merge branch 'master' into blender2.8

3 years agoDepsgraph: Wrap all arguments foe modifiers relations update into a struct
Sergey Sharybin [Thu, 22 Feb 2018 11:54:06 +0000 (12:54 +0100)]
Depsgraph: Wrap all arguments foe modifiers relations update into a struct

Makes it easier to add or remove fields needed to update relations.

3 years agoGWN: Fix use after free crash.
Clément Foucault [Thu, 22 Feb 2018 11:39:57 +0000 (12:39 +0100)]
GWN: Fix use after free crash.

This is not an ideal solution but blender freeing system is already well tangled.
So tracking and clearing vao caches when destroying contexts does prevent bad behaviour.

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 22 Feb 2018 10:20:28 +0000 (11:20 +0100)]
Merge branch 'master' into blender2.8

3 years agoDepsgraph: Replace LIB_TAG_DOIT with hash lookup
Sergey Sharybin [Thu, 22 Feb 2018 10:03:39 +0000 (11:03 +0100)]
Depsgraph: Replace LIB_TAG_DOIT with hash lookup

This allows us to:

- Not mock around with tags stored in a global space,
    and not to iterate over all datablocks in the database
    to clear the tags.

- Properly deal with datablocks which might not be in main database.

    While it sounds crazy, it might be handy when dealing with preview,
    or some partial scene updates, such as motion paths.

- Avoids majority of places where depsgraph construction needed bmain.

    This is something what could help in blender2.8 branch.

From tests with production file here did not see any measurable slowdown.

Hopefully, there is no functional changes :)

3 years agoDepsgraph: Add utility class to keep track of handled ID datablocks
Sergey Sharybin [Thu, 22 Feb 2018 09:52:43 +0000 (10:52 +0100)]
Depsgraph: Add utility class to keep track of handled ID datablocks

Currently unused, actual logic change will come in the next commit.

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 22 Feb 2018 09:47:40 +0000 (10:47 +0100)]
Merge branch 'master' into blender2.8

3 years agoDepsgraph: Use proper debug print flags check
Sergey Sharybin [Thu, 22 Feb 2018 09:40:18 +0000 (10:40 +0100)]
Depsgraph: Use proper debug print flags check

Was printing some tagging/evaluation prints when only building
messages were requested.

3 years agoDepsgraph: Report graph construction time when run with --debug-depsgraph-build
Sergey Sharybin [Thu, 22 Feb 2018 09:35:04 +0000 (10:35 +0100)]
Depsgraph: Report graph construction time when run with --debug-depsgraph-build

3 years agoDepsgraph: Cleanup, reduce indentation level
Sergey Sharybin [Thu, 22 Feb 2018 09:31:47 +0000 (10:31 +0100)]
Depsgraph: Cleanup, reduce indentation level

3 years agoWorkSpace: object-mode switching support
Campbell Barton [Thu, 22 Feb 2018 07:15:34 +0000 (18:15 +1100)]
WorkSpace: object-mode switching support

When changing workspaces, existing object-mode data is freed
the new workspaces mode is entered (if possible).

3 years agoAdd NULL checks to ED_object_base_activate
Campbell Barton [Thu, 22 Feb 2018 06:09:25 +0000 (17:09 +1100)]
Add NULL checks to ED_object_base_activate

Passing a NULL active base is valid,
own changes to mode-switching didn't check for this case.

3 years agoWorkSpace: Restore saved object-modes again
Campbell Barton [Thu, 22 Feb 2018 04:52:30 +0000 (15:52 +1100)]
WorkSpace: Restore saved object-modes again

Was temporarily removed when moving object mode to workspace.

Note: there is an issue where eval_ctx->view_layer is NULL on load,
for now pass a view layer argument, we might wan't to set the value

3 years agoRevert "BKE: Changing ID freeing order."
Campbell Barton [Thu, 22 Feb 2018 04:10:43 +0000 (15:10 +1100)]
Revert "BKE: Changing ID freeing order."

This reverts commit 87c72a7d2714de286109573055d5d5da32ece91e.

Caused T54121 which breaks blend file saving.
For now crash on exit is preferable.
Possible solution is to free screen-manipulator batches in a separate

3 years agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Wed, 21 Feb 2018 23:59:32 +0000 (00:59 +0100)]
Merge branch 'master' into blender2.8

3 years agoCycles: add Russian roulette termination for volume multiple scattering.
Brecht Van Lommel [Tue, 20 Feb 2018 14:36:07 +0000 (15:36 +0100)]
Cycles: add Russian roulette termination for volume multiple scattering.

This mainly helps with dense volumes, rendering can be 30% faster with
little noise increase in such scenes.

3 years agoCycles: better path termination for transparency.
Brecht Van Lommel [Tue, 20 Feb 2018 13:22:40 +0000 (14:22 +0100)]
Cycles: better path termination for transparency.

We now continue transparent paths after diffuse/glossy/transmission/volume
bounces are exceeded. This avoids unexpected boundaries in volumes with
transparent boundaries. It is also required for MIS to work correctly with
transparent surfaces, as we also continue through these in shadow rays.

The main visible changes is that volumes will now be lit by the background
even at volume bounces 0, same as surfaces.

Fixes T53914 and T54103.

3 years agoCycles: make principled BSDF node wider in the node editor by default.
Brecht Van Lommel [Mon, 19 Feb 2018 22:47:42 +0000 (23:47 +0100)]
Cycles: make principled BSDF node wider in the node editor by default.

3 years agoCode cleanup: fix incorrect socket names in hair and particle info nodes.
Brecht Van Lommel [Wed, 21 Feb 2018 12:18:40 +0000 (13:18 +0100)]
Code cleanup: fix incorrect socket names in hair and particle info nodes.

3 years agoGWN: Fix compilation on windows
Germano [Wed, 21 Feb 2018 21:58:29 +0000 (18:58 -0300)]
GWN: Fix compilation on windows

3 years agoBKE: Changing ID freeing order.
Clément Foucault [Wed, 21 Feb 2018 21:51:35 +0000 (22:51 +0100)]
BKE: Changing ID freeing order.

Screen can contains manipulators that contains batches to be freed before the opengl contexts (in WM) are destroyed.

Also fix other GPU related free.

3 years agoFix incorrect OSL raytype bits and add some comments.
Brecht Van Lommel [Tue, 20 Feb 2018 13:36:50 +0000 (14:36 +0100)]
Fix incorrect OSL raytype bits and add some comments.

3 years agoFix T54105: random walk SSS missing in branched indirect paths.
Brecht Van Lommel [Mon, 19 Feb 2018 23:15:14 +0000 (00:15 +0100)]
Fix T54105: random walk SSS missing in branched indirect paths.

Unify the path and branched path indirect SSS code. No performance impact
found on CUDA, for AMD split kernel the extra code was already there.

3 years agoFix T54107: bevel shader + normal map gives wrong result.
Brecht Van Lommel [Tue, 20 Feb 2018 19:24:40 +0000 (20:24 +0100)]
Fix T54107: bevel shader + normal map gives wrong result.

3 years agoGawain: VertexFormat: Cleanup
Clément Foucault [Tue, 20 Feb 2018 01:20:40 +0000 (02:20 +0100)]
Gawain: VertexFormat: Cleanup

Reorganize struct elements by size, rename a constant.

3 years agoGawain: Refactor: VAOs caching AND use new VAOs manager.
Clément Foucault [Tue, 20 Feb 2018 00:55:19 +0000 (01:55 +0100)]
Gawain: Refactor: VAOs caching AND use new VAOs manager.

A major bottleneck of current implementation is the call to create_bindings() for basically every drawcalls.
This is due to the VAO being tagged dirty when assigning a new shader to the Batch, defeating the purpose of the Batch (reuse it for drawing).

Since managing hundreds of batches in DrawManager and DrawCache seems not fun enough to me, I prefered rewritting the batches itself.

--- Batch changes ---
For this to happen I needed to change the Instancing to be part of the Batch rather than being another batch supplied at drawtime.
The Gwn_VertBuffers are copied from the batch to be instanciated and a new Gwn_VertBuffer is supplied for instancing attribs.
This mean a VAO can be generated and cached for this instancing case.

A Batch can be rendered with instancing, without instancing attribs and without the need for a new VAO using the GWN_batch_draw_range_ex with the force_instance parameter set to true.

--- Draw manager changes ---
The downside with this approach is that we must track the validity of the instanced batch (the original one). For this the only way (I could think of) is to set a callback for when the batch is getting free.
This means a bit of refactor in the DrawManager with the separation of batching and instancing Batches.

--- VAO cache ---
Each VAO is generated for a given ShaderInterface. This means we can keep it alive as long as the shader interface lives.
If a ShaderInterface is discarded, it needs to destroy every VAO associated to it. Otherwise, a new ShaderInterface with the same adress could be generated and reuse the same VAO with incorrect bindings.
The VAO cache itself is using a mix between a static array of VAO and a dynamic array if the is not enough space in the static.
Using this hybrid approach is a bit more performant than the dynamic array alone.
The array will not resize down but empty entries will be filled up again. It's unlikely we get a buffer overflow from this. Resizing could be done on next allocation if needed.

--- Results ---
Using Cached VAOs means that we are not querying each vertex attrib for each vbo for each drawcall, every redraw!
In a CPU limited test scene (10000 cubes in Clay engine) I get a reduction of CPU drawing time from ~20ms to 13ms.

The only area that is not caching VAOs is the instancing from particles (see comment DRW_shgroup_instance_batch).

3 years agoGawain: Add new context/vao manager.
Clément Foucault [Mon, 19 Feb 2018 22:50:52 +0000 (23:50 +0100)]
Gawain: Add new context/vao manager.

This allows allocation of VAOs from different opengl contexts and thread as long as the drawing happens in the same context.

Allocation is thread safe as long as we abide by the "one opengl context per thread" rule.

We can still free from any thread and actual freeing will occur at new vao allocation or next context binding.

3 years agoCleanup: Don't perform borderselect on channels that aren't visible
Joshua Leung [Wed, 21 Feb 2018 11:59:15 +0000 (00:59 +1300)]
Cleanup: Don't perform borderselect on channels that aren't visible

3 years agoFix: Return back to conventional way of averaging points for keyframe de-dup
Joshua Leung [Wed, 21 Feb 2018 11:44:03 +0000 (00:44 +1300)]
Fix: Return back to conventional way of averaging points for keyframe de-dup

The other approach was causing too much error in some cases (e.g. favouring
the lower-valued keyframes). This fix should make the resulting curves less

3 years agoFix: Forgot to recalculate handles after deleting keyframes
Joshua Leung [Wed, 21 Feb 2018 10:21:56 +0000 (23:21 +1300)]
Fix: Forgot to recalculate handles after deleting keyframes

3 years agoFix: Don't average keyframe values if FCurve can only have int/discrete values
Joshua Leung [Wed, 21 Feb 2018 09:37:48 +0000 (22:37 +1300)]
Fix: Don't average keyframe values if FCurve can only have int/discrete values

This is to prevent problems with integer/enum properties getting invalid
values set.

3 years agoCleanup: Delete debugging code and the old version of the automerge code
Joshua Leung [Wed, 21 Feb 2018 06:15:41 +0000 (19:15 +1300)]
Cleanup: Delete debugging code and the old version of the automerge code

3 years agoTweak/Fix for T54106 - Moving multiple selected keyframes on top of an unselected...
Joshua Leung [Wed, 21 Feb 2018 06:14:33 +0000 (19:14 +1300)]
Tweak/Fix for T54106 - Moving multiple selected keyframes on top of an unselected one would not merge the keys

This commit removes an earlier attempt at optimising the lookups
for duplicates of a particular tRetainedKeyframe once we'd already
deleted all the selected copies. The problem was that now, instead
of getting rid of the unselected keys (i.e. the basic function here),
we were only getting rid of the selected duplicates.

With this fix, unselected keyframes will now get removed (as expected)
again. However, we currently don't take their values into account
when merging keyframes, since it is assumed that we don't care so much
about their values when overriding.

3 years agoMinor Optimisation: Terminate early if we've passed the insertion point for tRetained...
Joshua Leung [Wed, 21 Feb 2018 05:59:15 +0000 (18:59 +1300)]
Minor Optimisation: Terminate early if we've passed the insertion point for tRetainedKeyframes

3 years agoFeature Request T54106: When scaling keyframes, merge (by-averaging) selected keys
Joshua Leung [Wed, 21 Feb 2018 04:53:54 +0000 (17:53 +1300)]
Feature Request T54106: When scaling keyframes, merge (by-averaging) selected keys
that end up on the same frame

Currently, when scaling keyframes in the Dopesheet, if multiple
selected keyframes end up on the same frame post-scaling, they
would not get removed by the "Automerge" setting that normally
removes duplicates on the same frame.

This commit changes the behaviour so that when multiple selected
keyframes end up on the same frame, instead of keeping all these
around on the same frame (e.g. resulting in a column of keyframes
on different values), we will instead merge them into a single
keyframe (by averaging the values). This should result in a
smoother F-Curve with fewer "stair-steps" that need to be carefully
cleaned out afterwards.

Requested by @hjalti

3 years agobezt_add_to_cfra_elem() - Use same keyframe equality test as in other places
Joshua Leung [Thu, 15 Feb 2018 04:40:19 +0000 (17:40 +1300)]
bezt_add_to_cfra_elem() - Use same keyframe equality test as in other places

This shouldn't affect anything currently, as this function doesn't appear
to get used anywhere.

3 years agoFix T54065: NLA-Strip Control Curves would get disabled when name-based-filtering...
Joshua Leung [Thu, 15 Feb 2018 03:39:46 +0000 (16:39 +1300)]
Fix T54065: NLA-Strip Control Curves would get disabled when name-based-filtering is enabled

This bug took a while to track down. In the test file with this report,
the Nla-Strip Control Curve for strip time would get disabled if you
changed the NLA Editor to a second Graph Editor instance.

It turns out that because this second Graph Editor would have the
"filter fcurves by name" option enabled, this would trigger a lookup
of the referenced property's name (in order to test whether it matched
the filtering criteria). However, since that filtering code was written
before the introduction of these curves, it still assumed that the names
for these Control Curves should be handled the same as for standard FCurves.
Unfortunately, that doesn't work, as the property lookups fail if the standard
method is used - when the lookups fail, the F-Curves get tagged as being
invalid/disabled (and need to be reset using the "Revive Disabled FCurves"

Note: The changes in this patch look complicated, as I've had to shuffle
a bit of code around so that the name-filtering check can have access to
the additional info it needs. In the process, I've also removed the earlier
(hacky) approach where the control curves were getting added to a temp
buffer to get changed from normal FCurves to special ANIMTYPE_NLACURVES.

3 years agoFix more missing ID remapping in animation editor callbacks
Joshua Leung [Thu, 15 Feb 2018 02:45:08 +0000 (15:45 +1300)]
Fix more missing ID remapping in animation editor callbacks

Applying the same fixes as introduced in 98d797b67c07e85889768bf8ecde292e9e6f70e9
this time, for the Graph and NLA editors

3 years agoDepsgraph: Fix fake dependency cycle with chained IK solvers with tip excluded
Sergey Sharybin [Wed, 21 Feb 2018 11:04:28 +0000 (12:04 +0100)]
Depsgraph: Fix fake dependency cycle with chained IK solvers with tip excluded

Not sure why we need a relation from solver to a tip local transform, this
will be handled via parent relation.

Fixes remaining dependency cycles reported in T54083.

3 years agoDepsgraph: Fix dependency when constraint influence drives some other constraint
Sergey Sharybin [Wed, 21 Feb 2018 10:13:25 +0000 (11:13 +0100)]
Depsgraph: Fix dependency when constraint influence drives some other constraint

It is not possible to address transform at particular position of constraint
stack, and when constraint is being addressed is usually from driver variable.

This fixes some of dependency cycles reported in T54083.

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 21 Feb 2018 09:51:58 +0000 (10:51 +0100)]
Merge branch 'master' into blender2.8

3 years agoDepsgraph: Split debug flags
Sergey Sharybin [Wed, 21 Feb 2018 09:44:36 +0000 (10:44 +0100)]
Depsgraph: Split debug flags

Now it's possible to have debug messages for following things:

- Graph construction
- Graph evaluation
- Graph tagging

3 years agoDepsgraph: Fix crash using --debug-depsgraph and --debug-depsgraph-no-threads
Sergey Sharybin [Wed, 21 Feb 2018 09:42:22 +0000 (10:42 +0100)]
Depsgraph: Fix crash using --debug-depsgraph and --debug-depsgraph-no-threads

Was accessing past the array boundaries.

Should be safe for 2.79a.

3 years agoFix subsurf modifier after error in merge commit
Mai Lavelle [Wed, 21 Feb 2018 09:38:10 +0000 (04:38 -0500)]
Fix subsurf modifier after error in merge commit

Merge commit that had the error: e99094035c493a4e0b

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 21 Feb 2018 09:30:50 +0000 (10:30 +0100)]
Merge branch 'master' into blender2.8

3 years agoDepsgraph: Report overall number of cycles detected
Sergey Sharybin [Tue, 20 Feb 2018 16:16:41 +0000 (17:16 +0100)]
Depsgraph: Report overall number of cycles detected

Handy to quickly see if a fix fixed any of the cycles in a real rig,
or whether it's introduced new ones.

3 years agoVSE: skip non image/movie w/ proxy dir storage
Campbell Barton [Wed, 21 Feb 2018 07:13:40 +0000 (18:13 +1100)]
VSE: skip non image/movie w/ proxy dir storage

This would use uninitialized filename variable,
looked into supporting this however generating proxies currently only
works for movies.

3 years agoFix for draw manager cache not re-set between different render layers
Dalai Felinto [Tue, 20 Feb 2018 18:43:39 +0000 (15:43 -0300)]
Fix for draw manager cache not re-set between different render layers

3 years agoProper implementation of compositor support for Draw Manager
Dalai Felinto [Tue, 20 Feb 2018 13:14:23 +0000 (10:14 -0300)]
Proper implementation of compositor support for Draw Manager

We need to move the render result logic outside the render engine code.

It makes no sense for Eevee/Clay/... to have to re-implement the render resilt
creation logic. Beside the original implementation really got it wrong, by
ignoring the different render layers needed for the final render.

Finally, there is no need to re-create the logic for views. So this was also

Note 1: This will break still if the depsgraph of the needed view layers is not
updated / created. We need to address this separately. For now if users want
to test this, just show each view layer in the viewport at least once.

Note 2: We are still getting depsgraph from scene and creating if needed.
`BKE_scene_get_depsgraph(scene, view_layer, true);` according to Sergey we need
to move the render depsgraph for the Render struct instead. I will do it
separately as well.

3 years agoCleanup: split normals: use different varnames for angle and its cosine.
Bastien Montagne [Tue, 20 Feb 2018 12:03:10 +0000 (13:03 +0100)]
Cleanup: split normals: use different varnames for angle and its cosine.

Using same name for two different things is not the best idea ever...

3 years agoFix T54069: Vertex groups for hair length is wrong in some cases
Sergey Sharybin [Tue, 20 Feb 2018 09:47:01 +0000 (10:47 +0100)]
Fix T54069: Vertex groups for hair length is wrong in some cases

This is a regression in rB4f1c0a1 which only allowed cutting haior at the
second segment only, while there is nothing wrong with cutting hair at the
first segmewnt.

3 years agoFix T54096: Subdivision Surface + Boolean Modifiers + Transform = crash
Sergey Sharybin [Mon, 19 Feb 2018 15:16:56 +0000 (16:16 +0100)]
Fix T54096: Subdivision Surface + Boolean Modifiers + Transform = crash

Don't use dm->get*Array for DM you don't own. This call can allocate temporary
CD layer, which is not thread safe at all.

Also removed hard-coded logic around CDDM check. new functions will do same
logic, but are mode DM-type-=independent.

3 years agoFix warning after fix for crash on renaming group collections
Dalai Felinto [Mon, 19 Feb 2018 14:10:19 +0000 (11:10 -0300)]
Fix warning after fix for crash on renaming group collections

Warning introduced on: 73079e01fd4.

3 years agoOutliner: Fix crash when renaming Group layer collection
Dalai Felinto [Mon, 19 Feb 2018 13:50:22 +0000 (10:50 -0300)]
Outliner: Fix crash when renaming Group layer collection

3 years agoOutliner: Update buttons editor when renaming collection
Dalai Felinto [Mon, 19 Feb 2018 13:48:05 +0000 (10:48 -0300)]
Outliner: Update buttons editor when renaming collection

Reported by Pablo Vazquez (venomgfx) outside phabricator.

3 years agoFix T53032: Image sequence works bad with Displace modifier
Sergey Sharybin [Mon, 19 Feb 2018 13:33:48 +0000 (14:33 +0100)]
Fix T53032: Image sequence works bad with Displace modifier

We shouldn't mix image pool acuisition with and without user provided,
the fact that internally image.c uses last frame from Image datablock
confuses the logic.

3 years agoFix collection object mode panels
Dalai Felinto [Mon, 19 Feb 2018 12:53:39 +0000 (09:53 -0300)]
Fix collection object mode panels

They were broken since we moved object mode into workspace.

3 years agoCleanup: rename SequenceEditor instance to 'ed'
Campbell Barton [Mon, 19 Feb 2018 11:32:41 +0000 (22:32 +1100)]
Cleanup: rename SequenceEditor instance to 'ed'

Name 'sequencer' & 'sequence' are too similar.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 19 Feb 2018 06:46:42 +0000 (17:46 +1100)]
Merge branch 'master' into blender2.8

3 years agoCleanup: remove BMeshToMeshParams.calc_tessface
Campbell Barton [Mon, 19 Feb 2018 06:41:37 +0000 (17:41 +1100)]
Cleanup: remove BMeshToMeshParams.calc_tessface

This wasn't used, tessface is being phased out.
Caller can run explicitly if needed.

3 years agoFix T54098: Crash existing /w dyntopo sculpt
Campbell Barton [Mon, 19 Feb 2018 06:27:01 +0000 (17:27 +1100)]
Fix T54098: Crash existing /w dyntopo sculpt

Optionally don't remap indices for objects.

Checking all objects parent's would reference a freed pointer
while freeing all objects.

In the case of dynamic topology there is no use in keeping track
of hook/vertex-parent indices.

Also disable this when creating meshes for undo storage
since adding an undo step shouldn't be modifying other objects.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 19 Feb 2018 04:59:20 +0000 (15:59 +1100)]
Merge branch 'master' into blender2.8

3 years agoCleanup: sync vertex-paint and sculpt from 2.8
Campbell Barton [Mon, 19 Feb 2018 01:20:18 +0000 (12:20 +1100)]
Cleanup: sync vertex-paint and sculpt from 2.8

Sync API changes from 2.8 to master.

3 years agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Sun, 18 Feb 2018 18:29:17 +0000 (19:29 +0100)]
Merge branch 'master' into blender2.8

3 years agoFix T54089: missing GLSL material draw update when changing object pass index.
Brecht Van Lommel [Sun, 18 Feb 2018 18:28:14 +0000 (19:28 +0100)]
Fix T54089: missing GLSL material draw update when changing object pass index.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Sun, 18 Feb 2018 11:33:05 +0000 (22:33 +1100)]
Merge branch 'master' into blender2.8

3 years agoCleanup: group BLI_ghash_utils.c API in BLU_ghash.h
Campbell Barton [Sun, 18 Feb 2018 11:10:56 +0000 (22:10 +1100)]
Cleanup: group BLI_ghash_utils.c API in BLU_ghash.h

3 years agoCleanup: split GHash helpers from implementation
Campbell Barton [Sun, 18 Feb 2018 10:44:56 +0000 (21:44 +1100)]
Cleanup: split GHash helpers from implementation

3 years agoCleanup: add 2d suffix to BLI files
Campbell Barton [Sun, 18 Feb 2018 10:27:33 +0000 (21:27 +1100)]
Cleanup: add 2d suffix to BLI files

Some of these API's can have 3D versions, explicitly name them 2D.

3 years agoCycles: tweak CUDA messages and avoid build errors with existing sm_2x configs.
Brecht Van Lommel [Tue, 6 Feb 2018 14:19:25 +0000 (15:19 +0100)]
Cycles: tweak CUDA messages and avoid build errors with existing sm_2x configs.

3 years agoCode cleanup: remove some more unused code after recent CUDA changes.
Brecht Van Lommel [Sat, 17 Feb 2018 23:51:46 +0000 (00:51 +0100)]
Code cleanup: remove some more unused code after recent CUDA changes.

3 years agoCycles: Remove Fermi texture code.
Thomas Dinges [Sat, 17 Feb 2018 21:56:58 +0000 (22:56 +0100)]
Cycles: Remove Fermi texture code.

This should be the last Fermi removal commit, unless I missed something.
It's been a pleasure Fermi!

3 years agoCycles: Remove fermi related defines from the code.
Thomas Dinges [Sat, 17 Feb 2018 21:19:54 +0000 (22:19 +0100)]
Cycles: Remove fermi related defines from the code.

Did not touch Texture related defines, that comes next.

3 years agoCycles: Remove Fermi support from CMake and update runtime checks in device_cuda...
Thomas Dinges [Sat, 17 Feb 2018 15:15:07 +0000 (16:15 +0100)]
Cycles: Remove Fermi support from CMake and update runtime checks in device_cuda.cpp.

Fermi code in Cycles kernel and texture system are coming next.

3 years agoBuildbot: Disable Cycles CUDA support on 32bit, and stop building sm_2x.
Thomas Dinges [Sat, 17 Feb 2018 14:49:37 +0000 (15:49 +0100)]
Buildbot: Disable Cycles CUDA support on 32bit, and stop building sm_2x.

3 years agoCode cleanup: remove WM subwindows.
Brecht Van Lommel [Fri, 16 Feb 2018 21:41:46 +0000 (22:41 +0100)]
Code cleanup: remove WM subwindows.

These no longer made much sense after regions were added, they just
duplicated state that was already in the regions.

3 years agoFix GL_FRAMEBUFFER_UNSUPPORTED warning in console on macOS.
Brecht Van Lommel [Sat, 17 Feb 2018 13:05:19 +0000 (14:05 +0100)]
Fix GL_FRAMEBUFFER_UNSUPPORTED warning in console on macOS.

3 years agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Sat, 17 Feb 2018 00:39:29 +0000 (01:39 +0100)]
Merge branch 'master' into blender2.8

3 years agoDRW: Fix assert with DRW_shgroup_material_instance_create.
Clément Foucault [Fri, 16 Feb 2018 22:06:20 +0000 (23:06 +0100)]
DRW: Fix assert with DRW_shgroup_material_instance_create.

3 years agoFix T53399: Dopesheet keyframes and the drawing of points were not visible with some...
Germano [Fri, 16 Feb 2018 20:02:06 +0000 (18:02 -0200)]
Fix T53399: Dopesheet keyframes and the drawing of points were not visible with some Intel cards

3 years agoGHOST: Windows: Print information on the GPU
Germano [Fri, 16 Feb 2018 18:46:58 +0000 (16:46 -0200)]
GHOST: Windows: Print information on the GPU

3 years agofix:T50079 collada matrix and blender matrix are transposed. This was not regarded...
Gaia Clary [Fri, 16 Feb 2018 15:58:20 +0000 (16:58 +0100)]
fix:T50079 collada matrix and blender matrix are transposed. This was not regarded by the animation importer, so it was creating very odd results

3 years agofix: limit precision also for animation matrixes if the limit option is set (gives...
Gaia Clary [Fri, 16 Feb 2018 15:53:16 +0000 (16:53 +0100)]
fix: limit precision also for animation matrixes if the limit option is set (gives nicer output for inspection)

3 years agoNew function to check if running opengl render
Antonio Vazquez [Fri, 16 Feb 2018 15:52:08 +0000 (16:52 +0100)]
New function to check if running opengl render

3 years agoFix rotation issues due to matrix to quaternion ambiguities
Gaia Clary [Fri, 16 Feb 2018 11:37:36 +0000 (12:37 +0100)]
Fix rotation issues due to matrix to quaternion ambiguities

Reviewers: mont29

Reviewed By: mont29

Subscribers: mont29

Differential Revision:

3 years agoObject Mode: exit sculpt on selection
Campbell Barton [Fri, 16 Feb 2018 12:37:47 +0000 (23:37 +1100)]
Object Mode: exit sculpt on selection

3 years agoObject Mode: exit vert/weight paint on selection
Campbell Barton [Fri, 16 Feb 2018 09:57:46 +0000 (20:57 +1100)]
Object Mode: exit vert/weight paint on selection

Was keeping data, since objects no longer store modes,
object mode can't be properly detected.

3 years agoVertex Paint: expose exist paint-mode to API
Campbell Barton [Fri, 16 Feb 2018 09:24:38 +0000 (20:24 +1100)]
Vertex Paint: expose exist paint-mode to API

3 years agoCleanup: avoid shadowing w/ name 'base'
Campbell Barton [Fri, 16 Feb 2018 09:55:24 +0000 (20:55 +1100)]
Cleanup: avoid shadowing w/ name 'base'

3 years agoCode cleanup: deduplicate code for running Python scripts outside Blender.
Brecht Van Lommel [Fri, 16 Feb 2018 00:22:34 +0000 (01:22 +0100)]
Code cleanup: deduplicate code for running Python scripts outside Blender.

3 years agoTests: add OpenGL UI drawing tests.
Brecht Van Lommel [Wed, 14 Feb 2018 19:33:33 +0000 (20:33 +0100)]
Tests: add OpenGL UI drawing tests.

This reuses the Cycles regression test code to also work for OpenGL UI drawing.
We launch Blender with a bunch of .blend files, take a screenshot and compare
it with a reference screenshot, and generate a HMTL report showing the failed
tests and their differences.

For Cycles we keep small reference renders to compare to in svn, but for OpenGL
developers currently have to generate the references manually. How to use:

* BLENDER_TEST_UPDATE=1 ctest -R opengl_draw
* .. make code changes ..
* ctest -R opengl_draw
* open build_dir/tests/opengl_draw/report.html

Differential Revision:

3 years agoTests: split off render report test code from Cycles tests.
Brecht Van Lommel [Wed, 14 Feb 2018 16:33:06 +0000 (17:33 +0100)]
Tests: split off render report test code from Cycles tests.

This renames test environment variables from CYCLESTEST_* to BLENDER_TEST_*.

Differential Revision:

3 years agoFix bplayer (c)
Bastien Montagne [Fri, 16 Feb 2018 11:40:11 +0000 (12:40 +0100)]
Fix bplayer (c)

3 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Fri, 16 Feb 2018 10:51:41 +0000 (11:51 +0100)]
Merge branch 'master' into blender2.8

3 years agoFix bplayer (c)
Bastien Montagne [Fri, 16 Feb 2018 09:42:43 +0000 (10:42 +0100)]
Fix bplayer (c)

3 years agoFix part II of T53977: Severe problem with multiple instances of a library (save...
Bastien Montagne [Fri, 16 Feb 2018 09:31:03 +0000 (10:31 +0100)]
Fix part II of T53977: Severe problem with multiple instances of a library (save and reload).

Once 'losing lib' issue is fixed (in previous commit), we have new issue
that this could lead to several copies of the same linked data-block in
.blend file. Which is not good. At all.

So had to add a GHash-based check in libraries reading code to ensure we
only load a same ID from a same lib once.