Community
3ds Max Programming
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max SDK, Maxscript and Python topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do you change the Zmin and Zmax values?

3 REPLIES 3
Reply
Message 1 of 4
sswanson
516 Views, 3 Replies

How do you change the Zmin and Zmax values?

There is a Zdepth render element set up in my scene. I have a custom rollout with access to different settings and I'm trying to add the Zmin and Zmax values.

I have a text box for the Zmin value.

Here is the script

edittext Min "" text:"Min"

on Min changed txt do
(ZRenderElement.zMin = Min.text)


When I touch the text box I get the error --Unknown property: "zMin" in Z_Depth

Can anyone help?

thanks
3 REPLIES 3
Message 2 of 4
fnd.norman
in reply to: sswanson

Hi 

 

I have the same problem.

 

I set 3 State Sets and each one has its camera and its Z depth element but when I switch to different State Sets, 3DsMAX uses the same z min/ z max values.

 

How to deal with that? Have you solved this problem?

 

 

I use 3ds max 2014.

 

Message 3 of 4
Steve_Curley
in reply to: fnd.norman

For starters the zMin property is a Float - you can't assign a text string to it and hope it will work.
Second is you need to use the value passed in to the event rather than trying to access it directly.
on Min changed txt do
  (ZRenderElement.zMin = (txt as float))
That, of course, requires that your ZRenderElement does contain a valid reference to an existing Z_Depth pass in the Render Elements dialog. You haven't posted the code which obtains that so there's no way to tell if it is correct.

Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

Message 4 of 4
fnd.norman
in reply to: Steve_Curley

Thank you for replying so fast! 

 

I just use the default function "input the numbers" in 3ds max not the max script. Sorry that I didn't mention it and I found I post in the wrong forum.

 

Thank you anyway.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report