21 months agoFix T54766: "Record With"-NLA "Push Down" discards Blend Mode, Extrapolation, and...
Joshua Leung [Mon, 23 Apr 2018 10:35:37 +0000 (12:35 +0200)]
Fix T54766: "Record With"-NLA "Push Down" discards Blend Mode, Extrapolation, and Influence

Applied similar fix to T54233 to get the "Record with NLA" feature working with
active action blending + influence settings. Extrapolation is explicitly ignored
though, as it shouldn't be used with this feature (i.e. it is already disabled
with the new strips and also on the animdata by default)

21 months agoDepsgraph: Add missing relations builder
Sergey Sharybin [Mon, 23 Apr 2018 07:33:33 +0000 (09:33 +0200)]
Depsgraph: Add missing relations builder

Was possible to miss some relations from being built
when parent object is linked to the scene graph indirectly.

21 months agoCleanup: UI naming
Campbell Barton [Sun, 22 Apr 2018 17:22:10 +0000 (19:22 +0200)]
Cleanup: UI naming

21 months agoCleanup: de-dup popup/pie menu RNA definition
Campbell Barton [Sun, 22 Apr 2018 08:49:45 +0000 (10:49 +0200)]
Cleanup: de-dup popup/pie menu RNA definition

Also rename pupmenu -> popmenu

22 months agoCleanup: variable naming
Campbell Barton [Sat, 21 Apr 2018 18:22:12 +0000 (20:22 +0200)]
Cleanup: variable naming

22 months agoBLI_bitmap: 2D triangle drawing function
Campbell Barton [Sat, 21 Apr 2018 16:34:34 +0000 (18:34 +0200)]
BLI_bitmap: 2D triangle drawing function

Matching polygon filling but no need for allocation or qsort.

22 months agoBLI math: clamped barycentric weight calculation
Campbell Barton [Sat, 21 Apr 2018 16:34:20 +0000 (18:34 +0200)]
BLI math: clamped barycentric weight calculation

22 months agoFix: D3160 fixed blednerplayer stub.s for unix
Gaia Clary [Fri, 20 Apr 2018 21:34:54 +0000 (23:34 +0200)]
Fix: D3160 fixed blednerplayer stub.s for unix

22 months agoCleanup (followup commit for D3160)
Gaia Clary [Fri, 20 Apr 2018 13:09:56 +0000 (15:09 +0200)]
Cleanup (followup commit for D3160)

Added some spaces to keep the eInsertKeyFlags enumeration proper

22 months agoFix: D3160 Propose to use proper typedefs to avoid confusion
Gaia Clary [Wed, 18 Apr 2018 16:21:27 +0000 (18:21 +0200)]
Fix: D3160 Propose to use proper typedefs to avoid confusion

Differential Revision:

22 months agoFix usage of lib filepath in previous own commit...
Bastien Montagne [Fri, 20 Apr 2018 09:00:12 +0000 (11:00 +0200)]
Fix usage of lib filepath in previous own commit...

22 months agoAdd debug tool to check validity of current file *before* saving.
Bastien Montagne [Wed, 18 Apr 2018 16:22:18 +0000 (18:22 +0200)]
Add debug tool to check validity of current file *before* saving.

It is hidden behind the --debug-io flag for now.

Idea is to try to catch broken libraries state in current Main before we
actually write the file on disk, should help catching and understanding
what happens in Spring corruption cases.

22 months agoVSE Effects: Wipe box: fix compilation errors
Aaron Carlisle [Thu, 19 Apr 2018 22:41:06 +0000 (18:41 -0400)]
VSE Effects: Wipe box: fix compilation errors

This is still broken I cant tell if it is the fact that the in_band
funtion does not work properally or an issue in the box algorithm, or

It seems like the calculation of the size of the box while roatated
needs to be fixed also.

22 months agoCleanup: make variable name English
Campbell Barton [Thu, 19 Apr 2018 16:10:51 +0000 (18:10 +0200)]
Cleanup: make variable name English

22 months agoCleanup: rename vlak -> poly
Campbell Barton [Thu, 19 Apr 2018 16:08:55 +0000 (18:08 +0200)]
Cleanup: rename vlak -> poly

22 months agoCleanup: rename Icon.type -> id_type
Campbell Barton [Thu, 19 Apr 2018 10:52:32 +0000 (12:52 +0200)]
Cleanup: rename Icon.type -> id_type

Confusing when adding non-id icons.

22 months agoPort particle instance modifier changes from Gooseberry branch
Sergey Sharybin [Wed, 18 Apr 2018 10:14:28 +0000 (12:14 +0200)]
Port particle instance modifier changes from Gooseberry branch

The work is mainly from Lukas Toenne, with some modifications from myself.

Includes following obvious changes:

- Particle system selection is now name-based, with lookup menu.
- Lots of new options to control varieties.

Changes comparing to the Gooseberry branch:

- Default values and versioning code ensures same behavior as the
  old modifier.

- Custom data layers are coming from vertex color, the modifier
  does not create arbitrary layers now. The hope is to keep data
  more manageable, and maybe make it easier to select in the shader
  later on.

  This means, values are quantized to 256 values, but it should be
  enough to get varieties in practice.

Reviewers: brecht, campbellbarton

Reviewed By: brecht

Subscribers: eyecandy

Differential Revision:

22 months agoCleanup: style
Campbell Barton [Thu, 19 Apr 2018 06:18:16 +0000 (08:18 +0200)]
Cleanup: style

22 months agoUndo: add missing flag for text delete
Campbell Barton [Thu, 19 Apr 2018 06:16:37 +0000 (08:16 +0200)]
Undo: add missing flag for text delete

22 months agoDepsgraph: Fix missinf relation for particle instance modifier
Sergey Sharybin [Wed, 18 Apr 2018 11:54:02 +0000 (13:54 +0200)]
Depsgraph: Fix missinf relation for particle instance modifier

Was causing lack of animation update when particle system had simulation,

22 months agoCleanup: Trailing whitespace
Sergey Sharybin [Wed, 18 Apr 2018 10:04:58 +0000 (12:04 +0200)]
Cleanup: Trailing whitespace

22 months agoRemove irrelevant print statement
Sybren A. Stüvel [Wed, 18 Apr 2018 10:22:58 +0000 (12:22 +0200)]
Remove irrelevant print statement

This statement is only relevant in 2.8, but causes confusion in master.
I kept the 'default' label to prevent compiler warnings about unhandled
cases. The break is needed because there should be at least one statement
after 'default'.

22 months agoParticles: Interpolate size for interpolated children
Sergey Sharybin [Wed, 18 Apr 2018 08:52:27 +0000 (10:52 +0200)]
Particles: Interpolate size for interpolated children

This finally allows us to use Random factor to add variations to the
interpolated children. This feature never worked since 2007L there was
random factor slider in the interface, but it was only used by simple
children. Now it has affect on interpolated children as well.

Technically, this will break compatibility if older file had random
factor set to something else than 0 (default value is 0 though). But
we are leaving 2.7 series, so can accept such breackage in the name
of supported features.

22 months agoFix makesdna not respecting C++ comments
Julian Eisel [Tue, 17 Apr 2018 22:29:53 +0000 (00:29 +0200)]
Fix makesdna not respecting C++ comments

Tab after C++ comment broke parsing and didn't remove the line at all.
Was there since 2002 at least, probably confused some peeps.

This means commented out code was actually written to SDNA.

22 months agobpy consistency fix handler_add(handle)
Dalai Felinto [Tue, 17 Apr 2018 10:29:24 +0000 (12:29 +0200)]
bpy consistency fix handler_add(handle)

This doesn't change the API, so it doesn't affect any script.
However it give more consistent error messages.

22 months agobpy blf api example update
Dalai Felinto [Tue, 17 Apr 2018 10:25:51 +0000 (12:25 +0200)]
bpy blf api example update

With changes from Campbell Barton as well.

22 months agoFix (unreported) RNA sometimes trying to get named sub-props from non-Group IDProp.
Bastien Montagne [Tue, 17 Apr 2018 09:59:14 +0000 (11:59 +0200)]
Fix (unreported) RNA sometimes trying to get named sub-props from non-Group IDProp.

Why exactly this happens remains unclear, found that in the
autumn.blenrig file of Spring production while working on static
overrides... Tons of ugly IDProps in that rig. xD

22 months agoCleanup: indentation
Campbell Barton [Mon, 16 Apr 2018 16:13:48 +0000 (18:13 +0200)]
Cleanup: indentation

22 months agoCleanup: indentation
Campbell Barton [Mon, 16 Apr 2018 15:16:29 +0000 (17:16 +0200)]
Cleanup: indentation

22 months agoCleanup: indentation
Campbell Barton [Mon, 16 Apr 2018 15:08:27 +0000 (17:08 +0200)]
Cleanup: indentation

22 months agoBKE_context: macro to access ID's while looping
Campbell Barton [Mon, 16 Apr 2018 14:19:16 +0000 (16:19 +0200)]
BKE_context: macro to access ID's while looping

22 months agoDepsgraph: Pull indirect relations via driver targets
Sergey Sharybin [Mon, 16 Apr 2018 14:12:15 +0000 (16:12 +0200)]
Depsgraph: Pull indirect relations via driver targets

22 months agoMake ID icons safe for deletion from threads
Sergey Sharybin [Fri, 13 Apr 2018 11:52:37 +0000 (13:52 +0200)]
Make ID icons safe for deletion from threads

Added a lock-free deferred queue for deletion. Now if ID icon
is requested to be freed from non-main thread, it will be added
to the deferred list. Actual deletion will happen later from main

Currently actual deletion only happens next time BKE_icon_id_delete()
is called, which might not be enough. But it's easy to enforce
deferred deletion.

Icons for preview images are not covered by deferred deletion yet.

Reviewers: mont29

Differential Revision:

22 months agoAdded lock-free single linked list implementation
Sergey Sharybin [Fri, 13 Apr 2018 11:31:55 +0000 (13:31 +0200)]
Added lock-free single linked list implementation

Only supports lock-free insertion for now, can not delete element
or traverse the list at the same time.

22 months agoDisable Feature Collada: Tests do not work on unix
Gaia Clary [Mon, 16 Apr 2018 07:55:05 +0000 (09:55 +0200)]
Disable Feature Collada: Tests do not work on unix

The tests as they are now make string comparisons. This only works
on Windows because the reference files look different for different
operating systems because of different number formatting.
The collada tests need a complete rework (wip)

22 months agoLogging: edits to build on macOS
Campbell Barton [Mon, 16 Apr 2018 05:38:11 +0000 (07:38 +0200)]
Logging: edits to build on macOS

22 months agoCleanup: skip redundant edit-bone select lookups
Campbell Barton [Sun, 15 Apr 2018 19:45:19 +0000 (21:45 +0200)]
Cleanup: skip redundant edit-bone select lookups

22 months agoPydoc: Fix multiple bpy.type modules
Aaron Carlisle [Sun, 15 Apr 2018 15:42:52 +0000 (11:42 -0400)]
Pydoc: Fix multiple bpy.type modules

22 months agoCleanup: remove redundant args from ebone picking
Campbell Barton [Sun, 15 Apr 2018 10:45:39 +0000 (12:45 +0200)]
Cleanup: remove redundant args from ebone picking

Make this match editmesh picking more closely

22 months agoCleanup: remove bad casts
Campbell Barton [Sun, 15 Apr 2018 09:57:49 +0000 (11:57 +0200)]
Cleanup: remove bad casts

22 months agoCleanup: ED_armature naming
Campbell Barton [Sun, 15 Apr 2018 09:45:51 +0000 (11:45 +0200)]
Cleanup: ED_armature naming

- Wasn't clear which functions handle edit-bones.
- Mixed both ebone and edit_bone in names.
- Didn't use ED_armature_* prefix for public API.

See P655 to apply to branches.

22 months agoCleanup: remove undoing access, minor formatting
Campbell Barton [Sun, 15 Apr 2018 08:48:50 +0000 (10:48 +0200)]
Cleanup: remove undoing access, minor formatting

Access to undoing state isn't needed,
some text insert code was overly compacted.

22 months agoFix T54593: Py text edits crash (undo regression)
Campbell Barton [Sun, 15 Apr 2018 08:34:41 +0000 (10:34 +0200)]
Fix T54593: Py text edits crash (undo regression)

22 months agoFix compiler error in Windows
Antonio Vazquez [Sat, 14 Apr 2018 14:24:06 +0000 (16:24 +0200)]
Fix compiler error in Windows

22 months agoFix T54527: Misleading Tooltip on Snap Target Menu
Aaron Carlisle [Sat, 14 Apr 2018 22:26:27 +0000 (18:26 -0400)]
Fix T54527: Misleading Tooltip on Snap Target Menu

22 months agoPydocs: Expand bge.contraint docs
Aaron Carlisle [Thu, 29 Mar 2018 22:18:04 +0000 (18:18 -0400)]
Pydocs: Expand bge.contraint docs

Takes information from the manual and dumps it here.

22 months agoCleanup: style
Campbell Barton [Sat, 14 Apr 2018 20:26:12 +0000 (22:26 +0200)]
Cleanup: style

22 months agoCleanup: use const for BKE_object args
Campbell Barton [Sat, 14 Apr 2018 12:27:38 +0000 (14:27 +0200)]
Cleanup: use const for BKE_object args

22 months agoLogging: replace 'fwrite' w/ 'write'
Campbell Barton [Sat, 14 Apr 2018 11:59:33 +0000 (13:59 +0200)]
Logging: replace 'fwrite' w/ 'write'

We're already buffing output, so use write directly.

22 months agoCleanup: rename WriteData struct members.
Campbell Barton [Sat, 14 Apr 2018 11:17:11 +0000 (13:17 +0200)]
Cleanup: rename WriteData struct members.

Relationship between tot/count/buf wasn't clear.

Also use doxy sections.

22 months agoUndo: refactor memfile writing
Campbell Barton [Sat, 14 Apr 2018 10:33:19 +0000 (12:33 +0200)]
Undo: refactor memfile writing

- Move static undo variable into 'WriteData',
  'memfile_chunk_add' used arguments in a confusing way,
  sometimes to set/clear static var.

- Replace checks for 'wd->current' with 'wd->use_memfile'
  move memfile vars into 'wd->mem' struct.

22 months agoFix T54568: Undo memory de-duplication failed
Campbell Barton [Sat, 14 Apr 2018 10:30:14 +0000 (12:30 +0200)]
Fix T54568: Undo memory de-duplication failed

Error in 651b8fb14e caused de-duplication to fail.

22 months agoRemove editor type selector from File Browser when in 'Operator' mode.
Bastien Montagne [Fri, 13 Apr 2018 10:11:56 +0000 (12:11 +0200)]
Remove editor type selector from File Browser when in 'Operator' mode.

Having that one when opening a file or loading some lib makes absolutely
no sense, and switching that 'temp' editor to some other type can
trigger all kind of funny bugs...

Note that using the shortcuts keys (Shift-F5 etc.) is still possible,
removing those seems a bit more involved. :/

22 months agoFix: Follow up to 16b795cb95c
Joshua Leung [Thu, 12 Apr 2018 13:42:55 +0000 (15:42 +0200)]
Fix: Follow up to 16b795cb95c

It's not just the Graph Editor that needed this - the NLA also uses similar code
and thus suffers from a similar problem.

(My first commit from the Blender Institute v2.0 - Just testing that everything works)

22 months agoMoved vectorblur code from render to compositor
Jeroen Bakker [Thu, 12 Apr 2018 08:27:38 +0000 (10:27 +0200)]
Moved vectorblur code from render to compositor

In preparation of the removal of blender internal render we
moved the vectorblur code that was placed in the render package
(legacy) to the compositor. The compositor is only using this
code even the blender internal renderer did not use the code at

22 months agoChanged assertion of '..' in file browser entries
Sybren A. Stüvel [Wed, 11 Apr 2018 13:06:42 +0000 (15:06 +0200)]
Changed assertion of '..' in file browser entries

The previous assert assumed '..' is always there, which isn't necessarily
true (for example when in the root of an Asset Engine repository).

The new code asserts that if '..' is present it should be the first entry
(rather than forcing the first entry to be '..').

22 months agofix T54549: Vector Transform node in wrong nodeclass
Philipp Oeser [Tue, 10 Apr 2018 07:50:25 +0000 (09:50 +0200)]
fix T54549: Vector Transform node in wrong nodeclass

the Vector Transform node was added to the "Vector" category in
but was using the "NODE_CLASS_CONVERTOR" internally (thus using e.g. the
'wrong' theme color)

thanx @dingto for review

Differential Revision:

22 months agoPose Mode: pass object to mode enter/exit
Campbell Barton [Wed, 11 Apr 2018 07:20:29 +0000 (09:20 +0200)]
Pose Mode: pass object to mode enter/exit

Also add lower level mode exit function

22 months agoCleanup: minor changes to pose-mode switching API
Campbell Barton [Wed, 11 Apr 2018 06:53:59 +0000 (08:53 +0200)]
Cleanup: minor changes to pose-mode switching API

Prepare for multi-object pose mode

22 months agoCleanup: remove unused flag
Campbell Barton [Tue, 10 Apr 2018 18:13:31 +0000 (20:13 +0200)]
Cleanup: remove unused flag

22 months agoFix transform nearest axis check
Campbell Barton [Tue, 10 Apr 2018 14:13:32 +0000 (16:13 +0200)]
Fix transform nearest axis check

Was mixing up global/local coords

22 months agoDepsgraph: Build relations for objects linked via pchan constraints
Sergey Sharybin [Tue, 10 Apr 2018 09:56:20 +0000 (11:56 +0200)]
Depsgraph: Build relations for objects linked via pchan constraints

This is similar to previous fix for missing ID nodes, just the original
fix missed this part of change because it looked like it is already

22 months agoFix T54423: Messages from RNA_property_editable_info() were not translatable.
Bastien Montagne [Tue, 10 Apr 2018 08:22:40 +0000 (10:22 +0200)]
Fix T54423: Messages from RNA_property_editable_info() were not translatable.

22 months agoDepsgraph: Flush debug prints
Sergey Sharybin [Tue, 10 Apr 2018 07:54:27 +0000 (09:54 +0200)]
Depsgraph: Flush debug prints

Makes it more reliable to see what was updating last when
crash happens.

22 months agoFix crash in graph editor id remapping
Mai Lavelle [Tue, 10 Apr 2018 01:39:10 +0000 (21:39 -0400)]
Fix crash in graph editor id remapping

Dopsheet pointer isn't set...?

22 months agoFix invalid context when refreshing popups
Julian Eisel [Mon, 9 Apr 2018 17:24:31 +0000 (19:24 +0200)]
Fix invalid context when refreshing popups

Patch D2759 by @raa, with minor edits by me.

22 months agoCleanup: unused variable
Campbell Barton [Mon, 9 Apr 2018 17:01:31 +0000 (19:01 +0200)]
Cleanup: unused variable

22 months agoUI: Clamp scrollbar offset to lower view boundaries
Julian Eisel [Mon, 9 Apr 2018 16:52:03 +0000 (18:52 +0200)]
UI: Clamp scrollbar offset to lower view boundaries

Fixes the "emtpy scrolling" glitch by clamping the scroller offset to
the boundary of the view when it's smaller than the previous.

Fixes T45197. Patch by @januz.

Differential Revision: D1580

22 months agoUse the newer version of the bullet 6dof spring constraint for rigidbody.
Alexander Gavrilov [Sat, 31 Mar 2018 09:08:16 +0000 (12:08 +0300)]
Use the newer version of the bullet 6dof spring constraint for rigidbody.

The new constraint is slower and not backward compatible, but should
be better, especially in the damping side. The new constraint also
has a different valid range of the damping coefficient, and a limit
implementation that bounces instead of making the object stationary.

Reviewers: sergof

Differential Revision:

22 months agoAdded support for the WEBM/VP9 video codec
Sybren A. Stüvel [Mon, 9 Apr 2018 13:27:11 +0000 (15:27 +0200)]
Added support for the WEBM/VP9 video codec

WEBM is the codec name, and VP9 is the encoder (the older encoder "VP8"
is less efficient than VP9).

WEBM/VP9 and h.264 both have options to control the file size versus
compression time (e.g. fast but big, or slow and small, for the same
output quality). Since WEBM/VP9 only has three choices, I've chosen to
map those to 3 of the 9 possible choices of h.264:


The VERYSLOW and ULTRAFAST options give very little extra benefit.

Reviewed by: @Severin

22 months agoRemove commented-out code
Sybren A. Stüvel [Mon, 9 Apr 2018 10:47:20 +0000 (12:47 +0200)]
Remove commented-out code

22 months agoBuild: fix make deps using system webp/sndio libs.
Brecht Van Lommel [Mon, 9 Apr 2018 13:06:33 +0000 (15:06 +0200)]
Build: fix make deps using system webp/sndio libs.

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

22 months 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

22 months 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

22 months 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

22 months 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

22 months 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

22 months 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.

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

22 months 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

22 months 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

22 months 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

22 months 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

22 months 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.

22 months 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:

Reviewed by: @campbellbarton

22 months 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:

Reviewed by: @campbellbarton

22 months 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

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:

Reviewed by: @campbellbarton

22 months 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
- Use `IMB_metadata_ensure()` instead of having
  `IMB_metadata_set_field()` create the containing `IDProperty` for
- 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:

Reviewed by: @campbellbarton

22 months 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

22 months 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.

22 months 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

22 months 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

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

22 months 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

22 months 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.

22 months 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

22 months 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.

22 months 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.

22 months 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