Go Back   AC3D Forums > Technical > AC3D Developers
Register FAQ Members List Calendar Today's Posts

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 5th January 2004, 02:34 PM   #3
AndrewFernie
Junior Member
Member
 
Join Date: Dec 2003
Posts: 12
Default Re: Selection mode and hidden status detection

Thanks Andy.

I tried "extern int selectmode;", but I get an unresolved symbol when I link. For the moment, I will use "ac_get_current_selection(List **vertexlist, List **surfacelist, List **objectlist)" to access the select mode and put up with the message. I use the function only to access the mode (I use the new functions to access the lists of selected objects and surfaces), so it will be easy to update it later on.

The behavior of hidden status seems to depend on whether it is objects or surfaces that are being selected.
1. Assume that there is a model being displayed with a bunch of objects and surfaces. Select part of the model in either object or surface select mode, then hide the selected objects/surfaces. Select "surface select" mode, then have a plugin traverse the model recursively starting from "ac_get_world()", and use "ac_selection_select_by_surface(s)" to try to select some surfaces that are visible and some that are hidden. Even the hidden ones will be selected, and their edges will become visible in the display.
2. On the other hand, if you traverse the model and use "ac_select_object(ob)" to try to select some hidden and some visible objects, only the ones that are visible will be selected.

All this came up when I was writing two plugins to select all surfaces using a specified material, and to select all objects using a specified texture. After getting them running I found that there was already a way of tracking down all the surfaces using a specific material, so the selection of hidden surfaces became a non-issue for me. Oh well, it was an interesting little project to learn how the SDK works...

As for the plugin to select all objects using a specified texture, it works fine and I find it useful in trying to impose some structure on models whose structure did not survive conversion from odd formats. If you think that it would be useful to others I can send it along. I have no way of posting it myself.

Andrew
AndrewFernie is offline   Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 04:06 AM.


AC3D Forum
(C) Inivis Limited 2020