Used for Figure Window Display Mode operations.
xshade |
↑ |
scene |
↑ |
display |
clear_template_image | Deletes the template of the specified viewport |
display_template_image | Sets the template on/off value of the specified viewport |
get_camera_type | Returns the camera type of the specified view |
get_lighting_mode | Returns the lighting mode of the specified viewport |
get_shading_active_shape_only | Returns the Shade Selection Only boolean for the specified viewport |
get_shading_mode | Returns the shading mode of the specified viewport |
get_show_background | Returns the background on/off value of the specified viewport |
get_show_bbox | Returns the bounding box on/off value of the specified viewport |
get_show_colored_backfaces | Returns the colored backfaces on/off value of the specified viewport |
get_show_colored_shading | Returns the colored shading on/off value of the specified viewport |
get_show_envmap | Returns the environment map on/off value of the specified viewport |
get_show_grid | Returns the grid on/off value of the specified viewport |
get_show_highlight | Returns the highlight on/off value of the specified viewport |
get_show_nonmanifold_edges | Returns the Show Non-manifold Geometry on/off value of the specified viewport |
get_show_nonmanifold_edges_flags | Returns the Show Non-manifold Geometry settings flag of the specified viewport |
get_show_normal | Returns the normal on/off value of the specified viewport |
get_show_singlesided | Returns the singlesided on/off value of the specified viewport |
get_stereo_type | Returns the Stereo Vision state of the Figure Window |
load_template_image | Loads a template in the specified viewport |
set_camera_type | Sets the camera type of the specified viewport |
set_lighting_mode | Sets the lighting mode of the specified viewport |
set_shading_active_shape_only | Sets the Shade Selection Only boolean for the specified viewport |
set_shading_mode | Sets the shading mode of the specified viewport |
set_show_background | Sets the background on/off value of the specified viewport |
set_show_bbox | Sets the bounding box on/off value of the specified viewport |
set_show_colored_backfaces | The colored backfaces on/off value of the specified viewport |
set_show_colored_shading | Sets the colored shading on/off value of the specified viewport |
set_show_envmap | Sets the environment map on/off value of the specified viewport |
set_show_grid | Sets the grid on/off value of the specified viewport |
set_show_highlight | Sets the highlight on/off value of the specified viewport |
set_show_nonmanifold_edges | The Show Non-Manifold Geometry on/off value of the specified viewport |
set_show_nonmanifold_edges_flags | Sets the Show Non-manifold Geometry settings flag of the specified viewport |
set_show_normal | Sets the normal on/off value of the specified viewport |
set_show_singlesided | Sets the singlesided on/off value of the specified viewport |
set_stereo_type | Switches Stereo Vision types in the Figure Window |
set_uv_display_image | Sets the UV image on/off value of the specified viewport |
set_uv_image_brightness | Sets the brightness of the UV image of the specified viewport |
set_uv_shading | Sets the UV shading on/off value of the specified viewport |
update_background | Updates the background |
update_solid_texture | Updates textures |
all_lighting_mode | The lighting mode for all viewports |
all_shading_mode | The shading mode for all viewports |
bbox | The bounding box on/off value for all viewports |
colored_shading | The colored shading on/off value for all viewports |
current_viewpane | The index of the active viewport |
envmap_preview | Sets the environment map on/off value for all viewports |
flat | The flat shading on/off value for all viewports |
grid | The grid on/off value for all viewports |
highlight_preview | The highlight on/off value for all viewports |
normal | The normal on/off value for all viewports |
perspective_grid_auto_bounds | Perspective grid auto-calculate bounds on/off |
perspective_grid_auto_grid_size | Perspective grid auto-calculate grid size on/off |
perspective_grid_bounds | The perspective view's grid bounds |
perspective_grid_fixed_snap_size | Perspective grid fixed snap size on/off |
perspective_grid_major_size | The size of the perspective view's major grid |
perspective_grid_minor_subdivision | The size of the perspective view's minor grid |
perspective_grid_snap_size | The perspective view's snap size |
subdivided_cage_wireframe | Cage wireframe display for all viewports on/off |
singlesided | The singlesided on/off value for all viewports |
texture_size | The texture size of the background |
uv_mode | the index of the selected UV layer in the UV View |
clear_template_image
Deletes the template of the specified viewport
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
#Turn on template in the bottom right viewport
xshade.scene().display.clear_template_image(0)
display_template_image
Sets the template on/off value of the specified viewport
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
Arguments :
bool : template on/off value
#Turn on template in the bottom right view
xshade.scene().display.display_template_image(0, True)
get_camera_type
Returns the camera type of the specified view
Return value :
int : the camera type
0 | Right View |
1 | Top View |
2 | Front View |
3 | Pers View |
4 | Bottom View |
5 | Left View |
6 | Back View |
7 | UV |
8 | Object camera |
9 | Meta-camera |
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
#Output the camera type of the bottom right viewport
print xshade.scene().display.get_camera_type(0)
get_lighting_mode
Returns the lighting mode of the specified viewport
Return value :
int : the lighting mode
0 | Default Light |
1 | Modeling Light |
2 | Use All Lights |
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
#Output the lighting mode of the bottom right viewport
print xshade.scene().display.get_lighting_mode(0)
get_shading_active_shape_only
Returns the Shade Selection Only boolean for the specified viewport.
Return value :
bool : Shade Selection Only on/off
Parameters :
int : The index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
#Output the Shade Selection Only boolean for the bottom right viewport
print xshade.scene().display.get_shading_active_shape_only(0)
get_shading_mode
Returns the shading mode of the specified viewport
Return value :
int : the shading mode
0 | Wireframe |
1 | hidden wireframe |
2 | Shading |
3 | Shading and Wireframe |
4 | Texture |
5 | Texture and Wireframe |
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
#Output the shading mode of the bottom right viewport
print xshade.scene().display.get_shading_mode(0)
get_show_background
Returns the background on/off value of the specified viewport
Return value :
bool : the background on/off value
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
#Output the background on/off value of the bottom right viewport
print xshade.scene().display.get_show_background(0)
get_show_bbox
Returns the bounding box on/off value of the specified viewport
Return value :
bool : the bounding box on/off value
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
#Output the bounding box on/off value of the bottom right viewport
print xshade.scene().display.get_show_bbox(0)
get_show_colored_backfaces
Returns the colored backfaces on/off value of the specified viewport
Return value :
bool : the colored backfaces on/off value
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
#Output the colored backfaces on/off value of the bottom right viewport
print xshade.scene().display.get_show_colored_backfaces(0)
get_show_colored_shading
Returns the colored shading on/off value of the specified viewport
Return value :
bool : the colored shading on/off value
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
#Output the colored shading on/off value of the bottom right viewport
print xshade.scene().display.get_show_colored_shading(0)
get_show_envmap
Returns the environment map on/off value of the specified viewport
Return value :
bool : the environment map on/off value
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
#Output the environment map on/off value of the bottom right viewport
print xshade.scene().display.get_show_envmap(0)
get_show_grid
Returns the grid on/off value of the specified viewport
Return value :
bool : the grid on/off value
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
#Output the grid on/off value of the bottom right viewport
print xshade.scene().display.get_show_grid(0)
get_show_highlight
Returns the highlight on/off value of the specified viewport
Return value :
bool : the highlight on/off value
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
#Output the highlight on/off value of the bottom right viewport
print xshade.scene().display.get_show_highlight(0)
get_show_nonmanifold_edges
Returns the Show Non-manifold Geometry on/off value of the specified viewport
Return value :
bool : the Show Non-Manifold Geometry on/off value
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
#Output the Show Non-Manifold Geometry on/off value of the bottom right viewport
print xshade.scene().display.get_show_nonmanifold_edges(0)
get_show_nonmanifold_edges_flags
Returns the Show Non-manifold Geometry settings flag of the specified viewport
Return value :
int : the Show Non-Manifold Geometry setting flag
1 | Hidden Edges |
2 | Bold |
4 | Show Non-Manifold Edges |
8 | Show Flipped Faces |
16 | Show Border Edges |
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
#Output the Show Non-Manifold Geometry setting of the bottom right viewport
flags = xshade.scene().display.get_show_nonmanifold_edges_flags(0)
if flags & 1: print "Transparent"
if flags & 2: print "Bold"
if flags & 4: print "Non Manifold"
if flags & 8: print "Inconsistent"
if flags & 16: print "Border"
get_show_normal
Returns the normal on/off value of the specified viewport
Return value :
bool : the normal on/off value
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
#Output the normal on/off value of the bottom right viewport
print xshade.scene().display.get_show_normal(0)
get_show_singlesided
Returns the singlesided on/off value of the specified viewport
Return value :
bool : the singlesided on/off value
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
#Output the singlesided on/off value of the bottom right viewport
print xshade.scene().display.get_show_singlesided(0)
get_stereo_type
Returns the Stereo Vision state of the Figure Window
Return value :
int : the Stereo Vision state
0 : None; 1 : Anaglyph; 2 : quad buffer (NVIDIA® 3D Vision™)
#Output the Stereo Vision state
print xshade.scene().display.get_stereo_type()
load_template_image
Loads a template in the specified viewport
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
Arguments :
string : the template image file path
#Load a jpg file as a template in the bottom right viewport
dialog = xshade.create_dialog_with_uuid()
file_path = dialog.ask_path(True, '*.jpg|jpg')
xshade.scene().display.load_template_image(0, file_path)
set_camera_type
Sets the camera type of the specified viewport
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
Arguments :
int : the camera type
Arguments :
int : the camera index (only specify meta-cameras, object cameras)
#Set meta-camera to the bottom right viewport
xshade.scene().display.set_camera_type(0, 9, 0)
set_lighting_mode
Sets the lighting mode of the specified viewport
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
Arguments :
int : the lighting mode
#Set Modeling Light to the bottom right viewport
xshade.scene().display.set_lighting_mode(0, 1)
set_shading_active_shape_only
Sets the Shade Selection Only boolean for the specified viewport.
Parameters :
int : The index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
Parameters :
bool : Shade Selection Only on/off
#Turn on Shade Selection Only for the bottom right viewport
xshade.scene().display.set_shading_active_shape_only(0, True)
set_shading_mode
Sets the shading mode of the specified viewport
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
Arguments :
int : the shading mode
#Set the shading mode of the bottom right viewport
xshade.scene().display.set_shading_mode(0, 2)
set_show_background
Sets the background on/off value of the specified viewport
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
Arguments :
bool : the background on/off value
#Set background to 'on' in the bottom right viewport
xshade.scene().display.set_show_background(0, True)
set_show_bbox
Sets the bounding box on/off value of the specified viewport
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
Arguments :
bool : the bounding box on/off value
#Set bounding box to 'on' in the bottom right viewport
xshade.scene().display.set_show_bbox(0, True)
set_show_colored_backfaces
The colored backfaces on/off value of the specified viewport
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
Arguments :
bool : the colored backfaces on/off value
#Set colored backfaces to 'on' in the bottom right viewport
xshade.scene().display.set_show_colored_backfaces(0, True)
set_show_colored_shading
Sets the colored shading on/off value of the specified viewport
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
Arguments :
bool : the colored shading on/off value
#Set colored shading to 'on' in the bottom right viewport
xshade.scene().display.set_show_colored_shading(0, True)
set_show_envmap
Sets the environment map on/off value of the specified viewport
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
Arguments :
bool : the environment map on/off value
#Set environment map to 'on' in the bottom right viewport
xshade.scene().display.set_show_envmap(0, True)
set_show_grid
Sets the grid on/off value of the specified viewport
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
Arguments :
bool : the grid on/off value
#Set grid to 'on' in the bottom right viewport
xshade.scene().display.set_show_grid(0, True)
set_show_highlight
Sets the highlight on/off value of the specified viewport
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
Arguments :
bool : the highlight on/off value
#Set highlight to 'on' in the bottom right viewport
xshade.scene().display.set_show_highlight(0, True)
set_show_nonmanifold_edges
The Show Non-Manifold Geometry on/off value of the specified viewport
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
Arguments :
bool : the Show Non-Manifold Geometry on/off value
#Set Show Non-Manifold Geometry to 'on' in the bottom right viewport
xshade.scene().display.set_show_nonmanifold_edges(0, True)
set_show_nonmanifold_edges_flags
Sets the Show Non-manifold Geometry settings flag of the specified viewport
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
Arguments :
int : the Show Non-Manifold Geometry setting flag
1 | Hidden Edges |
2 | Bold |
4 | Show Non-Manifold Edges |
8 | Show Flipped Faces |
16 | Show Border Edges |
#In the bottom right viewport set Non-Manifold Geometry to show Non-Manifold Edges only, turn on Hidden Edges and Bold
xshade.scene().display.set_show_nonmanifold_edges_flags(0, 1 | 2 | 4)
set_show_normal
Sets the normal on/off value of the specified viewport
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
Arguments :
bool : the normal on/off value
#Set normals to 'on' in the bottom right view
xshade.scene().display.set_show_normal(0, True)
set_show_singlesided
Sets the singlesided on/off value of the specified viewport
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
Arguments :
bool : the singlesided on/off value
#Set singlesided to 'on' in the bottom right viewport
xshade.scene().display.set_show_singlesided(0, True)
set_stereo_type
Switches the Stereo Vision state of the Figure Window
Arguments :
int : the Stereo Vision state
0 : None; 1 : Anaglyph; 2 : quad buffer (NVIDIA® 3D Vision™)
Return value :
bool : whether possible to switch or not
#Switch to Anaglyph and output the results
print xshade.scene().display.set_stereo_type(1)
set_uv_display_image
Sets the UV image on/off value of the specified viewport
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
Arguments :
bool : the UV image on/off value
#Set UV image to 'on' in the bottom right viewport
xshade.scene().display.set_uv_display_image(0, True)
set_uv_image_brightness
Sets the brightness of the UV image of the specified viewport
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
Arguments :
bool : the UV image brightness
#Set the brightness of the UV image in the bottom right viewport to "Brighter"
xshade.scene().display.set_uv_image_brightness(0, True)
set_uv_shading
Sets the UV shading on/off value of the specified viewport
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
Arguments :
bool : the UV shading on/off value
#Set UV shading to 'on' in the bottom right viewport
xshade.scene().display.set_uv_shading(0, True)
update_background
Updates the background
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
#Updates the background in the bottom right viewport
xshade.scene().display.update_background(0)
update_solid_texture
Updates textures
Arguments :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
#Updates the textures in the bottom right viewport
xshade.scene().display.update_solid_texture(0)
all_lighting_mode
The lighting mode for all viewports
Type :
int
#Set to Modeling Light
xshade.scene().display.all_lighting_mode = 1
all_shading_mode
The shading mode for all viewports
Type :
int
#Set the shading mode
xshade.scene().display.all_shading_mode = 2
bbox
The bounding box on/off value for all viewports
Type :
bool
#Set bounding box to 'on'
xshade.scene().display.bbox = True
colored_shading
The colored shading on/off value for all viewports
Type :
bool
#Set colored shading to 'on'
xshade.scene().display.colored_shading = True
current_viewpane
The index of the active viewport
Type :
int : the index of the viewport
1 | top left viewport | 3 | top right viewport |
2 | bottom left viewport | 0 | bottom right viewport |
#Make the bottom right viewport active
xshade.scene().display.current_viewpane = 0
envmap_preview
The environment map on/off value for all viewports
Type :
bool
#Set environment map to 'on'
xshade.scene().display.envmap_preview = True
flat
The flat shading on/off value for all viewports
Type :
bool
#Set flat shading to 'on'
xshade.scene().display.flat = True
grid
The grid on/off value for all viewports
Type :
bool
#Set grid to 'on'
xshade.scene().display.grid = True
highlight_preview
The highlight on/off value for all viewports
Type :
bool
#Set highlight to 'on'
xshade.scene().display.highlight_preview = True
normal
The normal on/off value for all viewports
Type :
bool
#Set normal to 'on'
xshade.scene().display.normal = True
perspective_grid_auto_bounds
Perspective grid auto-calculate bounds on/off.
Type :
bool
#Turn on auto-calculate bounds for the perspective grid
xshade.scene().display.perspective_grid_auto_bounds = True
perspective_grid_auto_grid_size
Perspective grid auto-calculate grid size on/off.
Type :
bool
#Turn on auto-calculate grid size for the perspective grid
xshade.scene().display.perspective_grid_auto_grid_size = True
perspective_grid_bounds
The perspective view's grid bounds.
Type :
float
print xshade.scene().display.perspective_grid_bounds
perspective_grid_fixed_snap_size
Perspective grid fixed snap size on/off.
Type :
bool
#Turn on fixed snap size (numeric input) for the perspective grid
xshade.scene().display.perspective_grid_fixed_snap_size = True
perspective_grid_major_size
The size of the perspective view's major grid.
Type :
float
print xshade.scene().display.perspective_grid_major_size
perspective_grid_minor_subdivision
The size of the perspective view's minor grid.
Type :
int
print xshade.scene().display.perspective_grid_minor_subdivision
perspective_grid_snap_size
The perspective view's snap size.
Type :
float
print xshade.scene().display.perspective_grid_snap_size
subdivided_cage_wireframe
Cage wireframe display for all viewports on/off.
Type :
bool
# Turn on cage wireframe display
xshade.scene().display.subdivided_cage_wireframe = True
singlesided
The singlesided on/off value for all viewports
Type :
bool
#Set singlesided to 'on'
xshade.scene().display.singlesided = True
texture_size
The texture size of the background
Type :
int : 128, 256, 512, 1024
#Set the texture resolution to 512 (default is 256)
xshade.scene().display.texture_size = 512
uv_mode
the index of the selected UV layer in the UV View
Type :
int
0 | UV1 (distance) |
1 | UV2 (parameter) |
2 | UV3 |
3 | UV4 |
4 | UV5 |
5 | UV6 |
6 | UV7 |
7 | UV8 |
If multiple viewports are set to UV View, gets and sets the index of the UV layer of the active viewport.
If none of the viewports are set to UV View, returns -1 when getting, and setting is ignored.
#Set the UV layer of the UV View to UV2 (parameter)
xshade.scene().display.uv_mode = 1