12 months agoEdit Mesh Overlay Geometry Shader: Ignore correction geometry for loops that are...
mano-wii [Tue, 16 Oct 2018 21:03:38 +0000 (23:03 +0200)]
Edit Mesh Overlay Geometry Shader: Ignore correction geometry for loops that are not part of an edge.

By the tests I could only observe a considerable difference in the peformanse when the vertex size is 30.
Vertice 3 showed no difference in a suzzane with subdivision modifier level 3 + show-on-cage.

Point Size 30: 7.29ms vs 2.55ms

Reviewers: fclem

Reviewed By: fclem

Differential Revision:

12 months agoDRW: Fix assert with BoundBox object display mode
Clément Foucault [Tue, 16 Oct 2018 20:52:00 +0000 (22:52 +0200)]
DRW: Fix assert with BoundBox object display mode

12 months agoFix cmake not triggering rebuild on .glsl changes
Dalai Felinto [Tue, 16 Oct 2018 19:54:59 +0000 (16:54 -0300)]
Fix cmake not triggering rebuild on .glsl changes

At least on windows we do not re-run datatoc when the .glsl files change.

To test is simple, just change edit_mesh_overlay_common_lib.glsl
remove lines, write plain text, ..., now rebuild and go in edit mode
with the default cube.

I also had to remove the entry in gpu/CMakeLists.txt for
gpu_shader_material.glsl since this was being tracked directly, as well
as running data_to_c_simple (otherwise CMake raises an error for
duplicated entries).

We probably want to do the same for the other datatoc functions.

Reviewers: LazyDodo, brecht
Differential Revision:

12 months agoUI: fix misaligned underline for menu item shortcut keys.
Harley Acheson [Tue, 16 Oct 2018 18:31:07 +0000 (20:31 +0200)]
UI: fix misaligned underline for menu item shortcut keys.

12 months agoUI: tweak icon spacing in menus to put them in the middle of the edge and text.
Harley Acheson [Tue, 16 Oct 2018 18:29:28 +0000 (20:29 +0200)]
UI: tweak icon spacing in menus to put them in the middle of the edge and text.

12 months agoUI: icon set updates Andrzej Ambroz.
Brecht Van Lommel [Tue, 16 Oct 2018 18:20:24 +0000 (20:20 +0200)]
UI: icon set updates Andrzej Ambroz.

This adds and changes various icons, in particular modifier and force field
icons are now included.

12 months agoFix T56250: brush cycling with shortcuts is broken.
Brecht Van Lommel [Tue, 16 Oct 2018 18:17:03 +0000 (20:17 +0200)]
Fix T56250: brush cycling with shortcuts is broken.

It was cycling both in the brush system and tool system which conflicted.
Now it uses just the tool system. This is more of a temporary fix until
the new tool/brush decoupled design is in place.

12 months agonode_shader_utils: fix bad setting of use_nodes in readonly case.
Bastien Montagne [Tue, 16 Oct 2018 14:32:43 +0000 (16:32 +0200)]
node_shader_utils: fix bad setting of use_nodes in readonly case.

Also added access to extension property in texture wrapper.

12 months agoDope Sheet: unify comparison threshold for the ActKeyColumn tree.
Alexander Gavrilov [Tue, 16 Oct 2018 16:45:03 +0000 (19:45 +0300)]
Dope Sheet: unify comparison threshold for the ActKeyColumn tree.

Use the same floating point precision threshold to merge keys
when building the tree as when searching it.

12 months agoDope Sheet: rewrite computation of keyframe hold blocks.
Alexander Gavrilov [Sat, 13 Oct 2018 17:22:44 +0000 (20:22 +0300)]
Dope Sheet: rewrite computation of keyframe hold blocks.

Computation of hold blocks was done by storing ranges (with start and
an end, and likely overlapping) in a tree keyed only by the block start.
This cannot work well, and there even were comments that it is not
reliable in complex cases.

A much better way to deal with it is to split all ranges so they don't
overlap. The most thorough way of doing this is to split at all and every
known keyframe, and in this case the data can actually be stored in the
key column data structures, avoiding the need for a second tree.

In practice, splitting requires a pass to copy this data to newly added
keys, and the necessity to loop over all keyframes in the range being
added. Both are linear and don't add excess algorithmic complexity.

The new implementation also calls BLI_dlrbTree_linkedlist_sync for
its own needs, so the users of the *_to_keylist functions don't have
to do it themselves anymore.

Differential Revision:

12 months agoTemplates: updated 2D animation template from grease pencil team.
Brecht Van Lommel [Tue, 16 Oct 2018 16:08:46 +0000 (18:08 +0200)]
Templates: updated 2D animation template from grease pencil team.

12 months agoSmall change to Annotation panel
Antonioya [Tue, 16 Oct 2018 15:59:42 +0000 (17:59 +0200)]
Small change to Annotation panel

Add one line more by default

12 months agoUI: tweak and fixes for cycles sampling panel, remove unneeded decorators.
Brecht Van Lommel [Tue, 16 Oct 2018 15:11:37 +0000 (17:11 +0200)]
UI: tweak and fixes for cycles sampling panel, remove unneeded decorators.

12 months agoUI: put show emitter option in particles panels.
Brecht Van Lommel [Tue, 16 Oct 2018 14:54:45 +0000 (16:54 +0200)]
UI: put show emitter option in particles panels.

This settings is duplicated from the object duplication panel, but
otherwise it's too hard to find.

12 months agoFix remaining copy/paste button header, these are in menus now.
William Reynish [Tue, 16 Oct 2018 12:58:16 +0000 (14:58 +0200)]
Fix remaining copy/paste button header, these are in menus now.

12 months agoFix incorrect icon for UV selection sync.
William Reynish [Tue, 16 Oct 2018 12:57:30 +0000 (14:57 +0200)]
Fix incorrect icon for UV selection sync.

12 months agoCleanup: naming
Campbell Barton [Tue, 16 Oct 2018 11:08:43 +0000 (22:08 +1100)]
Cleanup: naming

'mp' was a reference to 'manipulator'

12 months agoTool System: add gizmo for shear tool
Campbell Barton [Tue, 16 Oct 2018 10:55:39 +0000 (21:55 +1100)]
Tool System: add gizmo for shear tool

12 months agoTransform: axis support for shear tool
Campbell Barton [Tue, 16 Oct 2018 10:52:30 +0000 (21:52 +1100)]
Transform: axis support for shear tool

12 months agoFix T57247: Render animation does not respect render single view layer
Philipp Oeser [Tue, 16 Oct 2018 10:45:41 +0000 (12:45 +0200)]
Fix T57247: Render animation does not respect render single view layer

Reviewers: brecht

Maniphest Tasks: T57247

Differential Revision:

12 months agoEvent System: don't invoke operator that should only be executed
Jacques Lucke [Tue, 16 Oct 2018 09:48:12 +0000 (11:48 +0200)]
Event System: don't invoke operator that should only be executed

Problem was that the event was not `NULL` even though the `context` is `WM_OP_EXEC_*`.
I noticed this problem when dropping .blend files into Blender.
Instead of only executing `WM_OT_open_mainfile`, it was invoked (opening a file selector).

The `wm_operator_invoke`, which also executes operators, always invokes operators when `event != NULL`. So setting `event` to `NULL` tells `wm_operator_invoke` not to invoke but to execute the operator.

Reviewers: brecht

Differential Revision:

12 months agoView 3D: fix image dropping in 3d view
Jacques Lucke [Tue, 16 Oct 2018 09:17:32 +0000 (11:17 +0200)]
View 3D: fix image dropping in 3d view

Reviewers: brecht

Differential Revision:

12 months agoGP: Set Dopesheet layers in Top-Down order
Antonioya [Tue, 16 Oct 2018 08:37:18 +0000 (10:37 +0200)]
GP: Set Dopesheet layers in Top-Down order

The layers are Top-Down and the dopesheet must use the same order.

12 months agoGP: Fix Blur shift when add more samples
Antonioya [Tue, 16 Oct 2018 08:23:13 +0000 (10:23 +0200)]
GP: Fix Blur shift when add more samples

The image was moving in +X and +Y when added samples due round precission.

12 months agoSet Annotation list in Top-Down order
Antonioya [Tue, 16 Oct 2018 06:45:01 +0000 (08:45 +0200)]
Set Annotation list in Top-Down order

This makes consistent the orders of any grease pencil related list

12 months agoFix crash in loose edge check
Campbell Barton [Tue, 16 Oct 2018 04:02:30 +0000 (15:02 +1100)]
Fix crash in loose edge check

12 months agoCleanup: headers
Campbell Barton [Tue, 16 Oct 2018 02:18:03 +0000 (13:18 +1100)]
Cleanup: headers

12 months agoMesh: use mesh tessellation for face-map drawing
Campbell Barton [Tue, 16 Oct 2018 02:09:30 +0000 (13:09 +1100)]
Mesh: use mesh tessellation for face-map drawing

Also use batch instead of immediate mode.

12 months agoCleanup: replace check for derivedFinal w/ mesh_eval
Campbell Barton [Mon, 15 Oct 2018 23:33:44 +0000 (10:33 +1100)]
Cleanup: replace check for derivedFinal w/ mesh_eval

12 months agoFix UI error in annotation tool
Campbell Barton [Mon, 15 Oct 2018 22:13:26 +0000 (09:13 +1100)]
Fix UI error in annotation tool

12 months agoCleanup: redundant check for hidden edge
Campbell Barton [Mon, 15 Oct 2018 22:01:52 +0000 (09:01 +1100)]
Cleanup: redundant check for hidden edge

12 months agoCleanup: redundant len() checks
Campbell Barton [Mon, 15 Oct 2018 21:50:35 +0000 (08:50 +1100)]
Cleanup: redundant len() checks

12 months agoMesh: replace derived-mesh with mesh API's for project paint
Campbell Barton [Mon, 15 Oct 2018 21:41:43 +0000 (08:41 +1100)]
Mesh: replace derived-mesh with mesh API's for project paint

12 months agoAdd popover for Annotations in topbar
Antonioya [Mon, 15 Oct 2018 16:54:09 +0000 (18:54 +0200)]
Add popover for Annotations in topbar

Part of T57211

12 months agoEevee: Fix Missing alpha when rendering with DOF
Clément Foucault [Mon, 15 Oct 2018 14:04:33 +0000 (16:04 +0200)]
Eevee: Fix Missing alpha when rendering with DOF

NOTE: There is a float imprecision near the focus plane
due to the current technique used for DOF. This makes the alpha channel
transparent on nearly in focus objects even when they should not.
This artifact should be fixed when the DOF will use scatter as gather for
low brightness areas.

Fix T57042 : Eevee does not render alpha when DOF is turned on

12 months agoEdit Mesh: Fix missing loop normal display
Clément Foucault [Mon, 15 Oct 2018 09:51:47 +0000 (11:51 +0200)]
Edit Mesh: Fix missing loop normal display

12 months agoFix related to T55961: Glitch in selecting loose edges on some AMD drives.
mano-wii [Mon, 15 Oct 2018 12:54:24 +0000 (09:54 -0300)]
Fix related to T55961: Glitch in selecting loose edges on some AMD drives.

12 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.

12 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:

12 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:

12 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.

12 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

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

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

12 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

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

12 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.

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

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

12 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

12 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.

12 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

12 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

12 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

12 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.

12 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.

12 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.

12 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.

12 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

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

12 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.

12 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

12 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.

12 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

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)...

12 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

12 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

12 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.

12 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.

12 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

12 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.

12 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

12 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.

12 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.

12 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.

12 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

12 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:

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

12 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:

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

12 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.

12 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

12 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.

12 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

12 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.

12 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


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.

12 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.

12 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).

12 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

12 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).

12 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.

12 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

12 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

12 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.

12 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.

12 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

12 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.

12 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.

12 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

12 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

12 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.

12 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

12 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

12 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