gdbaldw / BlenderAndMBDyn

Combines Blender's graphical interface and rendering capabilities with MBDyn's multi-body dynamics, aerodynamics, and aeroelastics simulation and analysis, for rapid modeling and realistic rendering of physics based multi-body simulations.
GNU General Public License v3.0
25 stars 13 forks source link

how to get rid of a problematic element ? #17

Closed louisgag closed 8 years ago

louisgag commented 8 years ago

Dear Doug, I'd like to know if there is a way to get rid of an "bugged" element from the BAMv2 interface? For example, in a scene, I created a total joint which was no good. I however had no way to get rid of it because the "-" button was grayed out when I selected that joint. I was only able to solve the issue by restarting Blender and reloading the .blend file, which then allowed me to delete ("-") the faulty joint.. Thank you, Have a nice day! -Louis

gdbaldw commented 8 years ago

Dear Louis, You may appreciate why reloading the file fixed the issue. Entities referenced by other entities cannot be deleted, so there needs to be a method for testing if an entity is free and eligible to be deleted. In v1, a counter attribute for each entity served that purpose. In v2, the code is more streamlined and uses the inherent Python referencing, garbage collection process. When a bug occurs, a reference can be held. Reloading the file reestablishes the correct number of references. You could, however, in a pinch, try using the commandline to import BlenderAndMBDyn.base.database and manually delete the entity, though YMMV. Cheers, -Doug