COPY VERTEX ID IN CLIPBOARD.

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

copy vertex id

AttachmentSize
copy-paste-vertex-id.gif764.81 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
barigazy's picture

Open the script and change

Open the script and change first line of code to

macroscript "Copy_VertsID"

bga

Nik's picture
barigazy's picture

Copy this file in macrscript

Copy this file in macrscript folder.
You can find macro under category "bga_Tools"

AttachmentSize
bga_copy_verts_id.mcr 637 bytes

bga

Nik's picture

! You golden man, thank you very much!

works thanks!

barigazy's picture

:)

Ok. My pleasure
Cheers!

bga

barigazy's picture

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
...

bga

Nik's picture

Branko friend, help me.

Branko friend, help me.
And the rollout inappropriately
let it be only shotcut

barigazy's picture

Select en EditPoly or

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

bga

Nik's picture

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

AttachmentSize
copy-paste-vertex-id.gif 764.81 KB
barigazy's picture

try this

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"
	on btnCopy pressed do 
	(
		local 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
				(
					clipStr = ""
					vIDArr = obj.selectedverts as bitarray
					if vIDArr.numset != 0 do 
					(
						for i in vIDArr do append clipStr (i as string + " ")
						Clipboard.Clear()
						Clipboard.SetText clipStr
					)
				)
			)
		)
		--select selSet
		free selSet
	)
)
createDialog test 150 30 fgcolor:yellow

Similal script you can find here
http://www.scriptspot.com/forums/3ds-max/scripts-wanted/object-name-to-c...

bga

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.