Wings 3D Development Forum

Full Version: wings_shape:delete(WeID, #st{})
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
wings_shape:delete(WeID, #st{}) when is_integer(WeID) ->


Guys ... dont' you think we should have one of these functions done right ? And inside it if some folder info needs to be massaged (optigon) ... this is the place for it ?

I call a folder reorg routine in about 10-20 places in my plugins and this seems wrong.
I retract this concern of mine. I think I have a good enough work-around.

Many of my calls could be collected into one call, and some were not needed anyway. My bad.
No worries.
I seached the wings source and found 15 instances. I think I did it this way due to the save_state atom and changing the folders is the last thing to happen. An object can be deleted and then later the command could fail. So the folders are accessed aftert he command has completed successfully.
Which of these should I be calling after a #we delete. Currently it is the former, I thing from
old conversation with you.

recreate_folder_system/1,update_folders/1
Pretty sure it's update_folders/1

Take a look at wings_body.erl commands/2 for examples.