Notifications
Clear all

[Closed] meshop.setVertAlpha for a single vertex

In maxscript there is:

meshop.setVertAlpha <Mesh mesh> <intmapChannel> <vertlist> <float alpha>

But i want set alpha value just for 1 single vertex and not the complete vertlist, is there a way? I have not found a version of that function that acepts jus 1 index, but I am really new to max, so psibly I just mised something.

10 Replies

meshop.setVertAlpha() takes an array, bitarray or an integer.

7 Replies
(@gtafan)
Joined: 1 year ago

Posts: 0

So with:

meshop.setVertAlpha msh -2 1 0.5

I can set the firs map vertex of msh chanel -2 to (0.5, 0.5, 0.5), right?

(@polytools3d)
Joined: 1 year ago

Posts: 0

Yes, I suppose you can.


(
    delete objects
    boxes = for j = -1 to 1 collect converttomesh (box pos:[j*30,0,0] showvertexcolors:on vertexcolortype:2)
    
    meshop.setvertalpha boxes[1] -2 #(2,7) 0.25    -- array
    meshop.setvertalpha boxes[2] -2 #{3,6} 0.25    -- bitarray
    meshop.setvertalpha boxes[3] -2      5  0.25    -- integer
)

(@gtafan)
Joined: 1 year ago

Posts: 0

I checked it myself and it worcks. But what the diference between array and bitarray? Like mentioned, really new to maxscript.

(@polytools3d)
Joined: 1 year ago

Posts: 0
(@gtafan)
Joined: 1 year ago

Posts: 0

I know, this question sounds stupied for you, but I am a nob in maxscript.

(@polytools3d)
Joined: 1 year ago

Posts: 0

You are completely wrong in your assumptions, as well as in posting this kind of comments.
I asked myself this very same question the first time I heard about arrays and bitarrays.

And it seems we are not alone, otherwise there wouldn’t be an entry for this in the Autodesk Help. Don’t you think?

BTW: Arrays and BitArrays are not exclusive of MaxScript.

(@gtafan)
Joined: 1 year ago

Posts: 0

Sorry for the misunderstanding, maxscript is not my only problem, seems like english is even a biger one.

[What is the differences between Arrays and BitArrays?

do you want to know a difference between using these types (and a reason) for this (or this kind of) function?]( https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2016/ENU/MAXScript-Help/files/GUID-8E73B891-4616-49D9-A34C-FCC3206DDD92-htm.html )

1 Reply
(@gtafan)
Joined: 1 year ago

Posts: 0

In first place, would like to know the diference between using the function with array and bitArray. Hope, was able to explain it correctly now, like mentioned english is my other problem.