ufbx.vapi 89 KB

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