Notifications
Clear all

[Closed] anchor rectangle in the viewfinder

hi, first excuse my english. This is my doubt about Maxscript
I’m trying to anchor a rectangle to the viewfinder, always look ahead. how the manipulator “slider”.
Where do I start?

thanks

2 Replies
1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

I hope this sample will help:


with redraw off 
(
	callbacks.removeScripts id:#camFace
	delete objects
	global cameraFaced
	fn cameraFaced node: = if isvalidnode node do 
	(
		ntm = node.transform
		vtm = getViewTM()
		node.transform = translate (rotate (scalematrix ntm.scale) (inverse vtm.rotation)) ntm.pos
	)
	global myText = text name:"myText" isselected:on
	cameraFaced node:myText
	
	callbacks.addScript #viewportChange "cameraFaced node:myText" id:#camFace
)


wooooowwww perfect!!! thank you very much!