Difference between revisions of "IC Python API:PopcornFX Sequencer"

From Reallusion Wiki!
Jump to: navigation, search
m (Required Files)
m (Course Prerequisites)
 
(4 intermediate revisions by the same user not shown)
Line 80: Line 80:
 
|Learn how to load PopcornFX files by name.
 
|Learn how to load PopcornFX files by name.
 
|-
 
|-
|[[ iC_Python_API:Handling_JSON | Handling JSON ]]
+
|[[ iC_Python_API:Loading_JSON | Loading JSON ]]
 
|Learn to load and parse JSON data that is saved to file.
 
|Learn to load and parse JSON data that is saved to file.
 
|}
 
|}
  
== Learn How to ==
+
== Takeaway Lessons ==
  
*Use PopcornFX related API.
+
*Learn to use PopcornFX related API.
 
*Handle AP event callbacks to update UI.
 
*Handle AP event callbacks to update UI.
 
*Use Python dictionary to store settings for each particle.
 
*Use Python dictionary to store settings for each particle.
Line 115: Line 115:
 
== Code Flow ==
 
== Code Flow ==
  
 +
[[File:Ic_python_api_popcornfx_sequencer.png]]
  
=== APIs Used ===
+
== APIs Used ==
  
 
You can research the following references for the APIs deployed in this code.
 
You can research the following references for the APIs deployed in this code.
  
==== main.py ====
+
=== main.py ===
 
<div style="column-count:4; -moz-column-count:4; -webkit-column-count:4">
 
<div style="column-count:4; -moz-column-count:4; -webkit-column-count:4">
 
* [[ IC_Python_API:RLPy_REventCallback#__init__ | RLPy.REventCallback.__init__() ]]
 
* [[ IC_Python_API:RLPy_REventCallback#__init__ | RLPy.REventCallback.__init__() ]]
Line 137: Line 138:
 
</div>
 
</div>
  
==== Extensions.py ====
+
=== Extensions.py ===
  
 
<div style="column-count:4; -moz-column-count:4; -webkit-column-count:4">
 
<div style="column-count:4; -moz-column-count:4; -webkit-column-count:4">

Latest revision as of 21:31, 8 March 2020

Main article: RL Python Samples.

Demo Video

Description

PopcornFX Sequencer Demo plug-in can be used to easily and intuitively manage PopcornFX particle emit time and loop status without using the timeline. You can drag/drop selected particles to the item list, change their emit order, set delay time, toggle loop status, or set the custom life cycle for each particle. Press the Apply button to deploy the particles to the scene and apply the custom settings.

The demo version of PopcornFX Sequencer is mentioned in this article. For the fully featured paid version please visit the Reallusion Market Place. The differences between the two version are listed below:

Features Demo (Free) Official (Paid)
Editing without the Timeline:
  • Intuitively set ON/OFF time (sec).
  • Inter-emitter trigger delay settings.
  • Emitter life-cycle settings.
Continuous triggering at any moment in time.
Preset customization and save function. Recording of emitter relative positioning.
Various presets available for deployment and customization. Multiple attribute parameters can be adjusted at once.
Positional and rotational constraints for effects on target objects.
Recording of group history for powerful editing.
Prioritize Template/Custom folder for search optimization.
Record parameter settings and comprehensive custom content and re-usability.
Dock-able panel.

Course Prerequisites

You should familiarize yourself with the following fundamental articles before you proceed:

Link Purpose
Table View Create a table view -suitable for listing similar objects.
Tree View Create tree view -suitable for listing hierarchical objects.
Plugin Window Boilerplate for creating proper plugin user interfaces.
Loading PFX Learn how to load PopcornFX files by name.
Loading JSON Learn to load and parse JSON data that is saved to file.

Takeaway Lessons

  • Learn to use PopcornFX related API.
  • Handle AP event callbacks to update UI.
  • Use Python dictionary to store settings for each particle.

Required Files

  • PopcornFX Sequencer and Extensions Python script files.
  • Installed PopcornFX particles, either from embedded content or store bought content packs.

You can buy the full version of this plugin from the Reallusion Marketplace. To acquire and view the source code for the demo version, please visit Reallusion GitHub.

Usage Instructions

  1. Clone or download the Reallusion/iClone GitHub.
  2. Copy PopcornFX_Sequencer_Demo folder into the iClone install directory > ...\Bin64\OpenPlugin.
  3. Load the script into the project from the menu: Plugins > Python Samples > PopcornFX Sequencer (Demo).
  4. After loading some PopcornFX particles into the scene, the particles list will be filled with all of the existing particles in the scene.
  5. Use drag and drop to reorder the list of particles. You can also use the checkbox to decide which particle will participate in the sequencer script.
  6. Next, use the UI below to adjust the emit time and looping for every participating particle.
    • Delay with Previous Emitter is used to delay the current particle's emit time from the previous particle emit time. If this setting is 0, then the current particle will emit at the same time as the previous particle.
    • Auto Loop and Custom Life Cycle are mutually exclusive functions.
      • When Auto Loop is activated, the particle emit in a loop. Loop Interval determines the duration of each loop cycle. Be aware that this attribute is not emission frequency, because loops are inherently infinite ).
      • Custom Life Cycle can be used to customize the interval between multiple emissions.
  7. Click on the Apply button to apply all of the settings to the particles as timeline keys and playback the project.
  8. Clear Key can be used to remove all of the particle keys set by the sequencer script.

Code Flow

Ic python api popcornfx sequencer.png

APIs Used

You can research the following references for the APIs deployed in this code.

main.py

Extensions.py