blender.git
7 weeks agoDRW/Eevee: Fix camera texture coordinates in renders
Clément Foucault [Wed, 22 May 2019 14:09:03 +0000 (16:09 +0200)]
DRW/Eevee: Fix camera texture coordinates in renders

This patch fix the issue introduced by recent refactor and fixes
computation when using overscans.

7 weeks agoUI: Sequencer menus
William Reynish [Wed, 22 May 2019 12:59:04 +0000 (14:59 +0200)]
UI: Sequencer menus

Final small tweaks and fixes by Peter Fog:

  - Remove commented lines
  - Set 'Both' handle selection before Left and Right
  - Small tweaks to Strip and Context menus

Any further tweaks will be postponed for 2.81

7 weeks agoWorkbench: FXAA Artifacts
Jeroen Bakker [Wed, 22 May 2019 12:02:36 +0000 (14:02 +0200)]
Workbench: FXAA Artifacts

When using FXAA when rendering to an image the alpha channel was not
correct what lead to visual artifacts.

These artifacts come from the FXAA function that overwrites the alpha
channel with the original Luma of the texel. In the shader this can be
turned on or off. But at the end it always overwrites the alpha with the
luminance.

We didn't use this feature, but the alpha of the resulting pixel still
contained the luma value what lead to render artifacts.
By overwriting the alpha channel with the original alpha we remove these
artifacts.

Reviewed By: fclem

Maniphest Tasks: T64947

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

7 weeks agoRNA: fix missing depsgraph update tagging in FCurve methods.
Alexander Gavrilov [Wed, 22 May 2019 11:40:11 +0000 (14:40 +0300)]
RNA: fix missing depsgraph update tagging in FCurve methods.

Add tags in fcurve.update(), keyframe_point.insert/add/remove(),
fmodifier.control_points.add/remove().

7 weeks agoRNA: allow 'TIME' on Actions and any IDs with AnimData in ID.update_tag.
Alexander Gavrilov [Wed, 22 May 2019 11:33:28 +0000 (14:33 +0300)]
RNA: allow 'TIME' on Actions and any IDs with AnimData in ID.update_tag.

7 weeks agoFix: Auto Merge icon state were wrongly swapped
William Reynish [Wed, 22 May 2019 12:21:31 +0000 (14:21 +0200)]
Fix: Auto Merge icon state were wrongly swapped

7 weeks agoDRW: Only change VAO if geometry changes
Clément Foucault [Wed, 22 May 2019 11:27:43 +0000 (13:27 +0200)]
DRW: Only change VAO if geometry changes

7 weeks agoGPU: Refactor GPU_batch_draw_range_ex
Clément Foucault [Wed, 22 May 2019 09:31:49 +0000 (11:31 +0200)]
GPU: Refactor GPU_batch_draw_range_ex

Rename it to GPU_batch_draw_advanced and use base instance when possible.

Also add GPU_batch_bind to bind the vao independantly of drawing commands.

7 weeks agoFox drwview
Clément Foucault [Tue, 21 May 2019 22:32:12 +0000 (00:32 +0200)]
Fox drwview

7 weeks agoCleanup: DRW: Remove, rename stuffs
Clément Foucault [Tue, 21 May 2019 21:56:55 +0000 (23:56 +0200)]
Cleanup: DRW: Remove, rename stuffs

7 weeks agoDRW: Do not update the view ubo for each pass
Clément Foucault [Tue, 21 May 2019 20:11:53 +0000 (22:11 +0200)]
DRW: Do not update the view ubo for each pass

Only update if the view changes.

7 weeks agoFix T64806 Missing sss_blur pass in EEVEE crashing indirect light bake
Clément Foucault [Tue, 21 May 2019 19:31:58 +0000 (21:31 +0200)]
Fix T64806 Missing sss_blur pass in EEVEE crashing indirect light bake

7 weeks agoDRW: DRWView: Finish refactor
Clément Foucault [Tue, 21 May 2019 19:29:25 +0000 (21:29 +0200)]
DRW: DRWView: Finish refactor

7 weeks agoEevee: Make lookdev shader use common_view_lib
Clément Foucault [Tue, 21 May 2019 18:28:14 +0000 (20:28 +0200)]
Eevee: Make lookdev shader use common_view_lib

7 weeks agoEevee: Make lightprobes work with new DRWView system
Clément Foucault [Tue, 21 May 2019 18:24:54 +0000 (20:24 +0200)]
Eevee: Make lightprobes work with new DRWView system

7 weeks agoEevee: Make Planar reflections work with the new DRWView system
Clément Foucault [Tue, 21 May 2019 15:53:49 +0000 (17:53 +0200)]
Eevee: Make Planar reflections work with the new DRWView system

Also get rid of clip_block which did the same as clipplanes inside
common_view_lib.glsl.

7 weeks agoDRW: Add view param to DRW_culling_* functions
Clément Foucault [Tue, 21 May 2019 14:55:17 +0000 (16:55 +0200)]
DRW: Add view param to DRW_culling_* functions

7 weeks agoEevee: Use DRW_view_* API instead of DRW_viewport_matrix_*
Clément Foucault [Tue, 21 May 2019 10:34:48 +0000 (12:34 +0200)]
Eevee: Use DRW_view_* API instead of DRW_viewport_matrix_*

7 weeks agoGPencil: Use DRW_view_* API instead of DRW_viewport_matrix_*
Clément Foucault [Tue, 21 May 2019 08:35:59 +0000 (10:35 +0200)]
GPencil: Use DRW_view_* API instead of DRW_viewport_matrix_*

7 weeks agoBLI_memblock: Refactor for faster iteration and allocation
Clément Foucault [Mon, 20 May 2019 22:54:03 +0000 (00:54 +0200)]
BLI_memblock: Refactor for faster iteration and allocation

Remove the clear allocation flag as it has little impact since there should
be very few allocation per redraw.

Make BLI_memblock_alloc and BLI_memblock_iterstep much more cache efficient
removing them almost entirely from performance profiles.

7 weeks agoWorkbench: Fix TAA logic
Clément Foucault [Tue, 21 May 2019 08:07:41 +0000 (10:07 +0200)]
Workbench: Fix TAA logic

Having both TAA and FXAA enabled at the same time resulted in conflicts.
The jitter_index was incremented twice before being used instead of once.

7 weeks agoWorkbench: Use DRWView instead of DRW_viewport_matrix_*
Clément Foucault [Mon, 20 May 2019 18:33:56 +0000 (20:33 +0200)]
Workbench: Use DRWView instead of DRW_viewport_matrix_*

Continuing the transition to the new API

7 weeks agoDRW: Remove some usage of DRW_viewport_matrix_get
Clément Foucault [Mon, 20 May 2019 17:35:20 +0000 (19:35 +0200)]
DRW: Remove some usage of DRW_viewport_matrix_get

7 weeks agoDRW: Remove DRW_state_clip_planes_reset
Clément Foucault [Mon, 20 May 2019 17:11:21 +0000 (19:11 +0200)]
DRW: Remove DRW_state_clip_planes_reset

7 weeks agoDRW: Remove DRW_state_clip_planes_set_from_rv3d
Clément Foucault [Mon, 20 May 2019 17:05:02 +0000 (19:05 +0200)]
DRW: Remove DRW_state_clip_planes_set_from_rv3d

This should be handled by DST.view_default

7 weeks agoDRW: Add DRWView to improve different view handling
Clément Foucault [Mon, 20 May 2019 16:01:42 +0000 (18:01 +0200)]
DRW: Add DRWView to improve different view handling

This will have multiple benefit.

TODO detail benefits (culling, more explicit, handling of clipping planes)

For now the view usage is wrapped to make changes needed more progressive.

7 weeks agoEevee: Lookdev: Make winmat point to negative Z
Clément Foucault [Tue, 21 May 2019 18:47:17 +0000 (20:47 +0200)]
Eevee: Lookdev: Make winmat point to negative Z

7 weeks agoCleanup: DRW: Refactor code for better readability and simplification
Clément Foucault [Sun, 19 May 2019 14:54:01 +0000 (16:54 +0200)]
Cleanup: DRW: Refactor code for better readability and simplification

- Remove DST.frontface and DST.backface.
- Separate uniform update into its own function draw_update_uniforms.

7 weeks agoTemplates: updated 2D animation template
Brecht Van Lommel [Mon, 20 Aug 2018 12:29:32 +0000 (14:29 +0200)]
Templates: updated 2D animation template

From the grease pencil team.

7 weeks agoBLI_memiter: unpoison memory before freeing it
Jacques Lucke [Wed, 22 May 2019 10:33:15 +0000 (12:33 +0200)]
BLI_memiter: unpoison memory before freeing it

7 weeks agoFix T64480: Tweak needed to Audaspace CMake options
Jörg Müller [Wed, 22 May 2019 10:14:51 +0000 (12:14 +0200)]
Fix T64480: Tweak needed to Audaspace CMake options

The issue was that Audaspace options ended up in the cmake cache though
they should not be there.

Also reverting indentation change by @ideasman42.
Thanks to @mont29 for reporting and helping with the fix.

7 weeks agoFix T64981: background images do not come along with linked cameras
Brecht Van Lommel [Wed, 22 May 2019 08:44:02 +0000 (10:44 +0200)]
Fix T64981: background images do not come along with linked cameras

7 weeks agoFix T64972: object convert to mesh not working after recent changes
Brecht Van Lommel [Wed, 22 May 2019 08:32:40 +0000 (10:32 +0200)]
Fix T64972: object convert to mesh not working after recent changes

This was the only remaining cases that used a string lookup, which didn't
work anymore now that it's no longer a real value in the context.

7 weeks agoFix T64969: changing color space in image texture node loses changes
Brecht Van Lommel [Wed, 22 May 2019 08:06:31 +0000 (10:06 +0200)]
Fix T64969: changing color space in image texture node loses changes

Don't allow changing it for painted images until they have been saved, similar
to sidebar panels. This could be solved better, for now the important thing is
not to lose changes.

7 weeks agoFix T64965: crash using masks in texture paint mode
Brecht Van Lommel [Wed, 22 May 2019 07:59:52 +0000 (09:59 +0200)]
Fix T64965: crash using masks in texture paint mode

7 weeks agoFix T64974: misisng multi-object edit for some curve operators, like smooth
Brecht Van Lommel [Wed, 22 May 2019 07:35:14 +0000 (09:35 +0200)]
Fix T64974: misisng multi-object edit for some curve operators, like smooth

7 weeks agoFix T64499: edit mode display glitch on Intel HD 4x00 and Windows 7/8
Brecht Van Lommel [Tue, 21 May 2019 21:59:57 +0000 (23:59 +0200)]
Fix T64499: edit mode display glitch on Intel HD 4x00 and Windows 7/8

There may well be more vertex shaders that need this, but I couldn't find them
in my testing.

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

7 weeks agoUI: tweak order of shading mode display
Campbell Barton [Wed, 22 May 2019 05:15:55 +0000 (15:15 +1000)]
UI: tweak order of shading mode display

Order 'Matcaps' first instead of 'Flat'.
Order 'Material' first instead of 'Single'.

While we don't have to order defaults first, it's strange
to have obscure options first (in the case of 'Flat').

7 weeks agoUI: use term 'Factory Settings' for preference menu
Campbell Barton [Wed, 22 May 2019 04:33:02 +0000 (14:33 +1000)]
UI: use term 'Factory Settings' for preference menu

It's not clear what 'Defaults' mean in this context because we have
the defaults the users has saved & factory defaults.

7 weeks agoPreferences: add handler for loading factory preferences
Campbell Barton [Wed, 22 May 2019 04:28:10 +0000 (14:28 +1000)]
Preferences: add handler for loading factory preferences

Allows app-templates to define their own adjustments to preferences.
This matches `load_factory_startup_post`, use when loading preferences.

7 weeks agoWM: call wm_file_read_post after resetting preferences
Campbell Barton [Wed, 22 May 2019 04:05:22 +0000 (14:05 +1000)]
WM: call wm_file_read_post after resetting preferences

Also avoid diverging code paths for loading startup & preferences.

7 weeks agoFix T63852: Invalid keymaps written
Campbell Barton [Wed, 22 May 2019 03:22:45 +0000 (13:22 +1000)]
Fix T63852: Invalid keymaps written

Track-pad & NDOF events were using KM_NOTHING which wasn't included in
the RNA enum, causing the value to be an empty string in exported key-map
(which then failed to load back).

Add back 'Nothing' value, keep it last since it's not used often.

8 weeks agoFix WITH_PYTHON_MODULE linking
Campbell Barton [Wed, 22 May 2019 01:20:40 +0000 (11:20 +1000)]
Fix WITH_PYTHON_MODULE linking

Also remove bf_blenfont since it's not used by creator directly.

8 weeks agoFix WITH_HEADLESS build
Campbell Barton [Wed, 22 May 2019 00:34:34 +0000 (10:34 +1000)]
Fix WITH_HEADLESS build

8 weeks agoGPU_select_buffer_stride_realign: fix crash when one of the rect's dimensions is 0.
mano-wii [Tue, 21 May 2019 23:56:27 +0000 (20:56 -0300)]
GPU_select_buffer_stride_realign: fix crash when one of the rect's dimensions is 0.

8 weeks agodna_genfile: add SDNA struct/elem queries that use alias names
Campbell Barton [Tue, 21 May 2019 23:15:06 +0000 (09:15 +1000)]
dna_genfile: add SDNA struct/elem queries that use alias names

Allow versioning code to use checks which use run-time naming
instead of the old names which are only listed in dna_rename_defs.h.

Addresses T64791.

8 weeks agoCleanup: minor corrections
Campbell Barton [Tue, 21 May 2019 22:39:15 +0000 (08:39 +1000)]
Cleanup: minor corrections

8 weeks agoRemove "_base*" from context API
Dalai Felinto [Tue, 21 May 2019 13:49:05 +0000 (10:49 -0300)]
Remove "_base*" from context API

We are not exposing RNA_ObjectBase in the 2.80 API.

Thus we can't have operators relying on it (e.g, CTX_data_visible_bases,
CTX_data_active_base, ...). Otherwise users won't be able to override
context for these operators.

This commit keep the CTX_data_.*bases() functions around so we don't
need to change the operators and potentially break things that late into
2.80. However as far as the Python scripters are concerned there is no
base to be overriden, ever.

That also simplify the guessing game addon developers have to play when
trying to override an operatori context. They still need to find whether an
operator requires editables, visibles, selected, ... objects. But at
least they don't need to find out whether the operators need base or
object.

8 weeks agoUI: Edit Mode Options panel cleanup
William Reynish [Tue, 21 May 2019 20:50:02 +0000 (22:50 +0200)]
UI: Edit Mode Options panel cleanup

  - Move Live Unwrap to UV menu
  - Move Auto Merge Threshold into a sub-section of Auto Merge to make the relationships clearer

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

Reviewers: Brecht Van Lommel, Pablo Vazquez

8 weeks agoFix T58492: Removes jitter when using adaptive smoke domains
Sebastián Barschkis [Tue, 21 May 2019 20:07:35 +0000 (22:07 +0200)]
Fix T58492: Removes jitter when using adaptive smoke domains

This small fix in the GLSL shader seems do to the trick: now smoke won't jitter when using the adaptive domain.

The previous workaround rB3891ad8e0317 is still needed too, i.e. the bug that caused jitter this time was not related to the previous one.

8 weeks agoVSE: Don't store `cfra` in cache
Richard Antalik [Tue, 21 May 2019 19:29:17 +0000 (12:29 -0700)]
VSE: Don't store `cfra` in cache

Strips can move in time. Using cfra may give us erratic results.

Reviewed by: brecht

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

8 weeks agoFix: Reset to the default theme not auto-saved
Dalai Felinto [Tue, 21 May 2019 14:26:47 +0000 (11:26 -0300)]
Fix: Reset to the default theme not auto-saved

T64679 mention a desire for a solution that is not in a per-case basis.
However until then we are still better off with this working then not.

Specially since changing individual theme elements works, while reset
theme was not working.

8 weeks agoUI: Fix wrong naming and tooltips
William Reynish [Tue, 21 May 2019 18:03:43 +0000 (20:03 +0200)]
UI: Fix wrong naming and tooltips

Double Threshold -> Merge Threshold
This relates to Auto Merge

AutoMerge Editing -> Auto Merge
No need for redundant 'Editing' here

8 weeks agoFix T64738: pick short path seam not doing live unwrap
Brecht Van Lommel [Tue, 21 May 2019 16:07:47 +0000 (18:07 +0200)]
Fix T64738: pick short path seam not doing live unwrap

8 weeks agoFix UV editor selection colors not matching 3D viewport
Brecht Van Lommel [Tue, 21 May 2019 15:59:20 +0000 (17:59 +0200)]
Fix UV editor selection colors not matching 3D viewport

8 weeks agoFix T64414: crash deleting collection used for particle group and use count
Brecht Van Lommel [Tue, 21 May 2019 15:47:04 +0000 (17:47 +0200)]
Fix T64414: crash deleting collection used for particle group and use count

8 weeks agoFix T64903: Freestyle line alpha not working for Eevee
Brecht Van Lommel [Tue, 21 May 2019 15:42:24 +0000 (17:42 +0200)]
Fix T64903: Freestyle line alpha not working for Eevee

8 weeks agoGPU: double uniform names buffer size
Jacques Lucke [Tue, 21 May 2019 15:14:38 +0000 (17:14 +0200)]
GPU: double uniform names buffer size

Adding a constant yields quadratic time complexity which can
have quite a big impact on some scenes.

I used the file from T64901 for testing.
In the test file, the time it took to execute `wm_draw_update`
changed from `0.60s` to `0.51s`.

Reviewers: brecht

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

8 weeks agoCleanup: remove unused function
Brecht Van Lommel [Tue, 21 May 2019 15:05:54 +0000 (17:05 +0200)]
Cleanup: remove unused function

8 weeks agoCleanup: pep8
Campbell Barton [Tue, 21 May 2019 14:27:01 +0000 (00:27 +1000)]
Cleanup: pep8

8 weeks agoCleanup: clang-format, sort structs
Campbell Barton [Tue, 21 May 2019 13:54:43 +0000 (23:54 +1000)]
Cleanup: clang-format, sort structs

8 weeks agoFix part of T64679: Missing dirty preferences tag
Campbell Barton [Tue, 21 May 2019 12:08:10 +0000 (22:08 +1000)]
Fix part of T64679: Missing dirty preferences tag

- Editing shortcuts.
- Editing walk mode navigation.
- Adding/removing paths.

8 weeks agoParticle: optimize threading for many particles and many cores
Juan Gea [Tue, 21 May 2019 14:30:03 +0000 (16:30 +0200)]
Particle: optimize threading for many particles and many cores

The maximum particles per task of 256 was outdated and lead to too much thread
contention. Instead define a low fixed number of tasks per thread.

On a i7-7700HQ, creating 4 million particles went down from 31s to 4s.

Thanks to Oscar Abad, Sav Martin, Zebus3d, Sebastián Barschkis and Martin Felke
for testing and advice.

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

8 weeks agoFix T64804 crash editing image paint fallof in edit mode
Brecht Van Lommel [Tue, 21 May 2019 14:31:42 +0000 (16:31 +0200)]
Fix T64804 crash editing image paint fallof in edit mode

8 weeks agopython templates: update operator_modal_view3d_raycast to 2.8
Philipp Oeser [Tue, 21 May 2019 13:21:33 +0000 (15:21 +0200)]
python templates: update operator_modal_view3d_raycast to 2.8

Reviewers: JacquesLucke, sergey

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

8 weeks agoFix T64936: Grease Pencil point pressure max value too low
Antonioya [Tue, 21 May 2019 14:35:13 +0000 (16:35 +0200)]
Fix T64936: Grease Pencil point pressure max value too low

The API had an old  limit of 1.0f.

8 weeks agoViewport: MSAA support during ViewportRendering
Jeroen Bakker [Tue, 21 May 2019 08:33:45 +0000 (10:33 +0200)]
Viewport: MSAA support during ViewportRendering

When rendering viewport to an offscreen buffer the buffer was
constructed for non anti aliasing (0 samples). This made the objects
that are drawn by the `object_mode` including `wireframe` draw type
non-anti-aliased.

The offscreen buffers will be constructed based on the user setting for
viewport multisampling (`U.ogl_multisamples`). The same setting will
also be used when previewing scene strips in the sequencer. For now
this only improves wireframe drawing in the scene strips. To improve the
Anti aliasing in the scene strips we need to get finer control in the
draw manager. This will be part of a different patch I am preparing.

Please note that this patch also cleansup some unused code in the offscreen rendering (FSAA code was still existing, but never called)

Reviewed By: brecht

Maniphest Tasks: T64849

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

8 weeks agoOffscreenRendering: Fix Incorrect Window Coordinates
Jeroen Bakker [Wed, 15 May 2019 07:47:22 +0000 (09:47 +0200)]
OffscreenRendering: Fix Incorrect Window Coordinates

When doing offscreen rendering (Viewport Render or Sequencer Scene
strip) EEVEE and workbench used the wrong window coordinates. These
coordinates included the border that was not drawn.

Reviewed By: brecht

Maniphest Tasks: T64505

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

8 weeks agoGPencil: Set samples to 10 for Soft brush
Antonioya [Tue, 21 May 2019 13:59:36 +0000 (15:59 +0200)]
GPencil: Set samples to 10 for Soft brush

8 weeks agoGPencil: Set default Fill brush size to 20
Antonioya [Tue, 21 May 2019 13:58:26 +0000 (15:58 +0200)]
GPencil: Set default Fill brush size to 20

8 weeks agoMask: Fix missing remap of active spline/point on copy
Sergey Sharybin [Tue, 21 May 2019 13:45:03 +0000 (15:45 +0200)]
Mask: Fix missing remap of active spline/point on copy

8 weeks agopython templates: update operator_modal_draw to 2.8
Philipp Oeser [Tue, 21 May 2019 11:53:17 +0000 (13:53 +0200)]
python templates: update operator_modal_draw to 2.8

part of T56351

Reviewers: JacquesLucke

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

8 weeks agoFix T64842: crash rendering files with bevel curves
Brecht Van Lommel [Tue, 21 May 2019 12:54:08 +0000 (14:54 +0200)]
Fix T64842: crash rendering files with bevel curves

This is old logic that no longer makes sense in the new depsgraph, and causes
issues when multiple threads try to modify the same bevel object.

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

8 weeks agoCTest: Fix Bli_task_test failing on windows.
Ray Molenkamp [Tue, 21 May 2019 12:51:24 +0000 (06:51 -0600)]
CTest: Fix Bli_task_test failing on windows.

The task_scheduler was not being explicitly freed, leading to
unpredictable behavior when the process was exiting. The test
would pass, but would sometimes segfault at process shutdown.

8 weeks agoCleanup: use term pad instead of padding
Campbell Barton [Tue, 21 May 2019 12:27:09 +0000 (22:27 +1000)]
Cleanup: use term pad instead of padding

- Use min/max instead of bottom/top
  (in keeping with the rest of the BLI_rect API).
- Swap args (was passing in max, min).

8 weeks agoFix T64758: crash loading certain DDS textures
Brecht Van Lommel [Tue, 21 May 2019 11:00:43 +0000 (13:00 +0200)]
Fix T64758: crash loading certain DDS textures

8 weeks agoFix T64421: crash using redraw timer benchmark
Brecht Van Lommel [Tue, 21 May 2019 10:34:54 +0000 (12:34 +0200)]
Fix T64421: crash using redraw timer benchmark

8 weeks agoGraph Editor: view-selected takes scrubbing and marker region into account
Jacques Lucke [Tue, 21 May 2019 09:59:10 +0000 (11:59 +0200)]
Graph Editor: view-selected takes scrubbing and marker region into account

8 weeks agoKeymap: Add additional scrubbing affordance (Alt-LMB)
William Reynish [Tue, 21 May 2019 09:28:46 +0000 (11:28 +0200)]
Keymap: Add additional scrubbing affordance (Alt-LMB)

This adds an additional way to scrub the playhead, by holding Alt and dragging with the left mouse button, in addition to Shift-RMB.

It's easier to do this, especially with pen input. The other method is still kept, in case you have Emulate 3 Button Mouse enabled, in which case Alt-LMB pans the view

And of course, you can still scrub simply by dragging the playhead, without holding any modifier keys.

Right click select is unaffected.

8 weeks agoRemove USE_EVAL_DATA operator flag from Python
Sergey Sharybin [Tue, 21 May 2019 08:56:16 +0000 (10:56 +0200)]
Remove USE_EVAL_DATA operator flag from Python

After new dependency graph API this is no longer needed: all the access
to dependency graph is done explicitly.

Still leaving this flag for C, but that might also be gone in the future.

8 weeks agoFix T64927: bad timeline number spacing with scaled UI
Jacques Lucke [Tue, 21 May 2019 08:57:00 +0000 (10:57 +0200)]
Fix T64927: bad timeline number spacing with scaled UI

8 weeks agoUI: Hide Add Cube from toolbar.
William Reynish [Tue, 21 May 2019 08:56:49 +0000 (10:56 +0200)]
UI: Hide Add Cube from toolbar.

This was still a proof of concept tool needing further development. Hiding this for now.

It can return in future releases with further development.

See https://developer.blender.org/T57210 for details.

8 weeks agoFix T64763: 'Make Proxy' creates Proxy within linked Collection.
Bastien Montagne [Tue, 21 May 2019 08:31:39 +0000 (10:31 +0200)]
Fix T64763: 'Make Proxy' creates Proxy within linked Collection.

`BKE_collection_object_add_from()` would not check wether collections
were local or not... Trivial to fix.

Note that here I assume we do not use that function in some special
cases where we would like to edit linked datablocks. Think that is
reasonable stance, though.

8 weeks agoCleanup: rename nr_* to *_len for DNA code
Campbell Barton [Tue, 21 May 2019 07:53:22 +0000 (17:53 +1000)]
Cleanup: rename nr_* to *_len for DNA code

8 weeks agoCleanup: make DNA_struct_find_nr_ex function more compact
Campbell Barton [Tue, 21 May 2019 07:42:58 +0000 (17:42 +1000)]
Cleanup: make DNA_struct_find_nr_ex function more compact

8 weeks agoremove greasepencil userdef from image, node, clip and sequencer spaces
Philipp Oeser [Mon, 20 May 2019 10:36:03 +0000 (12:36 +0200)]
remove greasepencil userdef from image, node, clip and sequencer spaces

these are about greasepencil vertices and in these spaces we are not
editing greasepencil objects.

Fixes T64861

Reviewers: antoniov

Maniphest Tasks: T64861

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

8 weeks agoFix T64867: crash when changin image source to Movie
Philipp Oeser [Mon, 20 May 2019 11:43:25 +0000 (13:43 +0200)]
Fix T64867: crash when changin image source to Movie

thx @Gvgeo for adding the python/RNA case as well.

Reviewers: brecht

Maniphest Tasks: T64867

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

8 weeks agoFix T64912: Crash right clicking on 'Add New Material'
Campbell Barton [Tue, 21 May 2019 06:57:31 +0000 (16:57 +1000)]
Fix T64912: Crash right clicking on 'Add New Material'

D4904 by @Gvgeo

8 weeks agoKeymap: Ctrl-Tab toggle pose-mode with 'use_pie_click_drag'
Campbell Barton [Tue, 21 May 2019 06:13:46 +0000 (16:13 +1000)]
Keymap: Ctrl-Tab toggle pose-mode with 'use_pie_click_drag'

This just enables a default key-binding
even when pie menus are used on drag actions.

8 weeks agoUI: show symmetry popovers next to newly added mirror buttons
Campbell Barton [Tue, 21 May 2019 05:49:36 +0000 (15:49 +1000)]
UI: show symmetry popovers next to newly added mirror buttons

This moves symmetry panels to a small popover
next to the mirror axis buttons.

8 weeks agoUI: expose mirror/symmetry options int the tob-bar
Campbell Barton [Tue, 21 May 2019 05:04:21 +0000 (15:04 +1000)]
UI: expose mirror/symmetry options int the tob-bar

D4895 by @billreynish with edits.

8 weeks agoUI: support drawing booleans with icons as check-boxes
Campbell Barton [Tue, 21 May 2019 04:39:09 +0000 (14:39 +1000)]
UI: support drawing booleans with icons as check-boxes

Previously, if a boolean happened to use an icon there was no way
to make it display as a check-box from Python scripts.

The previous logic meant we ended up having to edit the RNA.
Since booleans with icons don't work well with the split-property layout
(now used for most of the interface).
Icons were being removed from RNA then added back using awkward Python
ternary expressions in the interface scripts.

The toggle argument now has an unset state (-1).

- toggle=True: no checkbox (emboss).
- toggle=False: always use a checkbox (no icon).
- toggle=(unset/-1): depends on the icon status, default as before.

Since toggle=False was default, this isn't used in existing UI logic.

8 weeks agoCleanup: const assignments to simplify code
Campbell Barton [Tue, 21 May 2019 02:30:07 +0000 (12:30 +1000)]
Cleanup: const assignments to simplify code

Also avoids using uninitialized vars.

8 weeks agoUI: move edge-tag option from the scene into the operator
Campbell Barton [Tue, 21 May 2019 01:13:45 +0000 (11:13 +1000)]
UI: move edge-tag option from the scene into the operator

This was a very specific option to display in global tool settings.

Now this is exposed in the operator when edge-select mode is enabled.

8 weeks agoFix memory leak in Normals from Faces operator
Campbell Barton [Mon, 20 May 2019 22:03:29 +0000 (08:03 +1000)]
Fix memory leak in Normals from Faces operator

8 weeks agoGPU: Use uint in GPU_batch_uniform_1ui.
mano-wii [Mon, 20 May 2019 18:41:39 +0000 (15:41 -0300)]
GPU: Use uint in GPU_batch_uniform_1ui.

8 weeks agoUI: Outliner - Do not highlight icons of active lights
Harley Acheson [Mon, 20 May 2019 17:54:17 +0000 (10:54 -0700)]
UI: Outliner - Do not highlight icons of active lights

This removes the extra highlighting of lights that are active as this is not supported

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

Reviewed by Brecht Van Lommel

8 weeks agoNormal UI: Make Alt-N shortcut to Normals Menu.
Howard Trickey [Mon, 20 May 2019 17:38:33 +0000 (13:38 -0400)]
Normal UI: Make Alt-N shortcut to Normals Menu.

See T64324 for discussion of normals ui.
Consensus on blender.chat was to use Alt-N to pull up Normals Menu,
overwriting the old use of that key (Flip normals).
There are still shortcuts for Recalculate Outside and Recalculate Inside
which are likely the more common needs.

8 weeks agoNormal UI: for all ops needing autosmooth on, enable it if needed.
Howard Trickey [Mon, 20 May 2019 16:15:52 +0000 (12:15 -0400)]
Normal UI: for all ops needing autosmooth on, enable it if needed.

Now Normal menu operations and rotate normals (r n) do not need
manual enabling of autosmooth first.
See T64324 for discussion of Normal UI changes.

8 weeks agoClip editor: make tool/sidebar wider by default, right align movie clip info
Brecht Van Lommel [Mon, 20 May 2019 16:12:46 +0000 (18:12 +0200)]
Clip editor: make tool/sidebar wider by default, right align movie clip info