keichanぶろぐ

目次

Blog 利用状況

ニュース

FF XI

Profile

初音ミク

iKnow!

記事カテゴリ

書庫

日記カテゴリ

3ds max で .NET

3ds max で .NET

3ds Max 9 から MAXScript で .NET Framework が利用できるようになりました。

今まで 8 しか使っていなかったので、Max 9の検証を兼ねていろいろ弄っていきたいと思います。

参考書はmax9パッケージに付属していた MAXScript リファレンス 9.0 を使用します。

ということで、System.Stringクラスを利用してメソッドを列挙するスクリプトを書いてみました。
(参考:MAXScript ツールおよび 3ds Max との連携 >> MAXScript における DotNet >> dotNetObject)


 o1 = dotNetObject "System.String" "hello,world!" -- System.String オブジェクトの生成
 showMethods o1 -- リスナーに結果を列挙


  .<System.Object>Clone()
  .[static]<System.Int32>Compare <System.String>strA <System.String>strB
  .[static]<System.Int32>Compare <System.String>strA <System.String>strB <System.Boolean>ignoreCase
  .[static]<System.Int32>Compare <System.String>strA <System.String>strB <System.StringComparison>comparisonType
  .[static]<System.Int32>Compare <System.String>strA <System.String>strB <System.Boolean>ignoreCase

<System.Globalization.CultureInfo>culture
  .[static]<System.Int32>Compare <System.String>strA <System.Int32>indexA <System.String>strB <System.Int32>indexB <System.Int32>length
  .[static]<System.Int32>Compare <System.String>strA <System.Int32>indexA <System.String>strB <System.Int32>indexB <System.Int32>length

<System.StringComparison>comparisonType
  .[static]<System.Int32>Compare <System.String>strA <System.Int32>indexA <System.String>strB <System.Int32>indexB <System.Int32>length

<System.Boolean>ignoreCase
  .[static]<System.Int32>Compare <System.String>strA <System.Int32>indexA <System.String>strB <System.Int32>indexB <System.Int32>length

<System.Boolean>ignoreCase <System.Globalization.CultureInfo>culture
  .[static]<System.Int32>CompareOrdinal <System.String>strA <System.String>strB
  .[static]<System.Int32>CompareOrdinal <System.String>strA <System.Int32>indexA <System.String>strB <System.Int32>indexB

<System.Int32>length
  .<System.Int32>CompareTo <System.Object>value
  .<System.Int32>CompareTo <System.String>strB
  .[static]<System.String>Concat <System.Object>arg0
  .[static]<System.String>Concat <System.String[]>values
  .[static]<System.String>Concat <System.Object[]>args
  .[static]<System.String>Concat <System.Object>arg0 <System.Object>arg1
  .[static]<System.String>Concat <System.String>str0 <System.String>str1
  .[static]<System.String>Concat <System.String>str0 <System.String>str1 <System.String>str2
  .[static]<System.String>Concat <System.Object>arg0 <System.Object>arg1 <System.Object>arg2
  .[static]<System.String>Concat <System.String>str0 <System.String>str1 <System.String>str2 <System.String>str3
  .[static]<System.String>Concat <System.Object>arg0 <System.Object>arg1 <System.Object>arg2 <System.Object>arg3
  .<System.Boolean>Contains <System.String>value
  .[static]<System.String>Copy <System.String>str
  .CopyTo <System.Int32>sourceIndex <System.Char[]>destination <System.Int32>destinationIndex <System.Int32>count
  .<System.Boolean>EndsWith <System.String>value
  .<System.Boolean>EndsWith <System.String>value <System.StringComparison>comparisonType
  .<System.Boolean>EndsWith <System.String>value <System.Boolean>ignoreCase <System.Globalization.CultureInfo>culture
  .<System.Boolean>Equals <System.Object>obj
  .<System.Boolean>Equals <System.String>value
  .[static]<System.Boolean>Equals <System.Object>objA <System.Object>objB
  .[static]<System.Boolean>Equals <System.String>a <System.String>b
  .<System.Boolean>Equals <System.String>value <System.StringComparison>comparisonType
  .[static]<System.Boolean>Equals <System.String>a <System.String>b <System.StringComparison>comparisonType
  .[static]<System.String>Format <System.String>format <System.Object[]>args
  .[static]<System.String>Format <System.String>format <System.Object>arg0
  .[static]<System.String>Format <System.IFormatProvider>provider <System.String>format <System.Object[]>args
  .[static]<System.String>Format <System.String>format <System.Object>arg0 <System.Object>arg1
  .[static]<System.String>Format <System.String>format <System.Object>arg0 <System.Object>arg1 <System.Object>arg2
  .<System.CharEnumerator>GetEnumerator()
  .<System.Int32>GetHashCode()
  .<System.Type>GetType()
  .<System.TypeCode>GetTypeCode()
  .<System.Int32>IndexOf <System.String>value
  .<System.Int32>IndexOf <System.Char>value
  .<System.Int32>IndexOf <System.Char>value <System.Int32>startIndex
  .<System.Int32>IndexOf <System.String>value <System.StringComparison>comparisonType
  .<System.Int32>IndexOf <System.String>value <System.Int32>startIndex
  .<System.Int32>IndexOf <System.Char>value <System.Int32>startIndex <System.Int32>count
  .<System.Int32>IndexOf <System.String>value <System.Int32>startIndex <System.Int32>count
  .<System.Int32>IndexOf <System.String>value <System.Int32>startIndex <System.StringComparison>comparisonType
  .<System.Int32>IndexOf <System.String>value <System.Int32>startIndex <System.Int32>count <System.StringComparison>comparisonType
  .<System.Int32>IndexOfAny <System.Char[]>anyOf
  .<System.Int32>IndexOfAny <System.Char[]>anyOf <System.Int32>startIndex
  .<System.Int32>IndexOfAny <System.Char[]>anyOf <System.Int32>startIndex <System.Int32>count
  .<System.String>Insert <System.Int32>startIndex <System.String>value
  .[static]<System.String>Intern <System.String>str
  .[static]<System.String>IsInterned <System.String>str
  .<System.Boolean>IsNormalized()
  .<System.Boolean>IsNormalized <System.Text.NormalizationForm>normalizationForm
  .[static]<System.Boolean>IsNullOrEmpty <System.String>value
  .[static]<System.String>Join <System.String>separator <System.String[]>value
  .[static]<System.String>Join <System.String>separator <System.String[]>value <System.Int32>startIndex <System.Int32>count
  .<System.Int32>LastIndexOf <System.String>value
  .<System.Int32>LastIndexOf <System.Char>value
  .<System.Int32>LastIndexOf <System.String>value <System.StringComparison>comparisonType
  .<System.Int32>LastIndexOf <System.Char>value <System.Int32>startIndex
  .<System.Int32>LastIndexOf <System.String>value <System.Int32>startIndex
  .<System.Int32>LastIndexOf <System.Char>value <System.Int32>startIndex <System.Int32>count
  .<System.Int32>LastIndexOf <System.String>value <System.Int32>startIndex <System.StringComparison>comparisonType
  .<System.Int32>LastIndexOf <System.String>value <System.Int32>startIndex <System.Int32>count
  .<System.Int32>LastIndexOf <System.String>value <System.Int32>startIndex <System.Int32>count <System.StringComparison>comparisonType
  .<System.Int32>LastIndexOfAny <System.Char[]>anyOf
  .<System.Int32>LastIndexOfAny <System.Char[]>anyOf <System.Int32>startIndex
  .<System.Int32>LastIndexOfAny <System.Char[]>anyOf <System.Int32>startIndex <System.Int32>count
  .<System.String>Normalize()
  .<System.String>Normalize <System.Text.NormalizationForm>normalizationForm
  .<System.String>PadLeft <System.Int32>totalWidth
  .<System.String>PadLeft <System.Int32>totalWidth <System.Char>paddingChar
  .<System.String>PadRight <System.Int32>totalWidth
  .<System.String>PadRight <System.Int32>totalWidth <System.Char>paddingChar
  .[static]<System.Boolean>ReferenceEquals <System.Object>objA <System.Object>objB
  .<System.String>Remove <System.Int32>startIndex
  .<System.String>Remove <System.Int32>startIndex <System.Int32>count
  .<System.String>Replace <System.Char>oldChar <System.Char>newChar
  .<System.String>Replace <System.String>oldValue <System.String>newValue
  .<System.String[]>Split <System.Char[]>separator
  .<System.String[]>Split <System.String[]>separator <System.StringSplitOptions>options
  .<System.String[]>Split <System.Char[]>separator <System.Int32>count
  .<System.String[]>Split <System.Char[]>separator <System.StringSplitOptions>options
  .<System.String[]>Split <System.Char[]>separator <System.Int32>count <System.StringSplitOptions>options
  .<System.String[]>Split <System.String[]>separator <System.Int32>count <System.StringSplitOptions>options
  .<System.Boolean>StartsWith <System.String>value
  .<System.Boolean>StartsWith <System.String>value <System.StringComparison>comparisonType
  .<System.Boolean>StartsWith <System.String>value <System.Boolean>ignoreCase <System.Globalization.CultureInfo>culture
  .<System.String>Substring <System.Int32>startIndex
  .<System.String>Substring <System.Int32>startIndex <System.Int32>length
  .<System.Char[]>ToCharArray()
  .<System.Char[]>ToCharArray <System.Int32>startIndex <System.Int32>length
  .<System.String>ToLower()
  .<System.String>ToLower <System.Globalization.CultureInfo>culture
  .<System.String>ToLowerInvariant()
  .<System.String>ToString()
  .<System.String>ToString <System.IFormatProvider>provider
  .<System.String>ToUpper()
  .<System.String>ToUpper <System.Globalization.CultureInfo>culture
  .<System.String>ToUpperInvariant()
  .<System.String>Trim()
  .<System.String>Trim <System.Char[]>trimChars
  .<System.String>TrimEnd <System.Char[]>trimChars
  .<System.String>TrimStart <System.Char[]>trimChars



はい、System.Stringの全メソッドが列挙されました。

 

次は、S で始まるメソッドのみを列挙させてみます



 o1 = dotNetObject "System.String" "hello,world!" -- System.String オブジェクトの生成
 showMethods o1 "s*" -- リスナーに結果を列挙


  .<System.String[]>Split <System.Char[]>separator
  .<System.String[]>Split <System.String[]>separator <System.StringSplitOptions>options
  .<System.String[]>Split <System.Char[]>separator <System.Int32>count
  .<System.String[]>Split <System.Char[]>separator <System.StringSplitOptions>options
  .<System.String[]>Split <System.Char[]>separator <System.Int32>count <System.StringSplitOptions>options
  .<System.String[]>Split <System.String[]>separator <System.Int32>count <System.StringSplitOptions>options
  .<System.Boolean>StartsWith <System.String>value
  .<System.Boolean>StartsWith <System.String>value <System.StringComparison>comparisonType
  .<System.Boolean>StartsWith <System.String>value <System.Boolean>ignoreCase <System.Globalization.CultureInfo>culture
  .<System.String>Substring <System.Int32>startIndex
  .<System.String>Substring <System.Int32>startIndex <System.Int32>length


.NET のオブジェクトを作成するのは非常に簡単ですね。

dotNetObject のメソッドには以下のものが用意されています

  • getProperty
  • setProperty
  • getPropNames
  • shoProperties
  • showMethods
  • showEvents


メソッド名を見ればどういう動作をするのかわかりますね。

クラスのインスタンス方法がわかったので、次はロールアウトに.NETコントロールを配置してみたいと思います。

つづく...

投稿日時 : 2007年8月10日 16:09

コメントを追加

#  3ds max ??? .NET ?????????????????????????????? 2010/04/19 2:30 Pingback/TrackBack

3ds max ??? .NET ??????????????????????????????

# yIaPGTIXfWhEVYCHj 2011/12/13 17:30 http://www.birthcontrolremedy.com/birth-control/ya

The material is on the five plus. But there is a minus! My internet speed 56kb/sek. The page was loading for about 40 seconds!...

# WxehJcbFJVwDy 2011/12/13 20:47 http://www.drinkershealth.net/naltrexone-revia/

Strange but true. Your resource is expensive. At least it could be sold for good money on its auction!...

# oaljEyynYSBUr 2011/12/22 21:38 http://www.discreetpharmacist.com/

48Jq5E Yeah, it is clear now !... From the very beginning I did not understand where was the connection with the title !!...

# xFTMguCQJeKZwAfNIZH 2021/07/03 5:02 https://www.blogger.com/profile/060647091882378654

Thankyou for helping out, excellent info.

# Illikebuisse zxkat 2021/07/04 15:10 www.pharmaceptica.com

sildenafil over the counter united states https://pharmaceptica.com/

# erectile solutions that work at walmart 2021/07/07 3:22 hydroclorizine

hydroxocloroquine https://plaquenilx.com/# hydrochloroqine

# re: 3ds max ? .NET 2021/07/07 7:25 hydroxychloroquine sulfate tabs 200mg

chloronique https://chloroquineorigin.com/# plaquenil 200 mg twice a day

# re: 3ds max ? .NET 2021/07/13 7:56 can hydroxychloroquine cause blindness

malaria drug chloroquine https://chloroquineorigin.com/# hydroxychloroquine 200mg tablets

# re: 3ds max ? .NET 2021/07/24 2:35 side effect of hydroxychloroquine

chloroquine side effects https://chloroquineorigin.com/# hydrochloroquine

# tpynwbhemaph 2022/05/28 0:38 dyfuxnzx

https://erythromycinn.com/# erythromycin eye ointment for newborns

タイトル
名前
URL
コメント