Is there a way how I can mark a material and/or component definition (with ruby) to prevent cleaning up by the Sketchup purge function?
Afraid not. But thatâs not a bad idea. Some times extensions rely on a material or component even if itâs not currently applied to the model - but SketchUp has no idea the extension is âusingâ it.
Can you fill out a feature request for this? (You know where.)
You could assign the material to some hidden geometry somewhere.
But thatâs not idealâŚ
filled in a feature request in center code
I was just looking for a cleaner method than put it on some hidden geometry. But thanks for the tip.
Yea, this is a common pattern and it would be good to clean this up.
Just as a reminder, since we have a dedicated team for the API now, please submit those nagging issues - even though they might have been mentioned before. It will ensure they are brought up for consideration again.
That includes requests for better solutions to âhacksâ and workarounds.
Like a propper layers.remove(layer)
?
Yea, stuff like that. Ditto for DefinitionList.remove(definition)
.
[quote=âtt_su, post:9, topic:412, full:trueâ]
Yea, stuff like that. Ditto for DefinitionList.remove(definition)
[/quote] you have definition.entities.clear!
But there are many.
My extra âlayersâ methods hacks - made some time ago, had layer.color= - which is not added properly.
They also include layer.delete() [akin to layers.delete(layer)], with flags to delete contents or move to Layer0 etcâŚ
In passing text.font_name, text.font_name=, text.font_height, text.font_height= , combined with text_fixed/text.fixed=true/false [zoom-able point size or fixed âinchesâ]
Integrated SKM tools like my old hacks - to export SKM, import SKM, make SKM, extract imahes/thumbnails from SKM etc - much easier in v2014 now that Zlib etc is accessible to allâŚ
Additional Image methods to get definition, get transformation, access image-contents, export image, copy it, clone it, do a make_unique, turn it into a material, get/set its file-path, get/set face_me property⌠more readily than with my hacks [in SKM toolset]âŚ
Additional Group method to allow âglue_toâ of gluing component instances to be âregluedâ [like with Face], also accessing 'glued_to face within the Group [and perhaps components] - linked to a new ability for a glued-cutting component instance to cut faces within a groupâŚ