Blend Load
App: apps/blend_load/
Loads Models/Cube.blend, instantiates the Cube collection (with a draggable cube) and optionally GameCamera and Light from the blend file. Uses an FPS camera and raycast to drag the cube with the mouse.
Run from root
Section titled “Run from root”% ./plume3d blend_loador
Run from app directory
Section titled “Run from app directory”% ./../plume3d .What it does
Section titled “What it does”- Creates a scene and loads the default shader.
- Loads the blend with
Resource.loadBlend("Models/Cube.blend"), logsnodeCount,nodeName(i),nodeId(i). - Instantiates Cube: gets the node with
nodeId "model"and passes it to aCubescript that handles raycast-drag rotation. - Camera — Either instantiates
GameCamerafrom the blend and builds an FPSCamera from it, or creates a camera in code (configurable viaUSE_BLEND_ASSETS). - Light — Either instantiates
Lightfrom the blend or creates a point light at (4, 4, 4) in code. - Left-click + drag on the cube rotates it; right-click + drag to look; WASD / Space / Ctrl to move.
- Resource —
loadBlend. - BlendResult —
instantiate(className, scene),nodeCount,nodeName,nodeId,nodeson the instantiated root. - Scene —
new,addNode,addLight,addCamera,findCameraByTag,findLightByTag,draw. - Raycast —
fromCamerafor mouse picking. - Graphics —
loadShader,useShader,setViewMatrix,setProjectionMatrix,setViewProjectionEnabled. - Input, Window.
If blend classes are empty
Section titled “If blend classes are empty”The engine reads class data from ID custom properties in the saved .blend file. The Plume3D addon writes that on File → Save.
- Save after configuring — In Blender, set Class Name, Script Path, Node Id, etc., then save (Ctrl+S).
- Enable Wren Script Config — For each object/collection that should be a class, the “Enable Wren Script Config” checkbox must be checked.
- Debug — Run with
PLUME3D_BLEND_DUMP=blend_parse.txt ./plume3d ...and inspectblend_parse.txtto see what the loader sees (e.g.classNameper node).