Commit Graph

61966 Commits

Author SHA1 Message Date
fcc88a6bf0 Cleanup: use generic macro 2018-10-12 10:42:12 +11:00
bbc5571093 Cleanup: trailing space w/ slash, right shift 2018-10-12 10:36:45 +11:00
bbca6af6a5 Fix crash in grease pencil fill 2018-10-12 10:22:05 +11:00
08ac015360 Cleanup: redundant 'struct' & 'static' vars 2018-10-12 10:12:25 +11:00
75bdfa2d46 Cleanup: style 2018-10-12 10:04:20 +11:00
6f6d76554f UI: move layer up/down reverse into the operator 2018-10-12 09:54:26 +11:00
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
070c95dfe4 GP: Invert merge down if layer list is reversed 2018-10-11 18:49:03 +02:00
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
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
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
4add09053c GP: Cleanup duplicate code moving to function 2018-10-11 16:05:08 +02:00
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
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
c901ebcd21 DRW: add mapped edit-mode face-dot drawing 2018-10-11 17:23:29 +11:00
5e9afe5018 Missed when bumping flags
Ideally these wouldn't be repeated in multiple places.
2018-10-11 17:02:42 +11:00
641190adff 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.
2018-10-11 16:53:25 +11:00
d74b89aed0 DRW: add ability to skip drawing vertices 2018-10-11 16:43:38 +11:00
b7363941f7 Cleanup: make BKE_mesh_ensure_normals_for_display public 2018-10-11 16:34:12 +11:00
bf455c2ca9 DRW: avoid edit-mode layer lookups for freestyle 2018-10-11 15:24:26 +11:00
fb79357b3e Cleanup: assign a var to check an edge is real
Makes code slightly more readable.
2018-10-11 15:15:30 +11:00
fd2ffb0b9e RNA: remove redundant new_from_object/to_mesh arg
If the caller wants loop-tris, there is a function to calculate them.
2018-10-11 12:24:38 +11:00
92a494ed51 DRW: remove redundant editmode mesh tessellation
Also re-order logic so loop indices are ensured to be valid.
2018-10-11 11:41:24 +11:00
121c94b082 Cleanup: mesh iterators
- Split indexed/non-indexed into separate loops.
- Avoid assigning the same value in the loop.
- Use const variables.
2018-10-11 10:34:30 +11:00
4728eed70c UI: increase size of copy buffer
The length was 400 which isn't enough for some file paths.
2018-10-11 10:09:04 +11:00
926b9ae80a UI: copy-buffer was cleared w/ non-text buttons
Also correct invalid strncpy use.
2018-10-11 10:04:11 +11:00
f5e51ded09 Merge branch 'master' into blender2.8 2018-10-11 09:38:17 +11:00
b618c185cb Fix incorrect strncpy use
Didn't ensure null terminated.
2018-10-11 09:36:43 +11:00
59e4935266 Fix draw manager out of bounds assignment 2018-10-11 09:29:23 +11:00
0f147bf6d6 Remove image based bitmap font support
Was used in the game engine and is no longer used.
2018-10-11 09:27:29 +11:00
66738d4aa0 Merge branch 'master' into blender2.8 2018-10-11 09:08:30 +11:00
2083a7e274 Cleanup: style (pointers) 2018-10-11 09:03:39 +11:00
95f2604ea7 Cleanup: indentation 2018-10-11 08:20:35 +11:00
060adfbd1b Correct case 2018-10-11 08:14:04 +11:00
c2519d8521 GP: New Glow Shader FX (wip)
New shader to simulate a glow of the color.

The glow can be generated by luminance threshold or using a selection color.
2018-10-10 23:00:56 +02:00
d29f98e3f2 Python GPU: Use PyC_AsArray_FAST in GPUVertBuf.fill_attribute.
This allows you to use other types of sequences besides tuples.
2018-10-10 13:39:03 -03:00
5e88d103f7 Python GPU: Use PyC_AsArray_FAST when initing GPUIndexBuff.
This allows you to use other types of sequences besides tuples.
2018-10-10 13:39:02 -03:00
Dalai Felinto
1b1702abb0 Fix runtime error: shift of uint
The warning was: runtime error: left shift of 1 by 31 places cannot be
represented in type 'int'

Patch by Clément Foucault.
2018-10-10 13:35:34 -03:00
Dalai Felinto
4149ee9bf6 Revert "Cmake build missing geom icons"
This reverts commit 468474a653.
2018-10-10 16:10:58 +00:00
54931324f5 Fix diagonal line artifact in view navigate icons.
Thanks to Clément for finding the fix!
2018-10-10 17:47:26 +02:00
e65784a051 Python API: add loop triangles access, remove tessfaces.
Loop triangles are tessellated triangles create from polygons, for renderers
or exporters that need to match Blender's polygon tesselation exactly. These
are a read-only runtime cache.

Tessfaces are a legacy data structure from before Blender supported n-gons,
and were already mostly removed from the C code.

Details on porting code to loop triangles is in the release notes.

Differential Revision: https://developer.blender.org/D3539
2018-10-10 17:43:44 +02:00
Dalai Felinto
468474a653 Cmake build missing geom icons
The icons themselves (their .dat) still need to be updated. But this will make
sure they are part of the pack next time the icons are updated.
2018-10-10 14:56:44 +00:00
1fad887d9e Fix T57130: Crash when running 'set active object as camera' on an empty
Reviewed By: brecht

https://developer.blender.org/D3782
2018-10-10 14:30:44 +02:00
84cf670d1d Modifier: Fix cage option for deform modifiers
Show-on-cage and show-in-editmode options now work as it did in 2.7x
(but only for deformation).
2018-10-10 15:53:52 +11:00
606ac3eb7f Fix modifier cage option being overwritten
Editmesh modifier calculation behaved as if eModifierMode_OnCage
was enabled for all modifiers.

Remove assignment after all modifiers are calculated.
2018-10-10 15:22:47 +11:00
9751d7188e Cleanup: naming 2018-10-10 15:18:34 +11:00
9bb1bd0b5e Correct bad statvis default in recent commit 2018-10-10 15:11:00 +11:00