LibNew doesn't clone Physics Mesh #40955

Closed
opened 2014-07-05 04:09:06 +02:00 by Raf Colson · 23 comments

System Information
Windows 7 64 bit, Nvidia GeForce GT540M Cuda

Blender Version
Never worked up to current: 81c3fc9.

Short description of error
LibNew only makes a unique copy of the display mesh, as the data of the physics mesh is still shared.

Exact steps for others to reproduce the error
Transform the mesh of any LibNew of the same mesh.

Two examples:

LibNew_physics_mesh_bug.blend
LibNewBug.blend (by solarlune)

**System Information** Windows 7 64 bit, Nvidia GeForce GT540M Cuda **Blender Version** Never worked up to current: 81c3fc9. **Short description of error** LibNew only makes a unique copy of the display mesh, as the data of the physics mesh is still shared. **Exact steps for others to reproduce the error** Transform the mesh of any LibNew of the same mesh. Two examples: [LibNew_physics_mesh_bug.blend](https://archive.blender.org/developer/F96747/LibNew_physics_mesh_bug.blend) [LibNewBug.blend](https://archive.blender.org/developer/F67242/LibNewBug.blend) (by solarlune)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @raco

Added subscriber: @raco

#45360 was marked as duplicate of this issue

#45360 was marked as duplicate of this issue

#32427 was marked as duplicate of this issue

#32427 was marked as duplicate of this issue

#33212 was marked as duplicate of this issue

#33212 was marked as duplicate of this issue

#38170 was marked as duplicate of this issue

#38170 was marked as duplicate of this issue
Author

Added subscriber: @solarlune

Added subscriber: @solarlune
Author
@solarlune

Added subscribers: @Moguri, @Sergey, @brita

Added subscribers: @Moguri, @Sergey, @brita

◀ Merged tasks: #38170.

◀ Merged tasks: #38170.
Member

@Moguri for you?

@Moguri for you?

Added subscriber: @MaxVoss

Added subscriber: @MaxVoss

So I'm set up to try and fix this, but it's my first attempt at bug fixing. So I'd be happy for any advice you have for me.
I found the ReinstancePhysicsShape function in the CcdPhyicsController.cpp and shapeinfo->updatemesh in the comments above it. Is this what's being used by the python function?

So I'm set up to try and fix this, but it's my first attempt at bug fixing. So I'd be happy for any advice you have for me. I found the ReinstancePhysicsShape function in the CcdPhyicsController.cpp and shapeinfo->updatemesh in the comments above it. Is this what's being used by the python function?
Author

This probably relates to #33212.

This probably relates to #33212.

This comment was removed by @MaxVoss

*This comment was removed by @MaxVoss*

I figured I could write an update:

The use of replace mesh , do something with mesh , reinstance physics mesh doesn't work because replace meshswitches out the graphics mesh without regard whether it was shared or inherited or not. But the physics mesh gets inherited from whatever mesh the shape was inherited from when the object was created. Which is also why this new demofile ReplaceMeshDemo.blend demonstrates another bug, this time with the replace mesh actuator:

Creating an object and then a linked duplicate, giving the original but not the linked duplicate a replace mesh actuator and using it with a cylinder will switch out shapes for the original object but also because of it's linked nature the physics shape for the linked duplicate - but not the duplcates graphics mesh.

So really when anything gets replaced, things break. Either the graphics mesh gets replaced and the physics mesh doesn't or both do and then the physics meshes on all relative objects breaks.

I figured I could write an update: The use of *replace mesh* , *do something with mesh* , *reinstance physics mesh* doesn't work because *replace mesh*switches out the graphics mesh without regard whether it was shared or inherited or not. But the physics mesh gets inherited from whatever mesh the shape was inherited from when the object was created. Which is also why this new demofile [ReplaceMeshDemo.blend](https://archive.blender.org/developer/F110777/ReplaceMeshDemo.blend) demonstrates another bug, this time with the replace mesh actuator: Creating an object and then a linked duplicate, giving the original but not the linked duplicate a replace mesh actuator and using it with a cylinder will switch out shapes for the original object but also because of it's linked nature the physics shape for the linked duplicate - but not the duplcates graphics mesh. So really when anything gets replaced, things break. Either the graphics mesh gets replaced and the physics mesh doesn't or both do and then the physics meshes on all relative objects breaks.

Added subscriber: @JacobMerrill-1

Added subscriber: @JacobMerrill-1
Member

Added subscriber: @andreymal

Added subscriber: @andreymal
Member

Added subscribers: @JorgeBernalMartinez, @panzergame

Added subscribers: @JorgeBernalMartinez, @panzergame

Added subscriber: @HugoBarreira

Added subscriber: @HugoBarreira
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Aaron Carlisle self-assigned this 2019-06-29 02:20:09 +02:00
Member

This task is being closed because the BGE has been removed in Blender 2.8.

This task is being closed because the BGE has been removed in Blender 2.8.
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
9 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#40955
No description provided.