[Closed] setting properties for an object
guys,
I am using v-ray as renderer and i want to set the the receive g.i to .8 for all the selected objects. i tried for setting up for matte, it works fine,…but i am not able to set .8 for receive GI
for matte
setUserProp obj “VRay_Matte_Enable” true — works fine
[color=white]for Receive G.I
[size=1]
setUserProp obj “VRay_Receive_GI” 0.8
am i doing something wrong with the code?
i am still learning…maxscript…so correct me if i am wrong
Thanks
rajv
[/color][/size]
If you are setting user properties, this is part of the string-based properties of an object that you can see in the “properties > user properties” tab of the object in question.
If you want to actually set a property on the object (that you can see in the interface or on the track view), you need a different command:
setProperty obj "VRay_Receive_GI" 0.8
Does that help?
Cheers,
Dave
I tried both the codes, as a string and also as setproperty…not working .
I dont know if its with the problem with the code vray_receive_gi ? any suggestions ?
thanks
rajv
I think the property is VRay_GI_Receive. But receives a boolean and not a float…
im dont know more about vRay , but in max script grammars ,to express a boolean .
maybe :
[left]setProperty obj “VRay_Receive_GI” true – or be false .[/left]
[left] [/left]
[left]or : [/left]
[left] [/left]
[left]obj.Vray_receive_gi = true – or be false . [/left]
[left]—————————————————————-[/left]
[left]– in maxscript , true is on . false is off ,and vice versa. so u can try : [/left]
[left] [/left]
[left]setProperty obj “vray_receive_gi” on – or off [/left]
[left] [/left]
[left]or : [/left]
[left] [/left]
[left]obj.vray_receive_gi = on – or off . [/left]
[left] [/left]
Yup…If you look at the first post, i did it like what u said…
setuserprop obj Vray_receive_gi true
but my question is how can i set the value for vray_receive_gi
Thanks
rajv
My first tip for further exploration of the Vray properties on the object, I recommend that you rightklick on the object and choose “Properties” (NOT Vray Properties). Then go to the “User Defined” Tab. There you can see in clear text what the vray property name is called and the value.
When I did that for one of my objects I got the following list:
VRay_MoBlur_GeomSamples = 2
VRay_GI_Generate = True
VRay_GI_Receive = False
VRay_GI_Multipier = 5,000000
VRay_GI_GenerateMultipier = 1,000000
VRay_Caustics_Generate = True
VRay_Caustics_Receive = True
VRay_Caustics_Multipier = 1,000000
VRay_MoBlur_DefaultGeomSamples = True
VRay_Matte_Enable = True
VRay_Matte_Alpha = 1,000000
VRay_Matte_Shadows = False
VRay_Matte_ShadowAlpha = False
VRay_Matte_ShadowColor = [0,0,0]
VRay_Matte_ShadowBrightness = 1,000000
VRay_Matte_ReflectionAmount = 1,000000
VRay_Matte_RefractionAmount = 1,000000
VRay_Matte_GIAmount = 1,000000
VRay_Matte_GI_OtherMattes = True
VRay_Surface_Priority = 0
VRay_GI_VisibleToGI = True
If you want to set your Parameters, type:
[size=2]setUserProp $ “VRay_GI_Receive” false –use false or true
setUserProp $ “VRay_GI_Multipier” “5,000000” [color=lime]–any value you like, remember the ” ” to convert the value to string[/color]
I used the $ instead of obj but I guess you know this part
[size=2][/size]
[size=2]
[/size][/size]
its late reply…but your awesome…it worked great and i learned a lot with your tip…
Hats off to you man…
Thanks
Rajv