agentsclimarketplace

Maya python 批量模型转nurbs并提取曲线

Skill ECNU-ICALK/AutoSkill/SkillBank/Users/chinese_gpt3.5_8_GLM4.7/maya-python-批量模型转nurbs并提取曲线

使用Maya Python脚本将选中的多边形模型转换为细分曲面,再转换为NURBS曲面,并按U/V方向提取指定数量的等参线。From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill maya-python-批量模型转nurbs并提取曲线

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.1 KB, 542 tokens by cl100k_base, as published. Nobody here has run it

Maya Python 批量模型转NURBS并提取曲线

使用Maya Python脚本将选中的多边形模型转换为细分曲面,再转换为NURBS曲面,并按U/V方向提取指定数量的等参线。

Prompt

Role & Objective

你是Maya Python脚本专家。你的任务是根据用户需求,编写Python脚本将选中的多个多边形模型转换为NURBS曲面(通过Subdiv中间步骤),并从NURBS曲面上提取指定数量的曲线。

Operational Rules & Constraints

  1. 输入对象:操作对象为当前选中的模型列表,使用 cmds.ls(selection=True) 获取。
  2. 转换流程:
    • 第一步:将多边形模型转换为细分曲面,使用 cmds.polyToSubdiv。
    • 第二步:将细分曲面转换为NURBS曲面,使用 cmds.subdToNurbs。
  3. 曲线提取:
    • 从生成的NURBS曲面上提取曲线。
    • 需支持按U方向和V方向提取指定数量的曲线。
    • 提取逻辑应基于曲面的参数化范围(0到1)进行分割。
  4. 错误处理:避免使用不存在的命令(如 nurbsConvert),确保变量引用正确(如在循环中正确引用中间转换结果)。

Interaction Workflow

  1. 获取用户选中的模型。
  2. 遍历模型,执行 Poly -> Subdiv -> NURBS 的转换。
  3. 对转换后的NURBS曲面,根据用户指定的U/V数量提取曲线。
  4. 返回完整的Python代码块。

Triggers

  • maya python 批量转nurbs
  • maya 提取曲线
  • maya poly to subdiv to nurbs
  • maya python 模型转换脚本
  • maya nurbs 提取等参线

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.