[Closed] Using thePainter Interface
Hey Guys,
im trying to use the painter interface to scatter objects along a surface…
I havent used it before, and cannot find any decent examples…
So far I have the basic painter working, but not returning anything… Now I have an error on the line using “getHitFaceData” and “getHitPointData”.
mapped fn fnStrokePaint =
(
local localHit
local localNormal
local worldHit
local worldNormal
local radius
local str
thePainterInterface.getHitFaceData &bary &faceIndex theObj 0
thePainterInterface.getHitPointData &localHit &localNormal &worldHit &worldNormal &radius &str 0 --tabIndex
print localHit
thePainterInterface.clearStroke()
)
on btnPaintStart pressed do
(
thePainterInterface.ScriptFunctions fnStrokeStart fnStrokePaint fnStrokeEnd fnStrokeCancel fnStrokeSystemEnd
nodeList = selection
thePainterInterface.initializeNodes 0 nodeList
thePainterInterface.startPaintSession()
)
I have used it lots. There should be a perfect example in the help or tutorials section of Max for this. I believe that Bobo set this up where you are painting cylinders on the surface of other objects.
Have a look and see if you can find it, if not I will see what I can whip up for you.
ok, i got this working well
Now the next step. I would like to be able to scatter objects within the radius of the painer brush. How would I go about doing that?
So i dont want to paint in perfect line… If that make sence…
Hmm, some one else might be better at answering this as I have not had to do that. Wanted to but not had the time to try and sort it out.
Hrmmm… There doesnt seem to be much in the help with regards to this issue. One way I guess which would work would be to get the hit position/normal, and the radius. Then manually cast rays at the mesh to return extra data?
Anyone got anything better than that?
[left]
[/left]
[left]
[/left]
Hey does anyone know how to access(ie read/write) the brush options for the painterinterface?
I want to set the brush size, and also set it via my script, however I cannot find anyway to do it…
Thanks