Export selection
-
Is there a plugin to export what's selected?
I'm trying to make a plugin for a special purpose that would triangulate and export everything in a selection with a given prefix and fileformat(.dae) and then hide it, all at the click of a button.Also how do I make it iterate through all groups and components to triangulate?
Can the triangulation be made at export time so it wouldnt affect the geometry in the scene?Any help appreciated.
-
Yes - I wrote this a while ago... http://forums.sketchucation.com/viewtopic.php?p=183756#p183756
-
@pixero said:
Is there a plugin to export what's selected?
I'm trying to make a plugin for a special purpose that would triangulate and export everything in a selection with a given prefix and fileformat(.dae) and then hide it, all at the click of a button.
Also how do I make it iterate through all groups and components to triangulate?
Can the triangulation be made at export time so it wouldnt affect the geometry in the scene?
Any help appreciated.Use the ideas in my
export_selection.rb
for the export.
As you have the selection you can iterate through its items and usee.hidden=true
?
Your best bet for the triangulation would be to make a new group of the selection, copy the group, explode the original new group back where it was [and also 'hide' its contents] - now you have a copy of everything for export - simply group.erase! when you are done to get rid of the unwanted now triangulated stuff?
To make the triangulations use mytriangulateFace.rb
ideas.
Iterate through thegroup.entities
and triangulate any faces, if it's a group iterate through its contentssubgroup.entities.to_a
and triangulate any faces in it [make a def to process these subgroups that can be recalled within itself to process groups in groups etc]... To triangulate faces inside any component instances will be more fraught since changing a definition could affect instances outside of the selection... So if having components in the exported set is unimportant then you can take each component-instance add it to a new subgroup [which is given the same name/description if required] and explode the instance - that way the contents are kept but can be changed independent of the definition... as it's now in a group process it as other groups to triangulate it - you need to trap for instances that are inside groups and inside instances and group/explode them the same...
Advertisement