Python
# -*- coding: utf-8 -*- import engine.cmds as cmds import engine.wpf as wpf class VFX: #ウィンドウ def makeWindow(self): self.win = wpf.createElement('Window') self.win.Width = 390 self.win.Height = 600 self.win.Title = 'VFX' self.win.Back…
# -*- coding: utf-8 -*- import engine.cmds as cmds import engine.wpf as wpf class GridTest: def makeGridSplitterColumn(self, parent, column, row, rowSpan = 1): gridSplitterColumn = wpf.createElement('GridSplitter', parent) gridSplitterColu…
import tkinter as tk#メインウィンドウを作成baseGround =tk.Tk()#ウィンドウのタイトルを設定baseGround.title('Python-tkinter : VFXマクロ')#画面のサイズ(横x縦)baseGround.geometry('800x600')#配置場所"""[place]buttonA =tk.Button( baseGround,text…
■変数 ●入れ物 x ='バナナ' print(x) ■型 バナナは文字列 2021は整数型
■コードが長くなったら print(100 +200 + \ 100 +5) ■コメント ●一行:#コメント ●二行: """ コメント 二行目コメント あいうえお """ ■インデント #半角スペースx4 orタブをつける def test (): print('あいうえお') print('かきくけこ')
#SyntaxError :文法間違い #NameError :定義し忘れ、スペルミス #AttributeError :オブジェクトが持っていない属性を使用しちゃった a =(1,2,3) a.append(4) #TypeError :誤ったデータ型どうしで起こるエラーとか?計算とか #ValueError :データ型はあってい…
import datetime today = datetime.date.today() datetime.datetime.now() datetime.datetime(2021, 6, 29, 0, 56, 53, 636589) today.month 6 today-datetime.timedelta(days=1) datetime.date(2021, 6, 27) today.strftime('%Y年%m月%d日') #stringfortime…
class Person: def __init__(self,name,nationality,age): self.name=name self.nationality= nationality self.age= age def __call__(self,name): print(f'{name}さん、こんにちわ。私は{self.name}です。call関数から呼び出されています。') def say_hell…
www.youtube.com
def say_hello(): print('皆さん、こんにちわ') say_hello() 皆さん、こんにちわ def say_hello2(name): print(f'{name}さん、こんにちわ') say_hello2(name='ランディー') ランディーさん、こんにちわ def calc_square(side): return side*side result=calc…
#break文(繰り返しを辞めたい場合) #continue文(スキップしたい場合) for i in range(10): if i==7: break print(i) 0 1 2 3 for i in range(10): if i==7: continue print(i) 0 1 2 3 4 5 6 7 8 9 コードテキスト
last_names =['五十嵐','五条','掛布','ランディー','岡田'] middle_names =['TT','ジョー','タイガー','龍','aka'] first_names =['たけし','悟','ひろし','バース','譲司'] for last_name,middle_name,first_name in zip(last_names,middle_names,first_na…
iはindex (英語はnとかでも大丈夫) names=['佐藤','井田','掛布','バース','岡田','阿部','武田'] #print(names[0]+'さん') #print(names[1]+'さん') #面倒くさい、、、 len(names) #namesの長さ 7 for i in range (len(names)): print(names[i]+'さん') 佐…
money = 3000 if money >= 8000: print('映画館へ行く') else: print('映画館には行かない') 映画館には行かない money = 1000 if money >= 8000: print('ディズニーへ行く') elif money >=2000: print('映画館に行きます') elif money ==1000: print('ちょ…
scores=[40,90,80,80,70] scores={'国語':40, '数学':90, '英語':80, '理科':80, '社会':70 } print(scores) scores['国語'] scores['家庭科'] =100 scores['体育'] =10 print(scores) scores.pop('体育') scores {'国語': 40, '数学': 90, '英語': 80, '理…
〇リスト ■ names=['おしるこ','グーグル','ブック','あなご'] print(names[1]) print(names[0]) print(names[-1]) print(names[0:3]) # 3(あなご)の一つ前から取得する print(names) print(names[:]) print(names[:2]) print(names[1:]) グーグル おしるこ …
〇比較演算子 ■10%3 #10割る3は余り1 1 ■3**3 #3の3乗 27 ■#変数 #大文字、小文字は区別される #数字、一部の記号は先頭の文字にできない#01moji#\moji #予約語は使用できない#and#True など既にPythonで使用されてる文字 #命名規則#my_name #famousu_city…
https://flytech.work/blog/16310/#i-2
# -*- coding: utf-8 -*- import engine.cmds as cmds path= 'systems/rendering/12_vosselaar_house_living.dds'; asset= cmds.findAsset( path ); go= cmds.createGameObject('IBL'); ibl= cmds.addComponent(go, 'IBL'); if asset!= None:ibl.IBLTextureR…
# -*- coding: utf-8 -*- import engine.cmds as cmds # create object hero = cmds.createGameObject('hero'); # set value (direct) hero.Name = 'herohero' #これは後述で上書きされる # set value (use method) hero.SetPropertyValue('Name', 'herohero…
# -*- coding: utf-8 -*- import engine.cmds as cmds # you can get creatable component name list # componentNames = cmds.getComponentNames(); # print component names cmds.printComponents();
# -*- coding: utf-8 -*- import engine.cmds as cmds # create game go = cmds.createGameObject('GameObject'); # add Component primitive = cmds.addComponent(go, "Primitive"); mesh = cmds.addComponent(go, "Mesh"); # remove Component cmds.delete…
# -*- coding: utf-8 -*- import engine.cmds as cmds # create game object parent = cmds.createGameObject( 'Parent' ) parent.Transform.LocalPosition = vec3(10, 20, 30) parent.Transform.LocalScale = vec3(1, 2, 3) # delete game object cmds.dele…
# -*- coding: utf-8 -*- import engine.cmds as cmds import engine.wpf as wpf texture = cmds.findAsset( 'assets:/systems/rendering/ColorCubeLinear.dds' ) behavior = cmds.findAsset( 'assets:/systems/script/Behavior.template.cs' ) print textur…
#-*- coding: utf-8 -*- import engine.cmds as cmds import engine.wpf as wpf from via import vec3 from via import Color # write your code here parent = cmds.createGameObject( 'Parent' ) parent.Transform.LocalPosition = vec3(10, 20, 30) paren…
qiita.com
# -*- coding: utf-8 -*- import engine.cmds as cmds obj = cmds.createGameObject('PrefabSample') path = 'Test/Section/VFX/名前' cmds.toPrefab(obj, path) -- ■Test/Section/VFX/名前 assets:/Test/Section/VFX/名前 ←でもOK ※フォルダは事前に作して…
# -*- coding: utf-8 -*- import engine.cmds as cmds parentGO = cmds.createGameObject('ParentObject') childGO = cmds.createGameObject('ChildObject', parentGO) -- ■createGameObjectコマンドの第二引数に親GameObjectを指定することで、その子Game…