blender.git
2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 9 Apr 2018 10:44:25 +0000 (12:44 +0200)]
Merge branch 'master' into blender2.8

2 years agoCleanup: avoid recalculating global center
Campbell Barton [Mon, 9 Apr 2018 10:39:43 +0000 (12:39 +0200)]
Cleanup: avoid recalculating global center

2 years agoGPU Codegen: Fix assert caused by GC of failled shaders.
Clément Foucault [Mon, 9 Apr 2018 10:09:51 +0000 (12:09 +0200)]
GPU Codegen: Fix assert caused by GC of failled shaders.

2 years agoBLF: Fix assert when drawing very small chars.
Clément Foucault [Mon, 9 Apr 2018 09:53:06 +0000 (11:53 +0200)]
BLF: Fix assert when drawing very small chars.

2 years agoFreestyle: use depsgraph to get geometry, instead of Blender Internal.
Brecht Van Lommel [Wed, 4 Apr 2018 13:51:03 +0000 (15:51 +0200)]
Freestyle: use depsgraph to get geometry, instead of Blender Internal.

Some of the code is simpler because we use Blender's triangulation directly
instead of dealing with quads. Also some progress printing code was removed
because the depsgraph can not tell us the number of objects ahead of time.

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

2 years agoUI: Widgets: Fix text edit cursor not drawing.
Clément Foucault [Sun, 8 Apr 2018 16:54:34 +0000 (18:54 +0200)]
UI: Widgets: Fix text edit cursor not drawing.

Actually it was drawn before the widget. Flushing widget cache and
everything is fine again.

2 years agoGPU Select: Remove warnings on Intel GPU.
Clément Foucault [Sun, 8 Apr 2018 16:31:21 +0000 (18:31 +0200)]
GPU Select: Remove warnings on Intel GPU.

 - Disable scissor test for fast clear. This could lead to some issues but
   I cannot think of one and could not find one either.
 - Manually wait for queries to be available instead of making the driver
   wait and issue warnings.

2 years agoUI: Perf: Use GWN_draw_primitive for drawing viewport textures.
Clément Foucault [Sun, 8 Apr 2018 15:00:15 +0000 (17:00 +0200)]
UI: Perf: Use GWN_draw_primitive for drawing viewport textures.

2 years agoUI: Perf: Use GWN_draw_primitive for drawing triple buffers texture.
Clément Foucault [Sun, 8 Apr 2018 14:59:39 +0000 (16:59 +0200)]
UI: Perf: Use GWN_draw_primitive for drawing triple buffers texture.

2 years agoUI: Perf: View3D: Batch view infos BLF calls together.
Clément Foucault [Sun, 8 Apr 2018 14:58:36 +0000 (16:58 +0200)]
UI: Perf: View3D: Batch view infos BLF calls together.

2 years agoUI: Perf: Batch horizontal scrollers numbers together.
Clément Foucault [Sun, 8 Apr 2018 14:57:39 +0000 (16:57 +0200)]
UI: Perf: Batch horizontal scrollers numbers together.

2 years agoClay: Improve loading time.
Clément Foucault [Sun, 8 Apr 2018 14:56:54 +0000 (16:56 +0200)]
Clay: Improve loading time.

Only compile hair shader if we need it.

2 years agoMerge branch 'master' into blender2.8
Sybren A. Stüvel [Sun, 8 Apr 2018 15:54:07 +0000 (17:54 +0200)]
Merge branch 'master' into blender2.8

2 years agoAlphabetically ordered audio and video codecs
Sybren A. Stüvel [Sun, 8 Apr 2018 15:52:30 +0000 (17:52 +0200)]
Alphabetically ordered audio and video codecs

2 years agoBLF: Perf: Use BLF_KERNING_STEP_FAST for other functions.
Clément Foucault [Sun, 8 Apr 2018 12:40:50 +0000 (14:40 +0200)]
BLF: Perf: Use BLF_KERNING_STEP_FAST for other functions.

2 years agoEevee: Reduce loading time.
Clément Foucault [Sun, 8 Apr 2018 12:31:41 +0000 (14:31 +0200)]
Eevee: Reduce loading time.

Only compile the needed shadow shaders to reduce the startup time.

Theses shaders is taking forever to compile on intel (~5s each).

2 years agoDRW: Profiling: Batch BLF strings and add shadowing
Clément Foucault [Sun, 8 Apr 2018 12:29:49 +0000 (14:29 +0200)]
DRW: Profiling: Batch BLF strings and add shadowing

Shadows makes it more readable and are relatively cheap now.

2 years agoBLF: Fix BlenderPlayer compilation.
Clément Foucault [Sun, 8 Apr 2018 12:28:46 +0000 (14:28 +0200)]
BLF: Fix BlenderPlayer compilation.

2 years agoMerge branch 'master' into blender2.8
Sybren A. Stüvel [Sun, 8 Apr 2018 12:07:34 +0000 (14:07 +0200)]
Merge branch 'master' into blender2.8

2 years agoEncoding panel clarifications
Sybren A. Stüvel [Sun, 8 Apr 2018 11:44:53 +0000 (13:44 +0200)]
Encoding panel clarifications

The encoding panel mentions "None" in a few places, which is confusing.
- "Codec: None" now reads "No Video"
- "Audio Codec: None" now reads "No Audio"
- "Output Quality: None; ..." now reads "Constant Bitrate"

When selecting "No Video" the remaining video encoding options are
hidden, making it even more explicit that there will not be video in the
output file.

The label "Codec" now reads "Video Codec" for symmetry with "Audio
Codec".

2 years agoBLF: Fix problem with bound texture.
Clément Foucault [Sat, 7 Apr 2018 23:14:43 +0000 (01:14 +0200)]
BLF: Fix problem with bound texture.

Previous code was assuming that the glyph texture would remain bound to
GL_TEXTURE0 until the cache would be drawn. This is not always the case,
so better save the texture and rebind it before drawing.

2 years agoBLF: Opti: More clever sampling for blured glyphs.
Clément Foucault [Sat, 7 Apr 2018 23:00:55 +0000 (01:00 +0200)]
BLF: Opti: More clever sampling for blured glyphs.

Reduce the number of sampled required for blurring by using filtered
texture samples.

This changes the result a bit but it is not noticable.

2 years agoBLF: Opti: Draw only one quad per shadow/blurred glyph.
Clément Foucault [Sat, 7 Apr 2018 22:44:35 +0000 (00:44 +0200)]
BLF: Opti: Draw only one quad per shadow/blurred glyph.

This port the Blurring of blf fonts to the final drawing shader.

We add a bit of extra padding to each glyph so that jittering the texture
coord does not sample the neighbor glyphs.

2 years agoFix edit-mesh select next
Campbell Barton [Sat, 7 Apr 2018 17:54:59 +0000 (19:54 +0200)]
Fix edit-mesh select next

Last change introduced error, return would stop looking over candidates.

D3137 by @nBurn

2 years agoBullet: Fix velocity calculation of new spring constraint
Sergej Reich [Sat, 7 Apr 2018 15:37:23 +0000 (17:37 +0200)]
Bullet: Fix velocity calculation of new spring constraint

This is a backport of bullet commit: 86ca7dc

2 years agoUI: Fix waveform widget text drawing.
Clément Foucault [Sat, 7 Apr 2018 12:03:32 +0000 (14:03 +0200)]
UI: Fix waveform widget text drawing.

Flush the text cache so that we have proper scissor test and ordering.

2 years agoUI: Perf: Port color widgets to batch.
Clément Foucault [Fri, 6 Apr 2018 21:54:24 +0000 (23:54 +0200)]
UI: Perf: Port color widgets to batch.

This is more for completeness than perf.

Shader is tiny bit more complex but we get less overdraw and drawcalls.

2 years agoFix object mode workspace check
Campbell Barton [Fri, 6 Apr 2018 16:31:32 +0000 (18:31 +0200)]
Fix object mode workspace check

2 years agoMinor change to last commit
Campbell Barton [Fri, 6 Apr 2018 16:17:18 +0000 (18:17 +0200)]
Minor change to last commit

2 years agoDelete object crashed (missing NULL check)
Campbell Barton [Fri, 6 Apr 2018 16:15:39 +0000 (18:15 +0200)]
Delete object crashed (missing NULL check)

Error in recent removal of workspace.object_mode

2 years agoUI: Perf: Optimize F-curve handles drawing.
Clément Foucault [Fri, 6 Apr 2018 13:39:09 +0000 (15:39 +0200)]
UI: Perf: Optimize F-curve handles drawing.

50% less time in my test when all handles are selected.

2 years agoStyle: Remove duplicated struct declaration.
Clément Foucault [Fri, 6 Apr 2018 12:30:44 +0000 (14:30 +0200)]
Style: Remove duplicated struct declaration.

2 years agoUI: Perf: Use widget base batching
Clément Foucault [Fri, 6 Apr 2018 12:30:20 +0000 (14:30 +0200)]
UI: Perf: Use widget base batching

Overall 10% more performance on general UI drawing time.

This commit can introduce ordering problem on some elements.
In this case you need to flush the widget cache to ensure the element that
is going to be drawn is drawn on top of any widget base.

To flush the cache use UI_widgetbase_draw_cache_flush.

This is already done for BLF and Icons.

2 years agoUI: Perf: Add batching capability to widgets.
Clément Foucault [Fri, 6 Apr 2018 12:25:55 +0000 (14:25 +0200)]
UI: Perf: Add batching capability to widgets.

Similiar to how we batch Icons together. This is not enabled in this
commit.

2 years agoGPUShader: Add GPU_SHADER_2D_WIDGET_BASE_INST shader.
Clément Foucault [Fri, 6 Apr 2018 12:22:20 +0000 (14:22 +0200)]
GPUShader: Add GPU_SHADER_2D_WIDGET_BASE_INST shader.

This will let us draw multiple widget base at once.

2 years agoFix Collada: nullptr is a c++11 keyword. Changed to NULL
Gaia Clary [Fri, 6 Apr 2018 11:06:46 +0000 (13:06 +0200)]
Fix Collada: nullptr is a c++11 keyword. Changed to NULL

2 years agoFix Collada: Import of animations for objects with multiple materials
Gaia Clary [Fri, 6 Apr 2018 10:42:38 +0000 (12:42 +0200)]
Fix Collada: Import of animations for objects with multiple materials

When importing multiple materials for one object,
the imported material animation curves have all been
assigned to the first material in the object.

This fix also improves the console logging whenever the importer
finds a consistency problem with the imported animation data.

2 years agoCleanup: style, doxy headers
Campbell Barton [Fri, 6 Apr 2018 08:47:39 +0000 (10:47 +0200)]
Cleanup: style, doxy headers

2 years agoUI: Perf: Improve ui_draw_dropshadow.
Clément Foucault [Fri, 6 Apr 2018 08:09:23 +0000 (10:09 +0200)]
UI: Perf: Improve ui_draw_dropshadow.

Replace the 12 iterations of UI_draw_roundbox_4fv with only one batch.

This mean less overdraw and less drawcalls.

I had to hack the opacity falloff curve manually to get approximatly the
same result as previous technique. I'm sure with a bit more brain power
somebody could find the perfect function.

2 years agoUI: Perf: Modify UI_draw_roundbox to use GWN_batch API.
Clément Foucault [Thu, 5 Apr 2018 16:51:08 +0000 (18:51 +0200)]
UI: Perf: Modify UI_draw_roundbox to use GWN_batch API.

This commit also rename and move a few thing to clean things up.

Major improvment is using one drawcall instead of 8 for UI_draw_roundbox_aa.

2 years agoUI: Add accelerator keys to quit confirmation popup
Julian Eisel [Thu, 5 Apr 2018 17:12:28 +0000 (19:12 +0200)]
UI: Add accelerator keys to quit confirmation popup

2 years agoFix error where find-next missed None check
Campbell Barton [Thu, 5 Apr 2018 16:45:25 +0000 (18:45 +0200)]
Fix error where find-next missed None check

Thanks to @nBurn

2 years agoDepsgraph: Avoid build-time armature expanding
Sergey Sharybin [Thu, 5 Apr 2018 16:40:10 +0000 (18:40 +0200)]
Depsgraph: Avoid build-time armature expanding

With index-based pchan evaluation we don't need to go into
a mess of expanding armature at relation construction time.

2 years agoCleanup: use string macros to avoid duplicate args
Campbell Barton [Thu, 5 Apr 2018 16:39:23 +0000 (18:39 +0200)]
Cleanup: use string macros to avoid duplicate args

2 years agoBLI_string_utf8: macros that de-duplicate sizeof arg
Campbell Barton [Thu, 5 Apr 2018 14:56:21 +0000 (16:56 +0200)]
BLI_string_utf8: macros that de-duplicate sizeof arg

2 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 5 Apr 2018 16:25:05 +0000 (18:25 +0200)]
Merge branch 'master' into blender2.8

2 years agoRemove workspace object mode, reverts changes w/ 2.8
Campbell Barton [Thu, 5 Apr 2018 16:20:27 +0000 (18:20 +0200)]
Remove workspace object mode, reverts changes w/ 2.8

This caused too many problems syncing object modes
with multiple objects/windows/workspaces, see: D3130 for details.

2 years agoDepsgraph: Pull indirect dependencies via pchan constraints
Sergey Sharybin [Thu, 5 Apr 2018 16:03:36 +0000 (18:03 +0200)]
Depsgraph: Pull indirect dependencies via pchan constraints

Was missing ID looper for pchan constraint.

2 years agoMerge branch 'master' into blender2.8
Sybren A. Stüvel [Thu, 5 Apr 2018 14:58:41 +0000 (16:58 +0200)]
Merge branch 'master' into blender2.8

2 years agoLoad metadata from video files and expose via RNA
Sybren A. Stüvel [Thu, 5 Apr 2018 14:34:36 +0000 (16:34 +0200)]
Load metadata from video files and expose via RNA

The MovieSequence and MovieClip classes now have a metadata() function
that exposes the `IDProperty *` holding the video metadata.

Part of: https://developer.blender.org/D2273

Reviewed by: @campbellbarton

2 years agoWrite the scene render frame range to image/video files
Sybren A. Stüvel [Thu, 5 Apr 2018 14:33:32 +0000 (16:33 +0200)]
Write the scene render frame range to image/video files

This is useful to create a mapping from the frame range in the video to
frame index in the blend file.

Part of: https://developer.blender.org/D2273

Reviewed by: @campbellbarton

2 years agoWrite StampData metadata to video files
Sybren A. Stüvel [Thu, 5 Apr 2018 14:31:59 +0000 (16:31 +0200)]
Write StampData metadata to video files

This is currently only supported by FFmpeg (so not frameserver, AVI RAW,
or AVI JPEG), and only seems to work when using Matroska or Ogg Theora
containers.

Only metadata that doesn't change from frame to frame is written to
video files. This distinction is visible in the UI by looking at the
stamp checkbox tooltips (they either mention "image" or "image/video").

Part of: https://developer.blender.org/D2273

Reviewed by: @campbellbarton

2 years agoIMB_metadata improvements
Sybren A. Stüvel [Thu, 5 Apr 2018 14:27:15 +0000 (16:27 +0200)]
IMB_metadata improvements

- Metadata handling is now separate from `ImBuf *`, allowing it to be
  used with a generic `IDProperty *`.
- Merged `IMB_metadata_add_field()` and `IMB_metadata_change_field()`
  into a more robust `IMB_metadata_set_field()`. This new function
  doesn't return any status (it now always succeeds, and the previously
  existing return value was never checked anyway).
- Removed `IMB_metadata_del_field()` as it was never actually used
  anywhere.
- Use `IMB_metadata_ensure()` instead of having
  `IMB_metadata_set_field()` create the containing `IDProperty` for
  you.
- Deduplicated function declarations, moved `intern/IMB_metadata.h` out
  of `intern/`. Note that this does mean that we have some extra
  `#include "IMB_metadata.h"` lines now, as the metadata functions are
  no longer declared in `IMB_imbuf.h`.
- Deduplicated function declarations, all metadata-related declarations
  are now in imbuf/IMB_metadata.h.

Part of: https://developer.blender.org/D2273

Reviewed by: @campbellbarton

2 years agoBLI_string: macros that de-duplicate sizeof arg
Campbell Barton [Thu, 5 Apr 2018 14:44:48 +0000 (16:44 +0200)]
BLI_string: macros that de-duplicate sizeof arg

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 5 Apr 2018 14:19:43 +0000 (16:19 +0200)]
Merge branch 'master' into blender2.8

2 years agoUI: Node Editor: Make nodelink arrow size and link width dpi dependant.
Clément Foucault [Thu, 5 Apr 2018 14:07:28 +0000 (16:07 +0200)]
UI: Node Editor: Make nodelink arrow size and link width dpi dependant.

2 years agoUI: Node Editor: Batch nodelinks together.
Clément Foucault [Thu, 5 Apr 2018 13:43:07 +0000 (15:43 +0200)]
UI: Node Editor: Batch nodelinks together.

This will do only one drawcall for every 256 nodelinks.

2 years agoUI: Node Editor: Port nodelink drawing to shader based drawing.
Clément Foucault [Thu, 5 Apr 2018 13:41:17 +0000 (15:41 +0200)]
UI: Node Editor: Port nodelink drawing to shader based drawing.

Use the new GPU_SHADER_2D_NODELINK and GPU_SHADER_2D_NODELINK_INST to
accelerate nodelink drawing.

This commit does not include the batching functionnality. So this should
not make a lot of difference.

2 years agoGWN: Add GWN_batch_uniform_2fv_array.
Clément Foucault [Thu, 5 Apr 2018 13:37:02 +0000 (15:37 +0200)]
GWN: Add GWN_batch_uniform_2fv_array.

2 years agoGPUBatch: Change preset managment system.
Clément Foucault [Thu, 5 Apr 2018 13:36:38 +0000 (15:36 +0200)]
GPUBatch: Change preset managment system.

Now use a list of preset batches with a function to add new ones to this
list.

This removes the need of new functions all over the place to reset/exit.

2 years agoGPUShader: Add 2D Nodelink shader.
Clément Foucault [Thu, 5 Apr 2018 13:27:53 +0000 (15:27 +0200)]
GPUShader: Add 2D Nodelink shader.

Special shader to draw nodelinks for the node editor.

We only pass bezier points to the GPU and vertex position is handled inside
the vertex shader.
The arrow is also part of the batch to avoid separate drawcalls for it.

We still draw 2 pass one for shadow and one for the link color on top.

One variation to draw instances of theses links so that we only do one
drawcall.

2 years agoUndo: split text undo steps out of the data-block
Campbell Barton [Thu, 5 Apr 2018 13:22:33 +0000 (15:22 +0200)]
Undo: split text undo steps out of the data-block

This moves undo storage into a separate struct which is passed
in from the undo system.

2 years agoUndo System: return undo step from undo push init
Campbell Barton [Thu, 5 Apr 2018 12:11:51 +0000 (14:11 +0200)]
Undo System: return undo step from undo push init

Also improve logging

2 years agoLogging: use -1 log level to log all levels
Campbell Barton [Thu, 5 Apr 2018 11:55:04 +0000 (13:55 +0200)]
Logging: use -1 log level to log all levels

2 years agoED_undo: use logging
Campbell Barton [Thu, 5 Apr 2018 11:41:52 +0000 (13:41 +0200)]
ED_undo: use logging

2 years agoFix crash w/ empty text undo operations
Campbell Barton [Thu, 5 Apr 2018 07:59:21 +0000 (09:59 +0200)]
Fix crash w/ empty text undo operations

2 years agoFix Cycles motion blur and engine.frame_set() not working.
Brecht Van Lommel [Wed, 4 Apr 2018 11:51:39 +0000 (13:51 +0200)]
Fix Cycles motion blur and engine.frame_set() not working.

2 years agoDepsgraph: Fix/workaround crash with animation and drivers and CoW
Sergey Sharybin [Wed, 4 Apr 2018 15:28:23 +0000 (17:28 +0200)]
Depsgraph: Fix/workaround crash with animation and drivers and CoW

The issue was caused by component tag forcing CoW component to be run,
without actually flushing changes down the road from the CoW operation.

In a way, this is what we want: we do want CoW to run on changes, but
we don't want tiny change forcing full datablock update.

This commit makes it so order of updates is all correct, but the bigger
issue is still open: what parts of datablock CoW should be updating?

Now it's possible to open spring file and play around.

2 years agoGawain: Make removing batches more thread safe
Sergey Sharybin [Wed, 4 Apr 2018 15:24:57 +0000 (17:24 +0200)]
Gawain: Make removing batches more thread safe

The issue was mainly visible when copy-on-write was enabled. This was forcing
lots of meshes to be freed from multiple thread, causing all sorts of race
conditions in Gawain's VAO code.

OpenGL resources seems already to be doing deferred deletion, need to do the
same for CPU side arrays.

2 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Wed, 4 Apr 2018 13:03:55 +0000 (15:03 +0200)]
Merge branch 'master' into blender2.8

Conflicts:
source/blender/blenkernel/BKE_object.h

2 years agoFix modifier freeing code re. ID refcounting.
Bastien Montagne [Wed, 4 Apr 2018 12:56:32 +0000 (14:56 +0200)]
Fix modifier freeing code re. ID refcounting.

Free code should not handle ID refcounting at all. This has to be done
at higher level, since in some case we want to free (temp) data that
actually did not refcount at all its IDs.

This change seems to be working OK, but as usual in that area, only
lots of testing in real-case situation will say whether there are some
hidden bugs or not.

2 years agoFix Cycles particle info node not working.
Brecht Van Lommel [Wed, 4 Apr 2018 11:16:56 +0000 (13:16 +0200)]
Fix Cycles particle info node not working.

2 years agoDepsgraph: Cleanup, reduce indentation level
Sergey Sharybin [Wed, 4 Apr 2018 11:02:28 +0000 (13:02 +0200)]
Depsgraph: Cleanup, reduce indentation level

2 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 4 Apr 2018 10:57:36 +0000 (12:57 +0200)]
Merge branch 'master' into blender2.8

2 years agoDepsgraph: Make sure textures used by modifiers are in the graph
Sergey Sharybin [Wed, 4 Apr 2018 10:55:38 +0000 (12:55 +0200)]
Depsgraph: Make sure textures used by modifiers are in the graph

2 years agoProper fix for T54337
Mai Lavelle [Wed, 4 Apr 2018 10:32:39 +0000 (06:32 -0400)]
Proper fix for T54337

Accidentally checked the wrong variable in fa01a1738bd1e3a6750ff.

2 years agoFix undefined workspace in UI script
Sergey Sharybin [Wed, 4 Apr 2018 10:33:00 +0000 (12:33 +0200)]
Fix undefined workspace in UI script

2 years agoFix Eevee crash with generated coordinates on non-objects.
Brecht Van Lommel [Wed, 4 Apr 2018 10:26:57 +0000 (12:26 +0200)]
Fix Eevee crash with generated coordinates on non-objects.

2 years agoCleanup: simplify fix for T53497, this part is not strictly needed.
Brecht Van Lommel [Wed, 4 Apr 2018 10:15:27 +0000 (12:15 +0200)]
Cleanup: simplify fix for T53497, this part is not strictly needed.

2 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Wed, 4 Apr 2018 10:00:57 +0000 (12:00 +0200)]
Merge branch 'master' into blender2.8

Conflicts:
source/blender/blenloader/intern/readfile.c

2 years agoTweak ID->tag reset on file load (no visible change expected!).
Bastien Montagne [Wed, 4 Apr 2018 09:56:35 +0000 (11:56 +0200)]
Tweak ID->tag reset on file load (no visible change expected!).

Issue was, *some* IDs (like infamous nodetrees from materials etc.)
would not go through the 'main' read_libblock() func, so their tags were
never reset.

So now, we ensure direct_link_id() always clear the tags, and move
setting them in read_libblock() after the call to direct_link_id().

Needed for depsgraph, but general healthier fix actually.

2 years agoDepsgraph: Get pchan index from correct pose
Sergey Sharybin [Wed, 4 Apr 2018 09:55:06 +0000 (11:55 +0200)]
Depsgraph: Get pchan index from correct pose

This code should be replaced with evaluation-time ID block expansion,
but before that it will be helpful to get old design to work again.

2 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 4 Apr 2018 09:49:24 +0000 (11:49 +0200)]
Merge branch 'master' into blender2.8

2 years agoDepsgraph: Ensure root pchan is always found
Sergey Sharybin [Wed, 4 Apr 2018 09:49:01 +0000 (11:49 +0200)]
Depsgraph: Ensure root pchan is always found

2 years agoDepsgraph: Pass CoW version of object to armature update done
Sergey Sharybin [Wed, 4 Apr 2018 09:47:09 +0000 (11:47 +0200)]
Depsgraph: Pass CoW version of object to armature update done

2 years agoFix part of T53497: Eevee stuttering on macOS for the first few seconds of usage.
Brecht Van Lommel [Wed, 4 Apr 2018 09:13:13 +0000 (11:13 +0200)]
Fix part of T53497: Eevee stuttering on macOS for the first few seconds of usage.

The problem was that textures were assigned to different slots on different draw
calls, which caused shader specialization/patching by the driver. So the shader
would be compiled over and over until all possible assignments were used.

2 years agoFix missing hair in fishycat and everything else after particle recalc changes
Mai Lavelle [Sat, 31 Mar 2018 06:19:52 +0000 (02:19 -0400)]
Fix missing hair in fishycat and everything else after particle recalc changes

The cache was getting reset always, due to special case of flag being 0.

Bug introduced by: 44cd24a9cee9ffb14b5d26a622f

2 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 4 Apr 2018 08:36:39 +0000 (10:36 +0200)]
Merge branch 'master' into blender2.8

2 years agoDepsgraph: Assert that pchan index is always valid
Sergey Sharybin [Wed, 4 Apr 2018 08:35:32 +0000 (10:35 +0200)]
Depsgraph: Assert that pchan index is always valid

2 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 4 Apr 2018 08:16:38 +0000 (10:16 +0200)]
Merge branch 'master' into blender2.8

2 years agoDepsgraph: Add missing expansion od custom bone shapes
Sergey Sharybin [Wed, 4 Apr 2018 08:15:45 +0000 (10:15 +0200)]
Depsgraph: Add missing expansion od custom bone shapes

This was fixed in 2.8 branch but not in master.

2 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 4 Apr 2018 07:54:50 +0000 (09:54 +0200)]
Merge branch 'master' into blender2.8

2 years agoDepsgraph: Only bind ID-data and indices to depsgraph callbacks
Sergey Sharybin [Tue, 3 Apr 2018 15:23:43 +0000 (17:23 +0200)]
Depsgraph: Only bind ID-data and indices to depsgraph callbacks

This is a part of copy-on-write sanitization, to avoid all the checks
which were attempting to keep sub-data pointers intact.

Point is: ID pointers never change for CoW datablocks, but nested
data pointers might change when updating existing copy.

Solution: Only bind ID data pointers and index of sub-data.
This will make CoW datablock 7update function was easier in 2.8.

In master we were only using pose channel pointers in callbacks,
this is exactly what this commit addresses. A linear lookup array
is created on pose evaluation init and is thrown away afterwards.

One thing we might consider doing is to keep indexed array of
poses, similar to chanhash.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Subscribers: dfelinto

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

2 years agoFix T54337: Cycles crash with simple subd object in debug build
Mai Lavelle [Wed, 4 Apr 2018 03:36:35 +0000 (23:36 -0400)]
Fix T54337: Cycles crash with simple subd object in debug build

2 years agoFix T54400: Some GCN 1 cards available to select for use with Cycles
Mai Lavelle [Wed, 4 Apr 2018 03:09:38 +0000 (23:09 -0400)]
Fix T54400: Some GCN 1 cards available to select for use with Cycles

Hainan was missing from the list of GCN 1 cards.

2 years agoBMesh: remove redundant loop in select-next-active
Campbell Barton [Tue, 3 Apr 2018 16:32:55 +0000 (18:32 +0200)]
BMesh: remove redundant loop in select-next-active

Thanks to @nBurn for spotting

2 years agoMissed in last merge
Campbell Barton [Tue, 3 Apr 2018 16:22:52 +0000 (18:22 +0200)]
Missed in last merge

2 years agoMissed in last merge
Campbell Barton [Tue, 3 Apr 2018 16:22:05 +0000 (18:22 +0200)]
Missed in last merge

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Tue, 3 Apr 2018 16:12:39 +0000 (18:12 +0200)]
Merge branch 'master' into blender2.8

2 years agoUndo: make id-map use binary search to keep sorted
Campbell Barton [Tue, 3 Apr 2018 16:07:51 +0000 (18:07 +0200)]
Undo: make id-map use binary search to keep sorted