Notifications
Clear all

[Closed] Show soft selection on unselected mesh?

I should have post a full example. Hope it is clear now what I want to achieve.

delete objects

p = Plane length:100 width:100 isSelected:on lengthsegs:30 widthsegs:30
convertToPoly p

max modify mode
vs = Vol__Select method:0 level:1 volume:4 UseAffectRegion:true 
vs.texture = Noise size:25 thresholdLow:0.35 thresholdHigh:0.65
modPanel.addModToSelection vs ui:on
modPanel.addModToSelection (relax Relax_Value:1 Keep_Boundary_Pts_Fixed:0 iterations:50)
	
-- uncomment to turn off soft-sel display
/*
max display mode
max backface cull toggle
max backface cull toggle
max modify mode
*/

IObjectDisplay2::PrepareDisplay seems like the best candidate to use, but I have no idea how-to… ideally I’d like to have a checkbox to show/hide current soft-sel in modifier paramblock

mode = getCVertMode p
setCVertMode p (not mode)
setCVertMode p mode

this is a little better

ps… no. it returns back after redraw.

turns out that it is enough to clear some DisplayFlags like this:

mymnmesh.ClearDispFlag(MNDISP_SELVERTS | MNDISP_VERTTICKS | MNDISP_SELEDGES );

I do it right in ModifyObject method and wonder if it is correct or I should clear these flags somewhere else?

nice catch!

Page 4 / 4