Page MenuHome

LibNew doesn't clone Physics Mesh
Open, NormalPublic


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:

(by solarlune)



Event Timeline

Raf Colson (raco) updated the task description. (Show Details)
Raf Colson (raco) raised the priority of this task from to Needs Triage.
Raf Colson (raco) added a project: Game Engine.
Raf Colson (raco) set Type to Bug.
Inês Almeida (brita_) triaged this task as Normal priority.Jul 11 2014, 10:50 PM
Max Voss (max12345) added a comment.EditedAug 23 2014, 1:34 PM

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?

This probably relates to T33212.

This comment was removed by Max Voss (max12345).

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

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.