How to make for copy vertex-ID of several objects with Edit_poly modifer (by Tab forexample)?

Forum topic · General Scripting
By Nikolay Litvinov · 2013-01-20
How to make for copy vertex-ID of several objects with Edit_poly modifer (by Tab forexample)?

Comments (23)
Comment policy
Thank you very much for everything
Ok Thank you very much for everything. I hope I'm not too stop you. You surprised me with your compassion. Really nice :)
Error :) --Unknown system exception
As so
Now we talking :)
Now i tested in max.
;)macroScript Copy_VertsID ButtonText:"CopyVertsID" Category:"bga_Tools" Tooltip:"Copy V-ID To Clipboard"
(
local Clipboard = dotNetClass "Clipboard"
local obj = selection[1]
if obj != undefined and isKindOf obj Editable_Poly or isKindOf obj Editable_Mesh do
(
local vIDArr = obj.selectedverts as bitarray
local clipStr = ""
if vIDArr.numberset == 0 then messageBox "Select Some Verts First!" title:"Warning" beep:off else
(
for i in vIDArr do append clipStr (i as string + " ")
Clipboard.Clear()
Clipboard.SetDataObject clipStr true
)
)
)
Hi Nikolay
I think that this come from the line:
Maybe coincident copy/paste mistake. When Branko remove the rollout he forget to remove and the button event. So delete that line, or try with my edited code:
@Branko - wow, we posted at the same time! :)
Hi Panayot,
yes, rollout lines of code i forget to remove.
By the way, nice mxs version.
Cheers!
Thanks for the response :)
Спасибо за отклик :)
Ещё :)
Ещё ошибки пошли :)
Why is that?
Attachments
Sorry :)
I not have max in front of me.I use the cell phone.Lol
Теперь он должен работать :)
Aah, it's even I had to see :))) except that:
:)
Attachments
Here such error issue
I'm sorry for molestation
with drag & drop of macroscripr
Attachments
Open the script and change first line of code to
macroscript "Copy_VertsID"
Branko, аnd without rollout make this script?
Schutcut only.
Copy this file in macrscript folder.
You can find macro under category "bga_Tools"
Attachments
! You golden man, thank you very much!
works thanks!
:)
Ok. My pleasure
Cheers!
edit
About data output
--if you using this line
i as string + " "
--then the output (after paste) will look like this
result > 10 12 54 668 44 454 454 ...
--or if you change to
i as string + "\n"
--then the output will look
result >
10
12
54
668
...
Branko friend, help me.
And the rollout inappropriately
let it be only shotcut
Select en EditPoly or EditMesh object, pick some verts and press the button. Then just past data in any text editor
try(destroyDialog ::test)catch()
rollout test "Copy V-ID To Clipboard"
(
fn filterGeom geo = isKindOf geo Editable_Poly or isKindOf geo Editable_Mesh
button btnCopy "Copy Vertex ID" width:146
local Clipboard = dotNetClass "Clipboard"
--local sysStr = dotNetClass "System.String"
on btnCopy pressed do
(
local obj = selection[1]
if obj != undefined and filterGeom obj do
(
local vIDArr = obj.selectedverts as bitarray
local clipStr = ""
if vIDArr.numberset == 0 then messageBox "Select Some Verts First!" title:"Warning" beep:off else
(
for i in vIDArr do append clipStr (i as string + " ")
Clipboard.Clear()
Clipboard.SetDataObject clipStr true
)
)
)
)
createDialog test 150 30
That's how it looked (I created a gif, look)
No text display is certainly not required (such as "Copy Vertex ID to Clipboard").
And showing vertex id is also not necessary - it is, I have, as seen.
Operation is simply copy-paste Vertex ID
Many thanks for your reply
Attachments
try this
Similal script you can find here
http://www.scriptspot.com/forums/3ds-max/scripts-wanted/object-name-to-c…
It's not work
Does not work, please, help me please
I think the remnants of my code muddled
start
I will start like this and you need to tell me what's next :)
fn filterGeom geo = isKindOf geo Editable_Poly or isKindOf geo Editable_Mesh
selSet = getCurrentSelection()
clearSelection()
if selSet.count != 0 do
(
if getCommandPanelTaskMode() != #create do setCommandPanelTaskMode mode:#create
with redraw off
(
for obj in selSet where filterGeom geo do
(
--???
)
)
)
select selSet
free selSet
Please explain better what you exactly want to achive?