c4d.modules.thinkingparticles.TP_PGroup

class c4d.modules.thinkingparticles.TP_PGroup

Represents a Thinking Particle group.

Methods Signatures

TP_PGroup.GetLevel(self) Calculates the level of this group. This is the number of parents that the group has.
TP_PGroup.NumParticles(self) Returns the count of particles which belong to this group.
TP_PGroup.IsSubGroup(self, group) Checks if group is a subgroup of the group.
TP_PGroup.GetGroupID(self) Returns the ID of the group. This is only based on the order in the group list, so it can change when the user reorders the groups.
TP_PGroup.GetParticles(self) Returns the particles which belong to this group.
TP_PGroup.SetTitle(self, title) Sets the group title.
TP_PGroup.GetTitle(self) Returns the group title.
TP_PGroup.SetViewType(self, type) Sets the group view type.
TP_PGroup.GetViewType(self) Returns the group view type.
TP_PGroup.SetShowObjects(self, bool) Sets the show-objects flag of the group.
TP_PGroup.GetShowObjects(self) Returns the show-objects flag of the group.
TP_PGroup.SetColor(self, col) Sets the color of the group.
TP_PGroup.GetColor(self) Returns the color of the group.
TP_PGroup.EditSettings(self) Opens the edit dialog for the group.
TP_PGroup.IsSelected(self) Checks if the group is selected in the group list.
TP_PGroup.IsOpened(self) Checks if the group is opened in the group list.
TP_PGroup.Select(self, mode) Sets the selection mode of the group in the group list.
TP_PGroup.Open(self, onoff) Opens or closes the group in the group list.
TP_PGroup.SetUseColor(self, use) Sets the use color state of the group.
TP_PGroup.GetUseColor(self) Gets the use color state of the group.
TP_PGroup.Cache(self, onoff) Sets the group to contain only cached data. This will prevent the particle system from doing simulation calculations for the group.
TP_PGroup.IsCache(self) Checks if the group is used to represent cached particle data only.

Inheritance

Inheritance

Parent Class:

Methods Documentation

TP_PGroup.GetLevel(self)

Calculates the level of this group. This is the number of parents that the group has.

Return type:int
Returns:The group level.
TP_PGroup.NumParticles(self)

Returns the count of particles which belong to this group.

Return type:int
Returns:The number of particles.
TP_PGroup.IsSubGroup(self, group)

Checks if group is a subgroup of the group.

Parameters:group (c4d.modules.thinkingparticles.TP_PGroup) – A TP particle group.
Return type:bool
Returns:True if group is a subgroup of the group, otherwise False.
TP_PGroup.GetGroupID(self)

Returns the ID of the group. This is only based on the order in the group list, so it can change when the user reorders the groups.

Return type:int
Returns:The group ID.
TP_PGroup.GetParticles(self)

Returns the particles which belong to this group.

Return type:List[int]
Returns:The particles.
TP_PGroup.SetTitle(self, title)

Sets the group title.

Parameters:title (str) – The new group title.
TP_PGroup.GetTitle(self)

Returns the group title.

Return type:str
Returns:The group title.
TP_PGroup.SetViewType(self, type)

Sets the group view type.

Parameters:title (int) – The new view type. See PGROUP_VIEWTYPE in description/tp_group.h
TP_PGroup.GetViewType(self)

Returns the group view type.

Return type:int
Returns:The group view type.
TP_PGroup.SetShowObjects(self, bool)

Sets the show-objects flag of the group.

Parameters:show (bool) – The new show-objects flag.
TP_PGroup.GetShowObjects(self)

Returns the show-objects flag of the group.

Return type:int
Returns:The show-objects flag.
TP_PGroup.SetColor(self, col)

Sets the color of the group.

Parameters:col (c4d.Vector) – The new group color.
TP_PGroup.GetColor(self)

Returns the color of the group.

Return type:c4d.Vector
Returns:The group color.
TP_PGroup.EditSettings(self)

Opens the edit dialog for the group.

Return type:bool
Returns:True if the user clicked OK, otherwise False.
TP_PGroup.IsSelected(self)

Checks if the group is selected in the group list.

Return type:bool
Returns:True if the group is selected, otherwise False.
TP_PGroup.IsOpened(self)

Checks if the group is opened in the group list.

Return type:bool
Returns:True if the group is opened, otherwise False if it is closed.
TP_PGroup.Select(self, mode)

Sets the selection mode of the group in the group list.

Parameters:mode (int) –

The selection mode:

SELECTION_NEW Starts a new selection.
SELECTION_ADD Adds to the current selection
SELECTION_SUB Subtracts from the current selection.
TP_PGroup.Open(self, onoff)

Opens or closes the group in the group list.

Parameters:onoff (bool) – True if the group should be opened, otherwise False if it should be closed.
TP_PGroup.SetUseColor(self, use)

Sets the use color state of the group.

New in version R16.038.

Parameters:use (bool) – True if use color should be enabled, otherwise False.
TP_PGroup.GetUseColor(self)

Gets the use color state of the group.

New in version R16.038.

Return type:bool
Returns:True if use color is enabled, otherwise False.
TP_PGroup.Cache(self, onoff)

Sets the group to contain only cached data. This will prevent the particle system from doing simulation calculations for the group.

New in version R16.050.

Parameters:onoff (bool) – True if cached data is used, otherwise False.
TP_PGroup.IsCache(self)

Checks if the group is used to represent cached particle data only.

New in version R16.050.

Return type:bool
Returns:True if the group represents cached data, otherwise False.