Commit Graph

53 Commits

Author SHA1 Message Date
Campbell Barton
65f15e972e Cleanup: remove redundant check 2019-03-08 02:47:00 +11:00
Campbell Barton
3a813622e1 Cleanp: use static sets 2019-03-08 02:43:33 +11:00
William Reynish
6837474ae8 UI: Use sub-panels inside Grease Pencil Onion Skinning panel
Reviewers: Antonio Vazquez (antoniov)

Differential Revision: D4465
2019-03-07 14:57:21 +01:00
Antonioya
f6bafef1e1 GPencil: Move Object Depth Order to Object
There was a conflict between Object "In Front" and how the strokes were managed in Stroke panel for grease pencil datablock.

In order to keep consistency, the order of the object has been moved to Object level and now it's using the standard "In Front" flag. As all it is 3D, the option "Back" has been removed.

This also fixes the problem with task T62137.

Also related to commit 54ffc4e19d and D4405
2019-03-04 17:06:03 +01:00
Antonioya
9ddc2064a4 GPencil: Remove dummy marker for Grease Pencil objects
After adding selecction using strokes, the dummy is not required because it was added as a provisional solution while we implement stroke selection.
2019-02-28 17:13:05 +01:00
Dalai Felinto
ce104ca896 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.
2019-02-26 19:51:13 -03:00
William Reynish
54ffc4e19d 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
2019-02-25 21:59:35 +01:00
Antonioya
8214a1ae34 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)
2019-02-23 11:46:24 +01:00
Antonioya
bb9c9d0eaa GP: New Cutter, Constraints and Segment selection
This commit groups a set of new tools that were tested in grease pencil object branch before moving to master. We decide to do all the development in a separated branch because it could break master during days or weeks before the new tools were ready to deploy.

The commit includes:

- New Cutter tool to trim strokes and help cleaning up drawings.

- New set of constraints and guides to draw different types of shapes. All the credits for this development goes to Charlie Jolly (@charlie), thanks for your help!

- Segment selection mode to select strokes between intersections.

- New operator to change strokes cap mode.

- New option to display only keyframed frames. This option is very important when fill strokes with color.

- Multiple small fixes and tweaks.

Thanks to @pepeland and @mendio for their ideas, tests, reviews and support.

Note: Still pending the final icons for Cutter in Toolbar and Segment Selection in Topbar. @billreynish could help us here?
2019-01-11 19:21:56 +01:00
Bastien Montagne
90e354fd7a Revert/Redo ugly rBd12b3767f81d commit (i.e. add locked sorting option to UIList).
Too many things done wrong in original rBd12b3767f81d to list them all
here, hopefully nothing bad sneaked in again this time :|

Also cleaned up a little the 'sort by name', even though (since we only
have two options by default, sort by index and by name) we can abuse it
as a binary option for now, this is not a bitflag...
2019-01-09 15:51:46 +01:00
Bastien Montagne
1158b9f73a Cleanup: First batch of UI messages fixes (typos, final points...).
Also contains some code typo fixes (mostly, adtaptative -> adaptive,
former is nearly innexistant in English, let's stick to simple valid
words ;) ).
2018-12-23 22:03:43 +01:00
Campbell Barton
e71d489254 Cleanup: style 2018-12-20 13:11:04 +11:00
Antonioya
18d354a5eb GP: Remove Object Onion Skin switch
It was confusing to have two switches.
2018-12-10 20:18:15 +01:00
Antonioya
2debee96ec GP: Replace Clamp icon 2018-12-10 20:18:10 +01:00
Antonioya
99f7934e19 GP: New Blend Layers functionality
Now it's possible define the blend mode between layers including the option to clamp the layer using underlying layers.

Also a new Simplify option has been added to disable blend layers.
2018-11-26 18:12:39 +01:00
Antonioya
5cfcee8c39 GP: Reorganize Canvas Grid
Now the grid is always controlled by the topbar selector and not in the canvas panel. To have two places to define orientation was confuse.

The orientation by default (no lock) is always to view plane.
2018-11-04 13:00:37 +01:00
Antonioya
1237e50c9b GP: Reorganize origin popover and top area
- Draw on back buttons moves near mode
- zDepth offset moved from View Panel to Popover
- Target for Stroke mode moved to popover
- New First point snap mode
2018-11-01 17:05:04 +01:00
Antonioya
494fbfc045 GP: Move Autlock to Layer menu 2018-10-31 14:18:39 +01:00
Antonioya
14e1dfda4e GP: New Autolock Inactive Layer
This option locks any layer no active to avoid any accidental change.
2018-10-31 11:00:28 +01:00
Antonioya
4c2561a877 GP: Include option to render layers by view layer
This allows to make composition getting each grease pencil layer in a different render output.
2018-10-25 16:50:42 +02:00
Antonioya
e1a66201da GP: Add layer pass index to time modifier 2018-10-24 11:03:09 +02:00
Antonioya
b8327ee129 GP: Remove Layer order userprefs parameter
After a lot of discussion about this option (see 18f1175940) 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.
2018-10-13 20:34:36 +02: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
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
a1dbd2bb6c GP: Minor changes to canvas panel 2018-10-09 17:45:51 +02:00
Antonioya
11877e5bec GP: New Canvas offset parameters
Now the canvas can me moved in X/Y axis.
2018-10-08 23:21:44 +02:00
Brecht Van Lommel
2ac65f6153 UI: new icon set by Andrzej Ambroz.
This is a monochrome icon set, with a more modern look and icons for
various features that did not have a proper icon before.
2018-10-08 19:46:00 +02:00
Antonioya
b8a0434bc5 GP: New automatic adaptative UVs parameter
Now by default the UVs are calculated with a fixed size and this makes easier to add patterns for drawings like Manga. Before, the texture changed depending of the stroke size.
2018-10-08 18:33:26 +02:00
Antonioya
8ce5f015dc GP: Remove decoration in Viewport Display panels 2018-10-05 10:39:02 +02:00
Antonioya
e8f135c2cf GP: Cleanup grid RNA settings moving to separated struct 2018-10-05 10:23:31 +02:00
Antonioya
3a1e9b9997 GP: Move grid parameters to GP object data level
The grid now can be configured by object because this helps to identify objects and allows to define diferent grid parameters for each objects.

Also added a color option.
2018-10-04 23:27:34 +02:00
Antonioya
8d26705b3e GP: Add z-depth offset parameter
This parameter allows to define the percentage of offset of a stroke when uses surface mode.

Before, this was a fixed value, but for some artists' purposes, it's good to have the option to change it.
2018-10-03 10:55:26 +02:00
Antonioya
0d2c95a77a GP: Make Layer and Material lists shorter
This reduces UI vertical space.
2018-09-28 15:47:53 +02:00
Antonioya
a914159f62 GP: Expand properties layer list 2018-09-27 22:08:27 +02:00
Campbell Barton
c5c987cde9 Cleanup: flip option unlock -> lock
Nearly all options are currently to toggle locking.
2018-09-27 08:51:47 +10:00
Antonioya
1cdf136846 GP: Rename parameter unlock_color and tooltip 2018-09-26 16:17:54 +02:00
Antonioya
150cba73c9 GP: Change menu icons for hide/show 2018-09-26 16:01:01 +02:00
Antonioya
ac747c96d9 GP: Move Unlock Color to Adjustments panel
This option is not used all the time and can be moved to additional panel
2018-09-24 22:26:21 +02:00
Campbell Barton
08c7733c13 Cleanup: style 2018-09-21 08:11:50 +10:00
Antonioya
ce1b57227d GP: Add new popover with layers panel 2018-09-20 18:50:19 +02:00
Antonioya
77edcf5ff1 GP: Change isolate layer icon 2018-09-18 19:01:16 +02:00
Campbell Barton
b05f9e35cb Cleanup: unused variables 2018-09-11 18:15:55 +10:00
Brecht Van Lommel
e0a4dc6a79 UI / Python: rename X-Ray to In Front, Draw to Display.
See T56648.
2018-09-06 13:26:46 +02:00
Antonioya
ba6daadb9d GP: Reorder Viewport Display panel options 2018-09-04 22:11:18 +02:00
Campbell Barton
e9fb2feb2e UI: text keyword argument to label
Prepare for keyword only args
2018-08-28 12:34:51 +10:00
Antonioya
9de320d882 GP: New operator to copy layers between objects
The operator allows to copy a complete layer with all frames or only active frame to a new object.

Can be found in edit specials menu (W key) or in Layers specials menu (last button near layer list).
2018-08-27 16:31:03 +02:00
Brecht Van Lommel
1de3ae7e42 UI: rename Grease Pencil panels in toolbar to Annotation.
To match the panels in the N key sidebar.
2018-08-23 19:05:42 +02:00
Campbell Barton
583fb8c140 Cleanup: RNA naming 2018-08-22 15:43:28 +10:00
Antonioya
7fda7fb750 GP: Force Fill triangulation data recalc
Add a general parameter to force the recalc of the triangulation data because some modifiers could change the geometry and the filling triangles would not be right.

Now, the parameter is visible in UI panel because this option reduces FPS, but maybe in the future we can keep always ON and remove the parameter.
2018-08-21 19:46:29 +02:00
Antonioya
8e8d93eb86 GP: Redesign logic of drawing engine for object instance support
The initial design assumed that there was only one object for each unique name, but that was not the case when instances were created.

Now, instances are supported and speed has been greatly improved when repetitions are used.

As a result of this change, the option to create objects has been removed in the Instances modifier. This option was strange and was also against Blender's design rules, since a modifier should never create objects. The old functionality of the modifier can be achieved with instances.

Also, several memory leakage problems that were not previously detected have been eliminated, and especially in the grid and in the drawing process

Onion Skin is not supported in multi-user datablocks.  Support this, makes incompatible with instances. We need find a solution in the long term, but now it's better keep disabled and make instances work. Anyway, the new instances makes unnecessary to use muli-user datablocks.
2018-08-15 20:27:59 +02:00