Difference between revisions of "IC Python API:Uses and Capabilities"

From Reallusion Wiki!
Jump to: navigation, search
m (Version 0.7.3)
m (Version 0.7.3)
Line 255: Line 255:
 
|-
 
|-
 
!scope="row"|CHikEffectorComponent::SetActive( args... )
 
!scope="row"|CHikEffectorComponent::SetActive( args... )
|Used to set HIK effector active state.  Usage: CHikEffectorComponent::SetActive( RO::EHikEffector eEffector, RO::EHikEffectorType eType, bool bActive )
+
|Used to set HIK effector active state.  Usage: CHikEffectorComponent::SetActive( RO::EHikEffector eEffector, RO::EHikEffectorType eType, bool bActive ).
 
|-
 
|-
 
!scope="row"|CHikEffectorComponent::GetActive( args... )
 
!scope="row"|CHikEffectorComponent::GetActive( args... )
|Used to get the current HIK effector active state.  Usage: CHikEffectorComponent::GetActive( RO::EHikEffector eEffector, RO::EHikEffectorType eType )
+
|Used to get the current HIK effector active state.  Usage: CHikEffectorComponent::GetActive( RO::EHikEffector eEffector, RO::EHikEffectorType eType ).
 
|-
 
|-
 
!scope="row"|std::map< std::wstring, RL::CMatrix4f > CHikEffectorComponent::Solve( args... )
 
!scope="row"|std::map< std::wstring, RL::CMatrix4f > CHikEffectorComponent::Solve( args... )
|Mocap solution for HIK.  Usage: RL::CMatrix4f > CHikEffectorComponent::Solve( RO::EHikEffector eEffector, const RL::CMatrix4f& kMatrix )
+
|Mocap solution for HIK.  Usage: RL::CMatrix4f > CHikEffectorComponent::Solve( RO::EHikEffector eEffector, const RL::CMatrix4f& kMatrix ).
 
|-
 
|-
 
!scope="row"|CHikEffectorComponent::SetLock( args... )
 
!scope="row"|CHikEffectorComponent::SetLock( args... )
Line 273: Line 273:
 
|-
 
|-
 
!scope="row"|CHikEffectorComponent::SetPosition( args... )
 
!scope="row"|CHikEffectorComponent::SetPosition( args... )
|Used to set multiple IK effector Position coordinates. Usage: CHikEffectorComponent::SetPosition( const std::vector< RO::EHikEffector >& kEffectorIds, const std::vector< RL::CMatrix4f >& kEffectorWorld, const std::vector< bool >& kRotateActive, const std::vector< bool >& kTranslateActive)
+
|Used to set multiple IK effector Position coordinates. Usage: CHikEffectorComponent::SetPosition( const std::vector< RO::EHikEffector >& kEffectorIds, const std::vector< RL::CMatrix4f >& kEffectorWorld, const std::vector< bool >& kRotateActive, const std::vector< bool >& kTranslateActive).
 
|-
 
|-
 
!scope="row"|CHikEffectorComponent::SetBodyWeight( const float fWeight )
 
!scope="row"|CHikEffectorComponent::SetBodyWeight( const float fWeight )
Line 282: Line 282:
 
|-
 
|-
 
!scope="row"|CVisemeComponent::TextToVisemeData( args... )
 
!scope="row"|CVisemeComponent::TextToVisemeData( args... )
|Used to convert input text into Visme lip data (English TTS system).  Usage: CVisemeComponent::TextToVisemeData( std::wstring strContent, float fVolume, float fPitch, float fSpeed )
+
|Used to convert input text into Visme lip data (English TTS system).  Usage: CVisemeComponent::TextToVisemeData( std::wstring strContent, float fVolume, float fPitch, float fSpeed ).
 
|-
 
|-
 
!scope="row"|Modify std::vector< RTime > GetVisemeKeyTimes()
 
!scope="row"|Modify std::vector< RTime > GetVisemeKeyTimes()
Line 288: Line 288:
 
|-
 
|-
 
!scope="row"|Modify CVisemeComponent::ProcessTTS( args... )
 
!scope="row"|Modify CVisemeComponent::ProcessTTS( args... )
|private function Modify the language system to determine the system according to RO :: ELanguage.  Usage: CVisemeComponent::ProcessTTS( std::wstring strContent, RO::ELanguage eLanguage, float fVolume, float fPitch, float fSpeed, std::wstring& wsWaveFilePath, RL::CArrayList< std::pair< unsigned short, unsigned int > >& kPhonemeDatas )
+
|private function Modify the language system to determine the system according to RO :: ELanguage.  Usage: CVisemeComponent::ProcessTTS( std::wstring strContent, RO::ELanguage eLanguage, float fVolume, float fPitch, float fSpeed, std::wstring& wsWaveFilePath, RL::CArrayList< std::pair< unsigned short, unsigned int > >& kPhonemeDatas ).
 
|-
 
|-
 
!scope="row"|RAudio.Load
 
!scope="row"|RAudio.Load
Line 303: Line 303:
 
|-
 
|-
 
!scope="row"|Modify ICCameraObject  - preview camera
 
!scope="row"|Modify ICCameraObject  - preview camera
|You can get preview camera through find camera object
+
|You can get preview camera through find camera object.
 
|-
 
|-
 
!scope="row"|CFaceComponent::GetWeight( args... )
 
!scope="row"|CFaceComponent::GetWeight( args... )
|Get the clip and layer overlay result of the current facial expression.  Usage: CFaceComponent::GetWeight(RO::RTime kTime,std::vector< float >& kHead,std::vector< float >& kLeftEye,std::vector< float >& kRightEye,std::vector< float >& kMorph,std::vector< float >& kBone,std::vector< float >& kCustom,float& fStrength)
+
|Get the clip and layer overlay result of the current facial expression.  Usage: CFaceComponent::GetWeight(RO::RTime kTime,std::vector< float >& kHead,std::vector< float >& kLeftEye,std::vector< float >& kRightEye,std::vector< float >& kMorph,std::vector< float >& kBone,std::vector< float >& kCustom,float& fStrength).
 
|-
 
|-
 
!scope="row"|RIAvatar::GetGeneration()
 
!scope="row"|RIAvatar::GetGeneration()
|Provides CC roles belonging to CC_G1 or CC_G3
+
|Provides CC roles belonging to CC_G1 or CC_G3.
 
|-
 
|-
 
!scope="row"|eunm EAvatarGeneration{ CC_G1_Avatar, CC_G3_Avatar }
 
!scope="row"|eunm EAvatarGeneration{ CC_G1_Avatar, CC_G3_Avatar }
|Provide CC role type
+
|Provides the CC character type.
 
|-
 
|-
 
!scope="row"|Modify RISpotLight::SetSpotLightBeam( args... )
 
!scope="row"|Modify RISpotLight::SetSpotLightBeam( args... )
Line 318: Line 318:
 
|-
 
|-
 
!scope="row"|Modify RISpotLight::GetSpotLightBeam( args... )
 
!scope="row"|Modify RISpotLight::GetSpotLightBeam( args... )
|Modify the attenuation parameter value of the spotlight.  Usage: RISpotLight::GetSpotLightBeam( int& nAngle, int& nFalloff, int& nAttenuation )
+
|Modify the attenuation parameter value of the spotlight.  Usage: RISpotLight::GetSpotLightBeam( int& nAngle, int& nFalloff, int& nAttenuation ).
 
|}
 
|}
 
</div></div>
 
</div></div>

Revision as of 04:12, 25 December 2019

Main article: iClone Python API.

The iClone Python API helps you to extend and customize iClone, and more easily integrate it into a Python-based pipeline. It provides a bridge between iClone and Python libraries and Python tools. The Python SDK is built on top of the iClone C++ SDK, and you can access a subset of the iClone API from Python scripts and execute them in iClone.

The iClone Python API can do the following:

Character Prop Camera Light
Std(G5, CC, etc.) Non-Std Non-Human
Transformation (RTS) 7.4 7.4 7.4 7.4 7.4 7.4
Facial Expression 7.4 Mo-cap Module 7.4 Mo-cap Module - - - -
Morph Animation 7.4 Experimental 7.4 Experimental 7.4 Experimental 7.4 Experimental -
Material 7.4 Experimental 7.4 Experimental 7.4 Experimental 7.4 Experimental 7.4 Experimental
Parameters - - - - 7.4 Experimental 7.4 Experimental

Capabilities

As the iClone Python API continues to evolve, additional capabilities will be added over time. Below are lists of iClone Python API's current capabilities categorized by version number. The lists below are by no means exhaustive.

Version 0.7

[Expand]
iC 7.4x Open Change Log

Version 0.7.1

[Expand]
iC 7.4x Open Change Log: 01/17/2019 - 01/31/2019

Version 0.7.2

[Expand]
iC 7.4x Open Change Log: 02/15/2019 - 02/27/2019

Version 0.7.3

[Expand]
iC 7.4x Open Change Log: 03/03/2019 - 04/29/2019

Limitations

As the iClone Python API continues to evolve, limitations may expand or contract over time. Below are lists of iClone Python API's currently known limitations. This list is not exhaustive.

Inoperable Assets

The following items can not be manipulated and acted upon with Python scripting:

  • Particle FX (iClone & PopcornFX)
  • SpeedTrees
  • Substance Materials
  • Textures Images
  • Constraints: Path, Spring, LookAt, Link, Physics, etc.
  • Physics (Soft & Rigid)
  • IK end-effectors (control attached props instead to drive IK reach)
  • Mesh level components: vertices, edges, faces, etc.
  • Preview camera

Unsupported Operations

The following operations are not available via Python scripting:

  • Saving iClone formats: iProjects, iAvatars, iProps, etc.
  • Pixel operations: multiply, add, overlay, etc.
  • Image processing: Brightness, Hue, Saturation, Sharpen, Soften, Blend, etc.
  • Render parameter settings (Project settings can not be changed)
  • Facial lip-sync keying
  • Preference settings
  • Attach/Detach: changing object parent-child relation
  • Align motion/character root alignment
  • Modeling operations: manipulation of mesh components