Join 2 GP already rigged (to the same armature) make it lost rigging #103004

Open
opened 2022-12-08 03:28:13 +01:00 by Samuel Santos · 10 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 526.47

Blender Version
Broken: version: 3.3.1, branch: master, commit date: 2022-10-04 18:35, hash: b292cfe5a9
Worked: Never

Short description of error
When we have two separate Grease Pencil objects rigged to the same armature (with vertex groups) works fine. But when we join the two with "Ctrl+J" the it duplicates the vertex groups (because both have all the same name since it rigged with the same armature) and everything doesn't work properly. With simple rigs only one original GP keeps working, but with more complex rigs everything falls apart.

Exact steps for others to reproduce the error

  • Create two GP objects with some strokes
  • Create an armature with one or more bones
  • Parent both GP objects to the armature using "empty vertex" option
  • Assign the empty groups to the strokes/points on both GP objects
  • Move the armature in "pose mode" and both GP objects should move properly
  • Select both GP objects and "Ctrl+J"
  • Move the armature in "pose mode" and not all GP strokes moves with the bone

This file has the basics steps until the join: GP Join.blend
From here you can test the bone in pose mode and see both are rigged to the same armature. After selecting both GP objects and doing a join (Ctrl+J) move again the bone.

Maybe the vertex groups should join together since we are using the same armature?

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 526.47 **Blender Version** Broken: version: 3.3.1, branch: master, commit date: 2022-10-04 18:35, hash: `b292cfe5a9` Worked: Never **Short description of error** When we have two separate Grease Pencil objects rigged to the same armature (with vertex groups) works fine. But when we join the two with "Ctrl+J" the it duplicates the vertex groups (because both have all the same name since it rigged with the same armature) and everything doesn't work properly. With simple rigs only one original GP keeps working, but with more complex rigs everything falls apart. **Exact steps for others to reproduce the error** - Create two GP objects with some strokes - Create an armature with one or more bones - Parent both GP objects to the armature using "empty vertex" option - Assign the empty groups to the strokes/points on both GP objects - Move the armature in "pose mode" and both GP objects should move properly - Select both GP objects and "Ctrl+J" - Move the armature in "pose mode" and not all GP strokes moves with the bone This file has the basics steps until the join: [GP Join.blend](https://archive.blender.org/developer/F14041889/GP_Join.blend) From here you can test the bone in pose mode and see both are rigged to the same armature. After selecting both GP objects and doing a join (Ctrl+J) move again the bone. Maybe the vertex groups should join together since we are using the same armature?
Author

Added subscriber: @SamuelTelles

Added subscriber: @SamuelTelles

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Added subscriber: @ChrisLend

Added subscriber: @ChrisLend

joining geometries merges the vertex groups.
Grease pencil creates a uniquely named group.

Judging by the code this seems to be on purpose calling BKE_object_defgroup_unique_name(vgroup, ob_active); in gpencil_data.c/2873

I'll leave this to the grease pencil team to decide what to do

joining geometries merges the vertex groups. Grease pencil creates a uniquely named group. Judging by the code this seems to be on purpose calling `BKE_object_defgroup_unique_name(vgroup, ob_active);` in gpencil_data.c/2873 I'll leave this to the grease pencil team to decide what to do

Added subscriber: @frogstomp-4

Added subscriber: @frogstomp-4
Aleš Jelovčan self-assigned this 2023-01-09 13:18:33 +01:00

I'll check.
I see in GP we end up with two bone groups after joining Bone and Bone.001
In mesh join operations we are only left with Bone after joining.

I'll check. I see in GP we end up with two bone groups after joining Bone and Bone.001 In mesh join operations we are only left with Bone after joining.

Added subscriber: @antoniov

Added subscriber: @antoniov

@frogstomp-4 yes, the way to go is merge the weights in the vertex group and be sure the index of the vertex group in the point is assigned to the right index of the target object.

@frogstomp-4 yes, the way to go is merge the weights in the vertex group and be sure the index of the vertex group in the point is assigned to the right index of the target object.

bonefix.diff
@antoniov this fixes the rename issue.
But unrelated, this transform also happens depending on what is selected.
This is true with the fix or not.

2023-01-09 19-24-50.mp4

[bonefix.diff](https://archive.blender.org/developer/F14136228/bonefix.diff) @antoniov this fixes the rename issue. But unrelated, this transform also happens depending on what is selected. This is true with the fix or not. [2023-01-09 19-24-50.mp4](https://archive.blender.org/developer/F14136233/2023-01-09_19-24-50.mp4)
Aleš Jelovčan removed their assignment 2023-02-06 10:23:42 +01:00
Antonio Vazquez was assigned by Aleš Jelovčan 2023-02-06 10:23:42 +01:00

@antoniov I'm assigning you to the task I could not find a proper solution for.. so it does not get lost.

@antoniov I'm assigning you to the task I could not find a proper solution for.. so it does not get lost.
Antonio Vazquez removed their assignment 2023-02-09 12:18:47 +01:00
Philipp Oeser removed the
Interest
Grease Pencil
label 2023-02-09 15:19:07 +01:00
Antonio Vazquez added this to the Grease Pencil project 2023-02-09 15:53:54 +01:00
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
5 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#103004
No description provided.