blender.git
7 months agoCleanup: de-duplicate selection keymap templates
Campbell Barton [Thu, 7 Mar 2019 09:53:53 +0000 (20:53 +1100)]
Cleanup: de-duplicate selection keymap templates

7 months agoTool System: use set/add/subtract for all box select operators
Campbell Barton [Thu, 7 Mar 2019 09:33:57 +0000 (20:33 +1100)]
Tool System: use set/add/subtract for all box select operators

7 months agoUI: Re-order toolbar in Curve Edit mode
William Reynish [Thu, 7 Mar 2019 08:58:56 +0000 (09:58 +0100)]
UI: Re-order toolbar in Curve Edit mode

Makes it more consistent with Mesh Edit mode, and uses same logic for grouping.

7 months agoTool System: add radius option to the image sample tool
Campbell Barton [Thu, 7 Mar 2019 07:02:52 +0000 (18:02 +1100)]
Tool System: add radius option to the image sample tool

7 months agoCleanup: use macros to avoid repetition
Campbell Barton [Thu, 7 Mar 2019 03:18:13 +0000 (14:18 +1100)]
Cleanup: use macros to avoid repetition

7 months agoTool System: add annotation tool to image editor
Campbell Barton [Thu, 7 Mar 2019 03:03:59 +0000 (14:03 +1100)]
Tool System: add annotation tool to image editor

Also add place-holder measure tool.

7 months agoFix crash transforming image cursor outside of edit-mode
Campbell Barton [Thu, 7 Mar 2019 02:48:29 +0000 (13:48 +1100)]
Fix crash transforming image cursor outside of edit-mode

7 months agoFix T62066: Seg Fault Baking Light Cache with "--background" Flag
Clément Foucault [Thu, 7 Mar 2019 02:51:00 +0000 (03:51 +0100)]
Fix T62066: Seg Fault Baking Light Cache with "--background" Flag

7 months agoFix T59877: EEVEE: Object Info node random value does not work with Duplis
Clément Foucault [Thu, 7 Mar 2019 02:33:24 +0000 (03:33 +0100)]
Fix T59877: EEVEE: Object Info node random value does not work with Duplis

7 months agoDRW: Fix hair OSX workaround having a cap limit
Clément Foucault [Thu, 7 Mar 2019 02:22:43 +0000 (03:22 +0100)]
DRW: Fix hair OSX workaround having a cap limit

This is still is a dirty workaround.

Note that we are drawing the whole sets of point multiple times. While this
is ineficient, the main bottleneck is CPU transformation.

7 months agoCleanup: use API to reset cursor rotation
Campbell Barton [Thu, 7 Mar 2019 01:58:11 +0000 (12:58 +1100)]
Cleanup: use API to reset cursor rotation

7 months agoCleanup: class name
Campbell Barton [Thu, 7 Mar 2019 01:53:45 +0000 (12:53 +1100)]
Cleanup: class name

7 months agoUI: rename "Camera Lock" to "View Lock"
Campbell Barton [Thu, 7 Mar 2019 01:46:17 +0000 (12:46 +1100)]
UI: rename "Camera Lock" to "View Lock"

Only 1 of the options in this panel apply to cameras.

7 months ago3D View: view selected/all use empty object center
Campbell Barton [Thu, 7 Mar 2019 01:37:47 +0000 (12:37 +1100)]
3D View: view selected/all use empty object center

Empty object skipping now only skips the bounds, since you can select
the empty by it's center point and want to navigate to it.

Also share object skipping check between view all/selected.

7 months agoFix "View All" potential min/max use when all objects were skipped
Campbell Barton [Thu, 7 Mar 2019 01:31:36 +0000 (12:31 +1100)]
Fix "View All" potential min/max use when all objects were skipped

7 months agoFix 3D "View Selected" skip camera option
Campbell Barton [Thu, 7 Mar 2019 01:22:56 +0000 (12:22 +1100)]
Fix 3D "View Selected" skip camera option

7 months ago3D View: skip hidden image empties when viewing all
Campbell Barton [Thu, 7 Mar 2019 00:39:16 +0000 (11:39 +1100)]
3D View: skip hidden image empties when viewing all

D4463 by @pablodp606

7 months agoDRW: show image empty frame when the 'side' is hidden
Campbell Barton [Thu, 7 Mar 2019 00:26:28 +0000 (11:26 +1100)]
DRW: show image empty frame when the 'side' is hidden

This behavior matches back-face culled mesh objects,
where the wire outline doesn't depend on the viewing angle.

Applying this before empty visibility check for view framing,
since it's strange if viewing all gives different results
depending on back-face culling.

7 months agoFix T62259: RGB Curves behave differently in Cycles and Eevee
Clément Foucault [Wed, 6 Mar 2019 22:53:35 +0000 (23:53 +0100)]
Fix T62259: RGB Curves behave differently in Cycles and Eevee

This was due to curve being not extrapolated correctly. Also curvemap range
was not taken into account.

7 months agoUI: correct label
Campbell Barton [Wed, 6 Mar 2019 23:12:13 +0000 (10:12 +1100)]
UI: correct label

7 months agoCleanup: pylint warnings
Campbell Barton [Wed, 6 Mar 2019 14:35:58 +0000 (01:35 +1100)]
Cleanup: pylint warnings

7 months agoUnits: Fix unreported. Audio volume is not a percentage
William Reynish [Wed, 6 Mar 2019 22:19:48 +0000 (23:19 +0100)]
Units: Fix unreported. Audio volume is not a percentage

7 months agoGPencil: Fix unreported segment fault drawing with dots
Antonioya [Wed, 6 Mar 2019 18:31:01 +0000 (19:31 +0100)]
GPencil: Fix unreported segment fault drawing with dots

7 months agoGPencil: Improve quality to stroke encaps for textured materials
Antonioya [Wed, 6 Mar 2019 16:56:55 +0000 (17:56 +0100)]
GPencil: Improve quality to stroke encaps for textured materials

Before, the caps were not generated for texture materials, now, the endcaps are generated and  adapt the texture.

7 months agoMinor UI fix: Disable stereo volume alpha when stereo volume is disabled
Dalai Felinto [Wed, 6 Mar 2019 16:54:51 +0000 (13:54 -0300)]
Minor UI fix: Disable stereo volume alpha when stereo volume is disabled

7 months agoFix build for Linux systems
Dalai Felinto [Wed, 6 Mar 2019 16:51:27 +0000 (13:51 -0300)]
Fix build for Linux systems

Error introduced on rBff8a2df829fcce8780d26a18f3070ab8e850b2e6.
The folders with binary icons were deleted.

7 months agoFix stereoscopy convergence plane placement
Dalai Felinto [Wed, 6 Mar 2019 15:39:07 +0000 (12:39 -0300)]
Fix stereoscopy convergence plane placement

Note this was broken even in 2.7x.

We had a different logic for the plane wire, as for the plane itself.
And they were both wrong when changing the camera shift or the stereo
pivot.

Both of their logic is now unified and correct.

Also I had to create a new gpu batch for the quad wires, since there is
no state that allows me to filter out the geometry, and the square gpu
batch is quite different than the quad one (2d x 3d and orientation).

7 months agoFix stereo plane pass and state
Dalai Felinto [Wed, 6 Mar 2019 15:53:58 +0000 (12:53 -0300)]
Fix stereo plane pass and state

This was introduced on the MSAA fix for transparent passes (61039bf71376).

7 months agoLinux/X11: update icon in taskbar to match new icons.
Brecht Van Lommel [Wed, 6 Mar 2019 15:32:15 +0000 (16:32 +0100)]
Linux/X11: update icon in taskbar to match new icons.

Adds a few different resolutions for better quality when scaling up/down.

7 months agoLinux/freedesktop: update Blender app icon based on new guidelines.
Jakub Steiner [Fri, 1 Mar 2019 13:42:12 +0000 (14:42 +0100)]
Linux/freedesktop: update Blender app icon based on new guidelines.

* Use only scalable SVG icon.
* Add symbolic variant for accessibility.
* Remove shadow, this is added automatically.

For more information see:
https://gitlab.gnome.org/GNOME/Initiatives/issues/2
https://developer.gnome.org/hig/stable/icon-design.html.en

7 months agoUI: Name changes
William Reynish [Wed, 6 Mar 2019 15:43:37 +0000 (16:43 +0100)]
UI: Name changes

In accordance with T56648.
- Render Border -> Render Region
- Clipping Border -> Clipping Region
- Instancing 'Scale' -> 'Scale to Face Size'
- Instancing 'Rotation' -> 'Align to Vertex Normal'

Python API is left as-is, for now.

DIfferential revision: D4435

7 months agoFix T62220: Solid shading mode - Shadow glitch
Clément Foucault [Wed, 6 Mar 2019 15:15:26 +0000 (16:15 +0100)]
Fix T62220: Solid shading mode - Shadow glitch

The degenerate triangle threshold was too big. Making it an equal test can
introduce problems in other cases but I could not make it fail.

7 months agoFix T62262: Light "Show Cone" & stereoscopy volumes broken by MSAA
Clément Foucault [Wed, 6 Mar 2019 14:48:15 +0000 (15:48 +0100)]
Fix T62262: Light "Show Cone" & stereoscopy volumes broken by MSAA

Volume itself was working, but buggy. The issue was that transparent shapes
does not write to depth buffer. But the custom MSAA resolve shader discard
pixels that did not write to depth making them transparent.

Transparent passes should not be inside the MSAA passes, this is also
a matter of performance.

7 months agoCollection duplication from Outliner: add a 'duplicate hierarchy' operation.
Bastien Montagne [Wed, 6 Mar 2019 14:09:16 +0000 (15:09 +0100)]
Collection duplication from Outliner: add a 'duplicate hierarchy' operation.

Point is, you may want to duplicate your set of collections, but not
duplicate all their objects.

Some notes:
* Am rather skeptical about the practice of using operator name to
define behavior of some common exec code. Imho, that should be a single
operator with an enum to refine its behavior (@cambpellbarton may also
have an opinion here?). Left it as-is for now, because this seems to be
used by other operators too in that code. :/
* @dfelinto, @pablovazquez, @billreynish am not so happy with current
names, but cannot find really good short ones either... Also, shouldn't
we move those into a dedicated `Duplicate` sub-menu?

7 months agoFix (unreported) broken usercount of collections after duplication.
Bastien Montagne [Wed, 6 Mar 2019 13:49:27 +0000 (14:49 +0100)]
Fix (unreported) broken usercount of collections after duplication.

Was missing proper flag in library_query code, collections are also
id-users of their children collections.

7 months agoCleanup: remove no-op BKE_collection_copy_full().
Bastien Montagne [Wed, 6 Mar 2019 10:42:19 +0000 (11:42 +0100)]
Cleanup: remove no-op BKE_collection_copy_full().

That one was an empty place-holder, BKE_collection_duplicate() is now
doing that. And its call from full scene copying is not needed
currently, 'deep copy' in that case is handled in editor's
`ED_scene_add()`.

Note that at some point, we might want to move that logic into BKE, but
for now let's keep thing as they are - working.

7 months agoFix T62613: In duplicated collections objects loses patrenting.
Bastien Montagne [Wed, 6 Mar 2019 10:38:06 +0000 (11:38 +0100)]
Fix T62613: In duplicated collections objects loses patrenting.

We need to remap duplicated IDs' ID pointers to new ones if they exist.

7 months agoCleanup: remove useless extra-processing after BKE_id_new_name_validate() call.
Bastien Montagne [Wed, 6 Mar 2019 10:20:23 +0000 (11:20 +0100)]
Cleanup: remove useless extra-processing after BKE_id_new_name_validate() call.

This function already handles sorting of ID in its listbase.

7 months agoCleanup: use default ID type's name instead of generic 'Untitled' for new IDs.
Bastien Montagne [Wed, 6 Mar 2019 10:16:48 +0000 (11:16 +0100)]
Cleanup: use default ID type's name instead of generic 'Untitled' for new IDs.

7 months agoCleanup: rename BKE_library's `new_id()` to `BKE_id_new_name_validate()`.
Bastien Montagne [Wed, 6 Mar 2019 10:10:45 +0000 (11:10 +0100)]
Cleanup: rename BKE_library's `new_id()` to `BKE_id_new_name_validate()`.

The former was probably one of the worst function names in our whole
code base, totally misleading, and quiet often used as a variable name too.

7 months agoFix T61773 Bevel and Inset mouse sensitivity, and bevel tool units.
Howard Trickey [Wed, 6 Mar 2019 14:04:31 +0000 (09:04 -0500)]
Fix T61773 Bevel and Inset mouse sensitivity, and bevel tool units.

The mouse movement scale needed adjusting according to object scale,
since the amount is on the unscaled model but the viewport shows the
scaled one.
Also fixed proper units for amounts in bevel tool, as was already
done for modifier.  Percent should be comfortably adjustable by mouse.

7 months agoViewport: Fix stereoscopy volume "wires" not showing
Dalai Felinto [Wed, 6 Mar 2019 13:07:51 +0000 (10:07 -0300)]
Viewport: Fix stereoscopy volume "wires" not showing

This is unreported. When using volume opacity 0.0, the wires were not visible
(nor were they in other cases, but this was the most obvious one).

The volume itself is still glitchy, and slightly worse than 2.79. I
still don't know how to fix this though. It seems a common problem
(see T62262).

7 months agoFix T62118: Stereo drawing options visible from camera view
Dalai Felinto [Wed, 6 Mar 2019 12:08:38 +0000 (09:08 -0300)]
Fix T62118: Stereo drawing options visible from camera view

Note 1: Volume drawing still draws differently than 2.7x.
Note 2: Camera lens widget still ignores stereo.

7 months agoFix: Proportional editing menu disappears after deleting object
William Reynish [Wed, 6 Mar 2019 13:59:09 +0000 (14:59 +0100)]
Fix: Proportional editing menu disappears after deleting object

Differential Revision: D4460

7 months agoFix grease pencil sculpt circle keymap
Campbell Barton [Wed, 6 Mar 2019 13:35:53 +0000 (00:35 +1100)]
Fix grease pencil sculpt circle keymap

Missed when updating circle select operators.

7 months agoMissed last commit
Campbell Barton [Wed, 6 Mar 2019 13:17:54 +0000 (00:17 +1100)]
Missed last commit

7 months agoDNA: remove none particle brush & deprecated flags
Campbell Barton [Wed, 6 Mar 2019 13:07:23 +0000 (00:07 +1100)]
DNA: remove none particle brush & deprecated flags

The none brush doesn't make sense to have anymore with the tool system.

Also remove deprecated flags & types for object, armature & text.

7 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Wed, 6 Mar 2019 12:45:21 +0000 (13:45 +0100)]
Merge branch 'blender2.7'

7 months agoFix Cycles build error on non-x86 processors.
Brecht Van Lommel [Wed, 6 Mar 2019 12:27:29 +0000 (13:27 +0100)]
Fix Cycles build error on non-x86 processors.

7 months agoFix T62223: Particle brushes disable select tools
Campbell Barton [Wed, 6 Mar 2019 10:48:22 +0000 (21:48 +1100)]
Fix T62223: Particle brushes disable select tools

7 months agoFix T62223: Particle select tools also show brush settings
Campbell Barton [Wed, 6 Mar 2019 10:28:41 +0000 (21:28 +1100)]
Fix T62223: Particle select tools also show brush settings

7 months agoFix T62230: Annotations corrupts GPencil brushes
Antonioya [Wed, 6 Mar 2019 09:54:38 +0000 (10:54 +0100)]
Fix T62230: Annotations corrupts GPencil brushes

Use annotations inside grease pencil drawing mode is something incompatible by design. Actually, the annotations are disabled in overlay panel for 2D template and the tool icon is not in the toolbar.

The unique way to get annotations was using D key, but this is wrong.

If you are inside drawing mode, all the events are captured by paint operator and to capture annotations, the operator must be canceled and the mode changed, but this change breaks several things.

It's not logic add annotation inside darwing mode, because you can simply add a new layer and write the text you want.

This change checks the mode and cancel the annotations if the mode is not thje right one.

7 months agoFix T62241: Repeat last translate, wrong direction
Campbell Barton [Wed, 6 Mar 2019 07:08:27 +0000 (18:08 +1100)]
Fix T62241: Repeat last translate, wrong direction

Only use orientation value when the operator uses orientation axis.

Own error in 03da3b6593a24

7 months agoFix T62236: Crash texture painting
Campbell Barton [Wed, 6 Mar 2019 05:47:02 +0000 (16:47 +1100)]
Fix T62236: Crash texture painting

Caused by 10d9a2494fc5e which removed 5x length clamping.

7 months agoCleanup: unused function warning
Campbell Barton [Wed, 6 Mar 2019 05:20:36 +0000 (16:20 +1100)]
Cleanup: unused function warning

7 months agoFix T62210: endless loop in kd tree lookup
Campbell Barton [Wed, 6 Mar 2019 03:46:58 +0000 (14:46 +1100)]
Fix T62210: endless loop in kd tree lookup

Reset nodes after the first balance call.

7 months agoRevert "Fix T62210: endless loop in kd tree lookup"
Campbell Barton [Wed, 6 Mar 2019 03:29:39 +0000 (14:29 +1100)]
Revert "Fix T62210: endless loop in kd tree lookup"

This reverts commit 301bcf771dec827138412ca6e7a25e2269eb5e9e.

Caused crash entering particle edit mode.

7 months agoFix T61917: Metaball family inherits wrong resolution by deleted object
Campbell Barton [Wed, 6 Mar 2019 02:16:48 +0000 (13:16 +1100)]
Fix T61917: Metaball family inherits wrong resolution by deleted object

Synchronizing values between object data is error prone (not updated on
creation or renaming), add an update to have them working as they did
in 2.79.

7 months agoDRW: Fix State tracking being off when calling GPU_framebuffer_clear
Clément Foucault [Wed, 6 Mar 2019 01:40:36 +0000 (02:40 +0100)]
DRW: Fix State tracking being off when calling GPU_framebuffer_clear

State tracking works in pretty much all cases but calling the clear command
does change the write mask outside the draw manager. For now we just reset
the write mask before each pass.

Fix T62203 The selected bone is not highlighted inside the other bone.

7 months agoCleanup: remove redundant file argument
Campbell Barton [Wed, 6 Mar 2019 00:18:17 +0000 (11:18 +1100)]
Cleanup: remove redundant file argument

7 months agoWM: match select all behavior for the info space
Campbell Barton [Wed, 6 Mar 2019 00:11:08 +0000 (11:11 +1100)]
WM: match select all behavior for the info space

Adds select invert to the operator.

D4454 by @Poulpator

7 months agoCleanup: style
Campbell Barton [Tue, 5 Mar 2019 23:51:11 +0000 (10:51 +1100)]
Cleanup: style

7 months agoCleanup: Use GPU_depth_test instead of glEnable/glDisable
Clément Foucault [Tue, 5 Mar 2019 21:01:02 +0000 (22:01 +0100)]
Cleanup: Use GPU_depth_test instead of glEnable/glDisable

7 months agoDRW: Fix GL state issues due to state not being reset after drawing
Clément Foucault [Tue, 5 Mar 2019 20:59:36 +0000 (21:59 +0100)]
DRW: Fix GL state issues due to state not being reset after drawing

Callbacks were drawing with the wrong blend equation and that made some
tools drawing fail.

7 months agoUV/VCol layers creation: add option to not init those new data.
Bastien Montagne [Tue, 5 Mar 2019 20:34:48 +0000 (21:34 +0100)]
UV/VCol layers creation: add option to not init those new data.

`ED_mesh_uv_texture_add()`/`ED_mesh_color_add()` would always either
copy data from current active one, or (for UVs), generate default
'valid' UVs for every face.

This commit adds an option to not do that, just keeping default values
from raw CDLayer creation. It is only used/exposed from RNA API
currently.

This is especially useful for importer add-ons, since some formats
support multiple layers of those kind, as well as 'partial' dataset not
explicitely defining values for all mesh items.

Preliminary step to fix T62224.

7 months agoFile Editor: Refactor 'new dir' / renaming code.
Bastien Montagne [Tue, 5 Mar 2019 20:01:45 +0000 (21:01 +0100)]
File Editor: Refactor 'new dir' / renaming code.

We really do not need two 256 chars variables to hanlde renaming, a mere
pair of flags can handle the situation just as well.

Also, scroll to newly renamed item, will help when one want to find
again the directory they just added and rename.

At some point we'll probably want to refactor scrolling further (to make
it fully out of rename code/context e.g.), but for now think this will do.

7 months agoFix T58715: File Browser: Creating "New Folder" issues with too many existing folders...
Bastien Montagne [Tue, 5 Mar 2019 15:17:09 +0000 (16:17 +0100)]
Fix T58715: File Browser: Creating "New Folder" issues with too many existing folders in display.

Smotthscroll to edited entry was broken since filelisting was
rewritten to become async...

7 months agoFix T61063, T62195: Python scripts should run before depsgraph evaluation.
Brecht Van Lommel [Tue, 5 Mar 2019 18:17:36 +0000 (19:17 +0100)]
Fix T61063, T62195: Python scripts should run before depsgraph evaluation.

This was changed (accidentally?) in d192d723123a, now go back to behavior more
similar to 2.7. Python scripts should be able to set up drivers or do other
changes that will then be taken into account when evaluating the scene for the
first time.

The more tricky thing is that Python scripts now run before ED_editors_init,
but given what happens in there it seems safe.

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

7 months agoFix T62112: wrong curve face count
Jacques Lucke [Tue, 5 Mar 2019 18:06:59 +0000 (19:06 +0100)]
Fix T62112: wrong curve face count

Reviewers: brecht

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

7 months agoCleanup: add asserts to catch cases where wrong attribute type is used.
Brecht Van Lommel [Tue, 5 Mar 2019 17:49:47 +0000 (18:49 +0100)]
Cleanup: add asserts to catch cases where wrong attribute type is used.

7 months agoFix T61778: Crash when adding material slot to object
Clément Foucault [Tue, 5 Mar 2019 17:58:22 +0000 (18:58 +0100)]
Fix T61778: Crash when adding material slot to object

For some reason the mat_nr can be superior to the number of material slots
present on an object. Just cap this number to the max available slot.

7 months agoFix Cycles bug rendering with multiple UV maps after recent changes.
Brecht Van Lommel [Tue, 5 Mar 2019 17:39:55 +0000 (18:39 +0100)]
Fix Cycles bug rendering with multiple UV maps after recent changes.

7 months agoGPUMaterial: Make Shader Output nodes inside nodegroups work
Clément Foucault [Tue, 5 Mar 2019 16:24:31 +0000 (17:24 +0100)]
GPUMaterial: Make Shader Output nodes inside nodegroups work

Works as expected and mimics Cycles behavior.

The patch is a bit hacky: In order to not touch the lower level function,
we search for the active output inside groups (recursively) and the first
valid one is then copied (or extracted if you want) in the previous parent
nodetree. So we recursively extract the output node back to the main
nodetree while preserving the links through the nodegroups interfaces.

This way everything works as expected in gpu tree evaluation and bsdf
tagging.

Fix T61869 Material Output Node Inside Node Group Renders Pink in Eevee

7 months agoDRW: Fix rasterizer discard messing with clear commands
Clément Foucault [Tue, 5 Mar 2019 15:42:18 +0000 (16:42 +0100)]
DRW: Fix rasterizer discard messing with clear commands

Fixes T62179 Viewport Ghosting on rigs

7 months agoBLI_memiter: use ASAN memory poison
Campbell Barton [Tue, 5 Mar 2019 16:16:38 +0000 (03:16 +1100)]
BLI_memiter: use ASAN memory poison

Detects invalid memory use when WITH_COMPILER_ASAN is enabled.

7 months agoUI: Nicer report when trying to edit external libraries
Pablo Vazquez [Tue, 5 Mar 2019 16:06:11 +0000 (17:06 +0100)]
UI: Nicer report when trying to edit external libraries

Rename 'libdata' to 'library data'.

7 months agoCleanup: warning in release builds
Campbell Barton [Tue, 5 Mar 2019 15:48:51 +0000 (02:48 +1100)]
Cleanup: warning in release builds

7 months agoFix T62208: constant detail picker not taking object scale into account
Jacques Lucke [Tue, 5 Mar 2019 15:44:37 +0000 (16:44 +0100)]
Fix T62208: constant detail picker not taking object scale into account

7 months agoDRW: use memiter for on screen text allocation
Campbell Barton [Tue, 5 Mar 2019 15:34:30 +0000 (02:34 +1100)]
DRW: use memiter for on screen text allocation

Avoid allocation for each string,
improves redraw speed for text heavy views.

A contrived test showed FPS ~18.5% speedup but this doesn't represent
typical usage.

7 months agoFix T62210: endless loop in kd tree lookup
Jacques Lucke [Tue, 5 Mar 2019 15:20:43 +0000 (16:20 +0100)]
Fix T62210: endless loop in kd tree lookup

The problem was that `balance` expected that all node children
are set to `KD_NODE_UNSET` by default.
However, this might not be the case when `balance` is called
more than once.

The balance function might change the order of nodes even
when no new point has been inserted.

7 months agoRNA: remove Screen.layout_name
Campbell Barton [Tue, 5 Mar 2019 14:48:43 +0000 (01:48 +1100)]
RNA: remove Screen.layout_name

This is no longer used.

7 months agoCycles: Changed standalone XML parser to read UV as float2
Stefan Werner [Tue, 5 Mar 2019 14:25:36 +0000 (15:25 +0100)]
Cycles: Changed standalone XML parser to read UV as float2

7 months agoDRW: support clipping for bone verts
Campbell Barton [Tue, 5 Mar 2019 14:14:13 +0000 (01:14 +1100)]
DRW: support clipping for bone verts

7 months agoTool System: add select tools to particle edit
Campbell Barton [Tue, 5 Mar 2019 13:28:06 +0000 (00:28 +1100)]
Tool System: add select tools to particle edit

7 months agoFix T62163: Duplicating particle system results in crash
Jacques Lucke [Tue, 5 Mar 2019 14:24:54 +0000 (15:24 +0100)]
Fix T62163: Duplicating particle system results in crash

There were two problems:
1. `mesh_get_eval_final` has to be called with the evaluated object.
2. Particle systems have to have unique names within an object.
The depsgraph seems to use the particle system name as identifier.
This issue is actually independent of duplication.
The old code used a small hack to create unique names.

Reviewers: brecht

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

7 months agoGPencil: Disable proportional for Duplicate
Antonioya [Tue, 5 Mar 2019 14:11:55 +0000 (15:11 +0100)]
GPencil: Disable proportional for Duplicate

When duplicates a stroke using Shift+D, the proportional must be disabled.

7 months agoMerge branch 'blender2.7'
Stefan Werner [Tue, 5 Mar 2019 14:06:09 +0000 (15:06 +0100)]
Merge branch 'blender2.7'

7 months agoCycles: Added Float2 attribute type.
Brecht Van Lommel [Tue, 5 Mar 2019 13:54:54 +0000 (14:54 +0100)]
Cycles: Added Float2 attribute type.

Float2 are now a new type for attributes in Cycles. Before, the choices
for attribute storage were float and float3, the latter padded to
float4. This meant that UV maps were inflated to twice the size
necessary.

Reviewers: brecht, sergey

Reviewed By: brecht

Subscribers: #cycles

Tags: #cycles

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

7 months agoFix T62216: order of items flipped in some menus like object mode.
Brecht Van Lommel [Tue, 5 Mar 2019 13:35:52 +0000 (14:35 +0100)]
Fix T62216: order of items flipped in some menus like object mode.

7 months agoFix T61796: Linking a collection with instances inside will place the instanced objec...
Bastien Montagne [Tue, 5 Mar 2019 13:39:43 +0000 (14:39 +0100)]
Fix T61796: Linking a collection with instances inside will place the instanced object in the scene.

Do not force to link indirectly linked collections into current scene,
that is usually not desired. Note that user can always add this link
manually if they want.

All this 'implicit instantiation' post-linking process is rather hairy
to get it correct, hope this time it's not breaking something else...

7 months agoMerge branch 'blender2.7'
Jeroen Bakker [Tue, 5 Mar 2019 13:26:28 +0000 (14:26 +0100)]
Merge branch 'blender2.7'

7 months agoFix T58953: Lamp data not always set
Jeroen Bakker [Tue, 5 Mar 2019 13:22:54 +0000 (14:22 +0100)]
Fix T58953: Lamp data not always set

The Lamp data was not always set. When using CUDA or CPU it was, but when using OpenCL
without `OBJECT_MOTION` `sd->lamp` not updated to the actual lamp. This made the
TextureCoordinate output the wrong normal when used in a light shader.

As the normal was incorrect it made the IES node render incorrectly.
(what is the default for the IES node).

By setting the lamp data when no `__OBJECT_MOTION__` compile directive is present makes
sure that the normal is correctly calculated.

Fix D4450

Reviewed By: Brecht van Lommel

7 months agoFix T61780: Crash when trying to access screen areas through the outliner.
Bastien Montagne [Tue, 5 Mar 2019 13:06:19 +0000 (14:06 +0100)]
Fix T61780: Crash when trying to access screen areas through the outliner.

ScreenArea->type is NULL-ified on read, and need to be initialized
(usually by `ED_area_initialize()`), but RNA can also access it before
it happens, so need to do it itself...

7 months agoFix upside down tool menus
Campbell Barton [Tue, 5 Mar 2019 12:51:10 +0000 (23:51 +1100)]
Fix upside down tool menus

Regression from 4dd575e5ab55e153f8

7 months agoTool System: add node circle select tool
Campbell Barton [Tue, 5 Mar 2019 12:29:49 +0000 (23:29 +1100)]
Tool System: add node circle select tool

7 months agoFix T62202: circle select does not work on hair points
Jacques Lucke [Tue, 5 Mar 2019 12:13:04 +0000 (23:13 +1100)]
Fix T62202: circle select does not work on hair points

7 months agoFix parenting objects to bones/vertices causes offset
Philipp Oeser [Tue, 5 Feb 2019 14:43:34 +0000 (15:43 +0100)]
Fix parenting objects to bones/vertices causes offset

This reverts part of rBbc5482337669.
Problem with above commit is that the evaluated object seems to not have
partype, par1, par2, par3 copied from the original (yet). Using original
object instead now.
Second issue (when parenting to 'Bone Relative') is that the bones
BONE_RELATIVE_PARENTING flag is set on the original, but not the
evaluated bone (yet), setting this on both now.

Fixes T60623 (and part of T59352)

Reviewers: brecht, sergey

Maniphest Tasks: T60623

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

7 months agoFix T60585: threadripper CPU only using 16 threads for e.g. sculpting.
Brecht Van Lommel [Tue, 5 Mar 2019 11:43:40 +0000 (12:43 +0100)]
Fix T60585: threadripper CPU only using 16 threads for e.g. sculpting.

This reverts the changes from ce927e1 to put the main and job threads on
node 0. The problem is that all threads created as children from these
threads will inherit the NUMA node and so will end up on the same node.
This can be fixed case-by-case by assigning the NUMA node for every child
thread, however this is difficult for external libraries and OpenMP, and
out of our control for plugins like external renderers.

7 months agoTool System: use set/add/subtract for all circle select operators
Campbell Barton [Tue, 5 Mar 2019 11:26:45 +0000 (22:26 +1100)]
Tool System: use set/add/subtract for all circle select operators

This applies changes from the 3D view circle select to other operators.