2 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Wed, 20 Mar 2019 16:33:54 +0000 (17:33 +0100)]
Merge branch 'blender2.7'

2 months agoCycles: make cycles.merge_images work with incomplete layers and passes.
Brecht Van Lommel [Wed, 20 Mar 2019 15:02:38 +0000 (16:02 +0100)]
Cycles: make cycles.merge_images work with incomplete layers and passes.

If layers and passes are not exactly the same in all files, we make a best
effort to merge them instead of failing.

2 months agoFix T62758: hair curves with UV mapped textures renders wrong.
Jacques Lucke [Wed, 20 Mar 2019 15:59:49 +0000 (16:59 +0100)]
Fix T62758: hair curves with UV mapped textures renders wrong.

Differential Revision:

2 months agoFix T61326 "In Front" option not working on edit curves
Clément Foucault [Wed, 20 Mar 2019 16:25:24 +0000 (17:25 +0100)]
Fix T61326 "In Front" option not working on edit curves

Create a new pass for them and draw them separately.

Beware of the double multisample resolve when multi-editing a mix of curves
with and without the "in front" option enabled.

2 months agoFix assert on vertex parent
Sergey Sharybin [Wed, 20 Mar 2019 16:19:26 +0000 (17:19 +0100)]
Fix assert on vertex parent

The evaluation was done on an original object, which is not allowed.

2 months agoUI: Make paint context menus more contextual
William Reynish [Wed, 20 Mar 2019 16:04:57 +0000 (17:04 +0100)]
UI: Make paint context menus more contextual

 - Only show Radius for tools with radius
 - Add more sliders here depending on active tool

2 months agoFix T56778: Alembic Override Frame does not update on playback
Sergey Sharybin [Wed, 20 Mar 2019 15:48:14 +0000 (16:48 +0100)]
Fix T56778: Alembic Override Frame does not update on playback

2 months agoFix error in UI of empty image due to last commit
Clément Foucault [Wed, 20 Mar 2019 15:47:50 +0000 (16:47 +0100)]
Fix error in UI of empty image due to last commit

2 months agoSelect Similar: use kdtree de-duplication
Campbell Barton [Wed, 20 Mar 2019 15:29:30 +0000 (02:29 +1100)]
Select Similar: use kdtree de-duplication

Avoids redundant tree traversal when finding nearest.

2 months agoBLI_kdtree: add deduplicate function
Campbell Barton [Wed, 20 Mar 2019 15:27:27 +0000 (02:27 +1100)]
BLI_kdtree: add deduplicate function

Function to remove exact duplicates from the tree before balancing.

2 months agoFix missing free in recent kdtree changes
Campbell Barton [Wed, 20 Mar 2019 15:38:31 +0000 (02:38 +1100)]
Fix missing free in recent kdtree changes

2 months agoDepsgraph: Fix cycle with rigid body and Weight Proximity
Sergey Sharybin [Wed, 20 Mar 2019 15:35:23 +0000 (16:35 +0100)]
Depsgraph: Fix cycle with rigid body and Weight Proximity

The issue is a feedback loop with point cache reset operation.

Solved by introducing extra node which ensures object's transformation
is ready for simulator input. Allows to route relations without causing
a fake dependency cycle now.

2 months agoFix T58550 Dragged in images dont overlap properly
Clément Foucault [Wed, 20 Mar 2019 15:33:17 +0000 (16:33 +0100)]
Fix T58550 Dragged in images dont overlap properly

This patch adds a new "Use Alpha" option on image empties to avoid ordering
issue of reference images.

If ordering is not important, "Use Alpha" can be enabled to provide
transparency and alpha blending support.

2 months agoFix T59449: Particle system creates error in rigid body
Sergey Sharybin [Wed, 20 Mar 2019 14:14:27 +0000 (15:14 +0100)]
Fix T59449: Particle system creates error in rigid body

Is a dependency cycle problem. Fix is similar to what is done in 024f5ba2bdb.

2 months agoUI: relocate rename menu item
Campbell Barton [Wed, 20 Mar 2019 14:04:28 +0000 (01:04 +1100)]
UI: relocate rename menu item

This was in between operator adjust/search.

Also remove line accidentally added in last commit.

2 months agoCleanup: style
Campbell Barton [Wed, 20 Mar 2019 13:58:01 +0000 (00:58 +1100)]
Cleanup: style

2 months agoFix T61759: Dynamic paint smudge crash
Sergey Sharybin [Wed, 20 Mar 2019 13:56:20 +0000 (14:56 +0100)]
Fix T61759: Dynamic paint smudge crash

The issue was caused by mesh needed for dynamic paint brush being
stored in the modifier. That make it to be freed and set to NULL
when running copy-on-write.

Solved by moving the mesh to be stored in modifier's runtime data.

2 months agoUI: Accumulate name was being overridden in Sculpt Mode
William Reynish [Wed, 20 Mar 2019 13:56:32 +0000 (14:56 +0100)]
UI: Accumulate name was being overridden in Sculpt Mode

2 months agoModifiers: Never copy runtime data pointer
Sergey Sharybin [Wed, 20 Mar 2019 13:45:01 +0000 (14:45 +0100)]
Modifiers: Never copy runtime data pointer

2 months agoFix T60190 Z-fighting with (Culled) Backface
Clément Foucault [Wed, 20 Mar 2019 13:32:42 +0000 (14:32 +0100)]
Fix T60190 Z-fighting with (Culled) Backface

Create a separate pass for backface culled objects.

2 months agoFix renaming the pose bone
Campbell Barton [Wed, 20 Mar 2019 13:33:49 +0000 (00:33 +1100)]
Fix renaming the pose bone

The name from the pose bone needs to be changed in pose mode.

2 months agoFix T62711: Incorrect motion path update
Jacques Lucke [Wed, 20 Mar 2019 13:20:36 +0000 (14:20 +0100)]
Fix T62711: Incorrect motion path update

Reviewers: brecht

Differential Revision:

2 months agoFix T62770: Changing Constraint.mute does not update pose
Sergey Sharybin [Wed, 20 Mar 2019 13:19:30 +0000 (14:19 +0100)]
Fix T62770: Changing Constraint.mute does not update pose

Missing dependency graph tag. Is only happening for scripts, since
the interface is handling this from do_constraint_panels().

Fix is suggested by Edmund Kapusniak (@edmundmk), thanks!

2 months agoCleanup: More C++ like nature for word split test
Sergey Sharybin [Wed, 20 Mar 2019 13:05:30 +0000 (14:05 +0100)]
Cleanup: More C++ like nature for word split test

While it looks more longer, but also contains more comments
about what's going on.

Surely, this function almost never breaks and investing time
into maintaining its tests is not that important, but we should
have a good, clean, understandable tests so they act as a nice
example of how they are to be written. Especially important to
show correct language usage, without old school macros magic.

Doing this at a lunch breaks, so will be series of some updates
in the area.

2 months agoUI: Change name Airbrush back to Accumulate
William Reynish [Wed, 20 Mar 2019 13:14:06 +0000 (14:14 +0100)]
UI: Change name Airbrush back to Accumulate

'Airbrush' didn't make sense for Sculpt mode.

2 months agoUI: Consistent naming and ordering of paint Symmetry and Options panels
William Reynish [Wed, 20 Mar 2019 13:09:55 +0000 (14:09 +0100)]
UI: Consistent naming and ordering of paint Symmetry and Options panels

2 months agoFix T62248: Infinite Hotspot Size Crop Node
Jeroen Bakker [Fri, 15 Mar 2019 11:10:09 +0000 (12:10 +0100)]
Fix T62248: Infinite Hotspot Size Crop Node

When the area of the crop node is zero the hotspot margin becomes infinite.
This makes the gizmo by default think the translate mode hotspot is everywhere.

This fix will return a state if the INFINITY is detected so we can
return the hotspot drawing.

The cage2d gizmo is still not usable for sizes of 0 by 0 as now it won't
draw anything. the issues of the gizmo should be re-designed so we can
mitigate these limitations. But that is out of scope for this fix.

Reviewed By: campbellbarton

Maniphest Tasks: T62248

Differential Revision:

2 months agoCleanup: return early in BLI_path_frame_get
Sybren A. Stüvel [Wed, 20 Mar 2019 12:39:27 +0000 (13:39 +0100)]
Cleanup: return early in BLI_path_frame_get

Instead of making the entire body of the function conditional, it now
returns early, unindenting the entire function and preventing the reader
from searching for a non-existent `else` clause.

No semantic changes.

2 months agoFix BLI_path_frame_strip
Sybren A. Stüvel [Wed, 20 Mar 2019 11:59:11 +0000 (12:59 +0100)]
Fix BLI_path_frame_strip

The `BLI_path_frame_strip` function was completely broken, unless the
number of digits in the sequence number was the same as the length of
the extension. In other words, it would work fine for `` (4
digit `0001` and 4 char `.abc`), but other combinations would truncate
to the shortest (`` would become `file.###.ab` and
`file.00001.a` would become `file.##.a`). The dependency between the
sequence number and the file extension is now removed.

The behaviour has changed a little bit in the case where there are no
numbers in the filename. Previously, `path=""` would result
in `path=""` and `ext=""`, but now it results in
`path="filename"` and `ext=".abc"`. This way `ext` always contains the
extension, and the behaviour is consistent regardless of whether there
were any numbers found.

Furthermore, I've removed the `bool set_frame_char` parameter, because
it was unclear, probably also buggy, and most importantly, never used.

I've also added a unit test for the `BLI_path_frame_strip` function.

2 months agoUI: popup panel for renaming the active item
Campbell Barton [Wed, 20 Mar 2019 12:21:17 +0000 (23:21 +1100)]
UI: popup panel for renaming the active item

In 2.79 there was an "Item" panel with only to give access to rename
from the 3D view.

Add this functionality for context sensitive renaming.
Currently this works for objects/bones/sequence strips & nodes.

This uses F2 for a window level shortcut, replacing the file-io menu.

See: T61480

2 months agoFix T62678: better glyph clipping test
Jacques Lucke [Wed, 20 Mar 2019 12:33:08 +0000 (13:33 +0100)]
Fix T62678: better glyph clipping test

Reviewers: billreynish, brecht

Differential Revision:

2 months agoFix T60211: MemLeak Convert Curve To Mesh
Jeroen Bakker [Wed, 20 Mar 2019 11:57:24 +0000 (12:57 +0100)]
Fix T60211: MemLeak Convert Curve To Mesh

Ownership flag was not set, but was it was meanted to be. So the set
runtime data to NULL disconnected the Mesh with no ownership.

2 months agoUI: support for popups starting with buttons activated
Campbell Barton [Wed, 20 Mar 2019 11:40:38 +0000 (22:40 +1100)]
UI: support for popups starting with buttons activated

While this could already be done from C,
this is now exposed to Python

2 months agoMerge branch 'blender2.7' of
Stefan Werner [Wed, 20 Mar 2019 11:51:32 +0000 (12:51 +0100)]
Merge branch 'blender2.7' of

2 months agoCycles: Made Embree ignore curve intersections with SSS.
Stefan Werner [Wed, 20 Mar 2019 11:27:35 +0000 (12:27 +0100)]
Cycles: Made Embree ignore curve intersections with SSS.

2 months agoCycles: Performance optimization for Embree, resizing arrays once instead of per...
Stefan Werner [Wed, 20 Mar 2019 09:48:49 +0000 (10:48 +0100)]
Cycles: Performance optimization for Embree, resizing arrays once instead of per object.

2 months agoPreferences: add threshold for cursor motion
Campbell Barton [Wed, 20 Mar 2019 11:14:13 +0000 (22:14 +1100)]
Preferences: add threshold for cursor motion

A hard coded threshold was used to ignore cursor motion,
make this a preference since tablet users may want to increase it
since a pen hovering isn't as easy to keep still as a mouse.

Resolves T56278

2 months agoFix missing refresh when subdividing hair strand
Sergey Sharybin [Wed, 20 Mar 2019 11:03:15 +0000 (12:03 +0100)]
Fix missing refresh when subdividing hair strand

This is a part of T62730.i

2 months agoFix T62750: Deleted Keyframe Still Affects Scene
Sergey Sharybin [Wed, 20 Mar 2019 10:48:13 +0000 (11:48 +0100)]
Fix T62750: Deleted Keyframe Still Affects Scene

Missing ID recalc tag.

2 months agoFix T61670: Copy -> Paste - Pasted elements are not selected
Dalai Felinto [Wed, 20 Mar 2019 01:39:42 +0000 (22:39 -0300)]
Fix T61670: Copy -> Paste - Pasted elements are not selected

The first part of this patch is just a way to improve performance a bit
by not calling BKE_scene_object_base_flag_sync_from_base() twice.

The second is the proper fix for the reported issue.

That said, the report can be re-opened since there is still discussion
about whether or not to bring the collections with the objects.

Reviewers: mont29

Subscribers: brecht, campbellbarton

Differential Revision:

2 months agoUI: Add context menus to Metaball Edit, Lattice Edit and Text Edit modes
William Reynish [Wed, 20 Mar 2019 09:51:37 +0000 (10:51 +0100)]
UI: Add context menus to Metaball Edit, Lattice Edit and Text Edit modes

2 months agoFix (unreported) Copy/Paste: orig object being instantiated in active collection...
Bastien Montagne [Wed, 20 Mar 2019 09:28:46 +0000 (10:28 +0100)]
Fix (unreported) Copy/Paste: orig object being instantiated in active collection on pasting.

When copy/pasting an object in same .blend file, orig object would be
instantiated into the active collection when pasting, along with the
content of the paste. Was missing a clear of LIB_TAG_DOIT on objects...

Found while investigating T61670.

2 months agoCleanup: spacing in space_view3d
William Reynish [Wed, 20 Mar 2019 09:17:55 +0000 (10:17 +0100)]
Cleanup: spacing in space_view3d

2 months agoUI: Add mirror consistently to to contextual menus
William Reynish [Wed, 20 Mar 2019 09:17:10 +0000 (10:17 +0100)]
UI: Add mirror consistently to to contextual menus

After recent changes, the mirror operators are now much nicer to execute from menus.

2 months agoCleanup: un-indent NDOF operator body
Campbell Barton [Wed, 20 Mar 2019 07:42:10 +0000 (18:42 +1100)]
Cleanup: un-indent NDOF operator body

This was needed for C89 compatibility,
avoid having most of the operator logic in an else block.

2 months agoCleanup: Use doxy groups for NDOF operators
Campbell Barton [Wed, 20 Mar 2019 07:39:38 +0000 (18:39 +1100)]
Cleanup: Use doxy groups for NDOF operators

2 months agoCleanup: use lowercase for dimensions in function names
Campbell Barton [Wed, 20 Mar 2019 07:17:16 +0000 (18:17 +1100)]
Cleanup: use lowercase for dimensions in function names

Most API's already use this convention.

2 months agoError in last commit
Campbell Barton [Wed, 20 Mar 2019 07:05:35 +0000 (18:05 +1100)]
Error in last commit

2 months agoFix T62682: Inconsistent NDOF camera auto-key
Campbell Barton [Wed, 20 Mar 2019 07:05:35 +0000 (18:05 +1100)]
Fix T62682: Inconsistent NDOF camera auto-key

Some view operations auto-keyed when locking the camera to view
but some NDOF operators didn't yet support it.

Auto key during animation playback for recording camera motion.

2 months agoFix T62757: Mirror operator fails for non-modal execution
Campbell Barton [Wed, 20 Mar 2019 05:41:00 +0000 (16:41 +1100)]
Fix T62757: Mirror operator fails for non-modal execution

Unlike most transform operators that use an orientation and values,
Mirror uses the constraint axes to define which axes are mirrored.

Now constraint axes are shown in this case.

Other changes:

- Use 'EXEC_DEFAULT' for mirror menu items.
- Show mirror on local axis when not in edit-mode since this is useful
  in object mode too.
- Remove mirror vertex groups since this is in the vertex group menu and
  this menu isn't currently used for general symmetry operators which
  are currently in other menus.

2 months ago3D View: snap cursor to world origin now resets rotation
Campbell Barton [Wed, 20 Mar 2019 04:45:10 +0000 (15:45 +1100)]
3D View: snap cursor to world origin now resets rotation

2 months agoFix T62736: Inconsistent behavior bpy.utils.user_resource()
Philipp Oeser [Wed, 20 Mar 2019 04:17:32 +0000 (15:17 +1100)]
Fix T62736: Inconsistent behavior bpy.utils.user_resource()

If a subfolder was specified which didn't exist, logic would fallback
to get_path_user (instead of get_path_environment).

Now always use the from the environment variable if it's set and exists.

2 months agoDRW: minor optimization for edit-mesh conversion
Campbell Barton [Wed, 20 Mar 2019 04:05:25 +0000 (15:05 +1100)]
DRW: minor optimization for edit-mesh conversion

Finding visible connected elements is often a direct lookup
when they're not connected to hidden geometry.

Add inline wrappers that avoid a function call,
gives minor speedup creating GPU edit-mesh data.

2 months agoUI: center floating popovers
Campbell Barton [Wed, 20 Mar 2019 01:34:22 +0000 (12:34 +1100)]
UI: center floating popovers

Tweak placement so useful items are more likely to be nearby,
centering horizontally and align vertically to the first button.

2 months agoCleanup: style
Campbell Barton [Tue, 19 Mar 2019 23:44:13 +0000 (10:44 +1100)]
Cleanup: style

2 months agoCleanup: unused vars
Campbell Barton [Tue, 19 Mar 2019 23:26:53 +0000 (10:26 +1100)]
Cleanup: unused vars

2 months agoFix T59719 Bake Indirect Lighting doesn't update env map reflection
Clément Foucault [Tue, 19 Mar 2019 22:55:15 +0000 (23:55 +0100)]
Fix T59719 Bake Indirect Lighting doesn't update env map reflection

2 months agoUI: Remove UI name overrides for Reveal Hidden.
William Reynish [Tue, 19 Mar 2019 21:25:25 +0000 (22:25 +0100)]
UI: Remove UI name overrides for Reveal Hidden.

Makes the consistent operator names shine through into the UI.

2 months agoUI: Use 'Render Image' for image rendering in the viewport
William Reynish [Tue, 19 Mar 2019 20:41:12 +0000 (21:41 +0100)]
UI: Use 'Render Image' for image rendering in the viewport

This is more consistent with the main Render menu, and more descriptive

2 months agoFix: Inconsistent spacing in Python file after recent changes
William Reynish [Tue, 19 Mar 2019 20:34:20 +0000 (21:34 +0100)]
Fix: Inconsistent spacing in Python file after recent changes

2 months agoUnify "Hide Selected / Reveal Hidden" operator names
Dalai Felinto [Tue, 19 Mar 2019 20:07:59 +0000 (17:07 -0300)]
Unify "Hide Selected / Reveal Hidden" operator names

All edit mode related operators are now "Hide Selected / Reveal Hidden".
Before we had different variatons of them:

Hide Selection:
* MESH_OT_hide
* GPENCIL_OT_selection_opacity_toggle

Hide Selected Bones:

* MBALL_OT_hide_metaelems

Hide Selected:
* CURVE_OT_hide
* POSE_OT_hide
* UV_OT_hide

Reveal Bones:
* ARMATURE_OT_reveal

* MBALL_OT_reveal_metaelems

Operators not renamed:
* Hide Curves (GRAPH_OT_hide)
* Hide (OUTLINER_OT_hide)

Note we can do a step further and mass rename them to match their UI
names. Where Reveal Hidden is Show Hidden. But for now at least they are
all unified.

2 months agoFix T62735: hiding curves doesnt hide in viewport
Dalai Felinto [Tue, 19 Mar 2019 20:04:44 +0000 (17:04 -0300)]
Fix T62735: hiding curves doesnt hide in viewport

Copying what we do for mesh objects.

2 months agoFix T62749: random mesh selection crashes.
Brecht Van Lommel [Tue, 19 Mar 2019 18:57:26 +0000 (19:57 +0100)]
Fix T62749: random mesh selection crashes.

This was an off-by-one error in the initialization of tbuf, but refactored the
code a bit more to be less obscure.

2 months agoFix: Make sure color panels only appear in modes where they are supported
William Reynish [Tue, 19 Mar 2019 18:42:17 +0000 (19:42 +0100)]
Fix: Make sure color panels only appear in modes where they are supported

2 months agoUI: Rename GPencil Brush 'Appearance' panel to 'Display'
William Reynish [Tue, 19 Mar 2019 18:32:57 +0000 (19:32 +0100)]
UI: Rename GPencil Brush 'Appearance' panel to 'Display'

Makes it consistent with other paint modes

2 months agoFix: Color Picker and Color Palette panels were appearing for non-color tools in...
William Reynish [Tue, 19 Mar 2019 18:31:36 +0000 (19:31 +0100)]
Fix: Color Picker and Color Palette panels were appearing for non-color tools in Vertex Paint mode

Use correct poll method for both modes

2 months agoCleanup: fix debug warnign due to tooltip ending in dot.
Brecht Van Lommel [Tue, 19 Mar 2019 18:16:39 +0000 (19:16 +0100)]
Cleanup: fix debug warnign due to tooltip ending in dot.

2 months agoUI: Make Brush Display panel consistent between Image Editor and 3D View texture...
William Reynish [Tue, 19 Mar 2019 18:03:51 +0000 (19:03 +0100)]
UI: Make Brush Display panel consistent between Image Editor and 3D View texture painting

-Slightly simplify in both places too

2 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Tue, 19 Mar 2019 17:54:17 +0000 (18:54 +0100)]
Merge branch 'blender2.7'

2 months agoUI: Remove redundant separator
William Reynish [Tue, 19 Mar 2019 17:41:33 +0000 (18:41 +0100)]
UI: Remove redundant separator

2 months agoUI: Make Stroke panel consistent between Image Editor and 3D View texture painting
William Reynish [Tue, 19 Mar 2019 17:39:08 +0000 (18:39 +0100)]
UI: Make Stroke panel consistent between Image Editor and 3D View texture painting

This should probably become de-duplicated, but at least they look consistent now

2 months agoFix: own wrong path to image paint tool settings in recent commit
William Reynish [Tue, 19 Mar 2019 17:37:51 +0000 (18:37 +0100)]
Fix: own wrong path to image paint tool settings in recent commit

2 months agoCycles: add cycles.merge_images operator for combing EXR renders.
Brecht Van Lommel [Tue, 19 Mar 2019 13:38:57 +0000 (14:38 +0100)]
Cycles: add cycles.merge_images operator for combing EXR renders.

This is only available through the API, mainly intended for render farms to
combine rendered multilayer EXR Files with different samples. The images are
currently expected to have the exact same render layers and passes, just with
different samples.

Variance passes are still simply a weighted average, ideally these should be
merged more intelligently.

Differential Revision:

2 months agoUI: Re-organize Brush Properties
William Reynish [Tue, 19 Mar 2019 17:17:50 +0000 (18:17 +0100)]
UI: Re-organize Brush Properties

 - Consolidate each brush section (Color, Palette, Gradient) and make them distinct
 - Remove the lock icons and move these items into an Options sub-panel, together with other toggles
  - They now have more descriptive names
  - Use an enum for view vs scene brush unit
 - Use Property Split layout and sub-panels in line with the rest of 2.8
 - Rename Curve panel to Falloff

Reviewed by: campbellbarton, pablovazquez

Maniphest Tasks: D4529

Differential Revision:

2 months agoUnits: Use PROP_PIXEL for grad_spacing
William Reynish [Tue, 19 Mar 2019 17:10:00 +0000 (18:10 +0100)]
Units: Use PROP_PIXEL for grad_spacing

2 months agoCycles: Implement function to format and parse human readable time
Sergey Sharybin [Tue, 19 Mar 2019 14:19:22 +0000 (15:19 +0100)]
Cycles: Implement function to format and parse human readable time

Gives value in seconds for a string which is encoded in format HH:MM:SS.hh.

2 months agoFix: Add poll methods for quick effects operators
matc [Tue, 19 Mar 2019 16:16:49 +0000 (17:16 +0100)]
Fix: Add poll methods for quick effects operators

Differential Revision:

2 months agoCleanup: correct comment
Campbell Barton [Tue, 19 Mar 2019 16:14:50 +0000 (03:14 +1100)]
Cleanup: correct comment

2 months agoUI: scale cursor motion threshold by DPI
Campbell Barton [Tue, 19 Mar 2019 15:48:11 +0000 (02:48 +1100)]
UI: scale cursor motion threshold by DPI

This was using hard coded values of 2-3px.

Move both drag and motion thresholds to defines.

3 months agoFix T60684 Fourth and subsequent vertex color / UV layers displayed black
Clément Foucault [Tue, 19 Mar 2019 15:25:52 +0000 (16:25 +0100)]
Fix T60684 Fourth and subsequent vertex color / UV layers displayed black

3 months agoBLI_kdtree: use 1d tree for select similar
Campbell Barton [Tue, 19 Mar 2019 14:56:53 +0000 (01:56 +1100)]
BLI_kdtree: use 1d tree for select similar

3 months agoBLI_kdtree: add 1d kdtree support
Campbell Barton [Tue, 19 Mar 2019 14:20:46 +0000 (01:20 +1100)]
BLI_kdtree: add 1d kdtree support

Some users only use the tree to store a single value.

3 months agoFix T62715: Grease Pencil Apply Armature Modifier Issue
Antonioya [Tue, 19 Mar 2019 15:03:50 +0000 (16:03 +0100)]
Fix T62715: Grease Pencil Apply Armature Modifier Issue

@sergey wrote: "The reason it was failing is because md points to an original armature, which doesn't have runtime data needed for deformation. That data is to come from evaluated armature."

Thanks to @sergey for his help.

3 months agoFix T62622: Animating vertex does not update viewport
Sergey Sharybin [Tue, 19 Mar 2019 14:56:09 +0000 (15:56 +0100)]
Fix T62622: Animating vertex does not update viewport

Missing dependency graph update due to wrong relation.

3 months agoWorkbench: World Clipping For Specular Transparent
Jeroen Bakker [Tue, 19 Mar 2019 14:41:14 +0000 (15:41 +0100)]
Workbench: World Clipping For Specular Transparent

When Specular Transparent materials are used the world clipping
did not work on the transparent materials. The reason was that the
accum shaders did not vary on the existance of the clipping planes

This patch will variate the accum shaders when clipping planes are

Reviewed By: fclem

Maniphest Tasks: T61023

3 months agoFix T62558: Certain IES file causes crash
Jacques Lucke [Tue, 19 Mar 2019 14:33:28 +0000 (15:33 +0100)]
Fix T62558: Certain IES file causes crash

Reviewers: brecht

Differential Revision:

3 months agoCleanup: name 3D/4D trees in similar selection code
Campbell Barton [Tue, 19 Mar 2019 14:16:04 +0000 (01:16 +1100)]
Cleanup: name 3D/4D trees in similar selection code

Do this so trees have matching & logical names.

3 months agoUV: Use BLI_kdtree_2d for 2D data
Campbell Barton [Tue, 19 Mar 2019 13:58:22 +0000 (00:58 +1100)]
UV: Use BLI_kdtree_2d for 2D data

3 months agoBLI_kdtree: add 2D kdtree support
Campbell Barton [Tue, 19 Mar 2019 13:57:52 +0000 (00:57 +1100)]
BLI_kdtree: add 2D kdtree support

Some users of the 3D versions were storing 2D data in it.

Using a 3D tree for 2D data adds a spatially redundant branch
every 3rd level, as well as some extra memory use, best avoid this.

3 months agoWorkbench: Support Odd Number Of AA Samples
Jeroen Bakker [Tue, 19 Mar 2019 11:51:19 +0000 (12:51 +0100)]
Workbench: Support Odd Number Of AA Samples

Workbench render engine did not work when an odd number of AA samples
were used. A user could enter these values by disabling AA or set the
number of AA samples in the Render/Film panel to an odd number.

This commit will not perform TAA passes when AA is disabled.
For supporting the setting of 5 or 11 samples the bitmask was replaced
by an if statement as this was making the odd number not render

As extra introduce the jitter samples of 5 and 11 so the images will
be more clean. a jitter sample of 11 used to read outside the allocated
space of the jitter samples.

Fix T60820

Reviewed By: fclem

Maniphest Tasks: T60820

Differential Revision:

3 months agoCleanup: use BLI_kdtree_3d prefix
Campbell Barton [Tue, 19 Mar 2019 13:46:33 +0000 (00:46 +1100)]
Cleanup: use BLI_kdtree_3d prefix

Use prefix now there isn't only the 3d version.

3 months agoFix T62732: Bpy/Python is letting create inputs at the node level for node groups...
Bastien Montagne [Tue, 19 Mar 2019 13:43:14 +0000 (14:43 +0100)]
Fix T62732: Bpy/Python is letting create inputs at the node level for node groups that make blend file unsaveable.

Group nodes should not allow to add IO sockets to themselves directly,
in that case we actually want to add IO sockets to their underlying
node tree. Fairly straioght forward to support actually.

3 months agoFix T62595: Select co-planar faces fails
Campbell Barton [Tue, 19 Mar 2019 13:34:40 +0000 (00:34 +1100)]
Fix T62595: Select co-planar faces fails

3 months agoBLI_kdtree: refactor to support different numbers of dimensions
Campbell Barton [Mon, 18 Mar 2019 00:22:48 +0000 (11:22 +1100)]
BLI_kdtree: refactor to support different numbers of dimensions

This moves logic into kdtree_impl.h which is included in a source
file that defines the number of dimensions - so we can easily support
different numbers of dimensions as needed
(currently 3D and 4D are supported).

Macro use isn't so nice but avoids a lot of duplicate code.

3 months agoFix T61475 Particle edit does not render children if path step > 7
Clément Foucault [Tue, 19 Mar 2019 13:25:32 +0000 (14:25 +0100)]
Fix T61475 Particle edit does not render children if path step > 7

Gives 2 more bits to the segment count. Also subtract 1 because segment
count cannot be negative.

3 months agoGPencil: Include gpencil objects in BKE_object_minmax
Campbell Barton [Tue, 19 Mar 2019 13:05:58 +0000 (00:05 +1100)]
GPencil: Include gpencil objects in BKE_object_minmax

Also remove redundant check for meshes.

3 months agoCleanup: remove unused for gpencil bounds calculation
Campbell Barton [Tue, 19 Mar 2019 12:55:04 +0000 (23:55 +1100)]
Cleanup: remove unused for gpencil bounds calculation

3 months agoFix T62743: GPencil dimensions are large when no geometry exists
Campbell Barton [Tue, 19 Mar 2019 12:49:56 +0000 (23:49 +1100)]
Fix T62743: GPencil dimensions are large when no geometry exists

Use fallback when no data exists
matching bound-box for other kinds of geometry.

3 months agoEEVEE/LookDev: Fix Cache In Quad View
Jeroen Bakker [Tue, 19 Mar 2019 12:29:22 +0000 (13:29 +0100)]
EEVEE/LookDev: Fix Cache In Quad View

When using LookDev in Quad view the cache was only updated for the first
Q-view. The evaluation data of the last cache was not stored with the
lightprobe textures. As the evaluation data was reused between the
Q-views only the lightprobe textures of the first view was updated.

With this patch the evaluated data is stored amongside the actual
lightprobe textures.

Fix T59046

Reviewed By: fclem

Maniphest Tasks: T59046

3 months agoFix view selected ignoring all non-grease pencil objects
Campbell Barton [Tue, 19 Mar 2019 12:11:36 +0000 (23:11 +1100)]
Fix view selected ignoring all non-grease pencil objects

When the grease pencil was active no other objects were taken into
account. There is no need for a special case here since objects
bounding boxes are used.