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

From Reallusion Wiki!
Jump to: navigation, search
m (Course Prerequisites)
m (Usage Instructions)
Line 45: Line 45:
  
 
== Usage Instructions ==
 
== Usage Instructions ==
 +
 +
# After loading some PopcornFX particles into the scene, the particles list will be filled with all of the existing particles in the scene.
 +
# 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.
 +
# 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.
 +
# Click on the '''Apply''' button to apply all of the settings to the particles as timeline keys and playback the project.
 +
# '''Clear Key''' can be used to remove all of the particle keys set by the sequencer script.
  
 
== Code Flow ==
 
== Code Flow ==

Revision as of 20:26, 25 December 2019

Main article: RL Python Samples.

Demo Video

Description

Popcorn Script Creator can be used to easily manage particle emit time and loop status. User can drag/drop the list items to change the emit order, set delay time for emit, set 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.

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.
Handling JSON Learn to load and parse JSON data that is saved to file.

Learn How 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 embed or content packs.

Usage Instructions

  1. After loading some PopcornFX particles into the scene, the particles list will be filled with all of the existing particles in the scene.
  2. 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.
  3. 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.
  4. Click on the Apply button to apply all of the settings to the particles as timeline keys and playback the project.
  5. Clear Key can be used to remove all of the particle keys set by the sequencer script.

Code Flow

APIs Used

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

main.py

Extensions.py