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.
Nik's picture

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 :)

Nik's picture
Anubis's picture

Hi Nikolay

I think that this come from the line:
on btnCopy pressed do
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:

MacroScript mcr_VertIDToClipboard 
category:"bga_Tools" 
buttonText:"CopyVertsID" 
toolTip:"Verts ID To 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
		if vIDArr.isEmpty then
			messageBox "Select Some Verts First!" title:"Warning" beep:off
		else
		(
			local clipStr = ""
			for i in vIDArr do append clipStr (i as string + " ")
			setclipboardText clipStr
		)
	)	
)

@Branko - wow, we posted at the same time! :)

my recent MAXScripts RSS (archive here)

Nik's picture

Thanks for the response :)

Спасибо за отклик :)

barigazy's picture

Hi Panayot, yes, rollout

Hi Panayot,
yes, rollout lines of code i forget to remove.
By the way, nice mxs version.
Cheers!

barigazy

barigazy's picture

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

barigazy

Nik's picture

Ещё :)

Ещё ошибки пошли :)
Why is that?

AttachmentSize
21.01_.gif 43.29 KB
barigazy's picture

Sorry :) macroscript

Sorry :)

 macroscript Copy_VertsID

I not have max in front of me.I use the cell phone.Lol
Теперь он должен работать :)

barigazy

Nik's picture

Aah, it's even I had to see :))) except that:

:)

AttachmentSize
21.01_1.gif 6.68 KB
Nik's picture

Here such error issue

I'm sorry for molestation
with drag & drop of macroscripr

AttachmentSize
21.01.gif 41.24 KB

Comment viewing options

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