ufbx.vapi 106 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063
  1. /*
  2. * Copyright (c) 2012-2026 Daniele Bartolini <[email protected]>
  3. * SPDX-License-Identifier: MIT
  4. */
  5. [CCode (cheader_filename = "ufbx.h")]
  6. namespace ufbx
  7. {
  8. public const int ERROR_STACK_MAX_DEPTH;
  9. public const int PANIC_MESSAGE_LENGTH;
  10. public const int ERROR_INFO_LENGTH;
  11. [SimpleType]
  12. [CCode (cname = "ufbx_real", has_type_id = false)]
  13. public struct Real : double
  14. {
  15. }
  16. [SimpleType]
  17. [CCode (cname = "ufbx_string", destroy_function = "", has_type_id = false)]
  18. public struct String
  19. {
  20. [CCode (array_length_cname = "length", array_length_type = "size_t")]
  21. public char[] data;
  22. }
  23. [SimpleType]
  24. [CCode (cname = "ufbx_blob", destroy_function = "", has_type_id = false)]
  25. public struct Blob
  26. {
  27. [CCode (array_length_cname = "size", array_length_type = "size_t")]
  28. public void[] data;
  29. }
  30. [SimpleType]
  31. [CCode (cname = "ufbx_vec2", destroy_function = "", has_type_id = false)]
  32. public struct Vec2
  33. {
  34. public Real x;
  35. public Real y;
  36. [CCode (cname = "v")]
  37. public Real v[2];
  38. }
  39. [SimpleType]
  40. [CCode (cname = "ufbx_vec3", destroy_function = "", has_type_id = false)]
  41. public struct Vec3
  42. {
  43. public Real x;
  44. public Real y;
  45. public Real z;
  46. [CCode (cname = "v")]
  47. public Real v[3];
  48. }
  49. [SimpleType]
  50. [CCode (cname = "ufbx_vec4", destroy_function = "", has_type_id = false)]
  51. public struct Vec4
  52. {
  53. public Real x;
  54. public Real y;
  55. public Real z;
  56. public Real w;
  57. [CCode (cname = "v")]
  58. public Real v[3];
  59. }
  60. [SimpleType]
  61. [CCode (cname = "ufbx_quat", destroy_function = "", has_type_id = false)]
  62. public struct Quat
  63. {
  64. public Real x;
  65. public Real y;
  66. public Real z;
  67. public Real w;
  68. [CCode (cname = "v")]
  69. public Real v[4];
  70. }
  71. [CCode (cname = "ufbx_rotation_order", cprefix = "UFBX_ROTATION_ORDER_", has_type_id = false)]
  72. public enum RotationOrder
  73. {
  74. XYZ,
  75. XZY,
  76. YZX,
  77. YXZ,
  78. ZXY,
  79. ZYX,
  80. SPHERIC,
  81. COUNT
  82. }
  83. [SimpleType]
  84. [CCode (cname = "ufbx_transform", destroy_function = "", has_type_id = false)]
  85. public struct Transform
  86. {
  87. public Vec3 translation;
  88. public Quat rotation;
  89. public Vec3 scale;
  90. }
  91. [CCode (cname = "ufbx_matrix", destroy_function = "", has_type_id = false)]
  92. public struct Matrix
  93. {
  94. public Real m00;
  95. public Real m10;
  96. public Real m20;
  97. public Real m01;
  98. public Real m11;
  99. public Real m21;
  100. public Real m02;
  101. public Real m12;
  102. public Real m22;
  103. public Real m03;
  104. public Real m13;
  105. public Real m23;
  106. [CCode (cname = "cols")]
  107. public Vec3 cols[4];
  108. [CCode (cname = "v")]
  109. public Real v[12];
  110. }
  111. [CCode (cname = "ufbx_void_list", destroy_function = "", has_type_id = false)]
  112. public struct VoidList
  113. {
  114. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  115. public void[] data;
  116. }
  117. [CCode (cname = "ufbx_bool_list", destroy_function = "", has_type_id = false)]
  118. public struct BoolList
  119. {
  120. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  121. public bool[] data;
  122. }
  123. [CCode (cname = "ufbx_uint32_list", destroy_function = "", has_type_id = false)]
  124. public struct Uint32List
  125. {
  126. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  127. public uint32[] data;
  128. }
  129. [CCode (cname = "ufbx_real_list", destroy_function = "", has_type_id = false)]
  130. public struct RealList
  131. {
  132. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  133. public Real[] data;
  134. }
  135. [CCode (cname = "ufbx_vec2_list", destroy_function = "", has_type_id = false)]
  136. public struct Vec2List
  137. {
  138. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  139. public Vec2[] data;
  140. }
  141. [CCode (cname = "ufbx_vec3_list", destroy_function = "", has_type_id = false)]
  142. public struct Vec3List
  143. {
  144. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  145. public Vec3[] data;
  146. }
  147. [CCode (cname = "ufbx_vec4_list", destroy_function = "", has_type_id = false)]
  148. public struct Vec4List
  149. {
  150. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  151. public Vec4[] data;
  152. }
  153. [CCode (cname = "ufbx_string_list", destroy_function = "", has_type_id = false)]
  154. public struct StringList
  155. {
  156. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  157. public String[] data;
  158. }
  159. public const uint32 NO_INDEX;
  160. [CCode (cname = "ufbx_dom_value_type", cprefix = "UFBX_DOM_VALUE_", has_type_id = false)]
  161. public enum DomValueType
  162. {
  163. NUMBER,
  164. STRING,
  165. BLOB,
  166. ARRAY_I32,
  167. ARRAY_I64,
  168. ARRAY_F32,
  169. ARRAY_F64,
  170. ARRAY_BLOB,
  171. ARRAY_IGNORED,
  172. TYPE_COUNT
  173. }
  174. [CCode (cname = "ufbx_dom_value", destroy_function = "", has_type_id = false)]
  175. public struct DomValue
  176. {
  177. public DomValueType type;
  178. public String value_str;
  179. public Blob value_blob;
  180. public int64 value_int;
  181. public double value_float;
  182. }
  183. [CCode (cname = "ufbx_dom_node_list", destroy_function = "", has_type_id = false)]
  184. public struct DomNodeList
  185. {
  186. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  187. public DomNode[] data;
  188. }
  189. [CCode (cname = "ufbx_dom_value_list", destroy_function = "", has_type_id = false)]
  190. public struct DomValueList
  191. {
  192. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  193. public DomValue[] data;
  194. }
  195. [Compact]
  196. [CCode (cname = "ufbx_dom_node", destroy_function = "", has_type_id = false)]
  197. public class DomNode
  198. {
  199. public String name;
  200. public DomNodeList children;
  201. public DomValueList values;
  202. }
  203. [CCode (cname = "ufbx_int32_list", destroy_function = "", has_type_id = false)]
  204. public struct Int32List
  205. {
  206. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  207. public int32[] data;
  208. }
  209. [CCode (cname = "ufbx_int64_list", destroy_function = "", has_type_id = false)]
  210. public struct Int64List
  211. {
  212. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  213. public int64[] data;
  214. }
  215. [CCode (cname = "ufbx_float_list", destroy_function = "", has_type_id = false)]
  216. public struct FloatList
  217. {
  218. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  219. public float[] data;
  220. }
  221. [CCode (cname = "ufbx_double_list", destroy_function = "", has_type_id = false)]
  222. public struct DoubleList
  223. {
  224. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  225. public double[] data;
  226. }
  227. [CCode (cname = "ufbx_blob_list", destroy_function = "", has_type_id = false)]
  228. public struct BlobList
  229. {
  230. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  231. public Blob[] data;
  232. }
  233. [CCode (cname = "ufbx_prop_type", cprefix = "UFBX_PROP_", has_type_id = false)]
  234. public enum PropType
  235. {
  236. UNKNOWN,
  237. BOOLEAN,
  238. INTEGER,
  239. NUMBER,
  240. VECTOR,
  241. COLOR,
  242. COLOR_WITH_ALPHA,
  243. STRING,
  244. DATE_TIME,
  245. TRANSLATION,
  246. ROTATION,
  247. SCALING,
  248. DISTANCE,
  249. COMPOUND,
  250. BLOB,
  251. REFERENCE,
  252. TYPE_COUNT
  253. }
  254. [CCode (cname = "ufbx_prop_flags", cprefix = "UFBX_PROP_FLAG_", has_type_id = false)]
  255. [Flags]
  256. public enum PropFlags
  257. {
  258. ANIMATABLE,
  259. USER_DEFINED,
  260. HIDDEN,
  261. LOCK_X,
  262. LOCK_Y,
  263. LOCK_Z,
  264. LOCK_W,
  265. MUTE_X,
  266. MUTE_Y,
  267. MUTE_Z,
  268. MUTE_W,
  269. SYNTHETIC,
  270. ANIMATED,
  271. NOT_FOUND,
  272. CONNECTED,
  273. NO_VALUE,
  274. OVERRIDDEN,
  275. VALUE_REAL,
  276. VALUE_VEC2,
  277. VALUE_VEC3,
  278. VALUE_VEC4,
  279. VALUE_INT,
  280. VALUE_STR,
  281. VALUE_BLOB
  282. }
  283. [Compact]
  284. [CCode (cname = "ufbx_prop", destroy_function = "", has_type_id = false)]
  285. public class Prop
  286. {
  287. public String name;
  288. public uint32 _internal_key;
  289. public PropType type;
  290. public PropFlags flags;
  291. public String value_str;
  292. public Blob value_blob;
  293. public int64 value_int;
  294. [CCode (cname = "value_real_arr")]
  295. public Real value_real_arr[4];
  296. [CCode (cname = "value_real")]
  297. public Real value_real;
  298. [CCode (cname = "value_vec2")]
  299. public Vec2 value_vec2;
  300. [CCode (cname = "value_vec3")]
  301. public Vec3 value_vec3;
  302. [CCode (cname = "value_vec4")]
  303. public Vec4 value_vec4;
  304. }
  305. [CCode (cname = "ufbx_prop_list", destroy_function = "", has_type_id = false)]
  306. public struct PropList
  307. {
  308. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  309. public Prop[] data;
  310. }
  311. [CCode (cname = "ufbx_props", destroy_function = "", has_type_id = false)]
  312. public struct Props
  313. {
  314. public PropList props;
  315. public size_t num_animated;
  316. public unowned Props? defaults;
  317. }
  318. [CCode (cname = "ufbx_element_list", destroy_function = "", has_type_id = false)]
  319. public struct ElementList
  320. {
  321. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  322. public Element[] data;
  323. }
  324. [CCode (cname = "ufbx_unknown_list", destroy_function = "", has_type_id = false)]
  325. public struct UnknownList
  326. {
  327. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  328. public Unknown[] data;
  329. }
  330. [CCode (cname = "ufbx_node_list", destroy_function = "", has_type_id = false)]
  331. public struct NodeList
  332. {
  333. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  334. public (unowned Node)[] data;
  335. }
  336. [CCode (cname = "ufbx_mesh_list", destroy_function = "", has_type_id = false)]
  337. public struct MeshList
  338. {
  339. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  340. public Mesh[] data;
  341. }
  342. [CCode (cname = "ufbx_light_list", destroy_function = "", has_type_id = false)]
  343. public struct LightList
  344. {
  345. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  346. public Light[] data;
  347. }
  348. [CCode (cname = "ufbx_camera_list", destroy_function = "", has_type_id = false)]
  349. public struct CameraList
  350. {
  351. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  352. public Camera[] data;
  353. }
  354. [CCode (cname = "ufbx_bone_list", destroy_function = "", has_type_id = false)]
  355. public struct BoneList
  356. {
  357. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  358. public Bone[] data;
  359. }
  360. [CCode (cname = "ufbx_empty_list", destroy_function = "", has_type_id = false)]
  361. public struct EmptyList
  362. {
  363. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  364. public Empty[] data;
  365. }
  366. [CCode (cname = "ufbx_line_curve_list", destroy_function = "", has_type_id = false)]
  367. public struct LineCurveList
  368. {
  369. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  370. public LineCurve[] data;
  371. }
  372. [CCode (cname = "ufbx_nurbs_curve_list", destroy_function = "", has_type_id = false)]
  373. public struct NurbsCurveList
  374. {
  375. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  376. public NurbsCurve[] data;
  377. }
  378. [CCode (cname = "ufbx_nurbs_surface_list", destroy_function = "", has_type_id = false)]
  379. public struct NurbsSurfaceList
  380. {
  381. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  382. public NurbsSurface[] data;
  383. }
  384. [CCode (cname = "ufbx_nurbs_trim_surface_list", destroy_function = "", has_type_id = false)]
  385. public struct NurbsTrimSurfaceList
  386. {
  387. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  388. public NurbsTrimSurface[] data;
  389. }
  390. [CCode (cname = "ufbx_nurbs_trim_boundary_list", destroy_function = "", has_type_id = false)]
  391. public struct NurbsTrimBoundaryList
  392. {
  393. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  394. public NurbsTrimBoundary[] data;
  395. }
  396. [CCode (cname = "ufbx_procedural_geometry_list", destroy_function = "", has_type_id = false)]
  397. public struct ProceduralGeometryList
  398. {
  399. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  400. public ProceduralGeometry[] data;
  401. }
  402. [CCode (cname = "ufbx_stereo_camera_list", destroy_function = "", has_type_id = false)]
  403. public struct StereoCameraList
  404. {
  405. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  406. public StereoCamera[] data;
  407. }
  408. [CCode (cname = "ufbx_camera_switcher_list", destroy_function = "", has_type_id = false)]
  409. public struct CameraSwitcherList
  410. {
  411. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  412. public CameraSwitcher[] data;
  413. }
  414. [CCode (cname = "ufbx_marker_list", destroy_function = "", has_type_id = false)]
  415. public struct MarkerList
  416. {
  417. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  418. public Marker[] data;
  419. }
  420. [CCode (cname = "ufbx_lod_group_list", destroy_function = "", has_type_id = false)]
  421. public struct LogGroupList
  422. {
  423. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  424. public LodGroup[] data;
  425. }
  426. [CCode (cname = "ufbx_skin_deformer_list", destroy_function = "", has_type_id = false)]
  427. public struct SkinDeformerList
  428. {
  429. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  430. public SkinDeformer[] data;
  431. }
  432. [CCode (cname = "ufbx_skin_cluster_list", destroy_function = "", has_type_id = false)]
  433. public struct SkinClusterList
  434. {
  435. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  436. public SkinCluster[] data;
  437. }
  438. [CCode (cname = "ufbx_blend_deformer_list", destroy_function = "", has_type_id = false)]
  439. public struct BlendDeformerList
  440. {
  441. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  442. public BlendDeformer[] data;
  443. }
  444. [CCode (cname = "ufbx_blend_channel_list", destroy_function = "", has_type_id = false)]
  445. public struct BlendChannelList
  446. {
  447. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  448. public BlendChannel[] data;
  449. }
  450. [CCode (cname = "ufbx_blend_shape_list", destroy_function = "", has_type_id = false)]
  451. public struct BlendShapeList
  452. {
  453. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  454. public BlendShape[] data;
  455. }
  456. [CCode (cname = "ufbx_cache_deformer_list", destroy_function = "", has_type_id = false)]
  457. public struct CacheDeformerList
  458. {
  459. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  460. public CacheDeformer[] data;
  461. }
  462. [CCode (cname = "ufbx_cache_file_list", destroy_function = "", has_type_id = false)]
  463. public struct CacheFileList
  464. {
  465. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  466. public CacheFile[] data;
  467. }
  468. [CCode (cname = "ufbx_material_list", destroy_function = "", has_type_id = false)]
  469. public struct MaterialList
  470. {
  471. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  472. public Material[] data;
  473. }
  474. [CCode (cname = "ufbx_texture_list", destroy_function = "", has_type_id = false)]
  475. public struct TextureList
  476. {
  477. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  478. public Texture[] data;
  479. }
  480. [CCode (cname = "ufbx_video_list", destroy_function = "", has_type_id = false)]
  481. public struct VideoList
  482. {
  483. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  484. public Video[] data;
  485. }
  486. [CCode (cname = "ufbx_shader_list", destroy_function = "", has_type_id = false)]
  487. public struct ShaderList
  488. {
  489. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  490. public Shader[] data;
  491. }
  492. [CCode (cname = "ufbx_shader_binding_list", destroy_function = "", has_type_id = false)]
  493. public struct ShaderBindingList
  494. {
  495. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  496. public ShaderBinding[] data;
  497. }
  498. [CCode (cname = "ufbx_anim_stack_list", destroy_function = "", has_type_id = false)]
  499. public struct AnimStackList
  500. {
  501. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  502. public AnimStack[] data;
  503. }
  504. [CCode (cname = "ufbx_anim_layer_list", destroy_function = "", has_type_id = false)]
  505. public struct AnimLayerList
  506. {
  507. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  508. public AnimLayer[] data;
  509. }
  510. [CCode (cname = "ufbx_anim_value_list", destroy_function = "", has_type_id = false)]
  511. public struct AnimValueList
  512. {
  513. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  514. public AnimValue[] data;
  515. }
  516. [CCode (cname = "ufbx_anim_curve_list", destroy_function = "", has_type_id = false)]
  517. public struct AnimCurveList
  518. {
  519. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  520. public AnimCurve[] data;
  521. }
  522. [CCode (cname = "ufbx_display_layer_list", destroy_function = "", has_type_id = false)]
  523. public struct DisplayLayerList
  524. {
  525. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  526. public DisplayLayer[] data;
  527. }
  528. [CCode (cname = "ufbx_selection_set_list", destroy_function = "", has_type_id = false)]
  529. public struct SelectionSetList
  530. {
  531. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  532. public SelectionSet[] data;
  533. }
  534. [CCode (cname = "ufbx_selection_node_list", destroy_function = "", has_type_id = false)]
  535. public struct SelectionNodeList
  536. {
  537. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  538. public SelectionNode[] data;
  539. }
  540. [CCode (cname = "ufbx_character_list", destroy_function = "", has_type_id = false)]
  541. public struct CharacterList
  542. {
  543. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  544. public Character[] data;
  545. }
  546. [CCode (cname = "ufbx_constraint_list", destroy_function = "", has_type_id = false)]
  547. public struct ConstraintList
  548. {
  549. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  550. public Constraint[] data;
  551. }
  552. [CCode (cname = "ufbx_audio_layer_list", destroy_function = "", has_type_id = false)]
  553. public struct AudioLayerList
  554. {
  555. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  556. public AudioLayer[] data;
  557. }
  558. [CCode (cname = "ufbx_audio_clip_list", destroy_function = "", has_type_id = false)]
  559. public struct AudioClipList
  560. {
  561. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  562. public AudioClip[] data;
  563. }
  564. [CCode (cname = "ufbx_pose_list", destroy_function = "", has_type_id = false)]
  565. public struct PoseList
  566. {
  567. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  568. public Pose[] data;
  569. }
  570. [CCode (cname = "ufbx_metadata_object_list", destroy_function = "", has_type_id = false)]
  571. public struct MetadataObjectList
  572. {
  573. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  574. public MetadataObject[] data;
  575. }
  576. [CCode (cname = "ufbx_element_type", cprefix = "UFBX_ELEMENT_", has_type_id = false)]
  577. public enum ElementType
  578. {
  579. UNKNOWN,
  580. NODE,
  581. MESH,
  582. LIGHT,
  583. CAMERA,
  584. BONE,
  585. EMPTY,
  586. LINE_CURVE,
  587. NURBS_CURVE,
  588. NURBS_SURFACE,
  589. NURBS_TRIM_SURFACE,
  590. NURBS_TRIM_BOUNDARY,
  591. PROCEDURAL_GEOMETRY,
  592. STEREO_CAMERA,
  593. CAMERA_SWITCHER,
  594. MARKER,
  595. LOD_GROUP,
  596. SKIN_DEFORMER,
  597. SKIN_CLUSTER,
  598. BLEND_DEFORMER,
  599. BLEND_CHANNEL,
  600. BLEND_SHAPE,
  601. CACHE_DEFORMER,
  602. CACHE_FILE,
  603. MATERIAL,
  604. TEXTURE,
  605. VIDEO,
  606. SHADER,
  607. SHADER_BINDING,
  608. ANIM_STACK,
  609. ANIM_LAYER,
  610. ANIM_VALUE,
  611. ANIM_CURVE,
  612. DISPLAY_LAYER,
  613. SELECTION_SET,
  614. SELECTION_NODE,
  615. CHARACTER,
  616. CONSTRAINT,
  617. AUDIO_LAYER,
  618. AUDIO_CLIP,
  619. POSE,
  620. METADATA_OBJECT,
  621. TYPE_COUNT,
  622. TYPE_FIRST_ATTRIB = MESH,
  623. TYPE_LAST_ATTRIB = LOD_GROUP,
  624. }
  625. [SimpleType]
  626. [CCode (cname = "ufbx_connection", destroy_function = "", has_type_id = false)]
  627. public struct Connection
  628. {
  629. public unowned Element src;
  630. public unowned Element dst;
  631. public String src_prop;
  632. public String dst_prop;
  633. }
  634. [CCode (cname = "ufbx_connection_list", destroy_function = "", has_type_id = false)]
  635. public struct ConnectionList
  636. {
  637. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  638. public Connection[] data;
  639. }
  640. [Compact]
  641. [CCode (cname = "ufbx_element", destroy_function = "", has_type_id = false)]
  642. public class Element
  643. {
  644. public String name;
  645. public Props props;
  646. public uint32 element_id;
  647. public uint32 typed_id;
  648. public NodeList instances;
  649. public ElementType type;
  650. public ConnectionList connections_src;
  651. public ConnectionList connections_dst;
  652. public unowned DomNode? dom_node;
  653. public unowned Scene scene;
  654. }
  655. [Compact]
  656. [CCode (cname = "ufbx_unknown", destroy_function = "", has_type_id = false)]
  657. public class Unknown
  658. {
  659. [CCode (cname = "element")]
  660. public Element element;
  661. [CCode (cname = "name")]
  662. public String name;
  663. [CCode (cname = "props")]
  664. public Props props;
  665. [CCode (cname = "element_id")]
  666. public uint32 element_id;
  667. [CCode (cname = "typed_id")]
  668. public uint32 typed_id;
  669. public String type;
  670. public String super_type;
  671. public String sub_type;
  672. }
  673. [CCode (cname = "ufbx_inherit_mode", cprefix = "UFBX_INHERIT_MODE_", has_type_id = false)]
  674. public enum InheritMode
  675. {
  676. NORMAL,
  677. IGNORE_PARENT_SCALE,
  678. COMPONENTWISE_SCALE,
  679. COUNT
  680. }
  681. [CCode (cname = "ufbx_mirror_axis", cprefix = "UFBX_MIRROR_AXIS_", has_type_id = false)]
  682. public enum MirrorAxis
  683. {
  684. NONE,
  685. X,
  686. Y,
  687. Z,
  688. COUNT
  689. }
  690. [Compact]
  691. [CCode (cname = "ufbx_node", destroy_function = "", has_type_id = false)]
  692. public class Node
  693. {
  694. [CCode (cname = "element")]
  695. public Element element;
  696. [CCode (cname = "name")]
  697. public String name;
  698. [CCode (cname = "props")]
  699. public Props props;
  700. [CCode (cname = "element_id")]
  701. public uint32 element_id;
  702. [CCode (cname = "typed_id")]
  703. public uint32 typed_id;
  704. public unowned Node? parent;
  705. public NodeList children;
  706. public unowned Mesh? mesh;
  707. public unowned Light? light;
  708. public unowned Camera? camera;
  709. public unowned Bone? bone;
  710. public unowned Element? attrib;
  711. public unowned Node? geometry_transform_helper;
  712. public unowned Node? scale_helper;
  713. public ElementType attrib_type;
  714. public ElementList all_attribs;
  715. public InheritMode inherit_mode;
  716. public InheritMode original_inherit_mode;
  717. public Transform local_transform;
  718. public Transform geometry_transform;
  719. public Vec3 inherit_scale;
  720. public unowned Node? inherit_scale_node;
  721. public RotationOrder rotation_order;
  722. public Vec3 euler_rotation;
  723. public Matrix node_to_parent;
  724. public Matrix node_to_world;
  725. public Matrix geometry_to_node;
  726. public Matrix geometry_to_world;
  727. public Matrix unscaled_node_to_world;
  728. public Vec3 adjust_pre_translation;
  729. public Quat adjust_pre_rotation;
  730. public Real adjust_pre_scale;
  731. public Quat adjust_post_rotation;
  732. public Real adjust_post_scale;
  733. public Real adjust_translation_scale;
  734. public MirrorAxis adjust_mirror_axis;
  735. public MaterialList materials;
  736. public unowned Pose? bind_pose;
  737. public bool visible;
  738. public bool is_root;
  739. public bool has_geometry_transform;
  740. public bool has_adjust_transform;
  741. public bool has_root_adjust_transform;
  742. public bool is_geometry_transform_helper;
  743. public bool is_scale_helper;
  744. public bool is_scale_compensate_parent;
  745. public uint32 node_depth;
  746. }
  747. [CCode (cname = "ufbx_vertex_attrib", destroy_function = "", has_type_id = false)]
  748. public struct VertexAttrib
  749. {
  750. public bool exists;
  751. public VoidList values;
  752. public Uint32List indices;
  753. public size_t value_reals;
  754. public bool unique_per_vertex;
  755. public RealList values_w;
  756. }
  757. [CCode (cname = "ufbx_vertex_real", destroy_function = "", has_type_id = false)]
  758. public struct VertexReal
  759. {
  760. public bool exists;
  761. public RealList values;
  762. public Uint32List indices;
  763. public size_t value_reals;
  764. public bool unique_per_vertex;
  765. public RealList values_w;
  766. }
  767. [CCode (cname = "ufbx_vertex_vec2", destroy_function = "", has_type_id = false)]
  768. public struct VertexVec2
  769. {
  770. public bool exists;
  771. public Vec2List values;
  772. public Uint32List indices;
  773. public size_t value_reals;
  774. public bool unique_per_vertex;
  775. public RealList values_w;
  776. }
  777. [CCode (cname = "ufbx_vertex_vec3", destroy_function = "", has_type_id = false)]
  778. public struct VertexVec3
  779. {
  780. public bool exists;
  781. public Vec3List values;
  782. public Uint32List indices;
  783. public size_t value_reals;
  784. public bool unique_per_vertex;
  785. public RealList values_w;
  786. }
  787. [CCode (cname = "ufbx_vertex_vec4", destroy_function = "", has_type_id = false)]
  788. public struct VertexVec4
  789. {
  790. public bool exists;
  791. public Vec4List values;
  792. public Uint32List indices;
  793. public size_t value_reals;
  794. public bool unique_per_vertex;
  795. public RealList values_w;
  796. }
  797. [SimpleType]
  798. [CCode (cname = "ufbx_uv_set", destroy_function = "", has_type_id = false)]
  799. public struct UvSet
  800. {
  801. public String name;
  802. public uint32 index;
  803. public VertexVec2 vertex_uv;
  804. public VertexVec3 vertex_tangent;
  805. public VertexVec3 vertex_bitangent;
  806. }
  807. [SimpleType]
  808. [CCode (cname = "ufbx_color_set", destroy_function = "", has_type_id = false)]
  809. public struct ColorSet
  810. {
  811. public String name;
  812. public uint32 index;
  813. public VertexVec4 vertex_color;
  814. }
  815. [CCode (cname = "ufbx_uv_set_list", destroy_function = "", has_type_id = false)]
  816. public struct UvSetList
  817. {
  818. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  819. public UvSet[] data;
  820. }
  821. [CCode (cname = "ufbx_color_set_list", destroy_function = "", has_type_id = false)]
  822. public struct ColorSetList
  823. {
  824. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  825. public ColorSet[] data;
  826. }
  827. [SimpleType]
  828. [CCode (cname = "ufbx_edge", destroy_function = "", has_type_id = false)]
  829. public struct Edge
  830. {
  831. [CCode (cname = "a")]
  832. public uint32 a;
  833. [CCode (cname = "b")]
  834. public uint32 b;
  835. [CCode (cname = "indices")]
  836. public uint32 indices[2];
  837. }
  838. [CCode (cname = "ufbx_edge_list", destroy_function = "", has_type_id = false)]
  839. public struct EdgeList
  840. {
  841. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  842. public Edge[] data;
  843. }
  844. [SimpleType]
  845. [CCode (cname = "ufbx_face", destroy_function = "", has_type_id = false)]
  846. public struct Face
  847. {
  848. public uint32 index_begin;
  849. public uint32 num_indices;
  850. }
  851. [CCode (cname = "ufbx_face_list", destroy_function = "", has_type_id = false)]
  852. public struct FaceList
  853. {
  854. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  855. public Face[] data;
  856. }
  857. [SimpleType]
  858. [CCode (cname = "ufbx_mesh_part", destroy_function = "", has_type_id = false)]
  859. public struct MeshPart
  860. {
  861. public uint32 index;
  862. public size_t num_faces;
  863. public size_t num_triangles;
  864. public size_t num_empty_faces;
  865. public size_t num_point_faces;
  866. public size_t num_line_faces;
  867. public Uint32List face_indices;
  868. }
  869. [CCode (cname = "ufbx_mesh_part_list", destroy_function = "", has_type_id = false)]
  870. public struct MeshPartList
  871. {
  872. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  873. public MeshPart[] data;
  874. }
  875. [Compact]
  876. [CCode (cname = "ufbx_face_group", destroy_function = "", has_type_id = false)]
  877. public struct FaceGroup
  878. {
  879. public int32 id;
  880. public String name;
  881. }
  882. [CCode (cname = "ufbx_face_group_list", destroy_function = "", has_type_id = false)]
  883. public struct FaceGroupList
  884. {
  885. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  886. public FaceGroup[] data;
  887. }
  888. [SimpleType]
  889. [CCode (cname = "ufbx_subdivision_weight_range", destroy_function = "", has_type_id = false)]
  890. public struct SubdivisionWeightRange
  891. {
  892. public uint32 weight_begin;
  893. public uint32 num_weights;
  894. }
  895. [CCode (cname = "ufbx_subdivision_weight_range_list", destroy_function = "", has_type_id = false)]
  896. public struct SubdivisionWeightRangeList
  897. {
  898. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  899. public SubdivisionWeightRange[] data;
  900. }
  901. [SimpleType]
  902. [CCode (cname = "ufbx_subdivision_weight", destroy_function = "", has_type_id = false)]
  903. public struct SubdivisionWeight
  904. {
  905. public Real weight;
  906. public uint32 index;
  907. }
  908. [CCode (cname = "ufbx_subdivision_weight_list", destroy_function = "", has_type_id = false)]
  909. public struct SubdivisionWeightList
  910. {
  911. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  912. public SubdivisionWeight[] data;
  913. }
  914. [CCode (cname = "ufbx_subdivision_result", destroy_function = "", has_type_id = false)]
  915. public struct SubdivisionResult
  916. {
  917. public size_t result_memory_used;
  918. public size_t temp_memory_used;
  919. public size_t result_allocs;
  920. public size_t temp_allocs;
  921. public SubdivisionWeightRangeList source_vertex_ranges;
  922. public SubdivisionWeightList source_vertex_weights;
  923. public SubdivisionWeightRangeList skin_cluster_ranges;
  924. public SubdivisionWeightList skin_cluster_weights;
  925. }
  926. [CCode (cname = "ufbx_subdivision_display_mode", cprefix = "UFBX_SUBDIVISION_DISPLAY_", has_type_id = false)]
  927. public enum SubdivisionDisplayMode
  928. {
  929. DISABLED,
  930. HULL,
  931. HULL_AND_SMOOTH,
  932. SMOOTH,
  933. MODE_COUNT
  934. }
  935. [CCode (cname = "ufbx_subdivision_boundary", cprefix = "UFBX_SUBDIVISION_BOUNDARY_", has_type_id = false)]
  936. public enum SubdivisionBoundary
  937. {
  938. DEFAULT,
  939. LEGACY,
  940. SHARP_CORNERS,
  941. SHARP_NONE,
  942. SHARP_BOUNDARY,
  943. SHARP_INTERIOR,
  944. COUNT
  945. }
  946. [Compact]
  947. [CCode (cname = "ufbx_mesh", destroy_function = "", has_type_id = false)]
  948. public class Mesh
  949. {
  950. [CCode (cname = "element")]
  951. public Element element;
  952. [CCode (cname = "name")]
  953. public String name;
  954. [CCode (cname = "props")]
  955. public Props props;
  956. [CCode (cname = "element_id")]
  957. public uint32 element_id;
  958. [CCode (cname = "typed_id")]
  959. public uint32 typed_id;
  960. [CCode (cname = "instances")]
  961. public NodeList instances;
  962. public size_t num_vertices;
  963. public size_t num_indices;
  964. public size_t num_faces;
  965. public size_t num_triangles;
  966. public size_t num_edges;
  967. public size_t max_face_triangles;
  968. public size_t num_empty_faces;
  969. public size_t num_point_faces;
  970. public size_t num_line_faces;
  971. public FaceList faces;
  972. public BoolList face_smoothing;
  973. public Uint32List face_material;
  974. public Uint32List face_group;
  975. public BoolList face_hole;
  976. public EdgeList edges;
  977. public BoolList edge_smoothing;
  978. public RealList edge_crease;
  979. public BoolList edge_visibility;
  980. public Uint32List vertex_indices;
  981. public Vec3List vertices;
  982. public Uint32List vertex_first_index;
  983. public VertexVec3 vertex_position;
  984. public VertexVec3 vertex_normal;
  985. public VertexVec2 vertex_uv;
  986. public VertexVec3 vertex_tangent;
  987. public VertexVec3 vertex_bitangent;
  988. public VertexVec4 vertex_color;
  989. public VertexReal vertex_crease;
  990. public UvSetList uv_sets;
  991. public ColorSetList color_sets;
  992. public MaterialList materials;
  993. public FaceGroupList face_groups;
  994. public MeshPartList material_parts;
  995. public MeshPartList face_group_parts;
  996. public Uint32List material_part_usage_order;
  997. public bool skinned_is_local;
  998. public VertexVec3 skinned_position;
  999. public VertexVec3 skinned_normal;
  1000. public SkinDeformerList skin_deformers;
  1001. public BlendDeformerList blend_deformers;
  1002. public CacheDeformerList cache_deformers;
  1003. public ElementList all_deformers;
  1004. public uint32 subdivision_preview_levels;
  1005. public uint32 subdivision_render_levels;
  1006. public SubdivisionDisplayMode subdivision_display_mode;
  1007. public SubdivisionBoundary subdivision_boundary;
  1008. public SubdivisionBoundary subdivision_uv_boundary;
  1009. public bool reversed_winding;
  1010. public bool generated_normals;
  1011. public bool subdivision_evaluated;
  1012. public unowned SubdivisionResult? subdivision_result;
  1013. public bool from_tessellated_nurbs;
  1014. }
  1015. [CCode (cname = "ufbx_light_type", cprefix = "UFBX_LIGHT_", has_type_id = false)]
  1016. public enum LightType
  1017. {
  1018. POINT,
  1019. DIRECTIONAL,
  1020. SPOT,
  1021. AREA,
  1022. VOLUME,
  1023. TYPE_COUNT
  1024. }
  1025. [CCode (cname = "ufbx_light_decay", cprefix = "UFBX_LIGHT_DECAY_", has_type_id = false)]
  1026. public enum LightDecay
  1027. {
  1028. NONE,
  1029. LINEAR,
  1030. QUADRATIC,
  1031. CUBIC,
  1032. COUNT
  1033. }
  1034. [CCode (cname = "ufbx_light_area_shape", cprefix = "UFBX_LIGHT_AREA_SHAPE_", has_type_id = false)]
  1035. public enum LightAreaShape
  1036. {
  1037. RECTANGLE,
  1038. SPHERE,
  1039. COUNT
  1040. }
  1041. [Compact]
  1042. [CCode (cname = "ufbx_light", destroy_function = "", has_type_id = false)]
  1043. public class Light
  1044. {
  1045. [CCode (cname = "element")]
  1046. public Element element;
  1047. [CCode (cname = "name")]
  1048. public String name;
  1049. [CCode (cname = "props")]
  1050. public Props props;
  1051. [CCode (cname = "element_id")]
  1052. public uint32 element_id;
  1053. [CCode (cname = "typed_id")]
  1054. public uint32 typed_id;
  1055. [CCode (cname = "instances")]
  1056. public NodeList instances;
  1057. public Vec3 color;
  1058. public Real intensity;
  1059. public Vec3 local_direction;
  1060. public LightType type;
  1061. public LightDecay decay;
  1062. public LightAreaShape area_shape;
  1063. public Real inner_angle;
  1064. public Real outer_angle;
  1065. public bool cast_light;
  1066. public bool cast_shadows;
  1067. }
  1068. [CCode (cname = "ufbx_projection_mode", cprefix = "UFBX_PROJECTION_MODE_", has_type_id = false)]
  1069. public enum ProjectionMode
  1070. {
  1071. PERSPECTIVE,
  1072. ORTHOGRAPHIC,
  1073. COUNT
  1074. }
  1075. [CCode (cname = "ufbx_aspect_mode", cprefix = "UFBX_ASPECT_MODE_", has_type_id = false)]
  1076. public enum AspectMode
  1077. {
  1078. WINDOW_SIZE,
  1079. FIXED_RATIO,
  1080. FIXED_RESOLUTION,
  1081. FIXED_WIDTH,
  1082. FIXED_HEIGHT,
  1083. COUNT
  1084. }
  1085. [CCode (cname = "ufbx_aperture_mode", cprefix = "UFBX_APERTURE_MODE_", has_type_id = false)]
  1086. public enum ApertureMode
  1087. {
  1088. HORIZONTAL_AND_VERTICAL,
  1089. HORIZONTAL,
  1090. VERTICAL,
  1091. FOCAL_LENGTH,
  1092. COUNT
  1093. }
  1094. [CCode (cname = "ufbx_gate_fit", cprefix = "UFBX_GATE_FIT_", has_type_id = false)]
  1095. public enum GateFit
  1096. {
  1097. NONE,
  1098. VERTICAL,
  1099. HORIZONTAL,
  1100. FILL,
  1101. OVERSCAN,
  1102. STRETCH,
  1103. COUNT
  1104. }
  1105. [CCode (cname = "ufbx_aperture_format", cprefix = "UFBX_APERTURE_FORMAT_", has_type_id = false)]
  1106. public enum ApertureFormat
  1107. {
  1108. CUSTOM,
  1109. 16MM_THEATRICAL,
  1110. SUPER_16MM,
  1111. 35MM_ACADEMY,
  1112. 35MM_TV_PROJECTION,
  1113. 35MM_FULL_APERTURE,
  1114. 35MM_185_PROJECTION,
  1115. 35MM_ANAMORPHIC,
  1116. 70MM_PROJECTION,
  1117. VISTAVISION,
  1118. DYNAVISION,
  1119. IMAX,
  1120. COUNT
  1121. }
  1122. [CCode (cname = "ufbx_coordinate_axis", cprefix = "UFBX_COORDINATE_AXIS_", has_type_id = false)]
  1123. public enum CoordinateAxis
  1124. {
  1125. POSITIVE_X,
  1126. NEGATIVE_X,
  1127. POSITIVE_Y,
  1128. NEGATIVE_Y,
  1129. POSITIVE_Z,
  1130. NEGATIVE_Z,
  1131. UNKNOWN,
  1132. COUNT
  1133. }
  1134. [SimpleType]
  1135. [CCode (cname = "ufbx_coordinate_axes", has_type_id = false)]
  1136. public struct CoordinateAxes
  1137. {
  1138. public CoordinateAxis right;
  1139. public CoordinateAxis up;
  1140. public CoordinateAxis front;
  1141. [CCode (cname = "ufbx_axes_right_handed_y_up")]
  1142. public const CoordinateAxes RIGHT_HANDED_Y_UP;
  1143. [CCode (cname = "ufbx_axes_right_handed_z_up")]
  1144. public const CoordinateAxes RIGHT_HANDED_Z_UP;
  1145. [CCode (cname = "ufbx_axes_left_handed_y_up")]
  1146. public const CoordinateAxes LEFT_HANDED_Y_UP;
  1147. [CCode (cname = "ufbx_axes_left_handed_z_up")]
  1148. public const CoordinateAxes LEFT_HANDED_Z_UP;
  1149. }
  1150. [Compact]
  1151. [CCode (cname = "ufbx_camera", destroy_function = "", has_type_id = false)]
  1152. public class Camera
  1153. {
  1154. [CCode (cname = "element")]
  1155. public Element element;
  1156. [CCode (cname = "name")]
  1157. public String name;
  1158. [CCode (cname = "props")]
  1159. public Props props;
  1160. [CCode (cname = "element_id")]
  1161. public uint32 element_id;
  1162. [CCode (cname = "typed_id")]
  1163. public uint32 typed_id;
  1164. [CCode (cname = "instances")]
  1165. public NodeList instances;
  1166. public ProjectionMode projection_mode;
  1167. public bool resolution_is_pixels;
  1168. public Vec2 resolution;
  1169. public Vec2 field_of_view_deg;
  1170. public Vec2 field_of_view_tan;
  1171. public Real orthographic_extent;
  1172. public Vec2 orthographic_size;
  1173. public Vec2 projection_plane;
  1174. public Real aspect_ratio;
  1175. public Real near_plane;
  1176. public Real far_plane;
  1177. public CoordinateAxes projection_axes;
  1178. public AspectMode aspect_mode;
  1179. public ApertureMode aperture_mode;
  1180. public GateFit gate_fit;
  1181. public ApertureFormat aperture_format;
  1182. public Real focal_length_mm;
  1183. public Vec2 film_size_inch;
  1184. public Vec2 aperture_size_inch;
  1185. public Real squeeze_ratio;
  1186. }
  1187. [Compact]
  1188. [CCode (cname = "ufbx_bone", destroy_function = "", has_type_id = false)]
  1189. public class Bone
  1190. {
  1191. [CCode (cname = "element")]
  1192. public Element element;
  1193. [CCode (cname = "name")]
  1194. public String name;
  1195. [CCode (cname = "props")]
  1196. public Props props;
  1197. [CCode (cname = "element_id")]
  1198. public uint32 element_id;
  1199. [CCode (cname = "typed_id")]
  1200. public uint32 typed_id;
  1201. [CCode (cname = "instances")]
  1202. public NodeList instances;
  1203. public Real radius;
  1204. public Real relative_length;
  1205. public bool is_root;
  1206. }
  1207. [Compact]
  1208. [CCode (cname = "ufbx_empty", destroy_function = "", has_type_id = false)]
  1209. public class Empty
  1210. {
  1211. [CCode (cname = "element")]
  1212. public Element element;
  1213. [CCode (cname = "name")]
  1214. public String name;
  1215. [CCode (cname = "props")]
  1216. public Props props;
  1217. [CCode (cname = "element_id")]
  1218. public uint32 element_id;
  1219. [CCode (cname = "typed_id")]
  1220. public uint32 typed_id;
  1221. [CCode (cname = "instances")]
  1222. public NodeList instances;
  1223. }
  1224. [SimpleType]
  1225. [CCode (cname = "ufbx_line_segment", destroy_function = "", has_type_id = false)]
  1226. public struct LineSegment
  1227. {
  1228. public uint32 index_begin;
  1229. public uint32 num_indices;
  1230. }
  1231. [CCode (cname = "ufbx_line_segment_list", destroy_function = "", has_type_id = false)]
  1232. public struct LineSegmentList
  1233. {
  1234. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  1235. public LineSegment[] data;
  1236. }
  1237. [Compact]
  1238. [CCode (cname = "ufbx_line_curve", destroy_function = "", has_type_id = false)]
  1239. public class LineCurve
  1240. {
  1241. [CCode (cname = "element")]
  1242. public Element element;
  1243. [CCode (cname = "name")]
  1244. public String name;
  1245. [CCode (cname = "props")]
  1246. public Props props;
  1247. [CCode (cname = "element_id")]
  1248. public uint32 element_id;
  1249. [CCode (cname = "typed_id")]
  1250. public uint32 typed_id;
  1251. [CCode (cname = "instances")]
  1252. public NodeList instances;
  1253. public Vec3 color;
  1254. public Vec3List control_points;
  1255. public Uint32List point_indices;
  1256. public LineSegmentList segments;
  1257. public bool from_tessellated_nurbs;
  1258. }
  1259. [CCode (cname = "ufbx_nurbs_topology", cprefix = "UFBX_NURBS_TOPOLOGY_", has_type_id = false)]
  1260. public enum NurbsTopology
  1261. {
  1262. OPEN,
  1263. PERIODIC,
  1264. CLOSED,
  1265. COUNT
  1266. }
  1267. [CCode (cname = "ufbx_nurbs_basis", destroy_function = "", has_type_id = false)]
  1268. public struct NurbsBasis
  1269. {
  1270. public uint32 order;
  1271. public NurbsTopology topology;
  1272. public RealList knot_vector;
  1273. public Real t_min;
  1274. public Real t_max;
  1275. public RealList spans;
  1276. public bool is_2d;
  1277. public size_t num_wrap_control_points;
  1278. public bool valid;
  1279. }
  1280. [Compact]
  1281. [CCode (cname = "ufbx_nurbs_curve", destroy_function = "", has_type_id = false)]
  1282. public class NurbsCurve
  1283. {
  1284. [CCode (cname = "element")]
  1285. public Element element;
  1286. [CCode (cname = "name")]
  1287. public String name;
  1288. [CCode (cname = "props")]
  1289. public Props props;
  1290. [CCode (cname = "element_id")]
  1291. public uint32 element_id;
  1292. [CCode (cname = "typed_id")]
  1293. public uint32 typed_id;
  1294. [CCode (cname = "instances")]
  1295. public NodeList instances;
  1296. public NurbsBasis basis;
  1297. public Vec4List control_points;
  1298. }
  1299. [Compact]
  1300. [CCode (cname = "ufbx_nurbs_surface", destroy_function = "", has_type_id = false)]
  1301. public class NurbsSurface
  1302. {
  1303. [CCode (cname = "element")]
  1304. public Element element;
  1305. [CCode (cname = "name")]
  1306. public String name;
  1307. [CCode (cname = "props")]
  1308. public Props props;
  1309. [CCode (cname = "element_id")]
  1310. public uint32 element_id;
  1311. [CCode (cname = "typed_id")]
  1312. public uint32 typed_id;
  1313. [CCode (cname = "instances")]
  1314. public NodeList instances;
  1315. public NurbsBasis basis_u;
  1316. public NurbsBasis basis_v;
  1317. public size_t num_control_points_u;
  1318. public size_t num_control_points_v;
  1319. public Vec4List control_points;
  1320. public uint32 span_subdivision_u;
  1321. public uint32 span_subdivision_v;
  1322. public bool flip_normals;
  1323. public unowned Material? material;
  1324. }
  1325. [Compact]
  1326. [CCode (cname = "ufbx_nurbs_trim_surface", destroy_function = "", has_type_id = false)]
  1327. public class NurbsTrimSurface
  1328. {
  1329. [CCode (cname = "element")]
  1330. public Element element;
  1331. [CCode (cname = "name")]
  1332. public String name;
  1333. [CCode (cname = "props")]
  1334. public Props props;
  1335. [CCode (cname = "element_id")]
  1336. public uint32 element_id;
  1337. [CCode (cname = "typed_id")]
  1338. public uint32 typed_id;
  1339. [CCode (cname = "instances")]
  1340. public NodeList instances;
  1341. }
  1342. [Compact]
  1343. [CCode (cname = "ufbx_nurbs_trim_boundary", destroy_function = "", has_type_id = false)]
  1344. public class NurbsTrimBoundary
  1345. {
  1346. [CCode (cname = "element")]
  1347. public Element element;
  1348. [CCode (cname = "name")]
  1349. public String name;
  1350. [CCode (cname = "props")]
  1351. public Props props;
  1352. [CCode (cname = "element_id")]
  1353. public uint32 element_id;
  1354. [CCode (cname = "typed_id")]
  1355. public uint32 typed_id;
  1356. [CCode (cname = "instances")]
  1357. public NodeList instances;
  1358. }
  1359. [Compact]
  1360. [CCode (cname = "ufbx_procedural_geometry", destroy_function = "", has_type_id = false)]
  1361. public class ProceduralGeometry
  1362. {
  1363. [CCode (cname = "element")]
  1364. public Element element;
  1365. [CCode (cname = "name")]
  1366. public String name;
  1367. [CCode (cname = "props")]
  1368. public Props props;
  1369. [CCode (cname = "element_id")]
  1370. public uint32 element_id;
  1371. [CCode (cname = "typed_id")]
  1372. public uint32 typed_id;
  1373. [CCode (cname = "instances")]
  1374. public NodeList instances;
  1375. }
  1376. [Compact]
  1377. [CCode (cname = "ufbx_stereo_camera", destroy_function = "", has_type_id = false)]
  1378. public class StereoCamera
  1379. {
  1380. [CCode (cname = "element")]
  1381. public Element element;
  1382. [CCode (cname = "name")]
  1383. public String name;
  1384. [CCode (cname = "props")]
  1385. public Props props;
  1386. [CCode (cname = "element_id")]
  1387. public uint32 element_id;
  1388. [CCode (cname = "typed_id")]
  1389. public uint32 typed_id;
  1390. [CCode (cname = "instances")]
  1391. public NodeList instances;
  1392. public unowned Camera? left;
  1393. public unowned Camera? right;
  1394. }
  1395. [Compact]
  1396. [CCode (cname = "ufbx_camera_switcher", destroy_function = "", has_type_id = false)]
  1397. public class CameraSwitcher
  1398. {
  1399. [CCode (cname = "element")]
  1400. public Element element;
  1401. [CCode (cname = "name")]
  1402. public String name;
  1403. [CCode (cname = "props")]
  1404. public Props props;
  1405. [CCode (cname = "element_id")]
  1406. public uint32 element_id;
  1407. [CCode (cname = "typed_id")]
  1408. public uint32 typed_id;
  1409. [CCode (cname = "instances")]
  1410. public NodeList instances;
  1411. }
  1412. [CCode (cname = "ufbx_marker_type", cprefix = "UFBX_MARKER_", has_type_id = false)]
  1413. public enum MarkerType
  1414. {
  1415. UNKNOWN,
  1416. FK_EFFECTOR,
  1417. IK_EFFECTOR,
  1418. TYPE_COUNT
  1419. }
  1420. [Compact]
  1421. [CCode (cname = "ufbx_marker", destroy_function = "", has_type_id = false)]
  1422. public class Marker
  1423. {
  1424. [CCode (cname = "element")]
  1425. public Element element;
  1426. [CCode (cname = "name")]
  1427. public String name;
  1428. [CCode (cname = "props")]
  1429. public Props props;
  1430. [CCode (cname = "element_id")]
  1431. public uint32 element_id;
  1432. [CCode (cname = "typed_id")]
  1433. public uint32 typed_id;
  1434. [CCode (cname = "instances")]
  1435. public NodeList instances;
  1436. public MarkerType type;
  1437. }
  1438. [CCode (cname = "ufbx_lod_display", cprefix = "UFBX_LOD_DISPLAY_", has_type_id = false)]
  1439. public enum LodDisplay
  1440. {
  1441. USE_LOD,
  1442. SHOW,
  1443. HIDE,
  1444. COUNT
  1445. }
  1446. [SimpleType]
  1447. [CCode (cname = "ufbx_lod_level", destroy_function = "", has_type_id = false)]
  1448. public struct LodLevel
  1449. {
  1450. public Real distance;
  1451. public LodDisplay display;
  1452. }
  1453. [CCode (cname = "ufbx_lod_level_list", destroy_function = "", has_type_id = false)]
  1454. public struct LodLevelList
  1455. {
  1456. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  1457. public LodLevel[] data;
  1458. }
  1459. [Compact]
  1460. [CCode (cname = "ufbx_lod_group", destroy_function = "", has_type_id = false)]
  1461. public class LodGroup
  1462. {
  1463. [CCode (cname = "element")]
  1464. public Element element;
  1465. [CCode (cname = "name")]
  1466. public String name;
  1467. [CCode (cname = "props")]
  1468. public Props props;
  1469. [CCode (cname = "element_id")]
  1470. public uint32 element_id;
  1471. [CCode (cname = "typed_id")]
  1472. public uint32 typed_id;
  1473. [CCode (cname = "instances")]
  1474. public NodeList instances;
  1475. public bool relative_distances;
  1476. public LodLevelList lod_levels;
  1477. public bool ignore_parent_transform;
  1478. public bool use_distance_limit;
  1479. public Real distance_limit_min;
  1480. public Real distance_limit_max;
  1481. }
  1482. [CCode (cname = "ufbx_skinning_method", cprefix = "UFBX_SKINNING_METHOD_", has_type_id = false)]
  1483. public enum SkinningMethod
  1484. {
  1485. LINEAR,
  1486. RIGID,
  1487. DUAL_QUATERNION,
  1488. BLENDED_DQ_LINEAR,
  1489. COUNT
  1490. }
  1491. [SimpleType]
  1492. [CCode (cname = "ufbx_skin_vertex", destroy_function = "", has_type_id = false)]
  1493. public struct SkinVertex
  1494. {
  1495. public uint32 weight_begin;
  1496. public uint32 num_weights;
  1497. public Real dq_weight;
  1498. }
  1499. [CCode (cname = "ufbx_skin_vertex_list", destroy_function = "", has_type_id = false)]
  1500. public struct SkinVertexList
  1501. {
  1502. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  1503. public SkinVertex[] data;
  1504. }
  1505. [SimpleType]
  1506. [CCode (cname = "ufbx_skin_weight", destroy_function = "", has_type_id = false)]
  1507. public struct SkinWeight
  1508. {
  1509. public uint32 cluster_index;
  1510. public Real weight;
  1511. }
  1512. [CCode (cname = "ufbx_skin_weight_list", destroy_function = "", has_type_id = false)]
  1513. public struct SkinWeightList
  1514. {
  1515. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  1516. public SkinWeight[] data;
  1517. }
  1518. [Compact]
  1519. [CCode (cname = "ufbx_skin_deformer", destroy_function = "", has_type_id = false)]
  1520. public class SkinDeformer
  1521. {
  1522. [CCode (cname = "element")]
  1523. public Element element;
  1524. [CCode (cname = "name")]
  1525. public String name;
  1526. [CCode (cname = "props")]
  1527. public Props props;
  1528. [CCode (cname = "element_id")]
  1529. public uint32 element_id;
  1530. [CCode (cname = "typed_id")]
  1531. public uint32 typed_id;
  1532. public SkinningMethod skinning_method;
  1533. public SkinClusterList clusters;
  1534. public SkinVertexList vertices;
  1535. public SkinWeightList weights;
  1536. public size_t max_weights_per_vertex;
  1537. public size_t num_dq_weights;
  1538. public Uint32List dq_vertices;
  1539. public RealList dq_weights;
  1540. }
  1541. [Compact]
  1542. [CCode (cname = "ufbx_skin_cluster", destroy_function = "", has_type_id = false)]
  1543. public class SkinCluster
  1544. {
  1545. [CCode (cname = "element")]
  1546. public Element element;
  1547. [CCode (cname = "name")]
  1548. public String name;
  1549. [CCode (cname = "props")]
  1550. public Props props;
  1551. [CCode (cname = "element_id")]
  1552. public uint32 element_id;
  1553. [CCode (cname = "typed_id")]
  1554. public uint32 typed_id;
  1555. public unowned Node? bone_node;
  1556. public Matrix geometry_to_bone;
  1557. public Matrix mesh_node_to_bone;
  1558. public Matrix bind_to_world;
  1559. public Matrix geometry_to_world;
  1560. public Transform geometry_to_world_transform;
  1561. public size_t num_weights;
  1562. public Uint32List vertices;
  1563. public RealList weights;
  1564. }
  1565. [Compact]
  1566. [CCode (cname = "ufbx_blend_deformer", destroy_function = "", has_type_id = false)]
  1567. public class BlendDeformer
  1568. {
  1569. [CCode (cname = "element")]
  1570. public Element element;
  1571. [CCode (cname = "name")]
  1572. public String name;
  1573. [CCode (cname = "props")]
  1574. public Props props;
  1575. [CCode (cname = "element_id")]
  1576. public uint32 element_id;
  1577. [CCode (cname = "typed_id")]
  1578. public uint32 typed_id;
  1579. public BlendChannelList channels;
  1580. }
  1581. [SimpleType]
  1582. [CCode (cname = "ufbx_blend_keyframe", destroy_function = "", has_type_id = false)]
  1583. public struct BlendKeyframe
  1584. {
  1585. public unowned BlendShape shape;
  1586. public Real target_weight;
  1587. public Real effective_weight;
  1588. }
  1589. [CCode (cname = "ufbx_blend_keyframe_list", destroy_function = "", has_type_id = false)]
  1590. public struct BlendKeyframeList
  1591. {
  1592. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  1593. public BlendKeyframe[] data;
  1594. }
  1595. [Compact]
  1596. [CCode (cname = "ufbx_blend_channel", destroy_function = "", has_type_id = false)]
  1597. public class BlendChannel
  1598. {
  1599. [CCode (cname = "element")]
  1600. public Element element;
  1601. [CCode (cname = "name")]
  1602. public String name;
  1603. [CCode (cname = "props")]
  1604. public Props props;
  1605. [CCode (cname = "element_id")]
  1606. public uint32 element_id;
  1607. [CCode (cname = "typed_id")]
  1608. public uint32 typed_id;
  1609. public Real weight;
  1610. public BlendKeyframeList keyframes;
  1611. public unowned BlendShape? target_shape;
  1612. }
  1613. [Compact]
  1614. [CCode (cname = "ufbx_blend_shape", destroy_function = "", has_type_id = false)]
  1615. public class BlendShape
  1616. {
  1617. [CCode (cname = "element")]
  1618. public Element element;
  1619. [CCode (cname = "name")]
  1620. public String name;
  1621. [CCode (cname = "props")]
  1622. public Props props;
  1623. [CCode (cname = "element_id")]
  1624. public uint32 element_id;
  1625. [CCode (cname = "typed_id")]
  1626. public uint32 typed_id;
  1627. public size_t num_offsets;
  1628. public Uint32List offset_vertices;
  1629. public Vec3List position_offsets;
  1630. public Vec3List normal_offsets;
  1631. public RealList offset_weights;
  1632. }
  1633. [CCode (cname = "ufbx_cache_file_format", cprefix = "UFBX_CACHE_FILE_FORMAT_", has_type_id = false)]
  1634. public enum CacheFileFormat
  1635. {
  1636. UNKNOWN,
  1637. PC2,
  1638. MC,
  1639. COUNT
  1640. }
  1641. [CCode (cname = "ufbx_cache_data_format", cprefix = "UFBX_CACHE_DATA_FORMAT_", has_type_id = false)]
  1642. public enum CacheDataFormat
  1643. {
  1644. UNKNOWN,
  1645. REAL_FLOAT,
  1646. VEC3_FLOAT,
  1647. REAL_DOUBLE,
  1648. VEC3_DOUBLE,
  1649. COUNT
  1650. }
  1651. [CCode (cname = "ufbx_cache_data_encoding", cprefix = "UFBX_CACHE_DATA_ENCODING_", has_type_id = false)]
  1652. public enum CacheDataEncoding
  1653. {
  1654. UNKNOWN,
  1655. LITTLE_ENDIAN,
  1656. BIG_ENDIAN,
  1657. COUNT
  1658. }
  1659. [CCode (cname = "ufbx_cache_interpretation", cprefix = "UFBX_CACHE_INTERPRETATION_", has_type_id = false)]
  1660. public enum CacheInterpretation
  1661. {
  1662. UNKNOWN,
  1663. POINTS,
  1664. VERTEX_POSITION,
  1665. VERTEX_NORMAL,
  1666. COUNT
  1667. }
  1668. [SimpleType]
  1669. [CCode (cname = "ufbx_cache_frame", destroy_function = "", has_type_id = false)]
  1670. public struct CacheFrame
  1671. {
  1672. public String channel;
  1673. public double time;
  1674. public String filename;
  1675. public CacheFileFormat file_format;
  1676. public MirrorAxis mirror_axis;
  1677. public Real scale_factor;
  1678. public CacheDataFormat data_format;
  1679. public CacheDataEncoding data_encoding;
  1680. public uint64 data_offset;
  1681. public uint32 data_count;
  1682. public uint32 data_element_bytes;
  1683. public uint64 data_total_bytes;
  1684. }
  1685. [CCode (cname = "ufbx_cache_frame", destroy_function = "", has_type_id = false)]
  1686. public struct CacheFrameList
  1687. {
  1688. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  1689. public CacheFrame[] data;
  1690. }
  1691. [SimpleType]
  1692. [CCode (cname = "ufbx_cache_channel", destroy_function = "", has_type_id = false)]
  1693. public struct CacheChannel
  1694. {
  1695. public String name;
  1696. public CacheInterpretation interpretation;
  1697. public String interpretation_name;
  1698. public CacheFrameList frames;
  1699. public MirrorAxis mirror_axis;
  1700. public Real scale_factor;
  1701. }
  1702. [CCode (cname = "ufbx_cache_channel_list", destroy_function = "", has_type_id = false)]
  1703. public struct CacheChannelList
  1704. {
  1705. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  1706. public CacheChannel[] data;
  1707. }
  1708. [CCode (cname = "ufbx_geometry_cache", destroy_function = "", has_type_id = false)]
  1709. public struct GeometryCache
  1710. {
  1711. public String root_filename;
  1712. public CacheChannelList channels;
  1713. public CacheFrameList frames;
  1714. public StringList extra_info;
  1715. }
  1716. [Compact]
  1717. [CCode (cname = "ufbx_cache_deformer", destroy_function = "", has_type_id = false)]
  1718. public class CacheDeformer
  1719. {
  1720. [CCode (cname = "element")]
  1721. public Element element;
  1722. [CCode (cname = "name")]
  1723. public String name;
  1724. [CCode (cname = "props")]
  1725. public Props props;
  1726. [CCode (cname = "element_id")]
  1727. public uint32 element_id;
  1728. [CCode (cname = "typed_id")]
  1729. public uint32 typed_id;
  1730. public String channel;
  1731. public unowned CacheFile? file;
  1732. public unowned GeometryCache? external_cache;
  1733. public unowned CacheChannel? external_channel;
  1734. }
  1735. [Compact]
  1736. [CCode (cname = "ufbx_cache_file", destroy_function = "", has_type_id = false)]
  1737. public class CacheFile
  1738. {
  1739. [CCode (cname = "element")]
  1740. public Element element;
  1741. [CCode (cname = "name")]
  1742. public String name;
  1743. [CCode (cname = "props")]
  1744. public Props props;
  1745. [CCode (cname = "element_id")]
  1746. public uint32 element_id;
  1747. [CCode (cname = "typed_id")]
  1748. public uint32 typed_id;
  1749. public String filename;
  1750. public String absolute_filename;
  1751. public String relative_filename;
  1752. public Blob raw_filename;
  1753. public Blob raw_absolute_filename;
  1754. public Blob raw_relative_filename;
  1755. public CacheFileFormat format;
  1756. public unowned GeometryCache? external_cache;
  1757. }
  1758. [CCode (cname = "ufbx_material_map", destroy_function = "", has_type_id = false)]
  1759. public struct MaterialMap
  1760. {
  1761. [CCode (cname = "value_real")]
  1762. public Real value_real;
  1763. [CCode (cname = "value_vec2")]
  1764. public Vec2 value_vec2;
  1765. [CCode (cname = "value_vec3")]
  1766. public Vec3 value_vec3;
  1767. [CCode (cname = "value_vec4")]
  1768. public Vec4 value_vec4;
  1769. public int64 value_int;
  1770. public unowned Texture? texture;
  1771. public bool has_value;
  1772. public bool texture_enabled;
  1773. public bool feature_disabled;
  1774. public uint8 value_components;
  1775. }
  1776. [CCode (cname = "ufbx_material_feature_info", destroy_function = "", has_type_id = false)]
  1777. public struct MaterialFeatureInfo
  1778. {
  1779. public bool enabled;
  1780. public bool is_explicit;
  1781. }
  1782. [SimpleType]
  1783. [CCode (cname = "ufbx_material_texture", destroy_function = "", has_type_id = false)]
  1784. public struct MaterialTexture
  1785. {
  1786. public String material_prop;
  1787. public String shader_prop;
  1788. public unowned Texture texture;
  1789. }
  1790. [CCode (cname = "ufbx_material_texture_list", destroy_function = "", has_type_id = false)]
  1791. public struct MaterialTextureList
  1792. {
  1793. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  1794. public MaterialTexture[] data;
  1795. }
  1796. [CCode (cname = "ufbx_shader_type", cprefix = "UFBX_SHADER_", has_type_id = false)]
  1797. public enum ShaderType
  1798. {
  1799. UNKNOWN,
  1800. FBX_LAMBERT,
  1801. FBX_PHONG,
  1802. OSL_STANDARD_SURFACE,
  1803. ARNOLD_STANDARD_SURFACE,
  1804. 3DS_MAX_PHYSICAL_MATERIAL,
  1805. 3DS_MAX_PBR_METAL_ROUGH,
  1806. 3DS_MAX_PBR_SPEC_GLOSS,
  1807. GLTF_MATERIAL,
  1808. OPENPBR_MATERIAL,
  1809. SHADERFX_GRAPH,
  1810. BLENDER_PHONG,
  1811. WAVEFRONT_MTL,
  1812. TYPE_COUNT
  1813. }
  1814. [CCode (cname = "ufbx_material_fbx_map", cprefix = "UFBX_MATERIAL_FBX_", has_type_id = false)]
  1815. public enum MaterialFbxMap
  1816. {
  1817. DIFFUSE_FACTOR,
  1818. DIFFUSE_COLOR,
  1819. SPECULAR_FACTOR,
  1820. SPECULAR_COLOR,
  1821. SPECULAR_EXPONENT,
  1822. REFLECTION_FACTOR,
  1823. REFLECTION_COLOR,
  1824. TRANSPARENCY_FACTOR,
  1825. TRANSPARENCY_COLOR,
  1826. EMISSION_FACTOR,
  1827. EMISSION_COLOR,
  1828. AMBIENT_FACTOR,
  1829. AMBIENT_COLOR,
  1830. NORMAL_MAP,
  1831. BUMP,
  1832. BUMP_FACTOR,
  1833. DISPLACEMENT_FACTOR,
  1834. DISPLACEMENT,
  1835. VECTOR_DISPLACEMENT_FACTOR,
  1836. VECTOR_DISPLACEMENT,
  1837. MAP_COUNT
  1838. }
  1839. [CCode (cname = "ufbx_material_pbr_map", cprefix = "UFBX_MATERIAL_PBR_", has_type_id = false)]
  1840. public enum MaterialPbrMap
  1841. {
  1842. BASE_FACTOR,
  1843. BASE_COLOR,
  1844. ROUGHNESS,
  1845. METALNESS,
  1846. DIFFUSE_ROUGHNESS,
  1847. SPECULAR_FACTOR,
  1848. SPECULAR_COLOR,
  1849. SPECULAR_IOR,
  1850. SPECULAR_ANISOTROPY,
  1851. SPECULAR_ROTATION,
  1852. TRANSMISSION_FACTOR,
  1853. TRANSMISSION_COLOR,
  1854. TRANSMISSION_DEPTH,
  1855. TRANSMISSION_SCATTER,
  1856. TRANSMISSION_SCATTER_ANISOTROPY,
  1857. TRANSMISSION_DISPERSION,
  1858. TRANSMISSION_ROUGHNESS,
  1859. TRANSMISSION_EXTRA_ROUGHNESS,
  1860. TRANSMISSION_PRIORITY,
  1861. TRANSMISSION_ENABLE_IN_AOV,
  1862. SUBSURFACE_FACTOR,
  1863. SUBSURFACE_COLOR,
  1864. SUBSURFACE_RADIUS,
  1865. SUBSURFACE_SCALE,
  1866. SUBSURFACE_ANISOTROPY,
  1867. SUBSURFACE_TINT_COLOR,
  1868. SUBSURFACE_TYPE,
  1869. SHEEN_FACTOR,
  1870. SHEEN_COLOR,
  1871. SHEEN_ROUGHNESS,
  1872. COAT_FACTOR,
  1873. COAT_COLOR,
  1874. COAT_ROUGHNESS,
  1875. COAT_IOR,
  1876. COAT_ANISOTROPY,
  1877. COAT_ROTATION,
  1878. COAT_NORMAL,
  1879. COAT_AFFECT_BASE_COLOR,
  1880. COAT_AFFECT_BASE_ROUGHNESS,
  1881. THIN_FILM_FACTOR,
  1882. THIN_FILM_THICKNESS,
  1883. THIN_FILM_IOR,
  1884. EMISSION_FACTOR,
  1885. EMISSION_COLOR,
  1886. OPACITY,
  1887. INDIRECT_DIFFUSE,
  1888. INDIRECT_SPECULAR,
  1889. NORMAL_MAP,
  1890. TANGENT_MAP,
  1891. DISPLACEMENT_MAP,
  1892. MATTE_FACTOR,
  1893. MATTE_COLOR,
  1894. AMBIENT_OCCLUSION,
  1895. GLOSSINESS,
  1896. COAT_GLOSSINESS,
  1897. TRANSMISSION_GLOSSINESS,
  1898. MAP_COUNT
  1899. }
  1900. [CCode (cname = "ufbx_extrapolation_mode", cprefix = "UFBX_EXTRAPOLATION_", has_type_id = false)]
  1901. public enum ExtrapolationMode
  1902. {
  1903. CONSTANT,
  1904. REPEAT,
  1905. MIRROR,
  1906. SLOPE,
  1907. REPEAT_RELATIVE,
  1908. COUNT
  1909. }
  1910. [SimpleType]
  1911. [CCode (cname = "ufbx_extrapolation", destroy_function = "", has_type_id = false)]
  1912. public struct Extrapolation
  1913. {
  1914. public ExtrapolationMode mode;
  1915. public int32 repeat_count;
  1916. }
  1917. [CCode (cname = "ufbx_material_feature", cprefix = "UFBX_MATERIAL_FEATURE_", has_type_id = false)]
  1918. public enum MaterialFeature
  1919. {
  1920. PBR,
  1921. METALNESS,
  1922. DIFFUSE,
  1923. SPECULAR,
  1924. EMISSION,
  1925. TRANSMISSION,
  1926. COAT,
  1927. SHEEN,
  1928. OPACITY,
  1929. AMBIENT_OCCLUSION,
  1930. MATTE,
  1931. UNLIT,
  1932. IOR,
  1933. DIFFUSE_ROUGHNESS,
  1934. TRANSMISSION_ROUGHNESS,
  1935. THIN_WALLED,
  1936. CAUSTICS,
  1937. EXIT_TO_BACKGROUND,
  1938. INTERNAL_REFLECTIONS,
  1939. DOUBLE_SIDED,
  1940. ROUGHNESS_AS_GLOSSINESS,
  1941. COAT_ROUGHNESS_AS_GLOSSINESS,
  1942. TRANSMISSION_ROUGHNESS_AS_GLOSSINESS,
  1943. COUNT
  1944. }
  1945. [CCode (cname = "ufbx_material_fbx_maps", destroy_function = "", has_type_id = false)]
  1946. public struct MaterialFbxMaps
  1947. {
  1948. [CCode (cname = "maps")]
  1949. public MaterialMap maps[MaterialFbxMap.MAP_COUNT];
  1950. [CCode (cname = "diffuse_factor")]
  1951. public MaterialMap diffuse_factor;
  1952. [CCode (cname = "diffuse_color")]
  1953. public MaterialMap diffuse_color;
  1954. [CCode (cname = "specular_factor")]
  1955. public MaterialMap specular_factor;
  1956. [CCode (cname = "specular_color")]
  1957. public MaterialMap specular_color;
  1958. [CCode (cname = "specular_exponent")]
  1959. public MaterialMap specular_exponent;
  1960. [CCode (cname = "reflection_factor")]
  1961. public MaterialMap reflection_factor;
  1962. [CCode (cname = "reflection_color")]
  1963. public MaterialMap reflection_color;
  1964. [CCode (cname = "transparency_factor")]
  1965. public MaterialMap transparency_factor;
  1966. [CCode (cname = "transparency_color")]
  1967. public MaterialMap transparency_color;
  1968. [CCode (cname = "emission_factor")]
  1969. public MaterialMap emission_factor;
  1970. [CCode (cname = "emission_color")]
  1971. public MaterialMap emission_color;
  1972. [CCode (cname = "ambient_factor")]
  1973. public MaterialMap ambient_factor;
  1974. [CCode (cname = "ambient_color")]
  1975. public MaterialMap ambient_color;
  1976. [CCode (cname = "normal_map")]
  1977. public MaterialMap normal_map;
  1978. [CCode (cname = "bump")]
  1979. public MaterialMap bump;
  1980. [CCode (cname = "bump_factor")]
  1981. public MaterialMap bump_factor;
  1982. [CCode (cname = "displacement_factor")]
  1983. public MaterialMap displacement_factor;
  1984. [CCode (cname = "displacement")]
  1985. public MaterialMap displacement;
  1986. [CCode (cname = "vector_displacement_factor")]
  1987. public MaterialMap vector_displacement_factor;
  1988. [CCode (cname = "vector_displacement")]
  1989. public MaterialMap vector_displacement;
  1990. }
  1991. [CCode (cname = "ufbx_material_pbr_maps", destroy_function = "", has_type_id = false)]
  1992. public struct MaterialPbrMaps
  1993. {
  1994. [CCode (cname = "maps")]
  1995. public MaterialMap maps[MaterialPbrMap.MAP_COUNT];
  1996. [CCode (cname = "base_factor")]
  1997. public MaterialMap base_factor;
  1998. [CCode (cname = "base_color")]
  1999. public MaterialMap base_color;
  2000. [CCode (cname = "roughness")]
  2001. public MaterialMap roughness;
  2002. [CCode (cname = "metalness")]
  2003. public MaterialMap metalness;
  2004. [CCode (cname = "diffuse_roughness")]
  2005. public MaterialMap diffuse_roughness;
  2006. [CCode (cname = "specular_factor")]
  2007. public MaterialMap specular_factor;
  2008. [CCode (cname = "specular_color")]
  2009. public MaterialMap specular_color;
  2010. [CCode (cname = "specular_ior")]
  2011. public MaterialMap specular_ior;
  2012. [CCode (cname = "specular_anisotropy")]
  2013. public MaterialMap specular_anisotropy;
  2014. [CCode (cname = "specular_rotation")]
  2015. public MaterialMap specular_rotation;
  2016. [CCode (cname = "transmission_factor")]
  2017. public MaterialMap transmission_factor;
  2018. [CCode (cname = "transmission_color")]
  2019. public MaterialMap transmission_color;
  2020. [CCode (cname = "transmission_depth")]
  2021. public MaterialMap transmission_depth;
  2022. [CCode (cname = "transmission_scatter")]
  2023. public MaterialMap transmission_scatter;
  2024. [CCode (cname = "transmission_scatter_anisotropy")]
  2025. public MaterialMap transmission_scatter_anisotropy;
  2026. [CCode (cname = "transmission_dispersion")]
  2027. public MaterialMap transmission_dispersion;
  2028. [CCode (cname = "transmission_roughness")]
  2029. public MaterialMap transmission_roughness;
  2030. [CCode (cname = "transmission_extra_roughness")]
  2031. public MaterialMap transmission_extra_roughness;
  2032. [CCode (cname = "transmission_priority")]
  2033. public MaterialMap transmission_priority;
  2034. [CCode (cname = "transmission_enable_in_aov")]
  2035. public MaterialMap transmission_enable_in_aov;
  2036. [CCode (cname = "subsurface_factor")]
  2037. public MaterialMap subsurface_factor;
  2038. [CCode (cname = "subsurface_color")]
  2039. public MaterialMap subsurface_color;
  2040. [CCode (cname = "subsurface_radius")]
  2041. public MaterialMap subsurface_radius;
  2042. [CCode (cname = "subsurface_scale")]
  2043. public MaterialMap subsurface_scale;
  2044. [CCode (cname = "subsurface_anisotropy")]
  2045. public MaterialMap subsurface_anisotropy;
  2046. [CCode (cname = "subsurface_tint_color")]
  2047. public MaterialMap subsurface_tint_color;
  2048. [CCode (cname = "subsurface_type")]
  2049. public MaterialMap subsurface_type;
  2050. [CCode (cname = "sheen_factor")]
  2051. public MaterialMap sheen_factor;
  2052. [CCode (cname = "sheen_color")]
  2053. public MaterialMap sheen_color;
  2054. [CCode (cname = "sheen_roughness")]
  2055. public MaterialMap sheen_roughness;
  2056. [CCode (cname = "coat_factor")]
  2057. public MaterialMap coat_factor;
  2058. [CCode (cname = "coat_color")]
  2059. public MaterialMap coat_color;
  2060. [CCode (cname = "coat_roughness")]
  2061. public MaterialMap coat_roughness;
  2062. [CCode (cname = "coat_ior")]
  2063. public MaterialMap coat_ior;
  2064. [CCode (cname = "coat_anisotropy")]
  2065. public MaterialMap coat_anisotropy;
  2066. [CCode (cname = "coat_rotation")]
  2067. public MaterialMap coat_rotation;
  2068. [CCode (cname = "coat_normal")]
  2069. public MaterialMap coat_normal;
  2070. [CCode (cname = "coat_affect_base_color")]
  2071. public MaterialMap coat_affect_base_color;
  2072. [CCode (cname = "coat_affect_base_roughness")]
  2073. public MaterialMap coat_affect_base_roughness;
  2074. [CCode (cname = "thin_film_thickness")]
  2075. public MaterialMap thin_film_thickness;
  2076. [CCode (cname = "thin_film_ior")]
  2077. public MaterialMap thin_film_ior;
  2078. [CCode (cname = "emission_factor")]
  2079. public MaterialMap emission_factor;
  2080. [CCode (cname = "emission_color")]
  2081. public MaterialMap emission_color;
  2082. [CCode (cname = "opacity")]
  2083. public MaterialMap opacity;
  2084. [CCode (cname = "indirect_diffuse")]
  2085. public MaterialMap indirect_diffuse;
  2086. [CCode (cname = "indirect_specular")]
  2087. public MaterialMap indirect_specular;
  2088. [CCode (cname = "normal_map")]
  2089. public MaterialMap normal_map;
  2090. [CCode (cname = "tangent_map")]
  2091. public MaterialMap tangent_map;
  2092. [CCode (cname = "displacement_map")]
  2093. public MaterialMap displacement_map;
  2094. [CCode (cname = "matte_factor")]
  2095. public MaterialMap matte_factor;
  2096. [CCode (cname = "matte_color")]
  2097. public MaterialMap matte_color;
  2098. [CCode (cname = "ambient_occlusion")]
  2099. public MaterialMap ambient_occlusion;
  2100. [CCode (cname = "glossiness")]
  2101. public MaterialMap glossiness;
  2102. [CCode (cname = "coat_glossiness")]
  2103. public MaterialMap coat_glossiness;
  2104. [CCode (cname = "transmission_glossiness")]
  2105. public MaterialMap transmission_glossiness;
  2106. }
  2107. [CCode (cname = "ufbx_material_features", destroy_function = "", has_type_id = false)]
  2108. public struct MaterialFeatures
  2109. {
  2110. [CCode (cname = "features")]
  2111. public MaterialFeatureInfo features[MaterialFeature.COUNT];
  2112. [CCode (cname = "pbr")]
  2113. public MaterialFeatureInfo pbr;
  2114. [CCode (cname = "metalness")]
  2115. public MaterialFeatureInfo metalness;
  2116. [CCode (cname = "diffuse")]
  2117. public MaterialFeatureInfo diffuse;
  2118. [CCode (cname = "specular")]
  2119. public MaterialFeatureInfo specular;
  2120. [CCode (cname = "emission")]
  2121. public MaterialFeatureInfo emission;
  2122. [CCode (cname = "transmission")]
  2123. public MaterialFeatureInfo transmission;
  2124. [CCode (cname = "coat")]
  2125. public MaterialFeatureInfo coat;
  2126. [CCode (cname = "sheen")]
  2127. public MaterialFeatureInfo sheen;
  2128. [CCode (cname = "opacity")]
  2129. public MaterialFeatureInfo opacity;
  2130. [CCode (cname = "ambient_occlusion")]
  2131. public MaterialFeatureInfo ambient_occlusion;
  2132. [CCode (cname = "matte")]
  2133. public MaterialFeatureInfo matte;
  2134. [CCode (cname = "unlit")]
  2135. public MaterialFeatureInfo unlit;
  2136. [CCode (cname = "ior")]
  2137. public MaterialFeatureInfo ior;
  2138. [CCode (cname = "diffuse_roughness")]
  2139. public MaterialFeatureInfo diffuse_roughness;
  2140. [CCode (cname = "transmission_roughness")]
  2141. public MaterialFeatureInfo transmission_roughness;
  2142. [CCode (cname = "thin_walled")]
  2143. public MaterialFeatureInfo thin_walled;
  2144. [CCode (cname = "caustics")]
  2145. public MaterialFeatureInfo caustics;
  2146. [CCode (cname = "exit_to_background")]
  2147. public MaterialFeatureInfo exit_to_background;
  2148. [CCode (cname = "internal_reflections")]
  2149. public MaterialFeatureInfo internal_reflections;
  2150. [CCode (cname = "double_sided")]
  2151. public MaterialFeatureInfo double_sided;
  2152. [CCode (cname = "roughness_as_glossiness")]
  2153. public MaterialFeatureInfo roughness_as_glossiness;
  2154. [CCode (cname = "coat_roughness_as_glossiness")]
  2155. public MaterialFeatureInfo coat_roughness_as_glossiness;
  2156. [CCode (cname = "transmission_roughness_as_glossiness")]
  2157. public MaterialFeatureInfo transmission_roughness_as_glossiness;
  2158. }
  2159. [Compact]
  2160. [CCode (cname = "ufbx_material", destroy_function = "", has_type_id = false)]
  2161. public class Material
  2162. {
  2163. [CCode (cname = "element")]
  2164. public Element element;
  2165. [CCode (cname = "name")]
  2166. public String name;
  2167. [CCode (cname = "props")]
  2168. public Props props;
  2169. [CCode (cname = "element_id")]
  2170. public uint32 element_id;
  2171. [CCode (cname = "typed_id")]
  2172. public uint32 typed_id;
  2173. public MaterialFbxMaps fbx;
  2174. public MaterialPbrMaps pbr;
  2175. public MaterialFeatures features;
  2176. public ShaderType shader_type;
  2177. public unowned Shader? shader;
  2178. public String shading_model_name;
  2179. public String shader_prop_prefix;
  2180. public MaterialTextureList textures;
  2181. }
  2182. [CCode (cname = "ufbx_texture_type", cprefix = "UFBX_TEXTURE_", has_type_id = false)]
  2183. public enum TextureType
  2184. {
  2185. FILE,
  2186. LAYERED,
  2187. PROCEDURAL,
  2188. SHADER,
  2189. TYPE_COUNT
  2190. }
  2191. [CCode (cname = "ufbx_blend_mode", cprefix = "UFBX_BLEND_", has_type_id = false)]
  2192. public enum BlendMode
  2193. {
  2194. TRANSLUCENT,
  2195. ADDITIVE,
  2196. MULTIPLY,
  2197. MULTIPLY_2X,
  2198. OVER,
  2199. REPLACE,
  2200. DISSOLVE,
  2201. DARKEN,
  2202. COLOR_BURN,
  2203. LINEAR_BURN,
  2204. DARKER_COLOR,
  2205. LIGHTEN,
  2206. SCREEN,
  2207. COLOR_DODGE,
  2208. LINEAR_DODGE,
  2209. LIGHTER_COLOR,
  2210. SOFT_LIGHT,
  2211. HARD_LIGHT,
  2212. VIVID_LIGHT,
  2213. LINEAR_LIGHT,
  2214. PIN_LIGHT,
  2215. HARD_MIX,
  2216. DIFFERENCE,
  2217. EXCLUSION,
  2218. SUBTRACT,
  2219. DIVIDE,
  2220. HUE,
  2221. SATURATION,
  2222. COLOR,
  2223. LUMINOSITY,
  2224. OVERLAY,
  2225. COUNT
  2226. }
  2227. [CCode (cname = "ufbx_wrap_mode", cprefix = "UFBX_WRAP_", has_type_id = false)]
  2228. public enum WrapMode
  2229. {
  2230. REPEAT,
  2231. CLAMP,
  2232. COUNT
  2233. }
  2234. [SimpleType]
  2235. [CCode (cname = "ufbx_texture_layer", destroy_function = "", has_type_id = false)]
  2236. public struct TextureLayer
  2237. {
  2238. public unowned Texture texture;
  2239. public BlendMode blend_mode;
  2240. public Real alpha;
  2241. }
  2242. [CCode (cname = "ufbx_texture_layer", destroy_function = "", has_type_id = false)]
  2243. public struct TextureLayerList
  2244. {
  2245. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2246. public TextureLayer[] data;
  2247. }
  2248. [CCode (cname = "ufbx_shader_texture_type", cprefix = "UFBX_SHADER_TEXTURE_", has_type_id = false)]
  2249. public enum ShaderTextureType
  2250. {
  2251. UNKNOWN,
  2252. SELECT_OUTPUT,
  2253. OSL,
  2254. TYPE_COUNT
  2255. }
  2256. [SimpleType]
  2257. [CCode (cname = "ufbx_shader_texture_input", destroy_function = "", has_type_id = false)]
  2258. public struct ShaderTextureInput
  2259. {
  2260. public String name;
  2261. [CCode (cname = "value_real")]
  2262. public Real value_real;
  2263. [CCode (cname = "value_vec2")]
  2264. public Vec2 value_vec2;
  2265. [CCode (cname = "value_vec3")]
  2266. public Vec3 value_vec3;
  2267. [CCode (cname = "value_vec4")]
  2268. public Vec4 value_vec4;
  2269. public int64 value_int;
  2270. public String value_str;
  2271. public Blob value_blob;
  2272. public unowned Texture? texture;
  2273. public int64 texture_output_index;
  2274. public bool texture_enabled;
  2275. public unowned Prop prop;
  2276. public unowned Prop? texture_prop;
  2277. public unowned Prop? texture_enabled_prop;
  2278. }
  2279. [CCode (cname = "ufbx_shader_texture_input_list", destroy_function = "", has_type_id = false)]
  2280. public struct ShaderTextureInputList
  2281. {
  2282. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2283. public ShaderTextureInput[] data;
  2284. }
  2285. [CCode (cname = "ufbx_shader_texture", destroy_function = "", has_type_id = false)]
  2286. public struct ShaderTexture
  2287. {
  2288. public ShaderTextureType type;
  2289. public String shader_name;
  2290. public uint64 shader_type_id;
  2291. public ShaderTextureInputList inputs;
  2292. public String shader_source;
  2293. public Blob raw_shader_source;
  2294. public unowned Texture main_texture;
  2295. public int64 main_texture_output_index;
  2296. public String prop_prefix;
  2297. }
  2298. [SimpleType]
  2299. [CCode (cname = "ufbx_texture_file", destroy_function = "", has_type_id = false)]
  2300. public struct TextureFile
  2301. {
  2302. public uint32 index;
  2303. public String filename;
  2304. public String absolute_filename;
  2305. public String relative_filename;
  2306. public Blob raw_filename;
  2307. public Blob raw_absolute_filename;
  2308. public Blob raw_relative_filename;
  2309. public Blob content;
  2310. }
  2311. [CCode (cname = "ufbx_texture_file_list", destroy_function = "", has_type_id = false)]
  2312. public struct TextureFileList
  2313. {
  2314. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2315. public TextureFile[] data;
  2316. }
  2317. [Compact]
  2318. [CCode (cname = "ufbx_texture", destroy_function = "", has_type_id = false)]
  2319. public class Texture
  2320. {
  2321. [CCode (cname = "element")]
  2322. public Element element;
  2323. [CCode (cname = "name")]
  2324. public String name;
  2325. [CCode (cname = "props")]
  2326. public Props props;
  2327. [CCode (cname = "element_id")]
  2328. public uint32 element_id;
  2329. [CCode (cname = "typed_id")]
  2330. public uint32 typed_id;
  2331. public TextureType type;
  2332. public String filename;
  2333. public String absolute_filename;
  2334. public String relative_filename;
  2335. public Blob raw_filename;
  2336. public Blob raw_absolute_filename;
  2337. public Blob raw_relative_filename;
  2338. public Blob content;
  2339. public unowned Video? video;
  2340. public uint32 file_index;
  2341. public bool has_file;
  2342. public TextureLayerList layers;
  2343. public unowned ShaderTexture? shader;
  2344. public TextureList file_textures;
  2345. public String uv_set;
  2346. public WrapMode wrap_u;
  2347. public WrapMode wrap_v;
  2348. public bool has_uv_transform;
  2349. public Transform uv_transform;
  2350. public Matrix texture_to_uv;
  2351. public Matrix uv_to_texture;
  2352. }
  2353. [Compact]
  2354. [CCode (cname = "ufbx_video", destroy_function = "", has_type_id = false)]
  2355. public class Video
  2356. {
  2357. [CCode (cname = "element")]
  2358. public Element element;
  2359. [CCode (cname = "name")]
  2360. public String name;
  2361. [CCode (cname = "props")]
  2362. public Props props;
  2363. [CCode (cname = "element_id")]
  2364. public uint32 element_id;
  2365. [CCode (cname = "typed_id")]
  2366. public uint32 typed_id;
  2367. public String filename;
  2368. public String absolute_filename;
  2369. public String relative_filename;
  2370. public Blob raw_filename;
  2371. public Blob raw_absolute_filename;
  2372. public Blob raw_relative_filename;
  2373. public Blob content;
  2374. }
  2375. [Compact]
  2376. [CCode (cname = "ufbx_shader", destroy_function = "", has_type_id = false)]
  2377. public class Shader
  2378. {
  2379. [CCode (cname = "element")]
  2380. public Element element;
  2381. [CCode (cname = "name")]
  2382. public String name;
  2383. [CCode (cname = "props")]
  2384. public Props props;
  2385. [CCode (cname = "element_id")]
  2386. public uint32 element_id;
  2387. [CCode (cname = "typed_id")]
  2388. public uint32 typed_id;
  2389. public ShaderType type;
  2390. public ShaderBindingList bindings;
  2391. }
  2392. [SimpleType]
  2393. [CCode (cname = "ufbx_shader_prop_binding", destroy_function = "", has_type_id = false)]
  2394. public struct ShaderPropBinding
  2395. {
  2396. public String shader_prop;
  2397. public String material_prop;
  2398. }
  2399. [CCode (cname = "ufbx_shader_prop_binding_list", destroy_function = "", has_type_id = false)]
  2400. public struct ShaderPropBindingList
  2401. {
  2402. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2403. public ShaderPropBinding[] data;
  2404. }
  2405. [Compact]
  2406. [CCode (cname = "ufbx_shader_binding", destroy_function = "", has_type_id = false)]
  2407. public class ShaderBinding
  2408. {
  2409. [CCode (cname = "element")]
  2410. public Element element;
  2411. [CCode (cname = "name")]
  2412. public String name;
  2413. [CCode (cname = "props")]
  2414. public Props props;
  2415. [CCode (cname = "element_id")]
  2416. public uint32 element_id;
  2417. [CCode (cname = "typed_id")]
  2418. public uint32 typed_id;
  2419. public ShaderPropBindingList prop_bindings;
  2420. }
  2421. [SimpleType]
  2422. [CCode (cname = "ufbx_prop_override", destroy_function = "", has_type_id = false)]
  2423. public struct PropOverride
  2424. {
  2425. public uint32 element_id;
  2426. public uint32 _internal_key;
  2427. public String prop_name;
  2428. public Vec4 value;
  2429. public String value_str;
  2430. public int64 value_int;
  2431. }
  2432. [CCode (cname = "ufbx_prop_override_list", destroy_function = "", has_type_id = false)]
  2433. public struct PropOverrideList
  2434. {
  2435. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2436. public PropOverride[] data;
  2437. }
  2438. [SimpleType]
  2439. [CCode (cname = "ufbx_transform_override", destroy_function = "", has_type_id = false)]
  2440. public struct TransformOverride
  2441. {
  2442. public uint32 node_id;
  2443. public Transform transform;
  2444. }
  2445. [CCode (cname = "ufbx_transform_override_list", destroy_function = "", has_type_id = false)]
  2446. public struct TransformOverrideList
  2447. {
  2448. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2449. public TransformOverride[] data;
  2450. }
  2451. [Compact]
  2452. [CCode (cname = "ufbx_anim", destroy_function = "", has_type_id = false)]
  2453. public class Anim
  2454. {
  2455. public double time_begin;
  2456. public double time_end;
  2457. public AnimLayerList layers;
  2458. public RealList override_layer_weights;
  2459. public PropOverrideList prop_overrides;
  2460. public TransformOverrideList transform_overrides;
  2461. public bool ignore_connections;
  2462. public bool custom;
  2463. }
  2464. [Compact]
  2465. [CCode (cname = "ufbx_anim_stack", destroy_function = "", has_type_id = false)]
  2466. public class AnimStack
  2467. {
  2468. [CCode (cname = "element")]
  2469. public Element element;
  2470. [CCode (cname = "name")]
  2471. public String name;
  2472. [CCode (cname = "props")]
  2473. public Props props;
  2474. [CCode (cname = "element_id")]
  2475. public uint32 element_id;
  2476. [CCode (cname = "typed_id")]
  2477. public uint32 typed_id;
  2478. public double time_begin;
  2479. public double time_end;
  2480. public AnimLayerList layers;
  2481. public unowned Anim anim;
  2482. }
  2483. [SimpleType]
  2484. [CCode (cname = "ufbx_anim_prop", destroy_function = "", has_type_id = false)]
  2485. public struct AnimProp
  2486. {
  2487. public unowned Element element;
  2488. public uint32 _internal_key;
  2489. public String prop_name;
  2490. public unowned AnimValue anim_value;
  2491. }
  2492. [CCode (cname = "ufbx_anim_list", destroy_function = "", has_type_id = false)]
  2493. public struct AnimPropList
  2494. {
  2495. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2496. public AnimProp[] data;
  2497. }
  2498. [Compact]
  2499. [CCode (cname = "ufbx_anim_layer", destroy_function = "", has_type_id = false)]
  2500. public class AnimLayer
  2501. {
  2502. [CCode (cname = "element")]
  2503. public Element element;
  2504. [CCode (cname = "name")]
  2505. public String name;
  2506. [CCode (cname = "props")]
  2507. public Props props;
  2508. [CCode (cname = "element_id")]
  2509. public uint32 element_id;
  2510. [CCode (cname = "typed_id")]
  2511. public uint32 typed_id;
  2512. public Real weight;
  2513. public bool weight_is_animated;
  2514. public bool blended;
  2515. public bool additive;
  2516. public bool compose_rotation;
  2517. public bool compose_scale;
  2518. public AnimValueList anim_values;
  2519. public AnimPropList anim_props;
  2520. public unowned Anim anim;
  2521. public uint32 _min_element_id;
  2522. public uint32 _max_element_id;
  2523. public uint32 _element_id_bitmask[4];
  2524. }
  2525. [Compact]
  2526. [CCode (cname = "ufbx_anim_value", destroy_function = "", has_type_id = false)]
  2527. public class AnimValue
  2528. {
  2529. [CCode (cname = "element")]
  2530. public Element element;
  2531. [CCode (cname = "name")]
  2532. public String name;
  2533. [CCode (cname = "props")]
  2534. public Props props;
  2535. [CCode (cname = "element_id")]
  2536. public uint32 element_id;
  2537. [CCode (cname = "typed_id")]
  2538. public uint32 typed_id;
  2539. public Vec3 default_value;
  2540. public unowned AnimCurve? curves[3];
  2541. }
  2542. [CCode (cname = "ufbx_interpolation", cprefix = "UFBX_INTERPOLATION_", has_type_id = false)]
  2543. public enum Interpolation
  2544. {
  2545. CONSTANT_PREV,
  2546. CONSTANT_NEXT,
  2547. LINEAR,
  2548. CUBIC,
  2549. COUNT
  2550. }
  2551. [CCode (cname = "ufbx_tangent", destroy_function = "", has_type_id = false)]
  2552. public struct Tangent
  2553. {
  2554. public float dx;
  2555. public float dy;
  2556. }
  2557. [SimpleType]
  2558. [CCode (cname = "ufbx_keyframe", destroy_function = "", has_type_id = false)]
  2559. public struct Keyframe
  2560. {
  2561. public double time;
  2562. public Real value;
  2563. public Interpolation interpolation;
  2564. public Tangent left;
  2565. public Tangent right;
  2566. }
  2567. [CCode (cname = "ufbx_keyframe_list", destroy_function = "", has_type_id = false)]
  2568. public struct KeyframeList
  2569. {
  2570. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2571. public Keyframe[] data;
  2572. }
  2573. [Compact]
  2574. [CCode (cname = "ufbx_anim_curve", destroy_function = "", has_type_id = false)]
  2575. public class AnimCurve
  2576. {
  2577. [CCode (cname = "element")]
  2578. public Element element;
  2579. [CCode (cname = "name")]
  2580. public String name;
  2581. [CCode (cname = "props")]
  2582. public Props props;
  2583. [CCode (cname = "element_id")]
  2584. public uint32 element_id;
  2585. [CCode (cname = "typed_id")]
  2586. public uint32 typed_id;
  2587. public KeyframeList keyframes;
  2588. public Extrapolation pre_extrapolation;
  2589. public Extrapolation post_extrapolation;
  2590. public Real min_value;
  2591. public Real max_value;
  2592. public double min_time;
  2593. public double max_time;
  2594. }
  2595. [Compact]
  2596. [CCode (cname = "ufbx_display_layer", destroy_function = "", has_type_id = false)]
  2597. public class DisplayLayer
  2598. {
  2599. [CCode (cname = "element")]
  2600. public Element element;
  2601. [CCode (cname = "name")]
  2602. public String name;
  2603. [CCode (cname = "props")]
  2604. public Props props;
  2605. [CCode (cname = "element_id")]
  2606. public uint32 element_id;
  2607. [CCode (cname = "typed_id")]
  2608. public uint32 typed_id;
  2609. public NodeList nodes;
  2610. public bool visible;
  2611. public bool frozen;
  2612. public Vec3 ui_color;
  2613. }
  2614. [Compact]
  2615. [CCode (cname = "ufbx_selection_set", destroy_function = "", has_type_id = false)]
  2616. public class SelectionSet
  2617. {
  2618. [CCode (cname = "element")]
  2619. public Element element;
  2620. [CCode (cname = "name")]
  2621. public String name;
  2622. [CCode (cname = "props")]
  2623. public Props props;
  2624. [CCode (cname = "element_id")]
  2625. public uint32 element_id;
  2626. [CCode (cname = "typed_id")]
  2627. public uint32 typed_id;
  2628. public SelectionNodeList nodes;
  2629. }
  2630. [Compact]
  2631. [CCode (cname = "ufbx_selection_node", destroy_function = "", has_type_id = false)]
  2632. public class SelectionNode
  2633. {
  2634. [CCode (cname = "element")]
  2635. public Element element;
  2636. [CCode (cname = "name")]
  2637. public String name;
  2638. [CCode (cname = "props")]
  2639. public Props props;
  2640. [CCode (cname = "element_id")]
  2641. public uint32 element_id;
  2642. [CCode (cname = "typed_id")]
  2643. public uint32 typed_id;
  2644. public unowned Node? target_node;
  2645. public unowned Mesh? target_mesh;
  2646. public bool include_node;
  2647. public Uint32List vertices;
  2648. public Uint32List edges;
  2649. public Uint32List faces;
  2650. }
  2651. [Compact]
  2652. [CCode (cname = "ufbx_character", destroy_function = "", has_type_id = false)]
  2653. public class Character
  2654. {
  2655. [CCode (cname = "element")]
  2656. public Element element;
  2657. [CCode (cname = "name")]
  2658. public String name;
  2659. [CCode (cname = "props")]
  2660. public Props props;
  2661. [CCode (cname = "element_id")]
  2662. public uint32 element_id;
  2663. [CCode (cname = "typed_id")]
  2664. public uint32 typed_id;
  2665. }
  2666. [CCode (cname = "ufbx_constraint_type", cprefix = "UFBX_CONSTRAINT_", has_type_id = false)]
  2667. public enum ConstraintType
  2668. {
  2669. UNKNOWN,
  2670. AIM,
  2671. PARENT,
  2672. POSITION,
  2673. ROTATION,
  2674. SCALE,
  2675. SINGLE_CHAIN_IK,
  2676. TYPE_COUNT
  2677. }
  2678. [SimpleType]
  2679. [CCode (cname = "ufbx_constraint_target", destroy_function = "", has_type_id = false)]
  2680. public struct ConstraintTarget
  2681. {
  2682. public unowned Node node;
  2683. public Real weight;
  2684. public Transform transform;
  2685. }
  2686. [CCode (cname = "ufbx_constraint_target_list", destroy_function = "", has_type_id = false)]
  2687. public struct ConstraintTargetList
  2688. {
  2689. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2690. public ConstraintTarget[] data;
  2691. }
  2692. [CCode (cname = "ufbx_constraint_aim_up_type", cprefix = "UFBX_CONSTRAINT_AIM_UP_", has_type_id = false)]
  2693. public enum ConstraintAimUpType
  2694. {
  2695. SCENE,
  2696. TO_NODE,
  2697. ALIGN_NODE,
  2698. VECTOR,
  2699. NONE,
  2700. TYPE_COUNT
  2701. }
  2702. [CCode (cname = "ufbx_constraint_ik_pole_type", cprefix = "UFBX_CONSTRAINT_IK_POLE_", has_type_id = false)]
  2703. public enum ConstraintIkPoleType
  2704. {
  2705. VECTOR,
  2706. NODE,
  2707. TYPE_COUNT
  2708. }
  2709. [Compact]
  2710. [CCode (cname = "ufbx_constraint", destroy_function = "", has_type_id = false)]
  2711. public class Constraint
  2712. {
  2713. [CCode (cname = "element")]
  2714. public Element element;
  2715. [CCode (cname = "name")]
  2716. public String name;
  2717. [CCode (cname = "props")]
  2718. public Props props;
  2719. [CCode (cname = "element_id")]
  2720. public uint32 element_id;
  2721. [CCode (cname = "typed_id")]
  2722. public uint32 typed_id;
  2723. public ConstraintType type;
  2724. public String type_name;
  2725. public unowned Node? node;
  2726. public ConstraintTargetList targets;
  2727. public Real weight;
  2728. public bool active;
  2729. public bool constrain_translation[3];
  2730. public bool constrain_rotation[3];
  2731. public bool constrain_scale[3];
  2732. public Transform transform_offset;
  2733. public Vec3 aim_vector;
  2734. public ConstraintAimUpType aim_up_type;
  2735. public unowned Node? aim_up_node;
  2736. public Vec3 aim_up_vector;
  2737. public unowned Node? ik_effector;
  2738. public unowned Node? ik_end_node;
  2739. public Vec3 ik_pole_vector;
  2740. }
  2741. [Compact]
  2742. [CCode (cname = "ufbx_audio_layer", destroy_function = "", has_type_id = false)]
  2743. public class AudioLayer
  2744. {
  2745. [CCode (cname = "element")]
  2746. public Element element;
  2747. [CCode (cname = "name")]
  2748. public String name;
  2749. [CCode (cname = "props")]
  2750. public Props props;
  2751. [CCode (cname = "element_id")]
  2752. public uint32 element_id;
  2753. [CCode (cname = "typed_id")]
  2754. public uint32 typed_id;
  2755. public AudioClipList clips;
  2756. }
  2757. [Compact]
  2758. [CCode (cname = "ufbx_audio_clip", destroy_function = "", has_type_id = false)]
  2759. public class AudioClip
  2760. {
  2761. [CCode (cname = "element")]
  2762. public Element element;
  2763. [CCode (cname = "name")]
  2764. public String name;
  2765. [CCode (cname = "props")]
  2766. public Props props;
  2767. [CCode (cname = "element_id")]
  2768. public uint32 element_id;
  2769. [CCode (cname = "typed_id")]
  2770. public uint32 typed_id;
  2771. public String filename;
  2772. public String absolute_filename;
  2773. public String relative_filename;
  2774. public Blob raw_filename;
  2775. public Blob raw_absolute_filename;
  2776. public Blob raw_relative_filename;
  2777. public Blob content;
  2778. }
  2779. [SimpleType]
  2780. [CCode (cname = "ufbx_bone_pose", destroy_function = "", has_type_id = false)]
  2781. public struct BonePose
  2782. {
  2783. public unowned Node bone_node;
  2784. public Matrix bone_to_world;
  2785. public Matrix bone_to_parent;
  2786. }
  2787. [CCode (cname = "ufbx_bone_pose_list", destroy_function = "", has_type_id = false)]
  2788. public struct BonePoseList
  2789. {
  2790. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2791. public BonePose[] data;
  2792. }
  2793. [Compact]
  2794. [CCode (cname = "ufbx_pose", destroy_function = "", has_type_id = false)]
  2795. public class Pose
  2796. {
  2797. [CCode (cname = "element")]
  2798. public Element element;
  2799. [CCode (cname = "name")]
  2800. public String name;
  2801. [CCode (cname = "props")]
  2802. public Props props;
  2803. [CCode (cname = "element_id")]
  2804. public uint32 element_id;
  2805. [CCode (cname = "typed_id")]
  2806. public uint32 typed_id;
  2807. public bool is_bind_pose;
  2808. public BonePoseList bone_poses;
  2809. }
  2810. [Compact]
  2811. [CCode (cname = "ufbx_metadata_object", destroy_function = "", has_type_id = false)]
  2812. public class MetadataObject
  2813. {
  2814. [CCode (cname = "element")]
  2815. public Element element;
  2816. [CCode (cname = "name")]
  2817. public String name;
  2818. [CCode (cname = "props")]
  2819. public Props props;
  2820. [CCode (cname = "element_id")]
  2821. public uint32 element_id;
  2822. [CCode (cname = "typed_id")]
  2823. public uint32 typed_id;
  2824. }
  2825. [SimpleType]
  2826. [CCode (cname = "ufbx_name_element", destroy_function = "", has_type_id = false)]
  2827. public struct NameElement
  2828. {
  2829. public String name;
  2830. public ElementType type;
  2831. public uint32 _internal_key;
  2832. public unowned Element element;
  2833. }
  2834. [CCode (cname = "ufbx_name_element_list", destroy_function = "", has_type_id = false)]
  2835. public struct NameElementList
  2836. {
  2837. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2838. public NameElement[] data;
  2839. }
  2840. [CCode (cname = "ufbx_exporter", cprefix = "UFBX_EXPORTER_", has_type_id = false)]
  2841. public enum Exporter
  2842. {
  2843. UNKNOWN,
  2844. FBX_SDK,
  2845. BLENDER_BINARY,
  2846. BLENDER_ASCII,
  2847. MOTION_BUILDER,
  2848. COUNT
  2849. }
  2850. [CCode (cname = "ufbx_application", destroy_function = "", has_type_id = false)]
  2851. public struct Application
  2852. {
  2853. public String vendor;
  2854. public String name;
  2855. public String version;
  2856. }
  2857. [CCode (cname = "ufbx_file_format", cprefix = "UFBX_FILE_FORMAT_", has_type_id = false)]
  2858. public enum FileFormat
  2859. {
  2860. UNKNOWN,
  2861. FBX,
  2862. OBJ,
  2863. MTL,
  2864. COUNT
  2865. }
  2866. [CCode (cname = "ufbx_warning_type", cprefix = "UFBX_WARNING_", has_type_id = false)]
  2867. public enum WarningType
  2868. {
  2869. MISSING_EXTERNAL_FILE,
  2870. IMPLICIT_MTL,
  2871. TRUNCATED_ARRAY,
  2872. MISSING_GEOMETRY_DATA,
  2873. DUPLICATE_CONNECTION,
  2874. BAD_VERTEX_W_ATTRIBUTE,
  2875. MISSING_POLYGON_MAPPING,
  2876. UNSUPPORTED_VERSION,
  2877. INDEX_CLAMPED,
  2878. BAD_UNICODE,
  2879. BAD_BASE64_CONTENT,
  2880. BAD_ELEMENT_CONNECTED_TO_ROOT,
  2881. DUPLICATE_OBJECT_ID,
  2882. EMPTY_FACE_REMOVED,
  2883. UNKNOWN_OBJ_DIRECTIVE,
  2884. TYPE_COUNT,
  2885. TYPE_FIRST_DEDUPLICATED = WarningType.INDEX_CLAMPED
  2886. }
  2887. [SimpleType]
  2888. [CCode (cname = "ufbx_warning", destroy_function = "", has_type_id = false)]
  2889. public struct Warning
  2890. {
  2891. public WarningType type;
  2892. public String description;
  2893. public uint32 element_id;
  2894. public size_t count;
  2895. }
  2896. [CCode (cname = "ufbx_warning_list", destroy_function = "", has_type_id = false)]
  2897. public struct WarningList
  2898. {
  2899. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2900. public Warning[] data;
  2901. }
  2902. [CCode (cname = "ufbx_thumbnail_format", cprefix = "UFBX_THUMBNAIL_FORMAT_", has_type_id = false)]
  2903. public enum ThumbnailFormat
  2904. {
  2905. UNKNOWN,
  2906. RGB_24,
  2907. RGBA_32,
  2908. COUNT
  2909. }
  2910. [CCode (cname = "ufbx_space_conversion", cprefix = "UFBX_SPACE_CONVERSION_", has_type_id = false)]
  2911. public enum SpaceConversion
  2912. {
  2913. TRANSFORM_ROOT,
  2914. ADJUST_TRANSFORMS,
  2915. MODIFY_GEOMETRY,
  2916. COUNT
  2917. }
  2918. [CCode (cname = "ufbx_geometry_transform_handling", cprefix = "UFBX_GEOMETRY_TRANSFORM_HANDLING_", has_type_id = false)]
  2919. public enum GeometryTransformHandling
  2920. {
  2921. PRESERVE,
  2922. HELPER_NODES,
  2923. MODIFY_GEOMETRY,
  2924. MODIFY_GEOMETRY_NO_FALLBACK,
  2925. COUNT
  2926. }
  2927. [CCode (cname = "ufbx_inherit_mode_handling", cprefix = "UFBX_INHERIT_MODE_HANDLING_", has_type_id = false)]
  2928. public enum InheritModeHandling
  2929. {
  2930. PRESERVE,
  2931. HELPER_NODES,
  2932. COMPENSATE,
  2933. COMPENSATE_NO_FALLBACK,
  2934. IGNORE,
  2935. COUNT
  2936. }
  2937. [CCode (cname = "ufbx_pivot_handling", cprefix = "UFBX_PIVOT_HANDLING_", has_type_id = false)]
  2938. public enum PivotHandling
  2939. {
  2940. RETAIN,
  2941. ADJUST_TO_PIVOT,
  2942. ADJUST_TO_ROTATION_PIVOT,
  2943. COUNT
  2944. }
  2945. [CCode (cname = "ufbx_thumbnail", destroy_function = "", has_type_id = false)]
  2946. public struct Thumbnail
  2947. {
  2948. public Props props;
  2949. public uint32 width;
  2950. public uint32 height;
  2951. public ThumbnailFormat format;
  2952. public Blob data;
  2953. }
  2954. [CCode (cname = "ufbx_metadata", destroy_function = "", has_type_id = false)]
  2955. public struct Metadata
  2956. {
  2957. public WarningList warnings;
  2958. public bool ascii;
  2959. public uint32 version;
  2960. public FileFormat file_format;
  2961. public bool may_contain_no_index;
  2962. public bool may_contain_missing_vertex_position;
  2963. public bool may_contain_broken_elements;
  2964. public bool is_unsafe;
  2965. public bool has_warning[WarningType.TYPE_COUNT];
  2966. public String creator;
  2967. public bool big_endian;
  2968. public String filename;
  2969. public String relative_root;
  2970. public Blob raw_filename;
  2971. public Blob raw_relative_root;
  2972. public Exporter exporter;
  2973. public uint32 exporter_version;
  2974. public Props scene_props;
  2975. public Application original_application;
  2976. public Application latest_application;
  2977. public Thumbnail thumbnail;
  2978. public bool geometry_ignored;
  2979. public bool animation_ignored;
  2980. public bool embedded_ignored;
  2981. public size_t max_face_triangles;
  2982. public size_t result_memory_used;
  2983. public size_t temp_memory_used;
  2984. public size_t result_allocs;
  2985. public size_t temp_allocs;
  2986. public size_t element_buffer_size;
  2987. public size_t num_shader_textures;
  2988. public Real bone_prop_size_unit;
  2989. public bool bone_prop_limb_length_relative;
  2990. public Real ortho_size_unit;
  2991. public int64 ktime_second;
  2992. public String original_file_path;
  2993. public Blob raw_original_file_path;
  2994. public SpaceConversion space_conversion;
  2995. public GeometryTransformHandling geometry_transform_handling;
  2996. public InheritModeHandling inherit_mode_handling;
  2997. public PivotHandling pivot_handling;
  2998. public MirrorAxis handedness_conversion_axis;
  2999. public Quat root_rotation;
  3000. public Real root_scale;
  3001. public MirrorAxis mirror_axis;
  3002. public Real geometry_scale;
  3003. }
  3004. [CCode (cname = "ufbx_time_mode", cprefix = "UFBX_TIME_MODE_", has_type_id = false)]
  3005. public enum TimeMode
  3006. {
  3007. DEFAULT,
  3008. 120_FPS,
  3009. 100_FPS,
  3010. 60_FPS,
  3011. 50_FPS,
  3012. 48_FPS,
  3013. 30_FPS,
  3014. 30_FPS_DROP,
  3015. NTSC_DROP_FRAME,
  3016. NTSC_FULL_FRAME,
  3017. PAL,
  3018. 24_FPS,
  3019. 1000_FPS,
  3020. FILM_FULL_FRAME,
  3021. CUSTOM,
  3022. 96_FPS,
  3023. 72_FPS,
  3024. 59_94_FPS,
  3025. COUNT
  3026. }
  3027. [CCode (cname = "ufbx_time_protocol", cprefix = "UFBX_TIME_PROTOCOL_", has_type_id = false)]
  3028. public enum TimeProtocol
  3029. {
  3030. SMPTE,
  3031. FRAME_COUNT,
  3032. DEFAULT,
  3033. COUNT
  3034. }
  3035. [CCode (cname = "ufbx_snap_mode", cprefix = "UFBX_SNAP_MODE_", has_type_id = false)]
  3036. public enum SnapMode
  3037. {
  3038. NONE,
  3039. SNAP,
  3040. PLAY,
  3041. SNAP_AND_PLAY,
  3042. COUNT
  3043. }
  3044. [CCode (cname = "ufbx_scene_settings", destroy_function = "", has_type_id = false)]
  3045. public struct SceneSettings
  3046. {
  3047. public Props props;
  3048. public CoordinateAxes axes;
  3049. public Real unit_meters;
  3050. public double frames_per_second;
  3051. public Vec3 ambient_color;
  3052. public String default_camera;
  3053. public TimeMode time_mode;
  3054. public TimeProtocol time_protocol;
  3055. public SnapMode snap_mode;
  3056. public CoordinateAxis original_axis_up;
  3057. public Real original_unit_meters;
  3058. }
  3059. [Compact]
  3060. [CCode (cname = "ufbx_scene", free_function = "ufbx_free_scene", has_type_id = false)]
  3061. public class Scene
  3062. {
  3063. public Metadata metadata;
  3064. public SceneSettings settings;
  3065. public unowned Node root_node;
  3066. public unowned Anim anim;
  3067. [CCode (cname = "unknowns")]
  3068. public UnknownList unknowns;
  3069. [CCode (cname = "nodes")]
  3070. public NodeList nodes;
  3071. [CCode (cname = "meshes")]
  3072. public MeshList meshes;
  3073. [CCode (cname = "lights")]
  3074. public LightList lights;
  3075. [CCode (cname = "cameras")]
  3076. public CameraList cameras;
  3077. [CCode (cname = "bones")]
  3078. public BoneList bones;
  3079. [CCode (cname = "empties")]
  3080. public EmptyList empties;
  3081. [CCode (cname = "line_curves")]
  3082. public LineCurveList line_curves;
  3083. [CCode (cname = "nurbs_curves")]
  3084. public NurbsCurveList nurbs_curves;
  3085. [CCode (cname = "nurbs_surfaces")]
  3086. public NurbsSurfaceList nurbs_surfaces;
  3087. [CCode (cname = "nurbs_trim_surfaces")]
  3088. public NurbsTrimSurfaceList nurbs_trim_surfaces;
  3089. [CCode (cname = "nurbs_trim_boundaries")]
  3090. public NurbsTrimBoundaryList nurbs_trim_boundaries;
  3091. [CCode (cname = "procedural_geometries")]
  3092. public ProceduralGeometryList procedural_geometries;
  3093. [CCode (cname = "stereo_cameras")]
  3094. public StereoCameraList stereo_cameras;
  3095. [CCode (cname = "camera_switchers")]
  3096. public CameraSwitcherList camera_switchers;
  3097. [CCode (cname = "markers")]
  3098. public MarkerList markers;
  3099. [CCode (cname = "lod_groups")]
  3100. public LogGroupList lod_groups;
  3101. [CCode (cname = "skin_deformers")]
  3102. public SkinDeformerList skin_deformers;
  3103. [CCode (cname = "skin_clusters")]
  3104. public SkinClusterList skin_clusters;
  3105. [CCode (cname = "blend_deformers")]
  3106. public BlendDeformerList blend_deformers;
  3107. [CCode (cname = "blend_channels")]
  3108. public BlendChannelList blend_channels;
  3109. [CCode (cname = "blend_shapes")]
  3110. public BlendShapeList blend_shapes;
  3111. [CCode (cname = "cache_deformers")]
  3112. public CacheDeformerList cache_deformers;
  3113. [CCode (cname = "cache_files")]
  3114. public CacheFileList cache_files;
  3115. [CCode (cname = "materials")]
  3116. public MaterialList materials;
  3117. [CCode (cname = "textures")]
  3118. public TextureList textures;
  3119. [CCode (cname = "videos")]
  3120. public VideoList videos;
  3121. [CCode (cname = "shaders")]
  3122. public ShaderList shaders;
  3123. [CCode (cname = "shader_bindings")]
  3124. public ShaderBindingList shader_bindings;
  3125. [CCode (cname = "anim_stacks")]
  3126. public AnimStackList anim_stacks;
  3127. [CCode (cname = "anim_layers")]
  3128. public AnimLayerList anim_layers;
  3129. [CCode (cname = "anim_values")]
  3130. public AnimValueList anim_values;
  3131. [CCode (cname = "anim_curves")]
  3132. public AnimCurveList anim_curves;
  3133. [CCode (cname = "display_layers")]
  3134. public DisplayLayerList display_layers;
  3135. [CCode (cname = "selection_sets")]
  3136. public SelectionSetList selection_sets;
  3137. [CCode (cname = "selection_nodes")]
  3138. public SelectionNodeList selection_nodes;
  3139. [CCode (cname = "characters")]
  3140. public CharacterList characters;
  3141. [CCode (cname = "constraints")]
  3142. public ConstraintList constraints;
  3143. [CCode (cname = "audio_layers")]
  3144. public AudioLayerList audio_layers;
  3145. [CCode (cname = "audio_clips")]
  3146. public AudioClipList audio_clips;
  3147. [CCode (cname = "poses")]
  3148. public PoseList poses;
  3149. [CCode (cname = "metadata_objects")]
  3150. public MetadataObjectList metadata_objects;
  3151. [CCode (cname = "elements_by_type")]
  3152. public ElementList elements_by_type[ElementType.TYPE_COUNT];
  3153. public TextureFileList texture_files;
  3154. public ElementList elements;
  3155. public ConnectionList connections_src;
  3156. public ConnectionList connections_dst;
  3157. public NameElementList elements_by_name;
  3158. public unowned DomNode? dom_root;
  3159. [CCode (cname = "ufbx_load_memory")]
  3160. public static Scene? load_memory(void* data, size_t data_size, LoadOpts opts, ref Error error);
  3161. [CCode (cname = "ufbx_load_file")]
  3162. public static Scene? load_file(string filename, LoadOpts opts, ref Error error);
  3163. [CCode (cname = "ufbx_load_file_len")]
  3164. public static Scene? load_file_len(string filename, size_t filename_len, LoadOpts opts, ref Error error);
  3165. }
  3166. [CCode (cname = "ufbx_curve_point", destroy_function = "", has_type_id = false)]
  3167. public struct CurvePoint
  3168. {
  3169. public bool valid;
  3170. public Vec3 position;
  3171. public Vec3 derivative;
  3172. }
  3173. [CCode (cname = "ufbx_surface_point", destroy_function = "", has_type_id = false)]
  3174. public struct SurfacePoint
  3175. {
  3176. public bool valid;
  3177. public Vec3 position;
  3178. public Vec3 derivative_u;
  3179. public Vec3 derivative_v;
  3180. }
  3181. [CCode (cname = "ufbx_topo_flags", cprefix = "UFBX_TOPO_", has_type_id = false)]
  3182. [Flags]
  3183. public enum TopoFlags
  3184. {
  3185. NON_MANIFOLD
  3186. }
  3187. [CCode (cname = "ufbx_topo_edge", destroy_function = "", has_type_id = false)]
  3188. public struct TopoEdge
  3189. {
  3190. public uint32 index;
  3191. public uint32 next;
  3192. public uint32 prev;
  3193. public uint32 twin;
  3194. public uint32 face;
  3195. public uint32 edge;
  3196. public TopoFlags flags;
  3197. }
  3198. [CCode (cname = "ufbx_vertex_stream", destroy_function = "", has_type_id = false)]
  3199. public struct VertexStream
  3200. {
  3201. [CCode (array_length_cname = "vertex_count", array_length_type = "size_t")]
  3202. public void[] data;
  3203. public size_t vertex_size;
  3204. }
  3205. [CCode (cname = "ufbx_alloc_fn", has_target = true, delegate_target_pos = 0.9)]
  3206. public delegate void* AllocFn(size_t size);
  3207. [CCode (cname = "ufbx_realloc_fn", has_target = true, delegate_target_pos = 0.9)]
  3208. public delegate void* ReallocFn(void* old_ptr, size_t old_size, size_t new_size);
  3209. [CCode (cname = "ufbx_free_fn", has_target = true, delegate_target_pos = 0.9)]
  3210. public delegate void FreeFn(void* ptr, size_t size);
  3211. [CCode (cname = "ufbx_free_allocator_fn", has_target = true, delegate_target_pos = 0.9)]
  3212. public delegate void FreeAllocatorFn();
  3213. [CCode (cname = "ufbx_allocator", destroy_function = "", has_type_id = false)]
  3214. public struct Allocator
  3215. {
  3216. public AllocFn alloc_fn;
  3217. public ReallocFn realloc_fn;
  3218. public FreeFn free_fn;
  3219. public FreeAllocatorFn free_allocator_fn;
  3220. public void* user;
  3221. }
  3222. [CCode (cname = "ufbx_allocator_opts", destroy_function = "", has_type_id = false)]
  3223. public struct AllocatorOpts
  3224. {
  3225. public Allocator allocator;
  3226. public size_t memory_limit;
  3227. public size_t allocation_limit;
  3228. public size_t huge_threshold;
  3229. public size_t max_chunk_size;
  3230. }
  3231. [CCode (cname = "ufbx_read_fn", has_target = true, delegate_target_pos = 0.9)]
  3232. public delegate size_t ReadFn(void* data, size_t size);
  3233. [CCode (cname = "ufbx_skip_fn", has_target = true, delegate_target_pos = 0.9)]
  3234. public delegate bool SkipFn(size_t size);
  3235. [CCode (cname = "ufbx_size_fn", has_target = true, delegate_target_pos = 0.9)]
  3236. public delegate uint64 SizeFn();
  3237. [CCode (cname = "ufbx_close_fn", has_target = true, delegate_target_pos = 0.9)]
  3238. public delegate void CloseFn();
  3239. [CCode (cname = "ufbx_stream", destroy_function = "", has_type_id = false)]
  3240. public struct Stream
  3241. {
  3242. public ReadFn read_fn;
  3243. public SkipFn skip_fn;
  3244. public SizeFn size_fn;
  3245. public CloseFn close_fn;
  3246. public void* user;
  3247. }
  3248. [CCode (cname = "ufbx_open_file_type", cprefix = "UFBX_OPEN_FILE_", has_type_id = false)]
  3249. public enum OpenFileType
  3250. {
  3251. MAIN_MODEL,
  3252. GEOMETRY_CACHE,
  3253. OBJ_MTL,
  3254. TYPE_COUNT
  3255. }
  3256. [SimpleType]
  3257. [CCode (cname = "ufbx_open_file_context", has_type_id = false)]
  3258. public struct OpenFileContext : uintptr
  3259. {
  3260. }
  3261. [CCode (cname = "ufbx_open_file_info", destroy_function = "", has_type_id = false)]
  3262. public struct OpenFileInfo
  3263. {
  3264. public OpenFileContext context;
  3265. public OpenFileType type;
  3266. public Blob original_filename;
  3267. }
  3268. [CCode (cname = "ufbx_open_file_fn", has_target = true, delegate_target_pos = 0.9)]
  3269. public delegate bool OpenFileFn(Stream stream, string path, size_t path_len, OpenFileInfo info);
  3270. [CCode (cname = "ufbx_open_file_cb", destroy_function = "", has_type_id = false)]
  3271. public struct OpenFileCb
  3272. {
  3273. public OpenFileFn fn;
  3274. public void* user;
  3275. }
  3276. [CCode (cname = "ufbx_open_file_opts", destroy_function = "", has_type_id = false)]
  3277. public struct OpenFileOptions
  3278. {
  3279. public uint32 _begin_zero;
  3280. public AllocatorOpts allocator;
  3281. public bool filename_null_terminated;
  3282. public uint32 _end_zero;
  3283. }
  3284. [CCode (cname = "ufbx_close_memory_fn", has_target = true, delegate_target_pos = 0.9)]
  3285. public delegate void CloseMemoryFn(void* data, size_t data_size);
  3286. [CCode (cname = "ufbx_close_memory_cb", destroy_function = "", has_type_id = false)]
  3287. public struct CloseMemoryCb
  3288. {
  3289. public CloseMemoryFn fn;
  3290. public void* user;
  3291. }
  3292. [CCode (cname = "ufbx_open_memory_opts", destroy_function = "", has_type_id = false)]
  3293. public struct OpenMemoryOpts
  3294. {
  3295. public uint32 _begin_zero;
  3296. public AllocatorOpts allocator;
  3297. public bool no_copy;
  3298. public CloseMemoryCb close_cb;
  3299. public uint32 _end_zero;
  3300. }
  3301. [CCode (cname = "ufbx_error_frame", destroy_function = "", has_type_id = false)]
  3302. public struct ErrorFrame
  3303. {
  3304. public uint32 source_line;
  3305. public String function;
  3306. public String description;
  3307. }
  3308. [CCode (cname = "ufbx_error_type", cprefix = "UFBX_ERROR_", has_type_id = false)]
  3309. public enum ErrorType
  3310. {
  3311. NONE,
  3312. UNKNOWN,
  3313. FILE_NOT_FOUND,
  3314. EMPTY_FILE,
  3315. EXTERNAL_FILE_NOT_FOUND,
  3316. OUT_OF_MEMORY,
  3317. MEMORY_LIMIT,
  3318. ALLOCATION_LIMIT,
  3319. TRUNCATED_FILE,
  3320. IO,
  3321. CANCELLED,
  3322. UNRECOGNIZED_FILE_FORMAT,
  3323. UNINITIALIZED_OPTIONS,
  3324. ZERO_VERTEX_SIZE,
  3325. TRUNCATED_VERTEX_STREAM,
  3326. INVALID_UTF8,
  3327. FEATURE_DISABLED,
  3328. BAD_NURBS,
  3329. BAD_INDEX,
  3330. NODE_DEPTH_LIMIT,
  3331. THREADED_ASCII_PARSE,
  3332. UNSAFE_OPTIONS,
  3333. DUPLICATE_OVERRIDE,
  3334. UNSUPPORTED_VERSION,
  3335. TYPE_COUNT
  3336. }
  3337. [CCode (cname = "ufbx_error", destroy_function = "", has_type_id = false)]
  3338. public struct Error
  3339. {
  3340. public ErrorType type;
  3341. public String description;
  3342. public uint32 stack_size;
  3343. public ErrorFrame stack[ERROR_STACK_MAX_DEPTH];
  3344. public size_t info_length;
  3345. public char info[ERROR_INFO_LENGTH];
  3346. }
  3347. [CCode (cname = "ufbx_progress", destroy_function = "", has_type_id = false)]
  3348. public struct Progress
  3349. {
  3350. public uint64 bytes_read;
  3351. public uint64 bytes_total;
  3352. }
  3353. [CCode (cname = "ufbx_progress_result", cprefix = "UFBX_PROGRESS_", has_type_id = false)]
  3354. [Flags]
  3355. public enum ProgressResult
  3356. {
  3357. CONTINUE,
  3358. CANCEL
  3359. }
  3360. [CCode (cname = "ufbx_progress_fn", destroy_function = "", has_type_id = false)]
  3361. public delegate ProgressResult ProgressFn(Progress progress);
  3362. [CCode (cname = "ufbx_progress_cb", destroy_function = "", has_type_id = false)]
  3363. public struct ProgressCb
  3364. {
  3365. public ProgressFn fn;
  3366. public void* user;
  3367. }
  3368. [CCode (cname = "ufbx_inflate_input", destroy_function = "", has_type_id = false)]
  3369. public struct InflateInput
  3370. {
  3371. public size_t total_size;
  3372. public void* data;
  3373. public size_t data_size;
  3374. public void* buffer;
  3375. public size_t buffer_size;
  3376. public ReadFn read_fn;
  3377. public void* read_user;
  3378. public ProgressCb progress_cb;
  3379. public uint64 progress_interval_hint;
  3380. public uint64 progress_size_before;
  3381. public uint64 progress_size_after;
  3382. public bool no_header;
  3383. public bool no_checksum;
  3384. public size_t internal_fast_bits;
  3385. }
  3386. [CCode (cname = "ufbx_inflate_retain", destroy_function = "", has_type_id = false)]
  3387. struct InflateRetain
  3388. {
  3389. public bool initialized;
  3390. public uint64 data[1024];
  3391. }
  3392. [CCode (cname = "ufbx_index_error_handling", cprefix = "UFBX_INDEX_ERROR_HANDLING_", has_type_id = false)]
  3393. public enum IndexErrorHandling
  3394. {
  3395. CLAMP,
  3396. NO_INDEX,
  3397. ABORT_LOADING,
  3398. UNSAFE_IGNORE,
  3399. COUNT
  3400. }
  3401. [CCode (cname = "ufbx_unicode_error_handling", cprefix = "UFBX_UNICODE_ERROR_HANDLING_", has_type_id = false)]
  3402. public enum UnicodeErrorHandling
  3403. {
  3404. REPLACEMENT_CHARACTER,
  3405. UNDERSCORE,
  3406. QUESTION_MARK,
  3407. REMOVE,
  3408. ABORT_LOADING,
  3409. UNSAFE_IGNORE,
  3410. COUNT
  3411. }
  3412. [CCode (cname = "ufbx_baked_key_flags", cprefix = "UFBX_BAKED_KEY_", has_type_id = false)]
  3413. [Flags]
  3414. public enum BakedKeyFlags
  3415. {
  3416. STEP_LEFT,
  3417. STEP_RIGHT,
  3418. STEP_KEY,
  3419. KEYFRAME,
  3420. REDUCED
  3421. }
  3422. [SimpleType]
  3423. [CCode (cname = "ufbx_baked_vec3", destroy_function = "", has_type_id = false)]
  3424. public struct BakedVec3
  3425. {
  3426. public double time;
  3427. public Vec3 value;
  3428. public BakedKeyFlags flags;
  3429. }
  3430. [CCode (cname = "ufbx_baked_vec3_list", destroy_function = "", has_type_id = false)]
  3431. public struct BakedVec3List
  3432. {
  3433. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  3434. public BakedVec3[] data;
  3435. }
  3436. [SimpleType]
  3437. [CCode (cname = "ufbx_baked_quat", destroy_function = "", has_type_id = false)]
  3438. public struct BakedQuat
  3439. {
  3440. public double time;
  3441. public Quat value;
  3442. public BakedKeyFlags flags;
  3443. }
  3444. [CCode (cname = "ufbx_baked_quat_list", destroy_function = "", has_type_id = false)]
  3445. public struct BakedQuatList
  3446. {
  3447. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  3448. public BakedQuat[] data;
  3449. }
  3450. [SimpleType]
  3451. [CCode (cname = "ufbx_baked_node", destroy_function = "", has_type_id = false)]
  3452. public struct BakedNode
  3453. {
  3454. public uint32 typed_id;
  3455. public uint32 element_id;
  3456. public bool constant_translation;
  3457. public bool constant_rotation;
  3458. public bool constant_scale;
  3459. public BakedVec3List translation_keys;
  3460. public BakedQuatList rotation_keys;
  3461. public BakedVec3List scale_keys;
  3462. }
  3463. [CCode (cname = "ufbx_baked_node_list", destroy_function = "", has_type_id = false)]
  3464. public struct BakedNodeList
  3465. {
  3466. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  3467. public BakedNode[] data;
  3468. }
  3469. [SimpleType]
  3470. [CCode (cname = "ufbx_baked_prop", destroy_function = "", has_type_id = false)]
  3471. public struct BakedProp
  3472. {
  3473. public String name;
  3474. public bool constant_value;
  3475. public BakedVec3List keys;
  3476. }
  3477. [CCode (cname = "ufbx_baked_prop_list", destroy_function = "", has_type_id = false)]
  3478. public struct BakedPropList
  3479. {
  3480. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  3481. public BakedProp[] data;
  3482. }
  3483. [SimpleType]
  3484. [CCode (cname = "ufbx_baked_element", destroy_function = "", has_type_id = false)]
  3485. public struct BakedElement
  3486. {
  3487. public uint32 element_id;
  3488. public BakedPropList props;
  3489. }
  3490. [CCode (cname = "ufbx_baked_element_list", destroy_function = "", has_type_id = false)]
  3491. public struct BakedElementList
  3492. {
  3493. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  3494. public BakedElement[] data;
  3495. }
  3496. [CCode (cname = "ufbx_baked_anim_metadata", destroy_function = "", has_type_id = false)]
  3497. public struct BakedAnimMetadata
  3498. {
  3499. public size_t result_memory_used;
  3500. public size_t temp_memory_used;
  3501. public size_t result_allocs;
  3502. public size_t temp_allocs;
  3503. }
  3504. [CCode (cname = "ufbx_baked_anim", destroy_function = "", has_type_id = false)]
  3505. public struct BakedAnim
  3506. {
  3507. public BakedNodeList nodes;
  3508. public BakedElementList elements;
  3509. public double playback_time_begin;
  3510. public double playback_time_end;
  3511. public double playback_duration;
  3512. public double key_time_min;
  3513. public double key_time_max;
  3514. public BakedAnimMetadata metadata;
  3515. }
  3516. //
  3517. [CCode (cname = "ufbx_thread_pool_context", has_type_id = false)]
  3518. [SimpleType]
  3519. public struct ThreadPoolContext : uintptr
  3520. {
  3521. }
  3522. [CCode (cname = "ufbx_thread_pool_info", destroy_function = "", has_type_id = false)]
  3523. public struct ThreadPoolInfo
  3524. {
  3525. public uint32 max_concurrent_tasks;
  3526. }
  3527. [CCode (cname = "ufbx_thread_pool_init_fn", has_target = true, delegate_target_pos = 0.9)]
  3528. public delegate bool ThreadPoolInitFn(ThreadPoolContext ctx, ThreadPoolInfo info);
  3529. [CCode (cname = "ufbx_thread_pool_run_fn", has_target = true, delegate_target_pos = 0.9)]
  3530. public delegate bool ThreadPoolRunFn(ThreadPoolContext ctx, uint32 group, uint32 start_index, uint32 count);
  3531. [CCode (cname = "ufbx_thread_pool_wait_fn", has_target = true, delegate_target_pos = 0.9)]
  3532. public delegate bool ThreadPoolWaitFn(ThreadPoolContext ctx, uint32 group, uint32 max_index);
  3533. [CCode (cname = "ufbx_thread_pool_free_fn", has_target = true, delegate_target_pos = 0.9)]
  3534. public delegate void ThreadPoolFreeFn(ThreadPoolContext ctx);
  3535. [CCode (cname = "ufbx_thread_pool", destroy_function = "", has_type_id = false)]
  3536. public struct ThreadPool
  3537. {
  3538. public ThreadPoolInitFn init_fn;
  3539. public ThreadPoolRunFn run_fn;
  3540. public ThreadPoolWaitFn wait_fn;
  3541. public ThreadPoolFreeFn free_fn;
  3542. public void* user;
  3543. }
  3544. [CCode (cname = "ufbx_thread_opts", destroy_function = "", has_type_id = false)]
  3545. public struct ThreadOpts
  3546. {
  3547. public ThreadPool pool;
  3548. public size_t num_tasks;
  3549. public size_t memory_limit;
  3550. }
  3551. [CCode (cname = "ufbx_evaluate_flags", cprefix = "UFBX_EVALUATE_FLAG_", has_type_id = false)]
  3552. public enum EvaluateFlags
  3553. {
  3554. NO_EXTRAPOLATION,
  3555. }
  3556. [CCode (cname = "ufbx_load_opts", destroy_function = "", has_type_id = false)]
  3557. public struct LoadOpts
  3558. {
  3559. public uint32 _begin_zero;
  3560. public AllocatorOpts temp_allocator;
  3561. public AllocatorOpts result_allocator;
  3562. public ThreadOpts thread_opts;
  3563. public bool ignore_geometry;
  3564. public bool ignore_animation;
  3565. public bool ignore_embedded;
  3566. public bool ignore_all_content;
  3567. public bool evaluate_skinning;
  3568. public bool evaluate_caches;
  3569. public bool load_external_files;
  3570. public bool ignore_missing_external_files;
  3571. public bool skip_skin_vertices;
  3572. public bool skip_mesh_parts;
  3573. public bool clean_skin_weights;
  3574. public bool use_blender_pbr_material;
  3575. public bool disable_quirks;
  3576. public bool strict;
  3577. public bool force_single_thread_ascii_parsing;
  3578. public bool allow_unsafe;
  3579. public IndexErrorHandling index_error_handling;
  3580. public bool connect_broken_elements;
  3581. public bool allow_nodes_out_of_root;
  3582. public bool allow_missing_vertex_position;
  3583. public bool allow_empty_faces;
  3584. public bool generate_missing_normals;
  3585. public bool open_main_file_with_default;
  3586. public char path_separator;
  3587. public uint32 node_depth_limit;
  3588. public uint64 file_size_estimate;
  3589. public size_t read_buffer_size;
  3590. public String filename;
  3591. public Blob raw_filename;
  3592. public ProgressCb progress_cb;
  3593. public uint64 progress_interval_hint;
  3594. public OpenFileCb open_file_cb;
  3595. public GeometryTransformHandling geometry_transform_handling;
  3596. public InheritModeHandling inherit_mode_handling;
  3597. public SpaceConversion space_conversion;
  3598. public PivotHandling pivot_handling;
  3599. public bool pivot_handling_retain_empties;
  3600. public MirrorAxis handedness_conversion_axis;
  3601. public bool handedness_conversion_retain_winding;
  3602. public bool reverse_winding;
  3603. public CoordinateAxes target_axes;
  3604. public Real target_unit_meters;
  3605. public CoordinateAxes target_camera_axes;
  3606. public CoordinateAxes target_light_axes;
  3607. public String geometry_transform_helper_name;
  3608. public String scale_helper_name;
  3609. public bool normalize_normals;
  3610. public bool normalize_tangents;
  3611. public bool use_root_transform;
  3612. public Transform root_transform;
  3613. public double key_clamp_threshold;
  3614. public UnicodeErrorHandling unicode_error_handling;
  3615. public bool retain_vertex_attrib_w;
  3616. public bool retain_dom;
  3617. public FileFormat file_format;
  3618. public size_t file_format_lookahead;
  3619. public bool no_format_from_content;
  3620. public bool no_format_from_extension;
  3621. public bool obj_search_mtl_by_filename;
  3622. public bool obj_merge_objects;
  3623. public bool obj_merge_groups;
  3624. public bool obj_split_groups;
  3625. public String obj_mtl_path;
  3626. public Blob obj_mtl_data;
  3627. public Real obj_unit_meters;
  3628. public CoordinateAxes obj_axes;
  3629. public uint32 _end_zero;
  3630. }
  3631. [CCode (cname = "ufbx_evaluate_opts", destroy_function = "", has_type_id = false)]
  3632. public struct EvaluateOpts
  3633. {
  3634. public uint32 _begin_zero;
  3635. public Allocator temp_allocator;
  3636. public AllocatorOpts result_allocator;
  3637. public bool evaluate_skinning;
  3638. public bool evaluate_caches;
  3639. public uint32 evaluate_flags;
  3640. public bool load_external_files;
  3641. public OpenFileCb open_file_cb;
  3642. public uint32 _end_zero;
  3643. }
  3644. [CCode (cname = "ufbx_const_uint32_list", destroy_function = "", has_type_id = false)]
  3645. public struct ConstUint32List
  3646. {
  3647. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  3648. public uint32[] data;
  3649. }
  3650. [CCode (cname = "ufbx_const_real_list", destroy_function = "", has_type_id = false)]
  3651. public struct ConstRealList
  3652. {
  3653. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  3654. public Real[] data;
  3655. }
  3656. [SimpleType]
  3657. [CCode (cname = "ufbx_prop_override_desc", destroy_function = "", has_type_id = false)]
  3658. public struct PropOverrideDesc
  3659. {
  3660. public uint32 element_id;
  3661. public String prop_name;
  3662. public Vec4 value;
  3663. public String value_str;
  3664. public int64 value_int;
  3665. }
  3666. [CCode (cname = "ufbx_const_prop_override_desc_list", destroy_function = "", has_type_id = false)]
  3667. public struct ConstPropOverrideDescList
  3668. {
  3669. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  3670. public PropOverrideDesc[] data;
  3671. }
  3672. [CCode (cname = "ufbx_const_transform_override_list", destroy_function = "", has_type_id = false)]
  3673. public struct ConstTransformOverrideList
  3674. {
  3675. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  3676. public TransformOverride[] data;
  3677. }
  3678. [CCode (cname = "ufbx_anim_opts", destroy_function = "", has_type_id = false)]
  3679. public struct AnimOpts
  3680. {
  3681. public uint32 _begin_zero;
  3682. public ConstUint32List layer_ids;
  3683. public ConstRealList override_layer_weights;
  3684. public ConstPropOverrideDescList prop_overrides;
  3685. public ConstTransformOverrideList transform_overrides;
  3686. public bool ignore_connections;
  3687. public AllocatorOpts result_allocator;
  3688. public uint32 _end_zero;
  3689. }
  3690. [CCode (cname = "ufbx_bake_step_handling", cprefix = "UFBX_BAKE_STEP_HANDLING_", has_type_id = false)]
  3691. public enum BakeStepHandling
  3692. {
  3693. DEFAULT,
  3694. CUSTOM_DURATION,
  3695. IDENTICAL_TIME,
  3696. ADJACENT_DOUBLE,
  3697. IGNORE,
  3698. COUNT
  3699. }
  3700. [CCode (cname = "ufbx_bake_opts", destroy_function = "", has_type_id = false)]
  3701. public struct BakeOpts
  3702. {
  3703. public uint32 _begin_zero;
  3704. public AllocatorOpts temp_allocator;
  3705. public AllocatorOpts result_allocator;
  3706. public bool trim_start_time;
  3707. public double resample_rate;
  3708. public double minimum_sample_rate;
  3709. public double maximum_sample_rate;
  3710. public bool bake_transform_props;
  3711. public bool skip_node_transforms;
  3712. public bool no_resample_rotation;
  3713. public bool ignore_layer_weight_animation;
  3714. public size_t max_keyframe_segments;
  3715. public BakeStepHandling step_handling;
  3716. public double step_custom_duration;
  3717. public double step_custom_epsilon;
  3718. public uint32 evaluate_flags;
  3719. public bool key_reduction_enabled;
  3720. public bool key_reduction_rotation;
  3721. public double key_reduction_threshold;
  3722. public size_t key_reduction_passes;
  3723. public uint32 _end_zero;
  3724. }
  3725. [CCode (cname = "ufbx_tessellate_curve_opts", destroy_function = "", has_type_id = false)]
  3726. public struct TessellateCurveOpts
  3727. {
  3728. public uint32 _begin_zero;
  3729. public AllocatorOpts temp_allocator;
  3730. public AllocatorOpts result_allocator;
  3731. public size_t span_subdivision;
  3732. public uint32 _end_zero;
  3733. }
  3734. [CCode (cname = "ufbx_tessellate_surface_opts", destroy_function = "", has_type_id = false)]
  3735. public struct TessellateSurfaceOpts
  3736. {
  3737. public uint32 _begin_zero;
  3738. public AllocatorOpts temp_allocator;
  3739. public AllocatorOpts result_allocator;
  3740. public size_t span_subdivision_u;
  3741. public size_t span_subdivision_v;
  3742. public bool skip_mesh_parts;
  3743. public uint32 _end_zero;
  3744. }
  3745. [CCode (cname = "ufbx_subdivide_opts", destroy_function = "", has_type_id = false)]
  3746. public struct SubdivideOpts
  3747. {
  3748. public uint32 _begin_zero;
  3749. public AllocatorOpts temp_allocator;
  3750. public AllocatorOpts result_allocator;
  3751. public SubdivisionBoundary boundary;
  3752. public SubdivisionBoundary uv_boundary;
  3753. public bool ignore_normals;
  3754. public bool interpolate_normals;
  3755. public bool interpolate_tangents;
  3756. public bool evaluate_source_vertices;
  3757. public size_t max_source_vertices;
  3758. public bool evaluate_skin_weights;
  3759. public size_t max_skin_weights;
  3760. public size_t skin_deformer_index;
  3761. public uint32 _end_zero;
  3762. }
  3763. [CCode (cname = "ufbx_geometry_cache_opts", destroy_function = "", has_type_id = false)]
  3764. public struct GeometryCacheOpts
  3765. {
  3766. public uint32 _begin_zero;
  3767. public AllocatorOpts temp_allocator;
  3768. public AllocatorOpts result_allocator;
  3769. public OpenFileCb open_file_cb;
  3770. public double frames_per_second;
  3771. public MirrorAxis mirror_axis;
  3772. public bool use_scale_factor;
  3773. public Real scale_factor;
  3774. public uint32 _end_zero;
  3775. }
  3776. [CCode (cname = "ufbx_geometry_cache_data_opts", destroy_function = "", has_type_id = false)]
  3777. public struct GeometryCacheDataOpts
  3778. {
  3779. public uint32 _begin_zero;
  3780. public OpenFileCb open_file_cb;
  3781. public bool additive;
  3782. public bool use_weight;
  3783. public Real weight;
  3784. public bool ignore_transform;
  3785. public uint32 _end_zero;
  3786. }
  3787. [CCode (cname = "ufbx_panic", destroy_function = "", has_type_id = false)]
  3788. public struct Panic
  3789. {
  3790. public bool did_panic;
  3791. public size_t message_length;
  3792. public char message[PANIC_MESSAGE_LENGTH];
  3793. }
  3794. public bool is_thread_safe();
  3795. } /* namespace ufbx */