IC Python API:RLPy RCameraDofData
Contents
- 1 Description
- 2 Constructor
- 3 Member Functions
- 3.1 SetEnable( self, bEnable )
- 3.2 GetEnable( self )
- 3.3 SetFocus( self, fFocusData)
- 3.4 GetFocus( self )
- 3.5 SetRange( self, fRangeData)
- 3.6 GetRange( self )
- 3.7 SetNearTransitionRegion( self, fNearTransitionRegion)
- 3.8 GetNearTransitionRegion( self )
- 3.9 SetFarTransitionRegion( self, fFarTransitionRegion)
- 3.10 GetFarTransitionRegion( self )
- 3.11 SetNearBlurScale( self, fNearBlurScale)
- 3.12 GetNearBlurScale( self )
- 3.13 SetFarBlurScale( self, fFarBlurScale)
- 3.14 GetFarBlurScale( self )
- 3.15 SetMinBlendDistance( self, fMinBlendDistance)
- 3.16 GetMinBlendDistance( self )
- 3.17 SetCenterColorWeight( self, fCenterColorWeight)
- 3.18 GetMinBlendDistance( self )
- 3.19 SetEdgeDecayPower( self, fEdgeDecayPower)
- 3.20 GetEdgeDecayPower( self )
- Main article: Modules.
Description
RCameraDofData is used to store the DOF related settings for the camera. https://manual.reallusion.com/iClone_7/ENU/Content/iClone_7/Pro_7.4/10_Scene/Camera/The_Concept_of_DOF.htm
See also: RICamera
1 #Set camera DOF data
2 new_data = RLPy.RCameraDofData()
3 new_data.SetEnable( True )
4 new_data.SetFocus(20)
5 new_data.SetRange(80)
6 new_data.SetNearTransitionRegion(5)
7 new_data.SetFarTransitionRegion(100)
8 new_data.SetNearBlurScale(2)
9 new_data.SetFarBlurScale(3)
10 new_data.SetMinBlendDistance(0.2)
11 new_data.SetCenterColorWeight(20)
12 new_data.SetEdgeDecayPower(1)
13
14 #add dof key
15 dof_key = RLPy.RKey()
16 dof_key.SetTime(RLPy.RGlobal.GetTime())
17 camera = RLPy.RScene.FindObject(RLPy.EObjectType_Camera,"Camera")
18 camera.AddDofKey(dof_key, new_data)
Constructor
__init__ (self)
Create a camera Depth of Field settings data structure.
1 data = RLPy.RCameraDofData()
Member Functions
SetEnable( self, bEnable )
Whether or not to activate the DOF funcationalities.
Parameters
- bEnable [IN] Whether to enable DOF - boolean
1 data = RLPy.RCameraDofData()
2 data.SetEnable( False )
3 data.SetEnable( True )
GetEnable( self )
Get the active state of the camera DOF.
Return
- DOF active state - boolean
1 data = RLPy.RCameraDofData()
2 data.SetEnable( True )
3 print( data.GetEnable() )
SetFocus( self, fFocusData)
Set the camera DOF focus value.
Parameters
- fFocusData [IN] DOF focus value - float
1 new_data = RLPy.RCameraDofData()
2 new_data.SetFocus(20)
GetFocus( self )
Get the camera DOF Focus value.
Return
- DOF focus value - float
1 new_data = RLPy.RCameraDofData()
2 new_data.SetFocus(20)
3 print( new_data.GetFocus() )
SetRange( self, fRangeData)
Set the camera DOF range value.
Parameters
- fRangeData [IN] DOF range value - float (ranges from 0.0 to 1000.0).
1 new_data = RLPy.RCameraDofData()
2 new_data.SetRange(20)
GetRange( self )
Get the camera DOF range value.
Return
- DOF range value - float
1 new_data = RLPy.RCameraDofData()
2 new_data.SetRange(20)
3 print( new_data.GetRange() )
SetNearTransitionRegion( self, fNearTransitionRegion)
Get the camera DOF Near Transition Region.
Parameters
- fNearTransitionRegion [IN] DOF Near Transition Region - float (ranges from 0.0 to 1000.0).
1 new_data = RLPy.RCameraDofData()
2 new_data.SetNearTransitionRegion(5)
GetNearTransitionRegion( self )
Get the camera DOF Near Transition Region.
Return
- DOF Near Transition Region- float
1 new_data = RLPy.RCameraDofData()
2 new_data.SetNearTransitionRegion(5)
3 print( new_data.GetNearTransitionRegion() )
SetFarTransitionRegion( self, fFarTransitionRegion)
Get the DOF Far Transition Region.
Parameters
- fFarTransitionRegion [IN] DOF Far Transition Region - float (ranges from 0.0 to 1000.0).
1 new_data = RLPy.RCameraDofData()
2 new_data.SetFarTransitionRegion(100)
GetFarTransitionRegion( self )
Get the camera DOF Far Transition Region.
Return
- DOF Near Transition Region - float
1 new_data = RLPy.RCameraDofData()
2 new_data.SetFarTransitionRegion(5)
3 print( new_data.GetFarTransitionRegion() )
SetNearBlurScale( self, fNearBlurScale)
Get the camera DOF Near Blur.
Parameters
- fNearBlurScale [IN] DOF Near Blur - float
1 new_data = RLPy.RCameraDofData()
2 new_data.SetNearBlurScale(2)
GetNearBlurScale( self )
Get the camera DOF Near Blur.
Return
- DOF Near Blur - float
1 new_data = RLPy.RCameraDofData()
2 new_data.SetNearBlurScale(2)
3 print( new_data.GetNearBlurScale() )
SetFarBlurScale( self, fFarBlurScale)
Set the camera DOF Far Blur Scale.
Parameters
- fFarBlurScale [IN] DOF Far Blur Scale - float
1 new_data = RLPy.RCameraDofData()
2 new_data.SetFarBlurScale(3)
GetFarBlurScale( self )
Get the camera DOF Far Blur Scale.
Return
- DOF Far Blur Scale - float
1 new_data = RLPy.RCameraDofData()
2 new_data.SetFarBlurScale(3)
3 print( new_data.GetFarBlurScale() )
SetMinBlendDistance( self, fMinBlendDistance)
Set the camera DOF Min Blend Distance.
Parameters
- fMinBlendDistance [IN] DOF Min Blend Distance - float
1 new_data = RLPy.RCameraDofData()
2 new_data.SetMinBlendDistance(0.2)
GetMinBlendDistance( self )
Get the camera DOF's Min Blend Distance。
Return
- DOF Min Blend Distance - float
1 new_data = RLPy.RCameraDofData()
2 new_data.SetMinBlendDistance(0.2)
3 print( new_data.GetMinBlendDistance() )
SetCenterColorWeight( self, fCenterColorWeight)
Set the camera DOF's Center Color Weight.
Parameters
- fCenterColorWeight [IN] DOF Center Color Weight - float
1 new_data = RLPy.RCameraDofData()
2 new_data.SetCenterColorWeight(20)
GetMinBlendDistance( self )
Get the Center Color Weight fo the camera DOF.
Return
- DOF Center Color Weight - float
1 new_data = RLPy.RCameraDofData()
2 new_data.SetCenterColorWeight(20)
3 print( new_data.GetCenterColorWeight() )
SetEdgeDecayPower( self, fEdgeDecayPower)
Set the power of the edge decay for the camera DOF.
Parameters
- fEdgeDecayPower [IN] DOF Edge Decay Power - float
1 new_data = RLPy.RCameraDofData()
2 new_data.SetEdgeDecayPower(20)
GetEdgeDecayPower( self )
Get the power of the edge decay for the camera DOF.
Return
- DOF Edge Decay Power - float
1 new_data = RLPy.RCameraDofData()
2 new_data.SetEdgeDecayPower(20)
3 print( new_data.GetEdgeDecayPower() )