Interface: pop

 
 
 

Interfaces > Core Interfaces > pop

 

   

Core Interfaces - Quick Navigation

 

   

NEW in 3ds Max 2014: The pop Core Interface exposes the properties and methods related to the set up and simulation of Populate systems.

   

Properties:

pop.DisplayType : enum : Read|Write
DisplayType enums: {#StickFigure|#Segmented|#CrowdCustom|#CrowdSkin|#HighSkin}

Get/set the Display Type of the characters.

Default is #CrowdSkin

   

pop.NumFrames : integer : Read|Write

Get/set the number of frames to simulate.

Default is 300.

   

pop.RealWorldScale : float : Read|Write

Get/set the World scale relatively to the current System Units settings.

Default is 1.0.

   

Methods:

<bool>pop.AddIdleArea <node>IdleArea

Adds the specified IdleAreaObj object to the flow simulation.

   

<bool>pop.AddFlow <node>Flow

Adds the specified Flow object to the flow simulation.

   

<void>pop.Simulate()

Simulates the flow using the current settings.

Equivalent to pressing the Simulate icon in the Populate > Simulation panel of the UI.

   

<void>pop.RegenerateSelected()

Regenerates the selected characters.

Equivalent to pressing the Regenerate Selected icon in the Populate > Simulation panel of the UI.

   

<void>pop.DisplayEnv <boolean>show

When the argument is True, the Environment objects (Flows, IdleAreas) will be displayed.

When the argument is False, the Environment objects will be hidden.

Corresponds to the Show Environment toggle icon in the Populate > Display panel of the UI.

   

<void>pop.DisplayPeople <boolean>show

When the argument is True, the characters will be displayed.

When the argument is False, the characters objects will be hidden.

Corresponds to the Show People toggle icon in the Populate > Display panel of the UI.

   

<void>pop.DeletePeople()

Deletes the characters from the simulation.

Equivalent to clicking the Delete People icon in the Populate > Display panel of the UI.

   

EXAMPLE:
theFlow = Flow() --Create a Flow object
--> $Flow:Flow001 @ [0.000000,0.000000,0.000000]
theFlow.AddPoint [0,0,0] --Add some points
--> true
theFlow.AddPoint [1000,0,0] 
--> true
theFlow.AddPoint [15000,500,0] 
--> true
theFlow.AddPoint [1000,1000,0] 
--> true

pop.AddFlow theFlow --Add the Flow to the Populate system
--> true
pop.Simulate() --Perform the simulation
--> OK
pop.DisplayEnv false --Hide the Flow environment, leaving only the people
--> OK
pop.DisplayType = #StickFigure --Switch the character display to stick figures
--> #StickFigure