Model sculpt paint script, Update ?

I found this script somewhere but it is an olde , Can somebody prehaps update it ?


#-- Blender Vetex Sculpt Paint --
import Blender
from Blender import NMesh
from Blender.NMesh import Col
#import math
#from Blender.BGL import *
#from Blender.Draw import *

#-- Paint object-------

me = "Grid"

#-- The height value --

h_value = .9

#----------------------


ome = NMesh.GetRaw(me)
nme = NMesh.GetRaw()
ome.has_col =1
va=-1


for ff in ome.faces:
	va = va+1
	clrr_1 = ome.faces[va].col[0].r+ome.faces[va].col[0].g+ome.faces[va].col[0].b
	clrr_2 = ome.faces[va].col[1].r+ome.faces[va].col[1].g+ome.faces[va].col[1].b
	clrr_3 = ome.faces[va].col[2].r+ome.faces[va].col[2].g+ome.faces[va].col[2].b
	
#	print ome.faces[va].v[0].no[2]
	ome.faces[va].v[0].co[0] = ome.faces[va].v[0].co[0]
	ome.faces[va].v[0].co[1] = ome.faces[va].v[0].co[1]
	ome.faces[va].v[0].co[2] = ((ome.faces[va].v[0].co[2]+clrr_1)/255)*h_value

	ome.faces[va].v[1].co[0] = ome.faces[va].v[1].co[0]
	ome.faces[va].v[1].co[1] = ome.faces[va].v[1].co[1]
	ome.faces[va].v[1].co[2] = ((ome.faces[va].v[1].co[2]+clrr_2)/255)*h_value


	ome.faces[va].v[2].co[0] = ome.faces[va].v[2].co[0]
	ome.faces[va].v[2].co[1] = ome.faces[va].v[2].co[1]
	ome.faces[va].v[2].co[2] = ((ome.faces[va].v[2].co[2]+clrr_3)/255)*h_value

ome.has_col=0
NMesh.PutRaw (ome,"NewMesh")
Blender.Redraw()

Not an update but you can try this one.

Awsome ! I had forgotten about that one. Could you posibly add a gui button to it ? So I do not have to get pressing alt+p ?

Or at least tell me how .

^v^ Coolness… Now if it could only be live as I paint, and texture paint support. Would make it feature rich happy .

[quote=“youngbatcat”]Awsome ! I had forgotten about that one. Could you posibly add a gui button to it ?

Ok…

[quote=“jms”"]

Are you pulling my leg … :wink: :smiley: ^v^

Are you pulling my leg … :wink: :smiley: ^v[1]

And please, use python 2.2 non 2.3.


  1. /quote ↩︎

Are you pulling my leg … :wink: :smiley: ^v[1]

And please, use python 2.2 non 2.3.[/quote]

??? I have both , true… Does it matter. How do I turn One off ?
All of my other scripts still work…


  1. /quote ↩︎