blender.git
5 years agoCycles: Add an option to build single kernel only which fits current CPU
Sergey Sharybin [Fri, 25 Mar 2016 15:09:05 +0000 (16:09 +0100)]
Cycles: Add an option to build single kernel only which fits current CPU

This seems quite useful for the development, so you don't need to wait
all the kernels to be re-compiled when working on a new feature, which
speeds up re-iteration.

Marked as an advanced option, so if it doesn't work so well in practice
it's safe to revert anyway.

5 years agoCycles: Cleanup, indent nested preprocessor directives
Sergey Sharybin [Fri, 12 Feb 2016 17:33:43 +0000 (18:33 +0100)]
Cycles: Cleanup, indent nested preprocessor directives

Quite straightforward, main trick is happening in path_source_replace_includes().

Reviewers: brecht, dingto, lukasstockner97, juicyfruit

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

5 years agoCycles: Use dedicated BVH for subsurface ray casting
Sergey Sharybin [Thu, 25 Feb 2016 14:12:11 +0000 (15:12 +0100)]
Cycles: Use dedicated BVH for subsurface ray casting

This commit makes it so casting subsurface rays will totally ignore all
the BVH nodes and primitives which do not belong to a current object,
making it much simpler traversal code and reduces number of intersection
tests.

Reviewers: brecht, juicyfruit, dingto, lukasstockner97

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

5 years agoFix T47928: Crashing save corruption with dynamic paint drip effector groups.
Bastien Montagne [Fri, 25 Mar 2016 12:15:50 +0000 (13:15 +0100)]
Fix T47928: Crashing save corruption with dynamic paint drip effector groups.

Dynapaint's `foreachIDLink` was mnot handling effector_weights->group pointer...

5 years agoFix modal bevel OP immediately stopping when called using enter key from search menu
Julian Eisel [Fri, 25 Mar 2016 11:21:54 +0000 (12:21 +0100)]
Fix modal bevel OP immediately stopping when called using enter key from search menu

Steps to reproduce were:
* Go to edit mode, select geometry
* Spacebar -> search for bevel OP
* Activate *using enter key*
* Immediately stops when releasing enter key

To fix we simply make sure the initial release event is ignored. For mouse events that wasn't an issue since activating an element is done on key release in menus. An alternative fix would be to do the same for enter key, but that's more risky. Also, checking event value is highly recommended anyway.

5 years agoRevert "Fix T47263: numpad4/6 rotates around worl Z axis and not view Y axis."
Bastien Montagne [Fri, 25 Mar 2016 11:09:59 +0000 (12:09 +0100)]
Revert "Fix T47263: numpad4/6 rotates around worl Z axis and not view Y axis."

This reverts commit fe0ca82b232dcab29030c4a20b8bd1b033d1d346.

This is a design issue, needs more thinking, for now just revert back to old behavior.

5 years agoCMake: Disable Cycles OSL for the light configuration
Sergey Sharybin [Fri, 25 Mar 2016 10:27:08 +0000 (11:27 +0100)]
CMake: Disable Cycles OSL for the light configuration

While it was indirectly disabled already, it's handy to use the config
as template and enable certain features. In case of Cycles enabling it
would also enable OSL which is not very expected.

5 years agoUI: Presets for scene units
Campbell Barton [Thu, 24 Mar 2016 18:01:15 +0000 (05:01 +1100)]
UI: Presets for scene units

This adds simple preset menu for unit scale scene property.

D1799 by @alm

5 years agoMake IDPreview handling code use new recursive libquery looper.
Bastien Montagne [Thu, 24 Mar 2016 15:10:05 +0000 (16:10 +0100)]
Make IDPreview handling code use new recursive libquery looper.

5 years agoRework library_query foreach looper - add optional recursivity.
Bastien Montagne [Thu, 24 Mar 2016 11:28:41 +0000 (12:28 +0100)]
Rework library_query foreach looper - add optional recursivity.

This commit:
* Fixes bad handling of 'stop iteration' (by adding a status flag, so that we can actually
  stop in helper functions too, and jumping to a finalize label instead of raw return, to
  allow propper clean up).
* Adds optional recursion into 'ID tree' - callback can also decide to exclude current id_pp
  from recursion. Note that this implies 'readonly', modifying IDs while recursing is not
  something we want to support!
* Changes callback signature/expected behavior: return behavior is now handled through flags,
  and 'parent' ID of id_pp is also passed (since it may not always be root id anymore).

Reviewers: sergey, campbellbarton

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

5 years agoCycles: Minor optimization of equirectangular projection
Sergey Sharybin [Thu, 24 Mar 2016 14:00:09 +0000 (15:00 +0100)]
Cycles: Minor optimization of equirectangular projection

Don't calculate sine twice, store this in a variable instead.

Perhaps compilers can optimize this out, but helping them a but wouldn't hurt.

5 years agoUI: search operator's by word prefix
Campbell Barton [Thu, 24 Mar 2016 12:28:46 +0000 (23:28 +1100)]
UI: search operator's by word prefix

Would match middle of words which wasn't very useful in most cases.

5 years agoFix BLI_strncasestr use with a single character
Campbell Barton [Thu, 24 Mar 2016 12:17:43 +0000 (23:17 +1100)]
Fix BLI_strncasestr use with a single character

5 years agoColor sources for point density textures based on mesh vertices
Lukas Tönne [Thu, 24 Mar 2016 10:41:44 +0000 (11:41 +0100)]
Color sources for point density textures based on mesh vertices

This patch adds support for coloring point density textures based on several mesh vertex attributes.

* Vertex Color: Use a vertex color layer for coloring the point density texture
* Vertex Weight: Use a weights from a vertex group as intensity values. (for Blender Render engine the additional color band is used)
* Vertex Normals: Use object-space vertex normals as RGB values.

The vertex color source enum is stored separately from the particle color source, to avoid invalid values when switching.

Note that vertex colors are technically "corner colors" (MLoop), so each vertex can have as many colors as faces it is part of.
For the purpose of point density the mloop colors are simply averaged, which is physically plausible because corners can be viewed
as multiple points in the same location.

5 years agoFix some typos and incorrect tooltips/descriptions
Joshua Leung [Thu, 24 Mar 2016 10:13:46 +0000 (23:13 +1300)]
Fix some typos and incorrect tooltips/descriptions

5 years agoFix T47910: Knife project fails
Campbell Barton [Thu, 24 Mar 2016 07:27:39 +0000 (18:27 +1100)]
Fix T47910: Knife project fails

Regression in fix for T43896, using screen-space precision here is very problematic,
using lower precision here works for both reports.

5 years agoCleanup: use prefix for return args
Campbell Barton [Thu, 24 Mar 2016 07:05:10 +0000 (18:05 +1100)]
Cleanup: use prefix for return args

5 years agoFix incorrect arg type
Campbell Barton [Thu, 24 Mar 2016 06:56:30 +0000 (17:56 +1100)]
Fix incorrect arg type

5 years agoFix T47838: Walk gravity fails w/ intersecting objects
Campbell Barton [Thu, 24 Mar 2016 06:50:20 +0000 (17:50 +1100)]
Fix T47838: Walk gravity fails w/ intersecting objects

Regression in 3ad0344, fix from @mano-wii.

More comprehensive fix can be done after 2.77a.

5 years agoDriver Keyframing: Some tweaks to make inserting keyframes on Driver F-Curves easier
Joshua Leung [Thu, 24 Mar 2016 06:33:13 +0000 (19:33 +1300)]
Driver Keyframing: Some tweaks to make inserting keyframes on Driver F-Curves easier

Now, when trying to insert a keyframe on a driven property (using IKEY, or with
autokeying enabled), the keyframes will get created on the Driver's F-Curve
(instead of creating a new FCurve that goes into the active action, but will never
do anything). Furthermore, the x-value of the new keyframe will be the current
result of the driver expression.

Why/Motivations:
This way, it becomes easier to create corrective drivers, as you can position all
the targets the driver depends on, then adjust the driver value until it does what
you need, and then you keyframe that value to bake it into the Driver F-Curve
(in effect, "training" the computer how to behave in that case).

Usage Notes:
* In practice, that particular workflow is still quite clunky to achieve, due to some
  quirks of how the driver system and the UI widgets interact. Specifically, you'll
  need to disable/mute the driver before trying to edit the setting (to prevent the
  driver from immediately resetting the value - before even autokey fires!). However,
  if you're using the Graph Editor to preview/monitor/manage the keying process, you'll
  then want to re-enable the driver before changing the targets, so that you can see
  how much of a change you'll want to be applying!

* The warning about editing driver values may need to be disabled or selectively
  knocked out. I had it disabled while testing this functionality, but it's actually
  harmless in its current state (if just a bit annoying).

5 years agoFix T47900: VSE adjustment crashes on blank frame
Campbell Barton [Thu, 24 Mar 2016 06:09:10 +0000 (17:09 +1100)]
Fix T47900: VSE adjustment crashes on blank frame

Regression, should have been included in previous fix.

5 years agoFix dodgy indentation
Joshua Leung [Thu, 24 Mar 2016 02:20:56 +0000 (15:20 +1300)]
Fix dodgy indentation

5 years agoDrivers UI: Added name validation/linting for Driver Variables
Joshua Leung [Thu, 24 Mar 2016 02:15:04 +0000 (15:15 +1300)]
Drivers UI: Added name validation/linting for Driver Variables

When attempting to change a driver variable name to an "invalid" name,
an indicator will now be shown beside the offending variable name.
Clicking on this icon will show a popup which provides more information
about why the variable name cannot be used.

Reasons that it knows about are:
1) Starts with number
2) Has a dot
3) Has a space
4) Starts with or contains a special character
5) Starts with an underscore (Python does allow this, but it's bad practice,
   and makes checking security of drivers harder)
6) Is a reserved Python keyword

5 years agoFix T47896: Scripted Expression string length limit is too short for some autogenerat...
Joshua Leung [Thu, 24 Mar 2016 00:02:22 +0000 (13:02 +1300)]
Fix T47896: Scripted Expression string length limit is too short for some autogenerated expressions

While most scripted expressions are quite short (e.g. "var" or "frame + 1"),
those that are autogenerated by scripts (to take into account a wide range of factors)
may require a bit more headroom to operate in.

By doubling the maximum length here, we now make it possible to combine up to 38
3-letter variables in some linear combination (with all factors expressed to 4 dp).
That should be more than enough for anyone or anything for quite a while!

Unfortunately, this does increase memory consumption for drivers across the board.

5 years agoRevert "Fix T47869: OpenColorIO Error with unicode path to config file under Windows"
Sergey Sharybin [Wed, 23 Mar 2016 18:25:29 +0000 (19:25 +0100)]
Revert "Fix T47869: OpenColorIO Error with unicode path to config file under Windows"

White the config itself could be loaded this way, lookup tables can not. Additionally,
that's not really clear how to solve the issue with search path which is multi-byte
only in the API.

Reverting for further investigation.

This reverts commit ab4307aa0868f2d8389cc0dd500eff38909b08f1.

5 years agoFix T47900: VSE adjustment crashes on blank frame
Campbell Barton [Wed, 23 Mar 2016 18:17:38 +0000 (05:17 +1100)]
Fix T47900: VSE adjustment crashes on blank frame

5 years agoFix T47870: Missing viewport update when material output is inside of the group
Sergey Sharybin [Wed, 23 Mar 2016 14:41:36 +0000 (15:41 +0100)]
Fix T47870: Missing viewport update when material output is inside of the group

5 years agoFix T47833: View-aligned GPencil strokes move in crazyspace when grabbed
Joshua Leung [Wed, 23 Mar 2016 14:32:02 +0000 (03:32 +1300)]
Fix T47833: View-aligned GPencil strokes move in crazyspace when grabbed

These fixes "seem" to do the right thing now...

5 years agoFix T47869: OpenColorIO Error with unicode path to config file under Windows
Sergey Sharybin [Wed, 23 Mar 2016 14:09:09 +0000 (15:09 +0100)]
Fix T47869: OpenColorIO Error with unicode path to config file under Windows

5 years agoAnimEditors: Fuzzy/Multi-Word Name Filtering
Joshua Leung [Wed, 23 Mar 2016 13:44:39 +0000 (02:44 +1300)]
AnimEditors: Fuzzy/Multi-Word Name Filtering

Thanks to D1080 by @rockets, I've now been able to easily implement the
ability to type multiple word snippets/partial words into the text filter
field (in the Animation Editors), and have it filter the channels which
contain just some of those parts (instead of having to match everything).

For example, the following search strings will now work:
* "loc rot" or "lo ro" will now filter all location and rotation FCurves
* "col loc" will filter all location and color FCurves
* "scale" will also work as before to filter all scale FCurves

But, the following will not work:
* "lc rt" will NOT filter all location and rotation, as the fuzzy search only
  breaks down the search string based on whitespace placement

By default, this is not enabled when using name filtering (i.e. magnifying glass is checked,
and some filtering text is specified). Instead, you need to enable the "AZ" toggle beside
the name field. This fuzzy matching is not enabled by default as it could end up being
quite a bit slower on really heavy scenes. (There are probably some optimisation
opportunities, but that's only a future option if someone really needs it)

5 years agoFix T47856: Cycles problem when running from multi-byte path
Sergey Sharybin [Wed, 23 Mar 2016 12:58:31 +0000 (13:58 +0100)]
Fix T47856: Cycles problem when running from multi-byte path

This is a mix of regression and old unsupported configuration.

Regression was caused by some checks added on Blender side which was
checking whether python function returned error or not. This made it
impossible to enable Cycles when running from a file path which can't
be encoded with MBCS codepage.

Non-regression issue was that it wasn't possible to use pre-compiled
CUDA kernels when running from a path with non-ascii multi-byte
characters.

This commit fixes regression and CUDA parts, but OSL still can't be
used from a non-ascii location because it uses non-widechar API to
work with file paths by the looks of it. Not sure we can solve this
just from our side by using some codepage trick (UTF-16?) since even
oslc fails to compile shader when there are non-ascii characters in
the path.

5 years agoFix T47893: BGE crashes w/ generated mesh data
Campbell Barton [Wed, 23 Mar 2016 12:37:08 +0000 (23:37 +1100)]
Fix T47893: BGE crashes w/ generated mesh data

5 years agoRadial Operator: Tweak number of digits displayed for the different property types
Joshua Leung [Wed, 23 Mar 2016 11:59:48 +0000 (00:59 +1300)]
Radial Operator: Tweak number of digits displayed for the different property types

* As requested by venomgfx, rotations now only display to 2 decimal places (more than
  enough for rotations in degrees)
* Also, made it so that the "factor" types now show 3 dp (previously only 2, which isn't
  really enough when dealing with values from 0.0 - 1.0)

5 years agoRadial Control Operator: Always show the property name + value on the header
Joshua Leung [Wed, 23 Mar 2016 11:55:37 +0000 (00:55 +1300)]
Radial Control Operator: Always show the property name + value on the header

The radial control operator is commonly used for setting sculpt brush Size and Strength
settings. However, when using it, it can often be difficult to remember which hotkey
is responsible for which setting, meaning that you can often accidentally modify the
wrong setting without knowing it (or even what new value you've set it to).

This commit makes it so that the property name and the current value are always shown
on the header. Previously this info was only shown when the doing numeric input.
(It also fixes a bug where the numeric input print would hang around even after it
wasn't being used).

5 years agoFix T47890: Vertex mask w/ subsurf select fails
Campbell Barton [Wed, 23 Mar 2016 10:01:21 +0000 (21:01 +1100)]
Fix T47890: Vertex mask w/ subsurf select fails

Regression in GL refactor

5 years agoUI: multi word filtering in search menu
Campbell Barton [Wed, 23 Mar 2016 07:45:32 +0000 (18:45 +1100)]
UI: multi word filtering in search menu

D1080 by @rockets, with own improvements to tests

5 years agoCleanup: style
Campbell Barton [Tue, 22 Mar 2016 17:47:16 +0000 (04:47 +1100)]
Cleanup: style

5 years agoCleanup: style (80-width)
Campbell Barton [Tue, 22 Mar 2016 17:25:08 +0000 (04:25 +1100)]
Cleanup: style (80-width)

5 years agoFix incorrect strncat use
Campbell Barton [Tue, 22 Mar 2016 16:54:04 +0000 (03:54 +1100)]
Fix incorrect strncat use

5 years agoFix T47830: Multi-edit w/ ui-list wont highlight
Campbell Barton [Tue, 22 Mar 2016 16:37:23 +0000 (03:37 +1100)]
Fix T47830: Multi-edit w/ ui-list wont highlight

Regression from 4d6b892.

5 years agoWeight Paint: support accumulate for blur brush
Campbell Barton [Tue, 22 Mar 2016 14:22:26 +0000 (01:22 +1100)]
Weight Paint: support accumulate for blur brush

This re-applies smoothing based on the previous update.

Can smooth more but harder to get such even distribution.

5 years agoFix for crash of point density textures due to undefined `point_data` on loading.
Lukas Tönne [Tue, 22 Mar 2016 14:07:56 +0000 (15:07 +0100)]
Fix for crash of point density textures due to undefined `point_data` on loading.

5 years agoWeight Paint: blur now smooths connected weights
Campbell Barton [Tue, 22 Mar 2016 11:14:26 +0000 (22:14 +1100)]
Weight Paint: blur now smooths connected weights

Previously it would average all points under the brush, giving an off feedback loop that often depended on the
direction of the brush stroke, giving not-very-useful smearing effect.

Now blend brush smooths between connected edges.

5 years agoMesh API: add BKE_mesh_vert_edge_vert_map_create
Campbell Barton [Tue, 22 Mar 2016 11:07:45 +0000 (22:07 +1100)]
Mesh API: add BKE_mesh_vert_edge_vert_map_create

Handy when you need to reference connected verts directly.

5 years agoFix T47882: startup camera not upright
Campbell Barton [Tue, 22 Mar 2016 06:22:41 +0000 (17:22 +1100)]
Fix T47882: startup camera not upright

5 years agoCleanup: reduce scope for versioning vars
Campbell Barton [Tue, 22 Mar 2016 06:18:35 +0000 (17:18 +1100)]
Cleanup: reduce scope for versioning vars

5 years agoFix add mesh template
Bassam Kurdali [Mon, 21 Mar 2016 16:51:48 +0000 (03:51 +1100)]
Fix add mesh template

5 years agoGPU compositing:
Antony Riakiotakis [Sun, 20 Mar 2016 23:53:48 +0000 (00:53 +0100)]
GPU compositing:

Minor optimization: Store the uniform interface of shaders instead of
re-querying every frame.

5 years agoFix T47842: UV sculpt brush widgets are available when not in uv sculpt mode.
Philipp Oeser [Mon, 21 Mar 2016 14:45:16 +0000 (15:45 +0100)]
Fix T47842: UV sculpt brush widgets are available when not in uv sculpt mode.

rB5b3af3dd made the poll function here slightly too laxist.

To be backported to 2.77 should we make an 'a' release.

Reviewed By: mont29

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

5 years agoMirror influence of environment texture in Blender viewport
Alexander Romanov [Mon, 21 Mar 2016 11:36:33 +0000 (14:36 +0300)]
Mirror influence of environment texture in Blender viewport

This patch implements Mirror influence for environment textures. Approach matches the one from BI.
{F281871}
See the video https://youtu.be/BskgCv6dcIE
Example: {F281876}
Alexander (Blend4Web Team)

Reviewers: campbellbarton, merwin, brecht

Reviewed By: brecht

Subscribers: TwisterGE, blueprintrandom, youle, Evgeny_Rodygin, AlexKowel, yurikovelenov

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

5 years agoFix T47862: VSE hard cut fails
Campbell Barton [Mon, 21 Mar 2016 08:22:39 +0000 (19:22 +1100)]
Fix T47862: VSE hard cut fails

Regression caused by changing how video length is calculated,
however similar problems could be caused by strip length changing on-disk.

5 years agoFix T47848: Fix regression in sequencer GL render
Campbell Barton [Mon, 21 Mar 2016 05:36:20 +0000 (16:36 +1100)]
Fix T47848: Fix regression in sequencer GL render

Own changes in 2.77 broke off-screen render with scene render size doesn't match output.

5 years agoGPU: avoid redundant logic for non-spot lamps
Campbell Barton [Mon, 21 Mar 2016 05:06:04 +0000 (16:06 +1100)]
GPU: avoid redundant logic for non-spot lamps

5 years agoFix for non spot lamps calculating spot values
Campbell Barton [Mon, 21 Mar 2016 05:01:26 +0000 (16:01 +1100)]
Fix for non spot lamps calculating spot values

Logical error in D1378, also incorrectly used lamp type as a flag.

5 years agoCorrect strange icon scaling in preferences
Campbell Barton [Mon, 21 Mar 2016 04:33:59 +0000 (15:33 +1100)]
Correct strange icon scaling in preferences

5 years agoFix T47868: Check Box shape doesn't scale
Campbell Barton [Mon, 21 Mar 2016 04:16:43 +0000 (15:16 +1100)]
Fix T47868: Check Box shape doesn't scale

5 years agoDocs: add missing bmesh.ops descriptions
Campbell Barton [Sun, 20 Mar 2016 08:40:03 +0000 (19:40 +1100)]
Docs: add missing bmesh.ops descriptions

5 years agoFix T47837: Filtering UIList broken with recent master.
Bastien Montagne [Sat, 19 Mar 2016 16:06:32 +0000 (17:06 +0100)]
Fix T47837: Filtering UIList broken with recent 

Using 32nd bit of integer with our int RNA prop is not a good idea, it does not
really support unsigned int even with PROP_UNSIGNED type...

Most likely this has been unveiled by recent work over property clamping in RNA.

Not critical, but should be backported should we make an 'a' release.

5 years agomathutils.bvhtree: Add find_nearest_range API call
Campbell Barton [Sat, 19 Mar 2016 07:29:47 +0000 (18:29 +1100)]
mathutils.bvhtree: Add find_nearest_range API call

Returns all elements within a radius.
Similar to kdtree.find_range

5 years agoBLI_kdopbvh: Pass center to to range callback
Campbell Barton [Sat, 19 Mar 2016 06:16:50 +0000 (17:16 +1100)]
BLI_kdopbvh: Pass center to to range callback

Useful when BLI_bvhtree_range_query callback calculates a new position to measure from.

5 years agoFix: "pchan_name" field in SDNA for names of bone targets for drivers was too short
Joshua Leung [Sat, 19 Mar 2016 04:48:29 +0000 (17:48 +1300)]
Fix: "pchan_name" field in SDNA for names of bone targets for drivers was too short

When all the names in Blender were updated to go from having 32 characters to 64,
the "pchan_name" field in the DriverTarget struct was missed. This meant that if you
had a bone with a suitably long name, it would have been impossible to use values from this
bone in a driver.

The only reason this probably hasn't been discovered yet is because the standard/old depsgraph
doesn't work that well for bones in the same armatures, so setups where this may have
occurred are not that common.

To prevent this problem from happening in future, I've added the standard "MAX_ID_NAME-2"
comment to the comments on each line likely to be impacted by such changes, making it
easier for whoever does a search and replace in future :)

5 years agoSequencer: expose GL preview alpha in scene UI
Campbell Barton [Fri, 18 Mar 2016 09:03:24 +0000 (20:03 +1100)]
Sequencer: expose GL preview alpha in scene UI

While this isn't essential, accessing this setting required navigating to each scene and using render menu.
Expose in sequencer UI for more convenient access.

5 years agoFix T47806: Blender animation player stop working correctly with XVID codec
Sergey Sharybin [Fri, 18 Mar 2016 06:50:06 +0000 (11:50 +0500)]
Fix T47806: Blender animation player stop working correctly with XVID codec

Something weird, seems some buffers _might_ be shared between codec context
and frame, which is quite weird. Could be a bug in FFmpeg or could be wrong
API usage somewhere else..

5 years agoFix T47827: Single Channel Preview Error
Campbell Barton [Thu, 17 Mar 2016 12:52:49 +0000 (23:52 +1100)]
Fix T47827: Single Channel Preview Error

Fix by @sergey with own fix for big endian.

5 years agoImBuf: Some tweaks to FFmpeg frame free policy
Sergey Sharybin [Thu, 17 Mar 2016 09:45:10 +0000 (14:45 +0500)]
ImBuf: Some tweaks to FFmpeg frame free policy

Th intention is to make sure we don't free buffers which were not allocated
by FFmpeg.

This is a possible fix for T47806.

5 years agoSequencer: add frame-jump to menu
Campbell Barton [Wed, 16 Mar 2016 23:57:40 +0000 (10:57 +1100)]
Sequencer: add frame-jump to menu

5 years agoFix missing 'anim_data' in RNA API of Freestyle's linestyle.
Bastien Montagne [Wed, 16 Mar 2016 19:19:57 +0000 (20:19 +0100)]
Fix missing 'anim_data' in RNA API of Freestyle's linestyle.

Reported by Manuel Rais on ML, thanks.

5 years agoSequencer: Alt-RMB select handle now always selects strip
Campbell Barton [Wed, 16 Mar 2016 13:26:50 +0000 (00:26 +1100)]
Sequencer: Alt-RMB select handle now always selects strip

Was possible to do Alt-RMB on a strips handle - which only make the strip active (but didn't select).
This isn't really useful, so just select the strip and its handles in this case.

5 years agoFix T47818: GPencil Sculpt Brush settings update when adjusted using scrollwheel...
Joshua Leung [Wed, 16 Mar 2016 12:12:30 +0000 (01:12 +1300)]
Fix T47818: GPencil Sculpt Brush settings update when adjusted using scrollwheel while sculpting

5 years agoFix text on collapsed node not positioned correctly with high DPI
Julian Eisel [Wed, 16 Mar 2016 11:51:15 +0000 (12:51 +0100)]
Fix text on collapsed node not positioned correctly with high DPI

Reported by @JacquesLucke via IRC, thx!

5 years agoFix T47807: Toggle header shortcut doesn't work
Campbell Barton [Wed, 16 Mar 2016 00:33:32 +0000 (11:33 +1100)]
Fix T47807: Toggle header shortcut doesn't work

5 years agoCMake: only show py module install options when used
Campbell Barton [Tue, 15 Mar 2016 12:50:44 +0000 (23:50 +1100)]
CMake: only show py module install options when used

5 years agoFix T47734: Rest Position is not working with new Deps
Sergey Sharybin [Tue, 15 Mar 2016 11:13:00 +0000 (16:13 +0500)]
Fix T47734: Rest Position is not working with new Deps

5 years agoFix T47780: Icons don't update in floating panels
Campbell Barton [Tue, 15 Mar 2016 10:12:37 +0000 (21:12 +1100)]
Fix T47780: Icons don't update in floating panels

5 years agoFix T47577: Movie clip uses too much memory with still image sequences
Sergey Sharybin [Tue, 15 Mar 2016 10:07:18 +0000 (15:07 +0500)]
Fix T47577: Movie clip uses too much memory with still image sequences

5 years agomovieclip: Cleanup around cache
Sergey Sharybin [Tue, 15 Mar 2016 09:59:59 +0000 (14:59 +0500)]
movieclip: Cleanup around cache

Should be no functional changes.

5 years agoCleanup some warnings
Sergey Sharybin [Tue, 15 Mar 2016 09:16:16 +0000 (14:16 +0500)]
Cleanup some warnings

5 years agoImBuf: Use proper function to free FFmpeg frames
Sergey Sharybin [Tue, 15 Mar 2016 08:39:39 +0000 (13:39 +0500)]
ImBuf: Use proper function to free FFmpeg frames

5 years agoFix T47724: VSE crops video if horizontal resolution isn't divisible by 8
Sergey Sharybin [Tue, 15 Mar 2016 08:19:49 +0000 (13:19 +0500)]
Fix T47724: VSE crops video if horizontal resolution isn't divisible by 8

In fact, some areas in FFmpeg might require alignment up to 32, so now we
make temporary conversion in an aligned frame. We only do this if width is
not aligned to 32.

5 years agoFix T47724: VSE crops video if horizontal resolution isn't divisible by 8
Sergey Sharybin [Tue, 15 Mar 2016 07:32:27 +0000 (12:32 +0500)]
Fix T47724: VSE crops video if horizontal resolution isn't divisible by 8

Revert "Fix T47724: VSE crops video if horizontal resolution isn't divisible by 8"

This reverts commit 606f6b79eabca236b933dd76e5425162e26ba105.

5 years agoFix T47759: Mesh 'Select less', leaves isolated verts
Campbell Barton [Tue, 15 Mar 2016 03:17:54 +0000 (14:17 +1100)]
Fix T47759: Mesh 'Select less', leaves isolated verts

Select less in mesh edit-mode would leave selected vertices/edges
in edge/face mode which don't support selecting these elements.

5 years agoCMake: remove unused libpath's
Campbell Barton [Tue, 15 Mar 2016 02:15:26 +0000 (13:15 +1100)]
CMake: remove unused libpath's

Also add note that these should be deprecated in favor of absolute libs.

5 years agoPyAPI: Double performance of Mesh.from_pydata
Campbell Barton [Mon, 14 Mar 2016 23:41:36 +0000 (10:41 +1100)]
PyAPI: Double performance of Mesh.from_pydata

D1853 by @JacquesLucke

The speedup is mainly possible by using the `foreach_set` method for polygon data.

5 years agoFix T47750: Edited hair: disconnect (and connect!) operator do not support redo.
Bastien Montagne [Mon, 14 Mar 2016 20:04:30 +0000 (21:04 +0100)]
Fix T47750: Edited hair: disconnect (and connect!) operator do not support redo.

As suggested by Sergey, do not register those anymore, this way we keep undo step,
but user cannot 'redo' them (does not work, since cached DM in particle modifier data
is not yet re-created by depsgraph update after undo when operator is redone).

UI now has two buttons, one to (dic)connect current psys, the other to (dis)connect all.

Also fixed similar issue with Connect Hair op.

5 years agoBetter fix for T47787 - remove extra user due to 'user_one' as soon as we increase...
Bastien Montagne [Mon, 14 Mar 2016 14:05:52 +0000 (15:05 +0100)]
Better fix for T47787 - remove extra user due to 'user_one' as soon as we increase 'real' user count.

This has several benefits:
* User count remains coherent, regardless of the order in which you use 'user_one' & real refcounting users
  (i.e. if you add to group, and then link in scene, or the reverse, you now always get same final user count).
* Avoids the need to check for potential 'user_one' extra user in count in several places in code (e.g. when
  making IDs single users...).
* Users won't wonder why they cannot make 'single user' and ID even though its user count shows '2'!
* readfile.c now always uses code from BKE's library.c when modifying id->us. Which means we can consider
  (asside from assignment during initialization) that id->us is read-only outside of library.c context.

Note that this commit reverts previous one (rB6b1d77a8052b) - please **do not** backport this one in 2.77.

5 years agoFix T47787: When performing operation 'Make single user' -> 'obj&data', object could...
Bastien Montagne [Mon, 14 Mar 2016 13:44:11 +0000 (14:44 +0100)]
Fix T47787: When performing operation 'Make single user' -> 'obj&data', object could be removed from group.

Similar cause as in T47482, we used to have poor handling of 'user_one' cases of ID usage,
leading to inconsistent behavior depending on order of operations e.g.

Here, was object used by a group but not linked in any scene - once linked in scene,
their usercount would be 2, leading to 'making single copy', when it's actually not needed.
We now have better control here, so let's use it!

Note that other ID 'make single user' code will likely need similar fix (Images, etc.).

Safe to be backported to 2.77.

5 years agoFix T47784: BMesh.from_object broken keyword args
Campbell Barton [Mon, 14 Mar 2016 13:38:33 +0000 (00:38 +1100)]
Fix T47784: BMesh.from_object broken keyword args

5 years agoFix T47772: Randomize stroke has direction bias
Campbell Barton [Mon, 14 Mar 2016 10:27:56 +0000 (21:27 +1100)]
Fix T47772: Randomize stroke has direction bias

5 years agoFix T47785: Rendering Crash, Node Connector Crash, Changing Editors Crash
Sergey Sharybin [Mon, 14 Mar 2016 09:16:04 +0000 (14:16 +0500)]
Fix T47785: Rendering Crash, Node Connector Crash, Changing Editors Crash

Regressions after 2.76, to be backported to 2.77.

5 years agoSupport mdisps for Mesh.flip_normals()
Campbell Barton [Mon, 14 Mar 2016 04:32:48 +0000 (15:32 +1100)]
Support mdisps for Mesh.flip_normals()

5 years agoCleanup: move MDisps flipping to own function
Campbell Barton [Mon, 14 Mar 2016 04:17:29 +0000 (15:17 +1100)]
Cleanup: move MDisps flipping to own function

5 years agoFix T47788: Symmetrize flips multi-res data
Campbell Barton [Mon, 14 Mar 2016 03:15:56 +0000 (14:15 +1100)]
Fix T47788: Symmetrize flips multi-res data

Symmetrize was unusable with multi-res data,
add an option for the bmesh operator not to flip the multi-res depth.

5 years agoCleanup: style/spelling
Campbell Barton [Mon, 14 Mar 2016 02:21:13 +0000 (13:21 +1100)]
Cleanup: style/spelling

5 years agoFix T47773: Particle System with Boids Crash.
Bastien Montagne [Sun, 13 Mar 2016 17:21:30 +0000 (18:21 +0100)]
Fix T47773: Particle System with Boids Crash.

Problem was, during initialization of boids particles in `dynamics_step()`,
psys of target objects was not obtained with generic `psys_get_target_system()`
as later in code, which could lead to some uninitialized `psys->tree` usage...

Think it's safe enough for 2.77, though not a regression.

5 years agoFix bplayer (c)
Bastien Montagne [Sun, 13 Mar 2016 14:44:06 +0000 (15:44 +0100)]
Fix bplayer (c)

5 years agoDefault Keyframe Type: Some UI tweaks
Joshua Leung [Sun, 13 Mar 2016 12:04:39 +0000 (01:04 +1300)]
Default Keyframe Type: Some UI tweaks

* Don't show name of keyframe type in timeline header. It's getting a bit too crowded
  for that, so just show the keyframe icon. Hopefully that will be enough.

* Tweaked the tooltip and label to make it clearer what the setting is for

5 years agoFixed some type mismatch errors, missed earlier
Joshua Leung [Sun, 13 Mar 2016 12:01:43 +0000 (01:01 +1300)]
Fixed some type mismatch errors, missed earlier

(CMake MSVC's output makes it really difficult to spot errors when they occur!)

5 years agoFancy procedural icons for Keyframe Types
Joshua Leung [Sun, 13 Mar 2016 11:56:52 +0000 (00:56 +1300)]
Fancy procedural icons for Keyframe Types

The new "default keyframe type" dropdown on the timeline header
(and also the "Keyframe Type" operator/properties in other places)
now has procedurally generated icons which reflect what that keyframe
type will look like when rendered in the Dope Sheet.

This was achieved using the ancient "VICON" (vector icon) stuff
that's lurking around in the dark parts of UI code. From memory,
the only other things that use (or used to use) this stuff included
some of the triangle icons for some dropdown buttons, or something
like that.

Notes:
* Theme colour changes are reflected immediately by these icons.
  This is possible because they are all drawn procedurally
* These icons scale with the DPI setting. I manually guessed the size of
  these icons. They can be adjusted further if needed.
* I've documented the steps for adding voodoo icons like this on the wiki
  (http://wiki.blender.org/index.php/Dev:2.7/Source/Checklists/Vector_Icon)
* It's true that the rendering of these keyframes doesn't quite fit the rest
  of the icons in the UI. However, since we're just leveraging the standard
  keyframe drawing methods (to avoid discreptancies between the two), we'll
  leave it as such for now. Maybe later we can consider blending in a bit of
  the glossy keyframe icons in the Icon Sheet?

5 years agoMore compile fixes - Game Engine
Joshua Leung [Sun, 13 Mar 2016 10:34:42 +0000 (23:34 +1300)]
More compile fixes - Game Engine

5 years agoCompile fix for Linux
Joshua Leung [Sun, 13 Mar 2016 10:22:15 +0000 (23:22 +1300)]
Compile fix for Linux