Notifications
Clear all

[Closed] [SDK] Object translation / rotation frustration

sorry I misunderstood the type of transform your were trying to achieve
so it should have been…

fn setNodeWorldRotation2 theNode theRot =
 (
	     tm = (inverse (theRot as matrix3))
	     tm[4] = theNode.transform.pos;    
	     theNode.transform = tm
 )

Really sorry for going off topic , I try to create my own thread but because I’m a new member I couldn’t.

I’m a maxscript newbie and I’m having a big problem trying to rotate the slice plane gizmo in any directions, just like if you were to manually click in the centre of the gizmo and you can rotate the slice plane in any directions you want.

Can someone please give me some advice on how I could do this through maxscript.

many thanks in advances.

you didn’t really make it clear what you wanted it to work on, editable mesh, poly or slice modifier. You can slice a mesh/poly directly using angles like so

fn SliceMesh msh euler pos = 
   (	
   	normal = (euler as matrix3).row3;
   	meshop.slice  msh #all  normal (dot normal pos);
   )
   
   fn SlicePoly poly euler pos = 
   (	
   	r = ray  pos (euler as matrix3).row3;
   	polyop.slice  poly #all r;
   )
or with polys set the slice plane
fn SetPolySlicePlane poly euler pos size = 
   (	
   	r = ray  pos (euler as matrix3).row3;
   	polyop.setSlicePlane   poly  r size;
   )

where euler is something like (eulerangles 45 45 0)

Hi Klvnk

Thank for the replying check your PM I sent my entire code that I’m work with.

Page 2 / 2