7 months agoMultires: Fix crash on exit when sculpting with modifiers
Sergey Sharybin [Thu, 7 Mar 2019 15:07:34 +0000 (16:07 +0100)]
Multires: Fix crash on exit when sculpting with modifiers

The SubdivCCG structure was re-allocated, but the cached one in
the sculpt session was still pointing to an original one.

This is rather a workaround, but is least evil from what i can
currently think. Remember something similar was also required in
2.7 as well.

Definitely need to revision this change.

7 months agoSculpt; Fix memory leak on redraw normals update
Sergey Sharybin [Thu, 7 Mar 2019 14:40:04 +0000 (15:40 +0100)]
Sculpt; Fix memory leak on redraw normals update

7 months agoFix T62271: Particles with multires crash on sculpt
Sergey Sharybin [Thu, 7 Mar 2019 14:27:31 +0000 (15:27 +0100)]
Fix T62271: Particles with multires crash on sculpt

In fact, any modifier on top of multires would lead to crash.
Was missing pointer update.

Basically, bring the control flow closer to 2.7.

7 months agoFix T61671: Too strong too dark text shadow in Blender Light theme
Jacques Lucke [Thu, 7 Mar 2019 14:55:11 +0000 (15:55 +0100)]
Fix T61671: Too strong too dark text shadow in Blender Light theme

Reviewers: pablovazquez

Differential Revision:

7 months agoFix T61761: Randomize Transform is an object mode operator
Jacques Lucke [Thu, 7 Mar 2019 14:54:08 +0000 (15:54 +0100)]
Fix T61761: Randomize Transform is an object mode operator

Reviewers: brecht, billreynish

Differential Revision:

7 months agoUI: Change UI name of Draw Labels to Include Labels
William Reynish [Thu, 7 Mar 2019 14:07:16 +0000 (15:07 +0100)]
UI: Change UI name of Draw Labels to Include Labels

For compliance with recent naming conventions.

7 months agoUI: Use sub-panels inside Grease Pencil Onion Skinning panel
William Reynish [Thu, 7 Mar 2019 13:56:31 +0000 (14:56 +0100)]
UI: Use sub-panels inside Grease Pencil Onion Skinning panel

Reviewers: Antonio Vazquez (antoniov)

Differential Revision: D4465

7 months agoImage: use sample size instead of radius
Campbell Barton [Thu, 7 Mar 2019 13:36:48 +0000 (00:36 +1100)]
Image: use sample size instead of radius

It wasn't possible to sample a 2x2 region.

7 months agoCleanup: redundant select flush
Campbell Barton [Thu, 7 Mar 2019 13:17:52 +0000 (00:17 +1100)]
Cleanup: redundant select flush

7 months agoTool System: use set/add/subtract for all lasso select operators
Campbell Barton [Thu, 7 Mar 2019 12:41:32 +0000 (23:41 +1100)]
Tool System: use set/add/subtract for all lasso select operators

7 months agoFix T62289: crash with texture paint slots and missing node group datablock.
Brecht Van Lommel [Thu, 7 Mar 2019 11:22:38 +0000 (12:22 +0100)]
Fix T62289: crash with texture paint slots and missing node group datablock.

7 months agoMultires: Fiux memory leak
Sergey Sharybin [Thu, 7 Mar 2019 11:16:25 +0000 (12:16 +0100)]
Multires: Fiux memory leak

The work data for materials flags was never freed.

7 months agoRefactor building the draw string for floats and ints
Jacques Lucke [Thu, 7 Mar 2019 11:01:32 +0000 (12:01 +0100)]
Refactor building the draw string for floats and ints

Differential Revision:

7 months agoFix T62280: driver functions added in load_post broken after recent changes.
Brecht Van Lommel [Thu, 7 Mar 2019 10:40:02 +0000 (11:40 +0100)]
Fix T62280: driver functions added in load_post broken after recent changes.

Evaluate the dependency graph a bit later still. This kind of worked before
because it was using the drive namespace from the previously loaded .blend
file but that's of course wrong.

7 months agoI18n: Enable Thai language.
Bastien Montagne [Thu, 7 Mar 2019 10:45:48 +0000 (11:45 +0100)]
I18n: Enable Thai language.

7 months agoRefactor CDData masks, to have one mask per mesh elem type.
Bastien Montagne [Thu, 7 Mar 2019 10:13:40 +0000 (11:13 +0100)]
Refactor CDData masks, to have one mask per mesh elem type.

We already have different storages for cddata of verts, edges etc.,
'simply' do the same for the mask flags we use all around Blender code
to request some data, or limit some operation to some layers, etc.

Reason we need this is that some cddata types (like Normals) are
actually shared between verts/polys/loops, and we don’t want to generate
clnors everytime we request vnors!

As a side note, this also does final fix to T59338, which was the
trigger for this patch (need to request computed loop normals for
another mesh than evaluated one).

Reviewers: brecht, campbellbarton, sergey

Differential Revision:

7 months agoTools: Add Radius tool to Grease Pencil toolbar
William Reynish [Thu, 7 Mar 2019 10:12:30 +0000 (11:12 +0100)]
Tools: Add Radius tool to Grease Pencil toolbar

Icon pending.

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

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:

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

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

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:

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

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