In a editSpline i would like to be able to select segments by the materialId.
This is where i am so fare:
rollout selectSeg "select seg id"
(
spinner spn_selectID "select seg" type:#integer range:[1,3,1]
on spn_selectID entered do(
id = spn_selectID.value
obj = selection[1]
newSegSel = #()
for i=1 to (numSplines $) do if getMaterialID obj i j== id do
(
append newSegSel i
for j=1 to (numSegments $ i) do if getMaterialID obj i j== id do
(
append newSegSel j
)
setSegSelection obj i newSegSel
)
updateShape $
)
)
createDialog test 300 200
I am stuck at this point on how to make my array (newSegSel) a 2D array, and how to append the right numSplines and numSegments.
Is there anyone who might have the time to help me understand how this is done.
Best regards
David
Comments (1)
Comment policy
`
oki, try this:
Or this one if you want to first collect 2d array and later use it to select segments:
also if you include code you can use < code > your code < /code > (but without spaces between <> and word "code" :)
Hope it helps.
Pixamoon