Commit Graph

81440 Commits

Author SHA1 Message Date
Dalai Felinto
894c3b1532 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.
2018-10-12 15:26:23 -03:00
Dalai Felinto
29a281f9ef Multi-Objects: ARMATURE_OT_armature_layers for pose
That said, I think we should not support multi-object for either edit or pose armatures.
2018-10-12 15:15:22 -03:00
Dalai Felinto
bb7f4f5714 Multi-Objects: POSE_OT_bone_layers 2018-10-12 15:05:46 -03:00
Dalai Felinto
299b51dc83 POSE_OT_rotation_mode_set: Adding missing notifier
Otherwise the space button does not redraw.
2018-10-12 14:56:13 -03:00
Dalai Felinto
3b9b6a80ba Multi-Objects: POSE_OT_rotation_mode_set 2018-10-12 14:55:15 -03:00
Dalai Felinto
dba7312f5e Rename: multi_changed > changed_multi
We are using changed_multi plenty more than multi_changed. May as well keep it
consistent across the code.
2018-10-12 14:48:12 -03:00
Dalai Felinto
c7bbcfe954 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.
2018-10-12 14:42:08 -03:00
Dalai Felinto
2677e99217 Revert "Multi-Objects: ARMATURE_OT_select_hierarchy"
This reverts commit dcc623e7e7ead1e0d060f455a92567390c6c1911.
2018-10-12 13:49:55 -03:00
Dalai Felinto
d95bb08f39 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).
2018-10-12 13:49:55 -03:00
Clément Foucault
77653d97fb Edit Mesh: Fix issue with Edit cage on some buggy drivers 2018-10-12 17:21:04 +02:00
Clément Foucault
03d0219d7a 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).
2018-10-12 16:43:40 +02:00
Clément Foucault
fe4840ed4d Wireframe Overlay: Use Barycentric coord to optimize shader
This also fix a driver bug I was having on Linux + Mesa + AMD Vega.
2018-10-12 16:38:55 +02:00
Clément Foucault
01745051de 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.
2018-10-12 16:38:55 +02:00
Clément Foucault
9b692ecabd GPUTexture: Add support for GPU_RGBA8UI 2018-10-12 16:38:55 +02:00
f2e6f8bb8d Fix misaligned icon in search buttons after recent changes. 2018-10-12 15:55:36 +02:00
78390f7724 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.
2018-10-12 15:55:09 +02:00
Campbell Barton
86635402d5 Mesh: remove derivedFinal from various places 2018-10-12 19:29:40 +11:00
Sybren A. Stüvel
cd3b313d5f 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.
2018-10-12 10:24:25 +02:00
Antonioya
5eeb6c00be 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.
2018-10-12 09:55:43 +02:00
Campbell Barton
fe1befcadf Modifier: remove derived mesh call for bind 2018-10-12 18:39:24 +11:00
Campbell Barton
b15123d279 Cleanup: remove unused derived mesh wrappers 2018-10-12 18:14:11 +11:00
Antonioya
8962b5e16b GP: Removed unused lines after previous commit
The reverse order is controlled inside operator.
2018-10-12 09:08:57 +02:00
Campbell Barton
54ecff1fca Mesh: remove derived mesh for nurbs conversion 2018-10-12 18:05:26 +11:00
Campbell Barton
75e4648e27 Mesh: remove derived mesh for conversion 2018-10-12 17:49:38 +11:00
Campbell Barton
5400d6a8fa DRW: correct loose edge hidden face check 2018-10-12 17:00:10 +11:00
Campbell Barton
db91414d7b Cleanup: minor mesh allocation changes 2018-10-12 16:47:43 +11:00
Campbell Barton
eef365a126 Cleanup: use const pointers 2018-10-12 16:42:11 +11:00
Campbell Barton
33e2cf2aab Cleanup: fill vertex buffer in order 2018-10-12 16:25:16 +11:00
Campbell Barton
8ef8b64fc6 DRW: edit-mesh cage loose edge/vert support 2018-10-12 16:05:31 +11:00
Campbell Barton
f4b0684a3f DRW: edit-mesh cage selection support 2018-10-12 13:05:18 +11:00
Campbell Barton
fcc88a6bf0 Cleanup: use generic macro 2018-10-12 10:42:12 +11:00
Campbell Barton
bbc5571093 Cleanup: trailing space w/ slash, right shift 2018-10-12 10:36:45 +11:00
Campbell Barton
bbca6af6a5 Fix crash in grease pencil fill 2018-10-12 10:22:05 +11:00
Campbell Barton
08ac015360 Cleanup: redundant 'struct' & 'static' vars 2018-10-12 10:12:25 +11:00
Campbell Barton
75bdfa2d46 Cleanup: style 2018-10-12 10:04:20 +11:00
Campbell Barton
6f6d76554f UI: move layer up/down reverse into the operator 2018-10-12 09:54:26 +11:00
Antonioya
45881003f0 GP: Remove old simplify code
The simplify is controlled by brush and thsi function is not used.
2018-10-11 19:16:55 +02:00
Antonioya
fb8332b1c0 GP: Reorder Userprefs grease pencil parameters 2018-10-11 19:14:18 +02:00
Antonioya
070c95dfe4 GP: Invert merge down if layer list is reversed 2018-10-11 18:49:03 +02:00
Antonioya
d6dc8cda8b GP: Invert UP/DOWN buttons when layer list is inverted
This fix the task T56985
2018-10-11 18:30:10 +02:00
Antonioya
18f1175940 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.
2018-10-11 18:30:10 +02:00
Antonioya
d12b3767f8 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.
2018-10-11 18:30:09 +02:00
cc1d6b849d Fix T56898: misaligned icons in buttons in popovers. 2018-10-11 17:45:17 +02:00
Bastien Montagne
cd23e89634 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...
2018-10-11 17:36:37 +02:00
Antonioya
4add09053c GP: Cleanup duplicate code moving to function 2018-10-11 16:05:08 +02:00
Antonioya
250ba17c83 GP: Cleanup duplicate code 2018-10-11 15:18:26 +02:00
45477efd0e 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.
2018-10-11 14:20:25 +02:00
d90eb35662 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.
2018-10-11 14:19:25 +02:00
Clément Foucault
3f0873fa1e 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.
2018-10-11 13:20:00 +02:00
Campbell Barton
c901ebcd21 DRW: add mapped edit-mode face-dot drawing 2018-10-11 17:23:29 +11:00