2016-12-17 5 views
1

messageのテキストノード全体に縮尺を強制する方法はありますか? Nuke 9.0v7または10のための方法があることがわかりますが、これは私にとっては利用できません。Python in Nuke 9

私はさらに、フォントを補強するためにラウンドアバウトの方法を強制しようとしましたが、まだこれを理解することはできません。

nuke.toNode("shot_" + str(c+1) + "_text")['message'].setValue("") 
nuke.toNode("shot_" + str(c+1) + "_text")['font_size'].setValue(33) 
nuke.toNode("shot_" + str(c+1) + "_text") ['baseline_shift'].setValue(-13) 
nuke.toNode("shot_" + str(c+1) + "_text")['message'].setValue((ntpath.basename(thumbnailShots[c+ contactSheetUp])[:-4])[:17]) 

このブログのコメントによく似ています。 (フォントは100のネイティブフォントで表示され、33のフォントサイズで表示されます)。

http://community.thefoundry.co.uk/discussion/topic.aspx?f=190&t=113652

答えて

0

これは間違いなくNUKE 10.5で動作します。

nuke.toNode('myNode')['global_font_scale'].setValue(5) 
:あなたは、このアプローチを使用する必要があります global_font_scale値を変更したい場合は

p = nuke.nodes.Text2(name="myNode") 
p['box'].setValue([0,0,2000,1500]) 
p['xjustify'].setValue("center") 
p['yjustify'].setValue("center") 
p['message'].setValue("NUKE [version]") 
p['font_size'].setValue(175) 
nuke.connectViewer(0, p) 

:この構文を使用してfont_size値を変更