[Closed] getDisplayMesh Set key button flashing
Hi there,
I’ve seen that a long time ago when I was trying to create my first custom helper and today it came across to the same problem once more.
Every time I pass a mesh to the getDisplayMesh, the “Set keys” button is flashing (the button with the Key Icon next to Auto Key and Set Key)
I’ve also tested the sample from the documentation and I get the same problem.
I stripped out the code and kept only the basics and I’m still having the same problem.
plugin Helper HelperTest_DisplayMesh name:"HelperTest" classID:#(0x47db14ff, 0x4e9b5f90) category:"Standard" extends:dummy
(
local meshObj
on getDisplayMesh do
(
if (meshObj == undefined) do ( meshObj = createInstance box length:10 width:10 height:10 mapCoords:false )
meshObj.mesh
)
)
HelperTest_DisplayMesh()
Do you know how I can fix this?
Thanks,
Nick
no, i don’t. probably it’s just not possible to fix. the best you can do is use scripted manipulator with a gizmo mesh… working with manipulators probably adds you another headache, but the “Animate State” button will not flash (personally i hate any stupid UI flashing)
you could try building the mesh directly an example here
sorry doesn’t fix the ui flash :hmm:… doesn’t flash on sdk implemented helpers though, which are not too tricky to create (they become very addictive though ;))
HAH!!! i’m stupid sometimes… of course you can!
plugin Helper HelperTest_DisplayMesh name:"HelperTest" classID:#(0x47db14ff, 0x4e9b5f90) category:"Standard" extends:dummy
(
local theMesh
on getDisplayMesh do
(
if (theMesh == undefined) do
(
meshObj = createInstance box length:10 width:10 height:10 mapCoords:false
themesh = copy meshObj.mesh
)
theMesh
)
)
HelperTest_DisplayMesh()
i’ve just looked in my old code…
what do you mean “create via the viewport”?
If you mean using the “tool create” it works fine for me
plugin Helper HelperTest_DisplayMesh name:"HelperTest" classID:#(0x47db14fe, 0x4e9b5f90) category:"Standard" extends:dummy
(
local meshObj
on getDisplayMesh do
(
if (meshObj == undefined) do
(
meshObj = createInstance box length:10 width:10 height:10 mapCoords:false
meshObj = copy meshObj.mesh
)
meshObj
)
tool create (
on mousePoint click do (
nodeTM.translation = gridPoint;
#stop
)
)
)
when using the mouse to create the helper in the viewport the lock animation button in the ui still flickers
Aww you mean about a quick flicker that does on the creation?! If yes, it’s ok, that’s not a problem. The problem was when it was flickering while you were panning/orbiting etc which was freaking annoying.
I’ll give it a go later because now I have two scripted plugins, one for the mesh (invisible class) and one for the helper, so I suppose in my case, your method makes more sense.
Thanks Klunk