shape

Basic class that handles operations shared by all types of objects.
To get or set specific information for each object type, determine the type using this class and then get each specific class.


xshade
shape

List of Methods

activate Selects an object
adjust_transformation Adjusts the transformation matrix of the part
begin_set_point Temporarily stops updating the wireframe
cancel_transformation Offsets the transformation on the above part
clear_skin Clears the Skin
control_point Returns the control point object specified by argument
convert_to_polygon_mesh_with_divisions Specifies the number of vertical and horizontal subdivisions and converts the object to a polygon mesh
convert_to_polygon_mesh_with_subdivision_level Specifies the subdivision level and converts the object to a polygon mesh
copy Copies the object to the clipboard
copy_object Duplicates the object
end_set_point Resumes updating the wireframe
get_active_control_point Returns the selection state of the specified control point
get_tag_boolValue Gets the tag name value (bool) registered to the object as a key
get_tag_doubleValue Gets the tag name value (double) registered to the object as a key
get_tag_floatValue Gets the tag name value (float) registered to the object as a key
get_tag_intValue Gets the tag name value (int) registered to the object as a key
get_tag_stringValue Gets the tag name value (string) registered to the object as a key
has_special_character Returns whether or not the special character passed in the argument is in the object name
has_symbol Returns whether or not the special character passed in the argument is in the object name
has_tag Whether or not the specified tag name is set to the object
hide Hides the selected object
inactivate Clears the selection
is_control_point_selected Returns whether or not the specified control point is selected
move_links Offsets the transformation of the link object
move_object Moves the object
paste Pastes the object to the clipboard.
place_brother Moves the object down
place_child Moves the object inside the below part
place_parent Moves the object to the front of the above hierarchy
place_sister Moves the object up
pop_transformation_matrix Pops the matrix value from the stack and assigns it to the transformation matrix of the part object
push_transformation_matrix Pushes the transformation matrix of the part object to the stack (for each object)
remove Deletes the object
remove_tag Deletes the tag set to the object
reset_transformation Resets the transformation matrix while preserving the object's transformation state
select Selects an object
select_all_control_points Selects or deselects all control points
sequence_joint_matrix Returns the joint matrix of the specified sequence
sequence_local_to_world_matrix Returns a matrix that converts the local coordinate system of the specified sequence to world coordinates
sequence_transformation Returns the matrix of the specified sequence
sequence_world_to_local_matrix Returns a matrix that converts the world coordinate system of the specified sequence to local coordinates
set_active_control_point Sets the selection state of the specified control point
set_axis_matrix Sets the matrix that defines the axis of the revolved solid
set_tag_boolValue Sets the tag name value (bool) as the key
set_tag_doubleValue Sets the tag name value (double) as the key
set_tag_floatValue Sets the tag name value (float) as the key
set_tag_intValue Sets the tag name value (int) as the key
set_tag_stringValue Sets the tag name value (string) as the key
solid_clear Reverts the extruded solid or revolved solid to a regular object
solid_extrude Creates an extruded solid
solid_revolve Creates a revolved solid
tag_value_type Gets the type of tag name value set as the key
transform Applies a matrix transformation to the object
update Updates the object
update_skin_bindings Updates the cache data relating to Skin in the Figure Window

List of Properties

active_vertex_indices Tuple of the selected vertex and control point numbers
axis_matrix Matrix that defines the axis of the revolved solid
ball_joint Ball joint interface
bone_joint Bone joint interface
bounding_box_size The size of the bounding box
bro The next object
browsable Whether or not the object can be displayed in the Brower
center_point The average value of the center coordinates of all points and objects
center_position The center coordinates of the bounding box
custom_joint Custom joint interface
dad The parent object
extrude The direction and distance to extrude
flip_face Whether or not the faces are flipped
has_bro Whether or not the next object exists
has_dad Whether or not a parent object exists
has_motion Whether or not the object can have motion
has_shadow_map_bias Whether or not the shadow map bias value is set
has_shadow_map_blur Whether or not the shadow map blur value is set
has_shadow_map_size Whether or not the shadow map size value is set
has_sis Whether or not a previous object exists
has_son Whether or not a (non-sentinel) child exists
has_surface_attributes Whether or not it has surface attributes
is_ball_joint Whether or not it is a ball joint
is_bone_joint Whether or not it is a bone joint
is_container Whether or not it can contain objects lower in the hierarchy (whether or not it is a part)
is_custom_joint Whether or not it is a custom joint
is_extruded Whether or not it is an extruded solid
is_light_effector Whether or not it is a light joint
is_morph_effector Whether or not it is a morph joint
is_one_of_active_shapes Whether or not the object is selected
is_path_joint Whether or not it is a path joint
is_revolved Whether or not it is a revolved solid
is_rotator_joint Whether or not it is a rotator joint
is_scale_joint Whether or not it is a scale joint
is_shown Whether the object is displayed or not
is_slider_joint Whether or not it is a slider joint
is_sound_track Whether or not it is a sound object
is_switch_effector Whether or not it is a switch
is_switched Whether or not the curved surface is switched
is_uniscale_joint Whether or not it is a uniscale joint
light_effector Light joint interface
local_to_world_matrix Local to world coordinates transformation matrix
master_surface Whether or not a master surface is applied
modifiable Whether or not the object can be modified
morph_effector Morph joint interface
motion A motion object
name The object name
number_of_skin_points The number of vertices that allow skin settings
ordinal The ordinal of the object or part
parent The parent object
path_joint Path joint interface
path_replicator Path replicator interface
radiosity_attributes Radiosity attributes
render_flag Whether or not to render the object
revolve_from The start angle for the revolved solid
revolve_to The end angle for the revolved solid
rotator_joint Rotator joint interface
scale_joint Scale joint interface
scene The scene to which the object belongs
shadow_catcher Shadow Catcher
shadow_map_bias The shadow map bias
shadow_map_blur The shadow map blur
shadow_map_size The shadow map size
shadow_type The shadow type
sis The previous object
skin Skin of objects with one or no vertices
skin_type The Skin format (-1: Not assigned, 0: Classic, 1: Vertex Blending)
slider_joint Slider joint interface
son The sentinel object of the child
sound_track A sound object
surface A surface attributes object
surface_replicator A surface replicator object
tags Gets the tag name list set to the object
total_number_of_control_points The total number of control points contained in the below hierarchy of the selected object
transformation The transformation matrix, taking into account joint and skin effects
type The type of object
uniscale_joint Uniscale joint interface
uuid The uuid of the object
world_to_local_matrix World to local coordinates transformation matrix
switch_effector Switch interface




Used after getting an object with a method such as xshade.scene().active_shape().

Method Details

activate

Selects an object.

#Select object 0 from the list of multiple selected objects
xshade.scene().active_shapes[0].activate()

adjust_transformation

Adjusts the transformation matrix of the part.
Resets matrices except for translation.
Transformation elements attached to the included object are preserved as-is.

xshade.scene().active_shape().adjust_transformation()

begin_set_point

Temporarily stops updating the wireframe.
If modifying successive points of the same object, enclosing the steps between begin_set_point() and end_set_point() will prevent the operation results from being reflected on the wireframe display until end_set_point() is called, and modification of the points can be done quickly.
Calling end_set_point() returns to the state in which the wireframe is updated.

#Delete control points until there is only one left
n = xshade.scene().active_shape().number_of_control_points
xshade.scene().active_shape().begin_set_point()
for i in xrange(n-1):
	xshade.scene().active_shape().remove_control_point(0)
xshade.scene().active_shape().end_set_point()

cancel_transformation

Offsets the transformation on the above part.

xshade.scene().active_shape().cancel_transformation()

clear_skin

Clears the Skin.

xshade.scene().active_shape().clear_skin()

control_point

Returns the control point object specified by argument.
Return value :
  control_point object
Arguments :
  int : The number of the control point
Throws an exception for objects without control points, such as polygon meshes.
See also :
  total_number_of_control_points The number of control points
  polygon_mesh.vertex() The vertices of a polygon mesh

#Output the coordinates of control point object 0
print xshade.scene().active_shape().control_point(0).position

convert_to_polygon_mesh_with_divisions

Specifies the number of vertical and horizontal subdivisions and converts the object to a polygon mesh.
Arguments :
  int : number of subdivisions in the horizontal direction
Arguments :
  int : number of subdivisions in the vertical direction
Objects for which it does not make sense to specify the number of horizontal or vertical subdivisions are divided by the default (normal) subdivision level.

#Convert the selected object to a polygon mesh with 4 horizontal and 8 vertical subdivisions
xshade.scene().active_shape().convert_to_polygon_mesh_with_divisions(4,8)

convert_to_polygon_mesh_with_subdivision_level

Specifies the subdivision level and converts the object to a polygon mesh.
Arguments :
  int :

0No Subdivision
1Coarse
2Regular
3Fine
4Very Fine
#Convert the selected object to a polygon mesh with Coarse subdivision
xshade.scene().active_shape().convert_to_polygon_mesh_with_subdivision_level(1)

copy

Copies the object to the clipboard.

xshade.scene().active_shape().copy()

copy_object

Duplicates the object.
Return value :
  shape object
Arguments :
  mat4 : the transformation matrix for the object copy
See also :
  move_object

#Copy the selected object and scale it uniformly to double size
xshade.scene().active_shape().copy_object(((2,0,0,0),(0,2,0,0),(0,0,2,0),(0,0,0,1)))

end_set_point

Resumes updating the wireframe.
If modifying successive points of the same object, enclosing the steps between begin_set_point() and end_set_point() will prevent the operation results from being reflected on the wireframe display until end_set_point() is called, and modification of the points can be done quickly.
See also :
  begin_set_point

#Delete control points until there is only one left
n = xshade.scene().active_shape().number_of_control_points
xshade.scene().active_shape().begin_set_point()
for i in xrange(n-1):
	xshade.scene().active_shape().remove_control_point(0)
xshade.scene().active_shape().end_set_point()

get_active_control_point

Returns the selection state of the specified control point.
Return value :
  bool
Arguments :
  int : The number of the control point
See also :
  set_active_control_point() Set the selection state

#Output the selection state of number 0
print xshade.scene().active_shape().get_active_control_point(0)

get_tag_boolValue

Gets the tag name value (bool) registered to the object as a key.
Return value :
  bool
Arguments :
  string : tag name

#Assign the tag as tag1, and get the value
xshade.scene().active_shape().set_tag_boolValue("tag1", True)
print xshade.scene().active_shape().get_tag_boolValue("tag1")

get_tag_doubleValue

Gets the tag name value (double) registered to the object as a key.
Return value :
  double
Arguments :
  string : tag name

#Assign the tag as tag1, and get the value
xshade.scene().active_shape().set_tag_doubleValue("tag1", 0.1)
print xshade.scene().active_shape().get_tag_doubleValue("tag1")

get_tag_floatValue

Gets the tag name value (float) registered to the object as a key.
Return value :
  float
Arguments :
  string : tag name

#Assign the tag as tag1, and get the value
xshade.scene().active_shape().set_tag_floatValue("tag1", 0.1)
print xshade.scene().active_shape().get_tag_floatValue("tag1")

get_tag_intValue

Gets the tag name value (int) registered to the object as a key.
Return value :
  int
Arguments :
  string : tag name

#Assign the tag as tag1, and get the value
xshade.scene().active_shape().set_tag_intValue("tag1", 5)
print xshade.scene().active_shape().get_tag_intValue("tag1")

get_tag_stringValue

Gets the tag name value (string) registered to the object as a key.
Return value :
  string
Arguments :
  string : tag name

#Assign the tag as tag1, and get the value
xshade.scene().active_shape().set_tag_stringValue("tag1", "xxx")
print xshade.scene().active_shape().get_tag_stringValue("tag1")

has_special_character

Returns whether or not the special character passed in the argument is in the object name.
Return value :
  bool
Arguments :
  char : a special character such as a boolean symbol
Quantified before being passed, similar to ord('>').
See also :
  shade.special_characters List of special characters

#Output whether or not it contains ">"
nc = ord('>')
print xshade.scene().active_shape().has_special_character(nc)

has_symbol

Returns whether or not the special character passed in the argument is in the object name.
Return value :
  bool
Arguments :
  char : a special character such as a boolean symbol
Quantified before being passed, similar to ord('>').
See also :
  shade.special_characters List of special characters

#Output whether or not it contains "$"
nc = ord('$')
print xshade.scene().active_shape().has_symbol(nc)

has_tag

Whether or not the specified tag name is set to the object.
Return value :
  bool
Arguments :
  string : tag name

#Whether or not tag1 is set
print xshade.scene().active_shape().has_tag("tag1")

hide

Hides the selected object.

xshade.scene().active_shape().hide()

inactivate

Clears the selection.
Used to clear the selection of only one object when multiple objects are selected.
Because a state of no objects selected does not exist in Shade, if only one object is selected, this method does nothing.

#Clear the selection of number 1 in the object list
xshade.scene().active_shapes[1].inactivate()

is_control_point_selected

Returns whether or not the specified control point is selected.
Return value :
  bool
Arguments :
  int : The number of the control point

#Output whether or not number 1 is selected
print xshade.scene().active_shape().is_control_point_selected(1)

move_links

Offsets the transformation of the link object.
Used such as when transforming only the original object.
Applying a transformation to the original object, such as with move_object(), also applies the same transformation to the link object.
Leave the original object transformed as-is, and offset the transformation of the link object by applying the inverse matrix.

#Transform the original object only, scaled uniformly to double size
xshade.scene().active_shape().move_object(((2,0,0,0),(0,2,0,0),(0,0,2,0),(0,0,0,1)))
xshade.scene().active_shape().move_links(((0.5,0,0,0),(0,0.5,0,0),(0,0,0.5,0),(0,0,0,1)))

move_object

Moves the object.
Arguments :
  mat4 : the transformation matrix for the object move
See also :
  copy_object

#Scale the selected objects by 1.5 and move them 100 in the X direction
xshade.scene().active_shape().move_object(((1.5,0,0,0),(0,1.5,0,0),(0,0,1.5,0),(100,0,0,1)))

paste

Pastes the object to the clipboard.

xshade.scene().active_shape().paste()

place_brother

Moves the object down.
Arguments :
  int : the number to move

#Move down 1
xshade.scene().active_shape().place_brother(1)

place_child

Moves the object inside the below part.
Arguments :
  int : the number of (child) parts in the hierarchy to move

#Move to second position in the below part
xshade.scene().active_shape().place_child(2)

place_parent

Moves the selected object to the top of the above hierarchy level.
Arguments :
  int : the number of hierarchy levels to move

#Move the object to the front of two hierarchy levels above
xshade.scene().active_shape().place_parent(2)

place_sister

Moves the object up.
Arguments :
  int : the number to move

#Move one up
xshade.scene().active_shape().place_sister(1)

pop_transformation_matrix

Pops the matrix value from the stack and assigns it to the transformation matrix of the part object.
If run after values are repeatedly popped and the stack runs out, a matrix with all zeroes is assigned.
If run for part objects with no stack, Shade will crash.
See also :
  push_transformation_matrix

xshade.scene().active_shape().pop_transformation_matrix()

push_transformation_matrix

Pushes the transformation matrix of the part object to the stack (for each object).
After pushing to the stack, even if a part object is morphed, the value stacked with pop_transformation_matrix() is returned.
Values can be popped only up to the number of times they were stacked.
See also :
  pop_transformation_matrix

xshade.scene().active_shape().push_transformation_matrix()

remove

Deletes the object.

xshade.scene().active_shape().remove()

remove_tag

Deletes the tag set to the object.
Arguments :
  string : tag name

#Delete the tag1 tag
xshade.scene().active_shape().remove_tag("tag1")

reset_transformation

Resets the transformation matrix while preserving the object's transformation state.
Arguments :
  bool : Optional : If omitted, False.

TrueResets the transformation matrix for all the objects included in the below hierarchy
FalseResets the transformation matrix for the selected part
#Reset the transformation matrix for all the objects included in the below hierarchy
xshade.scene().active_shape().reset_transformation(True)

select

Selects an object.

#Select object 1 from the list of multiple selected objects
xshade.scene().active_shapes[1].select()

select_all_control_points

Selects or deselects all control points.
Arguments :
  bool : True : Selects all, False : Deselects all
See also :
  get_active_control_point() Gets the selection state of each point
  set_active_control_point() Sets the selection state of each point

#Select all control points
xshade.scene().active_shape().select_all_control_points(True)

sequence_joint_matrix

The joint matrix of the specified sequence.
Arguments :
  int
Return value :
  mat4

#Output the joint matrix of sequence 10
print xshade.scene().active_shape().sequence_joint_matrix(10)

sequence_local_to_world_matrix

Matrix that converts the local coordinate system of the specified sequence to world coordinates.
Arguments :
  int
Return value :
  mat4

#Output the matrix that converts the local coordinate system of sequence 10 to world coordinates
print xshade.scene().active_shape().sequence_local_to_world_matrix(10)

sequence_transformation

The matrix of the specified sequence.
Arguments :
  int
Return value :
  mat4

#Output the matrix of sequence 10
print xshade.scene().active_shape().sequence_transformation(10)

sequence_world_to_local_matrix

Matrix that converts the world coordinate system of the specified sequence to local coordinates.
Arguments :
  int
Return value :
  mat4

#Output the matrix that converts the world coordinate system of sequence 10 to local coordinates
print xshade.scene().active_shape().sequence_world_to_local_matrix(10)

set_active_control_point

Sets the selection state of the specified control point.
Arguments :
  int : The number of the control point
Arguments :
  bool : True : Selected, False : Deselected
See also :
  get_active_control_point() The selection state

#Select control point 2
xshade.scene().active_shape().set_active_control_point(2, True)

set_axis_matrix

Sets the matrix that defines the axis of the revolved solid.
See also :
  axis_matrix Matrix that defines the axis of the revolved solid
  is_revolved Whether or not it is a revolved solid
  revolve_from The start angle
  revolve_to The end angle

#Define the matrix that doubles the X scale of the revolved solid
xshade.scene().active_shape().set_axis_matrix(((2.0, 0.0, 0.0, 0.0), (0.0, 1.0, 0.0, 0.0), (0.0, 0.0, 1.0, 0.0), (0.0, 0.0, 0.0, 1.0)))

set_tag_boolValue

Sets the tag name value (bool) as the key.
Arguments :
  string : tag name
Arguments :
  bool : The value to assign

#Assign the tag as tag1, and get the value
xshade.scene().active_shape().set_tag_boolValue("tag1", True)
print xshade.scene().active_shape().get_tag_boolValue("tag1")

set_tag_doubleValue

Sets the tag name value (double) as the key.
Arguments :
  string : tag name
Arguments :
  double : The value to assign

#Assign the tag as tag1, and get the value
xshade.scene().active_shape().set_tag_doubleValue("tag1", 0.1)
print xshade.scene().active_shape().get_tag_doubleValue("tag1")

set_tag_floatValue

Sets the tag name value (float) as the key.
Arguments :
  string : tag name
Arguments :
  float : The value to assign

#Assign the tag as tag1, and get the value
xshade.scene().active_shape().set_tag_floatValue("tag1", 0.1)
print xshade.scene().active_shape().get_tag_floatValue("tag1")

set_tag_intValue

Sets the tag name value (int) as the key.
Arguments :
  string : tag name
Arguments :
  int : The value to assign

#Assign the tag as tag1, and get the value
xshade.scene().active_shape().set_tag_intValue("tag1", 5)
print xshade.scene().active_shape().get_tag_intValue("tag1")

set_tag_stringValue

Sets the tag name value (string) as the key.
Arguments :
  string : tag name
Arguments :
  dtring : The value to assign

#Assign the tag as tag1, and get the value
xshade.scene().active_shape().set_tag_stringValue("tag1", "xxx")
print xshade.scene().active_shape().get_tag_stringValue("tag1")

solid_clear

Reverts the extruded solid or revolved solid to a regular object.
See also :
  is_extruded Whether or not it is an extruded solid
  is_revolved Whether or not it is a revolved solid

xshade.scene().active_shape().solid_clear()

solid_extrude

Creates an extruded solid.
Arguments :
  float3 : The extrusion vector
See also :
  is_extruded Whether or not it is an extruded solid

#Create an extruded solid of 1000 along the Y vector
xshade.scene().active_shape().solid_extrude((0,1000,0))

solid_revolve

Creates a revolved solid.
Arguments :
  vec3 : the start point of the axis of revolution
Arguments :
  vec3 : the end point of the axis of revolution
See also :
  is_revolved Whether or not it is a revolved solid

#Create a revolved solid along the X axis from the origin to 100
xshade.scene().active_shape().solid_revolve((0.0, 0.0, 0.0), (100.0, 0.0, 0.0))

tag_value_type

Gets the type of tag name value set as the key.
Return value :
  int : The tag type (-1: Not specified, 0: int, 1: double, 2: float, 3: string, 4: bool)
Arguments :
  string : tag name

#Get the tag type of tag1
print xshade.scene().active_shape().tag_value_type("tag1")

transform

Applies a matrix transformation to the object.
Arguments :
  mat4 : the transformation matrix

#Apply a tranformation matrix to uniformly scale the object to double size
xshade.scene().active_shape().transform(((2.0, 0.0, 0.0, 0.0), (0.0, 2.0, 0.0, 0.0), (0.0, 0.0, 2.0, 0.0), (0.0, 0.0, 0.0, 1.0)))

update

Updates the object.

xshade.scene().active_shape().update()

update_skin_bindings

Updates the cache data relating to Skin in the Figure Window.
Used to update the Skin state of objects whose Skin state has been modified by scripts or plug-ins.
Changes will not be reflected in the Skin Window unless it is updated with skin_view().update().

#Browser structure
#Sphere (the target object)
#▼Rotate
# ▼Rotate
#Append binding to the sphere and set the rotator joint of the next object
xshade.scene().active_shape().skin.append_bind()
skin_num = xshade.scene().active_shape().skin.number_of_binds - 1	#Get the number of the appended bind
xshade.scene().active_shape().skin.get_bind(skin_num).shape = xshade.scene().active_shape().bro
xshade.scene().active_shape().update_skin_bindings()	#Update the cache data relating to Skin in the Figure Window
xshade.skin_view().update()	#Update the Skin Window to reflect the changes

Property Details

active_vertex_indices

Tuple of the selected vertex and control point numbers.

  • Get
  • Set

Type :
  int tuple
See also :
  active_edge_indices
  active_face_indices

print xshade.scene().active_shape().active_vertex_indices

axis_matrix

Matrix that defines the axis of the revolved solid.

  • Get
  • Set

Type :
  mat4
See also :
  set_axis_matrix() Set
  is_revolved() Whether or not it is a revolved solid
  revolve_from The start angle
  revolve_to The end angle

print xshade.scene().active_shape().axis_matrix

ball_joint

Ball joint interface.

  • Get
  • Set

Type :
  ball_joint object
See also :
  motion Joint value and motion information
  ball_joint

#Output the coordinates of the center of the ball joint
print xshade.scene().active_shape().ball_joint.position 

bone_joint

Bone joint interface.

  • Get
  • Set

Type :
  bone_joint object
See also :
  motion Joint value and motion information
  bone_joint

#Output the bone joint transformation matrix
print xshade.scene().active_shape().bone_joint.matrix 

bounding_box_size

The size of the bounding box.

  • Get
  • Set

Type :
  float3

print xshade.scene().active_shape().bounding_box_size

bro

The next object.

  • Get
  • Set

Type :
  shape object
If there is no next object, the sentinel object is returned.

#Output the name of the next object
print xshade.scene().active_shape().bro.name

browsable

Whether or not the object can be displayed in the Brower.

  • Get
  • Set

Type :
  bool : True : visible, False : not visible

print xshade.scene().active_shape().browsable

center_point

The average value of the center coordinates of all points and objects.

  • Get
  • Set

Type :
  vec3 : The coordinates of the weighted center
For disks and spheres this is the coordinates of the center are returned; for line objects and polygon meshes the average value of the coordinates of all points is returned.
In the case of a part, the average value of the center coordinates of all objects contained in the part is returned.

print xshade.scene().active_shape().center_point

center_position

The center coordinates of the bounding box.

  • Get
  • Set

Type :
  vec3 : The global coordinates

xshade.scene().active_shape().center_position

custom_joint

Custom joint interface.

  • Get
  • Set

Type :
  custom_joint object
See also :
  motion Joint value and motion information
  custom_joint

#Output the custom joint slider
print xshade.scene().active_shape().custom_joint.value

dad

The parent object.

  • Get
  • Set

Type :
  part object
If the root part is selected, "None" is returned.

#Output the name of the parent object
print xshade.scene().active_shape().dad.name

extrude

The direction and distance to extrude.

  • Get
  • Set

Type :
  float3
See also :
  is_extruded Whether or not it is an extruded solid

print xshade.scene().active_shape().extrude

flip_face

Whether or not the faces are flipped.

  • Get
  • Set

Type :
  bool

print xshade.scene().active_shape().flip_face

has_bro

Whether or not the next object exists.

  • Get
  • Set

Type :
  bool
See also :
  bro The next object

print xshade.scene().active_shape().has_bro

has_dad

Whether or not a parent object exists.

  • Get
  • Set

Type :
  bool
See also :
  dad The parent object

print xshade.scene().active_shape().has_dad

has_motion

Whether or not the object can have motion.

  • Get
  • Set

Type :
  bool
Motion can be set to joints and cameras.

print xshade.scene().active_shape().has_motion

has_shadow_map_bias

Whether or not the shadow map bias value is set.

  • Get
  • Set

Type :
  bool

print xshade.scene().active_shape().has_shadow_map_bias

has_shadow_map_blur

Whether or not the shadow map blur value is set.

  • Get
  • Set

Type :
  bool

print xshade.scene().active_shape().has_shadow_map_blur

has_shadow_map_size

Whether or not the shadow map size value is set.

  • Get
  • Set

Type :
  bool

print xshade.scene().active_shape().has_shadow_map_size

has_sis

Whether or not a previous object exists.

  • Get
  • Set

Type :
  bool
See also :
  sis The previous object

print xshade.scene().active_shape().has_sis

has_son

Whether or not a (non-sentinel) child exists.
Type :
  bool
See also :
  son The child object

print xshade.scene().active_shape().has_son

has_surface_attributes

Whether or not it has surface attributes.

  • Get
  • Set

Type :
  bool

print xshade.scene().active_shape().has_surface_attributes

is_ball_joint

Whether or not it is a ball joint.

  • Get
  • Set

Type :
  bool

print xshade.scene().active_shape().is_ball_joint

is_bone_joint

Whether or not it is a bone joint.

  • Get
  • Set

Type :
  bool

print xshade.scene().active_shape().is_bone_joint

is_container

Whether or not it can contain objects lower in the hierarchy (whether or not it is a part).

  • Get
  • Set

Type :
  bool

print xshade.scene().active_shape().is_container

is_custom_joint

Whether or not it is a custom joint.

  • Get
  • Set

Type :
  bool

print xshade.scene().active_shape().is_custom_joint

is_extruded

Whether or not it is an extruded solid.

  • Get
  • Set

Type :
  bool
See also :
  extrude The extrusion distance

print xshade.scene().active_shape().is_extruded

is_light_effector

Whether or not it is a light joint.

  • Get
  • Set

Type :
  bool

print xshade.scene().active_shape().is_light_effector

is_morph_effector

Whether or not it is a morph joint.

  • Get
  • Set

Type :
  bool

print xshade.scene().active_shape().is_morph_effector

is_one_of_active_shapes

Whether or not the object is selected.

  • Get
  • Set

Type :
  bool

print xshade.scene().active_shape().is_one_of_active_shapes

is_path_joint

Whether or not it is a path joint.

  • Get
  • Set

Type :
  bool

print xshade.scene().active_shape().is_path_joint

is_revolved

Whether or not it is a revolved solid.

  • Get
  • Set

Type :
  bool
See also :
  axis_matrix() Matrix that defines the axis of the revolved solid
  revolve_from The start angle
  revolve_to The end angle

print xshade.scene().active_shape().is_revolved

is_rotator_joint

Whether or not it is a rotator joint.

  • Get
  • Set

Type :
  bool

print xshade.scene().active_shape().is_rotator_joint

is_scale_joint

Whether or not it is a scale joint.

  • Get
  • Set

Type :
  bool

print xshade.scene().active_shape().is_scale_joint

is_shown

Whether the object is displayed or not.

  • Get
  • Set

Type :
  bool

print xshade.scene().active_shape().is_shown

is_slider_joint

Whether or not it is a slider joint.

  • Get
  • Set

Type :
  bool

print xshade.scene().active_shape().is_slider_joint

is_sound_track

Whether or not it is a sound object.

  • Get
  • Set

Type :
  bool

print xshade.scene().active_shape().is_sound_track

is_switch_effector

Whether or not it is a switch.

  • Get
  • Set

Type :
  bool

print xshade.scene().active_shape().is_switch_effector

is_switched

Whether or not the curved surface is switched.

  • Get
  • Set

Type :
  bool

print xshade.scene().active_shape().is_switched

is_uniscale_joint

Whether or not it is a uniscale joint.

  • Get
  • Set

Type :
  bool

print xshade.scene().active_shape().is_uniscale_joint

light_effector

Light joint interface.

  • Get
  • Set

Type :
  light_effector object
See also :
  motion Joint value and motion information
  light_effector

#Output the light joint slider
print xshade.scene().active_shape().light_effector.value

local_to_world_matrix

Local to world coordinates transformation matrix.

  • Get
  • Set

Type :
  mat4
Because coordinate values of objects are stored in local coordinates, if it is necessary to take into account the matrix transformation of the above part, first convert to world coordinates.
See also :
  world_to_local_matrix

print xshade.scene().active_shape().local_to_world_matrix

master_surface

Whether or not a master surface is applied.

  • Get
  • Set

Type :
  master_surface object : If not applied, "None" is returned.
See also :
  master_surface

print xshade.scene().active_shape().master_surface

modifiable

Whether or not the object can be modified.

  • Get
  • Set

Type :
  bool : True : Modifiable, False : In Modify Mode the control points are hidden

print xshade.scene().active_shape().modifiable

morph_effector

Morph joint interface.

  • Get
  • Set

See also :
  motion Joint value and motion information
  morph_effector

#Output the morph amount of the morph joint
print xshade.scene().active_shape().morph_effector.morph

motion

A motion object.

  • Get
  • Set

Type :
  motion object
See also :
  motion

#Output the joint value of sequence 0
print xshade.scene().active_shape().motion.get_joint_value(0)

name

The object name.

  • Get
  • Set

Type :
  string

print xshade.scene().active_shape().name

number_of_skin_points

The number of vertices that allow skin settings.

  • Get
  • Set

Type :
  int

print xshade.scene().active_shape().number_of_skin_points

ordinal

The ordinal of the object or part.

  • Get
  • Set

Type :
  int
The ordinal is determined by the order of the object in the Browser; if the object order is changed, the ordinal also changes.
One advantage of ordinals is that if the scene is closed and reopened, Undo is used to restore a deleted object, or even if the shape class is regenerated, the value of the ordinal does not change.
See also :
  scene.get_shape_by_ordinal()

print xshade.scene().active_shape().ordinal

parent

The parent object.

  • Get
  • Set

Type :
  shape object : None : The root part

#Output the name of the parent object
print xshade.scene().active_shape().parent.name

path_joint

Path joint interface.

  • Get
  • Set

Type :
  path_joint object
See also :
  motion Joint value and motion information
  path_joint

#Output the path joint slider
print xshade.scene().active_shape().path_joint.path_position

path_replicator

Path replicator interface.

  • Get
  • Set

Type :
  path_replicator object
See also :
  motion Joint value and motion information
  path_replicator

#Output the path replicator replication value
print xshade.scene().active_shape().path_replicator.replication

radiosity_attributes

Radiosity attributes.

  • Get
  • Set

Type :
  radiosity_attributes object
See also :
  radiosity_attributes

#Output whether or not to cast shadows during the radiosity calculation 
print xshade.scene().active_shape().radiosity_attributes.cast_shadow 

render_flag

Whether or not to render the object.

  • Get
  • Set

Type :
  int :

-1Inherit (default)
0Do not render
1Always render

If set to Inherit, the settings of the above part are enabled.

print xshade.scene().active_shape().render_flag

revolve_from

The start angle for the revolved solid.

  • Get
  • Set

Type :
  radian
See also :
  revolve_to The end angle
  is_revolved Whether or not it is a revolved solid

print xshade.scene().active_shape().revolve_from

revolve_to

The end angle for the revolved solid.

  • Get
  • Set

Type :
  radian
See also :
  revolve_from The start angle
  is_revolved Whether or not it is a revolved solid

print xshade.scene().active_shape().revolve_to

rotator_joint

Rotator joint interface.

  • Get
  • Set

Type :
  rotator_joint object
See also :
  motion Joint value and motion information
  rotator_joint

#Output the rotation of the rotator joint
print xshade.scene().active_shape().rotator_joint.rotation

scale_joint

Scale joint interface.

  • Get
  • Set

Type :
  scale_joint object
See also :
  motion Joint value and motion information
  scale_joint

#Output the scale of the scale joint
print xshade.scene().active_shape().scale_joint.scale

scene

The scene to which the object belongs.

  • Get
  • Set

Type :
  scene object
xshade.scene() returns the most recently used scene
When Shade or plug-ins run most background processes, the scene to which the object belongs can be gotten from that object.
Python scripts basically run processes in the foreground so extra awareness is not required, but when putting shape in a variable to use, getting scene from that shape will make the script safer.
See also :
  scene

#Create a disk in the scene gotten from shape
shapes = xshade.scene().active_shapes
for shape in shapes:
	scene = shape.scene
	scene.begin_creating_at(shape)
	scene.create_disk(None,[0.0, 0.0, 0.0], 100,0)
	scene.end_creating()

shadow_catcher

Shadow Catcher.

  • Get
  • Set

Type :
  int :

-1Inherit (default)
0Render
1Only render shadows
print xshade.scene().active_shape().shadow_catcher

shadow_map_bias

The shadow map bias.

  • Get
  • Set

Type :
  float

print xshade.scene().active_shape().shadow_map_bias

shadow_map_blur

The shadow map blur.

  • Get
  • Set

Type :
  float

print xshade.scene().active_shape().shadow_map_blur

shadow_map_size

The shadow map size.

  • Get
  • Set

Type :
  int

print xshade.scene().active_shape().shadow_map_size

shadow_type

The shadow type.
Type :

0Inherit (default)
1Ray Tracing
2Shadow Map
print xshade.scene().active_shape().shadow_type

sis

The previous object.

  • Get
  • Set

Type :
  shape object
If there is no previous object, the sentinel object is returned.

#Output the name of the previous object
print xshade.scene().active_shape().sis.name

skin

Skin of objects with one or no vertices.

  • Get
  • Set

Type :
  skin object
Used for parts, joints, disks, spheres, links, etc.
See also :
  skin
  control_point.get_skin() Skin of line objects
  vertex.get_skin() Skin of polygon meshes

#Output the number of binds of the selected object
print xshade.scene().active_shape().skin.number_of_binds

skin_type

The Skin format (-1: Not assigned, 0: Classic, 1: Vertex Blending).

  • Get
  • Set

Type :
  int

#Output the Skin type of the selected object
print xshade.scene().active_shape().skin_type

slider_joint

Slider joint interface.

  • Get
  • Set

Type :
  slider_joint object
See also :
  motion Joint value and motion information
  slider_joint

#Output the start coordinates of the slider joint
print xshade.scene().active_shape().slider_joint.starting_position

son

The sentinel object of the child.

  • Get
  • Set

Type :
  shape object
Sentinel objects designate the terminus of objects inside the part, and always exist, even for empty parts.
A sentinel object's next object, bro, is the topmost object in the part, and the previous object, sis, is the bottommost object in the part.

#Output the name of the bottommost object in the part
print xshade.scene().active_shape().son.sis.name

sound_track

A sound object.

  • Get
  • Set

Type :
  sound object
See also :
  sound_track

#Output the volume of the sound object
print xshade.scene().active_shape().sound_track.value

surface

A surface attributes object.

  • Get
  • Set

Type :
  surface object
If it does not exist, "None" is returned.
See also :
  surface

#Output the Diffuse color of the surface attributes object
print xshade.scene().active_shape().surface.diffuse_color 

surface_replicator

A surface replicator object.

  • Get
  • Set

Type :
  surface_replicator object
See also :
  surface_replicator

#Output the replication value of the surface replicator object
print xshade.scene().active_shape().surface_replicator.replication

tags

Gets the tag name list set to the object.

  • Get
  • Set

Type :
  string array

#Get the list of tag names assigned to the selected object
print xshade.scene().active_shape().tags

total_number_of_control_points

The total number of control points contained in the below hierarchy of the selected object.

  • Get
  • Set

Type :
  int

print xshade.scene().active_shape().total_number_of_control_points

transformation

The transformation matrix, taking into account joint and skin effects.

  • Get
  • Set

Type :
  mat4

print xshade.scene().active_shape().transformation

type

The type of object.

  • Get
  • Set

Type :
  int :

0sentinelSentinel object
1dxf_insertNot used
2partpart
3lightLight
4lineLine object
5sphereSphere
6diskDisk
7polygon_meshPolygon mesh
8master_surfaceMaster surface
10master_imageMaster image
print xshade.scene().active_shape().type

uniscale_joint

Uniscale joint interface.

  • Get
  • Set

Type :
  uniscale_joint object
See also :
  motion Joint value and motion information
  uniscale_joint

#Output the scale of the uniscale joint
print xshade.scene().active_shape().uniscale_joint.scale

uuid

The uuid of the object.

  • Get
  • Set

Type :
  uuid : 128 bit value
The uuid does not change except due to convert or other object transformation.
It is not affected by changes in the Browser position, switching a curved surface, modifying the number of control points, or modifying the name.
See also :
  uuid

print xshade.scene().active_shape().uuid

world_to_local_matrix

World to local coordinates transformation matrix.

  • Get
  • Set

Type :
  mat4
Because coordinate values of objects are stored in local coordinates, if it is necessary to take into account the matrix transformation of the above part, first convert to world coordinates.
See also :
  local_to_world_matrix Local to world coordinates

print xshade.scene().active_shape().world_to_local_matrix

switch_effector

Switch interface.

  • Get
  • Set

Type :
  Switch object
See also :
  motion Joint value and motion information
  switch_effector

#Output the switch selection
print xshade.scene().active_shape().switch_effector.selection