Delete a material that's being used (using Ruby)
-
Any way to do this?
-
there isn't any mathods to delete materials. the workaround is to create temprary geoemtry and apply all others materials to it, then purge materials. But you must also make sure that the material you want to purge isn't the current one.
-
No. (I say that with no confidence. Never say never.)
If you paint a face with a color that's not in Materials, it's still not in Materials and you are not far from Bug Splat. I've not traced this to some particular combination, but it's regular, if not repeatable.
-
I have written a material.delete additional method... ThomThom helped - memory loss ?
http://forums.sketchucation.com/viewtopic.php?p=166978#p166978
It will erase a material - if it's current it 'defaults' objects with that material...
-
@thomthom said:
there isn't any mathods to delete materials. the workaround is to create temprary geoemtry and apply all others materials to it, then purge materials. But you must also make sure that the material you want to purge isn't the current one.
maybe i'm misunderstanding, but although I don't have any dedicated ruby-script, by right click on the material I can delete and replace with the default one
-
@tridem said:
@thomthom said:
there isn't any mathods to delete materials. the workaround is to create temprary geoemtry and apply all others materials to it, then purge materials. But you must also make sure that the material you want to purge isn't the current one.
maybe i'm misunderstanding, but although I don't have any dedicated ruby-script, by right click on the material I can delete and replace with the default one
You CAN easily do it manually - but to do it within a script is not available in the current API - hence my additional method
material.delete
which mimics that manual operation... -
Advertisement