|
31st December 2003, 11:37 AM | #1 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
Re: Selection mode and hidden status detection
Select mode - sorry, an oversight.
Code:
Prototype int ac_get_current_selection(List **vertexlist, List **surfacelist, List **objectlist) Until a new function is added, use: Code:
extern int selectmode; To get the current selection, use these: Code:
Prototype List *ac_selection_get_vertices(); // call in vertex select mode, free list after Prototype List *ac_selection_get_surfaces(); // call in surface select mode, free list after Prototype List *ac_selection_get_objects(); // call in object or group select mode, free list after Prototype List *ac_selection_get_groups(); // gets all selected toplevel obs, call in object or group select mode, free returned list Prototype List *ac_selection_get_whole_surfaces_all(void); // any select mode, free the list when you've finished with it Prototype List *ac_selection_get_vertices_all(); // in vertex/surface modes et all selected vertices Prototype List *ac_selection_get_poly_objects(); // call in object or group select mode, free returned list Code:
Prototype void ac_selection_select_objectlist(List *obs); Prototype void ac_selection_select_vertexlist(List *l); Prototype void ac_selection_select_surfacelist(List *l); Prototype void ac_selection_select_by_surfaces(List *surfacelist); Prototype void ac_selection_select_by_surface(Surface *s); (and clear_selection()) Code:
Prototype ACSelection *ac_selection_get_snapshot(); Prototype void ac_selection_restore_from_snapshot(ACSelection *replacement); Let me know if you have any problems making this work. Objects that are hidden or locked will not be selectable (i.e. it should be safe to try and select them, and it will be ignored). There are currently no exported functions that check visibility apart from within tcl (object_is_visible) but I'll ensure that these are added to the next release. Andy |
|
|