blender.git
5 months agoCleanup: use "_pad" prefix for pad vars
Campbell Barton [Wed, 27 Feb 2019 11:20:29 +0000 (22:20 +1100)]
Cleanup: use "_pad" prefix for pad vars

5 months agoCleanup: header guard names
Campbell Barton [Wed, 27 Feb 2019 08:58:06 +0000 (19:58 +1100)]
Cleanup: header guard names

Missed in file rename.

5 months agoFix T61945: Scaling with invalid snap distances
Sebastian Parborg [Wed, 27 Feb 2019 08:28:15 +0000 (09:28 +0100)]
Fix T61945: Scaling with invalid snap distances

ApplySnapResize did not take into account invalid distances. Added check for this.

Reviewed By: Campbell Barton

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

5 months agoGP: Use unique names for instance objects
Antonioya [Wed, 27 Feb 2019 07:50:29 +0000 (08:50 +0100)]
GP: Use unique names for instance objects

When instance objects linked, the name could not be unique.

5 months agoGP: Check if Instance loop is needed
Antonioya [Wed, 27 Feb 2019 07:41:13 +0000 (08:41 +0100)]
GP: Check if Instance loop is needed

This reduces the loop time if the scene is not using instances.

5 months agoGP: Optimize Instances drawing loop
Antonioya [Wed, 27 Feb 2019 07:32:55 +0000 (08:32 +0100)]
GP: Optimize Instances drawing loop

5 months agoTransform: refactor orientation naming and usasge
Campbell Barton [Wed, 27 Feb 2019 06:25:45 +0000 (17:25 +1100)]
Transform: refactor orientation naming and usasge

Transform orientation was previously related to constraints,
recent changes meant it was used even when not constraining to an axis.

Now transform orientation is separate from axis constraints.

5 months agoCorrect error in recent transform refactor
Campbell Barton [Wed, 27 Feb 2019 05:39:03 +0000 (16:39 +1100)]
Correct error in recent transform refactor

5 months agoDRW: disable wide edges when face-dots are used
Campbell Barton [Wed, 27 Feb 2019 05:01:09 +0000 (16:01 +1100)]
DRW: disable wide edges when face-dots are used

Users who prefer to use face dot's don't get an advantage from drawing
thicker wire.

Requested by @ward

5 months agoCleanup: remove runtime structs from DNA
Campbell Barton [Wed, 27 Feb 2019 04:39:12 +0000 (15:39 +1100)]
Cleanup: remove runtime structs from DNA

5 months agomakesdna: enforce use of '_pad' naming convention
Campbell Barton [Wed, 27 Feb 2019 04:07:56 +0000 (15:07 +1100)]
makesdna: enforce use of '_pad' naming convention

5 months agoCleanup: use '_pad' convention for padding in all DNA structs
Campbell Barton [Wed, 27 Feb 2019 04:07:50 +0000 (15:07 +1100)]
Cleanup: use '_pad' convention for padding in all DNA structs

Avoids mixing these in with regular variables in code-completion.

Use char for pad members except for 'void *', to make size clearer.

Removed/shrink a few redundant padding vars which were >= 8 bytes.

5 months agoCleanup: remove runtime structs from DNA
Campbell Barton [Wed, 27 Feb 2019 02:54:02 +0000 (13:54 +1100)]
Cleanup: remove runtime structs from DNA

5 months agoCleanup: remove unused Material.pr_light
Campbell Barton [Wed, 27 Feb 2019 02:08:06 +0000 (13:08 +1100)]
Cleanup: remove unused Material.pr_light

Also no need for 14 bytes of padding.

5 months agoCleanup: file rename lamp -> light
Campbell Barton [Wed, 27 Feb 2019 01:34:56 +0000 (12:34 +1100)]
Cleanup: file rename lamp -> light

5 months agoCleanup: rename lamp -> light
Campbell Barton [Wed, 27 Feb 2019 01:02:02 +0000 (12:02 +1100)]
Cleanup: rename lamp -> light

5 months agoCleanup: Main struct member names
Campbell Barton [Wed, 27 Feb 2019 00:14:41 +0000 (11:14 +1100)]
Cleanup: Main struct member names

Rename latt to lattice and don't use plural names.

5 months agoDNA: rename Lamp -> Light
Campbell Barton [Tue, 26 Feb 2019 23:46:48 +0000 (10:46 +1100)]
DNA: rename Lamp -> Light

- BKE_lamp -> BKE_light
- Main.lamp -> light

5 months agoFix: Grease Pencil data panels not working with pinning
Dalai Felinto [Tue, 26 Feb 2019 22:40:07 +0000 (19:40 -0300)]
Fix: Grease Pencil data panels not working with pinning

Note: Things were working fine if you were to pin the Grease Pencil
object, but not if you were pinning the GP data.

In too many poll functions context.object was being requested when
a simple context.gpencil_data would suffit.

Panels that are still not showing in pinning:
* DATA_PT_gpencil_display.

The panel needs to be split in sub-panels, leaving all object-dependent
properties in its own panel so we can poll it away, while showing the
rest.

* * *

This commit doesn't handle greasepencil material. In this case I
recommend we do as properties_material.py and have a generous poll(),
followed by different drawing logics whether or not we have an object.

5 months agoGrease Pencil: Strokes Cut icon
Dalai Felinto [Tue, 26 Feb 2019 20:19:18 +0000 (17:19 -0300)]
Grease Pencil: Strokes Cut icon

The icon was there, but it was not in the Export collection, nor
was it correctly named.

5 months agoGrease Pencil: Silence warning
Dalai Felinto [Tue, 26 Feb 2019 19:22:17 +0000 (16:22 -0300)]
Grease Pencil: Silence warning

5 months agoCleanup: use 'poly' for polygons-related data, not 'face'.
Bastien Montagne [Tue, 26 Feb 2019 19:59:09 +0000 (20:59 +0100)]
Cleanup: use 'poly' for polygons-related data, not 'face'.

In Blender face is for tesselated faces, that kind of miss-naming is a
pretty good way to shoot yourself in the foot at some point or another
(see T61979)...

5 months agoFix T61979: Solidify not working in Blender 2.8.
Bastien Montagne [Tue, 26 Feb 2019 19:45:56 +0000 (20:45 +0100)]
Fix T61979: Solidify not working in Blender 2.8.

Broken logic in rB181356edba04, thanks most likely to stupid naming
(face in Blender is for tessellated faces, use poly for BMesh polygons).

Cleanup to follow in next commit...

5 months agoGP: Cleanup ToDo comment
Antonioya [Tue, 26 Feb 2019 19:32:02 +0000 (20:32 +0100)]
GP: Cleanup ToDo comment

5 months agoFix T61956: Errors when instancing grease pencil objects
Antonioya [Tue, 26 Feb 2019 19:28:06 +0000 (20:28 +0100)]
Fix T61956: Errors when instancing grease pencil objects

The problem was not only for instances, but for particles too, and produced segment fault.

For some reason due any internal modification of how duplicated objects are generated, the duplicated object are not available when the draw manager try to use runtime data.

Now, before drawing the particle or the instance, the pointers of the duplicated objects are reassigned to the original "real object" to get full access to runtime data.

5 months agoUI: Move Pivot next to Orientation in header
William Reynish [Tue, 26 Feb 2019 19:24:40 +0000 (20:24 +0100)]
UI: Move Pivot next to Orientation in header

-The pivot point and orientation of any transform are strongly related
-It matches the comma-key and period-key on the keyboard who are neighbours
-We get slightly nicer grouping this way, with the two axis-related options on the left and the two toggles on the right

Reviewers: pablovazquez, campbellbarton
Differential Revision: https://developer.blender.org/D4413

5 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Tue, 26 Feb 2019 19:07:36 +0000 (20:07 +0100)]
Merge branch 'blender2.7'

5 months agoCleanup: prevent future issues with ID.tag overflow, clarify somes names.
Brecht Van Lommel [Tue, 26 Feb 2019 13:14:56 +0000 (14:14 +0100)]
Cleanup: prevent future issues with ID.tag overflow, clarify somes names.

5 months agoCleanup: remove unnecessary assert.
Brecht Van Lommel [Tue, 26 Feb 2019 18:59:51 +0000 (19:59 +0100)]
Cleanup: remove unnecessary assert.

5 months agoUI: Icons
William Reynish [Tue, 26 Feb 2019 18:29:01 +0000 (19:29 +0100)]
UI: Icons

New icons from Andrzej Ambroż / jendrzych:
-New trash icon for deleting ID's and other data (currently unused)
-New icon for the Grease Pencil select between strokes mode
-New icon for Proportional Editing Root Falloff curve

Also adjustments for Jump to Next / Prev. Keyframe, Camera ObData, Point Light ObData, Light Probe Object and ObData, Collection & Save icons.

5 months agoUI: Show marker lines in remaining animation spaces
Jacques Lucke [Tue, 26 Feb 2019 16:24:36 +0000 (17:24 +0100)]
UI: Show marker lines in remaining animation spaces

This also includes fixed/slighly refactored drawing code for marker lines.
The old code used the wrong height.

Reviewers: brecht

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

5 months agoGP: Redesign wireframe mode
Antonioya [Tue, 26 Feb 2019 15:55:21 +0000 (16:55 +0100)]
GP: Redesign wireframe mode

Now it's possible use the different Wire modes (Single, Object & Random)

Also support for x-ray mode.

For random colors, the name of the object and the name of the layer is used.

Also some parameters cleanup.

5 months agoGP: Draw: Stroke Trim
Charlie Jolly [Tue, 26 Feb 2019 16:04:27 +0000 (16:04 +0000)]
GP: Draw: Stroke Trim

New edit mode operator and post-processing brush option.

Trim works on a single GP stroke. It removes trailing points before and after the first intersection (or loop) nearest to the start of the stroke.

5 months agoCycles: Fix build error
Ray Molenkamp [Tue, 26 Feb 2019 15:32:41 +0000 (08:32 -0700)]
Cycles: Fix build error

introduced by rBdabe5cd31add8aa55b9ad4bce1b591ed4e98f1a1

5 months agoFix (unreported): Snap to grid not considering Focal Length.
mano-wii [Tue, 26 Feb 2019 14:11:04 +0000 (11:11 -0300)]
Fix (unreported): Snap to grid not considering Focal Length.

5 months agoCycles: Fix build error
Ray Molenkamp [Tue, 26 Feb 2019 15:32:41 +0000 (08:32 -0700)]
Cycles: Fix build error

introduced by rBdabe5cd31add8aa55b9ad4bce1b591ed4e98f1a1

5 months agoFix T61637: Edge extrude always uses normal orientation
Campbell Barton [Tue, 26 Feb 2019 15:05:18 +0000 (02:05 +1100)]
Fix T61637: Edge extrude always uses normal orientation

5 months agoBLI_math: quat_to_axis_angle was zeroing the axis
Campbell Barton [Tue, 26 Feb 2019 13:09:38 +0000 (00:09 +1100)]
BLI_math: quat_to_axis_angle was zeroing the axis

When there was no rotation the axis was zerod,
while not exactly a bug, it means changing the angle does nothing
and all axis-angle values are initialized with Y=1,
use this convention when resetting the axis too.

5 months agoMerge branch 'blender2.7'
Jeroen Bakker [Tue, 26 Feb 2019 13:07:57 +0000 (14:07 +0100)]
Merge branch 'blender2.7'

5 months agoT61971: Compilation Displacement/Background Kernel
Jeroen Bakker [Tue, 26 Feb 2019 13:05:54 +0000 (14:05 +0100)]
T61971: Compilation Displacement/Background Kernel

Displacement and Background kernels are selectively used, but always compiled. This patch will not compile these kernels when they are not needed.

Displacement kernel is only used for true displacement.
Background kernel is only used when there is a (Cycles)Light of type `LIGHT_BACKGROUND`.

Reviewed By: brecht, #cycles

Tags: #cycles

Maniphest Tasks: T61971

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

5 months agoBevel mod: cleanup flags and extra data.
Howard Trickey [Tue, 26 Feb 2019 12:33:41 +0000 (07:33 -0500)]
Bevel mod: cleanup flags and extra data.

Removed a clnors field unneeded after a recent refactor.
Finished deprecation of flags that haven't been used since pre-bmesh.

5 months agoUnits: GP Canvas Offset
William Reynish [Tue, 26 Feb 2019 12:02:50 +0000 (13:02 +0100)]
Units: GP Canvas Offset

Use PROP_TRANSLATION for this to make it correctly display units in the UI.

5 months agoT61576: Do Not (Re-)Compile OpenCL kernels
Jeroen Bakker [Tue, 26 Feb 2019 07:53:47 +0000 (08:53 +0100)]
T61576: Do Not (Re-)Compile OpenCL kernels

The goal of this patch is to have limit the number of times
kernels needs to be compiled and are reused as kernels with
different compile directives can lead to identical same
binaries.

The implementation does this by stripping the compile directives.
and reshuffling kernels so the output is more likely to be the
same.

We focussed on the kernels where it was easy to detect and maintain
(bundle, bake, displace, do_volume and background). More optimizations
could be done but they are probably less obvious.

Merged the data_init and state_buffer_size kernels to split_bundle.

This patch will also remove empty kernels for do_volume and bake
when their features are not enabled.

When using the benchmark files there are less background, bake and
do_volume kernels compiled.

Fix: T61576, T61501, T61466

Reviewed By: brecht, #cycles

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

5 months agoCleanup: Spelling in comment
Sergey Sharybin [Tue, 26 Feb 2019 11:16:47 +0000 (12:16 +0100)]
Cleanup: Spelling in comment

5 months agoDepsgraph: Make parameters exit dependent on ID properties
Sergey Sharybin [Tue, 26 Feb 2019 10:41:22 +0000 (11:41 +0100)]
Depsgraph: Make parameters exit dependent on ID properties

5 months agoMissed last commit
Campbell Barton [Tue, 26 Feb 2019 10:21:17 +0000 (21:21 +1100)]
Missed last commit

5 months agoTransform: fix rotate redo behavior
Campbell Barton [Tue, 26 Feb 2019 09:22:54 +0000 (20:22 +1100)]
Transform: fix rotate redo behavior

- Add XYZ option.
- Orientation now works as expected.

Now a redo for rotation works logically,
setting the axis to Z & the orientation to view.

Resolves T57205

5 months agoTransform: don't set the user constraint when it's not set
Campbell Barton [Tue, 26 Feb 2019 09:17:40 +0000 (20:17 +1100)]
Transform: don't set the user constraint when it's not set

The orientation for the redo panel would be set even when not used,
add an 'unset' orientation which defaults to global.

5 months agoGP: Rename "Dualtone" to "Duotone"
Antonioya [Tue, 26 Feb 2019 09:15:13 +0000 (10:15 +0100)]
GP: Rename "Dualtone" to "Duotone"

5 months agoFix indentation issue introduced in rB54ffc4e19dc4
William Reynish [Tue, 26 Feb 2019 08:33:21 +0000 (09:33 +0100)]
Fix indentation issue introduced in rB54ffc4e19dc4

5 months agoFix T61965: Crash edit-mesh drawing w/ hidden faces
Campbell Barton [Tue, 26 Feb 2019 05:04:23 +0000 (16:04 +1100)]
Fix T61965: Crash edit-mesh drawing w/ hidden faces

5 months agoBMesh: utility functions for visible element access
Campbell Barton [Tue, 26 Feb 2019 05:03:21 +0000 (16:03 +1100)]
BMesh: utility functions for visible element access

Needed for drawing code which skips hidden elements.

5 months agoUI: disable split layout for cursor transform
Campbell Barton [Tue, 26 Feb 2019 03:31:54 +0000 (14:31 +1100)]
UI: disable split layout for cursor transform

There isn't much horizontal space in the side-bar,
also object transform which is very similar doesn't use a split layout.

5 months agoCleanup: indentation, trailing space
Campbell Barton [Tue, 26 Feb 2019 03:31:14 +0000 (14:31 +1100)]
Cleanup: indentation, trailing space

5 months agoCleanup: assign rotation_mode to a variable
Campbell Barton [Tue, 26 Feb 2019 03:13:30 +0000 (14:13 +1100)]
Cleanup: assign rotation_mode to a variable

Don't access multiple times per draw.

5 months agoGrease Pencil naming: Use clear names for depth ordering
William Reynish [Mon, 25 Feb 2019 20:59:35 +0000 (21:59 +0100)]
Grease Pencil naming: Use clear names for depth ordering

- Add a new panel to differentiate between viewport display and stroke options
- Use clearer naming for depth ordering and stroke thickness properties

Reviewers: antoniov
Differential Revision: https://developer.blender.org/D4405

5 months agoI18n: enable Abkhaz in Blender.
Bastien Montagne [Mon, 25 Feb 2019 19:40:31 +0000 (20:40 +0100)]
I18n: enable Abkhaz in Blender.

5 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Mon, 25 Feb 2019 18:55:49 +0000 (19:55 +0100)]
Merge branch 'blender2.7'

5 months agoFix T61946: Cycles border render missing samples and crypto metadata.
Brecht Van Lommel [Mon, 25 Feb 2019 18:51:36 +0000 (19:51 +0100)]
Fix T61946: Cycles border render missing samples and crypto metadata.

5 months agoFix T61801: Wireframes on curves not working
Clément Foucault [Mon, 25 Feb 2019 18:37:08 +0000 (19:37 +0100)]
Fix T61801: Wireframes on curves not working

5 months agoGP: Rename Colorize "Bi-Tone" to "Dualtone"
Antonioya [Mon, 25 Feb 2019 16:45:52 +0000 (17:45 +0100)]
GP: Rename Colorize "Bi-Tone" to "Dualtone"

5 months agoGP: Add support for Wireframe mode
Antonioya [Mon, 25 Feb 2019 16:41:02 +0000 (17:41 +0100)]
GP: Add support for Wireframe mode

When enable Wireframe mode in the shading type, all strokes are displayed as simple 1 pixel lines.

The color of the line is equal to the stroke color or the fill color if the fill is enabled and the stroke is disabled or has invisible alpha value.

In wireframe mode, all FX are disabled because sometimes the effects can make the lines invisible.

The modifiers are not disabled.

Still pending to decide if we must add support for Random colors, but not sure if this is useful in 2D.

5 months agoFix transform scale header printing
Campbell Barton [Mon, 25 Feb 2019 16:18:07 +0000 (03:18 +1100)]
Fix transform scale header printing

Clearing constrained axes caused the scale not to print correctly.

5 months agoFix (unreported) broken code in RNA's datatransfer source layer enum function.
Bastien Montagne [Mon, 25 Feb 2019 15:53:11 +0000 (16:53 +0100)]
Fix (unreported) broken code in RNA's datatransfer source layer enum function.

Same issue as in own previous commit actually.

5 months agoFix (unreported) broken code in RNA's datatransfer source layer enum function.
Bastien Montagne [Mon, 25 Feb 2019 15:40:21 +0000 (16:40 +0100)]
Fix (unreported) broken code in RNA's datatransfer source layer enum function.

Using a CDLayer data type instead of expected mask... tsst... ;)

5 months agoRNA: disable animating the 3D cursor
Campbell Barton [Mon, 25 Feb 2019 14:48:46 +0000 (01:48 +1100)]
RNA: disable animating the 3D cursor

Decorators took up space in the UI and this doesn't seem very useful.

5 months ago3D View: support for editing cursor rotation
Campbell Barton [Mon, 25 Feb 2019 13:58:35 +0000 (00:58 +1100)]
3D View: support for editing cursor rotation

Add buttons for editing the cursor rotation as well as rotation modes,
similar to object and pose bones.

5 months agoCleanup: use const args for BLI_math_rotation
Campbell Barton [Mon, 25 Feb 2019 12:14:48 +0000 (23:14 +1100)]
Cleanup: use const args for BLI_math_rotation

5 months agoCleanup: finish modifiers' hearder re-order from rBe31f0fad9744c813.
Bastien Montagne [Mon, 25 Feb 2019 10:56:24 +0000 (11:56 +0100)]
Cleanup: finish modifiers' hearder re-order from rBe31f0fad9744c813.

For some reason forgot to handle half of modifier files...

5 months agoUnits: Typo "Square/Cubic Thous" -> "Square/Cubic Thou"
Vaishnav S [Mon, 25 Feb 2019 10:42:02 +0000 (11:42 +0100)]
Units: Typo "Square/Cubic Thous" -> "Square/Cubic Thou"

5 months agoCleanup: order of modifiers' headers includes.
Bastien Montagne [Mon, 25 Feb 2019 10:39:14 +0000 (11:39 +0100)]
Cleanup: order of modifiers' headers includes.

BLI should always comes first, before DNA, BKE etc. And
`BLI_utildefines.h` should come before any other BLI (since it's some
sort of system include really, among other things...).

Thisi should help to reduce the noise in patches when adding stuff
like uint64_t members to DNA structs... ;)

5 months agoFix T61919: Rename "Smooth Vertex" -> "Smooth Vertices"
Jacques Lucke [Mon, 25 Feb 2019 10:12:12 +0000 (11:12 +0100)]
Fix T61919: Rename "Smooth Vertex" -> "Smooth Vertices"

5 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Mon, 25 Feb 2019 09:28:40 +0000 (10:28 +0100)]
Merge branch 'blender2.7'

5 months agoFix T61891: Cycles light use nodes button greyed out.
Brecht Van Lommel [Mon, 25 Feb 2019 09:24:40 +0000 (10:24 +0100)]
Fix T61891: Cycles light use nodes button greyed out.

5 months agoFix T60880: Assert deleting grease pencil object from outliner
Campbell Barton [Mon, 25 Feb 2019 05:51:59 +0000 (16:51 +1100)]
Fix T60880: Assert deleting grease pencil object from outliner

5 months agowritefile: disable buffering when writing ZLIB
Campbell Barton [Mon, 25 Feb 2019 02:21:26 +0000 (13:21 +1100)]
writefile: disable buffering when writing ZLIB

While Buffering output is useful for file writing and memfile
compression it's redundant when the output is already buffered.
It doesn't make a significant difference for ZLIB
however it makes a moderate improvement for LZ4, see T56162.

5 months agoreadfile: re-enable read on demand for WIN32
Campbell Barton [Sun, 24 Feb 2019 21:54:10 +0000 (08:54 +1100)]
readfile: re-enable read on demand for WIN32

Revert workaround for T61855. It's likely this was caused by slow seek
for compressed files since the same behavior happens on Linux T61880.

5 months agoGP: Don't set cache as dirty with Onion
Antonioya [Sun, 24 Feb 2019 16:00:12 +0000 (17:00 +0100)]
GP: Don't set cache as dirty with Onion

5 months agoGP: Disable Onion calculation when Overlay is OFF
Antonioya [Sun, 24 Feb 2019 15:03:03 +0000 (16:03 +0100)]
GP: Disable Onion calculation when Overlay is OFF

Now, it's not required to disable the Onion in Overlay panel.

6 months agoreadfile: minor changes to support other compression formats
Campbell Barton [Sun, 24 Feb 2019 12:42:05 +0000 (23:42 +1100)]
readfile: minor changes to support other compression formats

Allow different readers to re-use the file descriptor.

6 months agoreadfile: Disable delayed data reading for compressed blend files
Campbell Barton [Sun, 24 Feb 2019 01:47:48 +0000 (12:47 +1100)]
readfile: Disable delayed data reading for compressed blend files

Seeking gzip files is very slow, disable it.

Resolves T61880

6 months agoreadfile: use regular file access when not a gzip
Campbell Barton [Sun, 24 Feb 2019 01:34:41 +0000 (12:34 +1100)]
readfile: use regular file access when not a gzip

Allows for different behavior w/ compressed files,
will also make it simpler to support other compression types,
see: T56162

6 months agoCleanup: de-duplicate readfile file opening
Campbell Barton [Sat, 23 Feb 2019 23:46:26 +0000 (10:46 +1100)]
Cleanup: de-duplicate readfile file opening

6 months agoGPUBuffer: Fix fast navigate in on smoooth multires grid
Clément Foucault [Sat, 23 Feb 2019 21:35:53 +0000 (22:35 +0100)]
GPUBuffer: Fix fast navigate in on smoooth multires grid

6 months agoFix strips text offset when zooming VSE timeline
Richard Antalik [Sat, 23 Feb 2019 19:37:24 +0000 (11:37 -0800)]
Fix strips text offset when zooming VSE timeline

Glyph cache is cleared by UI_view2d_zoom_cache_reset, when zooming V2D, but is required to calculate text height in UI_view2d_text_cache_draw

This caused text in strips to "jump around"

There was a comment in UI_view2d_zoom_cache_reset:
While scaling we can accumulate fonts at many sizes (~20 or so).
Not an issue with embedded font, but can use over 500Mb with i18n ones! See [#38244].

6 months agoRevert "Glyph cache is cleared by UI_view2d_zoom_cache_reset, when zooming V2D, but...
Richard Antalik [Sat, 23 Feb 2019 19:33:48 +0000 (11:33 -0800)]
Revert "Glyph cache is cleared by UI_view2d_zoom_cache_reset, when zooming V2D, but is required to calculate text height in UI_view2d_text_cache_draw"

Accidentaly committed unwanted changes.

This reverts commit 6bcdcc96c2548e0ee5e18acc37915aedee6329e0.

6 months ago fix T61122 : Collada Importer: Added support for transparency for Materials.
Gaia Clary [Sat, 23 Feb 2019 18:35:31 +0000 (19:35 +0100)]
 fix T61122 : Collada Importer: Added support for transparency for Materials.

 This fix sets the Base color in the principled BSDF Shader and in
 the Material->r,g,b,a values. So the transparency and color are the
 same when switching the "use nodes" option for the material

6 months agofix T61122 : Added support for Materials with Nodes disabled.
Gaia Clary [Sat, 23 Feb 2019 17:15:21 +0000 (18:15 +0100)]
fix T61122 : Added support for Materials with Nodes disabled.

- The Collada exporter did not take care of
  material transparency when nodes are turned off.

- recent change to use ma->alpha_threshold seems to have
  been wrong. transparency is now taken from ma->a when
  nodes are turned off.

6 months agofix T59951: View all sequences does not take into account region overlap
Richard Antalik [Sat, 23 Feb 2019 14:16:52 +0000 (06:16 -0800)]
fix T59951: View all sequences does not take into account region overlap
fix centering preview

Reviewed by: Brecht

Differential revision: https://developer.blender.org/D4388

6 months agoGlyph cache is cleared by UI_view2d_zoom_cache_reset, when zooming V2D, but is requir...
Richard Antalik [Sat, 23 Feb 2019 14:14:44 +0000 (06:14 -0800)]
Glyph cache is cleared by UI_view2d_zoom_cache_reset, when zooming V2D, but is required to calculate text height in UI_view2d_text_cache_draw

This caused text in strips to "jump around"

There was a comment in UI_view2d_zoom_cache_reset:
While scaling we can accumulate fonts at many sizes (~20 or so).
Not an issue with embedded font, but can use over 500Mb with i18n ones! See [#38244].

Reviewed by: Brecht

Differential revision: https://developer.blender.org/D4389

6 months agoCleanup: GCC redundant declarations
Campbell Barton [Sat, 23 Feb 2019 11:16:32 +0000 (22:16 +1100)]
Cleanup: GCC redundant declarations

Previous waning suppression was only tested with clang.

6 months agoGP: Define new Draw Mode
Antonioya [Sat, 23 Feb 2019 10:34:23 +0000 (11:34 +0100)]
GP: Define new Draw Mode

Add a new Draw Mode to display panel in order to define the z-.depth order of the strokes using the real 3D position and not the 2D layer position.

This change makes possible to use VR with grease pencil drawings because the depth of the strokes change with camera position. Also, provide an alternative solution to tasks: T57859, T60325,

The parameter only works with 3D space depth ordering. The Back and Front depths are incompatible with 3D Space mode.

Options are:
- Back
- Front
- 3D Space->2D Layers (default)
-3D Space->3D Location (new mode)

6 months agoCleanup: quiet undeclared variable warnings
Campbell Barton [Sat, 23 Feb 2019 08:17:30 +0000 (19:17 +1100)]
Cleanup: quiet undeclared variable warnings

6 months agoCleanup: quiet undeclared variable warning
Campbell Barton [Sat, 23 Feb 2019 08:16:28 +0000 (19:16 +1100)]
Cleanup: quiet undeclared variable warning

6 months agoCleanup: quiet undeclared variable warning
Campbell Barton [Sat, 23 Feb 2019 07:31:45 +0000 (18:31 +1100)]
Cleanup: quiet undeclared variable warning

Also move view_ubo into G_draw.

6 months agoCleanup: quiet undeclared variable warning
Campbell Barton [Sat, 23 Feb 2019 07:29:03 +0000 (18:29 +1100)]
Cleanup: quiet undeclared variable warning

Move bpy_context_module declaration to bpy_rna.h.

6 months agoCleanup: use specific names for global variables
Campbell Barton [Sat, 23 Feb 2019 06:47:33 +0000 (17:47 +1100)]
Cleanup: use specific names for global variables

hash & hashsizes are generic names, be more specific & define the
generic names locally.

Quiet undeclared variable warnings.

6 months agoCleanup: use function instead of extern variable
Campbell Barton [Sat, 23 Feb 2019 06:23:03 +0000 (17:23 +1100)]
Cleanup: use function instead of extern variable

Quiet undeclared variable warning.

6 months agomake.bat: Preliminary Visual Studio 2019 support.
Ray Molenkamp [Sat, 23 Feb 2019 03:49:22 +0000 (20:49 -0700)]
make.bat: Preliminary Visual Studio 2019 support.

VS2019 is binary compatible with the existing vc14 libraries and no
new libraries libs are required in svn.

VS2019 support requires cmake 3.14.

VS2019 is still in pre-release state, you are required to explicitly
select the pre-release version by using:

make full 2019pre

6 months agoMake.bat: Fix sub-module detection
Ray Molenkamp [Sat, 23 Feb 2019 03:02:45 +0000 (20:02 -0700)]
Make.bat: Fix sub-module detection