【问题标题】:how to store a maya nodes hierarchy into a python dictionary如何将maya节点层次结构存储到python字典中
【发布时间】:2018-02-02 23:31:41
【问题描述】:

Click here for view the example picture

我需要从 Maya 的大纲面板中以正确的顺序获取层次结构数据或将其存储到字典中,我该如何存档? ,我在 Autodesk Maya 中工作,只能存储到 dict 中以进一步用作 .json 文件。

【问题讨论】:

    标签: python python-2.7 dictionary maya autodesk


    【解决方案1】:

    看看我对这个问题的回答: How to store and then retrive parent-child dependency data (Maya MEL/Python script)

    基本上,那里有一个递归函数,它从顶部节点开始,遍历层次结构,将所有内容存储到一个字典中。

    一旦你有了那个dict,应该很容易吐出一个json文件。

    还有一些代码用于重新设置所有内容。

    希望有帮助!

    【讨论】:

    • 你是男人! muchas gracias buen hombre :) 你应该喝一杯啤酒,再喝十杯
    • 很高兴我能帮上忙!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-04-26
    相关资源
    最近更新 更多