Forum Groups
  All forums
    Help & Feedback
      Questions
      Work in progress
      Finished Art
      Non-Max related
    Community
      Offtopic
      News
    Hardware
    Photography


Featured Threads
  inspiration alert!!!
(37 replies)
  Indespensible MaxScripts, Plugins and 3rd Party Tools
(37 replies)
  The allmighty FREE Resources Thread !
(17 replies)
  spam alert!!!
(4886 replies)
  Maxforums member photo gallery index
(114 replies)
  Maxforums Member Tutorials
(89 replies)
  three cheers to maxforums...
(240 replies)
  101 Things you didnt know in Max...
(198 replies)
  A Face tutorial from MDB101 :D
(95 replies)
  Maxforums.org Members Gallery
(516 replies)
  SON OF POST YOURSELF
(637 replies)
  Dub's Maxscript Tutorial Index
(119 replies)

Maxunderground news unavailable

Seemingly simple instance select issue?
show user profile  jpedleham
Hey, Im massively inexperienced in maxscipt, im more an artist than a TD. At the moment im trying to automate some Exports. I want to only export one of each item in the scene but there may be hundreds of instances throughout the scene. So im trying to select one object, export it, then group all instances of that object so that it cant be exported again (by only selecting the edit polys) So Im trying to write up a script that will select each edit poly/edit mesh object in my scene and export it as an fbx, then select all instances of that object and group it, then move onto the next edit poly etc. However im falling at the first hurdle, the simple task of automating and grouping instances seems alot harder than i thought..


(
for obj in geometry do
(
selectinstance()
)

fn selectinstance =
(
local arSelInstancesNodes = #()
on isenabled return (selection.count == 1) and (InstanceMgr.canMakeObjectsUnique (selection as array))
on execute do
(
InstanceMgr.getinstances selection[1] &arSelInstancesNodes
Select arSelInstancesNodes
group arSelInstancesNodes
arSelInstancesNodes = #()
)
)
)

Im getting the error 'Unable to convert: GetModifyButtonText() to type: String '
And i cant for the life of me figure out where its coming from?
Im probably doing something majorly wrong here but im not clued up enough to figure out what. Can anyone help?

Jack
read 312 times
5/21/2015 10:07:35 PM (last edit: 5/21/2015 10:15:44 PM)
#Maxforums IRC
Open chat window


Support Maxforums.org