In the same light. I can tell there is no core command in moi like ShowPoints for ShowSurfaces or ShowCurves. I use Maya most of the time and have mel scripts that toggle various geometry classes which I would like to have for curves and surfaces in Moi. Right now I have shortcut keys for this but it's not a toggle, it just turns them off
using this inline script
http://kyticka.webzdarma.cz/3d/moi/#HideCurves
http://kyticka.webzdarma.cz/3d/moi/#HideSurfaces
e.g. script:moi.geometryDatabase.getObjects().getCurves().setProperty( 'hidden', true );
How can I write a simple if else to turn hidden to false or true for the various geometry types so the script works as a toggle instead?
this script is else format
script:var dir = moi.view.lightDirection; if ( dir.x == 1 && dir.y == 1 && dir.z == -1 ) { dir.set(-0.5,1,0); } else { dir.set(1,1,-1); } moi.view.lightDirection = dir;
I'm trying to wrap my head around this to combine each. The 1st is a command with no var (variable) then I'm wondering if I can put the result of ('hidden', var(variable))
script:var dir = moi.geometryDatabase.getObjects().getCurves().setProperty ( 'hidden') ==! 1 then moi.geometryDatabase.getObjects().getCurves().setProperty ( 'hidden', false)
Something like above but I do not know how to get the correct syntax or test for if that is true or false and cast into the var variable?
This script is simple and just a if not check? Why is this not possible for geometry? I don't know javascript so I'm clueless
script:moi.view.showHiddenLines =! moi.view.showHiddenLines;
Thank you!
|