propGlasses.SetVisible className error


https://forum.reallusion.com/Topic503932.aspx
Print Topic | Close Window

By stevew - 3 Years Ago
Hi guys I am following this in the Wiki:

http://wiki.reallusion.com/IC_Python_API:RLPy_RIProp

propGlasses = RLPy.RScene.FindObject(RLPy.EObjectType_Prop, "HOT_Glasses")

ret = propGlasses.SetVisible(RLPy.RTime(10000),true)
print(ret)
I am able to get the glasses in the scene and positioned but I get className error when setting to visible.

What I am missing here please.

By videodv - 3 Years Ago
You have the set visible time to 10000 I think default is 8000 so try and set the time to say 1000 as a test.
Hope it helps 

By stevew - 3 Years Ago
I’ll try later.
I thought this setting was the time when the visibility would be set to true or false ?
By stevew - 3 Years Ago

SetVisible ( self, kTime, bVisible )

Set the prop's visibility at a given point in time.

Parameters

kTime [IN] Specifies the time to set visible - RTime
bVisible [IN] Visible status - bool

Returns

Success - RLPy.RStatus.Success
Failure - RLPy.RStatus.Failure
1 prop = RLPy.RScene.FindObject(RLPy.EObjectType_Prop, "Box")2 ret = prop.SetVisible( RLPy.RTime( 67 ), false )3 print(ret)It sounds like I have a import missing ????
By stevew - 3 Years Ago
Found the error.
I had false instead of False

Not a very good error message 😞