View Full Version : Extend VertexPaint modifier issues
04-16-2009, 02:12 PM
I'm trying to extend the VertexPaint modifier through maxscript, in order to add some behavior before and after a paint action. However, this is giving a lot of problems:
-If I replace the UI, I can't access the vertexpaint toolbox.
-If I don't replace the UI, the vertexpaint toolbox pops up, but I still can't paint....
Any ideas on how to solve this?
As some background info, what I'm trying to do is create a tool that allows me to paint a single component of the vertex color. So only paint the red component for example, leaving green and blue untouched.
04-16-2009, 02:54 PM
uhh... err.. no - no idea :)
you could try using the node event system... painting triggers this node event sequence on in a while:
-- @ N = timestamp, [n] N = object callback index, object animhandle id
NE: #callbackBegin @ 56705420
NE: #geometryChanged @ 56705420
NE: #topologyChanged @ 56705430
NE: #mappingChanged @ 56705440
NE: #extentionChannelChanged @ 56705450
NE: #renderPropertiesChanged @ 56705450
NE: #displayPropertiesChanged @ 56705460
NE: #subobjectSelectionChanged @ 56705470
NE: #callbackEnd @ 56705480
As well as a whole bunch of (redraw views callback)
RV: #redrawViews @ 56707783
You could detect whether the change is..
- on the currently selected object
- whether the currently active modifier is a Vertex Paint modifier
- whether it is in paint / erase mode (bit trickier)
and restore the colors for the channel's you're not interested in if the above are all true.
This would only work alongside the standard Vertex Paint modifier, however; looks like any attempt at extending/replacing it breaks the painting bits and pieces.. which somewhat defeats the purpose.
04-17-2009, 08:14 AM
Thanks for your suggestions.
I think it'll be easier to just let the user toggle "paint mode" though, and have that state change copy the appropriate data. It just would have been nice if it was possible with a modifier extending vertex paint...
04-17-2009, 08:14 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.