{"id":37709741,"url":"https://github.com/cpcgskill/cpref","last_synced_at":"2026-01-16T13:17:16.622Z","repository":{"id":57428987,"uuid":"437178588","full_name":"cpcgskill/cpref","owner":"cpcgskill","description":"Maya 对象引用库","archived":false,"fork":false,"pushed_at":"2022-03-16T22:01:02.000Z","size":22,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-09T15:53:09.504Z","etag":null,"topics":["maya","maya-api","maya-python","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cpcgskill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-11T03:33:37.000Z","updated_at":"2022-09-28T16:17:38.000Z","dependencies_parsed_at":"2022-09-08T23:40:38.991Z","dependency_job_id":null,"html_url":"https://github.com/cpcgskill/cpref","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cpcgskill/cpref","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpcgskill%2Fcpref","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpcgskill%2Fcpref/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpcgskill%2Fcpref/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpcgskill%2Fcpref/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cpcgskill","download_url":"https://codeload.github.com/cpcgskill/cpref/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpcgskill%2Fcpref/sbom","scorecard":{"id":306544,"data":{"date":"2025-08-11","repo":{"name":"github.com/cpcgskill/cpref","commit":"a813d4c0ad938ccd69d362229edeed2fef8007e7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/15 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-17T22:11:17.390Z","repository_id":57428987,"created_at":"2025-08-17T22:11:17.391Z","updated_at":"2025-08-17T22:11:17.391Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["maya","maya-api","maya-python","python"],"created_at":"2026-01-16T13:17:14.297Z","updated_at":"2026-01-16T13:17:16.615Z","avatar_url":"https://github.com/cpcgskill.png","language":"Python","readme":"# cpref\n\nMaya 对象引用库\n\n## 目录\n\n- [快速开始](#快速开始)\n- [功能介绍](#功能介绍)\n    - [Maya节点引用](#Maya节点引用)\n- [版权说明](#版权说明)\n\n### 快速开始\n\n#### 如果你的Maya有pip那么\n\n```commandline\ncd \"C:\\Program Files\\Autodesk\\Maya2022\\bin\"\nmayapy -m pip install cpref\n```\n\n#### 如果没有\n\n1. 打开C:\\Users\\PC\\Documents\\maya文件夹\n2. 进入scripts文件夹，如果没有就创建它\n3. 下载完整的cpref代码\n4. 解压并进入解压完成的文件夹\n5. 将src目录中的cpref文件夹复制到scripts\n6. 打开maya，如果已经打开了就重启它\n7. 打开脚本编辑器并执行以下示例代码\n\n```python\nimport maya.mel as mel\nfrom cpref.object_ref import Ref\n\nmel.eval(\"\"\"polySphere -r 1 -sx 20 -sy 20 -ax 0 1 0 -cuv 2 -ch 1 -n test_poly;\ndoGroup 0 1 1;\ndoGroup 0 1 1;\ndoGroup 0 1 1;\ndoGroup 0 1 1;\ndoGroup 0 1 1;\nsetKeyframe {\"group5\"};\"\"\")\nr = Ref(\"test_poly\")\nprint(\"Ref __init__ \u003e\u003e\", r)\nprint(\"Ref is_null \u003e\u003e\", r.is_null())\nprint(\"Ref as_string \u003e\u003e\", r.as_string())\nprint(\"Ref as_string_list \u003e\u003e\", r.as_string_list())\n```\n\n### 功能介绍\n\n#### Maya节点引用\n\nMaya节点引用功能提供了对Maya节点长期引用\n\n```python\nfrom __future__ import unicode_literals, print_function\n\n\ndef test():\n    import maya.mel as mel\n    from cpref.object_ref import Ref\n    mel.eval(\"\"\"polySphere -r 1 -sx 20 -sy 20 -ax 0 1 0 -cuv 2 -ch 1 -n test_poly;\ndoGroup 0 1 1;\ndoGroup 0 1 1;\ndoGroup 0 1 1;\ndoGroup 0 1 1;\ndoGroup 0 1 1;\nsetKeyframe {\"group5\"};\"\"\")\n    r = Ref(\"test_poly\")\n    print(\"Ref __init__ \u003e\u003e\", r)\n    print(\"Ref is_null \u003e\u003e\", r.is_null())\n    print(\"Ref as_string \u003e\u003e\", r.as_string())\n    print(\"Ref as_string_list \u003e\u003e\", r.as_string_list())\n\n    print(\"\")\n    print(\"\")\n\n    print(\"### test unsafe methods\")\n    print(\"Ref unsafe_m_selection_list \u003e\u003e\", r.unsafe_m_selection_list())\n    print(\"Ref unsafe_as_string_list \u003e\u003e\", r.unsafe_as_string_list())\n    print(\"Ref unsafe_m_dag_path \u003e\u003e\", r.unsafe_m_dag_path())\n    print(\"Ref unsafe_full_path_name \u003e\u003e\", r.unsafe_full_path_name())\n    print(\"Ref unsafe_partial_path_name \u003e\u003e\", r.unsafe_partial_path_name())\n\n    print(\"\")\n    print(\"\")\n\n    print(\"### test test_poly\")\n    r = Ref(\"test_poly\")\n    print(\"Ref format \u003e\u003e\", r)\n    print(\"Ref ref_type \u003e\u003e\", r.ref_type)\n\n    print(\"### test test_poly.vtx[*]\")\n    r = Ref(\"test_poly.vtx[*]\")\n    print(\"Ref format \u003e\u003e\", r)\n\n    print(\"### test test_poly.vtx[0]\")\n    r = Ref(\"test_poly.vtx[0]\")\n    print(\"Ref format \u003e\u003e\", r)\n\n    print(\"### test test_poly.tx\")\n    r = Ref(\"test_poly.tx\")\n    print(\"Ref format \u003e\u003e\", r)\n    print(\"Ref ref_type \u003e\u003e\", r.ref_type)\n\n    print(\"\")\n    print(\"\")\n\n    print(\"### test object null check\")\n    r = Ref(\"test_poly\")\n    mel.eval(\"file -f -new;\")\n    print(\"Ref is_null \u003e\u003e\", r.is_null())\n\n\ntest()\n```\n\n```\nRef __init__ \u003e\u003e DagNode\u003cu'test_poly'\u003e\nRef is_null \u003e\u003e False\nRef as_string \u003e\u003e test_poly\nRef as_string_list \u003e\u003e (u'test_poly',)\n\n\n### test unsafe methods\nRef unsafe_m_selection_list \u003e\u003e ('test_poly')\nRef unsafe_as_string_list \u003e\u003e (u'test_poly',)\nRef unsafe_m_dag_path \u003e\u003e test_poly\nRef unsafe_full_path_name \u003e\u003e |group5|group4|group3|group2|group1|test_poly\nRef unsafe_partial_path_name \u003e\u003e test_poly\n\n\n### test test_poly\nRef format \u003e\u003e DagNode\u003cu'test_poly'\u003e\nRef ref_type \u003e\u003e 1\n### test test_poly.vtx[*]\nRef format \u003e\u003e Component\u003cu'test_poly.vtx[0:381]'\u003e\n### test test_poly.vtx[0]\nRef format \u003e\u003e Component\u003cu'test_poly.vtx[0]'\u003e\n### test test_poly.tx\nRef format \u003e\u003e Plug\u003cu'test_poly.translateX'\u003e\nRef ref_type \u003e\u003e 0\n\n\n### test object null check\nRef is_null \u003e\u003e True\n```\n\n### 版权说明\n\n该项目签署了Apache-2.0 授权许可，详情请参阅 LICENSE","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpcgskill%2Fcpref","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcpcgskill%2Fcpref","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpcgskill%2Fcpref/lists"}