skin

Used for skin operations.


xshade
shape
skin

List of Methods

append_bind Appends a bind
get_bind Returns the specified bind
remove_bind Deletes the specified bind
sequence_skin_world_matrix Returns a matrix that converts the skin coordinate system of the specified sequence to world coordinates

List of Properties

number_of_binds The number of binds
skin_type The skin type
skin_world_matrix Matrix that converts the skin coordinate system to world coordinates




Use this method to get vertices of the selected object, such as: xshade.scene().active_shape().vertex(0).

Method Details

append_bind

Appends a bind.
Appended to the end of the list of binds.
Because the appended bind is empty, get the skin_bind class with get_bind().
Changes will not be reflected in the Skin Window unless it is updated with skin_view().update().
Changes to skin settings will not take effect unless updated with shape().update_skin_bindings().

#Browser structure
#Polygon mesh (target object)
#▼Rotate
# ▼Rotate
xshade.scene().active_shape().skin_type = 1	#Set the skin type: 0: Classic, 1: Vertex Blending
xshade.scene().active_shape().vertex(0).skin.append_bind()	#Append a bind
bind_num = xshade.scene().active_shape().vertex(0).skin.number_of_binds - 1	#Get the number of the appended bind
xshade.scene().active_shape().vertex(0).skin.get_bind(bind_num).shape = xshade.scene().active_shape().bro
xshade.skin_view().update()	#Update the Skin Window to reflect the changes
xshade.scene().active_shape().update_skin_bindings()	#Update the skin settings to apply the changes

get_bind

Returns the specified bind.
Return value :
  skin_bind object
Arguments :
  int : index number of the bind
See also :
  skin_bind

#Output the weight of the bind at polygon mesh vertex 0
print xshade.scene().active_shape().vertex(0).skin.get_bind(0).weight

remove_bind

Deletes the specified bind.
Arguments :
  int : index of the bind
Changes will not be reflected in the Skin Window unless it is updated.
Shade may crash if performed on an object without binds.

#Delete the bind at polygon mesh vertex 0
xshade.scene().active_shape().vertex(0).skin.remove_bind(0)
xshade.skin_view().update()

sequence_skin_world_matrix

Returns a matrix that converts the skin coordinate system of the specified sequence to world coordinates.
Arguments :
  int
Return value :
  mat4

#Output matrix to convert the skin coordinate system of polygon mesh vertex 0 of sequence 10 to world coordinates
print xshade.scene().active_shape().vertex(0).skin.sequence_skin_world_matrix(10)

Property Details

number_of_binds

The number of binds.

  • Get
  • Set

Type :
  int

#Output the number of binds at polygon mesh vertex 0
print xshade.scene().active_shape().vertex(0).skin.number_of_binds

skin_type

The skin type.

  • Get
  • Set

Type :
  int : 0 : Classic, 1 : Vertex Blending

#Output the skin type
print xshade.scene().active_shape().skin_type

skin_world_matrix

Matrix that converts the skin coordinate system to world coordinates.

  • Get
  • Set

Type :
  mat4
Matrix that converts to world coordinates based on the skin bound to the vertex and the object's local coordinates.

#Output the matrix at polygon mesh vertex 0
print xshade.scene().active_shape().vertex(0).skin.skin_world_matrix