[Closed] Can I add materila to the sphere come from manip.makeSphere
Can I add materila to the sphere come from manip.makeSphere.something like make it transparent
nope – Manipulator class transient objects are always colored according to the Color settings in Customize > Customize User Interface > Colors > Elements: Manipulators.
yep, that’d be the way to do it
It’s funny, even though manipulators are a more proper means of doing what you need (as you don’t have to worry about the user actually selecting the geometry, deleting it, etc.), the level of control over them is somewhat lacking to make them even more useful; such as differing colors. If a single object takes 2-3 manipulators, and they happen to get somewhat aligned, it’s difficult to tell which is which without either just trying them / hovering over them to get the tooltip.
Well , in the picture I posted , I actually used node(geometry) as My manipulator gizmo . They have their materilal with opacity channels . What I really have done it I used
callbacks.addScript #viewportChange "keepFaceToScreenCallback() " id:#keepFaceToScreenCallback
and in the keepFaceToScreenCallback function I keep UPDATE my node’S SCRIPTS CONTROLLER TO KEEP node face towards my screen . And then I came into a problem : if I want to accomplish it in Max SDK , I find their is no “#viewportChange” callback for my function .
fn keepFaceToScreenCallback =
(
try
(
$meshIns.XForm.controller.Update()
...
...
)
catch()
)
on updateGizmos do
(
...
CircleStr = "viewPoint = Inverse(getviewTM())
" + "viewPoint.row4 = " + node.pos as string + "
viewPoint"
$meshIns.XForm.controller.script = CircleStr
$meshIns.XForm.controller.Update()
--if someone want to use the code here ,must add a shapeGizmo to make
--updateGizmos handles work
...
)
I think If I can use “this.addGizmoMesh” to apply an mesh as my gizmo . and build the mesh’s vertex color channels as I think mesh used vertex color as their shading method in the viewport . And if vertex color has its alpha attribute , I can accomplish transparent effect in my viewport . (I do think colors has its alpha channel like (color red green blue alpha ),But obviously, Mesh gizmo can not synchronize their scale with the node they manipulat .
just an idea here:P.
My test Failed… It is can not be displayed with their vertex color channel .