@volter/editor 0.5.58 → 0.5.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/BUNDLED_NOTICES +6 -6
  2. package/dist/.vite/manifest.json +253 -279
  3. package/dist/assets/{AudioViewer-CEfg6soG.js → AudioViewer-C9JP7n49.js} +1 -1
  4. package/dist/assets/{EntityModelDocument-rBweka7M.js → EntityModelDocument-SFgsuX4_.js} +1 -1
  5. package/dist/assets/{EnvironmentAssetDocument-VgR_on1P.js → EnvironmentAssetDocument-DEqKuki2.js} +1 -1
  6. package/dist/assets/{GameplaySessionTimeline-B9v8LIxV.js → GameplaySessionTimeline-BtEPIu2F.js} +1 -1
  7. package/dist/assets/{ImageViewer-CvnifCXj.js → ImageViewer-CyIXlQTG.js} +1 -1
  8. package/dist/assets/{InspectorObjectPreview-gbDaFcDe.js → InspectorObjectPreview-MDmTPFBT.js} +1 -1
  9. package/dist/assets/{JsonAssetDocument-B-ze7id8.js → JsonAssetDocument-Zyv_CDpC.js} +1 -1
  10. package/dist/assets/{ModelAssetDocument-NDTeB7b_.js → ModelAssetDocument-BKdnWaJL.js} +1 -1
  11. package/dist/assets/{NonThreeAuthoringBootstrap-D1oTrvVk.js → NonThreeAuthoringBootstrap-ab96Xbnn.js} +2 -2
  12. package/dist/assets/{Object3DPreview-DvXwCq08.js → Object3DPreview-ChopdNF4.js} +2 -2
  13. package/dist/assets/{OnlineAssetDetail-GdHcOske.js → OnlineAssetDetail-B_l8XkeE.js} +2 -2
  14. package/dist/assets/{SourceAssetViewer-C0qk5wJl.js → SourceAssetViewer-zpxF5DOe.js} +2 -2
  15. package/dist/assets/{StageHost-BU-t7Wwj.js → StageHost-B4P-uvV9.js} +4 -4
  16. package/dist/assets/{ToolObject3DPreview-CP6YmA70.js → ToolObject3DPreview-DGcT5dDK.js} +1 -1
  17. package/dist/assets/{TransientHint-Rw3wxMUO.js → TransientHint-9_u15mth.js} +1 -1
  18. package/dist/assets/{VideoViewer-D8aW7n4N.js → VideoViewer-3I_zUWEC.js} +1 -1
  19. package/dist/assets/{asset-editor-persistence-COlYs9e4.js → asset-editor-persistence-B6Yg7dTC.js} +1 -1
  20. package/dist/assets/{blender-emscripten-engine-BkrPLmPf.js → blender-emscripten-engine-BhbEQhcb.js} +1 -1
  21. package/dist/assets/{blender-node-editor.document-DtaO2jAu.js → blender-node-editor.document-DGn6U6Kf.js} +1 -1
  22. package/dist/assets/blender-properties-tab-DkE9ensL.js +3 -0
  23. package/dist/assets/blender-runtime-host-JKPuUKtZ.js +4 -0
  24. package/dist/assets/{blender-runtime-skin-CBll8ovN.js → blender-runtime-skin-BFLh4nHG.js} +1 -1
  25. package/dist/assets/{blender-runtime.document-CStrnPJb.js → blender-runtime.document-C60VEa1_.js} +3 -3
  26. package/dist/assets/{blender-timeline.document-WjHuKO96.js → blender-timeline.document-D9BOYb0q.js} +1 -1
  27. package/dist/assets/{blender-uv-editor.document-CsjAI-Lc.js → blender-uv-editor.document-BK2pP2sR.js} +1 -1
  28. package/dist/assets/{blender-version.status-BcaIEqih.js → blender-version.status-ZqfW0upF.js} +1 -1
  29. package/dist/assets/{blender-wali-engine-Dtwixi7B.js → blender-wali-engine-B0Q2w2Be.js} +1 -1
  30. package/dist/assets/blender.command-BLtAEuIZ.js +1 -0
  31. package/dist/assets/{browserAll-DAbE1efB.js → browserAll-DTuU4PmC.js} +1 -1
  32. package/dist/assets/{edit-mode-authoring-BBWCwYeE.js → edit-mode-authoring-DBEoND0w.js} +1 -1
  33. package/dist/assets/{hosted-asset-materialization-CvAt4P7_.js → hosted-asset-materialization-6HtWQ0od.js} +1 -1
  34. package/dist/assets/{index-CY4oDLhJ.js → index-DuB3wHKD.js} +331 -331
  35. package/dist/assets/{models.finder-CZNTvr_w.js → models.finder-Bs46IncP.js} +1 -1
  36. package/dist/assets/{product-Dr7coa2h.js → product-FSoI1WhZ.js} +1 -1
  37. package/dist/assets/properties-bone-constraints.inspector-QML_-0yQ.js +1 -0
  38. package/dist/assets/properties-bone.inspector-DSDyP6-P.js +1 -0
  39. package/dist/assets/properties-collection.inspector-jic5mzgz.js +1 -0
  40. package/dist/assets/properties-constraints.inspector-TLHv00p7.js +1 -0
  41. package/dist/assets/properties-data.inspector-BJBPl88V.js +1 -0
  42. package/dist/assets/properties-material.inspector-xxWuVjrx.js +1 -0
  43. package/dist/assets/properties-modifiers.inspector-CWjdmu_J.js +1 -0
  44. package/dist/assets/properties-object.inspector-D15l44Tq.js +1 -0
  45. package/dist/assets/properties-output.inspector-DVuGGSBb.js +1 -0
  46. package/dist/assets/properties-particles.inspector-B94x32Ez.js +1 -0
  47. package/dist/assets/properties-physics.inspector-9EYMjwFP.js +1 -0
  48. package/dist/assets/properties-render.inspector-8yA_8luD.js +1 -0
  49. package/dist/assets/properties-scene.inspector-WM7qZhJ4.js +1 -0
  50. package/dist/assets/properties-texture.inspector-Cno5lCIz.js +1 -0
  51. package/dist/assets/properties-view-layer.inspector--PX0c9h6.js +1 -0
  52. package/dist/assets/properties-world.inspector-C3EuydM_.js +1 -0
  53. package/dist/assets/{react-story-board-DBO76grK.js → react-story-board-d_OfX68Z.js} +1 -1
  54. package/dist/assets/{react-three-rapier.esm-Cj4NtDam.js → react-three-rapier.esm-Ch_Gf2qR.js} +1 -1
  55. package/dist/assets/{spark.module-BOFvGTtp.js → spark.module-B_-x7Z29.js} +1 -1
  56. package/dist/assets/{stage-keyboard-BsKOZggP.js → stage-keyboard-C9wzGFxu.js} +1 -1
  57. package/dist/assets/{stage-overlay-set-bQwh25SV.js → stage-overlay-set-D7J-N5eX.js} +1 -1
  58. package/dist/assets/{stage-presence-markers-CALnBqqb.js → stage-presence-markers-DvbNl1W4.js} +1 -1
  59. package/dist/assets/{story-capture-BLVE1Bck.js → story-capture-D0H-H2_b.js} +1 -1
  60. package/dist/assets/{story-pixi-preview-B1LxWTHx.js → story-pixi-preview-Cafk1Xbk.js} +1 -1
  61. package/dist/assets/{story-three-preview-CsjJKTcf.js → story-three-preview-ByMTQc8w.js} +2 -2
  62. package/dist/assets/{webworkerAll-dq7Pw9V8.js → webworkerAll-CS1yjkoi.js} +1 -1
  63. package/dist/assets/worker-CBvBkaXr.js +2 -0
  64. package/dist/assets/{world-documents-PX5fRvVn.js → world-documents-CWiw361z.js} +1 -1
  65. package/dist-node/cli.js +13 -7
  66. package/package.json +7 -7
  67. package/dist/assets/blender-outliner-model-CfXIMSXz.js +0 -1
  68. package/dist/assets/blender-properties-tab-DYiaVS6T.js +0 -3
  69. package/dist/assets/blender-runtime-host-DGe1KLVZ.js +0 -4
  70. package/dist/assets/blender.command-B9Qf17Yr.js +0 -1
  71. package/dist/assets/properties-bone-constraints.inspector-DBAuXqr4.js +0 -1
  72. package/dist/assets/properties-bone.inspector-C_F8SxhT.js +0 -1
  73. package/dist/assets/properties-collection.inspector-C1DLm9eT.js +0 -1
  74. package/dist/assets/properties-constraints.inspector-BySUEgAb.js +0 -1
  75. package/dist/assets/properties-data.inspector-BOvrvedq.js +0 -1
  76. package/dist/assets/properties-material.inspector-CGJmh_QM.js +0 -1
  77. package/dist/assets/properties-modifiers.inspector-xnsQ1ddN.js +0 -1
  78. package/dist/assets/properties-object.inspector-BOEEbStu.js +0 -1
  79. package/dist/assets/properties-output.inspector-NXZnMx4l.js +0 -1
  80. package/dist/assets/properties-particles.inspector-D6D1g8l3.js +0 -1
  81. package/dist/assets/properties-physics.inspector-DoPfj0an.js +0 -1
  82. package/dist/assets/properties-render.inspector-Cvnkkapn.js +0 -1
  83. package/dist/assets/properties-scene.inspector-C2mQ8GLM.js +0 -1
  84. package/dist/assets/properties-texture.inspector-DvASuzXS.js +0 -1
  85. package/dist/assets/properties-view-layer.inspector-FIxWmUI0.js +0 -1
  86. package/dist/assets/properties-world.inspector-BfopwUSa.js +0 -1
  87. package/dist/assets/worker-29OHwCKe.js +0 -2
@@ -1,3 +0,0 @@
1
- import{a as i}from"./jsx-runtime-DPjLkJKQ.js";import{e as V}from"./index-CY4oDLhJ.js";import{a as H,b as X,x as le,y as oe,s as se,z as ce,p as ue}from"./blender-runtime-host-DGe1KLVZ.js";import{e as de}from"./blender-outliner-model-CfXIMSXz.js";import{r as g}from"./index-DaQZGF7d.js";const ae=e=>typeof e=="object"&&e!==null&&typeof e.subscribeFrames=="function"&&typeof e.blenderObjectName=="function",fe=e=>typeof e=="object"&&e!==null&&typeof e.documentId=="string"&&typeof e.hierarchy?.object3D=="function";function Y(){const e=V().documents.context(H());return ae(e)?e:null}function Z(e,t){if(e===null||!fe(t))return null;const n=Y();if(n===null)return null;if(e.id===t.documentId)return t.documentRootObject===n.root?{kind:"scene"}:null;const r=de().byId.get(e.id);if(r?.type==="TSE_LAYER_COLLECTION")return{kind:"collection",path:r.path};const l=t.hierarchy.object3D(e.id);if(l===null)return null;if(l===n.root)return{kind:"scene"};const o=n.blenderObjectName(l);return o===null?null:{kind:"object",name:o}}let N={object:null,collection:null,context:null,views:new Map,error:null,loading:!1},q=0;const F=new Set;let w=null;const I=new Set;let E=null;function b(e,t=!1){N={...N,...e},q+=1;for(const n of[...F])n();t&&V().documents.contextChanged(H())}function pe(e){return F.add(e),()=>{F.delete(e)}}function G(){return q}function M(){return N}function he(){const e=E;E=null,b({views:new Map}),e!==null&&J(e)}se(()=>{he()});let T=null;function J(e){T!==e&&(T=e,setTimeout(()=>{T===e&&(T=null,ge(e))},0))}function xe(e){return e.kind==="scene"?"":e.kind==="collection"?`collection:${e.path}`:e.name}function ye(){if(w!==null)return;const e=Y();e!==null&&(w=e.subscribeFrames(le))}async function ge(e){const t=e.startsWith("collection:")?e.slice(11):null,n=t===null&&e!==""?e:null;E=e,b({loading:!0,object:n,collection:t});try{const r=await oe(n??void 0,t??void 0);if(E!==e)return;b({context:r,loading:!1,error:null},!0)}catch(r){if(E!==e)return;b({context:null,loading:!1,error:D(r)},!0)}}function Q(e){if(!X())return;ye();const t=xe(e);E!==t&&J(t)}function R(e){const t=N.views.get(e);if(t!==void 0)return t;I.has(e)||!X()||(I.add(e),ce(e).then(n=>{if(I.delete(e),n===null)return;const r=new Map(N.views);r.set(e,n),b({views:r,error:null})}).catch(n=>{I.delete(e),b({error:D(n)})}))}async function be(e,t,n,r){try{await ue(e,t,n,r);const l=new Map(N.views);return l.delete(e),b({views:l,error:null}),!0}catch(l){return b({error:D(l)}),!1}}function D(e){return e instanceof Error?e.message:String(e)}const $=20,K=2,je="40%",me=25,U=20,m=8,ve=4,z=8,p=11,y=.5,x="#e6e6e6",Se="#3d3d3d",Ee="#ffffff11",Ae="rgba(0,0,0,0.12)",Ne="#545454",Re="#3d3d3d",$e="#4772b3",ee="#991616",Oe=8,Le=6,Ce=e=>Math.round(e*.2),te=e=>e.filter(t=>t.hidden!==!0&&t.undrawn!==!0);function C(){return g.useSyncExternalStore(pe,G,G)}function h({title:e,sub:t=!1,closed:n=!1,note:r,count:l,children:o}){const[c,u]=g.useState(!n);return i.jsxs("div",{style:{marginBottom:m,borderRadius:ve,boxShadow:t?"none":`inset 0 0 0 1px ${Ee}`,background:t?Ae:"transparent",overflow:"hidden"},children:[i.jsxs("button",{type:"button",onClick:()=>u(!c),style:{display:"flex",alignItems:"center",width:"100%",height:me,background:t?"transparent":Se,border:"none",padding:`0 ${z}px 0 ${t?U+14-20:0}px`,color:x,font:`${p}px inherit`,textAlign:"left",cursor:"pointer",gap:Le},children:[i.jsx("span",{"aria-hidden":"true",style:{width:U-8,textAlign:"center",fontSize:Oe,opacity:.85},children:c?"▼":"▶"}),i.jsx("span",{style:{fontWeight:400},title:r,children:e}),l===void 0?null:i.jsx("span",{style:{opacity:y,marginLeft:"auto"},children:l})]}),c?i.jsx("div",{style:{padding:m},children:o}):null]})}function A({label:e,title:t,readonly:n,identifier:r,children:l}){return i.jsxs("div",{"data-rna-field":r??"","data-field-label":e,"data-field-readonly":n?"true":void 0,style:{display:"flex",alignItems:"center",minHeight:$,marginBottom:K,gap:z,opacity:n?y:1},title:t,children:[i.jsx("span",{style:{flex:`0 0 ${je}`,textAlign:"right",color:x,fontSize:p,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),i.jsx("span",{style:{flex:"1 1 0",minWidth:0,display:"flex",gap:K},children:l})]})}const j={height:$,width:"100%",minWidth:0,boxSizing:"border-box",background:Ne,border:`1px solid ${Re}`,borderRadius:Ce($),color:x,fontSize:p,padding:`0 ${z}px`,textAlign:"center"};function v({children:e}){return i.jsx("span",{style:{...j,display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e})}const B=$-2*Math.floor(($-2)/6);function ne({value:e,readonly:t,label:n,onChange:r}){return i.jsx("input",{type:"checkbox",checked:e,readOnly:t,...n===void 0?{}:{"aria-label":n},onChange:l=>!t&&r(l.target.checked),style:{width:B,height:B,margin:`${($-B)/2}px 0`,accentColor:$e,cursor:t?"default":"pointer"}})}function ie({row:e,value:t,index:n,onWrite:r}){const[l,o]=g.useState(null),c=e.type==="FLOAT"?e.precision??3:0,u=l??(e.type==="FLOAT"?t.toFixed(c):String(t));return e.readonly?i.jsx(v,{children:u}):i.jsx("input",{type:"number","aria-label":O(e,n),value:u,...e.softMin===void 0?{}:{min:e.softMin},...e.softMax===void 0?{}:{max:e.softMax},...e.step===void 0?{}:{step:e.type==="FLOAT"?e.step/100:1},onChange:s=>o(s.target.value),onBlur:()=>{const s=Number(l);o(null),l!==null&&Number.isFinite(s)&&s!==t&&r(s,n)},onKeyDown:s=>{s.key==="Enter"&&s.target.blur(),s.key==="Escape"&&o(null)},style:j})}const k=["X","Y","Z","W"];function O(e,t){const n=e.name||e.identifier;return t===void 0?n:`${n} ${k[t]??t}`}function Ie(e){const t=n=>Math.max(0,Math.min(255,Math.round((e[n]??0)**.45454545454545453*255)));return`rgb(${t(0)}, ${t(1)}, ${t(2)})`}function Te({row:e,onOpen:t}){const n=e.value;if(n===null||n.path===null)return i.jsx(v,{children:n===null?"None":n.name??n.type});const r=n.path;return i.jsx("button",{type:"button","aria-label":O(e),onClick:()=>t(r),style:{...j,cursor:"pointer",textAlign:"left"},title:r,children:n.name??n.type})}function Pe({row:e,write:t}){const n=e.items??[];if(e.isFlag){const l=e.value??[];return i.jsx(v,{children:l.length===0?"None":l.join(", ")})}const r=String(e.value??"");return e.readonly?i.jsx(v,{children:n.find(l=>l.identifier===r)?.name??r}):i.jsx("select",{"aria-label":O(e),value:r,onChange:l=>t(l.target.value),style:{...j,textAlign:"left"},children:n.map(l=>i.jsx("option",{value:l.identifier,children:l.name},l.identifier))})}function ke({row:e,write:t}){const n=String(e.value??"");return e.readonly?i.jsx(v,{children:n}):i.jsx(De,{value:n,label:O(e),onWrite:r=>t(r)})}function Me({row:e}){const t=e.value??[];return i.jsx("span",{style:{...j,background:Ie(t),display:"block"},title:t.map(n=>n.toFixed(3)).join(", ")})}function Be({row:e,label:t,title:n,write:r}){const l=e.value??[];return i.jsx(i.Fragment,{children:l.map((o,c)=>i.jsx(A,{label:Fe(t,c,l.length),title:n,readonly:e.readonly,identifier:`${e.identifier}[${c}]`,children:e.type==="BOOLEAN"?i.jsx(ne,{value:o===!0,readonly:e.readonly,label:O(e,c),onChange:u=>r(u,c)}):i.jsx(ie,{row:e,value:Number(o),index:c,onWrite:(u,s)=>r(u,s)})},`${e.identifier}-${k[c]??c}`))})}function Fe(e,t,n){return n>k.length?t===0?e:`${e} ${t}`:`${t===0?`${e} `:""}${k[t]}`}function _e(e){const{row:t,write:n}=e;switch(t.type){case"POINTER":return i.jsx(Te,{...e});case"ENUM":return i.jsx(Pe,{...e});case"STRING":return i.jsx(ke,{...e});case"BOOLEAN":return i.jsx(ne,{value:t.value===!0,readonly:t.readonly,label:O(t),onChange:n});default:return i.jsx(ie,{row:t,value:Number(t.value??0),onWrite:r=>n(r)})}}function W({row:e,path:t,onOpen:n}){const r=(d,f)=>void be(t,e.identifier,d,f),l=e.name||e.identifier,o=`${e.identifier} — ${e.type}${e.subtype==="NONE"?"":`/${e.subtype}`}${e.readonly?" (read-only)":""}${e.description?`
2
- ${e.description}`:""}`,c={row:e,path:t,write:r,onOpen:n},u=e.valueOmitted??e.valueError;if(u!==void 0)return i.jsx(A,{label:l,title:o,readonly:!0,identifier:e.identifier,children:i.jsx(v,{children:u})});if(e.type==="COLLECTION")return i.jsx(ze,{label:l,title:o,value:e.value??{count:0},identifier:e.identifier,onOpen:()=>n(`${t}.${e.identifier}`)});const s=e.type==="INT"||e.type==="FLOAT";return e.arrayLength>0&&(s||e.type==="BOOLEAN")?s&&(e.subtype==="COLOR"||e.subtype==="COLOR_GAMMA")?i.jsx(A,{label:l,title:o,readonly:e.readonly,identifier:e.identifier,children:i.jsx(Me,{...c})}):i.jsx(Be,{...c,label:l,title:o}):i.jsx(A,{label:l,title:o,readonly:e.readonly,identifier:e.identifier,children:_e(c)})}function De({value:e,label:t,onWrite:n}){const[r,l]=g.useState(null);return i.jsx("input",{type:"text",...t===void 0?{}:{"aria-label":t},value:r??e,onChange:o=>l(o.target.value),onBlur:()=>{r!==null&&r!==e&&n(r),l(null)},onKeyDown:o=>{o.key==="Enter"&&o.target.blur(),o.key==="Escape"&&l(null)},style:{...j,textAlign:"left"}})}function ze({label:e,title:t,value:n,identifier:r,onOpen:l}){const[o,c]=g.useState(!1),u=n.names??[];return i.jsxs(i.Fragment,{children:[i.jsx(A,{label:e,title:t,readonly:!1,identifier:r,children:i.jsxs("button",{type:"button","aria-label":e,onClick:()=>u.length?c(!o):l(),style:{...j,cursor:"pointer",textAlign:"left"},children:[u.length?`${o?"▼":"▶"} `:"",n.count," ",n.count===1?"item":"items"]})}),o?u.map(s=>i.jsx(A,{label:"",readonly:!0,children:i.jsx(v,{children:s})},s)):null]})}const _=e=>typeof e=="string"?e:e.property;function We(e){if(e.active===void 0)return{path:null,index:null};const t=M().context?.[e.active];if(typeof t!="object"||t===null)return{path:null,index:null};const n=t;return{path:n.path??null,index:typeof n.index=="number"?n.index:null}}function we({panel:e,path:t,onOpen:n}){C();const r=R(t),l=We(e);return r===void 0?i.jsx(h,{title:e.title,closed:e.closed===!0,children:i.jsxs("div",{style:{color:x,opacity:y,fontSize:p},children:["Reading ",t,"…"]})}):r.kind!=="collection"?i.jsx(h,{title:e.title,closed:e.closed===!0,note:t,children:i.jsxs("div",{style:{color:ee,fontSize:p},children:[t," is not a collection — this panel is declared `collection: true`."]})}):i.jsxs(h,{title:e.title,closed:e.closed===!0,note:t,count:r.count,children:[r.items.length===0?i.jsx("div",{style:{color:x,opacity:y,fontSize:p},children:"None"}):null,r.items.map((o,c)=>i.jsx(h,{title:`${o.path!==null&&o.path===l.path||c===l.index?"● ":""}${o.name??o.type}`,sub:!0,children:o.path===null?i.jsxs("div",{style:{color:x,opacity:y,fontSize:p},children:[o.type," — RNA gives this member no address."]}):i.jsx(Ge,{path:o.path,properties:e.properties,andDeclared:e.andDeclared===!0,onOpen:n})},o.path??o.name??o.type))]})}function Ge({path:e,properties:t,andDeclared:n=!1,onOpen:r}){C();const l=R(e);if(l===void 0)return i.jsxs("div",{style:{color:x,opacity:y,fontSize:p},children:["Reading ",e,"…"]});const o=l.kind==="struct"?l.groups.flatMap(d=>d.rows):[],c=new Map(o.map(d=>[d.identifier,d])),u=t.map(d=>c.get(_(d))).filter(d=>d!==void 0),s=n&&l.kind==="struct"?te(o).filter(d=>d.group===l.type&&!t.some(f=>_(f)===d.identifier)):[];return i.jsx(i.Fragment,{children:[...u,...s].map(d=>i.jsx(W,{row:d,path:e,onOpen:r},d.identifier))})}function Ke(e,t){if(e.engine!==void 0){const n=M().context?.engine;if(n===void 0)return null;if(!e.engine.includes(n))return!1}for(const n of e.when??[]){const r=n.from??e.from,l=r?t.find(s=>s.label===r):t[0];if(l===void 0)return!1;const o=R(l.path);if(o===void 0)return null;if(o.kind!=="struct")return!1;const c=o.groups.flatMap(s=>s.rows).find(s=>s.identifier===n.property);if(c===void 0)return!1;const u=c.value;if(typeof u!="string"&&typeof u!="number"&&typeof u!="boolean"||n.is!==void 0&&!n.is.includes(u)||n.isNot!==void 0&&n.isNot.includes(u))return!1}return!0}function re({panel:e,paths:t,onOpen:n}){if(C(),Ke(e,t)!==!0)return null;const r=e.from?t.find(s=>s.label===e.from):t[0];if(r!==void 0&&e.collection===!0)return i.jsx(we,{panel:e,path:r.path,onOpen:n});if(r===void 0)return null;const l=R(r.path),o=e.sub??[],c=[],u=[];for(const s of e.properties){const d=_(s),f=typeof s=="string"?r:t.find(L=>L.label===s.from),a=f===void 0?void 0:R(f.path),S=a?.kind==="struct"?a.groups.flatMap(L=>L.rows).find(L=>L.identifier===d):void 0;S===void 0||f===void 0?u.push(d):c.push({identifier:d,row:S,path:f.path})}return l===void 0?i.jsx(h,{title:e.title,closed:e.closed===!0,children:i.jsxs("div",{style:{color:x,opacity:y,fontSize:p},children:["Reading ",r.path,"…"]})}):c.length===0&&o.length===0?null:i.jsxs(h,{title:e.title,closed:e.closed===!0,note:u.length===0?`${r.path}`:`${r.path}
3
- Not on this datablock: ${u.join(", ")}`,children:[c.map(s=>i.jsx(W,{row:s.row,path:s.path,onOpen:n},s.identifier)),o.map((s,d)=>i.jsx(re,{panel:s,paths:t,onOpen:n},`${d}:${s.title}`))]})}function P({path:e,onOpen:t}){C();const n=R(e);return n===void 0?i.jsxs("div",{style:{color:x,opacity:y,fontSize:p,padding:m},children:["Reading ",e,"…"]}):n.kind==="collection"?i.jsxs(i.Fragment,{children:[n.items.length===0?i.jsx("div",{style:{color:x,opacity:y,fontSize:p},children:n.count===0?"None":`${n.count} items`}):null,n.items.map(r=>i.jsx(h,{title:r.name??r.type,sub:!0,children:r.path===null?i.jsxs("div",{style:{color:x,opacity:y,fontSize:p},children:[r.type," — RNA gives this member no address."]}):i.jsx(P,{path:r.path,onOpen:t})},r.path??r.name??r.type))]}):i.jsx(i.Fragment,{children:n.groups.map(r=>{const l=te(r.rows);return l.length===0?null:i.jsx(h,{title:r.label,sub:!0,children:l.map(o=>i.jsx(W,{row:o,path:n.path,onOpen:t},o.identifier))},r.id)})})}function Ue({tabId:e,subject:t,curated:n=[]}){C(),g.useEffect(()=>Q(t),[t]);const[r,l]=g.useState([]),o=M(),c=o.context?.tabs.find(a=>a.id===e)??null,u=c?.paths??[],s=u.map(a=>a.path).join("|");if(g.useEffect(()=>l([]),[s]),o.error!==null)return i.jsx("div",{style:{color:ee,fontSize:p,padding:m},children:o.error});if(c===null)return i.jsx("div",{style:{color:x,opacity:y,fontSize:p,padding:m},children:o.loading?"Reading the engine…":"Blender shows no properties here."});const d=a=>l(S=>[...S,a]),f=r[r.length-1];return i.jsxs("div",{style:{padding:`${m}px 0`},children:[r.length>0?i.jsxs("button",{type:"button",onClick:()=>l(a=>a.slice(0,-1)),style:{...j,width:"auto",marginBottom:m,cursor:"pointer",textAlign:"left"},title:f,children:["← ",c.label]}):null,f!==void 0?i.jsx(h,{title:f.slice(f.lastIndexOf(".")+1),children:i.jsx(P,{path:f,onOpen:d})}):i.jsxs(i.Fragment,{children:[n.map((a,S)=>i.jsx(re,{panel:a,paths:u,onOpen:d},`${S}:${a.title}`)),n.length>0?i.jsx(h,{title:"All properties",closed:!0,children:u.map(a=>i.jsx(h,{title:a.label,sub:!0,children:i.jsx(P,{path:a.path,onOpen:d})},a.path))}):u.map(a=>i.jsx(h,{title:a.label,children:i.jsx(P,{path:a.path,onOpen:d})},a.path))]})]})}function qe(e){return(t,n)=>{const r=Z(t,n);if(r===null)return!1;if(Q(r),e.standing==="any")return!0;if(e.standing==="object")return r.kind==="object";const l=M(),o=r.kind==="object"?r.name:null,c=r.kind==="collection"?r.path:null;return l.object!==o||l.collection!==c?!1:l.context?.tabs.some(u=>u.id===e.id)??!1}}function Je(e){return function({node:n,adapter:r}){const l=Z(n,r);return l===null?null:i.jsx(Ue,{tabId:e.id,subject:l,curated:e.curated??[]})}}export{qe as a,Je as b,M as c,Z as r};
@@ -1,4 +0,0 @@
1
- import{bS as Ve,bT as We,e as _,ac as Ge,bU as ze}from"./index-CY4oDLhJ.js";import{d as He,W as ve,H as qe,br as Xe,i as Ze,bK as le,w as Ke,x as Ye,af as xe,V as te,bl as Je,$ as Qe,k as et,bL as tt,bf as ke}from"./three.module-BynznMJN.js";import{f as nt}from"./clip-planes-CnAI6DZn.js";class rt{#r;#s;#n=new Map;#y=0;#p=null;#i=new Map;#l=null;#u=0;#f=0;#w=0;#a=null;#g=null;#d=null;constructor(t){this.#s=t,this.#r=new Worker(new URL("/assets/worker-29OHwCKe.js",import.meta.url),{type:"module",name:"blender"}),this.#r.onmessage=n=>void this.#b(n.data),this.#r.onerror=n=>{const r=n.error,o=n.filename?` at ${n.filename}:${n.lineno}:${n.colno}`:"",a=r?.stack??r?.message??n.message,l=new Error(`Blender worker failed: ${a||"the worker script did not load"}${o}`);console.error(l.message);for(const s of[...this.#n.keys()])this.#h(s);for(const s of this.#n.values())s.reject(l);this.#n.clear()}}#o=null;#c=null;get project(){return this.#o}start(t,n){return this.#o!==null&&this.#o!==t?Promise.reject(new Error(`The Blender session is bound to ${this.#o}, not ${t}`)):n!==void 0&&this.#c!==null&&this.#c!==n?Promise.reject(new Error(`Blender resource conflict: the session holds ${this.#c}; cannot open ${n}`)):(this.#o=t,this.#c??=n??"models/model.blend",this.#p??=this.#e({op:"start",project:t,...n===void 0?{}:{document:n}}),this.#p)}#t(){return this.#o===null?Promise.reject(new Error("The Blender session has not been started with a project (blender-start)")):this.start(this.#o)}async execute(t,n=!0,r="Blender Python"){return await this.#t(),await this.#e({op:"execute",code:t,history:n,label:r})}async historyGesture(t){await this.#t(),await this.#e({op:t})}async historyStep(t,n){return await this.#t(),(await this.#e({op:"history-step",token:t,direction:n})).moved}async sceneInfo(){return await this.#t(),await this.#e({op:"scene-info"})}async objectInfo(t){return await this.#t(),await this.#e({op:"object-info",name:t})}async rna(t,n){return await this.#t(),await this.#e({op:"rna",path:t,...n===void 0?{}:{names:n}})}async rnaContext(t,n){return await this.#t(),await this.#e({op:"rna-context",...t===void 0?{}:{object:t},...n===void 0?{}:{collection:n}})}async rnaSet(t,n,r,o,a=!0){return await this.#t(),await this.#e({op:"rna-set",history:a,path:t,property:n,value:r,...o===void 0?{}:{index:o}})}async outliner(t){return await this.#t(),await this.#e({op:"outliner",...t===void 0?{}:{selected:t}})}async nodeTree(t){return await this.#t(),await this.#e({op:"node-tree",...t?.path===void 0?{}:{path:t.path},...t?.material===void 0?{}:{material:t.material}})}async uvLayout(t){return await this.#t(),await this.#e({op:"uv-layout",...t?.object===void 0?{}:{object:t.object},...t?.uvLayer===void 0?{}:{uvLayer:t.uvLayer}})}async rig(t){return await this.#t(),await this.#e({op:"rig",...t?.object===void 0?{}:{object:t.object}})}async actionClip(t){return await this.#t(),await this.#e({op:"action-clip",...t?.object===void 0?{}:{object:t.object},...t?.bake===void 0?{}:{bake:t.bake}})}async outlinerSet(t,n,r){return await this.#t(),await this.#e({op:"outliner-set",path:t,column:n,value:r})}async present(){await this.#t(),await this.#e({op:"present"})}async screenshotView(t){return await this.#t(),await this.#e({op:"screenshot-view",maxSize:t})}async readFile(t){return await this.#t(),await this.#e({op:"read-file",path:t})}async writeFile(t,n){await this.#t(),await this.#e({op:"write-file",path:t,bytes:n})}async listFiles(t){return await this.#t(),await this.#e({op:"list-files",path:t})}get presented(){return this.#g}terminate(){this.#r.terminate();const t=new Error("The Blender session was terminated");for(const n of[...this.#n.keys()])this.#h(n);for(const n of this.#n.values())n.reject(t);this.#n.clear()}metrics(t=performance.now()){let n=null,r=this.#u,o=this.#f,a=this.#w;for(const l of this.#i.values()){const s=t-l;(n===null||s>n)&&(n=s),s>r&&(r=s),s>=5e3&&(o+=1),s>=3e4&&(a+=1)}return{inFlightMs:n===null?null:Math.round(n),lastCallMs:this.#l===null?null:Math.round(this.#l),maxCallMs:this.#l===null&&n===null?null:Math.round(r),callsOver5s:o,callsOver30s:a,lastCallWindow:this.#a,wasmMemoryMB:this.#d===null?null:Math.round(this.#d/1048576)}}#h(t){const n=this.#i.get(t);if(n===void 0)return;this.#i.delete(t);const r=performance.now()-n;this.#l=r,r>this.#u&&(this.#u=r),r>=5e3&&(this.#f+=1),r>=3e4&&(this.#w+=1),this.#a!==null&&this.#a.start===n&&(this.#a={start:n,end:n+r})}#e(t){const n=++this.#y;return new Promise((r,o)=>{this.#n.set(n,{resolve:r,reject:o});const a=performance.now();this.#i.set(n,a),this.#a={start:a,end:null},this.#r.postMessage({...t,id:n})})}async#b(t){if("op"in t){if(t.op==="history"){this.#s.history?.(t.entries);return}if(t.op==="log"){this.#s.log?.(t.level,t.text);return}if(t.op==="memory"){this.#d=t.bytes;return}const r=t.frame;typeof r?.session=="string"&&typeof r.revision=="number"&&(this.#g={session:r.session,revision:r.revision});try{const o=await this.#s.present(t.frame,t.description,t.capture);this.#r.postMessage({op:"present-result",id:t.id,...o?.capture===void 0?{}:{capture:o.capture},...o!=null&&"held"in o?{held:o.held}:{}})}catch(o){this.#r.postMessage({op:"present-result",id:t.id,error:o instanceof Error?o.message:String(o)})}return}const n=this.#n.get(t.id);n&&(this.#n.delete(t.id),this.#h(t.id),"error"in t?n.reject(new Error(t.error)):n.resolve(t.result))}}const ot="/assets/agx-base-srgb-BjWZJgrZ.lut",at="/assets/agx-look-medium-high-contrast-D5F_ob1L.lut",st="/assets/agx-look-punchy-dxsnycNs.lut",it="/assets/filmic-srgb-Ct35FIH6.lut",A=new Float64Array(12),Ee=[0,0,0],F=new Float64Array(3),V=new Float64Array(3),B=new Int8Array([1,0,0,1,1,0,0,1,2,1,0,0,1,0,1,0,2,1,0,0,1,1,0,1,2,0,1,0,0,1,0,1,1,2,1,0,0,1,0,0,1,1,1,2,0,0,1,0,1,1,0,1,0,2]);function lt(e,t,n){return e>t?t>n?0:e>n?1:2:n>t?3:n>e?4:5}function je(e,t,n,r,o){const a=t*t,l=Math.min(1,Math.max(0,n))*(t-1),s=Math.min(1,Math.max(0,r))*(t-1),d=Math.min(1,Math.max(0,o))*(t-1),w=Math.min(Math.floor(l),t-2),i=Math.min(Math.floor(s),t-2),h=Math.min(Math.floor(d),t-2),k=l-w,g=s-i,c=d-h,b=(u,m,$,E)=>{const R=(w+m+(i+$)*t+(h+E)*a)*3;A[u]=e[R]/65535,A[u+1]=e[R+1]/65535,A[u+2]=e[R+2]/65535};b(0,0,0,0),b(9,1,1,1),F[0]=k,F[1]=g,F[2]=c;const p=lt(k,g,c)*9;b(3,B[p],B[p+1],B[p+2]),b(6,B[p+3],B[p+4],B[p+5]);const v=F[B[p+6]],y=F[B[p+7]],f=F[B[p+8]];for(let u=0;u<3;u++){const m=A[u];Ee[u]=m+v*(A[3+u]-m)+y*(A[6+u]-A[3+u])+f*(A[9+u]-A[6+u])}return Ee}function W(e){const t=e&32768?-1:1,n=e>>10&31,r=e&1023;return n===0?t*2**-24*r:n===31?r?Number.NaN:t*Number.POSITIVE_INFINITY:t*2**(n-15)*(1+r/1024)}function fe(e,t,n,r){const o=new Uint8ClampedArray(t*4);for(let a=0;a<t;a++){const l=a*4,s=W(e[l+3]),d=s===0?n:n/s;V[0]=W(e[l])*d,V[1]=W(e[l+1])*d,V[2]=W(e[l+2])*d;const w=r(V);o[l]=Math.round(w[0]*255),o[l+1]=Math.round(w[1]*255),o[l+2]=Math.round(w[2]*255),o[l+3]=Math.round(Math.min(1,Math.max(0,s))*255)}return o}function ct(e){return new URL(Object.assign({"./agx-base-srgb.lut":ot,"./agx-look-medium-high-contrast.lut":at,"./agx-look-punchy.lut":st,"./filmic-srgb.lut":it})[`./${e.replace(/\.lut$/,"")}.lut`],import.meta.url)}const ut=57,T=-12.47393,Te=12.5260688117,dt=[[.4123908,.3575843,.1804808],[.212639,.7151687,.0721923],[.0193308,.1191948,.9505322]],ht=[[1.5250528,-.3159135,-.1226583],[-.5091526,1.3333274,.1382844],[.0957153,.0508974,.7879558]];function Se(e,t,n){const r=t[0],o=t[1],a=t[2];n[0]=e[0][0]*r+e[0][1]*o+e[0][2]*a,n[1]=e[1][0]*r+e[1][1]*o+e[1][2]*a,n[2]=e[2][0]*r+e[2][1]*o+e[2][2]*a}const G=new Float64Array(3),Ce=new Float64Array(3),z=[0,0,0];function ne(e){const t=Math.min(1,Math.max(0,e));return t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055}function Le(e,t,n,r){return je(e,ut,t,n,r)}function pt(e,t){Se(dt,t,Ce),Se(ht,Ce,G);const n=Te-T,r=Le(e,(Math.log2(Math.max(G[0],1e-10))-T)/n,(Math.log2(Math.max(G[1],1e-10))-T)/n,(Math.log2(Math.max(G[2],1e-10))-T)/n);return z[0]=ne(Math.max(0,r[0])**2.4),z[1]=ne(Math.max(0,r[1])**2.4),z[2]=ne(Math.max(0,r[2])**2.4),z}const ft={"AgX - Medium High Contrast":"agx-look-medium-high-contrast.lut","AgX - Punchy":"agx-look-punchy.lut"};function wt(e,t){const n=Te-T;return Le(e,(Math.log2(Math.max(t[0],1e-10))-T)/n,(Math.log2(Math.max(t[1],1e-10))-T)/n,(Math.log2(Math.max(t[2],1e-10))-T)/n)}function gt(e,t,n,r={}){const o=r.exposure??1,a=r.composedLook===!0?wt:pt;return fe(t,n,o,l=>a(e,l))}const Ie=33,ce=Ie**3*3,ue=4096,re=-12.473931188,oe=25;function ae(e,t){const n=Math.min(1,Math.max(0,t))*(ue-1),r=Math.min(Math.floor(n),ue-2),o=n-r;return((1-o)*e[ce+r]+o*e[ce+r+1])/65535}const H=[0,0,0];function yt(e,t){const n=je(e,Ie,(Math.log2(Math.max(t[0],1e-10))-re)/oe,(Math.log2(Math.max(t[1],1e-10))-re)/oe,(Math.log2(Math.max(t[2],1e-10))-re)/oe);return H[0]=ae(e,n[0]/.66),H[1]=ae(e,n[1]/.66),H[2]=ae(e,n[2]/.66),H}function bt(e,t,n,r){if(e.length!==ce+ue)throw new Error("Invalid Blender Filmic display table");return fe(t,n,r,o=>yt(e,o))}const U=2.4,I=.055,Re=I/(U-1),mt=1/(U/(1+I)*((Re+I)/(1+I))**(U-1)),Mt=((Re+I)/(1+I))**U;function se(e){return e>0?e<Mt?e*mt:(1+I)*e**(1/U)-I:0}const q=[0,0,0];function vt(e){return q[0]=se(e[0]),q[1]=se(e[1]),q[2]=se(e[2]),q}function xt(e,t,n){return fe(e,t,n,vt)}function Fe(e,t,n,r){if(!Number.isFinite(n.width)||!Number.isFinite(n.height)||n.width<1||n.height<1)throw new Error("Scene capture requires finite positive dimensions");const o=Math.min(2048,Math.round(n.width)),a=Math.min(2048,Math.round(n.height)),l=r?1:2,s=o*l,d=a*l,w=Ve(),i=w.renderer,h={target:i.getRenderTarget(),toneMapping:i.toneMapping,exposure:i.toneMappingExposure,colorSpace:i.outputColorSpace,shadows:i.shadowMap.enabled,shadowType:i.shadowMap.type,clearColor:i.getClearColor(new He),clearAlpha:i.getClearAlpha(),background:e.background};let k,g,c=!1;try{if(k=new ve(s,d,{type:qe}),i.shadowMap.enabled=!0,i.shadowMap.type=Xe,i.outputColorSpace=Ze,i.toneMapping=n.toneMapping??le,i.toneMappingExposure=n.exposure??1,i.setClearColor(0,n.transparent?0:1),n.transparent&&(e.background=null),i.setRenderTarget(k),i.clear(),i.render(e,t),r){const E=new Uint16Array(s*d*4);return i.readRenderTargetPixels(k,0,0,s,d,E),c=!0,{pixels:E,width:o,height:a}}g=new ve(s,d),We(n.transparent===!0).render(i,g,k,0,!1);const b=new Uint8Array(s*d*4);i.readRenderTargetPixels(g,0,0,s,d,b);const p=document.createElement("canvas");p.width=s,p.height=d;const v=p.getContext("2d");if(!v)throw new Error("Scene capture could not create an image canvas");const y=v.createImageData(s,d),f=s*4;for(let E=0;E<d;E++)y.data.set(b.subarray((d-1-E)*f,(d-E)*f),E*f);v.putImageData(y,0,0);const u=document.createElement("canvas");u.width=o,u.height=a;const m=u.getContext("2d");if(!m)throw new Error("Scene capture could not create an output canvas");m.drawImage(p,0,0,o,a);const $=u.toDataURL("image/png");return c=!0,$}finally{e.background=h.background,i.setRenderTarget(h.target),i.toneMapping=h.toneMapping,i.toneMappingExposure=h.exposure,i.outputColorSpace=h.colorSpace,i.shadowMap.enabled=h.shadows,i.shadowMap.type=h.shadowType,i.setClearColor(h.clearColor,h.clearAlpha),g?.dispose(),k?.dispose(),w.release({discard:!c})}}function kt(e,t,n){return Fe(e,t,n,!0)}function Et(e,t,n){return Fe(e,t,n,!1)}const St={transform:{cx:0,cy:0,zoom:1},looked:null,refusal:null,size:{w:0,h:0},framedAt:0,drawn:[]};let de=St,we=0;const Z=new Set;let Ne=0;function ie(){return de}function Wt(){return we}function Gt(e){return Z.add(e),()=>{Z.delete(e)}}function O(e){de={...de,...e},we+=1;for(const t of[...Z])t()}function Ct(){Ne+=1,we+=1;for(const e of[...Z])e()}function zt(){return Ne}function N(e){O({refusal:e})}const Ae=new Map;function At(e){let t=Ae.get(e);return t||(t=fetch(ct(e)).then(async n=>{if(!n.ok)throw new Error(`Blender display table ${e}: ${n.status} ${n.statusText}`);return new Uint16Array(await n.arrayBuffer())}),Ae.set(e,t)),t}function Bt(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return new Uint16Array(n.buffer,n.byteOffset,n.byteLength>>1)}async function Be(e,t){const n=t.look??"None",r=t.toneMapping==="filmic",o=t.toneMapping==="none";if(!o&&t.toneMapping!=="agx"&&!r)throw new Error("Blender's Khronos PBR Neutral view transform has no scene-linear implementation in the browser, so it cannot resolve a composited or scene-referred frame (implemented: Standard, AgX, Filmic)");const a=o?null:r?"filmic-srgb.lut":n==="None"?"agx-base-srgb.lut":ft[n];if(a===void 0)throw new Error(`Blender display transform has no table for look ${n}`);const l=a?await At(a):null,s=t.linearInput,d=s?{pixels:Bt(s.base64),width:s.width,height:s.height}:e;if(!d)throw new Error("Blender display transform requires a linear capture");const{pixels:w,width:i,height:h}=d,k=o?xt(w,i*h,t.exposure):r?bt(l,w,i*h,t.exposure):gt(l,w,i*h,{exposure:t.exposure,composedLook:n!=="None"}),g=document.createElement("canvas");g.width=i,g.height=h;const c=g.getContext("2d");if(!c)throw new Error("Blender display transform could not create its image canvas");const b=c.createImageData(i,h),p=i*4;for(let f=0;f<h;f++){const u=(h-1-f)*p;b.data.set(k.subarray(u,u+p),f*p)}c.putImageData(b,0,0);const v=g.toDataURL("image/png"),y={base64:v.slice(v.indexOf(",")+1),mimeType:"image/png"};if(t.linear===!0){const f=new Uint8Array(w.buffer,w.byteOffset,w.byteLength);let u="";for(let m=0;m<f.length;m+=32768)u+=String.fromCharCode(...f.subarray(m,m+32768));y.linearBase64=btoa(u),y.linearWidth=i,y.linearHeight=h}return y}const _t="document:blender:runtime";let K=null;function jt(e){K=e}function L(){return K?.documentId??_t}function Ht(){return L()}async function qt(e,t,n){jt({documentId:e,entryId:n,blend:t});const r=_();if(!r.session.open())return;const o=r.projectLocalState.projectRootPath();o!==null&&(await M().start(o,t),await M().present())}function j(){return S?.project!=null}let $e=0;const he=new Set;function Xt(){return $e}function Zt(e){return he.add(e),()=>{he.delete(e)}}function Y(){$e+=1;for(const e of[...he])e()}async function Kt(e,t){return j()?M().rna(e,t):null}async function Yt(e,t){return j()?M().rnaContext(e,t):null}async function Tt(e,t,n,r,o=!0){if(!j())return null;const a=await M().rnaSet(e,t,n,r,o);return Y(),a}async function Lt(e,t=!0,n="Blender Python"){const r=await M().execute(e,t,n);Y();const o=/^Error executing code:/.exec(r);return{text:r,executed:o===null,result:o===null?r.replace(/^Code executed successfully: ?/,""):"",error:o===null?null:r.replace(/^Error executing code: ?/,"")}}function Jt(){M().historyGesture("history-begin").catch(e=>_().console.error(`Could not begin Blender undo gesture: ${String(e)}`,"blender-history"))}async function Qt(){await M().historyGesture("history-end")}async function en(e){return j()?M().outliner(e):null}async function tn(e){return j()?M().nodeTree(e):null}async function nn(e){return j()?M().uvLayout(e):null}async function rn(e){return j()?M().rig(e):null}async function on(e){return j()?M().actionClip(e):null}async function It(e,t,n){if(!j())return null;const r=await M().outlinerSet(e,t,n);return Y(),r}const Rt={view:"blender-node-view",title:"Node Editor",verbs:[["state",void 0],["look",void 0],["view-all","Node Editor: Frame All"],["zoom",void 0],["pan",void 0],["move",void 0],["link",void 0],["set-value",void 0],["use-nodes",void 0],["collapse-panel",void 0]].map(([e,t])=>({id:e,...t?{title:t}:{},run:n=>Oe({...n,action:e})}))};function Oe(e){const t=typeof e.action=="string"?e.action:"state";switch(t){case"state":break;case"look":O({looked:typeof e.node=="string"?e.node:null,refusal:null});break;case"view-all":Ct(),O({refusal:null});break;case"zoom":{const n=typeof e.zoom=="number"?e.zoom:1;O({transform:{...ie().transform,zoom:n},refusal:null});break}case"pan":{const n=ie().transform;O({transform:{...n,cx:typeof e.cx=="number"?e.cx:n.cx,cy:typeof e.cy=="number"?e.cy:n.cy},refusal:null});break}case"move":N(`Moving "${String(e.node??"a node")}" writes Node.location — editing parity is not the program.`);break;case"link":N("Dragging between sockets would make a link — editing parity is not the program.");break;case"set-value":N(`Changing "${String(e.socket??"a socket")}" writes the socket's default_value — editing parity is not the program.`);break;case"use-nodes":N("Use Nodes writes Material.use_nodes — editing parity is not the program.");break;case"collapse-panel":N(`Collapsing "${String(e.panel??"a panel")}" writes the panel's is_collapsed — editing parity is not the program.`);break;default:N(`blender-node-view: no action "${t}" — state, look, view-all, zoom, pan, and the refusals move, link, set-value, use-nodes, collapse-panel.`)}return ie()}let S=null;const X=new Set;function Ue(){X.size&&_().history.invalidate([...X]),X.clear()}let pe=null,_e=!1;function De(){Ue(),pe?.abort(),pe=null,S?.terminate(),S=null}function Ft(){_e||(_e=!0,_().session.onEnded(De))}const Nt=e=>typeof e=="object"&&e!==null&&typeof e.applyFrame=="function"&&typeof e.snapshot=="function"&&typeof e.captureSnapshot=="function"&&typeof e.recordPresentation=="function"&&typeof e.recordPhotograph=="function";async function $t(){const{documents:e}=_(),t=await e.waitForContext(L(),15e3);if(Nt(t))return t;throw new Error('The Blender Model document is not open, or the open one is not a Model this engine can present to (it must answer applyFrame, captureSnapshot, recordPresentation and recordPhotograph): present {kind: "document", id: "blender:runtime"} first (it ships with the editor; `vgai blender-mcp` presents it before its first call).')}function M(){if(S!==null)return S;Ft();const e=new AbortController;pe=e;let t=!1;S=new rt({history:r=>{const o=S;if(!o)throw new Error("Blender history arrived before its runtime");for(const a of r){if("reset"in a){Ue();continue}if(!a.resource)throw new Error("A Blender edit has no document resource");X.add(a.resource);const l=async s=>{if(S!==o)throw new Error("This Blender history belongs to a closed worker");const d=await o.historyStep(a.id,s);return Y(),d};_().history.record({id:a.id,label:a.label,resources:[a.resource],document:L(),undo:()=>l("undo"),redo:()=>l("redo")})}},present:async(r,o,a)=>{const l=L(),s=await $t();if(e.signal.throwIfAborted(),L()!==l)throw new Error("Blender document changed before its frame could be presented");const d=s.applyFrame(r),w=typeof d=="object"&&d!==null&&"held"in d,i=w?d.held:null,h=f=>({...f===void 0?{}:{capture:f},...w?{held:i}:{}});if(s.recordPresentation(o),!a||!a.render)return h(void 0);const k=s.snapshot(),g=()=>{if(e.signal.throwIfAborted(),L()!==l||s.snapshot()!==k)throw new Error("Blender capture document or source revision changed before completion")};if(a.render.linearInput){const f=await Be(null,a.render);return g(),h(f)}const{render:c,position:b,target:p,up:v}=a;if(!b||!p||!v)throw new Error("A Blender render capture must carry the scene camera position, target and up");if(t)throw new Error("A Blender render capture is already in progress");const y=s.captureSnapshot();t=!0,e.signal.addEventListener("abort",y.dispose,{once:!0});try{g();const f=new Ke;f.add(y.root),f.updateMatrixWorld(!0);const u=y.root.matrixWorld,m=new Ye().copy(u).invert(),$=new xe().setFromMatrix4(u),E=new xe().setFromMatrix4(m),R=new te(b[0],b[1],b[2]).applyMatrix4(u),ge=new te(p[0],p[1],p[2]).applyMatrix4(u),ye=new te(v[0],v[1],v[2]).applyMatrix3($),J=Math.min(2048,Math.round(c.width))/Math.min(2048,Math.round(c.height)),be=Ge(y.root).getBoundingSphere(new Je),D=nt(R.distanceTo(be.center),be.radius);let C;if(c.orthographic){const P=c.fov/2;C=new Qe(-P*J,P*J,P,-P,D.near,D.far)}else C=new et(c.fov,J,D.near,D.far);C.up.copy(ye),C.position.copy(R),C.lookAt(ge),C.updateMatrixWorld(!0);const Q={position:R.clone().applyMatrix4(m).toArray(),target:ge.clone().applyMatrix4(m).toArray(),up:ye.clone().applyMatrix3(E).toArray()};s.recordPhotograph({sent:{position:b,target:p,up:v},photographed:Q,render:{width:c.width,height:c.height,fov:c.fov,orthographic:c.orthographic}});const Pe={none:le,agx:ke,neutral:tt,filmic:le};await y.prepare(C),g();const me={width:c.width,height:c.height,transparent:c.transparent===!0,toneMapping:Pe[c.toneMapping]??ke,exposure:c.exposure},Me=c.toneMapping==="agx"||c.toneMapping==="filmic"||c.linear===!0?await Be(kt(f,C,me),c):null;if(g(),Me)return h({...Me,camera:Q});const ee=Et(f,C,me);if(!ee)throw new Error("Blender render could not capture its image");return h({base64:ee.slice(ee.indexOf(",")+1),mimeType:"image/png",camera:Q})}finally{t=!1,e.signal.removeEventListener("abort",y.dispose),y.dispose()}},log:(r,o)=>(r==="error"?console.error:console.log)(`[blender] ${o}`)});const n=S;return _().session.reportWorkerCallMeter(()=>n.metrics()),S}const Ot="models/model.blend",x=(e,t)=>{const n=e[t];if(typeof n!="string")throw new Error(`${String(e.type)} requires a string "${t}"`);return n};async function Ut(e){const t=_().projectLocalState.projectRootPath();if(t===null)return{};let n;try{n=await e.execute(`import bpy
2
- print(bpy.data.filepath)
3
- `,!1)}catch{return{}}if(/^Error executing code:/m.test(n))return{};const r=n.replace(/^Code executed successfully:/,"").split(`
4
- `).map(a=>a.trim()).filter(a=>a.startsWith("/")).pop()??"";if(r==="")return{};const o=t.endsWith("/")?t:`${t}/`;return r.startsWith(o)?{document:r.slice(o.length)}:{}}async function an(e){const t=_();if(e.type==="blender-status")return{ok:!0,data:{started:S?.project!=null,document:t.documents.context(L())!==void 0}};if(!t.session.open())return{ok:!1,error:`${e.type} needs an open project session; this editor page has none.`};try{const n=e.type==="blender-start"?x(e,"project"):null;if((e.type==="blender-stop"||e.type==="blender-start"&&e.fresh===!0)&&(De(),e.type==="blender-stop"))return{ok:!0,data:{stopped:!0}};if(e.type==="blender-start"&&!t.documents.context(L())&&!await t.workspace.open({kind:"document",id:"blender:runtime"}))return{ok:!1,error:"blender-start could not open the Blender Model document: nothing in this editor opens {kind: 'document', id: 'blender:runtime'} (it ships with @volter/editor-blender)."};const r=M();switch(e.type){case"blender-start":{const o=typeof e.document=="string"?e.document:K?.blend??Ot;return{ok:!0,data:{...await r.start(n,o)}}}case"blender-execute":return{ok:!0,data:{result:(await Lt(x(e,"code"))).text}};case"blender-scene-info":return{ok:!0,data:{result:await r.sceneInfo()}};case"blender-object-info":return{ok:!0,data:{result:await r.objectInfo(x(e,"name"))}};case"blender-rna":{const o=typeof e.names=="number"?e.names:void 0;return{ok:!0,data:{result:await r.rna(x(e,"path"),o)}}}case"blender-rna-context":{const o=typeof e.object=="string"?e.object:void 0,a=typeof e.collection=="string"?e.collection:void 0;return{ok:!0,data:{result:await r.rnaContext(o,a)}}}case"blender-rna-set":{const o=typeof e.index=="number"?e.index:void 0;return{ok:!0,data:{result:await Tt(x(e,"path"),x(e,"property"),e.value,o)}}}case"blender-outliner":{const o=Array.isArray(e.selected)?e.selected.filter(a=>typeof a=="string"):void 0;return{ok:!0,data:{result:await r.outliner(o)}}}case"blender-node-tree":return{ok:!0,data:{result:await r.nodeTree({...typeof e.path=="string"?{path:e.path}:{},...typeof e.material=="string"?{material:e.material}:{}})}};case"blender-uv-layout":return{ok:!0,data:{result:await r.uvLayout({...typeof e.object=="string"?{object:e.object}:{},...typeof e.uvLayer=="string"?{uvLayer:e.uvLayer}:{}})}};case"blender-rig":return{ok:!0,data:{result:await r.rig({...typeof e.object=="string"?{object:e.object}:{}})}};case"blender-action-clip":return{ok:!0,data:{result:await r.actionClip({...typeof e.object=="string"?{object:e.object}:{},...typeof e.bake=="boolean"?{bake:e.bake}:{}})}};case"blender-node-view":{const o=typeof e.action=="string"?e.action:"state";return{ok:!0,data:{result:Rt.verbs.some(l=>l.id===o)?ze("blender-node-view",o,e):Oe(e)}}}case"blender-outliner-set":return{ok:!0,data:{result:await It(x(e,"path"),x(e,"column"),e.value!==!1)}};case"blender-screenshot-view":{const o=typeof e.maxSize=="number"?e.maxSize:1e3,a={kind:"document",id:K?.entryId??"blender:runtime"};return{ok:!0,data:{...await r.screenshotView(o),document:a}}}case"blender-read-file":{const o=await r.readFile(x(e,"path")),a=x(e,"transferId"),l=await fetch(`/__editor/blender-file?id=${encodeURIComponent(a)}`,{method:"POST",headers:{"content-type":"application/octet-stream"},body:new Blob([o])});return l.ok?{ok:!0,data:{bytes:o.length}}:{ok:!1,error:`Transfer ${a} was refused: ${l.status}`}}case"blender-write-file":{const o=atob(x(e,"base64")),a=Uint8Array.from(o,l=>l.charCodeAt(0));return await r.writeFile(x(e,"path"),a),{ok:!0,data:{written:a.length}}}case"blender-list-files":{const o=await r.listFiles(x(e,"path")),a=r.presented;return{ok:!0,data:{entries:o,...a?{session:a.session,revision:a.revision}:{},...await Ut(r)}}}}return{ok:!1,error:`Unknown Blender command ${e.type}`}}catch(n){return{ok:!1,error:n instanceof Error?n.message:String(n)}}}export{Rt as N,Ht as a,j as b,It as c,en as d,Xt as e,Gt as f,O as g,an as h,ie as i,tn as j,zt as k,on as l,rn as m,Wt as n,nn as o,Tt as p,Qt as q,N as r,Zt as s,Jt as t,Lt as u,qt as v,jt as w,Y as x,Yt as y,Kt as z};
@@ -1 +0,0 @@
1
- import{h as l}from"./blender-runtime-host-DGe1KLVZ.js";import"./index-CY4oDLhJ.js";import"./index-DaQZGF7d.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D2LwEE0L.js";import"./client-DNXj_opT.js";import"./three.module-BynznMJN.js";import"./clip-planes-CnAI6DZn.js";const v="workspace.command",e=(o,n)=>({...n===void 0?{}:{timeoutMs:n},derivedRefresh:o,handle:r=>l(r)}),y={"blender-start":e("none",12e4),"blender-stop":e("none"),"blender-execute":e("always",30*6e4),"blender-scene-info":e("none",6e4),"blender-object-info":e("none",6e4),"blender-screenshot-view":e("always",6e4),"blender-read-file":e("none",6e4),"blender-write-file":e("none",6e4),"blender-list-files":e("none"),"blender-rna":e("none",6e4),"blender-rna-context":e("none",6e4),"blender-rna-set":e("always",6e4),"blender-outliner":e("none",6e4),"blender-node-tree":e("none",6e4),"blender-uv-layout":e("none",6e4),"blender-rig":e("none",6e4),"blender-action-clip":e("none",12e4),"blender-node-view":e("none"),"blender-outliner-set":e("always",6e4),"blender-status":e("none")};export{y as commands,v as point};
@@ -1 +0,0 @@
1
- import{b as o,a as r}from"./blender-properties-tab-DYiaVS6T.js";import{CONSTRAINT_HEADER as i}from"./properties-constraints.inspector-BySUEgAb.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CY4oDLhJ.js";import"./index-DaQZGF7d.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D2LwEE0L.js";import"./client-DNXj_opT.js";import"./three.module-BynznMJN.js";import"./blender-runtime-host-DGe1KLVZ.js";import"./clip-planes-CnAI6DZn.js";import"./blender-outliner-model-CfXIMSXz.js";const e=[{title:"Bone Constraints",from:"Constraints",collection:!0,properties:i,andDeclared:!0}],t={id:"bone_constraint",curated:e},D="selection.inspector",E="Bone Constraints",R="properties-bone-constraints",_=140,h="object",N=r(t),P=o(t);export{P as default,R as icon,N as match,_ as order,D as point,h as railGroup,E as title};
@@ -1 +0,0 @@
1
- import{b as o,a as t}from"./blender-properties-tab-DYiaVS6T.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CY4oDLhJ.js";import"./index-DaQZGF7d.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D2LwEE0L.js";import"./client-DNXj_opT.js";import"./three.module-BynznMJN.js";import"./blender-runtime-host-DGe1KLVZ.js";import"./clip-planes-CnAI6DZn.js";import"./blender-outliner-model-CfXIMSXz.js";const i=[{title:"Transform (Pose)",from:"Pose Bone",properties:["location","lock_location","rotation_quaternion","rotation_axis_angle","rotation_euler","lock_rotation_w","lock_rotation","rotation_mode","scale","lock_scale"]},{title:"Transform",from:"Bone",properties:["head","tail","roll","length","lock"]},{title:"Bendy Bones",closed:!0,from:"Bone",properties:["bbone_segments","bbone_x","bbone_z","bbone_mapping_mode","use_endroll_as_inroll","use_scale_easing","bbone_handle_type_start","bbone_handle_use_scale_start","bbone_handle_use_ease_start","bbone_handle_type_end","bbone_handle_use_scale_end","bbone_handle_use_ease_end"]},{title:"Relations",from:"Bone",properties:["parent","children","use_relative_parent","use_connect","use_local_location","use_inherit_rotation","inherit_scale"]},{title:"Bone Collections",closed:!0,from:"Bone",properties:["collections"]},{title:"Inverse Kinematics",closed:!0,from:"Pose Bone",properties:["ik_stretch","lock_ik_x","lock_ik_y","lock_ik_z","ik_stiffness_x","ik_stiffness_y","ik_stiffness_z","use_ik_limit_x","ik_min_x","ik_max_x","use_ik_limit_y","ik_min_y","ik_max_y","use_ik_limit_z","ik_min_z","ik_max_z","use_ik_rotation_control"]},{title:"Deform",closed:!0,from:"Bone",properties:["use_deform","envelope_distance","envelope_weight","use_envelope_multiply","head_radius","tail_radius"]},{title:"Viewport Display",closed:!0,from:"Bone",properties:["hide","hide_select","display_type","color","show_wire"],sub:[{title:"Custom Shape",closed:!0,from:"Pose Bone",properties:["custom_shape","custom_shape_translation","custom_shape_rotation_euler","custom_shape_scale_xyz","use_custom_shape_bone_size","custom_shape_transform"]}]}],e={id:"bone",curated:i},f="selection.inspector",B="Bone",y="properties-bone",x=130,z="object",g=t(e),P=o(e);export{P as default,y as icon,g as match,x as order,f as point,z as railGroup,B as title};
@@ -1 +0,0 @@
1
- import{b as e,a as i}from"./blender-properties-tab-DYiaVS6T.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CY4oDLhJ.js";import"./index-DaQZGF7d.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D2LwEE0L.js";import"./client-DNXj_opT.js";import"./three.module-BynznMJN.js";import"./blender-runtime-host-DGe1KLVZ.js";import"./clip-planes-CnAI6DZn.js";import"./blender-outliner-model-CfXIMSXz.js";const o=[{title:"Visibility",properties:["hide_select","hide_render"],sub:[{title:"View Layer",from:"View Layer Collection",properties:["exclude","holdout","indirect_only"]}]},{title:"Instancing",properties:["instance_offset"]},{title:"Line Art",properties:["lineart_usage","lineart_use_intersection_mask","lineart_intersection_mask","use_lineart_intersection_priority","lineart_intersection_priority"]},{title:"Exporters",properties:["exporters"]}],t={id:"collection",curated:o},h="selection.inspector",x="Collection",C="properties-collection",T=60,A="collection",L=i(t),V=e(t);export{V as default,C as icon,L as match,T as order,h as point,A as railGroup,x as title};
@@ -1 +0,0 @@
1
- import{b as o,a as r}from"./blender-properties-tab-DYiaVS6T.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CY4oDLhJ.js";import"./index-DaQZGF7d.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D2LwEE0L.js";import"./client-DNXj_opT.js";import"./three.module-BynznMJN.js";import"./blender-runtime-host-DGe1KLVZ.js";import"./clip-planes-CnAI6DZn.js";import"./blender-outliner-model-CfXIMSXz.js";const i=["name","type","enabled","mute","influence","error_location","error_rotation","is_valid","is_override_data"],e=[{title:"Constraints",from:"Constraints",collection:!0,active:"activeConstraint",properties:i,andDeclared:!0}],t={id:"constraint",curated:e},v="selection.inspector",A="Object Constraints",D="properties-constraints",E=110,R="object",h=r(t),j=o(t);export{i as CONSTRAINT_HEADER,j as default,D as icon,h as match,E as order,v as point,R as railGroup,A as title};
@@ -1 +0,0 @@
1
- import{b as a,r as p,a as l,c}from"./blender-properties-tab-DYiaVS6T.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CY4oDLhJ.js";import"./index-DaQZGF7d.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D2LwEE0L.js";import"./client-DNXj_opT.js";import"./three.module-BynznMJN.js";import"./blender-runtime-host-DGe1KLVZ.js";import"./clip-planes-CnAI6DZn.js";import"./blender-outliner-model-CfXIMSXz.js";const n=[{title:"Vertex Groups",from:"Vertex Groups",collection:!0,active:"activeVertexGroup",properties:["name","index","lock_weight"]},{title:"Shape Keys",from:"Shape Keys",properties:["key_blocks","use_relative","eval_time","reference_key"]},{title:"UV Maps",properties:["uv_layers"]},{title:"Color Attributes",properties:["color_attributes"]},{title:"Attributes",properties:["attributes"]},{title:"Texture Space",closed:!0,properties:["texture_mesh","use_auto_texspace","texspace_location","texspace_size"]},{title:"Remesh",closed:!0,properties:["remesh_mode","remesh_voxel_size","remesh_voxel_adaptivity","use_remesh_fix_poles","use_remesh_preserve_volume","use_remesh_preserve_attributes"]},{title:"Geometry Data",closed:!0,properties:["has_custom_normals","total_vert_sel","total_edge_sel","total_face_sel"]},{title:"Animation",closed:!0,properties:["animation_data"]},{title:"Pose",properties:["pose_position"]},{title:"Bone Collections",closed:!0,properties:["collections_all","collections"]},{title:"Bones",from:"Bones",collection:!0,active:"activeBone",properties:["name","parent","use_connect","use_deform","head","tail","length"]},{title:"Viewport Display",closed:!0,properties:["display_type","show_names","show_bone_custom_shapes","show_bone_colors","show_axes","axes_position","relation_line_position"]},{title:"Inverse Kinematics",closed:!0,properties:["pose"]}],o={id:"data",curated:n},B="selection.inspector",j="Object Data",u={Mesh:"properties-data-mesh",Armature:"properties-data-armature",Curve:"properties-data-curve",SurfaceCurve:"properties-data-surface",MetaBall:"properties-data-meta",TextCurve:"properties-data-font",Lattice:"properties-data-lattice",Camera:"properties-data-camera",Light:"properties-data-light",Speaker:"properties-data-speaker",PointCloud:"properties-data-pointcloud",Volume:"properties-data-volume"},w=(s,i)=>{const e=p(s,i);if(e===null||e.kind!=="object")return"properties-data";const r=c();if(r.object!==e.name)return"properties-data";const t=r.context?.active?.dataType;return t==null?"properties-data-empty":u[t]??"properties-data"},D=120,G="object",P=l(o),V=a(o);export{V as default,w as icon,P as match,D as order,B as point,G as railGroup,j as title};
@@ -1 +0,0 @@
1
- import{b as t,a as r}from"./blender-properties-tab-DYiaVS6T.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CY4oDLhJ.js";import"./index-DaQZGF7d.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D2LwEE0L.js";import"./client-DNXj_opT.js";import"./three.module-BynznMJN.js";import"./blender-runtime-host-DGe1KLVZ.js";import"./clip-planes-CnAI6DZn.js";import"./blender-outliner-model-CfXIMSXz.js";const o=[{title:"Material Slots",from:"Material Slots",collection:!0,active:"activeMaterial",properties:["name","material","link","slot_index"]},{title:"Surface",from:"Material",properties:["use_nodes","node_tree","surface_render_method","use_backface_culling"]},{title:"Volume",closed:!0,from:"Material",properties:["volume_intersection_method","displacement_method","max_vertex_displacement"]},{title:"Settings",closed:!0,from:"Material",properties:["pass_index","use_backface_culling_shadow","use_backface_culling_lightprobe_volume","use_transparent_shadow","use_transparency_overlap","use_raytrace_refraction","thickness_mode","use_thickness_from_shadow"]},{title:"Line Art",closed:!0,from:"Material",properties:["lineart"]},{title:"Viewport Display",from:"Material",properties:["diffuse_color","metallic","roughness"]},{title:"Animation",closed:!0,from:"Material",properties:["animation_data"]}],e={id:"material",curated:o},b="selection.inspector",g="Material",k="properties-material",v=160,x="object",S=r(e),w=t(e);export{w as default,k as icon,S as match,v as order,b as point,x as railGroup,g as title};
@@ -1 +0,0 @@
1
- import{b as t,a as i}from"./blender-properties-tab-DYiaVS6T.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CY4oDLhJ.js";import"./index-DaQZGF7d.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D2LwEE0L.js";import"./client-DNXj_opT.js";import"./three.module-BynznMJN.js";import"./blender-runtime-host-DGe1KLVZ.js";import"./clip-planes-CnAI6DZn.js";import"./blender-outliner-model-CfXIMSXz.js";const e=[{title:"Modifiers",from:"Modifiers",collection:!0,active:"activeModifier",properties:["name","type","show_viewport","show_render","show_in_editmode","show_on_cage","use_pin_to_last","is_active"],andDeclared:!0}],o={id:"modifier",curated:e},M="selection.inspector",w="Modifiers",v="properties-modifiers",T=80,A="object",D=i(o),P=t(o);export{P as default,v as icon,D as match,T as order,M as point,A as railGroup,w as title};
@@ -1 +0,0 @@
1
- import{b as t,a as o}from"./blender-properties-tab-DYiaVS6T.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CY4oDLhJ.js";import"./index-DaQZGF7d.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D2LwEE0L.js";import"./client-DNXj_opT.js";import"./three.module-BynznMJN.js";import"./blender-runtime-host-DGe1KLVZ.js";import"./clip-planes-CnAI6DZn.js";import"./blender-outliner-model-CfXIMSXz.js";const i=[{title:"Transform",properties:["location","lock_location","rotation_quaternion","rotation_axis_angle","rotation_euler","lock_rotation_w","lock_rotation","rotation_mode","scale","lock_scale"]},{title:"Delta Transform",closed:!0,properties:["delta_location","delta_rotation_quaternion","delta_rotation_euler","delta_scale"]},{title:"Relations",closed:!0,properties:["parent","parent_type","parent_bone","parent_bone_head_tail_factor","parent_vertices","use_parent_final_indices","use_camera_lock_parent","track_axis","up_axis","pass_index"]},{title:"Collections",closed:!0,properties:["users_collection"]},{title:"Instancing",closed:!0,properties:["instance_type","use_instance_vertices_rotation","instance_collection","show_instancer_for_viewport","show_instancer_for_render"],sub:[{title:"Scale by Face Size",closed:!0,properties:["use_instance_faces_scale","instance_faces_scale"]}]},{title:"Viewport Display",closed:!0,properties:["show_name","show_axis","show_wire","show_all_edges","show_texture_space","show_in_front","display_type","color","show_bounds","display_bounds_type","display"]},{title:"Shadow Terminator",closed:!0,properties:["shadow_terminator_normal_offset","shadow_terminator_geometry_offset","shadow_terminator_shading_offset"]},{title:"Visibility",closed:!0,properties:["hide_select","hide_surface_pick","hide_viewport","hide_render","visible_camera","visible_shadow","visible_raycast","visible_diffuse","visible_glossy","visible_transmission","visible_volume_scatter","hide_probe_volume","hide_probe_sphere","hide_probe_plane","use_grease_pencil_lights","is_holdout"]},{title:"Line Art",closed:!0,properties:["lineart"]},{title:"Animation",closed:!0,properties:["animation_data"]}],e={id:"object",standing:"object",curated:i},w="selection.inspector",v="Object",y="properties-object",g=70,k="object",x=!0,T=o(e),j=t(e);export{j as default,y as icon,T as match,g as order,w as point,x as railDefault,k as railGroup,v as title};
@@ -1 +0,0 @@
1
- import{b as t,a as r}from"./blender-properties-tab-DYiaVS6T.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CY4oDLhJ.js";import"./index-DaQZGF7d.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D2LwEE0L.js";import"./client-DNXj_opT.js";import"./three.module-BynznMJN.js";import"./blender-runtime-host-DGe1KLVZ.js";import"./clip-planes-CnAI6DZn.js";import"./blender-outliner-model-CfXIMSXz.js";const s=[{title:"Format",properties:["resolution_x","resolution_y","resolution_percentage","pixel_aspect_x","pixel_aspect_y","use_border","use_crop_to_border","fps","fps_base"]},{title:"Frame Range",properties:[{from:"Scene",property:"frame_start"},{from:"Scene",property:"frame_end"},{from:"Scene",property:"frame_step"}],sub:[{title:"Time Stretching",closed:!0,properties:["frame_map_old","frame_map_new"]}]},{title:"Stereoscopy",closed:!0,properties:["use_multiview","views_format","views"]},{title:"Output",properties:["save_output","filepath","use_file_extension","use_render_cache","use_overwrite","use_placeholder"],sub:[{title:"Color Management",closed:!0,from:"Image",properties:["color_management"]},{title:"Pixel Density",closed:!0,properties:["ppm_factor","ppm_base"]}]},{title:"Encoding",closed:!0,from:"FFmpeg",when:[{from:"Image",property:"file_format",is:["FFMPEG","XVID","H264","THEORA"]}],properties:["format","use_autosplit"],sub:[{title:"Video",from:"FFmpeg",properties:["codec",{from:"Image",property:"color_depth"},"use_lossless_output","ffmpeg_prores_profile","constant_rate_factor","custom_constant_rate_factor","ffmpeg_preset","gopsize","use_max_b_frames","max_b_frames","video_bitrate","minrate","maxrate","buffersize","muxrate","packetsize"]},{title:"Audio",from:"FFmpeg",properties:["audio_codec","audio_channels","audio_mixrate","audio_volume","audio_bitrate"]}]},{title:"Metadata",closed:!0,properties:["metadata_input","use_stamp_date","use_stamp_time","use_stamp_render_time","use_stamp_frame","use_stamp_frame_range","use_stamp_memory","use_stamp_hostname","use_stamp_camera","use_stamp_lens","use_stamp_scene","use_stamp_marker","use_stamp_filename","use_stamp_sequencer_strip"],sub:[{title:"Note",closed:!0,properties:["use_stamp_note","stamp_note_text"]},{title:"Burn Into Image",closed:!0,properties:["use_stamp","stamp_font_size","stamp_foreground","stamp_background","use_stamp_labels"]}]},{title:"Post Processing",closed:!0,properties:["use_compositing","use_sequencer","dither_intensity"]}],e={id:"output",standing:"any",curated:s},x="selection.inspector",y="Output",h="properties-output",F=20,v="scene",w=r(e),I=t(e);export{I as default,h as icon,w as match,F as order,x as point,v as railGroup,y as title};
@@ -1 +0,0 @@
1
- import{b as r,a as i}from"./blender-properties-tab-DYiaVS6T.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CY4oDLhJ.js";import"./index-DaQZGF7d.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D2LwEE0L.js";import"./client-DNXj_opT.js";import"./three.module-BynznMJN.js";import"./blender-runtime-host-DGe1KLVZ.js";import"./clip-planes-CnAI6DZn.js";import"./blender-outliner-model-CfXIMSXz.js";const e=[{from:"Settings",property:"type",is:["HAIR"]}],s=[{title:"Particle Systems",from:"Particle Systems",collection:!0,active:"activeParticleSystem",properties:["name","settings"]},{title:"Emission",from:"Settings",when:[{from:"Settings",property:"is_fluid",is:[!1]}],properties:["count",{from:"Active",property:"seed"},"hair_length","hair_step","frame_start","frame_end","lifetime","lifetime_random"],sub:[{title:"Source",closed:!0,from:"Settings",properties:["emit_from","use_modifier_stack","distribution","use_emit_random","invert_grid","hexagonal_grid","use_even_distribution","userjit","jitter_factor","grid_resolution","grid_random"]}]},{title:"Hair Dynamics",closed:!0,from:"Hair Dynamics",when:e,properties:[{from:"Active",property:"use_hair_dynamics"},"quality","pin_stiffness"],sub:[{title:"Collisions",closed:!0,from:"Hair Collisions",properties:["collision_quality","distance_min","impulse_clamp","collection"]},{title:"Structure",closed:!0,from:"Hair Dynamics",properties:["mass","bending_stiffness",{from:"Settings",property:"bending_random"},"bending_damping"]},{title:"Volume",closed:!0,from:"Hair Dynamics",properties:["air_damping","internal_friction","voxel_cell_size","density_target","density_strength"]}]},{title:"Cache",closed:!0,from:"Active",when:[{from:"Settings",property:"physics_type",isNot:["NO","KEYED"]}],properties:["point_cache"]},{title:"Velocity",closed:!0,from:"Settings",when:[{from:"Settings",property:"physics_type",isNot:["BOIDS"]}],properties:["normal_factor","tangent_factor","tangent_phase","object_align_factor","particle_factor","object_factor","factor_random"]},{title:"Rotation",closed:!0,from:"Settings",when:[{from:"Settings",property:"physics_type",isNot:["BOIDS"]}],properties:["use_rotations","rotation_mode","rotation_factor_random","phase_factor","phase_factor_random","use_dynamic_rotation"],sub:[{title:"Angular Velocity",closed:!0,from:"Settings",properties:["angular_velocity_mode","angular_velocity_factor"]}]},{title:"Physics",closed:!0,from:"Settings",properties:["physics_type","mass","use_multiply_size_mass","keyed_loops",{from:"Active",property:"use_keyed_timing"},"fluid","boids"],sub:[{title:"Forces",from:"Settings",when:[{from:"Settings",property:"physics_type",is:["NEWTON","FLUID"]}],properties:["brownian_factor","drag_factor","damping"]},{title:"Deflection",closed:!0,from:"Settings",when:[{from:"Settings",property:"physics_type",is:["NEWTON","FLUID"]}],properties:["use_size_deflect","use_die_on_collision","collision_collection"]},{title:"Integration",closed:!0,from:"Settings",when:[{from:"Settings",property:"physics_type",is:["NEWTON","FLUID"]}],properties:["integrator","timestep","subframes","use_adaptive_subframes","courant_target"]}]},{title:"Render",closed:!0,from:"Settings",properties:["render_type","particle_size","size_random","material_slot",{from:"Active",property:"parent"}],sub:[{title:"Path",from:"Settings",when:[{from:"Settings",property:"render_type",is:["PATH"]}],properties:["use_hair_bspline","render_step"],sub:[{title:"Timing",closed:!0,from:"Settings",properties:["use_absolute_path_time","path_start","path_end","length_random"]}]},{title:"Object",from:"Settings",when:[{from:"Settings",property:"render_type",is:["OBJECT"]}],properties:["instance_object","use_global_instance","use_rotation_instance","use_scale_instance"]},{title:"Collection",from:"Settings",when:[{from:"Settings",property:"render_type",is:["COLLECTION"]}],properties:["instance_collection","use_whole_collection","use_collection_pick_random","use_global_instance","use_rotation_instance","use_scale_instance"],sub:[{title:"Use Count",closed:!0,from:"Settings",properties:["use_collection_count","instance_weights"]}]},{title:"Extra",closed:!0,from:"Settings",when:[{from:"Settings",property:"render_type",isNot:["NONE"]}],properties:["use_parent_particles","show_unborn","use_dead"]}]},{title:"Viewport Display",closed:!0,from:"Settings",properties:["display_method","display_color","color_maximum","display_percentage","display_step","display_size"]},{title:"Children",closed:!0,from:"Settings",properties:["child_type","child_percent","rendered_child_count","child_length","child_length_threshold",{from:"Active",property:"child_seed"},"virtual_parents","create_long_hair_children","child_size","child_size_random","child_radius","child_roundness"],sub:[{title:"Parting",closed:!0,from:"Settings",when:[{from:"Settings",property:"child_type",is:["INTERPOLATED"]}],properties:["child_parting_factor","child_parting_min","child_parting_max"]},{title:"Clumping",closed:!0,from:"Settings",when:[{from:"Settings",property:"child_type",isNot:["NONE"]}],properties:["use_clump_curve","clump_factor","clump_shape","twist","use_twist_curve"],sub:[{title:"Clump Noise",closed:!0,from:"Settings",properties:["use_clump_noise","clump_noise_size"]}]},{title:"Roughness",closed:!0,from:"Settings",when:[{from:"Settings",property:"child_type",isNot:["NONE"]}],properties:["use_roughness_curve","roughness_1","roughness_1_size","roughness_endpoint","roughness_end_shape","roughness_2","roughness_2_size","roughness_2_threshold"]},{title:"Kink",closed:!0,from:"Settings",when:[{from:"Settings",property:"child_type",isNot:["NONE"]}],properties:["kink","kink_amplitude","kink_amplitude_random","kink_amplitude_clump","kink_axis","kink_axis_random","kink_frequency","kink_shape","kink_extra_steps","kink_flat"]}]},{title:"Hair Shape",closed:!0,from:"Settings",when:e,properties:["shape","root_radius","tip_radius","radius_scale","use_close_tip"]},{title:"Field Weights",closed:!0,from:"Settings",properties:["effector_weights","apply_effector_to_children","effect_hair"]},{title:"Force Field Settings",closed:!0,from:"Settings",properties:["use_self_effect","effector_amount","force_field_1","force_field_2"]},{title:"Vertex Groups",closed:!0,from:"Active",properties:["vertex_group_density","invert_vertex_group_density","vertex_group_length","invert_vertex_group_length","vertex_group_clump","invert_vertex_group_clump","vertex_group_kink","invert_vertex_group_kink","vertex_group_roughness_1","invert_vertex_group_roughness_1","vertex_group_roughness_2","invert_vertex_group_roughness_2","vertex_group_roughness_end","invert_vertex_group_roughness_end","vertex_group_twist","invert_vertex_group_twist"]},{title:"Textures",closed:!0,from:"Settings",properties:["texture_slots","active_texture"]},{title:"Animation",closed:!0,from:"Settings",properties:["animation_data"]}],t={id:"particle",curated:s},S="selection.inspector",v="Particles",b="properties-particles",k=90,x="object",w=i(t),N=r(t);export{N as default,b as icon,w as match,k as order,S as point,x as railGroup,v as title};
@@ -1 +0,0 @@
1
- import{b as i,a as t}from"./blender-properties-tab-DYiaVS6T.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CY4oDLhJ.js";import"./index-DaQZGF7d.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D2LwEE0L.js";import"./client-DNXj_opT.js";import"./three.module-BynznMJN.js";import"./blender-runtime-host-DGe1KLVZ.js";import"./clip-planes-CnAI6DZn.js";import"./blender-outliner-model-CfXIMSXz.js";const o=[{title:"Rigid Body",from:"Rigid Body",properties:["type"],sub:[{title:"Settings",from:"Rigid Body",properties:["mass","kinematic","enabled"]},{title:"Collisions",from:"Rigid Body",properties:["collision_shape","mesh_source","use_deform"],sub:[{title:"Surface Response",closed:!0,from:"Rigid Body",properties:["friction","restitution"]},{title:"Sensitivity",closed:!0,from:"Rigid Body",properties:["use_margin","collision_margin"]},{title:"Collections",closed:!0,from:"Rigid Body",properties:["collision_collections"]}]},{title:"Dynamics",closed:!0,from:"Rigid Body",when:[{from:"Rigid Body",property:"type",is:["ACTIVE"]}],properties:["linear_damping","angular_damping"],sub:[{title:"Deactivation",closed:!0,from:"Rigid Body",properties:["use_deactivation","use_start_deactivated","deactivate_linear_velocity","deactivate_angular_velocity"]}]}]},{title:"Rigid Body Constraint",from:"Rigid Body Constraint",properties:["type"],sub:[{title:"Settings",from:"Rigid Body Constraint",properties:["enabled","disable_collisions","use_breaking","breaking_threshold"]},{title:"Objects",from:"Rigid Body Constraint",properties:["object1","object2"]},{title:"Override Iterations",closed:!0,from:"Rigid Body Constraint",properties:["use_override_solver_iterations","solver_iterations"]},{title:"Limits",closed:!0,from:"Rigid Body Constraint",properties:[],sub:[{title:"Linear",from:"Rigid Body Constraint",properties:["use_limit_lin_x","limit_lin_x_lower","limit_lin_x_upper","use_limit_lin_y","limit_lin_y_lower","limit_lin_y_upper","use_limit_lin_z","limit_lin_z_lower","limit_lin_z_upper"]},{title:"Angular",from:"Rigid Body Constraint",properties:["use_limit_ang_x","limit_ang_x_lower","limit_ang_x_upper","use_limit_ang_y","limit_ang_y_lower","limit_ang_y_upper","use_limit_ang_z","limit_ang_z_lower","limit_ang_z_upper"]}]},{title:"Motor",closed:!0,from:"Rigid Body Constraint",properties:[],sub:[{title:"Linear",from:"Rigid Body Constraint",properties:["use_motor_lin","motor_lin_target_velocity","motor_lin_max_impulse"]},{title:"Angular",from:"Rigid Body Constraint",properties:["use_motor_ang","motor_ang_target_velocity","motor_ang_max_impulse"]}]},{title:"Springs",closed:!0,from:"Rigid Body Constraint",properties:["spring_type"]}]},{title:"Cloth",from:"Cloth",properties:["quality","time_scale"],sub:[{title:"Physical Properties",from:"Cloth",properties:["mass","air_damping","bending_model"],sub:[{title:"Stiffness",from:"Cloth",properties:["tension_stiffness","compression_stiffness","shear_stiffness","bending_stiffness"]},{title:"Damping",from:"Cloth",properties:["tension_damping","compression_damping","shear_damping","bending_damping"]},{title:"Internal Springs",closed:!0,from:"Cloth",properties:["use_internal_springs","internal_spring_max_length","internal_spring_max_diversion","internal_spring_normal_check","internal_tension_stiffness","internal_compression_stiffness","internal_tension_stiffness_max","internal_compression_stiffness_max","vertex_group_intern"]},{title:"Pressure",closed:!0,from:"Cloth",properties:["use_pressure","uniform_pressure_force","use_pressure_volume","target_volume","pressure_factor","fluid_density","vertex_group_pressure"]}]},{title:"Cache",closed:!0,from:"Cloth Modifier",properties:["point_cache"]},{title:"Shape",closed:!0,from:"Cloth",properties:["vertex_group_mass","pin_stiffness","use_sewing_springs","sewing_force_max","shrink_min","use_dynamic_mesh","rest_shape_key"]},{title:"Collisions",closed:!0,from:"Cloth",properties:["collision_quality"],sub:[{title:"Object Collisions",from:"Cloth Collisions",properties:["use_collision","distance_min","impulse_clamp","vertex_group_object_collisions","collection"]},{title:"Self Collisions",from:"Cloth Collisions",properties:["use_self_collision","self_friction","self_distance_min","self_impulse_clamp"]}]},{title:"Field Weights",closed:!0,from:"Cloth",properties:["effector_weights"]}]},{title:"Soft Body",from:"Soft Body",properties:["collision_collection"],sub:[{title:"Object",closed:!0,from:"Soft Body",properties:["friction","mass","vertex_group_mass"]},{title:"Simulation",closed:!0,from:"Soft Body",properties:["speed"]},{title:"Goal",closed:!0,from:"Soft Body",properties:["use_goal","vertex_group_goal"],sub:[{title:"Strengths",closed:!0,from:"Soft Body",properties:["goal_default","goal_min","goal_max"]},{title:"Settings",closed:!0,from:"Soft Body",properties:["goal_spring","goal_friction"]}]},{title:"Edges",closed:!0,from:"Soft Body",properties:["use_edges","vertex_group_spring","pull","push","damping","plastic","bend","spring_length","use_edge_collision","use_face_collision"],sub:[{title:"Aerodynamics",closed:!0,from:"Soft Body",properties:["aerodynamics_type","aero"]},{title:"Stiffness",closed:!0,from:"Soft Body",properties:["use_stiff_quads","shear"]}]},{title:"Self Collision",closed:!0,from:"Soft Body",properties:["use_self_collision","collision_type","ball_size","ball_stiff","ball_damp"]},{title:"Solver",closed:!0,from:"Soft Body",properties:["step_min","step_max","use_auto_step","error_threshold"],sub:[{title:"Diagnostics",closed:!0,from:"Soft Body",properties:["use_diagnose","use_estimate_matrix"]},{title:"Helpers",closed:!0,from:"Soft Body",properties:["choke","fuzzy"]}]},{title:"Field Weights",closed:!0,from:"Soft Body",properties:["effector_weights"]},{title:"Cache",closed:!0,from:"Soft Body Modifier",properties:["point_cache"]}]},{title:"Force Fields",from:"Force Field",properties:["type"],sub:[{title:"Settings",from:"Force Field",properties:["shape","strength","flow","apply_to_location","apply_to_rotation","source_object","use_smoke_density","falloff_power","use_max_distance","distance_max","texture_mode","texture_nabla","use_object_coords","use_2d_force","guide_free","use_guide_path_add","use_guide_path_weight","guide_clump_amount","guide_clump_shape","guide_minimum"],sub:[{title:"Kink",from:"Force Field",when:[{from:"Force Field",property:"type",is:["GUIDE"]}],properties:["guide_kink_type","guide_kink_axis","guide_kink_frequency","guide_kink_shape","guide_kink_amplitude"]},{title:"Texture",from:"Force Field",when:[{from:"Force Field",property:"type",is:["TEXTURE"]}],properties:["texture"]}]},{title:"Falloff",from:"Force Field",when:[{from:"Force Field",property:"type",isNot:["NONE","GUIDE"]}],properties:["falloff_type"],sub:[{title:"Angular",from:"Force Field",when:[{from:"Force Field",property:"falloff_type",is:["CONE"]}],properties:["radial_falloff","use_radial_min","radial_min","use_radial_max","radial_max"]},{title:"Radial",from:"Force Field",when:[{from:"Force Field",property:"falloff_type",is:["TUBE"]}],properties:["radial_falloff","use_radial_min","radial_min","use_radial_max","radial_max"]}]}]},{title:"Collision",from:"Collision",properties:["use","absorption"],sub:[{title:"Particle",from:"Collision",properties:["permeability","stickiness","use_particle_kill","damping_factor","damping_random","friction_factor","friction_random"]},{title:"Softbody & Cloth",from:"Collision",properties:["damping","thickness_outer","thickness_inner","cloth_friction","use_culling","use_normal"]}]},{title:"Fluid",from:"Fluid",properties:["fluid_type","domain_settings","flow_settings","effector_settings"]},{title:"Dynamic Paint",from:"Dynamic Paint",properties:["ui_type","canvas_settings","brush_settings"]}],e={id:"physics",curated:o},h="selection.inspector",b="Physics",C="properties-physics",B=100,x="object",S=t(e),F=i(e);export{F as default,C as icon,S as match,B as order,h as point,x as railGroup,b as title};
@@ -1 +0,0 @@
1
- import{b as i,a as o}from"./blender-properties-tab-DYiaVS6T.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CY4oDLhJ.js";import"./index-DaQZGF7d.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D2LwEE0L.js";import"./client-DNXj_opT.js";import"./three.module-BynznMJN.js";import"./blender-runtime-host-DGe1KLVZ.js";import"./clip-planes-CnAI6DZn.js";import"./blender-outliner-model-CfXIMSXz.js";const e=["BLENDER_EEVEE"],t=["BLENDER_WORKBENCH"],s=[{title:"Render Engine",properties:["engine"]},{title:"Sampling",engine:e,from:"EEVEE",properties:[],sub:[{title:"Viewport",from:"EEVEE",properties:["taa_samples","use_taa_reprojection","use_shadow_jitter_viewport"]},{title:"Render",from:"EEVEE",properties:["taa_render_samples"]},{title:"Shadows",closed:!0,from:"EEVEE",properties:["use_shadows","shadow_ray_count","shadow_step_count","use_volumetric_shadows","volumetric_shadow_samples","shadow_resolution_scale"]},{title:"Advanced",closed:!0,from:"EEVEE",properties:["light_threshold"]}]},{title:"Light Paths",closed:!0,engine:e,from:"EEVEE",properties:[],sub:[{title:"Clamping",from:"EEVEE",properties:[],sub:[{title:"Surface",from:"EEVEE",properties:["clamp_surface_direct","clamp_surface_indirect"]},{title:"Volume",from:"EEVEE",properties:["clamp_volume_direct","clamp_volume_indirect"]}]},{title:"Intensity",from:"EEVEE",properties:["direct_light_intensity","indirect_light_intensity"]}]},{title:"Raytracing",closed:!0,engine:e,from:"EEVEE",properties:["use_raytracing","ray_tracing_method",{from:"Raytracing",property:"resolution_scale"}],sub:[{title:"Screen Tracing",closed:!0,from:"Raytracing",properties:["screen_trace_quality","screen_trace_thickness","use_backface_hit","backface_radiance_scale"]},{title:"Denoising",closed:!0,from:"Raytracing",properties:["use_denoise","denoise_spatial","denoise_temporal","denoise_bilateral"]},{title:"Fast GI Approximation",closed:!0,from:"EEVEE",properties:["use_fast_gi",{from:"Raytracing",property:"trace_max_roughness"},"fast_gi_method","fast_gi_resolution","fast_gi_ray_count","fast_gi_step_count","fast_gi_quality","fast_gi_distance","fast_gi_thickness_near","fast_gi_bias"]}]},{title:"Volumes",closed:!0,engine:e,from:"EEVEE",properties:["volumetric_tile_size","volumetric_samples","volumetric_sample_distribution","volumetric_ray_depth"],sub:[{title:"Custom Range",closed:!0,from:"EEVEE",properties:["use_volume_custom_range","volumetric_start","volumetric_end"]}]},{title:"Depth of Field",closed:!0,engine:e,from:"EEVEE",properties:["bokeh_max_size","bokeh_threshold","bokeh_neighbor_max","use_bokeh_jittered","bokeh_overblur"]},{title:"Motion Blur",closed:!0,engine:e,properties:["use_motion_blur","motion_blur_position","motion_blur_shutter",{from:"EEVEE",property:"motion_blur_depth_scale"},{from:"EEVEE",property:"motion_blur_max"},{from:"EEVEE",property:"motion_blur_steps"}]},{title:"Film",closed:!0,engine:e,properties:["filter_size","film_transparent",{from:"EEVEE",property:"use_overscan"},{from:"EEVEE",property:"overscan_size"}]},{title:"Performance",closed:!0,engine:e,properties:["use_high_quality_normals","anisotropic_filter"],sub:[{title:"Compositor",closed:!0,properties:["compositor_device","compositor_precision"],sub:[{title:"Denoise Nodes",closed:!0,properties:["compositor_denoise_device","compositor_denoise_preview_quality","compositor_denoise_final_quality"]}]},{title:"Memory",closed:!0,from:"EEVEE",properties:["shadow_pool_size","gi_irradiance_pool_size"]},{title:"Viewport",closed:!0,properties:["preview_pixel_size"]}]},{title:"Sampling",engine:t,from:"Workbench",properties:["render_aa","viewport_aa"]},{title:"Lighting",engine:t,from:"Workbench Shading",properties:["light","studio_light","use_world_space_lighting","studiolight_rotate_z"]},{title:"Object Color",engine:t,from:"Workbench Shading",properties:["color_type","single_color"]},{title:"Options",engine:t,from:"Workbench Shading",properties:["show_backface_culling","show_object_outline","object_outline_color","show_specular_highlight","show_xray","xray_alpha","show_shadows","shadow_intensity","use_dof","show_cavity","cavity_type","cavity_ridge_factor","cavity_valley_factor","curvature_ridge_factor","curvature_valley_factor"]},{title:"Film",closed:!0,engine:t,properties:["film_transparent"]},{title:"Grease Pencil",closed:!0,from:"Grease Pencil",properties:[],sub:[{title:"Viewport",closed:!0,from:"Grease Pencil",properties:["antialias_threshold"]},{title:"Render",closed:!0,from:"Grease Pencil",properties:["antialias_threshold_render","aa_samples","motion_blur_steps"]}]},{title:"Simplify",closed:!0,properties:["use_simplify"],sub:[{title:"Viewport",properties:["simplify_subdivision","simplify_child_particles","simplify_volumes","use_simplify_normals"]},{title:"Render",properties:["simplify_subdivision_render","simplify_child_particles_render"]}]},{title:"Color Management",closed:!0,from:"View Settings",properties:[{from:"Display Device",property:"display_device"},"view_transform","look","exposure","gamma"],sub:[{title:"White Balance",closed:!0,from:"View Settings",properties:["use_white_balance","white_balance_temperature","white_balance_tint"]},{title:"Curves",closed:!0,from:"View Settings",properties:["use_curve_mapping","curve_mapping"]},{title:"Advanced",closed:!0,from:"Display Device",properties:["emulation"]}]}],r={id:"render",standing:"any",curated:s},b="selection.inspector",v="Render",w="properties-render",V=10,R="scene",k=o(r),S=i(r);export{S as default,w as icon,k as match,V as order,b as point,R as railGroup,v as title};
@@ -1 +0,0 @@
1
- import{b as t,a as i}from"./blender-properties-tab-DYiaVS6T.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CY4oDLhJ.js";import"./index-DaQZGF7d.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D2LwEE0L.js";import"./client-DNXj_opT.js";import"./three.module-BynznMJN.js";import"./blender-runtime-host-DGe1KLVZ.js";import"./clip-planes-CnAI6DZn.js";import"./blender-outliner-model-CfXIMSXz.js";const o=[{title:"Scene",properties:["camera","background_set","active_clip"]},{title:"Units",closed:!0,from:"Units",properties:["system","scale_length","use_separate","system_rotation","length_unit","mass_unit","time_unit","temperature_unit"]},{title:"Gravity",closed:!0,properties:["use_gravity","gravity"]},{title:"Simulation",closed:!0,properties:["use_custom_simulation_range","simulation_frame_start","simulation_frame_end"]},{title:"Keying Sets",closed:!0,properties:["keying_sets"]},{title:"Audio",closed:!0,properties:["audio_volume","audio_distance_model","audio_doppler_speed","audio_doppler_factor"]},{title:"Rigid Body World",closed:!0,from:"Rigid Body World",properties:["enabled"],sub:[{title:"Settings",from:"Rigid Body World",properties:["collection","constraints","time_scale","use_split_impulse","substeps_per_frame","solver_iterations"]},{title:"Cache",closed:!0,from:"Rigid Body World",properties:["point_cache"]},{title:"Field Weights",closed:!0,from:"Rigid Body World",properties:["effector_weights"]}]},{title:"Light Probes",closed:!0,from:"EEVEE",engine:["BLENDER_EEVEE"],properties:["gi_cubemap_resolution"]},{title:"Animation",closed:!0,properties:["animation_data"]}],e={id:"scene",standing:"any",curated:o},b="selection.inspector",E="Scene",h="properties-scene",B=40,R="scene",S=i(e),v=t(e);export{v as default,h as icon,S as match,B as order,b as point,R as railGroup,E as title};
@@ -1 +0,0 @@
1
- import{b as o,a as i}from"./blender-properties-tab-DYiaVS6T.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CY4oDLhJ.js";import"./index-DaQZGF7d.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D2LwEE0L.js";import"./client-DNXj_opT.js";import"./three.module-BynznMJN.js";import"./blender-runtime-host-DGe1KLVZ.js";import"./clip-planes-CnAI6DZn.js";import"./blender-outliner-model-CfXIMSXz.js";const e=r=>[{from:"Texture",property:"type",is:[r]},{from:"Texture",property:"use_nodes",is:[!1]}],s=[{title:"Texture",from:"Texture",properties:["type","use_nodes","node_tree"]},{title:"Clouds",from:"Texture",when:e("CLOUDS"),properties:["noise_basis","noise_type","cloud_type","noise_scale","noise_depth","nabla"]},{title:"Wood",from:"Texture",when:e("WOOD"),properties:["noise_basis","wood_type","noise_basis_2","noise_type","noise_scale","turbulence","nabla"]},{title:"Marble",from:"Texture",when:e("MARBLE"),properties:["noise_basis","marble_type","noise_basis_2","noise_type","noise_scale","noise_depth","turbulence","nabla"]},{title:"Magic",from:"Texture",when:e("MAGIC"),properties:["noise_depth","turbulence"]},{title:"Blend",from:"Texture",when:e("BLEND"),properties:["progression","use_flip_axis"]},{title:"Stucci",from:"Texture",when:e("STUCCI"),properties:["noise_basis","stucci_type","noise_type","noise_scale","turbulence"]},{title:"Image",from:"Texture",when:e("IMAGE"),properties:["image","image_user"],sub:[{title:"Alpha",closed:!0,from:"Texture",properties:["use_alpha","use_calculate_alpha","invert_alpha"]},{title:"Sampling",closed:!0,from:"Texture",properties:["use_interpolation","filter_size"]},{title:"Mapping",closed:!0,from:"Texture",properties:["use_flip_axis","extension","repeat_x","repeat_y","use_mirror_x","use_mirror_y","checker_distance","use_checker_even","use_checker_odd"],sub:[{title:"Crop",closed:!0,from:"Texture",properties:["crop_min_x","crop_min_y","crop_max_x","crop_max_y"]}]}]},{title:"Musgrave",from:"Texture",when:e("MUSGRAVE"),properties:["noise_basis","musgrave_type","noise_scale","nabla","dimension_max","lacunarity","octaves","offset","noise_intensity","gain"]},{title:"Voronoi",from:"Texture",when:e("VORONOI"),properties:["distance_metric","minkovsky_exponent","color_mode","noise_intensity","noise_scale","nabla"],sub:[{title:"Feature Weights",from:"Texture",properties:["weight_1","weight_2","weight_3","weight_4"]}]},{title:"Distorted Noise",from:"Texture",when:e("DISTORTED_NOISE"),properties:["noise_basis","noise_distortion","distortion","noise_scale","nabla"]},{title:"Mapping",from:"User",properties:["texture_coords","object","uv_layer","mapping","mapping_x","mapping_y","mapping_z","offset","scale"]},{title:"Influence",closed:!0,from:"User",properties:["blend_type","color"]},{title:"Colors",closed:!0,from:"Texture",properties:["use_clamp","factor_red","factor_green","factor_blue","intensity","contrast","saturation"],sub:[{title:"Color Ramp",closed:!0,from:"Texture",properties:["use_color_ramp","color_ramp"]}]},{title:"Animation",closed:!0,from:"Texture",properties:["animation_data"]}],t={id:"texture",curated:s},y="selection.inspector",g="Texture",w="properties-texture",M=160,C="texture",A=i(t),I=o(t);export{I as default,w as icon,A as match,M as order,y as point,C as railGroup,g as title};
@@ -1 +0,0 @@
1
- import{b as s,a as t}from"./blender-properties-tab-DYiaVS6T.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CY4oDLhJ.js";import"./index-DaQZGF7d.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D2LwEE0L.js";import"./client-DNXj_opT.js";import"./three.module-BynznMJN.js";import"./blender-runtime-host-DGe1KLVZ.js";import"./clip-planes-CnAI6DZn.js";import"./blender-outliner-model-CfXIMSXz.js";const r=[{title:"View Layer",properties:["use",{from:"Render",property:"use_single_layer"}]},{title:"Passes",properties:[],sub:[{title:"Data",engine:["BLENDER_EEVEE"],properties:["use_pass_combined","use_pass_z","use_pass_mist","use_pass_normal","use_pass_position","use_pass_vector","use_pass_grease_pencil"]},{title:"Data",engine:["BLENDER_WORKBENCH"],properties:["use_pass_combined","use_pass_z","use_pass_grease_pencil"]},{title:"Light",engine:["BLENDER_EEVEE"],properties:["use_pass_diffuse_direct","use_pass_diffuse_color","use_pass_glossy_direct","use_pass_glossy_color",{from:"EEVEE",property:"use_pass_volume_direct"},"use_pass_emit","use_pass_environment","use_pass_shadow","use_pass_ambient_occlusion",{from:"EEVEE",property:"use_pass_transparent"},{from:"EEVEE",property:"ambient_occlusion_distance"}]},{title:"Cryptomatte",closed:!0,properties:["use_pass_cryptomatte_object","use_pass_cryptomatte_material","use_pass_cryptomatte_asset","pass_cryptomatte_depth"]},{title:"Shader AOV",closed:!0,properties:["aovs"]},{title:"Light Groups",closed:!0,properties:["lightgroups"]}]},{title:"Filter",closed:!0,properties:["use_sky","use_solid","use_strand","use_volumes","use_grease_pencil","use_motion_blur"]},{title:"Override",closed:!0,properties:["material_override","world_override","samples"]}],e={id:"view_layer",standing:"any",curated:r},b="selection.inspector",f="View Layer",v="properties-view-layer",V=30,h="scene",L=t(e),w=s(e);export{w as default,v as icon,L as match,V as order,b as point,h as railGroup,f as title};
@@ -1 +0,0 @@
1
- import{b as t,a as o}from"./blender-properties-tab-DYiaVS6T.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CY4oDLhJ.js";import"./index-DaQZGF7d.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D2LwEE0L.js";import"./client-DNXj_opT.js";import"./three.module-BynznMJN.js";import"./blender-runtime-host-DGe1KLVZ.js";import"./clip-planes-CnAI6DZn.js";import"./blender-outliner-model-CfXIMSXz.js";const r=[{title:"Surface",engine:["BLENDER_EEVEE"],properties:["use_nodes","node_tree"]},{title:"Volume",closed:!0,engine:["BLENDER_EEVEE"],properties:["use_eevee_finite_volume"]},{title:"Mist Pass",closed:!0,from:"Mist",engine:["BLENDER_EEVEE"],properties:["start","depth","falloff"]},{title:"Settings",closed:!0,engine:["BLENDER_EEVEE"],properties:[],sub:[{title:"Light Probe",properties:["probe_resolution"]},{title:"Sun",properties:["sun_threshold","sun_angle"],sub:[{title:"Shadow",closed:!0,properties:["use_sun_shadow","use_sun_shadow_jitter","sun_shadow_jitter_overblur","sun_shadow_filter_radius","sun_shadow_maximum_resolution"]}]}]},{title:"Viewport Display",closed:!0,properties:["color"]},{title:"Animation",closed:!0,properties:["animation_data"]}],e={id:"world",standing:"any",curated:r},f="selection.inspector",w="World",g="properties-world",D=50,V="scene",B=o(e),L=t(e);export{L as default,g as icon,B as match,D as order,f as point,V as railGroup,w as title};
@@ -1,2 +0,0 @@
1
- const d="/work/.vgai-session",oe=`${d}/session.py`,ae=[`${d}/in`,`${d}/reply`],_="/__editor/blender-wasm";function L(e){return new URL(`${_}/${e}`,import.meta.url).href}async function M(){const e=await fetch(L("status"));return e.ok?await e.json():{available:!1,skew:null,dir:null,sizes:{},encoded:{},missing:[`${_}/status answered ${e.status}`]}}async function D(e){const r=await M();if(!r.available)throw new Error(`The headless Blender WebAssembly build is not served by this editor: ${r.missing.join("; ")}`);if(r.skew==="wali"){const{startWaliBlenderEngine:t}=await import("./blender-wali-engine-Dtwixi7B.js");return t(e,r)}const{startEmscriptenBlenderEngine:n}=await import("./blender-emscripten-engine-BkrPLmPf.js");return n(e,r)}function U(e){return e<200?1:e<5e3?5:25}const C=e=>new Promise(r=>setTimeout(r,e)),T=new TextDecoder;function se(e,r,n){let t=0,a=0;const o=new Set;async function s(u){for(const l of o)u.has(`${l}.done`)||(await e.unlink(`${d}/reply/${l}.json`),await e.unlink(`${d}/reply/${l}.done`),o.delete(l))}async function i(){let u;try{u=await e.readdir(`${d}/ask`)}catch{return}const l=new Set(u.filter(h=>h.endsWith(".done")));await s(l);for(const h of l){const y=h.slice(0,-5);if(Number(y)<=a)continue;a=Number(y);const m=JSON.parse(T.decode(await e.readFile(`${d}/ask/${y}.json`)));let j;try{j=await r.ask(m)}catch(v){j={error:v instanceof Error?v.message:String(v)}}await e.writeFile(`${d}/reply/${y}.json`,JSON.stringify(j??null)),await e.writeFile(`${d}/reply/${y}.done`,"1"),o.add(y)}}async function c(u){const l=String(++t);await e.writeFile(`${d}/in/${l}.json`,JSON.stringify(u)),await e.writeFile(`${d}/in/${l}.done`,"1");const h=performance.now();for(;;){if(await i(),await e.stat(`${d}/out/${l}.done`)){const m=JSON.parse(T.decode(await e.readFile(`${d}/out/${l}.json`)));if(await e.unlink(`${d}/in/${l}.json`),await e.unlink(`${d}/in/${l}.done`),m.error)throw new Error(m.error);return m.result}const y=n?.();if(y)throw new Error(`Blender is gone, so this call will never be answered: ${y}. The session keeps its directory and its cached banner, so every later call would wait on the same missing answer; start a new program with \`blender-start {fresh: true}\` (\`VGAI_BLENDER_FRESH_SESSION=1\` for the battery harness).`);await C(U(performance.now()-h))}}return{request:c}}const N=e=>typeof e=="object"&&e!==null&&typeof e.offset=="number"&&typeof e.length=="number"&&typeof e.dtype=="string"&&typeof e.count=="number"&&typeof e.stride=="number",J={f32:e=>new Float32Array(e.buffer,e.byteOffset,e.byteLength>>2),f64:e=>new Float64Array(e.buffer,e.byteOffset,e.byteLength>>3),u32:e=>new Uint32Array(e.buffer,e.byteOffset,e.byteLength>>2),i32:e=>new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),u16:e=>new Uint16Array(e.buffer,e.byteOffset,e.byteLength>>1),i16:e=>new Int16Array(e.buffer,e.byteOffset,e.byteLength>>1),u8:e=>e,i8:e=>new Int8Array(e.buffer,e.byteOffset,e.byteLength)};function V(e,r,n){const t=J[n.dtype];if(!t)throw new Error(`Blender frame column ${r}: unknown dtype ${n.dtype}`);const{offset:a,length:o}=n;if(a<0||o<0||a+o>e.byteLength)throw new Error(`Blender frame column ${r}: bytes ${a}..${a+o} lie outside the ${e.byteLength}-byte export arena`);const s=e.subarray(a,a+o).slice(),i=t(s),c=n.count*n.stride;if(i.length!==c)throw new Error(`Blender frame column ${r}: ${i.length} values, ${c} declared (${n.count} x ${n.stride})`);return i}function W(e,r){const n=(t,a)=>{if(N(t)){const o=V(e,a,t);return a==="co"?Float64Array.from(o):o}if(Array.isArray(t))return t.map(o=>n(o,a));if(typeof t=="object"&&t!==null){const o={};for(const[s,i]of Object.entries(t))o[s]=n(i,s);return o}return t};return n(r,"")}async function z(e,r){const n=async(t,a)=>{if(N(t)){const{offset:o,length:s,dtype:i}=t;if(o<0||s<0||o+s>e.byteLength)throw new Error(`Blender frame column ${a}: bytes ${o}..${o+s} lie outside the ${e.byteLength}-byte export arena`);const c=e.subarray(o,o+s).slice(),u=await crypto.subtle.digest("SHA-256",c),l=[...new Uint8Array(u)].map(h=>h.toString(16).padStart(2,"0")).join("");return{dtype:i,length:s,sha256:l}}if(Array.isArray(t))return Promise.all(t.map(o=>n(o,a)));if(typeof t=="object"&&t!==null){const o={};for(const[s,i]of Object.entries(t))o[s]=await n(i,s);return o}return t};return n(r,"")}const $=e=>self.postMessage(e),p=(e,r)=>$({op:"log",level:e,text:r});let b=null,O=null,G=0;const A=new Map;function H(e,r,n){const t=++G,a=[],o=e;for(const s of[o?.meshes??{},o?.images??{}])for(const i of Object.values(s))for(const c of Object.values(i))ArrayBuffer.isView(c)&&c.buffer instanceof ArrayBuffer&&!a.includes(c.buffer)&&a.push(c.buffer);return new Promise((s,i)=>{A.set(t,{resolve:s,reject:i}),self.postMessage({op:"present",id:t,frame:e,description:r,...n?{capture:n}:{}},a)})}let f=null,E=null,S=null,k=0;const K=1e3;function F(){E!==null&&(S!==null&&clearTimeout(S),S=setTimeout(()=>{S=null,Q()},K))}async function Q(){if(!f||E===null)return;if(k>0){F();return}const e=E;let r;try{r=await f.request({op:"save-document"})}catch(t){p("error",`@@VGAI-ERROR the Blender document ${e} could not be saved: ${g(t)}`);return}if(!r?.saved||typeof r.path!="string")return;let n;try{n=await f.files.readFile(r.path)}catch(t){p("error",`@@VGAI-ERROR the Blender document ${e} was saved but could not be read back out of the engine: ${g(t)}`);return}w.delete(r.path);try{const t=await fetch(`/__editor/blender-document?path=${encodeURIComponent(e)}`,{method:"POST",headers:{"content-type":"application/octet-stream"},body:new Blob([n])});if(!t.ok){const a=await t.text().catch(()=>"");p("error",`@@VGAI-ERROR the Blender document ${e} was not written to the project: HTTP ${t.status} ${a}`);return}}catch(t){p("error",`@@VGAI-ERROR the Blender document ${e} was not written to the project: ${g(t)}`);return}p("log",`@@VGAI-DOCUMENT ${JSON.stringify({path:e,bytes:n.length})}`)}async function X(e,r){const n={engine:null},t=await D({project:e,log:p,ask:async({frame:o,capture:s,saveDue:i})=>{if(!n.engine)throw new Error("The Blender session presented before it started");i&&F();const c=await n.engine.readArena(),u=await z(c,o),l=await H(W(c,o),u,s);return{...typeof l.capture=="object"&&l.capture!==null?l.capture:{},..."held"in l?{held:l.held}:{}}}});n.engine=t,f=t,r&&await P(t.files,e);const a=await t.request({op:"start",project:e,...r?{document:r}:{}});return r&&(E=r),b={start:async()=>a,execute:async o=>{const s=await t.request({op:"execute",code:o});return s.error?`Error executing code: ${s.error}`:`Code executed successfully: ${s.result}`},sceneInfo:async()=>JSON.stringify(await t.request({op:"scene-info"}),null,2),objectInfo:async o=>JSON.stringify(await t.request({op:"object-info",name:o}),null,2),screenshotView:async o=>(await t.request({op:"present",capture:{size:o}}),JSON.stringify({view:{size:o}}))},{...a,engine:"blender-wasm",skew:t.skew,bootMs:Math.round(t.bootMs),releasedPayloadMB:t.releasedPayloadBytes===null?null:Math.round(t.releasedPayloadBytes/1048576)}}async function Y(){try{const e=await fetch("/__editor/blender-wasm/status");return e.ok?await e.json():{available:!1,missing:[`status answered ${e.status}`]}}catch(e){return{available:!1,missing:[String(e)]}}}async function Z(e,r){if(b)throw new Error("The Blender session is already started");if(!e.startsWith("/"))throw new Error("The Blender session needs the project's absolute path");if(r!==void 0&&!q(r))throw new Error(`The Blender document must be a project-relative .blend path with no traversal (models/model.blend); got ${JSON.stringify(r)}`);const n=await Y();if(!n.available)throw new Error(`Headless Blender is not served by this editor, so there is no modeling engine: ${n.missing.join("; ")}. The engine is Blender compiled to WebAssembly (packages/blender-engine/wasm, or the directory VGAI_BLENDER_WASM_DIR names); nothing stands in for it.`);return O=e,X(e,r)}function q(e){return!e.endsWith(".blend")||e.startsWith("/")||e.includes("\\")?!1:e.split("/").every(n=>n!==""&&n!=="."&&n!=="..")}const I=new Set;function B(e){I.has(e)||(I.add(e),p("error",e))}async function ee(e){const r=s=>(B(`The project's files are not readable from Python: ${s}`),null);let n;try{n=await fetch("/__editor/blender-project-index")}catch(s){return r(String(s))}if(!n.ok)return r(`/__editor/blender-project-index answered ${n.status}`);let t;try{if(t=await n.json(),typeof t?.root!="string"||!Array.isArray(t.files))return r("invalid project index")}catch(s){return r(String(s))}const{root:a,files:o}=t;return a!==e&&B(`The editor serving this tab has ${a} open, not ${e}; its files are mounted at ${e}, which is where Python is looking.`),o}const w=new Map;async function te(e,r){const n=await e.stat(r);return n?`${n.size}:${n.mtimeMs}`:""}async function P(e,r){const n=await ee(r);if(!n)return;const t=new Set(n.map(a=>`${r}/${a.path}`));for(const a of[...w.keys()])if(!t.has(a)){try{await e.unlink(a)}catch{}w.delete(a)}for(const a of n){const o=`${r}/${a.path}`,s=`${a.size}:${a.mtime}`;if(w.get(o)?.host===s||!w.has(o)&&await e.stat(o)!==null)continue;const i=await fetch(`/__editor/blender-project-file?path=${encodeURIComponent(a.path)}`);if(!i.ok){B(`${a.path}: HTTP ${i.status}`);continue}const c=o.slice(0,o.lastIndexOf("/"));c&&await e.mkdirTree(c),await e.writeFile(o,new Uint8Array(await i.arrayBuffer())),w.set(o,{host:s,engine:await te(e,o)})}}async function ne(e,r){const n=[],t=async a=>{let o;try{o=await e.readdir(a)}catch{return}for(const s of o){if(s==="."||s==="..")continue;const i=`${a.replace(/\/$/,"")}/${s}`,c=await e.stat(i);if(c){if((c.mode&61440)===16384){await t(i);continue}w.get(i)?.engine!==`${c.size}:${c.mtimeMs}`&&n.push({path:i,size:c.size,mtime:c.mtimeMs})}}};return await t(r),n}async function R(e){switch(e.op){case"start":return Z(e.project,e.document);case"present-result":{const t=A.get(e.id);A.delete(e.id),t&&(e.error?t.reject(new Error(e.error)):t.resolve({...e.capture===void 0?{}:{capture:e.capture},..."held"in e?{held:e.held}:{}}));return}}if(!b||!O||!f)throw new Error("The Blender session has not started");const r=f.files,n=f.request.bind(f);switch(e.op){case"history-begin":case"history-end":return n({op:e.op});case"history-step":return n({op:"history-step",token:e.token,direction:e.direction});case"execute":await P(r,O);{const t=await n({op:"execute",code:e.code,history:e.history??!0,label:e.label??"Blender Python"});return t.error?`Error executing code: ${t.error}`:`Code executed successfully: ${t.result}`}case"present":return n({op:"present"});case"scene-info":return b.sceneInfo();case"object-info":return b.objectInfo(e.name);case"rna":return n({op:"rna",path:e.path,...e.names===void 0?{}:{names:e.names}});case"rna-context":return n({op:"rna-context",...e.object===void 0?{}:{object:e.object},...e.collection===void 0?{}:{collection:e.collection}});case"rna-set":return n({op:"rna-set",history:e.history!==!1,path:e.path,property:e.property,value:e.value,...e.index===void 0?{}:{index:e.index}});case"outliner":return n({op:"outliner",...e.selected===void 0?{}:{selected:[...e.selected]}});case"node-tree":return n({op:"node-tree",...e.path===void 0?{}:{path:e.path},...e.material===void 0?{}:{material:e.material}});case"uv-layout":return n({op:"uv-layout",...e.object===void 0?{}:{object:e.object},...e.uvLayer===void 0?{}:{uvLayer:e.uvLayer}});case"rig":return n({op:"rig",...e.object===void 0?{}:{object:e.object}});case"action-clip":return n({op:"action-clip",...e.object===void 0?{}:{object:e.object},...e.bake===void 0?{}:{bake:e.bake}});case"outliner-set":return n({op:"outliner-set",path:e.path,column:e.column,value:e.value});case"screenshot-view":return JSON.parse(await b.screenshotView(e.maxSize));case"read-file":return r.readFile(e.path);case"write-file":{const t=e.path.slice(0,e.path.lastIndexOf("/"));t&&await r.mkdirTree(t),await r.writeFile(e.path,e.bytes),w.delete(e.path);return}case"list-files":return ne(r,e.path)}throw new Error(`Unknown Blender worker request ${e.op}`)}function g(e){if(e instanceof Error)return e.stack??`${e.name}: ${e.message}`;if(typeof e=="object"&&e!==null){const r=e;if(typeof r.message=="string")return typeof r.name=="string"?`${r.name}: ${r.message}`:r.message;try{return JSON.stringify(e)??Object.prototype.toString.call(e)}catch{return Object.prototype.toString.call(e)}}return String(e)}function re(){if(!f)return;const e=f.memoryBytes();e!==null&&$({op:"memory",bytes:e})}self.onmessage=async e=>{const r=e.data;if(r.op==="present-result"){await R(r);return}k+=1;try{const n=await R(r);await x(),$({id:r.id,result:n})}catch(n){let t=g(n);try{await x()}catch(a){t+=`
2
- Unable to deliver Blender history: ${g(a)}`}$({id:r.id,error:t})}finally{k-=1}re()};async function x(){if(!f||!b)return;const e=await f.request({op:"history-events"});e.length&&$({op:"history",entries:e})}export{_ as A,ae as P,d as S,oe as a,L as b,se as o,C as s};