GPv3: Automatic conversion from GPv2 #118320

Open
opened 2024-02-15 12:38:18 +01:00 by Falk David · 2 comments
Member

In order to better test compatibility between GPv2 and GPv3, automatic conversion should be added.

For now, this should only be done in case the experimental option (U.experimental.use_grease_pencil_version3) is enabled.

Conversion

  • Add conversion code to readfile process (!118705).
  • Object Conversion
    • Convert type OB_GPENCIL_LEGACY -> OB_GREASE_PENCIL
    • Convert modifiers (ob.greasepencil_modifiers -> ob.modifiers)
      • Add general handling for modifiers conversion (!118415, b31e6bd93e)
      • Add conversion code for all modifiers.
    • Animation
      • Add general handling for animation data updates (!118500, e850cca0a7)
      • Remap all necessary animation/drivers data (as much as reasonably possible)
    • Materials ?
  • Object-Data Conversion
    • bke::greasepencil::convert::legacy_gpencil_to_grease_pencil
    • Layer adjustments (!118149, 8bca19ed12)
    • Animation
      • Add general handling for animation data updates (!119214).
      • Remap all necessary animation/drivers data (as much as reasonably possible)
    • Materials ?

Warning

  • Since this operation might result in loss of data, we should display a warning on save, if the user wants to overwrite the data.
In order to better test compatibility between GPv2 and GPv3, automatic conversion should be added. For now, this should only be done in case the experimental option (`U.experimental.use_grease_pencil_version3`) is enabled. ## Conversion - [x] Add conversion code to readfile process (!118705). - [ ] Object Conversion - [x] Convert type `OB_GPENCIL_LEGACY` -> `OB_GREASE_PENCIL` - [x] Convert modifiers (`ob.greasepencil_modifiers` -> `ob.modifiers`) - [x] Add general handling for modifiers conversion (!118415, b31e6bd93e) - [x] Add conversion code for all modifiers. - [ ] Animation - [x] Add general handling for animation data updates (!118500, e850cca0a7) - [ ] Remap all necessary animation/drivers data (as much as reasonably possible) - [x] Materials ? - [ ] Object-Data Conversion - [x] `bke::greasepencil::convert::legacy_gpencil_to_grease_pencil` - [x] Layer adjustments (!118149, 8bca19ed12) - [ ] Animation - [x] Add general handling for animation data updates (!119214). - [ ] Remap all necessary animation/drivers data (as much as reasonably possible) - [x] Materials ? ## Warning - [ ] Since this operation might result in loss of data, we should display a warning on save, if the user wants to overwrite the data.
Falk David added the
Type
To Do
label 2024-02-15 12:38:19 +01:00
Falk David added this to the Grease Pencil project 2024-02-15 12:38:21 +01:00

Warning

  • Since this operation might result in loss of data, we should display a warning on save, if the user wants to overwrite the data.

Am not sure I agree with this tbh.

  • This is currently experimental. People enabling this experimental feature should expect issues in general.
  • Once out of experimental, conversion is expected to be good enough to not cause (significant) loss of data. Some feature might be removed, or not behave as before, but that's true for any changes between Blender versions. As long as it's documented in release notes. it's OK.

Am also not sure we want to enable automatic conversion by default (once GPv3 gets out of experimental), as long as both GPs coexist. INHO, automatic conversion should only be enabled once original data is fully removed from Blender (besides what is required to perform the conversion of course). At least, that's how we handled the move from proxies to liboverrides:

  1. Add liboverrides, remove ability to create new proxies, give manual operators to convert proxies to liboverrides. But still fully support existing proxies.
  2. Several releases later, once both liboverrides and the proxy conversion code were considered mature enough, enforce automatic conversion on file loading, and remove all support for proxies in the codebase.

If we follow the current rules for breaking changes (See point 2 in forward compatibility section), complete removal (and enforced auto-conversion) of old GP should happen in 5.0 release.

> ## Warning > - [ ] Since this operation might result in loss of data, we should display a warning on save, if the user wants to overwrite the data. Am not sure I agree with this tbh. * This is currently experimental. People enabling this experimental feature should expect issues in general. * Once out of experimental, conversion is expected to be good enough to not cause (significant) loss of data. Some feature might be removed, or not behave as before, but that's true for any changes between Blender versions. As long as it's documented in release notes. it's OK. Am also not sure we want to enable automatic conversion by default (once GPv3 gets out of experimental), as long as both GPs coexist. INHO, automatic conversion should only be enabled once original data is fully removed from Blender (besides what is required to perform the conversion of course). At least, that's how we handled the move from proxies to liboverrides: 1. Add liboverrides, remove ability to create new proxies, give manual operators to convert proxies to liboverrides. But still fully support existing proxies. 2. Several releases later, once both liboverrides and the proxy conversion code were considered mature enough, enforce automatic conversion on file loading, and remove all support for proxies in the codebase. If we follow the current rules for breaking changes (See [point 2 in forward compatibility section](https://developer.blender.org/docs/handbook/guidelines/compatibility_handling_for_blend_files/#forward-compatibility)), complete removal (and enforced auto-conversion) of old GP should happen in 5.0 release.
Author
Member

Am also not sure we want to enable automatic conversion by default (once GPv3 gets out of experimental), as long as both GPs coexist.

Once GPv3 lands in a release, it should replace GPv2 completely and become "Grease Pencil". There was an agreement that having both grease pencil versions in a release is a no-go.

If we follow the current rules for breaking changes (See point 2 in forward compatibility section), complete removal (and enforced auto-conversion) of old GP should happen in 5.0 release.

Generally, I do agree with this, but talking to @Sergey and @brecht then consensus was that it's fine as long as we make users aware of course.

> Am also not sure we want to enable automatic conversion by default (once GPv3 gets out of experimental), as long as both GPs coexist. Once GPv3 lands in a release, it should replace GPv2 completely and become "Grease Pencil". There was an agreement that having both grease pencil versions in a release is a no-go. > If we follow the current rules for breaking changes (See point 2 in forward compatibility section), complete removal (and enforced auto-conversion) of old GP should happen in 5.0 release. Generally, I do agree with this, but talking to @Sergey and @brecht then consensus was that it's fine as long as we make users aware of course.
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#118320
No description provided.