countag
04-08-2006, 07:21 AM
Hi all,
i think i have a little problem, i try to get the VertColor, i think it's that, i want to get the color when you create a new objet, it will be maybe blue or green or red or pink but i want to know if its possible to get this color ? :/
i try to code an easy exporter (because im noob in Maxscript)
tmesh = snapshotAsMesh selection[1]
out_name = ((GetDir #export)+"\exportation.ag")
out_file = createfile out_name
num_verts = tmesh.numverts
num_faces = tmesh.numfaces
format "vecteur : %\n" num_verts to:out_file
format "face : %\n" num_faces to:out_file
format "\n" to:out_file
for v = 1 to num_verts do
(
vert = getVert tmesh v
format "%,%,%," vert.x vert.y vert.z to:out_file
format "\n" to:out_file
)
format "\n" to:out_file
for f = 1 to num_faces do
(
face = getFace tmesh f
format "%,%,%," (face.x as integer) (face.y as integer) (face.z as integer) to:out_file
format "\n" to:out_file
)
format "\n" to:out_file
for v = 1 to num_verts do
(
vc = getVertColor tmesh v
format "% % % " vc.r vc.g vc.b to:out_file
)
close out_file
edit out_name
this code :
for v = 1 to num_verts do
(
vc = getVertColor tmesh v
format "% % % " vc.r vc.g vc.b to:out_file
)
do nothing
i think i have a little problem, i try to get the VertColor, i think it's that, i want to get the color when you create a new objet, it will be maybe blue or green or red or pink but i want to know if its possible to get this color ? :/
i try to code an easy exporter (because im noob in Maxscript)
tmesh = snapshotAsMesh selection[1]
out_name = ((GetDir #export)+"\exportation.ag")
out_file = createfile out_name
num_verts = tmesh.numverts
num_faces = tmesh.numfaces
format "vecteur : %\n" num_verts to:out_file
format "face : %\n" num_faces to:out_file
format "\n" to:out_file
for v = 1 to num_verts do
(
vert = getVert tmesh v
format "%,%,%," vert.x vert.y vert.z to:out_file
format "\n" to:out_file
)
format "\n" to:out_file
for f = 1 to num_faces do
(
face = getFace tmesh f
format "%,%,%," (face.x as integer) (face.y as integer) (face.z as integer) to:out_file
format "\n" to:out_file
)
format "\n" to:out_file
for v = 1 to num_verts do
(
vc = getVertColor tmesh v
format "% % % " vc.r vc.g vc.b to:out_file
)
close out_file
edit out_name
this code :
for v = 1 to num_verts do
(
vc = getVertColor tmesh v
format "% % % " vc.r vc.g vc.b to:out_file
)
do nothing
