Model.morphshapecreatecolor#
- Model.morphshapecreatecolor(shapename, option, color)#
Creates a new shape out of the applied morphs, with a specified color.
- Parameters:
shapename (hwString) – Name of shape.
option (int) –
Set shape’s save options:
0 - Save as handle and node perturbations
1 - Save as pure node perturbations
2 - Save as node perturbations without global handle nodes
color (int) – The shape’s color (an integer from 0 to 63).
Example#
The shape with will be created representing the difference between the current node and handle positions and the original node and handle positions.#import hm import hm.entities as ent model = hm.Model() model.morphshapecreatecolor(shapename="groovy", option=0, color=15)
Note
Saving as handle and node perturbations will try to save everything done as handle perturbations except where biasing factors have changed and constraints have been applied. Saving as pure node perturbations will save the shape exclusively as node perturbations. The difference comes into play when new handles are created. If a shape is saved as handles and nodes, a new handle will not move when the shape is applied, possibly changing the shape. If a shape is saved as pure nodes, a new handle will move along with its grid.
Saving as node perturbations without global handle nodes (
option=2) will save the shape as node perturbations excluding the node perturbations for global handles.