Shade online フォーラム
ログイン
ユーザ名:

パスワード:

IDとパスワードを記憶

パスワード紛失
スレッド表示 | 古いものから 投稿するには登録が必要です 前のスレッド | 次のスレッド | 下へ
投稿者 スレッド
投稿数: 448
管理人
投稿日時: 2016-03-07 12:21
Re: パート内の名前を一括返還
この旧フォーラムは、過去ログの保持を目的に残されています。
今後は、こちらの Shade3D フォーラム(https://forum.shade3d.jp) のご利用をお願いします。
投稿数: 448
管理人
投稿日時: 2016-03-07 12:15
Re: パート内の名前を一括返還
以下のようなコードで置換することができます。
置換する内容によって do_replace_name の部分を変更してください。

# 形状名を一括置換

scene = xshade.scene()

# 実際に名前を置き換える
def do_replace_name (shape):
	# 名前を置き換える
	shape.name =  shape.name.replace('*', '穴')
	
# 階層をたどって再帰的に実行
def replace_name (shape):
	do_replace_name(shape)
	if shape.has_son:
		replace_name(shape.son.bro)
	if shape.has_bro:
		replace_name(shape.bro)

# ルートから形状名の置換を開始
replace_name(scene.shape.son.bro)
投稿数: 5
投稿日時: 2016-02-24 15:28
パート内の名前を一括返還
パート内のオブジェクトの名前を全部一括して名前を同じ名前に変換したいのですが、スクリプトなどはありませんでしょうか。

たとえば、*マークを付けたものを「穴」というように疑似集合演算ではない名前に変えたいです。

Shade7.5を利用しています。どうぞよろしくお願いいたします。
スレッド表示 | 古いものから 投稿するには登録が必要です 前のスレッド | 次のスレッド | トップ

最近の投稿

フォーラム スレッド 返信 閲覧 最終投稿
Free Talk NBA2king-Crushing the Stage with Randle and Gobert in NBA 2K26 0 56 2025-06-11 12:29 Chunzliu
Free Talk ELD.gg-Why Rick¡Çs Stomping Ground Build is the Perfect Off-Meta Melee Choice in POE 2 0 71 2025-06-11 12:28 Chunzliu
Free Talk ELD.gg-Visual Settings that Make a Real Difference in EA FC 26 0 78 2025-06-11 12:25 Chunzliu
Free Talk Conduit Shrine: Amping Up the power in u4gm 1 725 2025-05-22 16:51 Vanwo
Free Talk ELD.gg Path of Exile 2: Tactical Witchcraft: Commanding the Field 0 296 2025-05-22 12:11 Lilidala
Free Talk ELD.gg Immersive Landscapes: The Artistic World-Building of New World¡Çs Aeternum 0 351 2025-05-22 12:11 Lilidala
Free Talk ELD.gg Diablo 4 Loot Filter: Aligning Loot Efficiency with Economic Sustainability 0 314 2025-05-22 12:10 Lilidala
Free Talk MMoexp: A Thorough Guide on How to Access the EA FC 25 Beta 0 331 2025-05-16 15:38 phinang
Free Talk MMoexp: A Deep Dive into Arcane Surge in Path of Exile 2 0 459 2025-05-16 15:38 phinang
Free Talk MMoexp: Diablo 4 Season 8: A Guide to Getting Treasure Bags 0 569 2025-05-16 15:37 phinang