blender.git
21 months agoEdit Mesh: Add comments explaining weirdness in the code.
mano-wii [Mon, 15 Oct 2018 12:50:31 +0000 (09:50 -0300)]
Edit Mesh: Add comments explaining weirdness in the code.

21 months agoTexture Paint: Don't create material if operation is cancelled
Jacques Lucke [Mon, 15 Oct 2018 11:53:14 +0000 (13:53 +0200)]
Texture Paint: Don't create material if operation is cancelled

Reviewers: brecht

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

21 months agoTexture Paint: remove odd UI behavior
Jacques Lucke [Mon, 15 Oct 2018 10:16:54 +0000 (12:16 +0200)]
Texture Paint: remove odd UI behavior

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

21 months agoFix an obvious typo: use CD_MASK_CUSTOMLOOPNORMAL for CustomDataMask.
Alexander Gavrilov [Mon, 15 Oct 2018 09:27:35 +0000 (12:27 +0300)]
Fix an obvious typo: use CD_MASK_CUSTOMLOOPNORMAL for CustomDataMask.

21 months agoCleanup: Edit Mesh shader: Remove unecessary varying
Clément Foucault [Mon, 15 Oct 2018 08:43:49 +0000 (10:43 +0200)]
Cleanup: Edit Mesh shader: Remove unecessary varying

21 months agoCleanup: unused code
Campbell Barton [Mon, 15 Oct 2018 07:11:37 +0000 (18:11 +1100)]
Cleanup: unused code

21 months agoGP: Cleanup style
Antonioya [Mon, 15 Oct 2018 06:35:11 +0000 (08:35 +0200)]
GP: Cleanup style

21 months agoGP: Small tweak to improve speed
Antonioya [Sun, 14 Oct 2018 14:28:07 +0000 (16:28 +0200)]
GP: Small tweak to improve speed

21 months agoCleanup: unused functions
Campbell Barton [Mon, 15 Oct 2018 06:37:54 +0000 (17:37 +1100)]
Cleanup: unused functions

21 months agoMesh: remove DerivedMesh for boundbox calculation
Campbell Barton [Mon, 15 Oct 2018 06:14:05 +0000 (17:14 +1100)]
Mesh: remove DerivedMesh for boundbox calculation

Fixes edit-mesh not having a boundbox calculated for it.

21 months agoCleanup: remove unused functions
Campbell Barton [Mon, 15 Oct 2018 05:58:42 +0000 (16:58 +1100)]
Cleanup: remove unused functions

21 months agoCleanup: remove references to DerivedMesh
Campbell Barton [Mon, 15 Oct 2018 05:06:42 +0000 (16:06 +1100)]
Cleanup: remove references to DerivedMesh

21 months agoMesh: remove DerivedMesh for displist conversion
Campbell Barton [Mon, 15 Oct 2018 04:58:58 +0000 (15:58 +1100)]
Mesh: remove DerivedMesh for displist conversion

21 months agoMesh: mostly remove DerivedMesh for vertex parent
Campbell Barton [Mon, 15 Oct 2018 04:31:17 +0000 (15:31 +1100)]
Mesh: mostly remove DerivedMesh for vertex parent

The exception is for subdivision surface which still uses derived mesh.

21 months agoMesh: remove DerivedMesh for face-map drawing
Campbell Barton [Mon, 15 Oct 2018 04:08:37 +0000 (15:08 +1100)]
Mesh: remove DerivedMesh for face-map drawing

21 months agoMesh: remove DerivedMesh from various places
Campbell Barton [Mon, 15 Oct 2018 03:29:46 +0000 (14:29 +1100)]
Mesh: remove DerivedMesh from various places

21 months agoCleanup: remove DerivedMesh bvhtree_from_mesh_get
Campbell Barton [Mon, 15 Oct 2018 02:38:10 +0000 (13:38 +1100)]
Cleanup: remove DerivedMesh bvhtree_from_mesh_get

21 months agoBake: remove derived mesh for bake API
Campbell Barton [Mon, 15 Oct 2018 02:32:53 +0000 (13:32 +1100)]
Bake: remove derived mesh for bake API

Multires baking still uses DerivedMesh.

21 months agoDepsgraph: Add proper API functions for CustomDataMask dependencies.
Alexander Gavrilov [Sun, 14 Oct 2018 16:59:27 +0000 (19:59 +0300)]
Depsgraph: Add proper API functions for CustomDataMask dependencies.

There were a few copies of the same few lines in depsgraph build code,
so it seems to be logical to introduce a function for it, and make it
accessible from C code for completeness.

As an example, register the mask needs of the Data Transfer modifier.

21 months agoFix T55961: Anomalous edges cage on some AMD buggy drivers.
mano-wii [Sun, 14 Oct 2018 17:07:19 +0000 (14:07 -0300)]
Fix T55961: Anomalous edges cage on some AMD buggy drivers.

Reviwed on irc by @fclem.

21 months agoGP: Fix several issues in blur FX
Antonioya [Sun, 14 Oct 2018 10:19:16 +0000 (12:19 +0200)]
GP: Fix several issues in blur FX

There were some problems with the z-depth and especially when tries to blur a pixel outside the viewport.

21 months agoEdit Mesh: Optimize the overlay triangle geometry shader
Clément Foucault [Sat, 13 Oct 2018 21:43:33 +0000 (23:43 +0200)]
Edit Mesh: Optimize the overlay triangle geometry shader

On my test it's 30% faster than before.

Test case : Suzanne, subsurf lvl3, 64K tris, Edge select mode for fair
comparison.

0.95ms before optimization
0.64ms after optimization

Note that this only optimize the "nicest" display of edit mesh overlays,
not the one when rotating the view where half of the border edges are
missing.

21 months agoEdit Mesh: Do not use barycentric coord in EDGE_FIX shader and ...
Clément Foucault [Sat, 13 Oct 2018 14:54:53 +0000 (16:54 +0200)]
Edit Mesh: Do not use barycentric coord in EDGE_FIX shader and ...

... display vertex even when occluded.

Add back the vertex display because occluded vertex are not visible when
the triangle is almost parallel to the view.

The problem with the barycentric coord is that they are hard to work with
and their derivatives not enough precise to compute the vertex positions.

So we need to pass the vertices scree positions down to the fragment shader.

21 months agoEdit Mesh: Fix and increase the depth bias on vertices
Clément Foucault [Sat, 13 Oct 2018 14:49:03 +0000 (16:49 +0200)]
Edit Mesh: Fix and increase the depth bias on vertices

21 months agoGP: Remove Layer order userprefs parameter
Antonioya [Sat, 13 Oct 2018 18:34:11 +0000 (20:34 +0200)]
GP: Remove Layer order userprefs parameter

After a lot of discussion about this option (see 18f117594004) we have decided set always the order of GP layers in 2D mode (Top->Down) and remove the parameter from User Preferences screen.

Internally all works equal, but in the UI the list is inverted.

The filter buttons to reverse the list or sort alphabetically have been removed because these buttons are not logic in this context.

21 months agonode_shader_utils: several fixes, improvements and cleanups.
Bastien Montagne [Sat, 13 Oct 2018 17:27:12 +0000 (19:27 +0200)]
node_shader_utils: several fixes, improvements and cleanups.

Fix broken behavior in case of texcoords mapping (we do need texcoords
node in all cases, then, even for UV coords...).

Use nodes by default when generating new write-allowed wrapper around a
material.

Do not try to find nodes in existing tree all the time, do it only once,
even for lazy-initialized nodes (through accessors).

Fix ugly spacing in property accessors (since it looks like some people
do not like a single 'block' with both getters, setters and prop
definition, at least use one sep line everywhere (and two sep lines to
separate properties)...

21 months agoGP: Improve qualitty in Wave when alpha is extreme
Antonioya [Sat, 13 Oct 2018 16:28:33 +0000 (18:28 +0200)]
GP: Improve qualitty in Wave when alpha is extreme

21 months agoGP: Add more blur samples to some FX
Antonioya [Sat, 13 Oct 2018 16:24:57 +0000 (18:24 +0200)]
GP: Add more blur samples to some FX

21 months agoGP: Improve Blur FX quality in transparency.
Antonioya [Sat, 13 Oct 2018 16:21:54 +0000 (18:21 +0200)]
GP: Improve Blur FX quality in transparency.

21 months agoED_pose_recalculate_paths: Run only for active object
Dalai Felinto [Fri, 12 Oct 2018 22:52:21 +0000 (19:52 -0300)]
ED_pose_recalculate_paths: Run only for active object

New iterator CTX_DATA_BEGIN_FOR_ID, to restrict the loop to the specified object only.
This is not super efficient, but it should be fine for now.

I will talk to other developers. A more elegant solution would be to
have something like "active_object_selected_pose_bones" in the context.

21 months agoMulti-Objects: POSELIB_OT_pose_add
Dalai Felinto [Fri, 12 Oct 2018 22:51:11 +0000 (19:51 -0300)]
Multi-Objects: POSELIB_OT_pose_add

Make it work only for the active object bones

21 months agoRevert "Multi-Object Pose: POSE_OT_select_parent by Harsha"
Dalai Felinto [Fri, 12 Oct 2018 21:02:02 +0000 (18:02 -0300)]
Revert "Multi-Object Pose: POSE_OT_select_parent by Harsha"

This reverts commit dcf1210c44cb1e46bf387f326c5ee9daa2a53004.

In 2.79x select parent would only work for the active bone.
There is no reason to have it working for multi-objects.

21 months agoPose path: skip time printing when not DEBUG_TIME
Dalai Felinto [Fri, 12 Oct 2018 22:14:49 +0000 (19:14 -0300)]
Pose path: skip time printing when not DEBUG_TIME

21 months agoRevert "Multi-Objects: POSE_OT_paths_*"
Dalai Felinto [Fri, 12 Oct 2018 20:42:06 +0000 (17:42 -0300)]
Revert "Multi-Objects: POSE_OT_paths_*"

This reverts commit 178530cc50e2fb4bd3faf4fff22392a58688bed1.

Those operators are called from the UI, which only takes into
consideration the active object for the parameters and whether to call
reset, update or calculate.

We can re-revert if needs be.

21 months agoMulti-Objects: POSE_OT_paths_*
Dalai Felinto [Fri, 12 Oct 2018 20:03:42 +0000 (17:03 -0300)]
Multi-Objects: POSE_OT_paths_*

* POSE_OT_paths_clear
* POSE_OT_paths_calculate
* POSE_OT_paths_update

Despite my personal opinion on the matter, those operators were listed
as to be converted (see T54650).

They are called from the UI, where you only see the parameters for the
active object/armature.

I will commit and revert soon after, so we can quickly bring it back
once we re-visit this design.

21 months agoDope Sheet: fix hold highlighting for non-bezier interpolation.
Alexander Gavrilov [Fri, 12 Oct 2018 19:16:05 +0000 (22:16 +0300)]
Dope Sheet: fix hold highlighting for non-bezier interpolation.

The automatic highlighting of constant curve areas was checking that
the bezier handles are horizontal even if a non-bezier interpolation
mode was active. Conversely, it was highlighting based on just handles
with Elastic interpolation, which always generates movement.

21 months agoPython GPU: Best description for exceptions
mano-wii [Fri, 12 Oct 2018 18:48:22 +0000 (15:48 -0300)]
Python GPU: Best description for exceptions

21 months agoRevert "Fix for ARMATURE_OT_layers_show_all
Dalai Felinto [Fri, 12 Oct 2018 18:19:48 +0000 (15:19 -0300)]
Revert "Fix for ARMATURE_OT_layers_show_all

This reverts commits:
2a2858b30dbbc19246446bcc89a7a4e7f67c7ce0
7cf8eed5e02a1f6525c3df2f404cb78db24adc98

Similar to ARMATURE_OT_layers_show we should keep this operator
single-object oriented. This one is a bit more tricky since we
may want to quickly see all the layers of all the armatures.

I will check with animators what is the best way to proceed here.
But overall I think it makes sense to have this only for the active
object.

21 months agoRevert "Multi-Objects: ARMATURE_OT_armature_layers
Dalai Felinto [Fri, 12 Oct 2018 18:15:39 +0000 (15:15 -0300)]
Revert "Multi-Objects: ARMATURE_OT_armature_layers

This reverts commits:
29a281f9ef5b3a577e6d658892a704b509d718ef
3a8b56ce24c9228a885d3c44f4c22d90be04ae4c

This operator shouldn't behave multi-objects. This would only work
if all the selected objects had the same logic for their layers,
which may be likely for characters, but it won't be for mixing props and
characters.

21 months agoMulti-Objects: ARMATURE_OT_armature_layers for pose
Dalai Felinto [Fri, 12 Oct 2018 18:15:22 +0000 (15:15 -0300)]
Multi-Objects: ARMATURE_OT_armature_layers for pose

That said, I think we should not support multi-object for either edit or pose armatures.

21 months agoMulti-Objects: POSE_OT_bone_layers
Dalai Felinto [Fri, 12 Oct 2018 18:05:46 +0000 (15:05 -0300)]
Multi-Objects: POSE_OT_bone_layers

21 months agoPOSE_OT_rotation_mode_set: Adding missing notifier
Dalai Felinto [Fri, 12 Oct 2018 17:56:13 +0000 (14:56 -0300)]
POSE_OT_rotation_mode_set: Adding missing notifier

Otherwise the space button does not redraw.

21 months agoMulti-Objects: POSE_OT_rotation_mode_set
Dalai Felinto [Fri, 12 Oct 2018 17:55:15 +0000 (14:55 -0300)]
Multi-Objects: POSE_OT_rotation_mode_set

21 months agoRename: multi_changed > changed_multi
Dalai Felinto [Fri, 12 Oct 2018 17:48:12 +0000 (14:48 -0300)]
Rename: multi_changed > changed_multi

We are using changed_multi plenty more than multi_changed. May as well keep it
consistent across the code.

21 months agoMulti-Objects: POSE_OT_autoside_names
Dalai Felinto [Fri, 12 Oct 2018 17:23:06 +0000 (14:23 -0300)]
Multi-Objects: POSE_OT_autoside_names

Using CTX_DATA_BEGIN_WITH_ID here.

Unlike the edit mode counter-part this operator is well served with the
macro above. ARMATURE_OT_autoside_names needs to treat mirrored bones
separately, while for pose we don't handle those cases.

Be ware that using this macro makes the code smaller, however it also
tags every single (selected) pose to update, regardless of whether we
changed the names of the bones.

In this case it is fine since we most likely renamed all the bones.
But In other cases I'm still a bit wary of using CTX_DATA_BEGIN_WITH_ID
instead of BKE_view_layer_array_from_objects_in_mode_unique_data.

To be seen in upcoming commits. Stay tuned.

21 months agoRevert "Multi-Objects: ARMATURE_OT_select_hierarchy"
Dalai Felinto [Fri, 12 Oct 2018 16:39:02 +0000 (13:39 -0300)]
Revert "Multi-Objects: ARMATURE_OT_select_hierarchy"

This reverts commit dcc623e7e7ead1e0d060f455a92567390c6c1911.

21 months agoMulti-Objects: POSE_OT_select_hierarchy (no real change)
Dalai Felinto [Fri, 12 Oct 2018 16:24:01 +0000 (13:24 -0300)]
Multi-Objects: POSE_OT_select_hierarchy (no real change)

This operator doesn't need any changes. Following the guideline of
multi-objects behaving alike joined armatures, there is no need
to change any armature that is not the active one.

That said I will revert the behaviour of ARMATURE_OT_SELECT_hierarchy to
follow the same rule (i.e., revert dcc623e7e7ea).

21 months agoEdit Mesh: Fix issue with Edit cage on some buggy drivers
Clément Foucault [Fri, 12 Oct 2018 15:21:04 +0000 (17:21 +0200)]
Edit Mesh: Fix issue with Edit cage on some buggy drivers

21 months agoEdit Mesh: Refactor edit mesh drawing
Clément Foucault [Fri, 12 Oct 2018 13:09:43 +0000 (15:09 +0200)]
Edit Mesh: Refactor edit mesh drawing

This decouple the vertex display from the face+edges.

This is to reduce the number of triangles required to fix the edges
artifacts (aliasing) and increase viewport reactivity when not actively
navigating (ie. mouse scroll).

Also it makes all vertices visible (not cut-off) even when navigating.

However it makes the navigation drawing a bit slower because it has to
render twice.

Also add a depth bias to the wires to avoid depth fighting when previewing
final mesh (modifiers applied).

21 months agoWireframe Overlay: Use Barycentric coord to optimize shader
Clément Foucault [Thu, 11 Oct 2018 14:10:07 +0000 (16:10 +0200)]
Wireframe Overlay: Use Barycentric coord to optimize shader

This also fix a driver bug I was having on Linux + Mesa + AMD Vega.

21 months agoDRW: Add DRW_shgroup_create_sub to create children shgroup
Clément Foucault [Thu, 11 Oct 2018 13:50:46 +0000 (15:50 +0200)]
DRW: Add DRW_shgroup_create_sub to create children shgroup

This makes is easy to create nested drawcalls that will inherit all the
parents properties. This is usefull if only a few uniforms changes for that
drawcall.

21 months agoGPUTexture: Add support for GPU_RGBA8UI
Clément Foucault [Thu, 11 Oct 2018 13:08:57 +0000 (15:08 +0200)]
GPUTexture: Add support for GPU_RGBA8UI

21 months agoFix misaligned icon in search buttons after recent changes.
Brecht Van Lommel [Fri, 12 Oct 2018 13:55:36 +0000 (15:55 +0200)]
Fix misaligned icon in search buttons after recent changes.

21 months agoPython: change node_shader_utils diffuse RGBA to base_color RGB.
Brecht Van Lommel [Fri, 12 Oct 2018 13:39:56 +0000 (15:39 +0200)]
Python: change node_shader_utils diffuse RGBA to base_color RGB.

Best to give its actual name so it's clear that the Principled BSDF does
not have a diffuse color exactly, and does not have an alpha component.

Also image textures use UVs by default, so avoid creating a texture
coordinate node for that.

21 months agoMesh: remove derivedFinal from various places
Campbell Barton [Fri, 12 Oct 2018 08:22:34 +0000 (19:22 +1100)]
Mesh: remove derivedFinal from various places

21 months agoPrevent G.fileflags changes when WM_OT_save_mainfile() is called from script
Sybren A. Stüvel [Fri, 12 Oct 2018 08:24:07 +0000 (10:24 +0200)]
Prevent G.fileflags changes when WM_OT_save_mainfile() is called from script

This is to solve an issue where a blend file could be compressed
unbeknownst to the artist. This happened in the following situtation:

- Artist edits an uncompressed blend file.
- Some script saves a compressed blendfile to a separate location.
- When the artist saves the file (s)he is editing (File>Save, or Ctrl+S),
  it was silently compressed.

21 months agoGP: Disable reverse list order when uncheck userprefs option
Antonioya [Fri, 12 Oct 2018 07:54:46 +0000 (09:54 +0200)]
GP: Disable reverse list order when uncheck userprefs option

Before, the list kept the reverse order enabled in the filter. Now the filter is reset when the option is disabled and don't need any user change or restart.

21 months agoModifier: remove derived mesh call for bind
Campbell Barton [Fri, 12 Oct 2018 07:39:24 +0000 (18:39 +1100)]
Modifier: remove derived mesh call for bind

21 months agoCleanup: remove unused derived mesh wrappers
Campbell Barton [Fri, 12 Oct 2018 07:11:23 +0000 (18:11 +1100)]
Cleanup: remove unused derived mesh wrappers

21 months agoGP: Removed unused lines after previous commit
Antonioya [Fri, 12 Oct 2018 07:08:41 +0000 (09:08 +0200)]
GP: Removed unused lines after previous commit

The reverse order is controlled inside operator.

21 months agoMesh: remove derived mesh for nurbs conversion
Campbell Barton [Fri, 12 Oct 2018 07:05:26 +0000 (18:05 +1100)]
Mesh: remove derived mesh for nurbs conversion

21 months agoMesh: remove derived mesh for conversion
Campbell Barton [Fri, 12 Oct 2018 06:49:07 +0000 (17:49 +1100)]
Mesh: remove derived mesh for conversion

21 months agoDRW: correct loose edge hidden face check
Campbell Barton [Fri, 12 Oct 2018 05:58:31 +0000 (16:58 +1100)]
DRW: correct loose edge hidden face check

21 months agoCleanup: minor mesh allocation changes
Campbell Barton [Fri, 12 Oct 2018 05:47:43 +0000 (16:47 +1100)]
Cleanup: minor mesh allocation changes

21 months agoCleanup: use const pointers
Campbell Barton [Fri, 12 Oct 2018 05:42:11 +0000 (16:42 +1100)]
Cleanup: use const pointers

21 months agoCleanup: fill vertex buffer in order
Campbell Barton [Fri, 12 Oct 2018 05:25:16 +0000 (16:25 +1100)]
Cleanup: fill vertex buffer in order

21 months agoDRW: edit-mesh cage loose edge/vert support
Campbell Barton [Fri, 12 Oct 2018 05:05:31 +0000 (16:05 +1100)]
DRW: edit-mesh cage loose edge/vert support

21 months agoDRW: edit-mesh cage selection support
Campbell Barton [Fri, 12 Oct 2018 00:51:35 +0000 (11:51 +1100)]
DRW: edit-mesh cage selection support

21 months agoCleanup: use generic macro
Campbell Barton [Thu, 11 Oct 2018 23:42:12 +0000 (10:42 +1100)]
Cleanup: use generic macro

21 months agoCleanup: trailing space w/ slash, right shift
Campbell Barton [Thu, 11 Oct 2018 23:35:49 +0000 (10:35 +1100)]
Cleanup: trailing space w/ slash, right shift

21 months agoFix crash in grease pencil fill
Campbell Barton [Thu, 11 Oct 2018 23:22:05 +0000 (10:22 +1100)]
Fix crash in grease pencil fill

21 months agoCleanup: redundant 'struct' & 'static' vars
Campbell Barton [Thu, 11 Oct 2018 23:12:25 +0000 (10:12 +1100)]
Cleanup: redundant 'struct' & 'static' vars

21 months agoCleanup: style
Campbell Barton [Thu, 11 Oct 2018 23:04:20 +0000 (10:04 +1100)]
Cleanup: style

21 months agoUI: move layer up/down reverse into the operator
Campbell Barton [Thu, 11 Oct 2018 22:54:26 +0000 (09:54 +1100)]
UI: move layer up/down reverse into the operator

21 months agoGP: Remove old simplify code
Antonioya [Thu, 11 Oct 2018 17:16:55 +0000 (19:16 +0200)]
GP: Remove old simplify code

The simplify is controlled by brush and thsi function is not used.

21 months agoGP: Reorder Userprefs grease pencil parameters
Antonioya [Thu, 11 Oct 2018 17:14:18 +0000 (19:14 +0200)]
GP: Reorder Userprefs grease pencil parameters

21 months agoGP: Invert merge down if layer list is reversed
Antonioya [Thu, 11 Oct 2018 16:49:03 +0000 (18:49 +0200)]
GP: Invert merge down if layer list is reversed

21 months agoGP: Invert UP/DOWN buttons when layer list is inverted
Antonioya [Thu, 11 Oct 2018 16:27:09 +0000 (18:27 +0200)]
GP: Invert UP/DOWN buttons when layer list is inverted

This fix the task T56985

21 months agoGP: Add new Userprefs parameter to reverse layer list
Antonioya [Thu, 11 Oct 2018 16:25:45 +0000 (18:25 +0200)]
GP: Add new Userprefs parameter to reverse layer list

This allows to configure the system as any other 2D software with the layers in a Top/Down order.

21 months agoAdd new parameter to reverse UIList items
Antonioya [Thu, 11 Oct 2018 15:47:46 +0000 (17:47 +0200)]
Add new parameter to reverse UIList items

Now, it was possible to invert the order of the UIlist using the filter, but it was impossible to know if the list was inverted or not.

The problem with this is that any other element depending of this value could not be adjusted.

See https://devtalk.blender.org/t/how-to-access-uilist-properties/2268

The new parameter allows to set the reverse order by default. When the list is set as reverse, it cannot be inverted again, so the invert button is removed of the filter.

This change is needed to fix a requested feature for Grease Pencil (T56985) and because a lot of 2D softwares use the drawing layers in the inverse order used in Blender.

21 months agoFix T56898: misaligned icons in buttons in popovers.
Brecht Van Lommel [Thu, 11 Oct 2018 15:42:50 +0000 (17:42 +0200)]
Fix T56898: misaligned icons in buttons in popovers.

21 months agoFix (unreported) wrong 'use_sep' setting for menu items.
Bastien Montagne [Thu, 11 Oct 2018 15:36:37 +0000 (17:36 +0200)]
Fix (unreported) wrong 'use_sep' setting for menu items.

This option defines whether or not menu items drawing code must
separate drawstring in two, keeping right part at all cost.

This is used to show shortcuts of operators' enum entries usually.

Previous way to decide that was based on button having an RNA prop
pointer, assuming those without it were not 'data buttons' and hence
needed the shortcut special handling thingy.

That's wrong is many, many cases (especially since search templates
often generate more than one buttons, not all linked to actual RNA
data). So instead now checking whether a button has an optype set or
not, hopefully this will be much more accurate...

Other solution if thsi also fails, is to add new flag to buttons, and
explicitely set it when needed, instead of trying to guesstimate...

21 months agoGP: Cleanup duplicate code moving to function
Antonioya [Thu, 11 Oct 2018 14:05:08 +0000 (16:05 +0200)]
GP: Cleanup duplicate code moving to function

21 months agoGP: Cleanup duplicate code
Antonioya [Thu, 11 Oct 2018 13:18:26 +0000 (15:18 +0200)]
GP: Cleanup duplicate code

21 months agoUI: increase spacing between icon and text.
Brecht Van Lommel [Thu, 11 Oct 2018 10:28:05 +0000 (12:28 +0200)]
UI: increase spacing between icon and text.

To avoid the icon and text blending together too much, which happens with
the new monochrome and slightly bigger icons.

21 months agoUI: tweak vertical centering of text in buttons.
Brecht Van Lommel [Thu, 11 Oct 2018 10:24:33 +0000 (12:24 +0200)]
UI: tweak vertical centering of text in buttons.

This effectively moves up the text by one pixel to make it look more
centered in the button and relative to the icon.

21 months agoEevee: Fix blank output if scene complexity is high
Clément Foucault [Thu, 11 Oct 2018 11:19:49 +0000 (13:19 +0200)]
Eevee: Fix blank output if scene complexity is high

Encountered on Nvidia + Linux, it seems that doing everything all at once
can make the driver give up the whole command list and return nothing as
the output of the render.

21 months agoDRW: add mapped edit-mode face-dot drawing
Campbell Barton [Thu, 11 Oct 2018 06:23:29 +0000 (17:23 +1100)]
DRW: add mapped edit-mode face-dot drawing

21 months agoMissed when bumping flags
Campbell Barton [Thu, 11 Oct 2018 06:02:03 +0000 (17:02 +1100)]
Missed when bumping flags

Ideally these wouldn't be repeated in multiple places.

21 months agoDRW: Initial edit-mode cage support
Campbell Barton [Thu, 11 Oct 2018 04:07:29 +0000 (15:07 +1100)]
DRW: Initial edit-mode cage support

Modifiers such as sub-surf and mirror now work with show-on-cage.

Selection and loose geometry still needs to be supported.

21 months agoDRW: add ability to skip drawing vertices
Campbell Barton [Thu, 11 Oct 2018 02:45:50 +0000 (13:45 +1100)]
DRW: add ability to skip drawing vertices

21 months agoCleanup: make BKE_mesh_ensure_normals_for_display public
Campbell Barton [Thu, 11 Oct 2018 05:32:49 +0000 (16:32 +1100)]
Cleanup: make BKE_mesh_ensure_normals_for_display public

21 months agoDRW: avoid edit-mode layer lookups for freestyle
Campbell Barton [Thu, 11 Oct 2018 04:24:26 +0000 (15:24 +1100)]
DRW: avoid edit-mode layer lookups for freestyle

21 months agoCleanup: assign a var to check an edge is real
Campbell Barton [Thu, 11 Oct 2018 04:15:30 +0000 (15:15 +1100)]
Cleanup: assign a var to check an edge is real

Makes code slightly more readable.

21 months agoRNA: remove redundant new_from_object/to_mesh arg
Campbell Barton [Thu, 11 Oct 2018 01:14:03 +0000 (12:14 +1100)]
RNA: remove redundant new_from_object/to_mesh arg

If the caller wants loop-tris, there is a function to calculate them.

21 months agoDRW: remove redundant editmode mesh tessellation
Campbell Barton [Thu, 11 Oct 2018 00:41:24 +0000 (11:41 +1100)]
DRW: remove redundant editmode mesh tessellation

Also re-order logic so loop indices are ensured to be valid.

21 months agoCleanup: mesh iterators
Campbell Barton [Wed, 10 Oct 2018 23:31:11 +0000 (10:31 +1100)]
Cleanup: mesh iterators

- Split indexed/non-indexed into separate loops.
- Avoid assigning the same value in the loop.
- Use const variables.

21 months agoUI: increase size of copy buffer
Campbell Barton [Wed, 10 Oct 2018 23:08:14 +0000 (10:08 +1100)]
UI: increase size of copy buffer

The length was 400 which isn't enough for some file paths.

21 months agoUI: copy-buffer was cleared w/ non-text buttons
Campbell Barton [Wed, 10 Oct 2018 23:04:11 +0000 (10:04 +1100)]
UI: copy-buffer was cleared w/ non-text buttons

Also correct invalid strncpy use.

21 months agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 10 Oct 2018 22:38:17 +0000 (09:38 +1100)]
Merge branch 'master' into blender2.8