Skip to content

dd homework - #3

Open
shankshannon wants to merge 1 commit into
TDChina:masterfrom
shankshannon:dd
Open

dd homework#3
shankshannon wants to merge 1 commit into
TDChina:masterfrom
shankshannon:dd

Conversation

@shankshannon

Copy link
Copy Markdown

first Nuke Python script

@sol87 sol87 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我没有测试它的运行情况,但纯从代码质量上看非常棒,很工整。

Good job!

#创建gizimao
#创建一个group
#在group中创建3个text,设置text内容
#连接group的输入输出

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这些注释如果可以插入到代码里面,而不是集中地放在这里会更加友好。

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同意,注释不应该集中放在这里。

w['create_directories'].setValue('True')
nuke.execute('Write1',100,400,1)


Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多了一个空行

#创建一个group
#在group中创建3个text,设置text内容
#连接group的输入输出
g = nuke.createNode('Group')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

单字母的变量名不可取,尤其是这种全局的写法。我觉得你可以尝试把这个代码写成几个函数。

@sol87

sol87 commented Dec 19, 2018

Copy link
Copy Markdown

I just approved your work, please feel free to edit your code or merge the pull request directly.

w['meta_codec'].setValue('mp4v')
w['file'].setValue('D:/TDclass/pipeline/aaa/aaa.mov')
w['create_directories'].setValue('True')
nuke.execute('Write1',100,400,1)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

忘记把Write节点连到Gizmo上了

w['create_directories'].setValue('True')
nuke.execute('Write1',100,400,1)


Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议是用cmd参数(即sys.argv)读入原素材路径和mov目标路径,而不是写死在代码里,我们需要的是一个加水印转码工具,而不是一个一次性的脚本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants