View Full Version : setting properties for an object
maxguy 09-01-2006, 03:50 AM 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
for Receive G.I
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
|
|
dutch_delight
09-01-2006, 09:09 AM
Try this:
setUserProp obj "VRay_Receive_GI" "0.8"
davestewart
09-01-2006, 09:31 AM
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
maxguy
09-01-2006, 12:42 PM
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
HalfVector
09-01-2006, 12:50 PM
I think the property is VRay_GI_Receive. But receives a boolean and not a float...
maxguy
09-01-2006, 01:59 PM
If VRay_receive_gi is boolean, how do i set the value for it?
hblan
09-01-2006, 02:17 PM
If VRay_receive_gi is boolean, how do i set the value for it?
im dont know more about vRay , but in max script grammars ,to express a boolean .
------------------------------------------------------------------
maybe :
setProperty obj "VRay_Receive_GI" true -- or be false .
or :
obj.Vray_receive_gi = true -- or be false .
----------------------------------------------------------------
-- in maxscript , true is on . false is off ,and vice versa. so u can try :
setProperty obj "vray_receive_gi" on -- or off
or :
obj.vray_receive_gi = on -- or off .
maxguy
09-01-2006, 02:38 PM
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
davestewart
09-03-2006, 12:02 AM
Did you get any output in the macro-recorder?
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:
setUserProp $ "VRay_GI_Receive" false --use false or true
setUserProp $ "VRay_GI_Multipier" "5,000000" --any value you like, remember the " " to convert the value to string
I used the $ instead of obj but I guess you know this part ;-)
maxguy
09-04-2006, 09:38 PM
its late reply..but your awesome..it worked great and i learned a lot with your tip..
Hats off to you man..
Thanks
Rajv
CGTalk Moderation
09-04-2006, 09:38 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.