• Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Social Media
    •   @Wings3dOfficial
    •   @Wings3dOfficial
    •   Wings3dOfficial
    •   Wings3dOfficial
  • Register
  • Login
  • Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Register
  • Login
Wings 3D Development Forum Wings 3D Programming v
« Previous 1 2 3 4 Next »
Selection Groups

 
  • 0 Vote(s) - 0 Average
Selection Groups

Namrata
Offline

Junior Member

Posts: 8
Threads: 3
Joined: Mar 2015
#1
04-19-2015, 01:00 AM
Hello,

I am developing a plugin which requires me to create 100 new vertex selection groups. Could someone please suggest How I can automatically generate these groups having the names like 'group_n' where n will be the group number going from 1-100.

Also, how exactly would I access the vertex number of the vertices added to a particular group?
micheus
Offline

Forum's Admin and Support | Bug fixer
Posts: 3,681
Threads: 185
Joined: Jun 2012
#2
04-19-2015, 01:14 AM
It's late here, so if nobody else can help you I can try tomorrow or Monday.

But you can try find answers by looking in the code that manages it: https://github.com/dgud/wings/blob/maste...el_cmd.erl
[Image: tw.png] @MicheusVieira [Image: yt.png] @MicheusVieira [Image: da.png] Micheuss [Image: ig.png] micheus4wings3d
* Wings3D Team stands for: Björn and Dan
ggaliens
Offline

Erlang Hacker
Posts: 954
Threads: 143
Joined: Nov 2012
#3
04-19-2015, 02:40 PM (This post was last modified: 04-19-2015, 02:43 PM by ggaliens.)
A rough sample of how to add ... (code below has not been compiled or determined to be syntactically correct.
Code:
SSELS = St0#st.ssels,

WeID = % YOU FIGURE IT OUT

MyAcc = fun(_Idx,Acc) ->
     StrIdx = lists:flatten( io_lib:format("group_~p",[_Idx])),
     SetVs =GetSet(_Idx, WeID), %% you must write this function
     Key = {vertex,StrIdx},
     Value = [{WeID, SetVs}]
     gb_trees:enter((Key,Value,Acc),
end,
SSELS2 = lists:foldl(MyAcc, SSELS, lists:seq(1,100)),

St0#st{ssels=SSELS2}
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode