Tuesday 21 November 2023

Using Namespace in Blender

Blender is indeed very clever! 
For users familiar with Maya and MotionBuilder(MoBu), namespaces are an essential tool for naming conventions.
 In my recent search for information on namespaces, I discovered that others have encountered similar issues. 
However, the answers provided did not quite address what I was looking for.
For example:
https://blenderartists.org/t/apending-and-namespaces/1305794
https://blender.stackexchange.com/questions/279191/namespacing-imported-assets

After conducting two consecutive tests, I stumbled upon the solution. 
First, let's understand the purpose of namespaces. In my understanding and experience of using them, they allow for the reuse of the same naming and hierarchical structure in a scene without modifying the original names.


1. Blender allows direct naming using prefixes sperate by colons. However, Blender doesn't explicitly present this concept and usage. Its habitual approach to handling duplicate names is to use a "dot" followed by a "three-digit serial number." 

2. As long as the group name of the skin model matches the namespace, when exporting the skin mesh using FBX, Blender automatically removes the name before the colon. Isn't that clever! 

3. However, if you export only the animations in FBX, it will still include the namespace. Nevertheless, this doesn't affect importing the animations into Unreal Engine, so it's perfectly fine! Note: When importing into MoBu, the namespace will still be present, possibly due to version differences in reading exported FBX files. 

I'm new to Blender, so feel free to leave comments if I make any mistakes.

Blend真的是很聰明! 對於maya跟motion builder的使用者來說 namesapce是個很重要用來規範命名的工具 這幾天在查找namesapce的相關資訊 發現有人有跟我一樣的問題 但是回答的都不算是我想找的解答 
像是:
https://blenderartists.org/t/apending-and-namespaces/1305794
https://blender.stackexchange.com/questions/279191/namespacing-imported-assets

連續兩測試後,誤打誤撞的發現解答 先理解一下ns的用途,在我的理解及使用的經驗中,它是為了能使用同樣的命名及層級結構,能在同一場景中重覆使用,但又不需改動原始名稱。 


1. blender是可以直接用前綴名加上冒號命名,只是在blender裡,並沒有特別提出這樣的概念與用法。它對於重覆名稱的慣性處理方式是用"點"再加"三位數序號"。 
2. 只要skin的模型群組名稱與,ns一樣,在用FBX輸出Skin Mesh時,它會自動的把冒號前的名稱自動刪除,是不是很聰明!!! 
3. 然而若FBX只輸出動作,它還是會帶冒號前的ns,不過這不影響動作滙入到UE裡,所以是很OK的! 註: 但若滙到mobu裡,ns還是會在喲,可能是mobu在讀取輸出FBX的版本差異。

對於Blender我才剛起步,若有任何資訊上的錯誤,歡迎留言糾正我。