
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I was working on a SimpleMod plugin to have normal based noise, and have a question regarding access to vertex normals within the map event. Currently when trying to run the getNormal command, I get an error saying "-- Runtime error: Illegal SimpleMod map handler recursion: <internal:0x000079c0> ". Is there a way to access not only the local vertex position within the map event but also the vertex normal? And is it possible to have these values update with changing topology beneath the modifier like the P variable does?
plugin simpleMod normalNoise
name:"Normal Noise"
classID:#(0x3137b97, 0x2c7557ef)
version:1
(
parameters main rollout:params
(
refNode type:#maxObject
noiseMult type:#float ui:noiseMultUI
)
rollout params "Noise Parameters"
(
noiseMultUI "Noise Mult : "
)
on create do
(
refObj = nodeTransformMonitor node:$ forwardTransformChangeMsgs:false
)
on map i p do
(
vertNormal = getNormal refObj.node i
p += (vertNormal * noiseMult)
p
)
)
Solved! Go to Solution.