Documentation: Changes between Grease Pencil v2 and Grease Pencil v3 #114419

Open
opened 2023-11-02 17:46:54 +01:00 by Falk David · 5 comments
Member

This task is meant to give a full list of all the changes (at a user level) between GPv2 and GPv3.

Object-Data Properties

Description GPv2 GPv3
Default layer name GP_Layer Layer

Draw Mode

TODO:

  • New drawing operator
  • New eraser
Description GPv2 GPv3

Edit Mode

Description GPv2 GPv3
Normalize stroke operator name Stroke > Normalize Thickness Stroke > Set Uniform Thickness
Stroke > Normalize Thickness Stroke > Set Uniform Opacity
Set Caps Operator The modes are now: Round, Flat, Toggle Start and Toggle End
Subdivide Operator Will insert 2^n-1 points. Will insert number_cuts points, if the number is 3, then 3 extra points are added to each segment instead of 7.
A new extra "Keep Shape" option is available.
Separate Operator The modes are now: Selection, By Material and By Layer

Modifiers

Description GPv2 GPv3
Common Influence Filters layer layer_filter
layer_pass layer_pass_filter
layer_pass layer_pass_filter
layer_pass < 0 toggles filter use_layer_pass_filter
invert_layers invert_layer_filter
invert_layer_pass invert_layer_pass_filter
material material_filter
pass_index material_pass_filter
pass_index < 0 toggles filter use_material_pass_filter
invert_materials invert_material_filter
invert_material_pass invert_material_pass_filter
vertex_group vertex_group_name
invert_vertex invert_vertex_group
curve custom_curve
Smooth Modifier Operator Does not have UV smoothing yet.
A new extra "Keep Shape" option is available.
A new extra "Smooth Ends" option is available.
Tint tint_type tint_mode
vertex_mode color_mode
use_weight_factor use_weight_as_factor
colors color_ramp
Line Art Vertex weight transfer option transfer all weights with the same name prefix. Vertex weight transfer will only work with the vertex group with the exact given name.

Python API

Description GPv2 GPv3
Object Type GPENCIL GREASEPENCIL
Calling operators bpy.ops.gpencil bpy.ops.grease_pencil
Assign Material stroke_change_color stroke_material_set
Normalize Thickness stroke_normalize set_uniform_thickness
Normalize Opacity stroke_normalize set_uniform_opacity
Stroke Flip stroke_flip stroke_switch_direction
This task is meant to give a full list of all the changes (at a user level) between GPv2 and GPv3. ## Object-Data Properties | Description | GPv2 | GPv3 | | ------------------ | --------- | -------- | | Default layer name | `GP_Layer` | `Layer` | ## Draw Mode TODO: * New drawing operator * New eraser | Description | GPv2 | GPv3 | | ------------------ | --------- | -------- | ## Edit Mode | Description | GPv2 | GPv3 | | ------------------ | --------- | -------- | | Normalize stroke operator name | `Stroke > Normalize Thickness` | `Stroke > Set Uniform Thickness` | | | `Stroke > Normalize Thickness` | `Stroke > Set Uniform Opacity` | | Set Caps Operator | | The modes are now: `Round`, `Flat`, `Toggle Start` and `Toggle End` | | Subdivide Operator | Will insert `2^n-1` points. | Will insert `number_cuts` points, if the number is 3, then 3 extra points are added to each segment instead of 7. <br />A new extra "Keep Shape" option is available.| | Separate Operator | | The modes are now: `Selection`, `By Material` and `By Layer` | ## Modifiers | Description | GPv2 | GPv3 | | ------------------ | --------- | -------- | | Common Influence Filters | `layer` | `layer_filter` | | | `layer_pass` | `layer_pass_filter` | | | `layer_pass` | `layer_pass_filter` | | | `layer_pass < 0` toggles filter | `use_layer_pass_filter` | | | `invert_layers` | `invert_layer_filter` | | | `invert_layer_pass` | `invert_layer_pass_filter` | | | `material` | `material_filter` | | | `pass_index` | `material_pass_filter` | | | `pass_index < 0` toggles filter | `use_material_pass_filter` | | | `invert_materials` | `invert_material_filter` | | | `invert_material_pass` | `invert_material_pass_filter` | | | `vertex_group` | `vertex_group_name` | | | `invert_vertex` | `invert_vertex_group` | | | `curve` | `custom_curve` | | Smooth Modifier Operator | | Does not have UV smoothing yet.<br /> A new extra "Keep Shape" option is available.<br /> A new extra "Smooth Ends" option is available. | | Tint | `tint_type` | `tint_mode` | | | `vertex_mode` | `color_mode` | | | `use_weight_factor` | `use_weight_as_factor` | | | `colors` | `color_ramp` | | Line Art | Vertex weight transfer option transfer all weights with the same name prefix. | Vertex weight transfer will only work with the vertex group with the exact given name. | ## Python API | Description | GPv2 | GPv3 | | ------------------ | --------- | -------- | | Object Type | `GPENCIL` | `GREASEPENCIL` | | Calling operators | `bpy.ops.gpencil` | `bpy.ops.grease_pencil` | | | | | | Assign Material | `stroke_change_color` | `stroke_material_set` | | Normalize Thickness | `stroke_normalize` | `set_uniform_thickness` | | Normalize Opacity | `stroke_normalize` | `set_uniform_opacity` | | Stroke Flip | `stroke_flip` | `stroke_switch_direction` |
Falk David added the
Type
To Do
label 2023-11-02 17:46:54 +01:00
Falk David added this to the Grease Pencil project 2023-11-02 17:46:56 +01:00
Falk David changed title from Documentation: Changes between GPv2 and GPv3 to Documentation: Changes between Grease Pencil v2 and Grease Pencil v3 2023-11-02 17:54:04 +01:00

Is there anybody working currently in documentating the Python API for GPENCIL and GREASEPENCIL? as i said over in the grease pencil chat, i was interested on checking out what's happening with MacOS and GPv3, and maybe documenting how the API works could give me a bit more experience with the codebase beforehand and a few pointers. Could i start working on it or help whoever's in charge?

Is there anybody working currently in documentating the Python API for `GPENCIL` and `GREASEPENCIL`? as i said over in the grease pencil chat, i was interested on checking out what's happening with MacOS and GPv3, and maybe documenting how the API works could give me a bit more experience with the codebase beforehand and a few pointers. Could i start working on it or help whoever's in charge?
Author
Member

Hey @mewslore :) As it stands right now, there isn't muh to document for the Python API, because not much work has been done on it. That being said, I think it could be a good way to learn more about how the code (for GPv2 and GPv3) works. E.g. if you look at rna_gpencil_legacy.cc (python API functions for GPv2) and rna_grease_pencil.cc (same for GPv3), you'll see that most of the functions haven't been ported yet.

If you're interested in looking at this, I can also create a task with some more pointers and a list of what would have to be done.

Hey @mewslore :) As it stands right now, there isn't muh to document for the Python API, because not much work has been done on it. That being said, I think it could be a good way to learn more about how the code (for GPv2 and GPv3) works. E.g. if you look at `rna_gpencil_legacy.cc` (python API functions for GPv2) and `rna_grease_pencil.cc` (same for GPv3), you'll see that most of the functions haven't been ported yet. If you're interested in looking at this, I can also create a task with some more pointers and a list of what would have to be done.

I'm definitely interested @filedescriptor , let's make that task and i'll start from there ;)

I'm definitely interested @filedescriptor , let's make that task and i'll start from there ;)
Author
Member

@mewslore I began working on an overview task: #116043. I'll create a first subtask that might be a good fit for you: data-structure iterators and accessors.

@mewslore I began working on an overview task: https://projects.blender.org/blender/blender/issues/116043. I'll create a first subtask that might be a good fit for you: data-structure iterators and accessors.
Author
Member
@mewslore [#116045: GPv3: Python API: GreasePencilFrame](https://projects.blender.org/blender/blender/issues/116045)
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#114419
No description provided.