surface

表面材質の操作に使用する。


xshade
shape
surface

メソッド一覧

append_mapping_layer マッピングレイヤーを追加する
insert_mapping マッピングレイヤーを挿入する
load 表面材質設定ファイルを読み込む
mapping_layer 引数で指定されたテクスチャー層のマッピングレイヤーを返す
move_down_mapping_layer 指定インデックスのマッピングレイヤを指定階層分繰り下げる
move_mapping マッピングレイヤを移動する
move_up_mapping_layer 指定インデックスのマッピングレイヤを指定階層分繰り上げる
remove_mapping マッピングレイヤーを削除する
save 表面材質設定を保存する

プロパティ一覧

aberration 収差
ambient 環境光の明るさ
ambient_color 環境光の色
anisotropic 異方性反射
backlight バックライト
backlight_color バックライトの色
black_key_mask ブラックキーマスクのオン/オフ
current_mapping_layer 現在のマッピングレイヤー
current_mapping_layer_index 現在のマッピングレイヤーのインデックス
diffuse 拡散反射
diffuse_color 拡散反射の色
direct_illumination 直接光の影響度
dont_reflect_background その他・背景を反射しない
dont_visible_to_camera その他・カメラに表示しない
dont_visible_to_indirect_rays その他・間接レイに表示しない
dont_visible_to_reflection_rays その他・反射レイに表示しない
dont_visible_to_refraction_rays その他・透明レイに表示しない
do_not_cast_shadow 影を落とさないのオン/オフ
do_not_reflect_objects 他の形状を反射しないのオン/オフ
do_not_show_shadow 影を表示しないのオン/オフ
fresnel_reflection フレネル
glow 発光
glow_color 発光の色
has_aberration 収差が設定されているかどうか
has_ambient 環境光のオン/オフ
has_anisotropic 異方性反射のオン/オフ
has_aux その他が設定されているかどうか
has_backlight バックライトのオン/オフ
has_current_mapping_layer マッピングレイヤーを持っているかどうか
has_diffuse 拡散反射のオン/オフ
has_fresnel_reflection フレネルのオン/オフ
has_glow 発光のオン/オフ
has_mapping_layers マッピングのオン/オフ
has_metallic メタリックのオン/オフ
has_pseudo_caustics 擬似コースティクスが設定されているかどうか
has_reflection 反射のオン/オフ
has_refraction 屈折のオン/オフ
has_roughness 荒さのオン/オフ
has_shader_node テクスチャが設定されているかどうか
has_specular_1 光沢(1)のオン/オフ
has_specular_2 光沢(2)のオン/オフ
has_transparency 透明のオン/オフ
highlight 光沢(1)
highlight_2 光沢(2)
highlight_color 光沢(1)の色
highlight_color_2 光沢(2)の色
highlight_size 光沢(1)のサイズ
highlight_size_2 光沢(2)のサイズ
indirect_illumination 間接光の影響度
is_master_surface マスターサーフェスが設定されているかどうか
local_coordinates ローカル座標系のオン/オフ
metallic メタリック
metallic_color メタリックの色
no_shading 陰影付けしないのオン/オフ
number_of_mapping_layers マッピングレイヤーの数
pseudo_caustics 疑似コースティクス
pseudo_caustics_aberration 疑似コースティクス収差
pseudo_caustics_brightness 疑似コースティクスの明るさ
pseudo_caustics_bump 疑似コースティクスバンプ
reflection 反射
reflection_color 反射の色
refraction 屈折
roughness 荒さ
smoother_shading より滑らかな陰影付けのオン/オフ
soft_glow ソフトグロー
thumbnail_image サムネールイメージオブジェクト
transparency 透明
transparency_color 透明の色
white_key_mask ホワイトキーマスクのオン/オフ




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

現在のマッピングレイヤー。

  • 取得
  • 設定

型 :
  mapping_layerオブジェクト
参照 :
  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

サムネールイメージオブジェクト。

  • 取得
  • 設定

型 :
  imageオブジェクト
参照 :
  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