![]() |
raistinkaneblesc.exe: Scenes/.bs mesh to Blender 2.8+ python - Printable Version +- Phoenix Garden (https://roysforum.com) +-- Forum: Community (https://roysforum.com/forum-103.html) +--- Forum: Raistin Kane - Research Center (https://roysforum.com/forum-158.html) +--- Thread: raistinkaneblesc.exe: Scenes/.bs mesh to Blender 2.8+ python (/thread-721.html) |
raistinkaneblesc.exe: Scenes/.bs mesh to Blender 2.8+ python - Richter Belmont - 07-24-2024 Hi folks. Remember my rkbosc.exe? It was converting body data from scenes/body.bs into script bs for my body/face selector mode. (this was before we get a better option built to VX) I told myself: "What if I modified so it convert to blender 2.8+ python script instead?" Worked out! Then: "What if I modified it so it convert all mesh data from any .bs file into blender 2.8 python script?" Yep, I present you rkblesc.exe! Maybe someone did make a plugin for importing TK17 stuff into blender 2.8+, but I'm not aware of it. I use blender 2.83 btw. Exe Usage: rkblesc.exe input output [extra] input: path/file of .bs scenes to convert. output: path/file to export blender script to. -z: Convert .bs Y-up to blender Z-up. -blr: Rename TK17 side to blender side. exemple: rkblesc.exe "body01.bs" "body01.py" -z -blr about -blr: For each object.name It will replace all "_L_" and "_R_" by "_". If start with "L_" or "R_" remove it. If end with "_L" or "_R" remove it. If end with ".L" or ".R" remove it. All of these also apply to lowercase l/r. Then if any of these operation have been made, add ".l" or ".r" at the end. exemple breast_L_joint = breast_joint.l L_breast_joint_L.L = breast_joint.l How to use rkblesc.exe? 1.Get yourself a scenes/.bs file. Array must be on a single line: Good Code: SPolygonGeometry.IndexArray Array_I32 [ 0, 1, 2, 3, 1, 0, 3, 4, 1 ]; Bad Code: SPolygonGeometry.IndexArray Array_I32 [ 0, 1, 2, 2.Convert your .bs to Blender python with rkblesk.exe command. 3.In blender, go to the Text Editor(Scripting) and open the created .py. 4.Edit the value of bsCollection(3rd line) if you want the object to be link to a specific collection(will be create if do not already exist) or left it blank if you want to link to the main collection("Scene Collection"). Exemple1: bsCollection = 'RKHair' All object will be link to "RKHair" collection. Exemple2: bsCollection = '' All object will be link to the main collection("Scene Collection") 5.Run script (the play shape button). 6.Enjoy. Note1. Material will use default value. (no texture) Note2. Mesh using "TriangleStrip" order (old mesh from default vanilla game) will have half of their face on the wrong side. (doing a simple "recalculate normal" should fix it) Note3. Hook5 bone_detector: rkblesc will convert them because they are mesh, but the python execution will fail since they do not have enough uv vertex. |