表面材質の操作に使用する。
xshade |
↑ |
shape |
↑ |
surface |
append_mapping_layer | マッピングレイヤーを追加する |
insert_mapping | マッピングレイヤーを挿入する |
load | 表面材質設定ファイルを読み込む |
mapping_layer | 引数で指定されたテクスチャー層のマッピングレイヤーを返す |
move_down_mapping_layer | 指定インデックスのマッピングレイヤを指定階層分繰り下げる |
move_mapping | マッピングレイヤを移動する |
move_up_mapping_layer | 指定インデックスのマッピングレイヤを指定階層分繰り上げる |
remove_mapping | マッピングレイヤーを削除する |
save | 表面材質設定を保存する |
xshade.scene().active_shape()(選択形状の取得)のように形状を取得して使用する。
表面材質の設定された形状、あるいはマスターサーフェス形状に対して使用する。
append_mapping_layer
マッピングレイヤーを追加する。
参照 :
mapping_layer
マッピングレイヤーが無い、または新規に表面材質を作成した状態で実行した場合は1番にマッピングレイヤーが追加される。`
xshade.scene().active_shape().surface.append_mapping_layer()
insert_mapping
マッピングレイヤーを挿入する。
引数 :
int : 挿入位置のインデックス
参照 :
mapping_layer
マッピングレイヤーが無い場合はエラーとなる。
#インデックス0にマッピングレイヤーを挿入する
xshade.scene().active_shape().surface.insert_mapping(0)
load
表面材質設定ファイルを読み込む。
引数 :
file_path
#表面材質設定ファイルを読み込む
dialog = xshade.create_dialog_with_uuid()
file_path = dialog.ask_path(True, '*.shdsfc|shdsfc')
xshade.scene().active_shape().surface.load(file_path)
mapping_layer
引数で指定されたテクスチャー層のマッピングレイヤーを返す。
戻り値 :
mapping_layerオブジェクト
引数 :
int : マッピングレイヤーのインデックス
参照 :
mapping_layer
#インデックス0のマッピングレイヤーのパターンの名前を出力する
print xshade.scene().active_shape().surface.mapping_layer(0).pattern_name
move_down_mapping_layer
指定インデックスのマッピングレイヤを指定階層分繰り下げる。
引数 :
int : 移動量
引数 :
int : マッピングレイヤのインデックス
参照 :
mapping_layer
#インデックス2のマッピングレイヤを1階層分繰り下げる
xshade.scene().active_shape().surface.move_down_mapping_layer(1,2)
move_mapping
マッピングレイヤーを移動する。
引数 :
int : 移動するマッピングレイヤーのインデックス
引数 :
int : 移動先のマッピングレイヤーのインデックス
参照 :
mapping_layer
インデックス大からインデックス小方向への移動のみ。
#インデックス1のマッピングレイヤーをインデックス0に移動する
xshade.scene().active_shape().surface.move_mapping(1, 0)
move_up_mapping_layer
指定インデックスのマッピングレイヤを指定階層分繰り上げる。
引数 :
int : 移動量
引数 :
int : マッピングレイヤのインデックス
参照 :
mapping_layer
#インデックス2のマッピングレイヤを1階層分繰り上げる
xshade.scene().active_shape().surface.move_up_mapping_layer(1,2)
remove_mapping
マッピングレイヤーを削除する。
引数 :
int : マッピングレイヤーのインデックス
10.5.3でintに0を指定するとクラッシュする
#インデックス1のマッピングレイヤーを削除する
xshade.scene().active_shape().surface.remove_mapping(1)
save
表面材質設定を保存する。
引数 :
file_path
#表面材質設定を保存する
dialog = xshade.create_dialog_with_uuid()
file_path = dialog.ask_path(False, '*.shdsfc|shdsfc')
xshade.scene().active_shape().surface.save(file_path)
aberration
収差。
型 :
float
print xshade.scene().active_shape().surface.aberration
ambient
環境光の明るさ。
型 :
float
print xshade.scene().active_shape().surface.ambient
ambient_color
環境光の色。
型 :
rgb
設定すると自動で環境光がオンになる。
print xshade.scene().active_shape().surface.ambient_color
anisotropic
異方性反射。
型 :
float
print xshade.scene().active_shape().surface.anisotropic
backlight
バックライト。
型 :
float
print xshade.scene().active_shape().surface.backlight
backlight_color
バックライトの色。
型 :
rgb
print xshade.scene().active_shape().surface.backlight_color
black_key_mask
ブラックキーマスクのオン/オフ。
型 :
bool
print xshade.scene().active_shape().surface.black_key_mask
current_mapping_layer
#現在のマッピングレイヤーのパターンの名前を出力する
print xshade.scene().active_shape().surface.current_mapping_layer.pattern_name
current_mapping_layer_index
現在のマッピングレイヤーのインデックス。
型 :
int
未設定の場合は-1が返る。
print xshade.scene().active_shape().surface.current_mapping_layer_index
diffuse
拡散反射。
型 :
float
print xshade.scene().active_shape().surface.diffuse
diffuse_color
拡散反射の色。
型 :
rgb
print xshade.scene().active_shape().surface.diffuse_color
direct_illumination
直接光の影響度。
型 :
float
print xshade.scene().active_shape().surface.direct_illumination
dont_reflect_background
その他・背景を反射しない。
型 :
bool
print xshade.scene().active_shape().surface.dont_reflect_background
dont_visible_to_camera
その他・カメラに表示しない。
型 :
bool
print xshade.scene().active_shape().surface.dont_visible_to_camera
dont_visible_to_indirect_rays
その他・間接レイに表示しない。
型 :
bool
print xshade.scene().active_shape().surface.dont_visible_to_indirect_rays
dont_visible_to_reflection_rays
その他・反射レイに表示しない。
型 :
bool
print xshade.scene().active_shape().surface.dont_visible_to_reflection_rays
dont_visible_to_refraction_rays
その他・透明レイに表示しない。
型 :
bool
print xshade.scene().active_shape().surface.dont_visible_to_refraction_rays
do_not_cast_shadow
影を落とさないのオン/オフ。
型 :
bool
print xshade.scene().active_shape().surface.do_not_cast_shadow
do_not_reflect_objects
他の形状を反射しないのオン/オフ。
型 :
bool
print xshade.scene().active_shape().surface.do_not_reflect_objects
do_not_show_shadow
影を表示しないのオン/オフ。
型 :
bool
print xshade.scene().active_shape().surface.do_not_show_shadow
fresnel_reflection
フレネル。
型 :
float
print xshade.scene().active_shape().surface.fresnel_reflection
glow
発光。
型 :
float
print xshade.scene().active_shape().surface.glow
glow_color
発光の色。
型 :
rgb
print xshade.scene().active_shape().surface.glow_color
has_aberration
収差が設定されているかどうか。
型 :
bool
print xshade.scene().active_shape().surface.has_aberration
has_ambient
環境光のオン/オフ。
型 :
bool
print xshade.scene().active_shape().surface.has_ambient
has_anisotropic
異方性反射のオン/オフ。
型 :
bool
print xshade.scene().active_shape().surface.has_anisotropic
has_aux
その他が設定されているかどうか。
型 :
bool
インターフェースでオフが無いので、通常Trueのみ返る。
print xshade.scene().active_shape().surface.has_aux
has_backlight
バックライトのオン/オフ。
型 :
bool
print xshade.scene().active_shape().surface.has_backlight
has_current_mapping_layer
マッピングレイヤーを持っているかどうか。
型 :
bool
print xshade.scene().active_shape().surface.has_current_mapping_layer
has_diffuse
拡散反射のオン/オフ。
型 :
bool
print xshade.scene().active_shape().surface.has_diffuse
has_fresnel_reflection
フレネルのオン/オフ。
型 :
bool
print xshade.scene().active_shape().surface.has_fresnel_reflection
has_glow
発光のオン/オフ。
型 :
bool
print xshade.scene().active_shape().surface.has_glow
has_mapping_layers
マッピングのオン/オフ。
型 :
bool
print xshade.scene().active_shape().surface.has_mapping_layers
has_metallic
メタリックのオン/オフ。
型 :
bool
print xshade.scene().active_shape().surface.has_metallic
has_pseudo_caustics
擬似コースティクスが設定されているかどうか。
型 :
bool
print xshade.scene().active_shape().surface.has_pseudo_caustics
has_reflection
反射のオン/オフ。
型 :
bool
print xshade.scene().active_shape().surface.has_reflection
has_refraction
屈折のオン/オフ。
型 :
bool
print xshade.scene().active_shape().surface.has_refraction
has_roughness
荒さのオン/オフ。
型 :
bool
print xshade.scene().active_shape().surface.has_roughness
has_shader_node
テクスチャが設定されているかどうか。
型 :
bool
print xshade.scene().active_shape().surface.has_shader_node
has_specular_1
光沢(1)のオン/オフ
型 :
bool
print xshade.scene().active_shape().surface.has_specular_1
has_specular_2
光沢(2)のオン/オフ
型 :
bool
print xshade.scene().active_shape().surface.has_specular_2
has_transparency
透明のオン/オフ。
型 :
bool
print xshade.scene().active_shape().surface.has_transparency
highlight
光沢(1)。
型 :
float
print xshade.scene().active_shape().surface.highlight
highlight_2
光沢(2)。
型 :
float
print xshade.scene().active_shape().surface.highlight_2
highlight_color
光沢(1)の色。
型 :
rgb
print xshade.scene().active_shape().surface.highlight_color
highlight_color_2
光沢(2)の色。
型 :
rgb
print xshade.scene().active_shape().surface.highlight_color_2
highlight_size
光沢(1)のサイズ。
型 :
float
print xshade.scene().active_shape().surface.highlight_size
highlight_size_2
光沢(2)のサイズ。
型 :
float
print xshade.scene().active_shape().surface.highlight_size_2
indirect_illumination
間接光の影響度。
型 :
float
print xshade.scene().active_shape().surface.indirect_illumination
is_master_surface
マスターサーフェスが設定されているかどうか。
型 :
bool
print xshade.scene().active_shape().surface.is_master_surface
local_coordinates
ローカル座標系のオン/オフ。
型 :
bool
print xshade.scene().active_shape().surface.local_coordinates
metallic
メタリック。
型 :
float
print xshade.scene().active_shape().surface.metallic
metallic_color
メタリックの色。
型 :
rgb
print xshade.scene().active_shape().surface.metallic_color
no_shading
陰影付けしないのオン/オフ。
型 :
bool
print xshade.scene().active_shape().surface.no_shading
number_of_mapping_layers
マッピングレイヤーの数。
型 :
int
print xshade.scene().active_shape().surface.number_of_mapping_layers
pseudo_caustics
疑似コースティクス。
型 :
float
print xshade.scene().active_shape().surface.pseudo_caustics
pseudo_caustics_aberration
疑似コースティクス収差。
型 :
float
print xshade.scene().active_shape().surface.pseudo_caustics_aberration
pseudo_caustics_brightness
疑似コースティクスの明るさ。
型 :
float
print xshade.scene().active_shape().surface.pseudo_caustics_brightness
pseudo_caustics_bump
疑似コースティクスバンプの値。
型 :
float
print xshade.scene().active_shape().surface.pseudo_caustics_bump
reflection
反射。
型 :
float
print xshade.scene().active_shape().surface.reflection
reflection_color
反射の色。
型 :
rgb
print xshade.scene().active_shape().surface.reflection_color
refraction
屈折。
型 :
float
print xshade.scene().active_shape().surface.refraction
roughness
荒さ。
型 :
float
print xshade.scene().active_shape().surface.roughness
smoother_shading
より滑らかな陰影付けのオン/オフ。
型 :
bool
print xshade.scene().active_shape().surface.smoother_shading
soft_glow
ソフトグロー。
型 :
float
print xshade.scene().active_shape().surface.soft_glow
thumbnail_image
#レンダリングイメージをサムネールイメージに設定する
rimage = xshade.scene().rendering.image
xshade.scene().active_shape().surface.thumbnail_image = rimage
transparency
透明。
型 :
float
print xshade.scene().active_shape().surface.transparency
transparency_color
透明の色
型 :
rgb
print xshade.scene().active_shape().surface.transparency_color
white_key_mask
ホワイトキーマスクのオン/オフ。
型 :
bool
print xshade.scene().active_shape().surface.white_key_mask