Notifications
Clear all

[Closed] <void> mean?

When its says <void> in the maxscript help does that mean anything special?

http://help.autodesk.com/view/3DSMAX/2015/ENU/index.html?guid=__files_GUID_E7C0F9E4_7FE6_4796_8CF1_52FC69A5CC67_htm

Because I just assumed it meant nothing need to be there, the reason I ask is when I try to use:


ViewCubeOps.GoHome();
ViewCubeOps.SetCurrentViewAsHome();

as a part of a longer script it doesn’t register it, is it a bug or am I doing it wrong?

thanks.

4 Replies

It means that the Method/Function does not return any value. It might happen that the returned value could be OK, either if the Method fails or succeed.

Ok I see,thanks. Tough I still have no idea why the “ViewCubeOps.SetCurrentViewAsHome()” don’t work when part of other code.

Here is the code: (3Ds max 2015)

fn fn_sethome = (
	temp_cam = freeCamera();
	temp_cam.type = #target;
	temp_cam.target.pos = [0,0,0];
	temp_cam.pos = [-500,-500,500];
	temp_cam.fov = 75;
	viewport.setType #view_camera;
	delete temp_cam;
	temp_cam = undefined;
	--viewport.activeViewport = 2;
	viewport.setType #view_persp_user;
	ViewCubeOps.SetCurrentViewAsHome(); -- don't work / execute when part of other code
	ViewCubeOps.GoHome(); -- don't work / execute when part of other code
	max tool maximize;
);
fn_sethome();

It seems like a notification issue. I’ve tried this and it seems to work. A little bit ugly though:

completeredraw()
 redrawviews()
 ViewCubeOps.SetCurrentViewAsHome()
 redrawviews()
1 Reply
(@patan77)
Joined: 1 year ago

Posts: 0

Thanks, yeah that seems to fix it, I had tried using both the redrawviews and completeredraw separately before when trying to solve it, without any success, but had not tried doing both at the same time with an extra redraw.