- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我试图将在 Cheetah 3D 和 Blender 3D 中创建的动画加载到 Scene Kit 中,但我得到的只是一堆“无标题动画”,每个都是相同的动画。
有谁知道如何从 Blender 或 Cheetah 3D 中正确导出这些以便 Scene Kit 可以使用它们?
最佳答案
我深入研究了这个,因为它也让我很烦。所有“无标题动画”都是每个骨骼的单独动画。您可以从 xcode 右侧面板中的属性检查器中获取 id。像这样使用 swift,你可以得到你的动画。
let urlOfScene = Bundle.main.url(forResources: "your url", withExtension: "dae")
let source = SCNSceneSource(url: urlOfScene, options: nil)
let armature = source.entryWithIdentifier("Armature", withClass: SCNNode.self) as SCNNode
let animation = armature.entryWithIdentifier("your bone id", withClass: CAAnimation.self) as CAAnimation
必须对骨架中的所有 骨骼执行此操作。 **烦人!!!*
Apple 的所有示例项目都使用 3dmax,每个 collada 文件只显示一个动画。这是因为 3dmax 在一个动画下导出所有骨骼,而 blender 将每个骨骼分开。
临时工作使用 TextEdit 或在 .dae 文件的末尾附加一个 .xml 扩展名,然后使用 xml 编辑器打开它(网上有很多免费的)。 xml 编辑器更容易使用。向下滚动到动画开始 block 。看起来会像这样……
<library_animations>
<animation id= "first_bone">
<source id= "first_bone-input">
将其更改为...
<library_animations>
<animation> ---this is the only modified line
<source id="first_bone-input">
在每个动画的结尾都会有一个结束 block ,就像这样......
</animtion> ---delete this line as long as its not your last bone
<animation id="second_bone"> ---delete this line too
<source id="second_bone-input">
当然,在你最后一个骨骼的末尾,像这样离开动画结束 block ......
</animation>
</library_animations>
这将在您的 .dae 文件中为您提供一个动画,该动画与您的文件同名并在末尾附加 -1!
编辑 - 这是一个 Automator 服务的链接,它将为您转换上述代码!
Automater collada converter download
将文件解压并放到您的 ~/Library/services 文件夹中。从那里您可以右键单击您的 collada 文件并向下滚动到 ConvertToXcodeCollada 和 presto!完成后会弹出一个窗口(大约半秒)。
关于swift - 如何在不看到 "untitled-animations"的情况下导出 DAE 文件以在 Scene Kit 中使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24539607/
如何获取特定 UTF-8 字符串的字节序列?我看到正则表达式引擎中的某些错误仅在某些边缘情况下才会触发,我想确切地知道它正在处理哪些数据。 最佳答案 也许 charToRaw ? > charToRa
考虑一个具有许多变量的 java 程序,其中一些是循环计数器,我希望看到这些变量随时间变化的值,而不是在代码中到处放置 print 语句。 为什么?我认为它可以帮助我轻松调试。 Example- in
有没有办法查看 JavaScript 正在创建的“线程”?例如,如果我有一个附加到 DOM 元素的事件处理程序,我假设 JavaScript 会隐式地创建一个新线程来在后台运行该代码?如果是这样,有没
我正在使用反射 API 来调用类运行时并调用其方法。但我看到 java.lang.reflect.InitationTargetException 异常。 我需要调用一个名为 - TestClass
考虑一个名为 t.cmd 的命令脚本,它只包含以下两行: @exit /b 123 @echo If you see this, THEN EXIT FAILED.. 因此,该脚本只是将脚本执行过程的
我最近一直在努力学习编程语言实用学第 3 版,以了解更多关于语言在底层如何工作的信息,并且通过查看由真正基本的 GCC 编译的 C 代码生成的程序集,我获得了很多进展.我开始对 C 系列的静态语言越来
最简单的制作方法是什么QWebView识别并正确加载网页上的 Flash? 最佳答案 似乎只需两行即可实现(当然,假设目标系统上安装了闪存): QWebSettings *settings = QWe
我想通过编程(使用VBA)访问其他人与我共享的日历。它们在我的Outlook中的“人民日历”下列出。我在网上搜索了此内容,所有建议所做的仅使我感到困惑。如何从“人的日历”中获取共享给我的所有日历的
使用MongoDB Compass,可以看到数据库用户或创建新用户吗? 最佳答案 香港专业教育学院在命令行上使用以下命令进行管理: mongo use (my database name) db.cr
我正在CentOS 7.4.1708(核心),Java(TM)SE运行时环境(内部版本1.8.0_152-b16)上运行eXist-db 3.6.1。我希望能够在person.xml中的最后一个记录之
我需要确认。 客户端 1 在事务内的表中插入行。 客户端 2 使用 SELECT 请求该表。如果在此客户端上隔离级别设置为 READ COMMITTED,您能否确认 SELECT 不会返回客户端 1
我刚刚安装了 python-dev: $ sudo apt-get install python-dev 这样我就可以开始使用 P4Python 了。但是当我尝试导入 P4 时,我得到: Traceb
我正在使用 msys 和 mingw 编译 libtorrent-rasterbar-0.16.16。./configure 运行良好,直到它进入 boost 库检查。我有 boost 1.51,我设
我在 GO 项目的 Travis CI 上有一个奇怪的行为。 [这里] 失败了,提示一个函数只接受 1 个参数并用 2 个参数调用。 src/finances-service/main.go:45:1
这个问题已经有答案了: What are enums and why are they useful? (27 个回答) 已关闭 4 年前。 作为 Java 初学者,我接触到了枚举,这让我对类型声明感
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 11 年前。 Improve thi
我正在使用 preactjs 创建我的应用程序。最重要的是,我正在使用剑道网格。在网格内,我想显示一个超链接。如果用户点击链接,它应该改变路线。为了呈现链接,我使用了 preact-router。 这
有没有办法只查看 Node.js 中的函数签名?我知道 fn.toString() 但不需要所有代码,只需要签名。 最佳答案 var source = fn.toString(); var signa
如何设置 vim 以查看我在 ubuntu 上安装的 ruby rvm。 rvm 已安装,ruby 从终端返回。 renshaw@renshaw-TravelMate-5740G:~$ ruby
我试图在我的 Android 应用程序中防止 OutOfMemoryError。我已经阅读了很多帖子,但我仍然无法解决。 该应用程序有后台 Activity ,所以我认为这是主要问题。 OutOfMe
我是一名优秀的程序员,十分优秀!