Unable to update mesh vertex properties via Python when mesh is influenced by armature #39747

Closed
opened 2014-04-15 17:40:32 +02:00 by solarlune · 14 comments

System Information

Windows 7 64-bit
AMD Radeon HD 7700

Blender Version

Broken: Blender 2.7 3cf39fc
Worked: Unsure if it ever worked correctly

Short description of error

I reported this bug already before the bug tracker switched sites, but I guess it was lost in the move. So here's the report again.

Basically, if an object has an armature modifier on it and is parented to an armature (to be deformed by an armature), you can no longer alter its mesh's vertex properties by Python. They update in Python, but the changes aren't applied visually. I would understand if you were just unable to update a vertex's position and perhaps its normals, as those properties are being altered by the armature.

However, I think one should be able to alter the vertex's UV values and color properties (as well as any others that they wish), if possible, since the armature shouldn't have any influence on these properties.

Exact steps for others to reproduce the error

  1. Just press P to start the game engine and see the cube sit there, unmoving (the bug).

  2. Select and delete the armature.

  3. Press P to start the game engine and see the vertices of the cube move along slowly, quickly altering their colors and UV values (the correct behavior).

ArmatureParentedUpdateBug.blend

**System Information** Windows 7 64-bit AMD Radeon HD 7700 **Blender Version** Broken: Blender 2.7 3cf39fc Worked: Unsure if it ever worked correctly **Short description of error** I reported this bug already before the bug tracker switched sites, but I guess it was lost in the move. So here's the report again. Basically, if an object has an armature modifier on it and is parented to an armature (to be deformed by an armature), you can no longer alter its mesh's vertex properties by Python. They update in Python, but the changes aren't applied visually. I would understand if you were just unable to update a vertex's position and perhaps its normals, as those properties are being altered by the armature. However, I think one should be able to alter the vertex's UV values and color properties (as well as any others that they wish), if possible, since the armature shouldn't have any influence on these properties. **Exact steps for others to reproduce the error** 1) Just press P to start the game engine and see the cube sit there, unmoving (the bug). 2) Select and delete the armature. 3) Press P to start the game engine and see the vertices of the cube move along slowly, quickly altering their colors and UV values (the correct behavior). [ArmatureParentedUpdateBug.blend](https://archive.blender.org/developer/F84952/ArmatureParentedUpdateBug.blend)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @solarlune

Added subscriber: @solarlune

#19876 was marked as duplicate of this issue

#19876 was marked as duplicate of this issue
Member

Added subscriber: @kupoman

Added subscriber: @kupoman
Member

Can confirm the problem. Deleting the modifier works as well.

Just a guess without looking at the code, could be that the armature deformer is using Blender data instead of the BGE data.

Can confirm the problem. Deleting the modifier works as well. Just a guess without looking at the code, could be that the armature deformer is using Blender data instead of the BGE data.

Added subscriber: @Moguri

Added subscriber: @Moguri

This looks a lot like #32182. Is this the other report you were trying to find?

This looks a lot like #32182. Is this the other report you were trying to find?
Author

No, I don't believe it is, as this sounds like a slightly different issue. Thanks for looking, nonetheless.

EDIT: Ah, that last comment I made in the other ticket about the armature sounds like exactly the same issue. Maybe this is the ticket I was talking about. Thanks again for looking, Moguri.

No, I don't believe it is, as this sounds like a slightly different issue. Thanks for looking, nonetheless. EDIT: Ah, that last comment I made in the other ticket about the armature sounds like exactly the same issue. Maybe this is the ticket I was talking about. Thanks again for looking, Moguri.

The BL_SkinDeformer (this controls mesh skinning for armatures) creates a copy display array since BL_SkinDeformer::ShareVertexArray() returns false (see RAS_MeshSlot::SetDeformer()). Changing the return to true solves most of this bug (position and normals are grabbed from the original blender mesh, and not the BGE meshes, so changing those through KX_Mesh/VertexProxy doesn't change the input position and normals to BL_SkinDeformer, thus the output doesn't change). However, I am unsure how to get the KX_Mesh/VertexProxy to grab the right vertex/display array, since I'm not even sure which one is the "right" one. Especially since it seems a mesh can have multiple representations of a vertex. In other words, our BGE meshes are an absolute mess. I'll probably either have to design a very clever (and probably equally ugly) hack to get this working, or wait until we (hopefully, eventually) rewrite the rasterizer.

The BL_SkinDeformer (this controls mesh skinning for armatures) creates a copy display array since BL_SkinDeformer::ShareVertexArray() returns false (see RAS_MeshSlot::SetDeformer()). Changing the return to true solves most of this bug (position and normals are grabbed from the original blender mesh, and not the BGE meshes, so changing those through KX_Mesh/VertexProxy doesn't change the input position and normals to BL_SkinDeformer, thus the output doesn't change). However, I am unsure how to get the KX_Mesh/VertexProxy to grab the right vertex/display array, since I'm not even sure which one is the "right" one. Especially since it seems a mesh can have multiple representations of a vertex. In other words, our BGE meshes are an absolute mess. I'll probably either have to design a very clever (and probably equally ugly) hack to get this working, or wait until we (hopefully, eventually) rewrite the rasterizer.

Added subscriber: @angryhippo

Added subscriber: @angryhippo

◀ Merged tasks: #19876.

◀ Merged tasks: #19876.
Member

Added subscriber: @brita

Added subscriber: @brita
Member

@Moguri is this one waiting for a rasterizer rewrite? If so it can be archived and pu on the todo list

@Moguri is this one waiting for a rasterizer rewrite? If so it can be archived and pu on the todo list
Porteries Tristan self-assigned this 2015-10-25 23:20:54 +01:00

Closed as duplicate of #47945

Closed as duplicate of #47945
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
6 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#39747
No description provided.