*/}}

la_properties.c 152 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162
  1. /*
  2. * LaGUI: A graphical application framework.
  3. * Copyright (C) 2022-2023 Wu Yiming
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #include "../la_5.h"
  19. extern LA MAIN;
  20. extern struct _tnsMain *T;
  21. void laset_TerminalInput(void* unused, char* content){
  22. if((!content)||(!content[0])){ MAIN.TerminalInput[0]=0; return; }
  23. int len=strlen(content);
  24. if(MAIN.IsTerminalEnter){
  25. if(strSame(content,"clear")){ logClear(); MAIN.TerminalInput[0]=0; return; }
  26. logPrint("%s %s\n",MAIN.TerminalIncomplete?"...":">>>",content);
  27. terLoadLine(content,1);
  28. MAIN.TerminalInput[0]=0; return;
  29. }
  30. strcpy(MAIN.TerminalInput,content);
  31. }
  32. void *laget_ActiveTheme(void *unused){ return MAIN.CurrentTheme; }
  33. void laset_ActiveTheme(void* unused, laTheme* t){
  34. if(!t) MAIN.CurrentTheme = MAIN.Themes.pFirst;
  35. else MAIN.CurrentTheme = t;
  36. la_RefreshThemeColor(MAIN.CurrentTheme);
  37. la_RegenerateWireColors();
  38. laRedrawAllWindows();
  39. }
  40. void laset_ThemeName(laTheme *t, char *content){ strSafeSet(&t->Name, content); }
  41. void laset_ThemeAuthor(laTheme *t, char *content){ strSafeSet(&t->Author, content); }
  42. void laset_ThemeColor(laTheme* t, real* array){
  43. tnsVectorCopy4d(array,t->Color);
  44. la_RefreshThemeColor(t);
  45. laRedrawAllWindows();
  46. }
  47. void laset_ThemeAccentColor(laTheme* t, real* array){
  48. tnsVectorCopy4d(array,t->AccentColor);
  49. la_RefreshThemeColor(t);
  50. laRedrawAllWindows();
  51. }
  52. void laset_ThemeWarningColor(laTheme* t, real* array){
  53. tnsVectorCopy4d(array,t->WarningColor);
  54. la_RefreshThemeColor(t);
  55. laRedrawAllWindows();
  56. }
  57. void laset_ThemeInactiveSaturation(laTheme* t, real a){
  58. t->InactiveSaturation=a;
  59. la_RefreshThemeColor(t);
  60. laRedrawAllWindows();
  61. }
  62. void laset_ThemeInactiveMix(laTheme* t, real a){
  63. t->InactiveMix=a;
  64. la_RefreshThemeColor(t);
  65. laRedrawAllWindows();
  66. }
  67. void laset_ThemeCursorAlpha(laTheme* t, real a){
  68. t->CursorAlpha=a;
  69. la_RefreshThemeColorSelf(t);
  70. laRedrawAllWindows();
  71. }
  72. void laset_ThemeSelectionAlpha(laTheme* t, real a){
  73. t->SelectionAlpha=a;
  74. la_RefreshThemeColorSelf(t);
  75. laRedrawAllWindows();
  76. }
  77. void laset_ThemeNormal(laBoxedTheme* bt, real val){
  78. bt->NormalY=val;
  79. la_RefreshBoxedThemeColor(bt);
  80. laRedrawAllWindows();
  81. }
  82. void laset_ThemeActive(laBoxedTheme* bt, real val){
  83. bt->ActiveY=val;
  84. la_RefreshBoxedThemeColor(bt);
  85. laRedrawAllWindows();
  86. }
  87. void laset_ThemeBorder(laBoxedTheme* bt, real val){
  88. bt->BorderY=val;
  89. la_RefreshBoxedThemeColor(bt);
  90. laRedrawAllWindows();
  91. }
  92. void laset_ThemeText(laBoxedTheme* bt, real val){
  93. bt->TextY=val;
  94. la_RefreshBoxedThemeColor(bt);
  95. laRedrawAllWindows();
  96. }
  97. void laset_ThemeTextActive(laBoxedTheme* bt, real val){
  98. bt->TextActiveY=val;
  99. la_RefreshBoxedThemeColor(bt);
  100. laRedrawAllWindows();
  101. }
  102. void laset_ThemeAlpha(laBoxedTheme* bt, real val){
  103. bt->Alpha=val;
  104. la_RefreshBoxedThemeColor(bt);
  105. laRedrawAllWindows();
  106. }
  107. void laset_ThemeMargins(laBoxedTheme* bt, int index, int val){
  108. bt->Margins[index]=val;
  109. la_RefreshBoxedThemeColor(bt);
  110. laRedrawAllWindows();
  111. }
  112. void laset_ThemePaddings(laBoxedTheme* bt, int index, int val){
  113. bt->Paddings[index]=val;
  114. la_RefreshBoxedThemeColor(bt);
  115. laRedrawAllWindows();
  116. }
  117. void laset_ThemeWireTransparency(laTheme* t, real val){ t->WireTransparency = val; la_RegenerateWireColors(); laRedrawAllWindows(); }
  118. void laset_ThemeWireBrightness(laTheme* t, real val){ t->WireBrightness = val; la_RegenerateWireColors(); laRedrawAllWindows(); }
  119. void laset_ThemeWireSaturation(laTheme* t, real val){ t->WireSaturation = val; la_RegenerateWireColors(); laRedrawAllWindows(); }
  120. void laset_ThemeEdgeTransparency(laTheme* t, real val){ t->EdgeTransparency = val; la_RefreshThemeColorSelf(t); laRedrawAllWindows(); }
  121. void laset_ThemeEdgeBrightness(laTheme* t, real val){ t->EdgeBrightness = val; la_RefreshThemeColorSelf(t); laRedrawAllWindows(); }
  122. void laset_ThemeVertexTransparency(laTheme* t, real val){ t->VertexTransparency = val; la_RefreshThemeColorSelf(t); laRedrawAllWindows(); }
  123. void laset_ThemeVertexBrightness(laTheme* t, real val){ t->VertexBrightness = val; la_RefreshThemeColorSelf(t); laRedrawAllWindows(); }
  124. void laset_ThemeSVertexTransparency(laTheme* t, real val){ t->SelectedVertexTransparency = val; la_RefreshThemeColorSelf(t); laRedrawAllWindows(); }
  125. void laset_ThemeSEdgeTransparency(laTheme* t, real val){ t->SelectedEdgeTransparency = val; la_RefreshThemeColorSelf(t); laRedrawAllWindows(); }
  126. void laset_ThemeSFaceTransparency(laTheme* t, real val){ t->SelectedFaceTransparency = val; la_RefreshThemeColorSelf(t); laRedrawAllWindows(); }
  127. void laread_UsingTheme(void* unused, char* name){ laTheme* t=laGetTheme(name); if(t){ laset_ActiveTheme(0,t); } }
  128. void laget_UsingTheme(void* unused, char* result, char**result_direct){ laTheme* t=laget_ActiveTheme(0);
  129. if(t&&t->Name&&t->Name->Ptr){ *result_direct=t->Name->Ptr; return; } *result_direct="NOT FOUND";
  130. }
  131. void laset_WireColorSlices(void* unused, int val){ MAIN.WireColorSlices = val; la_RegenerateWireColors(); laRedrawAllWindows(); }
  132. void laset_WireThickness(void* unused, real val){ MAIN.WireThickness = val;laRedrawAllWindows(); }
  133. void laset_WireSaggyness(void* unused, real val){ MAIN.WireSaggyness = val; laRedrawAllWindows(); }
  134. void* laget_DetachedControllerFirst(void* unused,void* unused2){
  135. return MAIN.Controllers.pFirst;
  136. }
  137. extern tnsFontManager* FM;
  138. void laset_UiRowHeight(void* unused, int val){
  139. MAIN.UiRowHeight = val;
  140. MAIN.ScaledUiRowHeight=MAIN.UiRowHeight;
  141. la_RefreshThemeColor(MAIN.CurrentTheme);
  142. tfntResizeFontTexture(FM->UsingFont, TNS_FONT_BUFFER_W_DEFAULT);
  143. tnsInvalidateFontCache();
  144. laRedrawAllWindows();
  145. }
  146. void laset_FontSize(void* unused, real val){
  147. MAIN.FontSize = val;
  148. MAIN.ScaledUiRowHeight=MAIN.UiRowHeight;
  149. tnsInvalidateFontCache();
  150. tfntResizeFontTexture(FM->UsingFont, TNS_FONT_BUFFER_W_DEFAULT);
  151. laRedrawAllWindows();
  152. }
  153. void laset_MarginSize(void* unused, real val){
  154. MAIN.MarginSize = val;
  155. la_RefreshThemeColor(MAIN.CurrentTheme);
  156. laRedrawAllWindows();
  157. }
  158. void laset_ResourcePath(laResourceFolder *rf, char *content){
  159. strSafeSet(&rf->Path, content);
  160. laRefreshUDFRegistries();
  161. }
  162. void *laget_Self(void *p, void *UNUSED){
  163. return p;
  164. }
  165. void *laget_ListNext(laListItem *Item, void *UNUSED){
  166. return Item->pNext;
  167. }
  168. void *laget_ListPrev(laListItem *Item, void *UNUSED){
  169. return Item->pPrev;
  170. }
  171. void *laget_List2Next(laListItem2 *Item, void *UNUSED){
  172. return Item->pNext;
  173. }
  174. void *laget_List2Prev(laListItem2 *Item, void *UNUSED){
  175. return Item->pPrev;
  176. }
  177. void *laget_PointerListNext(void *UNUSED, laPropIterator *pi){
  178. pi->Linker = ((laListItemPointer *)pi->Linker)->pNext;
  179. return pi->Linker->p;
  180. }
  181. void *laget_FirstUiItem(laUiList *uil, void *UNUSED){
  182. return uil->UiItems.pFirst;
  183. }
  184. void *laget_FirstColumnItem(laUiList *uil, void *UNUSED){
  185. if (!uil) return 0;
  186. return uil->Columns.pFirst;
  187. }
  188. int la_ResetUiColum(laColumn *c, int U, int L, int R, int LR, int repos);
  189. void laset_ColumnSP(laColumn *c, real val){
  190. if (c->LS) c->LS->SP = val;
  191. if (c->RS) c->RS->SP = val;
  192. }
  193. real laget_ColumnSP(laColumn *c){
  194. if (c->LS) return c->LS->SP;
  195. else
  196. return 0.5;
  197. }
  198. void laset_ColumnSnap(laColumn *c, int val){
  199. if (c->LS && c->LS->MaxW) c->LS->MaxW = val;
  200. if (c->RS && c->RS->MaxW) c->RS->MaxW = val;
  201. }
  202. int laget_ColumnSnap(laColumn *c){
  203. if (c->LS && c->LS->MaxW) return c->LS->MaxW;
  204. if (c->RS && c->RS->MaxW) return c->RS->MaxW;
  205. return 20;
  206. }
  207. void laset_SnapState(laColumn *c, int val){
  208. if (val == 1){
  209. if (c->LS) c->LS->MaxW = 20;
  210. if (c->RS) c->RS->MaxW = 0;
  211. }elif (val == 2){
  212. if (c->LS) c->LS->MaxW = 0;
  213. if (c->RS) c->RS->MaxW = 20;
  214. }else{
  215. if (c->LS) c->LS->MaxW = 0;
  216. if (c->RS) c->RS->MaxW = 0;
  217. }
  218. }
  219. int laget_SnapState(laColumn *c){
  220. if (c->LS && c->LS->MaxW) return 1;
  221. if (c->RS && c->RS->MaxW) return 2;
  222. return 0;
  223. }
  224. void *laget_BoxedTheme(laTheme *theme){
  225. return theme->BoxedThemes.pFirst;
  226. }
  227. void *laget_BoxedThemeUi(void *UNUSED){
  228. return ((laTheme *)MAIN.Themes.pFirst)->BoxedThemes.pFirst;
  229. }
  230. void* laget_Main(void *UNUSED, void* UNUSED2){
  231. return &MAIN;
  232. }
  233. laPropContainer* laget_PropertyNodeType(laProp* p){
  234. static laPropContainer* pc=0;
  235. static laPropContainer* ipc=0;
  236. static laPropContainer* fpc=0;
  237. switch(p->PropertyType&(~LA_PROP_ARRAY)){
  238. case LA_PROP_INT: { if(!ipc) ipc=la_ContainerLookup("int_property"); return ipc; }
  239. case LA_PROP_FLOAT: { if(!fpc) fpc=la_ContainerLookup("float_property"); return fpc; }
  240. default: { if(!pc) pc=la_ContainerLookup("property_item"); return pc; }
  241. }
  242. }
  243. void *laget_PropertyItemFirst(laPropContainer *p){
  244. if (!p) return 0;
  245. return p->Props.pFirst;
  246. }
  247. void *laget_PropertyItemNext(laProp *p, void *UNUSED){
  248. return p->Item.pNext;
  249. }
  250. void laget_PropertyName(laProp *p, char *result,char** result_direct){
  251. strCopyFull(result, p ? p->Name : "");
  252. }
  253. void laget_PropertyIdentifier(laProp *p, char *result,char** result_direct){
  254. strCopyFull(result, p ? p->Identifier : "");
  255. }
  256. void laget_PropertyDescription(laProp *p, char *result,char** result_direct){
  257. strCopyFull(result, p ? p->Description : "");
  258. }
  259. int laget_PropertySubContainerIconID(laProp *p){
  260. if (p->PropertyType != LA_PROP_SUB) return 0;
  261. if (!p->SubProp){
  262. p->SubProp = la_ContainerLookup(((laSubProp *)p)->TargetID);
  263. if (!p->SubProp) return 0;
  264. }
  265. return p->SubProp->IconID;
  266. }
  267. void* laget_TrashItemInstance(void *a){
  268. return a;
  269. }
  270. void *laget_ActiveWindow(void *unused){
  271. return MAIN.CurrentWindow;
  272. }
  273. void *laget_FirstWindow(void *unused, void* unused_iter){
  274. return MAIN.Windows.pFirst;
  275. }
  276. void *laget_FirstContainer(void *unused, void* unused_iter){
  277. return MAIN.PropContainers.pFirst;
  278. }
  279. void *laget_WindowFirstLayout(laWindow *window, void* unused_iter){
  280. return window->Layouts.pFirst;
  281. }
  282. void *laget_FirstHiddenPanel(laWindow *window, void* unused_iter){
  283. for(laPanel* p=window->Panels.pFirst;p;p=p->Item.pNext){
  284. if(!p->Show&&!p->LaterDestroy){return p;}
  285. }
  286. return 0;
  287. }
  288. void *laget_NextHiddenPanel(laPanel* p, void* unused_iter){
  289. for(p=p->Item.pNext;p;p=p->Item.pNext){
  290. if(!p->Show&&!p->LaterDestroy){return p;}
  291. }
  292. return 0;
  293. }
  294. void laset_WindowHiddenPanel(laWindow *window, laPanel* p){
  295. laShowPanelWithExpandEffect(p);
  296. laPopPanel(p);
  297. }
  298. void laget_PanelTitle(laPanel *p, char *result,char** result_direct){
  299. strCopyFull(result, p->Title->Ptr);
  300. }
  301. void laset_PanelTitle(laPanel *p, char *content){
  302. strSafeSet(&p->Title, content);
  303. p->TitleWidth = tnsStringGetWidth(transLate(p->Title->Ptr), 0,0);
  304. }
  305. void laread_PanelTitle(laPanel *p, char *content){
  306. strSafeSet(&p->Title, content);
  307. }
  308. void laset_PanelSnapDistance(laPanel *p, int index, int n){
  309. int a;
  310. if (!n) return;
  311. switch (index){ //lrtb
  312. case 0:
  313. p->SL = p->SL ? n : 0;
  314. break;
  315. case 1:
  316. p->SR = p->SR ? n : 0;
  317. break;
  318. case 2:
  319. p->ST = p->ST ? n : 0;
  320. break;
  321. case 3:
  322. p->SB = p->SB ? n : 0;
  323. break;
  324. }
  325. }
  326. void laread_PanelSnapDistance(laPanel* p, int index, int n) {
  327. int a;
  328. if (!n) return;
  329. switch (index) { //lrtb
  330. case 0: p->SL = n; break;
  331. case 1: p->SR = n; break;
  332. case 2: p->ST = n; break;
  333. case 3: p->SB = n; break;
  334. }
  335. }
  336. void laset_PanelSnapEnable(laPanel *p, int index, int n){
  337. laWindow *w = MAIN.CurrentWindow;
  338. int a;
  339. switch (index){ //lrtb
  340. case 0:
  341. p->SL = (n && p->X) ? p->X : 0;
  342. break;
  343. case 1:
  344. p->SR = (n && w ? ((a = MAIN.CurrentWindow->CW - p->X - p->W) ? a : 0) : n);
  345. break;
  346. case 2:
  347. p->ST = (n && p->Y) ? p->Y : 0;
  348. break;
  349. case 3:
  350. p->SB = (n && w ? ((a = MAIN.CurrentWindow->CH - p->Y - p->H) ? a : 0) : n);
  351. break;
  352. }
  353. }
  354. void laget_PanelSnapEnable(laPanel *p, int *result){
  355. result[0] = p->SL ? 1 : 0;
  356. result[1] = p->SR ? 1 : 0;
  357. result[2] = p->ST ? 1 : 0;
  358. result[3] = p->SB ? 1 : 0;
  359. }
  360. void laget_LayoutTitle(laLayout *l, char *result, char** result_direct){
  361. strCopyFull(result, l->ID->Ptr);
  362. }
  363. void laset_LayoutTitle(laLayout *l, char *content){
  364. strSafeSet(&l->ID, content);
  365. if(l->ID->Ptr) laRenameWindow(MAIN.CurrentWindow, l->ID->Ptr);
  366. }
  367. //void* laget_LayoutPanelFirst(laLayout* l) {
  368. // return l->Panels.pFirst;
  369. //}
  370. void laset_WindowActiveLayout(laWindow *w, laLayout *l, int UNUSED_State){
  371. la_StopAllOperators();
  372. memAssignRef(w, &w->CurrentLayout, l);
  373. if(!w->win){return;}
  374. laRenameWindow(w, l->ID->Ptr);
  375. laRedrawCurrentWindow();
  376. }
  377. void* laget_WindowActiveLayout(laWindow *w, void* unused){
  378. return w->CurrentLayout;
  379. }
  380. //void laget_PanelSnappingTrueFalse(laPanel* p, int* result) {
  381. // result[0] = p->SL > 0 ? 1 : 0;
  382. // result[1] = p->SR > 0 ? 1 : 0;
  383. // result[2] = p->ST > 0 ? 1 : 0;
  384. // result[3] = p->SB > 0 ? 1 : 0;
  385. //}
  386. //void laset_PanelSnappingTrueFalse(laPanel* p,int Index, int n) {
  387. // int* v = &p->SL;
  388. // int val = abs(v[Index]);
  389. // v[Index] = val*(n ? 1 : -1);
  390. //}
  391. void laset_PanelMultisample(void* unused, int value){
  392. MAIN.PanelMultisample = value;
  393. tnsReconfigureTextureParameters(value);
  394. laRedrawAllWindows();
  395. }
  396. void *laget_UiInternalType(void *UNUSED){
  397. return MAIN.UiTypes.pFirst;
  398. }
  399. void laget_TimeString(laTimeInfo *ti, char *result,char** result_direct){
  400. sprintf(result, "%d-%.02d-%.02d %.02d:%.02d:%.02d", ti->Year, ti->Month, ti->Day, ti->Hour, ti->Minute, ti->Second);
  401. }
  402. int laget_TimeYear(laTimeInfo *ti){
  403. return (int)ti->Year;
  404. }
  405. int laget_TimeMonth(laTimeInfo *ti){
  406. return (int)ti->Month;
  407. }
  408. int laget_TimeDay(laTimeInfo *ti){
  409. return (int)ti->Day;
  410. }
  411. int laget_TimeHour(laTimeInfo *ti){
  412. return (int)ti->Hour;
  413. }
  414. int laget_TimeMinute(laTimeInfo *ti){
  415. return (int)ti->Minute;
  416. }
  417. int laget_TimeSecond(laTimeInfo *ti){
  418. return (int)ti->Second;
  419. }
  420. void *laget_ConditionerExtra(laUiItem *ui){
  421. if (ui->Type == &_LA_UI_CONDITION ||
  422. ui->Type == &_LA_UI_CONDITION_END ||
  423. ui->Type == &_LA_UI_CONDITION_ELSE ||
  424. ui->Type == _LA_UI_CONDITION_TOGGLE){
  425. return ui->Extra;
  426. }
  427. return 0;
  428. }
  429. void *laget_CanvasExtra(laUiItem *ui){
  430. if (ui->Type == _LA_UI_CANVAS){
  431. return ui->Extra;
  432. }
  433. return 0;
  434. }
  435. void laget_UnknownPropertyString(laUDF *udf, char *result, char** here){
  436. *here="Unknown Property";
  437. }
  438. void laget_MainIdentifier(laUDF *udf, char *result, char** here){
  439. strcpy(result, "MAIN");
  440. }
  441. void laget_UDFFilePath(laUDF *udf, char *result, char** here){
  442. *here=udf->FileName->Ptr;
  443. }
  444. void lapost_PropPack(laPropPack *pp);
  445. void laget_ConditionNodePropPath(laUiConditionNode *ucn, char *result, char** here){
  446. if (!ucn->PP.Go) return;
  447. la_GetPropPackPath(&ucn->PP, result);
  448. }
  449. void laset_ConditionNodePropPath(laUiConditionNode *ucn, char *content, char** here){
  450. if (ucn->PP.Go){
  451. la_FreePropStepCache(ucn->PP.Go);
  452. ucn->PP.LastPs = ucn->PP.Go = 0;
  453. }
  454. la_GetPropFromPath(&ucn->PP, ucn->PP.RawThis, content, 0);
  455. }
  456. void laread_ConditionNodePropPath(laUiConditionNode *ucn, char *Content, char** here){
  457. if (!Content || !Content[0]) return;
  458. ucn->PP.Go = CreateNewBuffer(char, strlen(Content) + 1);
  459. strcpy(ucn->PP.Go, Content);
  460. }
  461. void lapost_ConditionNode(laUiConditionNode *ucn){
  462. lapost_PropPack(&ucn->PP);
  463. }
  464. void la_ConditionNodeFreeRecursive(laUiConditionNode *ucn);
  465. void laset_ConditionNodeType(laUiConditionNode *ucn, int Type){
  466. ucn->Type = Type;
  467. switch (Type){
  468. case LA_CONDITION_PROP:
  469. case LA_CONDITION_INT:
  470. case LA_CONDITION_FLOAT:
  471. case LA_CONDITION_STRING:
  472. case LA_CONDITION_FALSE:
  473. case LA_CONDITION_TRUE:
  474. la_ConditionNodeFreeRecursive(ucn->Expression1);
  475. la_ConditionNodeFreeRecursive(ucn->Expression2);
  476. ucn->Expression1 = 0;
  477. ucn->Expression2 = 0;
  478. if (ucn->PP.LastPs) la_FreePropStepCache(ucn->PP.Go);
  479. ucn->PP.LastPs = ucn->PP.Go = ucn->PP.RawThis = 0;
  480. break;
  481. case LA_CONDITION_NOT:
  482. la_ConditionNodeFreeRecursive(ucn->Expression2);
  483. ucn->Expression2 = 0;
  484. if (ucn->PP.LastPs) la_FreePropStepCache(ucn->PP.Go);
  485. ucn->PP.LastPs = ucn->PP.Go = ucn->PP.RawThis = 0;
  486. if (!ucn->Expression1) ucn->Expression1 = laIntExpression(0);
  487. break;
  488. default:
  489. if (!ucn->Expression1) ucn->Expression1 = laIntExpression(0);
  490. if (!ucn->Expression2) ucn->Expression2 = laIntExpression(1);
  491. break;
  492. }
  493. laRecalcCurrentPanel();
  494. }
  495. void laread_ConditionNodeType(laUiConditionNode *ucn, int Type){
  496. ucn->Type = Type;
  497. }
  498. void* laget_FirstDriverPage(laRackPageCollection* rpc, void* unused2){
  499. return rpc->Pages.pFirst;
  500. }
  501. void* laget_CurrentRackPage(laRackPageCollection* c){
  502. return c->CurrentPage;
  503. }
  504. void laset_CurrentRackPage(laRackPageCollection* c,laRackPage* rp){
  505. memAssignRef(c,&c->CurrentPage,rp);
  506. }
  507. void* laget_CurrentAnimationAction(void* unused_a){
  508. return MAIN.Animation->CurrentAction;
  509. }
  510. void* laset_CurrentAnimationAction(void* unused_a, laAction* c){
  511. memAssignRef(MAIN.Animation,&MAIN.Animation->CurrentAction,c);
  512. laNotifyUsers("la.animation.current_action");
  513. }
  514. void laset_AutoSwitchColorSpace(void* unused, int enabled){
  515. MAIN.AutoSwitchColorSpace = enabled;
  516. if(enabled){
  517. for(laWindow* w=MAIN.Windows.pFirst;w;w=w->Item.pNext){
  518. laScreen* s = laGetWindowScreen(w);
  519. if(s){ w->OutputColorSpace = s->ColorSpace; laNotifyInstanceUsers(w); }
  520. }
  521. }
  522. laNotifyUsers("la.user_preferences.auto_switch_color_space");
  523. }
  524. void laset_ScreenColorSpace(laScreen* s, int space){
  525. s->ColorSpace=space;
  526. if(MAIN.AutoSwitchColorSpace){
  527. for(laWindow* w=MAIN.Windows.pFirst;w;w=w->Item.pNext){
  528. laScreen* s = laGetWindowScreen(w);
  529. if(s){ w->OutputColorSpace = s->ColorSpace; laNotifyInstanceUsers(w); }
  530. }
  531. }
  532. }
  533. void laset_WindowColorSpace(laWindow* w, int space){ w->OutputColorSpace=space; if(w->win) laRedrawCurrentWindow(); }
  534. void laset_WindowShowStripes(laWindow* w, int stripes){ w->OutputShowStripes=stripes; if(w->win) laRedrawCurrentWindow(); }
  535. void laset_WindowUseComposing(laWindow* w, int comp){ w->UseComposing=comp; if(w->win) laRedrawCurrentWindow(); }
  536. void laset_WindowComposingGamma(laWindow* w, real v){ w->ComposingGamma=v; if(w->win) laRedrawCurrentWindow(); }
  537. void laset_WindowComposingBlackpoint(laWindow* w, real v){ w->ComposingBlackpoint=v; if(w->win) laRedrawCurrentWindow(); }
  538. void *tnsget_TnsMain(void *unused,void *unused2){
  539. return T;
  540. }
  541. void *tnsget_World(void *unused,void *unused2){
  542. return T->World;
  543. }
  544. void *tnsread_World(void *unused, void *inst){
  545. }
  546. void tnsset_InstancerInstance(tnsInstancer *o, tnsObject* value){
  547. o->Instance=value; tnsInvalidateEvaluation(o); laNotifyUsers("tns.world");
  548. }
  549. void tnsset_InstancerHook(tnsInstancer *o, int Hook){ laNotifyUsers("tns.world");
  550. o->Hook=Hook; laNotifyInstanceUsers(o); tnsInvalidateEvaluation(o); tnsInvalidateEvaluation(o->Instance);
  551. }
  552. void tnssetarr_InstancerHookOffset(tnsInstancer *o, real* arr){ laNotifyUsers("tns.world");
  553. tnsVectorSet2v(o->HookOffset,arr); laNotifyInstanceUsers(o); tnsInvalidateEvaluation(o); tnsInvalidateEvaluation(o->Instance);
  554. }
  555. void *tnsget_detached_FirstRootObject(void *UNUSED1, void *UNUSED2){
  556. return T->World->RootObjects.pFirst;
  557. }
  558. void *tnsget_detached_FirstMaterial(void *UNUSED1, void *UNUSED2){
  559. return T->World->Materials.pFirst;
  560. }
  561. void *tnsget_detached_FirstTexture(void *UNUSED1, void *UNUSED2){
  562. return T->Textures.pFirst;
  563. }
  564. void *tnsget_PreviewTexture(void *UNUSED){
  565. return T->PreviewTexture;
  566. }
  567. void *tnsset_PreviewTexture(void *UNUSED_PARENT, void *tex, int UNUSEDSTATE){
  568. T->PreviewTexture = tex;
  569. }
  570. void *tnsget_NextLinkedObject(tnsObject *o, laPropIterator *pi){
  571. pi->Linker = ((laListItemPointer *)pi->Linker->pNext);
  572. return pi->Linker->p;
  573. }
  574. void *tnsget_FirstChildObject(tnsObject *ob){
  575. return ob->ChildObjects.pFirst;
  576. }
  577. void tnsset_RootObjectIs2D(tnsRootObject *root, int Is2D){
  578. root->Is2D=Is2D; laNotifyInstanceUsers(root);
  579. }
  580. void tnsset_ObjectLocation(tnsObject* o, int n, real val){ o->Location[n]=val;tnsSelfTransformValueChanged(o); laNotifyUsers("tns.world"); }
  581. void tnsset_ObjectRotation(tnsObject* o, int n, real val){ o->Rotation[n]=val; tnsSelfTransformValueChanged(o); laNotifyUsers("tns.world"); }
  582. void tnsset_ObjectScale(tnsObject* o, int n, real val){ o->Scale[n]=val; tnsSelfTransformValueChanged(o); laNotifyUsers("tns.world"); }
  583. void tnsset_ObjectDLocationARR(tnsObject* o, real* arr){ tnsVectorCopy3d(arr,o->DLocation); tnsDeltaTransformValueChanged(o); laNotifyUsers("tns.world"); }
  584. void tnsset_ObjectDRotationARR(tnsObject* o, real* arr){ tnsVectorCopy3d(arr,o->DRotation); tnsDeltaTransformValueChanged(o); laNotifyUsers("tns.world"); }
  585. void tnsset_ObjectDScaleARR(tnsObject* o, real* arr){ tnsVectorCopy3d(arr,o->DScale); tnsDeltaTransformValueChanged(o); laNotifyUsers("tns.world"); }
  586. tnsMeshObject* tnsget_ObjectAsMesh(tnsObject* o){ if(!o || o->Type!=TNS_OBJECT_MESH) return 0; return o; }
  587. tnsRootObject* tnsget_ObjectAsRoot(tnsObject* o){ if(!o || o->Type!=TNS_OBJECT_ROOT) return 0; return o; }
  588. void laget_UiTemplateIdentifier(laUiTemplate *uit, char *result, char** here){
  589. *here=uit->Identifier->Ptr;
  590. }
  591. void laset_UiTemplateIdentifier(laUiTemplate *uit, char *content){
  592. strSafeSet(&uit->Identifier, content);
  593. }
  594. void laget_UiDataPath(laUiItem *ui, char *result){
  595. laPropStep *ps = ui->PP.Go;
  596. if (ui->PP.LastPs || ui->PP.Go){
  597. for (ps; ps; ps = ps->pNext){
  598. if (ps->Type == U'@' || ps->Type == U'#' || ps->Type == U'='){
  599. strcat(result, ps->p);
  600. }else{
  601. strcat(result, ps->p->Identifier);
  602. }
  603. if (ps->pNext){
  604. if (ps->pNext->Type == U'.') strcat(result, ".");
  605. elif (ps->pNext->Type == U'#') strcat(result, "#");
  606. elif (ps->pNext->Type == U'@') strcat(result, "@");
  607. elif (ps->pNext->Type == U'=') strcat(result, "= ");
  608. elif (ps->pNext->Type == U'$') strcat(result, "$");
  609. }
  610. }
  611. }elif (ui->AT){
  612. strcpy(result, "");
  613. }
  614. }
  615. void laget_UiOperatorID(laUiItem *ui, char *result, char** here){
  616. if (ui->AT){
  617. *here=ui->AT->Identifier;
  618. }else *result=0;
  619. }
  620. void laread_UiDataPath(laUiItem *ui, char *Content){
  621. if (!Content || !Content[0]) return;
  622. ui->PP.Go = CreateNewBuffer(char, strlen(Content) + 1);
  623. strcpy(ui->PP.Go, Content);
  624. }
  625. void laread_UiOperatorID(laUiItem *ui, char *Content){
  626. ui->AT = laGetOperatorType(Content);
  627. }
  628. void *laget_PanelTemplate(void *UNUSED, void *UNUSED2){
  629. return MAIN.PanelTemplates.pFirst;
  630. }
  631. void laget_PanelTemplateCategory(void* rack_unused, laUiTemplate* uit, char* copy, char** ptr){
  632. if(uit->CategoryName&&uit->CategoryName->Ptr) *ptr=uit->CategoryName->Ptr;
  633. }
  634. void lapost_Window(laWindow *w){
  635. laStartWindow(w);
  636. }
  637. int la_CreateSystemWindow(laWindow *window, int synctovbank);
  638. void la_AssignWindowPP(laWindow* w);
  639. void lapostim_Window(laWindow *w){
  640. w->IsFullScreen=0;
  641. la_CreateSystemWindow(w,MAIN.Windows.pFirst==MAIN.Windows.pLast);
  642. la_AssignWindowPP(w);
  643. MAIN.CurrentWindow = w;
  644. }
  645. void lapost_PropPack(laPropPack *pp){
  646. char *path = pp->Go;
  647. if (pp->LastPs /* || !path*/) return;
  648. if ((!path || (path && !path[0])) && pp->RawThis) pp->LastPs = pp->RawThis->LastPs;
  649. if (pp->RawThis) lapost_PropPack(pp->RawThis);
  650. pp->Go = 0;
  651. la_GetPropFromPath(pp, pp->RawThis, path, 0);
  652. FreeMem(path);
  653. }
  654. void lapost_UiItem(laUiItem *ui){
  655. lapost_PropPack(&ui->PP);
  656. //if(ui->Type == _LA_UI_CANVAS) ui->Type->Init(ui);
  657. }
  658. void la_AssignPropExtras(laUiItem* ui);
  659. void lapostim_UiItem(laUiItem *ui){
  660. if (ui->Type && ui->Type->Init && ui->Type != _LA_UI_CANVAS && ui->Type != &_LA_UI_CONDITION) ui->Type->Init(ui);
  661. ui->State = ui->State ? ui->State : (ui->Type ? LA_UI_NORMAL : 0);
  662. la_AssignPropExtras(ui);
  663. }
  664. void* laget_SavePanel(laWindow* w, laPropIterator* pi){
  665. for(laPanel* p=w->Panels.pFirst;p;p=p->Item.pNext){ if(!p->Mode || p->IsMenuPanel || p->PanelTemplate) return p; }
  666. return 0;
  667. }
  668. void* lagetnext_SavePanel(laPanel* p, laPropIterator* pi){
  669. for(p=p->Item.pNext;p;p=p->Item.pNext){ if(!p->Mode || p->IsMenuPanel || p->PanelTemplate) return p; }
  670. return 0;
  671. }
  672. void lapost_Panel(laPanel *p){
  673. p->PP.EndInstance = p;
  674. p->PP.LastPs = &p->FakePS;
  675. p->PP.LastPs->p = _LA_PROP_PANEL;
  676. p->PP.LastPs->UseInstance = p;
  677. p->PP.LastPs->Type = U'.';
  678. la_EnsurePanelExtras(p);
  679. laRecalcPanel(p);
  680. p->FrameDistinguish = 100;
  681. if(p->IsMenuPanel || p->Block) p->Show=1;
  682. laUiTemplate* uit=p->PanelTemplate;
  683. if(uit&&uit->PropFunc){ uit->PropFunc(p); }
  684. if(uit){
  685. uit->Define(&p->UI, &p->PP, &p->PropLinkPP, 0, 0);
  686. if(p->Mode) laui_DefaultPanelTitleBar(&p->TitleBar, &p->PP, &p->PropLinkPP, uit->Header);
  687. }
  688. if(p->IsMenuPanel){ laui_DefaultMenuBarActual(&p->TitleBar, &p->PP, &p->PropLinkPP, 0, 0); }
  689. //if(p->Title) p->TitleWidth = tnsStringGetWidth(transLate(p->Title->Ptr), 0, 0);
  690. #ifdef LA_LINUX
  691. XSync(MAIN.dpy,0);
  692. #endif
  693. }
  694. void la_AssignBlockPP(laBlock* b);
  695. void lapost_Block(laBlock *b){
  696. la_AssignBlockPP(b);
  697. }
  698. void lapost_UserPreferences(void* unused){
  699. //MAIN.ScaledUiRowHeight=MAIN.UiRowHeight;
  700. //tnsInvalidateFontCache();
  701. }
  702. void laset_ColorPickerGamma(void* unused, real gamma){
  703. MAIN.ColorPickerGamma=gamma; laRedrawCurrentWindow();
  704. }
  705. void laset_ViewportHalftoneFactor(void* unused, real v){
  706. MAIN.ViewportHalftoneFactor=v; laNotifyUsers("tns.world");
  707. }
  708. void laset_ViewportHalftoneSize(void* unused, real v){
  709. MAIN.ViewportHalftoneSize=v; laNotifyUsers("tns.world");
  710. }
  711. void laset_EnableGLDebug(void* unused, int e){ MAIN.EnableGLDebug=e; la_NotifyGLDebugChanges(); }
  712. void laset_GLDebugSync(void* unused, int e){ MAIN.GLDebugSync=e; la_NotifyGLDebugChanges(); }
  713. void laset_GLDebugLevel(void* unused, int e){ MAIN.GLDebugLevel=e; la_NotifyGLDebugChanges(); }
  714. void laset_Language(void* unused, laTranslationNode* lang){
  715. MAIN.Translation.CurrentLanguage = lang;
  716. laRedrawAllWindows();
  717. }
  718. //void laget_DetachedPropContainerID(laProp* p, char * result) {
  719. // strcpy(result, p->Detached->Container->Identifier);
  720. //}
  721. //void laget_DetachedPropPropID(laProp* p, char * result) {
  722. // strcpy(result, p->Detached->Identifier);
  723. //}
  724. //void laset_DetachedPropContainerID(laProp* p, char * content) {
  725. // p->Description = CreateNewBuffer(char, 128);
  726. // strcpy(p->Description, content);
  727. //}
  728. //void laset_DetachedPropPropID(laProp* p, char * content) {
  729. // p->Name = CreateNewBuffer(char, 128);
  730. // strcpy(p->Name, content);
  731. //}
  732. void laread_DetachedPropRename(laProp *p, char *content){
  733. p->Identifier = CreateNewBuffer(char, 128);
  734. strcpy(p->Identifier, content);
  735. }
  736. void laget_DetachedPropPath(laProp *p, char *result, char** here){
  737. la_GetPropPackPath(&p->DetachedPP, result);
  738. }
  739. void laread_DetachedPropPath(laProp *p, char *content){
  740. p->DetachedPP.Go = CreateNewBuffer(char, 128);
  741. strcpy(p->DetachedPP.Go, content);
  742. }
  743. int la_GetPropertySize(int Type);
  744. void lapost_DetachedProp(laProp *Prop){
  745. laPropContainer *pc = 0;
  746. laSubProp *np = 0;
  747. laIntProp *ip;
  748. laFloatProp *fp;
  749. laEnumProp *ep;
  750. laSubProp *sp;
  751. char *path = Prop->DetachedPP.Go;
  752. char *id = Prop->Identifier;
  753. laPropPack TempPP = {0};
  754. laListItem Item;
  755. Prop->DetachedPP.Go = 0;
  756. memcpy(&Item, &Prop->Item, sizeof(laListItem));
  757. la_GetPropFromPath(&TempPP, Prop->DetachedPP.RawThis, path, 0);
  758. //FreeMem(path);
  759. memcpy(Prop, TempPP.LastPs->p, la_GetPropertySize(TempPP.LastPs->p->PropertyType));
  760. memcpy(&Prop->DetachedPP, &TempPP, sizeof(laPropPack));
  761. memcpy(&Prop->Item, &Item, sizeof(laListItem));
  762. switch (Prop->PropertyType){
  763. case LA_PROP_INT:
  764. case LA_PROP_INT | LA_PROP_ARRAY:
  765. ip = Prop;
  766. ip->Detached = CreateNewBuffer(int, Prop->Len ? Prop->Len : 1);
  767. break;
  768. case LA_PROP_FLOAT:
  769. case LA_PROP_FLOAT | LA_PROP_ARRAY:
  770. fp = Prop;
  771. fp->Detached = CreateNewBuffer(real, Prop->Len ? Prop->Len : 1);
  772. break;
  773. case LA_PROP_ENUM:
  774. case LA_PROP_ENUM | LA_PROP_ARRAY:
  775. ep = Prop;
  776. ep->Detached = CreateNewBuffer(int, 1);
  777. ep->Detached[0] = ((laEnumItem *)ep->Items.pFirst)->Index;
  778. }
  779. Prop->Identifier = id;
  780. }
  781. void latouched_NodeInSocket(void* unused, int hint){
  782. laGraphRequestRebuild();
  783. }
  784. int lafilter_NodeCategory(void* unused, laNodeCategory* c){
  785. if(c->For&MAIN.FilterNodeCategory) return 1; return 0;
  786. }
  787. void* laget_FirstInputMapping(void* unused1,void* unused2){
  788. return MAIN.InputMapping->InputMappings.pFirst;
  789. }
  790. void* laget_CurrentInputMapping(laInputMappingBundle* imb){
  791. return imb->CurrentInputMapping;
  792. }
  793. void* laget_FirstCustomSignal(void* unused1,void* unused2){
  794. return MAIN.CustomSignals.pFirst;
  795. }
  796. void laset_InputMappingEntrySignal(laInputMappingEntry* ime, laCustomSignal* cs){
  797. if(cs){ strSafeSet(&ime->Signal,SSTR(cs->Name)); ime->SignalValue=cs->Signal; }
  798. else{ strSafeSet(&ime->Signal,"none"); ime->SignalValue=0; }
  799. }
  800. void laset_InputMappingEntryKeyString(laInputMappingEntry* ime, char* key){
  801. strSafeSet(&ime->Key,key); laInputMappingUpdateSignal(ime);
  802. }
  803. void laset_InputMappingEntrySignalString(laInputMappingEntry* ime, char* sig){
  804. strSafeSet(&ime->Signal,sig); laInputMappingUpdateSignal(ime);
  805. }
  806. void laset_SignalFilter(void* unused, char* sig){
  807. strSafeSet(&MAIN.SignalFilter,sig);
  808. laNotifyUsers("la.filtered_signals");
  809. }
  810. void* laget_FirstFilteredCustomSignal(void* unused1,laPropIterator* pi){
  811. laCustomSignal* p = MAIN.CustomSignals.pFirst;
  812. while(!strstr(SSTR(p->Name),SSTR(MAIN.SignalFilter))){ p=p->Item.pNext; if(!p){ return 0; } }
  813. return p;
  814. }
  815. void* lagetnext_FilteredSignal(laCustomSignal* p, laPropIterator* pi){
  816. p=p->Item.pNext; if(!p){ return 0; }
  817. while(!strstr(SSTR(p->Name),SSTR(MAIN.SignalFilter))){ p=p->Item.pNext; if(!p){ return 0; } }
  818. return p;
  819. }
  820. void tnspost_World(tnsWorld *w){
  821. tnsRefreshMaterialLibraries();
  822. laAnimationUpdateHolderList();
  823. }
  824. void tnspost_Material(tnsMaterial *m){
  825. tns_GetMaterial2D(m);
  826. //if(m->AsLibrary){ tnsRefreshMaterialLibraries(); return; }
  827. //tnsEnsureMaterialShader(m,1);
  828. }
  829. void tnspost_Object(tnsObject *o){ //XXX: No instance clear operation for object?
  830. laListItemPointer* NextLip,*NextLip2;
  831. if(o->Type!=TNS_OBJECT_ROOT){
  832. tnsDeltaTransformValueChanged(o); tnsGlobalMatrixChanged(o,1);
  833. }else{ tnsRootObject* ro=o;
  834. for(laAction* aa=ro->Actions.pFirst;aa;aa=aa->Item.pNext){
  835. if(!aa->HolderContainer){
  836. aa->HolderContainer=la_ContainerLookup("tns_root_object");
  837. aa->HolderInstance=ro;
  838. }
  839. }
  840. }
  841. for(laListItemPointer* lip=o->ChildObjects.pFirst;lip;lip=NextLip){
  842. NextLip=lip->pNext; if(!lip->p){ lstRemoveItem(&o->ChildObjects,lip); memFree(lip); continue; }
  843. for(laListItemPointer* lip2=NextLip;lip2;lip2=NextLip2){ NextLip2=lip2->pNext;
  844. if(lip2->p==lip->p){ NextLip=lip2->pNext; lstRemoveItem(&o->ChildObjects,lip2); memFree(lip2); continue; }
  845. }
  846. }
  847. }
  848. void tnspropagate_Object(tnsObject* o, laUDF* udf, int force){
  849. for(laListItemPointer* lip=o->ChildObjects.pFirst;lip;lip=lip->pNext){ if(!lip->p) continue;
  850. if(force || !laget_InstanceActiveUDF(lip->p)){ laset_InstanceUDF(lip->p, udf); tnspropagate_Object(lip->p,udf,force); }
  851. }
  852. }
  853. void tnstouched_Object(tnsObject *o, int hint){
  854. printf("touched\n");
  855. if(o->Type==TNS_OBJECT_MESH && (hint&TNS_HINT_GEOMETRY)){
  856. tnsInvalidateMeshBatch(o);
  857. }
  858. tnsInvalidateEvaluation(o);
  859. laNotifyUsers("tns.world");
  860. }
  861. int tnsfilter_SavableObject(void* unused, tnsObject* o){
  862. if(o->InRoot) return 1; return 0;
  863. }
  864. int tnsget_MeshObjectVertSize(tnsMeshObject* o){ return o->totv*sizeof(tnsVert);/*can't use maxv*/ }
  865. int tnsget_MeshObjectEdgeSize(tnsMeshObject* o){ return o->tote*sizeof(tnsEdge);/*can't use maxv*/ }
  866. void* tnsget_MeshObjectFaceRaw(tnsMeshObject* o, int* r_size, int* r_is_copy){
  867. if(o->Mode==TNS_MESH_EDIT_MODE) return 0;
  868. int* arr=0; int next=0,max=0; int i=0;
  869. arrEnsureLength(&arr, i, &max, sizeof(int));
  870. arr[i]=o->totf; i++;
  871. for(int f=0;f<o->totf;f++){
  872. arrEnsureLength(&arr, i+o->f[f].looplen+6, &max, sizeof(int));
  873. arr[i]=o->f[f].looplen; i++;
  874. arr[i]=o->f[f].flags; i++;
  875. arr[i]=o->f[f].mat; i++;
  876. float* nm=(void*)&arr[i]; tnsVectorSet3v(nm,o->f[f].n); i+=3;
  877. for(int l=0;l<o->f[f].looplen;l++){
  878. arr[i]=o->f[f].loop[l]; i++;
  879. }
  880. }
  881. *r_size = i*sizeof(int);
  882. *r_is_copy = 1;
  883. return arr;
  884. }
  885. void tnsset_MeshObjectFaceRaw(tnsMeshObject* o, int* data, int s){
  886. if(o->f){
  887. for(int fi=0;fi<o->maxf;fi++){ // ??? due to undo property order, maxf can be != totf, will it have problems?
  888. if(o->f[fi].loop){ free(o->f[fi].loop); o->f[fi].loop=0; }
  889. }
  890. arrFree(&o->f, &o->maxf); o->totf=0; o->maxf=0;
  891. }
  892. if(!data) return;
  893. int totf=data[0]; int i=1;
  894. o->f=calloc(1,sizeof(tnsFace)*totf); o->maxf=o->totf=totf;
  895. for(int fi=0;fi<totf;fi++){
  896. tnsFace*f=&o->f[fi];
  897. f->looplen=data[i]; i++;
  898. f->flags=data[i]; i++;
  899. f->mat=data[i]; i++;
  900. float* nm=(void*)&data[i]; tnsVectorSet3v(f->n,nm); i+=3;
  901. f->loop=calloc(1,sizeof(int)*f->looplen);
  902. for(int li=0;li<f->looplen;li++){
  903. f->loop[li]=data[i]; i++;
  904. }
  905. }
  906. }
  907. void tns_InvalidateMeshWithMaterial(tnsMaterial* m){
  908. for(tnsMeshObject* o=T->World->AllObjects.pFirst;o;o=o->Base.Item.pNext){
  909. if(o->Base.Type!=TNS_OBJECT_MESH) continue;
  910. for(tnsMaterialSlot* ms=o->Materials.pFirst;ms;ms=ms->Item.pNext){
  911. if(ms->Material==m){ tnsInvalidateMeshBatch(o); break; }
  912. }
  913. }
  914. }
  915. void tnsset_MaterialColor(tnsMaterial* m, real* c){
  916. tnsVectorCopy4d(c,m->Color); tns_InvalidateMeshWithMaterial(m); laNotifyUsers("tns.world");
  917. }
  918. void tnsset_MaterialColor2(tnsMaterial* m, real* c){ tnsVectorCopy4d(c,m->Color2); laNotifyUsers("tns.world"); }
  919. void tnsset_MaterialGradientMode(tnsMaterial* m, int Mode){ m->GradientMode=Mode; laNotifyUsers("tns.world"); }
  920. void tnsset_MaterialGradientCenter(tnsMaterial* m, real* c){ tnsVectorCopy2d(c,m->GradientCenter); laNotifyUsers("tns.world"); }
  921. void tnsset_MaterialGradientSize(tnsMaterial* m, real* c){ tnsVectorCopy2d(c,m->GradientSize); laNotifyUsers("tns.world"); }
  922. void tnsset_MaterialGradientF(tnsMaterial* m, real c){ m->GradientBoxF=c; laNotifyUsers("tns.world"); }
  923. void tnsset_MaterialGradientR(tnsMaterial* m, real c){ m->GradientBoxR=c; laNotifyUsers("tns.world"); }
  924. void tnsget_MaterialSlotname(tnsMaterialSlot* ms, char *result, char** here){
  925. if(!ms){ strcpy(result,"?"); return; }
  926. if(ms->Material&&ms->Material->Name&&ms->Material->Name->Ptr){
  927. sprintf(result,"%d: %s",ms->Index,ms->Material->Name->Ptr); return;
  928. }
  929. sprintf(result,"%d: %s",ms->Index,transLate("<Default Material>"));
  930. }
  931. tnsMaterialSlot* tnsget_FirstMaterialSlot(tnsObject* o, void* unused){
  932. if(o->Type==TNS_OBJECT_MESH) return ((tnsMeshObject*)o)->Materials.pFirst;
  933. if(o->Type==TNS_OBJECT_SHAPE) return ((tnsShapeObject*)o)->Materials.pFirst;
  934. return 0;
  935. }
  936. tnsMaterialSlot* tnsget_ActiveMaterialSlot(tnsObject* o){
  937. if(o->Type==TNS_OBJECT_MESH) return ((tnsMeshObject*)o)->CurrentMaterial;
  938. if(o->Type==TNS_OBJECT_SHAPE) return ((tnsShapeObject*)o)->CurrentMaterial;
  939. return 0;
  940. }
  941. void tnsset_ActiveMaterialSlot(tnsObject* o, tnsMaterialSlot* ms){
  942. if(o->Type==TNS_OBJECT_MESH) return memAssignRef(o,&((tnsMeshObject*)o)->CurrentMaterial,ms);
  943. if(o->Type==TNS_OBJECT_SHAPE) return memAssignRef(o,&((tnsShapeObject*)o)->CurrentMaterial,ms);
  944. }
  945. void tnsset_ShapeObjectBackdrop(tnsShapeObject* o, int v){
  946. o->Backdrop=v; tnsInvalidateEvaluation(o); laNotifyUsers("tns.world");
  947. }
  948. tnsMaterial* tnsget_FirstMaterial(void* unused1, void* unused2){
  949. return T->World->Materials.pFirst;
  950. }
  951. tnsMaterial* tnsgetactive_SlotMaterial(tnsMaterialSlot* ms, void* unused){
  952. return ms->Material;
  953. }
  954. tnsCamera* tnsget_CameraInRoot(tnsRootObject* ro, void* unused){
  955. for(tnsObject* o=T->World->AllObjects.pFirst;o;o=o->Item.pNext){ if(o->InRoot!=ro) continue;
  956. if(o->Type==TNS_OBJECT_CAMERA) return o;
  957. }
  958. return 0;
  959. }
  960. tnsCamera* tnsgetnext_CameraInRoot(tnsCamera* c, void* unused){
  961. for(tnsObject* o=c->Base.Item.pNext;o;o=o->Item.pNext){ if(o->InRoot!=c->Base.InRoot) continue;
  962. if(o->Type==TNS_OBJECT_CAMERA) return o;
  963. }
  964. return 0;
  965. }
  966. laPropContainer* tnsget_ObjectType(tnsObject* o){
  967. switch(o->Type){
  968. case TNS_OBJECT_INSTANCER: return TNS_PC_OBJECT_INSTANCER;
  969. case TNS_OBJECT_CAMERA: return TNS_PC_OBJECT_CAMERA;
  970. case TNS_OBJECT_MESH: return TNS_PC_OBJECT_MESH;
  971. case TNS_OBJECT_LIGHT: return TNS_PC_OBJECT_LIGHT;
  972. case TNS_OBJECT_ROOT: return TNS_PC_OBJECT_ROOT;
  973. case TNS_OBJECT_SHAPE: return TNS_PC_OBJECT_SHAPE;
  974. default: return TNS_PC_OBJECT_GENERIC;
  975. }
  976. }
  977. tnsObject* tnsget_ObjectRetarget(tnsObject* o, void* unused){
  978. if(o && o->PlayDuplicate) return o->PlayDuplicate;
  979. return o;
  980. }
  981. void laget_AnimationActionHolderCategory(void* a_unused, laActionHolder* ah, char* copy, char** ptr){
  982. if(ah->CategoryTitle&&ah->CategoryTitle->Ptr) *ptr=ah->CategoryTitle->Ptr;
  983. }
  984. int laget_AnimationActionCurrentFrame(laAction* aa){
  985. return LA_ACTION_FRAME(aa,-1);
  986. }
  987. void laget_AnimationPropStr(laActionProp* ap, char* str, char** here){
  988. sprintf(str,"%s.%s",ap->Prop->Container->Identifier,ap->Prop->Identifier);
  989. }
  990. void laread_AnimationPropStr(laActionProp* ap, char* str){
  991. if(!str || !str[0]) return;
  992. laStringSplitor* ss=strSplitPath(str,0); if(ss->NumberParts!=2) goto anim_set_prop_str_cleanup;
  993. laStringPart* sp1=ss->parts.pFirst,*sp2=ss->parts.pLast;
  994. laPropContainer* pc=la_ContainerLookup(sp1->Content); if(!pc) goto anim_set_prop_str_cleanup;
  995. laProp* p=la_PropLookup(&pc->Props,sp2->Content); if(!p) goto anim_set_prop_str_cleanup;
  996. ap->Prop=p;
  997. anim_set_prop_str_cleanup:
  998. strDestroyStringSplitor(&ss);
  999. }
  1000. void* lagetraw_ActionKeyData(laActionKey* ak, int* r_size, int* ret_is_copy){
  1001. *r_size=ak->DataSize; *ret_is_copy=1; if(!ak->DataSize){ return 0; }
  1002. void* data=malloc(ak->DataSize); memcpy(data,ak->Data,ak->DataSize);
  1003. return data;
  1004. }
  1005. void lasetraw_ActionKeyData(laActionKey* ak, void* data, int DataSize){
  1006. ak->DataSize=DataSize; ak->Data=memAcquireSimple(DataSize); memcpy(ak->Data,data,DataSize);
  1007. }
  1008. void laset_AnimationPlayHead(void* unused,real data){
  1009. if(data<0){ data=0; }
  1010. laAnimationSetPlayHead(data); la_AnimationEvaluateActions(1); laNotifyUsers("la.animation");
  1011. }
  1012. void laget_ActionContainer(laAction* aa, char* str, char** here){ *here=aa->HolderContainer->Identifier; }
  1013. void laread_ActionContainer(laAction* aa, char* str){ aa->HolderContainer=la_ContainerLookup(str); }
  1014. int laaction_VerifyRootObject(void* Parent, laPropContainer* ParentType, void* Child, laPropContainer* ChildType){
  1015. if(ParentType!=TNS_PC_OBJECT_ROOT) return 0;
  1016. if (ChildType==TNS_PC_OBJECT_GENERIC||ChildType==TNS_PC_OBJECT_CAMERA||ChildType==TNS_OBJECT_SHAPE||
  1017. ChildType==TNS_PC_OBJECT_INSTANCER||ChildType==TNS_PC_OBJECT_LIGHT||ChildType==TNS_OBJECT_MESH){
  1018. tnsObject*o=Child; if(o==Parent || o->InRoot==Parent) return 1;
  1019. }
  1020. if (ChildType==TNS_PC_MATERIAL){ return 1; }
  1021. return 0;
  1022. }
  1023. void lareset_Main(void* Unused){
  1024. return;
  1025. }
  1026. laPropContainer* LA_PC_SOCKET_IN;
  1027. laPropContainer* LA_PC_SOCKET_OUT;
  1028. laPropContainer* LA_PROP_SOCKET_SOURCE;
  1029. laPropContainer* LA_PROP_SOCKET_OUT;
  1030. laPropContainer* LA_PC_MAPPER;
  1031. laPropContainer* LA_PC_RACK_PAGE;
  1032. laPropContainer* TNS_PC_OBJECT_GENERIC;
  1033. laPropContainer* TNS_PC_OBJECT_INSTANCER;
  1034. laPropContainer* TNS_PC_OBJECT_CAMERA;
  1035. laPropContainer* TNS_PC_OBJECT_LIGHT;
  1036. laPropContainer* TNS_PC_OBJECT_MESH;
  1037. laPropContainer* TNS_PC_OBJECT_SHAPE;
  1038. laPropContainer* TNS_PC_OBJECT_ROOT;
  1039. laPropContainer* TNS_PC_MATERIAL;
  1040. laPropContainer* TNS_PC_MATERIAL_SLOT;
  1041. laProp* LA_PROP_CONTROLLER;
  1042. void la_RegisterGeneralProps(){
  1043. laPropContainer *p, *ip, *p2, *ip2, *sp1, *sp2;
  1044. laProp *ep;
  1045. laPropPack pp;
  1046. laSubProp *sp;
  1047. laKeyMapper *km;
  1048. p = la_SetGeneralRoot(&MAIN.GeneralIntSub, "__general_int__", "Genral Int Operations", "Genral Int Operations");
  1049. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_prop_restore_default", U'⭯', 0);
  1050. laAddOperatorProperty(p, "set_max", "Set Max", "Set property to its maximum value", "LA_prop_set_max", 0,0);
  1051. laAddOperatorProperty(p, "set_min", "Set Min", "Set property to its minimum value", "LA_prop_set_min", 0,0);
  1052. //laAddOperatorProperty(p, "hyper_data", "View Hyper Data", "Show Properties Of Specific Data Block", "LA_view_hyper_data", U'🛈', 0);
  1053. laAddOperatorProperty(p, "insert_key", "Insert Key Frame", "Insert key frame in the active action", "LA_prop_insert_key", 0,0);
  1054. p = la_SetGeneralRoot(&MAIN.GeneralIntArraySub, "__general_int_arr__", "Genral Int Array Operations", "Genral Int Array Operations");
  1055. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_prop_restore_default", U'⭯', 0);
  1056. laAddOperatorProperty(p, "set_max", "Set Max", "Set property to its maximum value", "LA_prop_set_max", 0,0);
  1057. laAddOperatorProperty(p, "set_min", "Set Min", "Set property to its minimum value", "LA_prop_set_min", 0,0);
  1058. //laAddOperatorProperty(p, "hyper_data", "View Hyper Data", "Show Properties Of Specific Data Block", "LA_view_hyper_data", U'🛈', 0);
  1059. laAddOperatorProperty(p, "insert_key", "Insert Key Frame", "Insert key frame in the active action", "LA_prop_insert_key", 0,0);
  1060. p = la_SetGeneralRoot(&MAIN.GeneralFloatSub, "__general_real__", "Genral Float Operations", "Genral Float Operations");
  1061. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_prop_restore_default", U'⭯', 0);
  1062. laAddOperatorProperty(p, "set_max", "Set Max", "Set property to its maximum value", "LA_prop_set_max", 0,0);
  1063. laAddOperatorProperty(p, "set_min", "Set Min", "Set property to its minimum value", "LA_prop_set_min", 0,0);
  1064. //laAddOperatorProperty(p, "hyper_data", "View Hyper Data", "Show Properties Of Specific Data Block", "LA_view_hyper_data", U'🛈', 0);
  1065. laAddOperatorProperty(p, "insert_key", "Insert Key Frame", "Insert key frame in the active action", "LA_prop_insert_key", 0,0);
  1066. p = la_SetGeneralRoot(&MAIN.GeneralFloatArraySub, "__general_real_arr__", "Genral Float Array Operations", "Genral Float Array Operations");
  1067. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_prop_restore_default", U'⭯', 0);
  1068. laAddOperatorProperty(p, "set_max", "Set Max", "Set property to its maximum value", "LA_prop_set_max", 0,0);
  1069. laAddOperatorProperty(p, "set_min", "Set Min", "Set property to its minimum value", "LA_prop_set_min", 0,0);
  1070. //laAddOperatorProperty(p, "hyper_data", "View Hyper Data", "Show Properties Of Specific Data Block", "LA_view_hyper_data", U'🛈', 0);
  1071. laAddOperatorProperty(p, "insert_key", "Insert Key Frame", "Insert key frame in the active action", "LA_prop_insert_key", 0,0);
  1072. p = la_SetGeneralRoot(&MAIN.GeneralEnumSub, "__general_enum__", "Genral Enum Operations", "Genral Enum Operations");
  1073. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_prop_restore_default", U'⭯', 0);
  1074. laAddOperatorProperty(p, "insert_key", "Insert Key Frame", "Insert key frame in the active action", "LA_prop_insert_key", 0,0);
  1075. p = la_SetGeneralRoot(&MAIN.GeneralEnumArraySub, "__general_enum_arr__", "Genral Enum Array Operations", "Genral Enum Array Operations");
  1076. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_prop_restore_default", U'⭯', 0);
  1077. laAddOperatorProperty(p, "insert_key", "Insert Key Frame", "Insert key frame in the active action", "LA_prop_insert_key", 0,0);
  1078. p = la_SetGeneralRoot(&MAIN.GeneralStringSub, "__general_string__", "Genral String Operations", "Genral String Operations");
  1079. laAddOperatorProperty(p, "copy", "Copy", "Copy to clipboard", "LA_string_copy", 0,0);
  1080. laAddOperatorProperty(p, "paste", "Paste", "Paste from clipboard", "LA_system_paste", 0,0);
  1081. laAddOperatorProperty(p, "restore", "Restore Default", "Restore default value", "LA_string_set_default", U'⭯', 0);
  1082. laAddOperatorProperty(p, "get_folder_path", "Get Folder Path", "Get a folder path", "LA_string_get_folder_path", U'📁', 0);
  1083. laAddOperatorProperty(p, "get_file_path", "Get File Path", "Get a file path", "LA_string_get_file_path", U'🖹', 0);
  1084. p->MenuUiDefine=laui_StringPropUiDefine;
  1085. p = la_SetGeneralRoot(&MAIN.GeneralOperatorSub, "__general_operator__", "Genral Operator Operations", "Genral Operator Operations");
  1086. p = la_SetGeneralRoot(&MAIN.GeneralCollectionSub, "__general_collection__", "Genral Collection Operations", "Genral Collection Operations");
  1087. laAddOperatorProperty(p, "put_data_block", "Put", "Append Pending Data Block Here", "LA_sub_put_data_block", U'🔗', 0);
  1088. laAddOperatorProperty(p, "save_instance", "Save Instance", "Save instance as a UDF block", "LA_udf_save_instance", 0,0);
  1089. laAddOperatorProperty(p, "clear_selection", "Clear Selection", "Clear selected instance", "LA_collection_clear_selection", U'🧹',0);
  1090. }
  1091. void lareset_RackPage(laRackPage* rp){
  1092. laNodeRack* r; while(r=rp->Racks.pFirst){
  1093. laBaseNode* bn; while(bn=r->Nodes.pFirst){
  1094. bn->Type->Destroy(bn); lstRemoveItem(&r->Nodes,bn);
  1095. }
  1096. lstRemoveItem(&r->ParentPage->Racks, r); memLeave(r);
  1097. }
  1098. }
  1099. laRackPage* DEBUG_READ_RACK_PAGE=0; // some files have rack parent page missing, this to fix.
  1100. void lapost_RackPage(laRackPage* rp){ DEBUG_READ_RACK_PAGE=rp; }
  1101. void la_RegisterTNSProps(){
  1102. laPropContainer *p, *ip, *p2, *ip2, *sp1, *sp2;
  1103. laProp *ep; laPropPack pp; laSubProp *sp; laKeyMapper *km;
  1104. laCanvasTemplate *v2dt;
  1105. p = laAddPropertyContainer("tns_main", "TNS Main", "Render kernel root structure", 0,0,sizeof(tnsMain), 0,0,1);{
  1106. if(MAIN.InitArgs.HasWorldObjects){
  1107. laAddSubGroup(p, "world", "World", "World Descriptor", "tns_world",0,0,0,offsetof(tnsMain, World), 0,0,0,0,0,0,0,LA_UDF_SINGLE);
  1108. }
  1109. sp = laAddSubGroup(p, "texture_list", "Texture List", "List Of All Textures Under TNS Management", "tns_texture",0,0,0,-1, 0,tnsget_PreviewTexture, 0,0,0,tnsset_PreviewTexture, offsetof(tnsMain, Textures), LA_UDF_IGNORE);
  1110. laSubGroupDetachable(sp, tnsget_detached_FirstTexture, laget_ListNext);
  1111. //laAddSubGroup(p, "Render Buffers", "Storing All Render Buffers In Current Program Instance", "tns_render_buffer",0,0,0,offsetof(tnsMain, ActiveRenderBuffer), 0,0,0,0,0,0,0,0,offsetof(tnsMain, RenderBuffers), 0);
  1112. }
  1113. p = laAddPropertyContainer("tns_texture", "TNS Texture Item", "A texture descriptor with gl handle", 0,0,sizeof(tnsTexture), 0,0,0);{
  1114. laAddIntProperty(p, "gl_handle", "OpenGL Handle", "Opengl handle of this texture", LA_WIDGET_INT_PLAIN, 0,0,0,0,0,0,0,offsetof(tnsTexture, GLTexHandle), 0,0,0,0,0,0,0,0,0,0,LA_AS_IDENTIFIER|LA_READ_ONLY);
  1115. laAddIntProperty(p, "size", "Size", "Width And Height", 0,"Width,Height", "px", 0,0,0,0,0,offsetof(tnsTexture, Width), 0,0,2, 0,0,0,0,0,0,0,LA_READ_ONLY);
  1116. ep = laAddEnumProperty(p, "internal_type", "Internal Type", "Internal bits type", LA_WIDGET_ENUM_CYCLE, 0,0,0,0,offsetof(tnsTexture, GLTexBitsType), 0,0,0,0,0,0,0,0,0,LA_READ_ONLY);{
  1117. laAddEnumItemAs(ep, "rgba", "GL_RGBA", "GL_RGBA", GL_RGBA8,0);
  1118. laAddEnumItemAs(ep, "rgb", "GL_RGB", "GL_RGB", GL_RGB8,0);
  1119. laAddEnumItemAs(ep, "rg", "GL_RG", "GL_RG", GL_RG8,0);
  1120. laAddEnumItemAs(ep, "r", "GL_RED", "GL_RED", GL_R8,0);
  1121. laAddEnumItemAs(ep, "rgba32f", "GL_RGBA32F", "GL_RGBA32F", GL_RGBA32F,0);
  1122. laAddEnumItemAs(ep, "rgb32f", "GL_RGB32F", "GL_RGB32F", GL_RGB32F,0);
  1123. laAddEnumItemAs(ep, "rg32f", "GL_RG32F", "GL_RG32F", GL_RG32F,0);
  1124. laAddEnumItemAs(ep, "r32f", "GL_R32F", "GL_R32F", GL_R32F,0);
  1125. laAddEnumItemAs(ep, "rgba32i", "GL_RGBA32I", "GL_R32I", GL_RGBA32I,0);
  1126. laAddEnumItemAs(ep, "rgb32i", "GL_RGB32I", "GL_R32I", GL_RGB32I,0);
  1127. laAddEnumItemAs(ep, "rg32i", "GL_RG32I", "GL_R32I", GL_RG32I,0);
  1128. laAddEnumItemAs(ep, "r32i", "GL_R32I", "GL_R32I", GL_R32I,0);
  1129. laAddEnumItemAs(ep, "depth", "GL_DEPTH_COMPONENT32F", "GL_DEPTH_COMPONENT32F", GL_DEPTH_COMPONENT32F,0);
  1130. }
  1131. p->Template2D = la_GetCanvasTemplate(0,"la_CanvasDrawTexture");
  1132. }
  1133. if(!MAIN.InitArgs.HasWorldObjects) return;
  1134. p = laAddPropertyContainer("tns_world", "World", "3d world structure", 0,0,sizeof(tnsWorld),tnspost_World,0,1);{
  1135. sp = laAddSubGroup(p, "root_objects", "Root Objects", "List of all root objects", "tns_object",tnsget_ObjectType,0,0,-1,0,0,0,0,0,0,offsetof(tnsWorld, RootObjects), 0);
  1136. laSubGroupDetachable(sp, tnsget_detached_FirstRootObject, laget_ListNext);
  1137. sp = laAddSubGroup(p, "root_objects_as_root", "Root Objects", "List of all root objects (in type tns_root_object)", "tns_root_object",0,0,0,-1,0,0,0,0,0,0,offsetof(tnsWorld, RootObjects), LA_UDF_IGNORE);
  1138. laSubGroupDetachable(sp, tnsget_detached_FirstRootObject, laget_ListNext);
  1139. laAddSubGroup(p, "active_root", "Active Root Object", "Global active root object", "tns_object",0,0,0,offsetof(tnsWorld,ActiveRoot),tnsget_detached_FirstRootObject,0,laget_ListNext,0,0,0,0,LA_UDF_REFER);
  1140. sp = laAddSubGroup(p, "objects", "Objects", "List of all objects", "tns_object",tnsget_ObjectType, 0,0,-1,0,0,0,0,0,0,offsetof(tnsWorld, AllObjects), 0);
  1141. laSubGroupExtraFunctions(sp,tnsfilter_SavableObject,tnsfilter_SavableObject,0,0,0);
  1142. sp = laAddSubGroup(p, "materials", "Materials", "List of all materials", "tns_material",0,0,0,-1,0,0,0,0,0,0,offsetof(tnsWorld, Materials), 0);
  1143. laSubGroupDetachable(sp, tnsget_detached_FirstMaterial, laget_ListNext);
  1144. ep = laAddEnumProperty(p, "property_page", "Property Page", "Show which page in the properties panel", 0,0,0,1,0,offsetof(tnsWorld, PropertyPage), 0,0,0,0,0,0,0,0,0,LA_UDF_IGNORE);{
  1145. laAddEnumItemAs(ep, "ROOT", "Root", "Display root object properties",0,0);
  1146. laAddEnumItemAs(ep, "OBJECT", "Object", "Display object properties",1,0);
  1147. }
  1148. }
  1149. p = laAddPropertyContainer("tns_child_object", "Child Object", "Child object linker", 0,0,sizeof(laListItemPointer), 0,0,0);{
  1150. laAddSubGroup(p, "object", "Object", "Object link", "tns_object",tnsget_ObjectType, 0,0,offsetof(laListItemPointer, p), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1151. }
  1152. p = laAddPropertyContainer("tns_material", "Material" "Object material", 0,0,0,sizeof(tnsMaterial),tnspost_Material,0,2);{
  1153. TNS_PC_MATERIAL=p;
  1154. laAddStringProperty(p, "name", "Material Name", "The name ff the material", 0,0,0,0,1, offsetof(tnsMaterial, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  1155. laAddFloatProperty(p, "color", "Color", "Base color of the material", LA_WIDGET_FLOAT_COLOR, "R,G,B,A", 0,1,0,0.025, 1, 0,offsetof(tnsMaterial, Color), 0,0,4, 0,0,0,0,tnsset_MaterialColor,0,0,LA_PROP_KEYABLE);
  1156. laAddFloatProperty(p, "color2", "Color 2", "Gradient end color of the material", LA_WIDGET_FLOAT_COLOR, "R,G,B,A", 0,1,0,0.025, 1, 0,offsetof(tnsMaterial, Color2), 0,0,4, 0,0,0,0,tnsset_MaterialColor2,0,0,LA_PROP_KEYABLE);
  1157. ep = laAddEnumProperty(p, "colorful", "Colorful", "Use colorful display", 0,0,0,0,0,offsetof(tnsMaterial, Colorful), 0,0,0,0,0,0,0,0,0,0);{
  1158. laAddEnumItemAs(ep, "NONE", "None", "Display materials normally",0,0);
  1159. laAddEnumItemAs(ep, "COLORFUL", "Colorful", "Display material with colorful halftone",1,0);
  1160. }
  1161. ep = laAddEnumProperty(p, "as_library", "As Library", "As commom library", 0,0,0,0,0,offsetof(tnsMaterial, AsLibrary), 0,0,0,0,0,0,0,0,0,0);{
  1162. laAddEnumItemAs(ep, "NONE", "None", "Use as normal material",0,0);
  1163. laAddEnumItemAs(ep, "LIBRARY", "LIBRARY", "As commom library",1,0);
  1164. }
  1165. ep=laAddEnumProperty(p,"gradient_mode","Gradient Mode","2d gradient mode of shapes",0,0,0,0,0,offsetof(tnsMaterial,GradientMode),0,tnsset_MaterialGradientMode,0,0,0,0,0,0,0,0);
  1166. laAddEnumItemAs(ep,"NONE","None","Don't do any gradient",0,0);
  1167. laAddEnumItemAs(ep,"LINEAR","Linear","Do linear gradient",TNS_GRADIENT_MODE_LINEAR,0);
  1168. laAddEnumItemAs(ep,"BOX","Box","Do box gradient",TNS_GRADIENT_MODE_BOX,0);
  1169. laAddEnumItemAs(ep,"RADIAL","Radial","Do radial gradient",TNS_GRADIENT_MODE_RADIAL,0);
  1170. laAddFloatProperty(p,"gradient_center","Gradient Center","Starting point of the gradient",0,0,0,0,0,0,0,0,offsetof(tnsMaterial,GradientCenter),0,0,2,0,0,0,0,tnsset_MaterialGradientCenter,0,0,LA_PROP_KEYABLE);
  1171. laAddFloatProperty(p,"gradient_size","Gradient Size","Size of the gradient",0,0,0,0,0,0,0,0,offsetof(tnsMaterial,GradientSize),0,0,2,0,0,0,0,tnsset_MaterialGradientSize,0,0,LA_PROP_KEYABLE);
  1172. laAddFloatProperty(p,"gradient_box_r","Corner","Corner radius of the box gradient",0,0,0,0,0,0,0,0,offsetof(tnsMaterial,GradientBoxR),0,tnsset_MaterialGradientR,0,0,0,0,0,0,0,0,LA_PROP_KEYABLE);
  1173. laAddFloatProperty(p,"gradient_box_f","Feather","Feather distance of the box gradient",0,0,0,0,0,0,0,0,offsetof(tnsMaterial,GradientBoxF),0,tnsset_MaterialGradientF,0,0,0,0,0,0,0,0,LA_PROP_KEYABLE);
  1174. laAddSubGroup(p, "shader_page", "Shader Page", "Shader page of this material","la_rack_page",0,0,0,offsetof(tnsMaterial,Page),0,0,0,0,0,0,0,LA_UDF_SINGLE|LA_HIDE_IN_SAVE);
  1175. laAddOperatorProperty(p,"refresh","Refresh","Refresh material shader","M_refresh_material_shader",L'🗘',0);
  1176. laAddOperatorProperty(p,"remove","Remove","Remove this material","M_remove_material",L'🗴',0);
  1177. }
  1178. p = laAddPropertyContainer("tns_material_slot", "Material Slot" "Material slot", 0,0,0,sizeof(tnsMaterialSlot),0,0,1);{
  1179. TNS_PC_MATERIAL_SLOT=p;
  1180. laAddStringProperty(p,"name","Name","Name of the material slot",LA_WIDGET_STRING_PLAIN,0,0,0,0,0,0,tnsget_MaterialSlotname,0,0,LA_READ_ONLY|LA_UDF_IGNORE);
  1181. laAddSubGroup(p, "material", "Material", "Material reference of this slot","tns_material",0,0,0,offsetof(tnsMaterialSlot,Material),tnsget_FirstMaterial,tnsgetactive_SlotMaterial,laget_ListNext,0,0,0,0,LA_UDF_REFER);
  1182. laAddSubGroup(p, "parent", "Parent", "Parent object","tns_object",0,0,0,offsetof(tnsMaterialSlot,Parent),0,0,0,0,0,0,0,LA_UDF_REFER|LA_READ_ONLY);
  1183. laAddIntProperty(p,"index","Index","Index of the material slot",LA_WIDGET_INT_PLAIN,0,0,0,0,0,0,0,offsetof(tnsMaterialSlot,Index),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1184. laAddOperatorProperty(p,"remove","Remove","Remove this material slot","M_remove_material_slot",L'🗴',0);
  1185. }
  1186. p = laAddPropertyContainer("tns_object", "Object", "3d object item", 0,tnsui_BaseObjectProperties,sizeof(tnsObject), tnspost_Object, 0,2);{
  1187. TNS_PC_OBJECT_GENERIC=p;
  1188. laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,-1,laget_Self,0,0,0,0,0,0,LA_UDF_REFER|LA_UDF_IGNORE);
  1189. laAddSubGroup(p, "__action_retarget__", "Action Retarget", "Get action retargeted instance (play duplicate)", "tns_object",0,0,0,-1,tnsget_ObjectRetarget,0,0,0,0,0,0,LA_UDF_IGNORE);
  1190. laAddStringProperty(p, "name", "Object Name", "The name of the object", 0,0,0,0,1, offsetof(tnsObject, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  1191. laAddIntProperty(p,"flags","Flags","Flags",0,0,0,0,0,0,0,0,offsetof(tnsObject,Flags),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1192. ep = laAddEnumProperty(p, "show", "Show", "Show object in the viewport", 0,0,0,0,0,offsetof(tnsObject, Show), 0,0,0,0,0,0,0,0,0,0);{
  1193. laAddEnumItem(ep, "false", "False", "False", U'🌔');
  1194. laAddEnumItem(ep, "true", "IsTrue", "IsTrue", U'🌑');
  1195. }
  1196. ep = laAddEnumProperty(p, "show_on_render", "Show On Render", "Show on render", 0,0,0,0,0,offsetof(tnsObject, ShowOnRender), 0,0,0,0,0,0,0,0,0,0);{
  1197. laAddEnumItem(ep, "false", "False", "False", U'🚫');
  1198. laAddEnumItem(ep, "true", "IsTrue", "IsTrue", U'📷');
  1199. }
  1200. ep = laAddEnumProperty(p, "type", "Type", "Object type like mesh,camera and lamp", 0,0,0,0,0,offsetof(tnsObject, Type), 0,0,0,0,0,0,0,0,0,LA_READ_ONLY);{
  1201. laAddEnumItemAs(ep, "ROOT", "Root", "Root object", TNS_OBJECT_ROOT, 0);
  1202. laAddEnumItemAs(ep, "INSTANCER", "Instancer", "Instancer object", TNS_OBJECT_INSTANCER, 0);
  1203. laAddEnumItemAs(ep, "CAMERA", "Camera", "Camera object, to render a scene", TNS_OBJECT_CAMERA, U'📷');
  1204. laAddEnumItemAs(ep, "LIGHT", "Lamp", "Lamp object, to illuminate the scene", TNS_OBJECT_LIGHT, 0);
  1205. laAddEnumItemAs(ep, "MESH", "Mesh", "Mesh object, made of verts/edges/faces", TNS_OBJECT_MESH, 0);
  1206. laAddEnumItemAs(ep, "SHAPE", "Shape", "Shape object, 2d boundary", TNS_OBJECT_SHAPE, 0);
  1207. }
  1208. laAddFloatProperty(p, "location", "Location", "XYZ Location In Local Coordinates", 0,"X,Y,Z", 0,0,0,0.1, 0,0,offsetof(tnsObject, Location), 0,0,3, 0,tnsset_ObjectLocation, 0,0,0,0,0,0);
  1209. laAddFloatProperty(p, "rotation", "Rotation", "Rotation In Local Coordinates", 0,"X,Y,Z", 0,0,0,0,0,0,offsetof(tnsObject, Rotation), 0,0,3, 0,tnsset_ObjectRotation, 0,0,0,0,0,0);
  1210. laAddFloatProperty(p, "scale", "Scale", "Local Scale", 0,"X,Y,Z",0,0,0,0,1,0,offsetof(tnsObject, Scale), 0,0,3,0,tnsset_ObjectScale,0,0,0,0,0,0);
  1211. laAddFloatProperty(p, "glocation", "Global Location", "Location in global coordinates", 0,"X,Y,Z", 0,0,0,0.1, 0,0,offsetof(tnsObject, GLocation), 0,0,3, 0,0,0,0,0,0,0,LA_READ_ONLY);
  1212. laAddFloatProperty(p, "grotation", "Global Rotation", "Rotation in global coordinates", 0,"X,Y,Z", 0,0,0,0,0,0,offsetof(tnsObject, GRotation), 0,0,3, 0,0,0,0,0,0,0,LA_READ_ONLY);
  1213. laAddFloatProperty(p, "gscale", "Global Scale", "Global scale", 0,"X,Y,Z",0,0,0,0,1,0,offsetof(tnsObject, GScale), 0,0,3,0,0,0,0,0,0,0,LA_READ_ONLY);
  1214. laAddFloatProperty(p, "dlocation", "Delta Location", "XYZ delta transforms", 0,"X,Y,Z", 0,0,0,0.1, 0,0,offsetof(tnsObject, DLocation), 0,0,3,0,0,0,0,tnsset_ObjectDLocationARR,0,0,LA_PROP_KEYABLE);
  1215. laAddFloatProperty(p, "drotation", "Delta Rotation", "Delta rotation", 0,"X,Y,Z", 0,0,0,0,0,0,offsetof(tnsObject, DRotation), 0,0,3,0,0,0,0,tnsset_ObjectDRotationARR,0,0,LA_PROP_KEYABLE|LA_PROP_ROTATION);
  1216. laAddFloatProperty(p, "dscale", "Delta Scale", "Delta scale", 0,"X,Y,Z",0,0,0,0,1,0,offsetof(tnsObject, DScale), 0,0,3,0,0,0,0,tnsset_ObjectDScaleARR,0,0,LA_PROP_KEYABLE);
  1217. laAddFloatProperty(p, "global_mat", "Global Matrix", "Global transformation matrix", 0,0,0,0,0,0,0,0,offsetof(tnsObject, GlobalTransform), 0,0,16, 0,0,0,0,0,0,0,LA_READ_ONLY);
  1218. laAddFloatProperty(p, "local_mat", "Local Matrix", "Local transformation matrix", 0,0,0,0,0,0,0,0,offsetof(tnsObject, SelfTransform), 0,0,16, 0,0,0,0,0,0,0,LA_READ_ONLY);
  1219. ep = laAddEnumProperty(p, "rotation_mode", "Rotation Mode", "Rotation mode of this object(e.g. xyz/xzy/quaternion...)", 0,0,0,0,0,offsetof(tnsObject, RotationMode), 0,0,0,0,0,0,0,0,0,0);{
  1220. laAddEnumItem(ep, "xyz", "XYZ", "XYZ Euler Mode", 0); laAddEnumItem(ep, "xzy", "XZY", "XZY Euler Mode", 0);
  1221. laAddEnumItem(ep, "yxz", "YXZ", "YXZ Euler Mode", 0); laAddEnumItem(ep, "yzx", "YZX", "YZX Euler Mode", 0);
  1222. laAddEnumItem(ep, "zxy", "ZXY", "ZXY Euler Mode", 0); laAddEnumItem(ep, "zyx", "ZYX", "ZYX Euler Mode", 0);
  1223. laAddEnumItem(ep, "quaternion", "Quaternion", "Quaternion Mode", 0);
  1224. }
  1225. laAddSubGroup(p, "active", "Active", "Active reference", "tns_object",tnsget_ObjectType,0,0,offsetof(tnsObject, Active), 0,0,0,0,0,0,0,LA_UDF_REFER|LA_READ_ONLY);
  1226. laAddSubGroup(p, "in_root", "In Root", "Root object of this object", "tns_object",0,0,0,offsetof(tnsObject, InRoot), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1227. laAddSubGroup(p, "parent", "Parent", "Object parent", "tns_object",0,0,0,offsetof(tnsObject, ParentObject), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1228. laAddSubGroup(p, "children", "Children", "The Children Of This Object", "tns_child_object",0,0,0,-1, 0,0,0,0,0,0,offsetof(tnsObject, ChildObjects), 0);
  1229. laAddSubGroup(p, "drivers", "Drivers", "Driver page collection","la_driver_collection",0,0,0,offsetof(tnsObject,Drivers),0,0,0,0,0,0,0,LA_UDF_SINGLE|LA_HIDE_IN_SAVE);
  1230. laAddOperatorProperty(p, "add_driver_page", "Add Page", "Add a driver page","LA_add_driver_page",'+',0);
  1231. laAddSubGroup(p, "as_mesh", "As Mesh", "As mesh object", "tns_mesh_object",0,0,0,-1,0,tnsget_ObjectAsMesh,0,0,0,0,0,LA_UDF_REFER|LA_READ_ONLY|LA_UDF_IGNORE);
  1232. laAddSubGroup(p, "as_root_object", "As Root Object", "As root object", "tns_root_object",0,0,0,-1,0,tnsget_ObjectAsRoot,0,0,0,0,0,LA_UDF_REFER|LA_READ_ONLY|LA_UDF_IGNORE);
  1233. }
  1234. p = laAddPropertyContainer("tns_root_object", "Root Object", "Root object", 0, tnsui_RootObjectProperties,sizeof(tnsRootObject), 0,0,2);{
  1235. laPropContainerExtraFunctions(p,0,0,tnstouched_Object,tnspropagate_Object,tnsui_RootObjectMenuUi);
  1236. laContainerAnimationFunctions(p,laaction_VerifyRootObject);
  1237. TNS_PC_OBJECT_ROOT=p;
  1238. laAddStringProperty(p, "name", "Object Name", "The name of the object", 0,0,0,0,1, offsetof(tnsObject, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  1239. laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,0,0,0,0,0,0,0,0,LA_UDF_LOCAL);
  1240. laAddSubGroup(p, "__actions__", "Actions", "Animation actions", "la_animation_action",0,0,0,-1,0,laget_CurrentAnimationAction,0,laset_CurrentAnimationAction,0,0,offsetof(tnsRootObject, Actions), 0);
  1241. laAddSubGroup(p, "__action_props__", "Action Props", "Action properties", "la_animation_prop",0,0,0,-1,0,0,0,0,0,0,offsetof(tnsRootObject, ActionProps), 0);
  1242. laAddSubGroup(p, "active_camera", "Active Camera", "Active camera of this root object", "tns_object",0,0,0,offsetof(tnsRootObject, ActiveCamera),tnsget_CameraInRoot,0,tnsgetnext_CameraInRoot,0,0,0,0,LA_UDF_REFER);
  1243. ep = laAddEnumProperty(p, "is_2d", "Is 2D", "Is 2d root object", 0,0,0,0,0,offsetof(tnsRootObject, Is2D), 0,tnsset_RootObjectIs2D,0,0,0,0,0,0,0,0);{
  1244. laAddEnumItemAs(ep, "3D", "3D", "Root object is in 3D", 0, 0);
  1245. laAddEnumItemAs(ep, "2D", "2D", "Root object is in 2D", 1, 0);
  1246. }
  1247. laAddOperatorProperty(p, "remove_root", "Remove root", "Remove the root node","M_remove_root",L'🗴',0);
  1248. //laAddSubGroup(p, "as_root_object", "As Root Object", "As root object", "tns_root_object",0,0,0,-1,0,tnsget_ObjectAsRoot,0,0,0,0,0,LA_UDF_REFER|LA_READ_ONLY|LA_UDF_IGNORE);
  1249. }
  1250. p = laAddPropertyContainer("tns_instancer", "Instancer", "Instance placeholder object", U'📎', tnsui_InstancerObjectProperties,sizeof(tnsInstancer), 0,0,2);{
  1251. laPropContainerExtraFunctions(p,0,0,tnstouched_Object,0/*tnspropagate_Object*/,0);
  1252. TNS_PC_OBJECT_INSTANCER=p;
  1253. laAddStringProperty(p, "name", "Object Name", "The name of the object", 0,0,0,0,1, offsetof(tnsObject, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  1254. laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,0,0,0,0,0,0,0,0,LA_UDF_LOCAL);
  1255. laAddSubGroup(p, "instance", "Instance", "Root object to be referenced", "tns_object",0,0,0,offsetof(tnsInstancer, Instance),tnsget_detached_FirstRootObject,0,laget_ListNext,tnsset_InstancerInstance,0,0,0,LA_UDF_REFER);
  1256. ep = laAddEnumProperty(p, "hook", "Hook", "Hook position of the 2d instance", 0,0,0,0,0,offsetof(tnsInstancer, Hook), 0,tnsset_InstancerHook,0,0,0,0,0,0,0,0);{
  1257. laAddEnumItemAs(ep, "NONE", "None", "Doesn't hook to anything, use instancer x,y coordinates", 0, 0);
  1258. laAddEnumItemAs(ep, "TL", "Top Left", "Hook to top left", TNS_INSTANCER_HOOK_TL, L'🡤');
  1259. laAddEnumItemAs(ep, "TC", "Top Center", "Hook to top center", TNS_INSTANCER_HOOK_TC, L'🡡');
  1260. laAddEnumItemAs(ep, "TR", "Top Right", "Hook to top right", TNS_INSTANCER_HOOK_TR, L'🡥');
  1261. laAddEnumItemAs(ep, "CL", "Center Left", "Hook to center left", TNS_INSTANCER_HOOK_CL, L'🡠');
  1262. laAddEnumItemAs(ep, "CC", "Center", "Hook to center", TNS_INSTANCER_HOOK_CC, L'🞆');
  1263. laAddEnumItemAs(ep, "CR", "Center Right", "Hook to center right", TNS_INSTANCER_HOOK_CR, L'🡢');
  1264. laAddEnumItemAs(ep, "BL", "Bottom Left", "Hook to bottom left", TNS_INSTANCER_HOOK_BL, L'🡧');
  1265. laAddEnumItemAs(ep, "BC", "Bottom Center", "Hook to bottom center", TNS_INSTANCER_HOOK_BC, L'🡣');
  1266. laAddEnumItemAs(ep, "BR", "Bottom Right", "Hook to bottom right", TNS_INSTANCER_HOOK_BR, L'🡦');
  1267. }
  1268. laAddFloatProperty(p, "hook_offset", "Hook Offset", "Offset of the 2d hook point", 0,0,"X,Y",0,0,0,0,0,offsetof(tnsInstancer, HookOffset),0,0,2,0,0,0,0,tnssetarr_InstancerHookOffset,0,0,LA_PROP_KEYABLE);
  1269. }
  1270. p = laAddPropertyContainer("tns_mesh_object", "Mesh Object", "Mesh object", 0,tnsui_MeshObjectProperties,sizeof(tnsMeshObject), tnspost_Object, 0,2);{
  1271. laPropContainerExtraFunctions(p,0,0,tnstouched_Object,0/*tnspropagate_Object*/,0);
  1272. TNS_PC_OBJECT_MESH=p;
  1273. laAddStringProperty(p, "name", "Object Name", "The name of the object", 0,0,0,0,1, offsetof(tnsObject, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  1274. laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,0,0,0,0,0,0,0,0,LA_UDF_LOCAL);
  1275. ep = laAddEnumProperty(p, "mode", "Mode", "Mesh object mode", 0,0,0,0,0,offsetof(tnsMeshObject, Mode), 0,0,0,0,0,0,0,0,0,0);{
  1276. laAddEnumItemAs(ep, "OBJECT", "Object", "Object mode", TNS_MESH_OBJECT_MODE, 0);
  1277. laAddEnumItemAs(ep, "EDIT", "Edit", "Edit mode", TNS_MESH_EDIT_MODE, 0);
  1278. }
  1279. laAddSubGroup(p, "mv", "MMesh Verts", "Vertices of editing mesh", "tns_mvert",0,0,0,-1, 0,0,0,0,0,0,offsetof(tnsMeshObject, mv), 0);
  1280. laAddSubGroup(p, "me", "MMesh Edges", "Edges of editing mesh", "tns_medge",0,0,0,-1, 0,0,0,0,0,0,offsetof(tnsMeshObject, me), 0);
  1281. laAddSubGroup(p, "mf", "MMesh Faces", "Faces of editing mesh", "tns_mface",0,0,0,-1, 0,0,0,0,0,0,offsetof(tnsMeshObject, mf), 0);
  1282. laAddIntProperty(p, "totmv", "MVert Count", "Total mvert", 0,0,0,0,0,0,0,0,offsetof(tnsMeshObject, totmv),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1283. laAddIntProperty(p, "totme", "MEdge Count", "Total medge", 0,0,0,0,0,0,0,0,offsetof(tnsMeshObject, totme),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1284. laAddIntProperty(p, "totmf", "MFace Count", "Total mface", 0,0,0,0,0,0,0,0,offsetof(tnsMeshObject, totmf),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1285. laAddIntProperty(p, "totv", "Vert Count", "Total vert", 0,0,0,0,0,0,0,0,offsetof(tnsMeshObject, totv),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1286. laAddIntProperty(p, "tote", "Edge Count", "Total edge", 0,0,0,0,0,0,0,0,offsetof(tnsMeshObject, tote),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1287. laAddIntProperty(p, "totf", "Face Count", "Total face", 0,0,0,0,0,0,0,0,offsetof(tnsMeshObject, totf),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1288. laAddRawProperty(p, "v", "Verts", "Verts", offsetof(tnsMeshObject, v), tnsget_MeshObjectVertSize, 0,0,LA_READ_ONLY);
  1289. laAddRawProperty(p, "e", "Edges", "Edges", offsetof(tnsMeshObject, e), tnsget_MeshObjectEdgeSize, 0,0,LA_READ_ONLY);
  1290. laAddRawProperty(p, "f", "Faces", "Faces", offsetof(tnsMeshObject, f), 0,tnsget_MeshObjectFaceRaw, tnsset_MeshObjectFaceRaw, LA_READ_ONLY);
  1291. //laAddIntProperty(p, "maxv", "Max Vert", "Max vert count", 0,0,0,0,0,0,0,0,offsetof(tnsMeshObject, maxv),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1292. //laAddIntProperty(p, "maxe", "Max Edge", "Max edge count", 0,0,0,0,0,0,0,0,offsetof(tnsMeshObject, maxe),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1293. //laAddIntProperty(p, "maxf", "Max Face", "Max face count", 0,0,0,0,0,0,0,0,offsetof(tnsMeshObject, maxf),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1294. laAddSubGroup(p, "current_material", "Current Material", "Current material slot in this object", "tns_material_slot",0,0,0,offsetof(tnsMeshObject, CurrentMaterial),tnsget_FirstMaterialSlot,0,laget_ListNext,0,0,0,0,LA_UDF_REFER);
  1295. laAddSubGroup(p, "materials", "Materials", "Material slots in this mesh object", "tns_material_slot",0,0,0,-1,0,tnsget_ActiveMaterialSlot,0,tnsset_ActiveMaterialSlot,0,0,offsetof(tnsMeshObject, Materials),0);
  1296. laAddOperatorProperty(p,"add_material_slot","Add Material Slot","Add a material slot into this object","M_new_material_slot",L'+',0);
  1297. laAddOperatorProperty(p,"add_material","Add Material","Add a new material to this material slot","M_new_material",'+',0);
  1298. laAddOperatorProperty(p,"assign_material_slot","Assign Material Slot","Assign faces to a current slot","M_assign_material_slot",L'🖌',0);
  1299. }
  1300. p = laAddPropertyContainer("tns_camera", "Camera", "Camera object", U'📷', tnsui_CameraObjectProperties,sizeof(tnsCamera), 0,0,2);{
  1301. //laPropContainerExtraFunctions(p,0,0,0,tnspropagate_Object,0);
  1302. TNS_PC_OBJECT_CAMERA=p;
  1303. laAddStringProperty(p, "name", "Object Name", "The name of the object", 0,0,0,0,1, offsetof(tnsObject, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  1304. laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,0,0,0,0,0,0,0,0,LA_UDF_LOCAL);
  1305. ep = laAddEnumProperty(p, "camera_type", "Camera Type", "Type of a camera, like perspective or fisheye", 0,0,0,0,0,offsetof(tnsCamera, CameraType), 0,0,0,0,0,0,0,0,0,0);{
  1306. laAddEnumItem(ep, "PERSP", "Perspective", "Camera in linear perspective", 0);
  1307. laAddEnumItem(ep, "ORTHO", "Orthographic", "Camera in orthographic view", 0);
  1308. }
  1309. laAddFloatProperty(p, "fov", "FOV", "Field of view", 0,0,"^", rad(160), rad(1), rad(0.1), rad(60), 0,offsetof(tnsCamera, FOV), 0,0,0,0,0,0,0,0,0,0,LA_RAD_ANGLE);
  1310. laAddFloatProperty(p, "depth_range", "Depth Range", "Depth Range To Map From 0 To 1", 0,"Near,far", 0,0,0,0.1, 0,0,offsetof(tnsCamera, ZMin), 0,0,2, 0,0,0,0,0,0,0,0);
  1311. laAddFloatProperty(p, "focus_distance", "Focus Distance", "For viewing camera to determin zooming center", 0,0,0,0,0,0.1, 100,0,offsetof(tnsCamera, FocusDistance), 0,0,0,0,0,0,0,0,0,0,0);
  1312. laAddFloatProperty(p, "orth_scale", "Scale", "Orthographical Camera Scale", 0,0,"^^", 1000,0.001, 0.1, 1, 0,offsetof(tnsCamera, OrthScale), 0,0,0,0,0,0,0,0,0,0,0);
  1313. //laAddOperatorProperty(p, "set_active", "Set Active", "Set this camera as the active one", "Tns_set_active_camera", 0,0);
  1314. }
  1315. p = laAddPropertyContainer("tns_light", "Light", "Light object", U'🔅', tnsui_LightObjectProperties,sizeof(tnsLight), 0,0,2);{
  1316. //laPropContainerExtraFunctions(p,0,0,0,tnspropagate_Object,0);
  1317. TNS_PC_OBJECT_LIGHT=p;
  1318. laAddStringProperty(p, "name", "Object Name", "The name of the object", 0,0,0,0,1, offsetof(tnsObject, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  1319. laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,0,0,0,0,0,0,0,0,LA_UDF_LOCAL);
  1320. ep = laAddEnumProperty(p, "unidirectional", "UniDirectional", "Unidirectional lighting", 0,0,0,0,0,offsetof(tnsLight, UniDirectional), 0,0,0,0,0,0,0,0,0,0);{
  1321. laAddEnumItem(ep, "NONE", "Perspective", "Camera in linear perspective", 0);
  1322. laAddEnumItem(ep, "orthographic", "Orthographic", "Camera in orthographic view", 0);
  1323. }
  1324. }
  1325. p = laAddPropertyContainer("tns_shape_object", "Shape Object", "Shape object", 0,tnsui_ShapeObjectProperties,sizeof(tnsShapeObject), tnspost_Object, 0,2);{
  1326. laPropContainerExtraFunctions(p,0,0,tnstouched_Object,0/*tnspropagate_Object*/,0);
  1327. TNS_PC_OBJECT_SHAPE=p;
  1328. laAddStringProperty(p, "name", "Object Name", "The name of the object", 0,0,0,0,1, offsetof(tnsObject, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  1329. laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,0,0,0,0,0,0,0,0,LA_UDF_LOCAL);
  1330. ep = laAddEnumProperty(p, "mode", "Mode", "Shape object mode", 0,0,0,0,0,offsetof(tnsShapeObject, Mode),0,0,0,0,0,0,0,0,0,0);{
  1331. laAddEnumItemAs(ep, "OBJECT", "Object", "Object mode", TNS_MESH_OBJECT_MODE, 0);
  1332. laAddEnumItemAs(ep, "EDIT", "Edit", "Edit mode", TNS_MESH_EDIT_MODE, 0);
  1333. }
  1334. ep = laAddEnumProperty(p, "backdrop", "Backdrop", "Draw shape as backdrop", 0,0,0,0,0,offsetof(tnsShapeObject, Backdrop),0,tnsset_ShapeObjectBackdrop,0,0,0,0,0,0,0,0);{
  1335. laAddEnumItemAs(ep, "NONE", "None", "Draw shape on top of stuff", 0, 0);
  1336. laAddEnumItemAs(ep, "BACKDROP", "Backdrop", "Draw shape as backdrop", 1, 0);
  1337. }
  1338. laAddSubGroup(p, "shapes", "Shapes", "Shapes inside of the object", "tns_shape",0,0,0,-1,0,0,0,0,0,0,offsetof(tnsShapeObject, Shapes), 0);
  1339. laAddSubGroup(p, "current_material", "Current Material", "Current material slot in this object", "tns_material_slot",0,0,0,offsetof(tnsShapeObject, CurrentMaterial),tnsget_FirstMaterialSlot,0,laget_ListNext,0,0,0,0,LA_UDF_REFER);
  1340. laAddSubGroup(p, "materials", "Materials", "Material slots in this mesh object", "tns_material_slot",0,0,0,-1,0,tnsget_ActiveMaterialSlot,0,tnsset_ActiveMaterialSlot,0,0,offsetof(tnsShapeObject, Materials),0);
  1341. laAddOperatorProperty(p,"add_material_slot","Add Material Slot","Add a material slot into this object","M_new_material_slot",L'+',0);
  1342. laAddOperatorProperty(p,"add_material","Add Material","Add a new material to this material slot","M_new_material",'+',0);
  1343. laAddOperatorProperty(p,"assign_material_slot","Assign Material Slot","Assign shapes to a current slot","M_assign_material_slot",L'🖌',0);
  1344. }
  1345. p = laAddPropertyContainer("tns_mvert", "MVert", "MMesh vert", 0,0,sizeof(tnsMVert), 0,0,0);{
  1346. laAddFloatProperty(p, "p", "Position", "Position", 0,"X,Y,Z", 0,0,0,0,0,0,offsetof(tnsMVert, p),0,0,3,0,0,0,0,0,0,0,0);
  1347. laAddFloatProperty(p, "n", "Normal", "Normal", 0,"X,Y,Z", 0,0,0,0,0,0,offsetof(tnsMVert, n),0,0,3,0,0,0,0,0,0,0,0);
  1348. laAddIntProperty(p,"i","Index","Index",0,0,0,0,0,0,0,0,offsetof(tnsMVert, i),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1349. laAddIntProperty(p,"flags","Flags","Flags",0,0,0,0,0,0,0,0,offsetof(tnsMVert, flags),0,0,0,0,0,0,0,0,0,0,0);
  1350. laAddSubGroup(p, "elink", "Edge Link", "Edge link", "tns_medge_link",0,0,0,-1,0,0,0,0,0,0,offsetof(tnsMVert, elink),0);
  1351. }
  1352. p = laAddPropertyContainer("tns_medge", "MEdge", "MMesh edge", 0,0,sizeof(tnsMEdge), 0,0,0);{
  1353. laAddIntProperty(p,"i","Index","Index",0,0,0,0,0,0,0,0,offsetof(tnsMEdge, i),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1354. laAddIntProperty(p,"flags","Flags","Flags",0,0,0,0,0,0,0,0,offsetof(tnsMEdge, flags),0,0,0,0,0,0,0,0,0,0,0);
  1355. laAddSubGroup(p, "vl", "vl", "Left vert", "tns_mvert",0,0,0,offsetof(tnsMEdge, vl),0,0,0,0,0,0,0,LA_UDF_REFER);
  1356. laAddSubGroup(p, "vr", "vr", "Right vert", "tns_mvert",0,0,0,offsetof(tnsMEdge, vr),0,0,0,0,0,0,0,LA_UDF_REFER);
  1357. laAddSubGroup(p, "fl", "fl", "Left face", "tns_mface",0,0,0,offsetof(tnsMEdge, fl),0,0,0,0,0,0,0,LA_UDF_REFER);
  1358. laAddSubGroup(p, "fr", "fr", "Right face", "tns_mface",0,0,0,offsetof(tnsMEdge, fr),0,0,0,0,0,0,0,LA_UDF_REFER);
  1359. }
  1360. p = laAddPropertyContainer("tns_mface", "MFace", "MMesh face", 0,0,sizeof(tnsMFace), 0,0,0);{
  1361. laAddIntProperty(p,"i","Index","Index",0,0,0,0,0,0,0,0,offsetof(tnsMFace, i),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1362. laAddIntProperty(p,"flags","Flags","Flags",0,0,0,0,0,0,0,0,offsetof(tnsMFace, flags),0,0,0,0,0,0,0,0,0,0,0);
  1363. laAddSubGroup(p, "l", "Loop", "Loop", "tns_loop",0,0,0,-1,0,0,0,0,0,0,offsetof(tnsMFace, l),0);
  1364. laAddIntProperty(p,"looplen","Loop Length","Loop length",0,0,0,0,0,0,0,0,offsetof(tnsMFace, looplen),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY)->ElementBytes=2;
  1365. laAddIntProperty(p,"mat","Material","Material of this face",0,0,0,0,0,0,0,0,offsetof(tnsMFace, mat),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY)->ElementBytes=2;
  1366. laAddFloatProperty(p, "n", "Normal", "Normal", 0,"X,Y,Z", 0,0,0,0,0,0,offsetof(tnsMFace, n),0,0,3,0,0,0,0,0,0,0,0);
  1367. //laAddFloatProperty(p, "gn", "Global Normal", "Global normal", 0,"X,Y,Z", 0,0,0,0,0,0,offsetof(tnsMFace, gn),0,0,3,0,0,0,0,0,0,0,0);
  1368. laAddFloatProperty(p, "c", "Center", "Center", 0,"X,Y,Z", 0,0,0,0,0,0,offsetof(tnsMFace, c),0,0,3,0,0,0,0,0,0,0,0);
  1369. }
  1370. p = laAddPropertyContainer("tns_medge_link", "MEdge Link", "MEdge link", 0,0,sizeof(laListItemPointer), 0,0,0);{
  1371. laAddSubGroup(p, "e", "Edge", "Edge", "tns_medge",0,0,0,offsetof(laListItemPointer, p),0,0,0,0,0,0,0,LA_UDF_REFER);
  1372. }
  1373. p = laAddPropertyContainer("tns_loop", "MFace Loop", "MFace loop", 0,0,sizeof(laListItemPointer), 0,0,0);{
  1374. laAddSubGroup(p, "e", "Edge", "Edge", "tns_medge",0,0,0,offsetof(laListItemPointer, p),0,0,0,0,0,0,0,LA_UDF_REFER);
  1375. }
  1376. p = laAddPropertyContainer("tns_shape", "Shape", "Shape data structure", 0,0,sizeof(tnsShape), 0,0,0);{
  1377. laAddIntProperty(p,"mat","Material","Material of this face",0,0,0,0,0,0,0,0,offsetof(tnsShape, mat),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY)->ElementBytes=2;
  1378. laAddIntProperty(p,"flags","Flags","Flags",0,0,0,0,0,0,0,0,offsetof(tnsShape, flags),0,0,0,0,0,0,0,0,0,0,0);
  1379. laAddSubGroup(p, "points", "Points", "Points in this shape", "tns_spoint",0,0,0,-1,0,0,0,0,0,0,offsetof(tnsShape, Points),0);
  1380. }
  1381. p = laAddPropertyContainer("tns_spoint", "SPoint", "Shape point", 0,0,sizeof(tnsSPoint), 0,0,0);{
  1382. laAddFloatProperty(p, "p", "Position", "Position", 0,"X,Y", 0,0,0,0,0,0,offsetof(tnsSPoint, p),0,0,2,0,0,0,0,0,0,0,0);
  1383. laAddFloatProperty(p, "dl", "Delta Left", "Delta of left control point", 0,"X,Y", 0,0,0,0,0,0,offsetof(tnsSPoint, dl),0,0,2,0,0,0,0,0,0,0,0);
  1384. laAddFloatProperty(p, "dr", "Delta Right", "Delta of right control point", 0,"X,Y", 0,0,0,0,0,0,offsetof(tnsSPoint, dr),0,0,2,0,0,0,0,0,0,0,0);
  1385. laAddIntProperty(p,"flags","Flags","Flags",0,0,0,0,0,0,0,0,offsetof(tnsSPoint, flags),0,0,0,0,0,0,0,0,0,0,0);
  1386. }
  1387. }
  1388. void la_RegisterInternalProps(){
  1389. laPropContainer *p, *ip, *p2, *ip2, *sp1, *sp2;
  1390. laProp *ep; laPropPack pp; laSubProp *sp; laKeyMapper *km;
  1391. laCanvasTemplate *v2dt;
  1392. {
  1393. la_UDFAppendSharedTypePointer("_LA_ROOT_NODE_", &MAIN);
  1394. la_UDFAppendSharedTypePointer("_TNS_ROOT_NODE_", T);
  1395. // THEME ==================================================================================================
  1396. {
  1397. p = laDefineRoot();
  1398. laAddPropertyContainer("any_pointer", "Any Pointer", "A pointer that is not exposed to access", 0,0,sizeof(void*), 0,0,LA_PROP_OTHER_ALLOC);
  1399. laAddPropertyContainer("any_pointer_h2", "Any Pointer (h2)", "A pointer that is not exposed to access", 0,0,sizeof(void*), 0,0,2);
  1400. laAddSubGroup(p, "tns","TNS", "TNS Kernel Main Structure", "tns_main",0,0,0,-1, tnsget_TnsMain, 0,0,0,0,0,0,LA_UDF_SINGLE | LA_UDF_LOCAL);
  1401. laAddSubGroup(p, "la","LA", "LA Main Structure", "la_main",0,0,laui_SubPropInfoDefault, -1, laget_Main, 0,0,0,0,0,0,LA_UDF_SINGLE | LA_UDF_LOCAL);
  1402. p = laAddPropertyContainer("boxed_theme", "Boxed Theme", "A single theme item for one or multiple kinds of uiitems", 0,laui_BoxedThemeItem, sizeof(laBoxedTheme), 0,0,1);{
  1403. laAddStringProperty(p, "name", "Name", "Boxed theme name", 0,0,0,0,1, offsetof(laBoxedTheme, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  1404. laAddIntProperty(p, "margins", "Margins", "Margins On Four Sides", 0,"Left,Right,Top,Bottom", 0, 10, -2, 1, 1, 0,offsetof(laBoxedTheme, Margins), 0,0,4, 0,laset_ThemeMargins, 0,0,0,0,0,0);
  1405. laAddIntProperty(p, "paddings", "Paddings", "Paddings On Four Sides", 0,"Left,Right,Top,Bottom", 0,10, -2, 1, 1, 0,offsetof(laBoxedTheme, Paddings), 0,0,4, 0,laset_ThemePaddings, 0,0,0,0,0,0);
  1406. laAddFloatProperty(p, "normal", "Normal", "Background brightness", 0,0,0,1, 0,0.025, 1, 0,offsetof(laBoxedTheme, NormalY), 0,laset_ThemeNormal, 0,0,0,0,0,0,0,0,0);
  1407. laAddFloatProperty(p, "active", "Active", "Background brightness in active state", 0,0,0,1, 0,0.025, 1, 0,offsetof(laBoxedTheme, ActiveY), 0,laset_ThemeActive, 0,0,0,0,0,0,0,0,0);
  1408. laAddFloatProperty(p, "border", "Border", "Border brightness", 0,0,0,1, 0,0.025, 1, 0,offsetof(laBoxedTheme, BorderY), 0,laset_ThemeBorder, 0,0,0,0,0,0,0,0,0);
  1409. laAddFloatProperty(p, "text", "Text", "Text brightness", 0,0,0,1, 0,0.025, 1, 0,offsetof(laBoxedTheme, TextY), 0,laset_ThemeText, 0,0,0,0,0,0,0,0,0);
  1410. laAddFloatProperty(p, "text_active", "Text Active", "Text brightness in active state", 0,0,0,1, 0,0.025, 1, 0,offsetof(laBoxedTheme, TextActiveY), 0,laset_ThemeTextActive, 0,0,0,0,0,0,0,0,0);
  1411. laAddFloatProperty(p, "alpha", "Alpha", "Background alpha", 0,0,0,1, 0,0.025, 1, 0,offsetof(laBoxedTheme, Alpha), 0,laset_ThemeAlpha, 0,0,0,0,0,0,0,0,0);
  1412. laAddSubGroup(p, "back_ref", "Back Ref", "Boxed theme internal back-ref", "any_pointer",0,0,0,offsetof(laBoxedTheme, BackRef), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1413. laAddSubGroup(p, "parent", "Parent", "Parent Theme", "theme",0,0,0,offsetof(laBoxedTheme, Parent), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1414. }
  1415. p = laAddPropertyContainer("theme", "Theme Package", "A package with all types of theme for ui items", 0,laui_Theme, sizeof(laTheme), 0,0,2);{
  1416. laAddStringProperty(p, "name", "Name", "Theme name", 0,0,0,0,1, offsetof(laTheme, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  1417. laAddStringProperty(p, "author", "Author", "The author's name", 0,0,0,0,1, offsetof(laTheme, Author), 0,0,0,0,0);
  1418. laAddSubGroup(p, "boxed_themes", "Boxed Themes", "The Boxed Theme For Single UiItem Or Panel", "boxed_theme",0,0,0,-1, 0,0,0,0,0,0,offsetof(laTheme, BoxedThemes), 0);
  1419. laAddFloatProperty(p, "color", "Color", "Base color of the theme", LA_WIDGET_FLOAT_COLOR, "R,G,B,A", 0,1, 0,0.025, 1, 0,offsetof(laTheme, Color), 0,0,4, 0,0,0,0,laset_ThemeColor, 0,0,0);
  1420. laAddFloatProperty(p, "accent_color", "Accent Color", "Theme accent color for hightlight etc", LA_WIDGET_FLOAT_COLOR, "R,G,B,A", 0,1, 0,0.025, 1, 0,offsetof(laTheme, AccentColor), 0,0,4, 0,0,0,0,laset_ThemeAccentColor, 0,0,0);
  1421. laAddFloatProperty(p, "warning_color", "Warning Color", "Theme accent color for warning etc", LA_WIDGET_FLOAT_COLOR, "R,G,B,A", 0,1, 0,0.025, 1, 0,offsetof(laTheme, WarningColor), 0,0,4, 0,0,0,0,laset_ThemeWarningColor, 0,0,0);
  1422. laAddFloatProperty(p, "inactive_saturation", "Inactive Saturation", "Reduced saturation on inactive widgets", 0,0,0,1, 0,0.025, 1, 0,offsetof(laTheme, InactiveSaturation), 0,0,1, 0,0,0,0,laset_ThemeInactiveSaturation, 0,0,0);
  1423. laAddFloatProperty(p, "inactive_mix", "Inactive Mix", "Reduced alpha on inactive widgets", 0,0,0,1, 0,0.025, 1, 0,offsetof(laTheme, InactiveMix), 0,0,1, 0,0,0,0,laset_ThemeInactiveMix, 0,0,0);
  1424. laAddFloatProperty(p, "cursor_alpha", "Cursor Alpha", "Transparency of the cursor", 0,0,0,1, 0,0.025, 1, 0,offsetof(laTheme, CursorAlpha), 0,0,1, 0,0,0,0,laset_ThemeCursorAlpha, 0,0,0);
  1425. laAddFloatProperty(p, "selection_alpha", "Selection Alpha", "Transparency of selection backgrounds", 0,0,0,1, 0,0.025, 1, 0,offsetof(laTheme, SelectionAlpha), 0,0,1, 0,0,0,0,laset_ThemeSelectionAlpha, 0,0,0);
  1426. laAddFloatProperty(p, "wire_transparency", "Wire Transparency", "Alpha of the wire color", 0,0,0,1, 0,0.05, 0.7, 0,offsetof(laTheme, WireTransparency), 0,laset_ThemeWireTransparency, 0,0,0,0,0,0,0,0,0);
  1427. laAddFloatProperty(p, "wire_saturation", "Wire Saturation", "Saturation of the wires", 0,0,0,1, 0,0.05, 0.8, 0,offsetof(laTheme, WireSaturation), 0,laset_ThemeWireSaturation, 0,0,0,0,0,0,0,0,0);
  1428. laAddFloatProperty(p, "wire_brightness", "Wire Brightness", "Brightness of the wires", 0,0,0,1, 0,0.05, 0.8, 0,offsetof(laTheme, WireBrightness), 0,laset_ThemeWireBrightness, 0,0,0,0,0,0,0,0,0);
  1429. laAddFloatProperty(p, "edge_transparency", "Edge Transparency", "Transparency of the edge color", 0,0,0,1, 0,0.05, 0.7, 0,offsetof(laTheme, EdgeTransparency), 0,laset_ThemeEdgeTransparency, 0,0,0,0,0,0,0,0,0);
  1430. laAddFloatProperty(p, "edge_brightness", "Edge Brightness", "Brightness of the edge color", 0,0,0,1, 0,0.05, 0.7, 0,offsetof(laTheme, EdgeBrightness), 0,laset_ThemeEdgeBrightness, 0,0,0,0,0,0,0,0,0);
  1431. laAddFloatProperty(p, "vertex_transparency", "Edge Transparency", "Transparency of the vertex color", 0,0,0,1, 0,0.05, 0.7, 0,offsetof(laTheme, VertexTransparency), 0,laset_ThemeVertexTransparency, 0,0,0,0,0,0,0,0,0);
  1432. laAddFloatProperty(p, "vertex_brightness", "Edge Brightness", "Brightness of the vertex color", 0,0,0,1, 0,0.05, 0.7, 0,offsetof(laTheme, VertexBrightness), 0,laset_ThemeVertexBrightness, 0,0,0,0,0,0,0,0,0);
  1433. laAddFloatProperty(p, "svertex_transparency", "Selected Vertex Transparency", "Transparency of selected vertices", 0,0,0,1, 0,0.05, 0.7, 0,offsetof(laTheme, SelectedVertexTransparency), 0,laset_ThemeSVertexTransparency, 0,0,0,0,0,0,0,0,0);
  1434. laAddFloatProperty(p, "sedge_transparency", "Selected Edge Transparency", "Transparency of selected edges", 0,0,0,1, 0,0.05, 0.7, 0,offsetof(laTheme, SelectedEdgeTransparency), 0,laset_ThemeSEdgeTransparency, 0,0,0,0,0,0,0,0,0);
  1435. laAddFloatProperty(p, "sface_transparency", "Selected Face Transparency", "Transparency of selected faces", 0,0,0,1, 0,0.05, 0.7, 0,offsetof(laTheme, SelectedFaceTransparency), 0,laset_ThemeSFaceTransparency, 0,0,0,0,0,0,0,0,0);
  1436. laAddOperatorProperty(p, "delete", "Delete", "Delete this theme", "LA_delete_theme", 0,0);
  1437. }
  1438. }
  1439. // TIME INFO =========================================================================================
  1440. p = laAddPropertyContainer("time_info", "Time Info", "Time information y/m/d/h/m/s", U'🕒', 0,sizeof(laTimeInfo), 0,0,LA_PROP_OTHER_ALLOC);{
  1441. laAddIntProperty(p, "year", "Year", "Year value", 0,0,0,0,0,0,0,0,0,laget_TimeYear, 0,0,0,0,0,0,0,0,0,0);
  1442. laAddIntProperty(p, "month", "Month", "Month value", 0,0,0,0,0,0,0,0,0,laget_TimeMonth, 0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1443. laAddIntProperty(p, "day", "Day", "Day value", 0,0,0,0,0,0,0,0,0,laget_TimeDay, 0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1444. laAddIntProperty(p, "hour", "Hour", "Hour value", 0,0,0,0,0,0,0,0,0,laget_TimeHour, 0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1445. laAddIntProperty(p, "minute", "Minute", "Minute value", 0,0,0,0,0,0,0,0,0,laget_TimeMinute, 0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1446. laAddIntProperty(p, "second", "Second", "Second value", 0,0,0,0,0,0,0,0,0,laget_TimeSecond, 0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1447. laAddStringProperty(p, "time_string", "Time String", "Full String In \"Y-M-D H:M:S\" format", 0,0,0,0,0,0,0,laget_TimeString, 0,0,LA_READ_ONLY);
  1448. }
  1449. // LA MAIN =========================================================================================
  1450. p = laAddPropertyContainer("la_main", "LA Root", "La root structure", U'🖴', 0,sizeof(LA), 0,0,2|LA_PROP_OTHER_ALLOC);{
  1451. laAddSubGroup(p, "logs", "Logs", "Application logs", "la_log",0,0,laui_LogItem, -1, 0,0,0,0,0,0,offsetof(LA, Logs), LA_UDF_IGNORE|LA_READ_ONLY);
  1452. laAddStringProperty(p, "terminal_input", "Terminal Input", "Terminal input string", 0,0,0,0,0, offsetof(LA,TerminalInput),0,0,laset_TerminalInput,0,LA_UDF_LOCAL|LA_UDF_IGNORE);
  1453. ep=laAddEnumProperty(p, "terminal_incomplete", "Terminal Incomplete", "Incomplete input pending in terminal", 0,0,0,0,0,offsetof(LA, TerminalIncomplete),0,0,0,0,0,0,0,0,0,LA_READ_ONLY|LA_UDF_IGNORE);
  1454. laAddEnumItemAs(ep, "NONE", "None", "Terminal status is normal", 0, 0);
  1455. laAddEnumItemAs(ep, "INCOMPLETE", "Incomplete", "Terminal has incomplete input pending", 1, 0);
  1456. laAddSubGroup(p, "differences", "Differences", "Difference stack (for undo/redo)", "la_difference",0,0,0,offsetof(LA, HeadDifference), 0,0,0,0,0,0,offsetof(LA, Differences), LA_UDF_IGNORE|LA_READ_ONLY);
  1457. sp=laAddSubGroup(p, "panel_templates", "Panel Templates", "Panel templates used to create new panel", "panel_template",0,0,0,-1, 0,0,0,0,0,0,offsetof(LA, PanelTemplates), 0);
  1458. _LA_PROP_WINDOW=laAddSubGroup(p, "windows", "Windows", "All windows inside this application", "ui_window",0,0,0,offsetof(LA, CurrentWindow), laget_FirstWindow, 0,laget_ListNext, 0,0,0,offsetof(LA, Windows), 0);
  1459. la_UDFAppendSharedTypePointer("_LA_PROP_WINDOW", _LA_PROP_WINDOW);
  1460. laAddSubGroup(p, "data", "Data", "Data Root Control", "property_container",0,0,0,offsetof(LA, DataRoot.Root), 0,0,0,0,0,0,0,0);
  1461. laAddSubGroup(p, "prop_containers", "Sub Type", "Sub Type Property Container", "property_container",0,0,0,-1, laget_FirstContainer, 0,laget_ListNext, 0,0,0,0,0);
  1462. laAddSubGroup(p, "managed_props", "Managed Props", "Managed properties for saving", "managed_prop",0,0,0,-1, 0,0,0,0,0,0,offsetof(LA, ManagedSaveProps), LA_UDF_IGNORE|LA_READ_ONLY);
  1463. laAddSubGroup(p, "managed_udfs", "Managed UDFs", "Managed UDFs for saving", "managed_udf", 0,0,laui_ManagedUDFOps, -1, 0,0,0,0,0,0,offsetof(LA, ManagedUDFs), LA_UDF_IGNORE|LA_READ_ONLY);
  1464. laAddSubGroup(p, "user_preferences", "User Preference", "Kernel Settings For LA Main Structure", "la_user_preference",0,0,0,-1, laget_Main, 0,0,0,0,0,0,LA_UDF_LOCAL);
  1465. laSubGroupExtraFunctions(sp,0,0,0,0,laget_PanelTemplateCategory);
  1466. laAddSubGroup(p, "themes", "Themes", "Themes Loded In The Program", "theme",0,0,laui_Theme, -1, 0,laget_ActiveTheme, 0,laset_ActiveTheme, 0,0,offsetof(LA,Themes), 0);
  1467. sp=laAddSubGroup(p, "controllers", "Controllers", "Detected game controllers","la_controller",laget_ControllerType,0,0,-1,0,0,0,0,0,0,offsetof(LA,Controllers),0);
  1468. laSubGroupDetachable(sp, laget_DetachedControllerFirst, laget_ListNext);
  1469. LA_PROP_CONTROLLER=sp;
  1470. sp=laAddSubGroup(p, "node_categories", "Node Categories", "Node categories","la_node_category",0,0,0,offsetof(LA,CurrentNodeCategory),0,0,0,0,0,0,offsetof(LA,NodeCategories),0);
  1471. laSubGroupExtraFunctions(sp,lafilter_NodeCategory,0,0,0,0);
  1472. laAddSubGroup(p, "animation", "Animation", "Animation data","la_animation",0,0,0,offsetof(LA,Animation),0,0,0,0,0,0,0,LA_UDF_SINGLE);
  1473. if(MAIN.InitArgs.HasAudio) laAddSubGroup(p, "audio", "Audio", "Audio data","la_audio",0,0,0,offsetof(LA,Audio),0,0,0,0,0,0,0,LA_UDF_SINGLE);
  1474. laAddSubGroup(p,"input_mapping","Input Mapping","Input mapping bundle","la_input_mapping_bundle",0,0,0,offsetof(LA,InputMapping),0,0,0,0,0,0,0,LA_UDF_SINGLE);
  1475. laAddStringProperty(p,"signal_filter","Signal Filter","Filter displayed signals",0,0,0,0,1,offsetof(LA,SignalFilter),0,0,laset_SignalFilter,0,0);
  1476. laAddSubGroup(p,"custom_signals","Signals","Registered custom signals","la_custom_signal",0,0,laui_IdentifierOnly,-1,laget_FirstCustomSignal,0,laget_ListNext,0,0,0,0,LA_UDF_IGNORE);
  1477. laAddSubGroup(p,"filtered_signals","Filtered Signals","Filtered custom signals","la_custom_signal",0,0,laui_IdentifierOnly,-1,laget_FirstFilteredCustomSignal,0,lagetnext_FilteredSignal,0,0,0,0,LA_UDF_IGNORE);
  1478. laAddStringProperty(p, "identifier", "Identifier", "Identifier", 0,0,0,0,0,0,0,laget_MainIdentifier, 0,0,LA_AS_IDENTIFIER|LA_READ_ONLY);
  1479. ep=laAddEnumProperty(p, "detached_view_switch", "View Detached", "Use detached view on panels", LA_WIDGET_ENUM_HIGHLIGHT,0,0,0,0,offsetof(LA, DetachedViewSwitch),0,0,0,0,0,0,0,0,0,LA_UDF_IGNORE);
  1480. laAddEnumItemAs(ep, "LINKED", "Linked", "View is linked to global current states", 0, U'🔗');
  1481. laAddEnumItemAs(ep, "DETACHED", "Detached", "View is detached from global states and is pinned to panel", 1, U'📌');
  1482. laAddIntProperty(p, "example_int", "Example Integer", "Example integer", 0,0,0,100,0,1, 50,0,offsetof(LA, example_int), 0,0,0,0,0,0,0,0,0,0,0);
  1483. laAddStringProperty(p, "example_string", "Example String", "Example string", 0,0,0,0,1, offsetof(LA,example_string), 0,0,0,0,0);
  1484. laAddStringProperty(p, "unknown_prop", "Unknown Property", "Placeholder for unknown property, probably due to a wrong property path, or not setting LA_AS_IDENTIFIER in any of the properties.",
  1485. LA_WIDGET_STRING_PLAIN, 0,0,0,0,0,0,laget_UnknownPropertyString, 0,0,LA_READ_ONLY);
  1486. }
  1487. if(MAIN.InitArgs.HasAudio){
  1488. p = laAddPropertyContainer("la_audio", "Audio", "Audio management", 0,0, sizeof(laAudio), 0,0,1);{
  1489. laAddSubGroup(p,"synths","Synthesizers","Synthesizers","la_synth",0,0,0,-1,0,0,0,0,0,0,offsetof(laAudio,Synths),0);
  1490. sp=laAddSubGroup(p, "current_synth", "Current Synthesizer", "Current synthesizer","la_synth",0,0,0,offsetof(laAudio,CurrentSynth),laget_FirstSynth,0,laget_ListNext,laset_CurrentSynth,0,0,0,LA_UDF_REFER);
  1491. laSubGroupDetachable(sp,laget_FirstSynth,laget_ListNext);
  1492. laAddSubGroup(p,"audio_devices","Audio Devices","Enumerated audio devices","la_audio_device",0,0,0,-1,0,0,0,0,0,0,offsetof(laAudio,AudioDevices),LA_UDF_IGNORE);
  1493. laAddSubGroup(p, "current_audio_device", "Current Audio Device", "Current audio device","la_audio_device",0,0,0,offsetof(laAudio,UsingDevice),laget_FirstAudioDevice,0,laget_ListNext,laset_CurrentAudioDevice,0,0,0,LA_UDF_REFER|LA_UDF_IGNORE);
  1494. laAddSubGroup(p,"channels","Channels","Audio channels","la_audio_channel",0,0,0,-1,0,0,0,0,0,0,offsetof(laAudio,Channels),0);
  1495. ep=laAddEnumProperty(p,"backend","Backend","Audio backend",0,0,0,ma_backend_null,0,offsetof(laAudio,MiniAudioBackend),0,laset_MiniAudioBackend,0,0,0,0,0,0,0,0);
  1496. laAddEnumItemAs(ep,"AUTO","Auto","Automatic backend selection",ma_backend_null,0);
  1497. laAddEnumItemAs(ep,"JACK","Jack","Jack backend",ma_backend_jack,0);
  1498. #ifdef LA_LINUX
  1499. laAddEnumItemAs(ep,"PULSEAUDIO","Pulseaudio","Pulseaudio backend",ma_backend_pulseaudio,0);
  1500. laAddEnumItemAs(ep,"ALSA","Alsa","Alsa backend",ma_backend_alsa,0);
  1501. #endif
  1502. #ifdef _WIN32
  1503. laAddEnumItemAs(ep,"WASAPI","WASAPI"," WASAPI backend",ma_backend_wasapi,0);
  1504. laAddEnumItemAs(ep,"DIRECTSOUND","DirectSound","DirectSound backend",ma_backend_dsound, 0);
  1505. laAddEnumItemAs(ep,"WINMM","WinMM","WinMM backend",ma_backend_winmm,0);
  1506. #endif
  1507. #ifdef LAGUI_ANDROID
  1508. laAddEnumItemAs(ep,"AAUDIO","AAudio"," AAudio backend",ma_backend_aaudio,0);
  1509. laAddEnumItemAs(ep,"OpenSL ES","OpenSL ES","OpenSL ES backend",ma_backend_opensl,0);
  1510. #endif
  1511. }
  1512. }
  1513. p = laAddPropertyContainer("la_node_category", "Node Category", "Node category", 0,laui_IdentifierOnly, sizeof(laNodeCategory), 0,0,1);{
  1514. laAddStringProperty(p, "name", "Name", "Name of the page", 0,0,0,0,1, offsetof(laNodeCategory, Name), 0,0,0,0,LA_AS_IDENTIFIER|LA_TRANSLATE);
  1515. laAddIntProperty(p, "for_racks", "For Rack Types", "For rack types", 0,0,0,0,0,0,0,0,offsetof(laNodeCategory, For), 0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1516. }
  1517. p = laAddPropertyContainer("la_driver_collection", "Driver Collection", "Driver collection", 0,0,sizeof(laRackPageCollection), 0,0,1);{
  1518. laAddSubGroup(p, "pages", "Pages", "Rack pages","la_rack_page",0,0,0,-1,0,laget_CurrentRackPage,0,0,0,0,offsetof(laRackPageCollection,Pages),0);
  1519. sp=laAddSubGroup(p, "current_page", "Current Page", "Current page","la_rack_page",0,0,0,offsetof(laRackPageCollection,CurrentPage),laget_FirstDriverPage,0,laget_ListNext,laset_CurrentRackPage,0,0,0,LA_UDF_REFER);
  1520. //laSubGroupDetachable(sp,laget_FirstDriverPage,laget_ListNext);
  1521. }
  1522. p = laAddPropertyContainer("la_rack_page", "Rack Page", "A page of nodes", 0,laui_IdentifierOnly, sizeof(laRackPage),lapost_RackPage,0,1);{
  1523. LA_PC_RACK_PAGE = p;
  1524. laPropContainerExtraFunctions(p,0,lareset_RackPage,0,0,0);
  1525. laAddStringProperty(p, "name", "Name", "Name of the page", 0,0,0,0,1, offsetof(laRackPage, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  1526. laAddIntProperty(p,"type", "Type", "Type of the rack", 0,0,0,0,0,0,0,0,offsetof(laRackPage,RackType),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1527. laAddIntProperty(p,"has_rack", "Has Rack", "Has rack", 0,0,0,0,0,0,0,0,offsetof(laRackPage,Racks.pFirst),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY|LA_UDF_IGNORE);
  1528. laAddSubGroup(p, "racks", "Racks", "Racks for nodes","la_node_rack",0,0,0,-1,0,0,0,0,0,0,offsetof(laRackPage,Racks),0);
  1529. if(MAIN.InitArgs.HasWorldObjects){
  1530. laAddSubGroup(p, "parent_object", "Parent Object", "Parent object of this page","tns_object",0,0,0,offsetof(laRackPage,ParentObject),0,0,0,0,0,0,0,LA_READ_ONLY|LA_UDF_REFER);
  1531. }
  1532. ep=laAddEnumProperty(p, "trigger", "Trigger", "Trigger evaluation on event",0,0,0,0,0,offsetof(laRackPage,TriggerMode),0,0,0,0,0,0,0,0,0,0);
  1533. laAddEnumItemAs(ep, "PROCESS", "onProcess", "Run this page during idle frame processing of the node",TNS_PAGE_TRIGGER_PROCESS,0);
  1534. laAddEnumItemAs(ep, "KEYBOARD", "onKeyboard", "This page is run when keyboard event is recieved",TNS_PAGE_TRIGGER_KEYBOARD,0);
  1535. laAddEnumItemAs(ep, "MOUSE", "onMouse", "This page is run when mouse event is recieved",TNS_PAGE_TRIGGER_KEYBOARD,0);
  1536. laAddEnumItemAs(ep, "CONTROLLER", "onController", "This page is run when controller event is recieved",TNS_PAGE_TRIGGER_KEYBOARD,0);
  1537. ep=laAddEnumProperty(p, "use_script", "Use Script", "Use script instead of nodes",0,0,0,0,0,offsetof(laRackPage,UseScript),0,0,0,0,0,0,0,0,0,0);
  1538. laAddEnumItemAs(ep, "NODES", "Nodes", "Use nodes to express logic",0,0);
  1539. laAddEnumItemAs(ep, "SCRIPT", "Script", "Use scripts to express logic",1,L'📃');
  1540. laAddStringProperty(p, "script", "Script", "Script content",LA_WIDGET_STRING_MULTI,0,0,0,1,offsetof(laRackPage, Script), 0,0,0,0,0);
  1541. laAddOperatorProperty(p,"add_rack","Add Rack", "Add a rack into the page", "LA_add_rack", '+', 0);
  1542. laAddOperatorProperty(p,"remove_driver_page","Remove Page", "Remove this page", "LA_remove_driver_page", L'🗴', 0);
  1543. }
  1544. //p = laAddPropertyContainer("udf_fail_node", "UDF Failed Node", "Single wild data block reference", laui_UDFFailNodeItem, sizeof(laUDFFailNode), 0,0,0,0,0); {
  1545. // laAddSubGroup(p, "instance", "Instance", "Actual Data Block Instance", "property_trash_item",0,0,0 Item.p), 0,0,0,0,0,0,0,0,
  1546. // 0,0,
  1547. // 0);
  1548. // laAddSubGroup(p, "target_container", "Target Container", "The Container The Data Block Belongs To", "property_container",0,0,0 pc), 0,0,0,0,0,0,0,0,
  1549. // 0,0,
  1550. // 0);
  1551. //}
  1552. p = laAddPropertyContainer("la_difference", "Difference", "A difference stack item (undo/redo).", 0,laui_IdentifierOnly, sizeof(laDiff), 0,0,1);{
  1553. laAddStringProperty(p, "description", "Description", "Description of this recorded change", LA_WIDGET_STRING_PLAIN, 0,0,0,1, offsetof(laDiff, Description), 0,0,0,0,LA_READ_ONLY|LA_AS_IDENTIFIER);
  1554. }
  1555. p = laAddPropertyContainer("la_log", "Resource Folder", "A resource folder to search for UDF references.", 0,laui_ResourceFolderItem, sizeof(laLogEntry), 0,0,1);{
  1556. laAddStringProperty(p, "content", "Content", "Content of the log", LA_WIDGET_STRING_PLAIN, 0,0,0,1, offsetof(laLogEntry, Content), 0,0,0,0,LA_READ_ONLY);
  1557. }
  1558. p = laAddPropertyContainer("la_resource_folder", "Resource Folder", "A resource folder to search for UDF references.", 0,laui_ResourceFolderItem, sizeof(laResourceFolder), 0,0,1);{
  1559. laAddStringProperty(p, "path", "Path", "Path", 0,0,0,0,1, offsetof(laResourceFolder, Path), 0,0,laset_ResourcePath, 0,0);
  1560. laAddOperatorProperty(p, "remove", "Remove", "Remove this resource folder entry", "LA_remove_resource_folder", U'🞫', 0);
  1561. }
  1562. p = laAddPropertyContainer("managed_udf", "Managed UDF", "Managed UDF files", U'🖹', laui_ManagedUDFItem, sizeof(laManagedUDF), 0,0,0);{
  1563. laAddStringProperty(p, "basename", "Base Name", "Base name of the file (withiout directory)", 0,0,0,0,1, offsetof(laManagedUDF, BaseName), 0,0,0,0,LA_AS_IDENTIFIER|LA_READ_ONLY);
  1564. laAddSubGroup(p, "udf", "UDF", "Reference to target UDF file", "udf",0,0,0,offsetof(laManagedUDF, udf), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1565. }
  1566. p = laAddPropertyContainer("udf", "UDF File", "UDF file block", U'🖹', 0,sizeof(laUDF), 0,0,0);{
  1567. laAddStringProperty(p, "path", "Path", "File path", 0,0,0,0,1, offsetof(laUDF, FileName), 0,0,0,0,LA_READ_ONLY);
  1568. ep=laAddEnumProperty(p, "modified", "Modified", "File modified", LA_WIDGET_ENUM_ICON_PLAIN,0,0,0,0,offsetof(laUDF, Modified),0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1569. laAddEnumItemAs(ep, "MODIFIED", "Modified", "There are unsaved changes bound to this file", 1, U'🌑');
  1570. laAddEnumItemAs(ep, "CLEAN", "Clean", "File data is untouched", 0,0);
  1571. ep->ElementBytes=2;
  1572. }
  1573. p = laAddPropertyContainer("managed_prop", "Managed Property", "Managed property for detecting changes for saving files", 0,0,sizeof(laManagedSaveProp), 0,0,0);{
  1574. laAddStringProperty(p, "path", "Path", "Property path", 0,0,0,0,1, offsetof(laManagedSaveProp, Path), 0,0,0,0,LA_READ_ONLY);
  1575. }
  1576. p = laAddPropertyContainer("int_property", "Int Property", "Int property specific info", U'i', laui_IntPropInfo, sizeof(laIntProp), 0,0,1);{
  1577. laAddIntProperty(p, "range", "Range", "Range of the property", 0,"Min,Max", 0,0,0,0,0,0,offsetof(laIntProp, Min), 0,0,2, 0,0,0,0,0,0,0,LA_READ_ONLY);
  1578. laAddIntProperty(p, "default", "Default", "Default value", 0,0,0,0,0,0,0,0,offsetof(laIntProp, DefVal), 0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1579. laAddIntProperty(p, "step", "Step", "Ui step of the value", 0,0,0,0,0,0,0,0,offsetof(laIntProp, Step), 0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1580. laAddSubGroup(p, "base", "Base", "Property Base", "property_item", 0,0,0,0,0,0,0,0,0,0,0,LA_UDF_SINGLE|LA_UDF_LOCAL);
  1581. } MAIN.ContainerInt = p;
  1582. p = laAddPropertyContainer("float_property", "Float Property", "Float property specific info", U'i', laui_FloatPropInfo, sizeof(laFloatProp), 0,0,1);{
  1583. laAddFloatProperty(p, "range", "Range", "Range of the property", 0,"Min,Max", 0,0,0,0,0,0,offsetof(laFloatProp, Min), 0,0,2, 0,0,0,0,0,0,0,LA_READ_ONLY);
  1584. laAddFloatProperty(p, "default", "Default", "Default value", 0,0,0,0,0,0,0,0,offsetof(laFloatProp, DefVal), 0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1585. laAddFloatProperty(p, "step", "Step", "Ui step of the value", 0,0,0,0,0,0,0,0,offsetof(laFloatProp, Step), 0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1586. laAddSubGroup(p, "base","Base", "Property Base", "property_item", 0,0,0,0,0,0,0,0,0,0,0,LA_UDF_SINGLE|LA_UDF_LOCAL);
  1587. } MAIN.ContainerFloat = p;
  1588. // USER PREF ========================================================
  1589. p = laAddPropertyContainer("la_user_preference", "User Preference", "Kernel settings for la main structure", U'⚙', 0,sizeof(LA), lapost_UserPreferences, 0,2|LA_PROP_OTHER_ALLOC);{
  1590. laPropContainerExtraFunctions(p,0,lareset_Main,0,0,0);
  1591. laAddFloatProperty(p, "idle_time", "Idle time", "Time out on no input to show tooltips", 0,0,0,2.0,0.3, 0.05, 0.75, 0,offsetof(LA, IdleTime), 0,0,0,0,0,0,0,0,0,0,0);
  1592. laAddIntProperty(p, "top_framerate", "Top Framerate", "Framerate limiter for drawing the user interface", 0,0,0,60,25, 1, 60,0,offsetof(LA, TopFramerate), 0,0,0,0,0,0,0,0,0,0,0);
  1593. laAddIntProperty(p, "valuator_threshold", "Valuator Threshold", "Drag how many pixels trigger a change in valuator", 0,0,0,10,1, 1, 3, 0,offsetof(LA, ValuatorThreshold), 0,0,0,0,0,0,0,0,0,0,0);
  1594. laAddIntProperty(p, "scroll_speed", "Scrolling Speed", "How many rows to move when scrolling using mouse wheel", 0,0,0,10,1, 1, 3, 0,offsetof(LA, ScrollingSpeed), 0,0,0,0,0,0,0,0,0,0,0);
  1595. laAddFloatProperty(p, "animation_speed", "Animation Speed", "Ui animation speed", 0,0,0,0.6, 0.1, 0.05, 0.2, 0,offsetof(LA, AnimationSpeed), 0,0,0,0,0,0,0,0,0,0,0);
  1596. laAddFloatProperty(p, "panel_animation_speed", "Panel Animation Speed", "Panel animation speed", 0,0,0,0.6, 0.1, 0.05, 0.2, 0,offsetof(LA, PanelAnimationSpeed), 0,0,0,0,0,0,0,0,0,0,0);
  1597. laAddFloatProperty(p, "zoom_speed_2d", "Zoom Speed 2D", "2d canvas zooming speed", 0,0,0,0.5, 0.01, 0.01, 0.01, 0,offsetof(LA, ZoomSpeed2D), 0,0,0,0,0,0,0,0,0,0,0);
  1598. laAddIntProperty(p, "tooltip_close_distance", "Tooltip Close Distance", "The tooltip will hide if mouse moved away further", 0,0,0,100,0,1, 40,0,offsetof(LA, TooltipCloseDistance), 0,0,0,0,0,0,0,0,0,0,0);
  1599. ep = laAddEnumProperty(p, "panel_multisample", "Panel Multisample", "Multisample mode for drawing panels", 0,0,0,0,0,offsetof(LA, PanelMultisample), 0,laset_PanelMultisample, 0,0,0,0,0,0,0,0);{
  1600. laAddEnumItemAs(ep, "none", "None", "Don't use multisample", 0,0);
  1601. laAddEnumItemAs(ep, "2", "2X", "2X multisample", 2, 0);
  1602. laAddEnumItemAs(ep, "4", "4X", "4X multisample", 4, 0);
  1603. laAddEnumItemAs(ep, "8", "8X", "8X multisample", 8, 0);
  1604. laAddEnumItemAs(ep, "16", "16X", "16X multisample", 16, 0);
  1605. }
  1606. ep=laAddEnumProperty(p, "enable_gl_debug", "Enable OpenGL Debug", "Enable OpenGL debug output in the system terminal", LA_WIDGET_ENUM_HIGHLIGHT,0,0,0,0,offsetof(LA, EnableGLDebug),0,laset_EnableGLDebug,0,0,0,0,0,0,0,0);
  1607. laAddEnumItemAs(ep, "DISABLED", "Disabled", "OpenGL debug output is disabled", 0, 0);
  1608. laAddEnumItemAs(ep, "ENABLED", "Enabled", "Will print OpenGL debug information to the system terminal", 1, 0);
  1609. ep=laAddEnumProperty(p, "gl_debug_sync", "Debug Sync", "Whether OpenGL debug output should be in sync with the caller", LA_WIDGET_ENUM_HIGHLIGHT,0,0,0,0,offsetof(LA, GLDebugSync),0,laset_GLDebugSync,0,0,0,0,0,0,0,0);
  1610. laAddEnumItemAs(ep, "DISABLED", "Disabled", "OpenGL debug output will be printing freely", 0, 0);
  1611. laAddEnumItemAs(ep, "ENABLED", "Enabled", "OpenGL debug output will hold the gl-call until return", 1, 0);
  1612. ep=laAddEnumProperty(p, "gl_debug_level", "Debug Level", "OpenGL debug message level", 0,"Note,Low,Med,High",0,0,0,offsetof(LA, GLDebugLevel),0,laset_GLDebugLevel,0,0,0,0,0,0,0,0);
  1613. laAddEnumItemAs(ep, "ALL", "ALL", "Show all debug messages", 0, 0);
  1614. laAddEnumItemAs(ep, "NOTE", "Note", "Show notifications", 1, 0);
  1615. laAddEnumItemAs(ep, "LOW", "Low", "Show low severity messages", 2, 0);
  1616. laAddEnumItemAs(ep, "MEDIUM", "Medium", "Show low severity messages", 3, 0);
  1617. laAddEnumItemAs(ep, "HIGH", "High", "Show high severity messages", 4, 0);
  1618. ep=laAddEnumProperty(p, "enable_log_stdout", "Enable Log StdOut", "Enable log printing to stdout", LA_WIDGET_ENUM_HIGHLIGHT,0,0,0,0,offsetof(LA, EnableLogStdOut),0,0,0,0,0,0,0,0,0,0);
  1619. laAddEnumItemAs(ep, "DISABLED", "Disabled", "StdOut log only outputs necessary stuff", 0, 0);
  1620. laAddEnumItemAs(ep, "ENABLED", "Enabled", "Will print all logs to stdout", 1, 0);
  1621. ep = laAddEnumProperty(p, "enable_performance_overlay", "Performance Overlay", "Show performance overlay for development purposes", LA_WIDGET_ENUM_HIGHLIGHT,0,0,0,0,offsetof(LA, ShowPerf),0,0,0,0,0,0,0,0,0,0);{
  1622. laAddEnumItemAs(ep, "NONE", "None", "Don't show overlay", 0,0);
  1623. laAddEnumItemAs(ep, "PERF", "Perf", "Show performance overlay", 1,0);
  1624. }
  1625. ep=laAddEnumProperty(p, "enable_color_management", "Enable Color Management", "Whether to enable color management or not", LA_WIDGET_ENUM_HIGHLIGHT,0,0,0,0,offsetof(LA, EnableColorManagement),0,0,0,0,0,0,0,0,0,0);
  1626. laAddEnumItemAs(ep, "NONE", "None", "Do not do color management on the window", 0, 0);
  1627. laAddEnumItemAs(ep, "ENABLED", "Enabled", "Enable color management on the window", 1, 0);
  1628. laAddFloatProperty(p, "margin_size", "Margin Size", "The global margin factor", 0,0,0,2.0f, 0.1f, 0.02, 1.0f, 0,offsetof(LA, MarginSize), 0,laset_MarginSize, 0,0,0,0,0,0,0,0,0);
  1629. laAddFloatProperty(p, "font_size", "Font Size", "The height of the font related to the row height", 0,0,0,1.0f, 0.1f, 0.02, 0.75, 0,offsetof(LA, FontSize), 0,laset_FontSize, 0,0,0,0,0,0,0,0,0);
  1630. laAddIntProperty(p, "interface_size", "Interface Size", "The height of one row of ui item", 0,0,0,64, 16, 1, 40,0,offsetof(LA, UiRowHeight), 0,laset_UiRowHeight, 0,0,0,0,0,0,0,0,0);
  1631. laAddFloatProperty(p, "floating_alpha", "Shadow Alpha", "Shadow transparency for floating panels", 0,0,0,1, 0,0.01, 0.7, 0,offsetof(LA, FloatingAlpha), 0,0,0,0,0,0,0,0,0,0,0);
  1632. laAddIntProperty(p, "solid_shadow_length", "Solid Shadow Length", "Solid shadow length for floating panels", 0,0,0,40,0,1, 6, 0,offsetof(LA, SolidShadowLength), 0,0,0,0,0,0,0,0,0,0,0);
  1633. laAddIntProperty(p, "wire_color_slices", "Wire color slices", "How many slices of color to give to node sockets", 0,0,0,32, 1, 1, 16, 0,offsetof(LA, WireColorSlices), 0,laset_WireColorSlices, 0,0,0,0,0,0,0,0,0);
  1634. laAddFloatProperty(p, "wire_thickness", "Wire thickness", "How thick is a wire", 0,0,0,10,0.1, 0.5, 5, 0,offsetof(LA, WireThickness), 0,laset_WireThickness, 0,0,0,0,0,0,0,0,0);
  1635. laAddFloatProperty(p, "wire_saggyness", "Wire saggyness", "How saggy is a wire", 0,0,0,1,0,0.01, 0.5, 0,offsetof(LA, WireSaggyness), 0,laset_WireSaggyness, 0,0,0,0,0,0,0,0,0);
  1636. ep = laAddEnumProperty(p, "enable_translation", "Enable Translation", "Translate user interface into another language", 0,0,0,1, 0,offsetof(LA, Translation.EnableTranslation), 0,transState, 0,0,0,0,0,0,0,0);{
  1637. laAddEnumItem(ep, "no", "No", "Use original english string", 0);
  1638. laAddEnumItem(ep, "yes", "Yes", "Use translated string", 0);
  1639. }
  1640. laAddSubGroup(p, "languages", "Language", "The language list in the software", "la_translation_language",0,0,laui_IdentifierOnly, offsetof(LA, Translation.CurrentLanguage), 0,0,0,laset_Language,0,0,offsetof(LA, Translation.Languages),LA_UDF_IGNORE);
  1641. laAddSubGroup(p, "resource_folders", "Resource Folders", "Folders to search for resources", "la_resource_folder",0,0,0,-1, 0,0,0,0,0,0,offsetof(LA, ResourceFolders), 0);
  1642. ep = laAddEnumProperty(p, "manager_default_view", "UDF Manager Default View", "Prefer to show data blocks or files when saving", 0,0,0,0,0,offsetof(LA, ManagerDefaultView), 0,0,0,0,0,0,0,0,0,0);{
  1643. laAddEnumItemAs(ep, "DATA_BLOCKS", "Data Blocks", "All data blocks", 0,0);
  1644. laAddEnumItemAs(ep, "FILES", "Files", "All Files", 1, 0);
  1645. }
  1646. ep = laAddEnumProperty(p, "save_preferences_on_exit", "Save On Exit", "Save user preferences before exiting the program", 0,0,0,0,0,offsetof(LA, SavePreferenceOnExit), 0,0,0,0,0,0,0,0,0,0);{
  1647. laAddEnumItemAs(ep, "NONE", "Don't save", "Not saving user preferences on exit", 0,0);
  1648. laAddEnumItemAs(ep, "SAVE", "Save", "Saving user preferences on exit", 1, 0);
  1649. }
  1650. laAddIntProperty(p, "wacom_device_stylus", "Stylus Device", "Wacom stylus device ID", LA_WIDGET_INT_PLAIN, 0,0,0,0,0,0,0,offsetof(LA, WacomDeviceStylus), 0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY|LA_UDF_IGNORE);
  1651. laAddIntProperty(p, "wacom_device_eraser", "Eraser Device", "Wacom eraser device ID", LA_WIDGET_INT_PLAIN, 0,0,0,0,0,0,0,offsetof(LA, WacomDeviceEraser), 0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY|LA_UDF_IGNORE);
  1652. ep = laAddEnumProperty(p, "wacom_driver", "Wacom driver", "Wacom driver to read pressure info from on Windows", 0, 0, 0, 0, 0, offsetof(LA, InkOrWinTab), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); {
  1653. laAddEnumItemAs(ep, "WINDOWS_INK", "Windows Ink", "Use Windows Ink pressure events (WM_POINTERUPDATE).", 0, 0);
  1654. laAddEnumItemAs(ep, "WINTAB", "WinTab", "Use wacom WinTab driver to read pressure events (WT_PACKET).", 1, 0);
  1655. }
  1656. laAddFloatProperty(p, "color_picker_gamma", "Color Picker Gamma", "Allows less saturated colors to have more areas", 0,0,0,3.0,1.0, 0.05,1.5, 0,offsetof(LA, ColorPickerGamma), 0,laset_ColorPickerGamma,0,0,0,0,0,0,0,0,0);
  1657. laAddFloatProperty(p, "viewport_halftone_factor", "Halftone Factor", "Viewport halftone mixing factor", 0,0,0,1.0,0.0,0.05,0.5, 0,offsetof(LA, ViewportHalftoneFactor), 0,laset_ViewportHalftoneFactor,0,0,0,0,0,0,0,0,0);
  1658. laAddFloatProperty(p, "viewport_halftone_size", "Halftone Size", "Viewport halftone size", 0,0,0,8.0,1.9, 0.05,3.7, 0,offsetof(LA, ViewportHalftoneSize), 0,laset_ViewportHalftoneSize,0,0,0,0,0,0,0,0,0);
  1659. laAddStringProperty(p,"theme_name","Theme Name","Using theme name",0,0,0,0,0,0,0,laget_UsingTheme,0,laread_UsingTheme,0);
  1660. laAddSubGroup(p,"screens","Screens","Screens connected to this computer","la_screen",0,0,0,-1,0,0,0,0,0,0,offsetof(LA,Screens),0);
  1661. ep = laAddEnumProperty(p, "auto_switch_color_space", "Auto Switch Color Space", "Automatically switch color space for windows on different screens",LA_WIDGET_ENUM_HIGHLIGHT, 0, 0, 0, 0, offsetof(LA, AutoSwitchColorSpace), 0, laset_AutoSwitchColorSpace, 0, 0, 0, 0, 0, 0, 0, 0); {
  1662. laAddEnumItemAs(ep, "NONE", "None", "Windows keep their own color space", 0, 0);
  1663. laAddEnumItemAs(ep, "ENABLED", "Enabled", "Automatically switch window's color space based on settings here", 1, 0);
  1664. }
  1665. }
  1666. p = laAddPropertyContainer("la_input_mapping_bundle", "Input Mapping Bundle", "Bundle of input mapping data", 0,0,sizeof(laInputMappingBundle), 0,0,1);{
  1667. laAddSubGroup(p, "mappings","Mappings","Input mappings","la_input_mapping",0,0,0,-1,0,laget_CurrentInputMapping,0,0,0,0,offsetof(laInputMappingBundle,InputMappings),0);
  1668. laAddSubGroup(p, "current","Current Mapping","Current input mapping","la_input_mapping",0,0,0,offsetof(laInputMappingBundle,CurrentInputMapping),laget_FirstInputMapping,0,laget_ListNext,0,0,0,0,LA_UDF_REFER);
  1669. }
  1670. p = laAddPropertyContainer("la_input_mapping", "Input Mapping", "Input mapping data", 0,0,sizeof(laInputMapping), 0,0,2);{
  1671. laAddStringProperty(p, "name", "Name", "The name of this mapping", 0,0,0,"Mapping", 1, offsetof(laInputMapping, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  1672. laAddSubGroup(p, "entries","Entries","Input mapping entries","la_input_mapping_entry",0,0,0,-1,0,0,0,0,0,0,offsetof(laInputMapping,Entries),0);
  1673. laAddOperatorProperty(p,"remove","Remove","Remove this mapping","LA_remove_input_mapping",U'🞫',0);
  1674. laAddOperatorProperty(p,"new_entry","New Entry","New mapping entry","LA_new_input_mapping_entry",'+',0);
  1675. }
  1676. p = laAddPropertyContainer("la_input_mapping_entry", "Input Mapping Entry", "Input mapping entry", 0,0,sizeof(laInputMappingEntry), 0,0,1);{
  1677. ep=laAddEnumProperty(p,"device_type","Device Type","Device type of the input event",0,0,0,0,0,offsetof(laInputMappingEntry,DeviceType),0,0,0,0,0,0,0,0,0,0);
  1678. laAddEnumItemAs(ep, "KEYBOARD", "Keyboard", "Keyboard input", LA_INPUT_DEVICE_KEYBOARD, 0);
  1679. laAddEnumItemAs(ep, "JOYSTICK", "Joystick", "Joystick input", LA_INPUT_DEVICE_JOYSTICK, 0);
  1680. laAddIntProperty(p,"joystick_device","Joystick Device","Joystick device number",0,0,0,0,0,0,0,0,offsetof(laInputMappingEntry,JoystickDevice),0,0,0,0,0,0,0,0,0,0,0);
  1681. laAddStringProperty(p,"key","Key","Event key",0,0,0,0,1,offsetof(laInputMappingEntry,Key),0,0,laset_InputMappingEntryKeyString,0,0);
  1682. laAddStringProperty(p,"signal","Signal","Target signal",0,0,0,0,1,offsetof(laInputMappingEntry,Signal),0,0,laset_InputMappingEntrySignalString,0,0);
  1683. laAddSubGroup(p,"signal_selection","Signal","Signal selection","la_custom_signal",0,0,laui_IdentifierOnly,-1,laget_FirstCustomSignal,0,laget_ListNext,laset_InputMappingEntrySignal,0,0,0,LA_UDF_IGNORE);
  1684. laAddOperatorProperty(p,"remove","Remove","Remove this entry","LA_remove_input_mapping_entry",U'🞫',0);
  1685. laAddOperatorProperty(p,"select_signal","Select","Select signal","LA_input_mapping_entry_select_signal",0,0);
  1686. laAddOperatorProperty(p,"select_key","Select Key","Select key","LA_input_mapping_entry_select_key",0,0);
  1687. laAddSubGroup(p,"parent","Parent","Parent group","la_input_mapping",0,0,0,offsetof(laInputMappingEntry,Parent),0,0,0,0,0,0,0,LA_UDF_REFER);
  1688. }
  1689. p = laAddPropertyContainer("la_custom_signal", "Custom Signal", "Custom signal", 0,0,sizeof(laCustomSignal), 0,0,1);{
  1690. laAddStringProperty(p, "name", "Name", "The name of this mapping", 0,0,0,"Mapping", 1, offsetof(laCustomSignal, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  1691. }
  1692. p = laAddPropertyContainer("la_translation_language", "Language", "Translation language pack", 0,0,sizeof(laTranslationNode), 0,0,1);{
  1693. laAddStringProperty(p, "name", "Name", "The name of this language", 0,0,0,"Unknown", 1, offsetof(laTranslationNode, LanguageName), 0,0,0,0,LA_AS_IDENTIFIER);
  1694. }
  1695. p = laAddPropertyContainer("la_extension_type", "Extension Type", "File extension and its matching type for file filtering", 0,0,sizeof(laExtensionType), 0,0,0);{
  1696. laAddStringProperty(p, "extension", "Extension", "File extension string", LA_WIDGET_STRING_PLAIN, 0,0,0,0,offsetof(laExtensionType, Extension), 0,0,0,0,LA_AS_IDENTIFIER|LA_READ_ONLY);
  1697. }
  1698. // UI WINDOW ========================================================================================
  1699. p = laAddPropertyContainer("ui_window", "SYSWINDOW Node", "Property container for a system syswindow", 0,0, sizeof(laWindow), lapost_Window, lapostim_Window,1);{
  1700. laAddStringProperty(p, "title", "Title", "The title/name of a panel", 0,0,0,0,1, offsetof(laWindow, Title), 0,0,0,0,LA_AS_IDENTIFIER);
  1701. laAddSubGroup(p, "layouts", "Layouts", "Layout List Of The Whole SYSWINDOW", "ui_layout",0,0,0,offsetof(laWindow, CurrentLayout), laget_WindowFirstLayout, laget_WindowActiveLayout,laget_ListNext, 0,0,laset_WindowActiveLayout, offsetof(laWindow, Layouts), 0);
  1702. _LA_PROP_PANEL = laAddSubGroup(p, "panels", "Panels", "Panel list of this window", "ui_panel",0,0,0,-1,laget_SavePanel,0,lagetnext_SavePanel,0,0,0,offsetof(laWindow, Panels), 0);
  1703. la_UDFAppendSharedTypePointer("_LA_PROP_PANEL", _LA_PROP_PANEL);
  1704. laAddSubGroup(p, "maximized_block", "Maximized Block", "Maximized block in this window", "ui_block",0,0,0,offsetof(laWindow, MaximizedBlock), 0,0,0,0,0,0,0,LA_UDF_REFER|LA_UDF_IGNORE);
  1705. laAddSubGroup(p, "maximized_ui", "Maximized Ui", "Maximized ui in this window", "ui_item",0,0,0,offsetof(laWindow, MaximizedUi), 0,0,0,0,0,0,0,LA_UDF_REFER|LA_UDF_IGNORE);
  1706. laAddSubGroup(p, "panels_hidden", "Hidden Panels", "Hidden panels of this window", "ui_panel",0,0,0,-1, laget_FirstHiddenPanel, 0,laget_NextHiddenPanel, laset_WindowHiddenPanel, 0,0,0,LA_UDF_IGNORE);
  1707. laAddIntProperty(p, "position", "Position", "The Position Of A SYSWINDOW", 0,"X,Y", "px", 0,0,1, 0,0,offsetof(laWindow, X), 0,0,2, 0,0,0,0,0,0,0,0);
  1708. laAddIntProperty(p, "size", "Size", "The Size Of A SYSWINDOW", 0,"W,H", "px", 0,0,0,0,0,offsetof(laWindow, W), 0,0,2, 0,0,0,0,0,0,0,LA_READ_ONLY);
  1709. laAddIntProperty(p, "client_size", "Client Area Size", "Display Canvans Size Of A SYSWINDOW", 0,"W,H", "px", 0,0,1, 0,0,offsetof(laWindow, CW), 0,0,2, 0,0,0,0,0,0,0,LA_READ_ONLY);
  1710. laAddStringProperty(p, "operator_hints", "Operator Hints", "Operator hints if there's any", LA_WIDGET_STRING_PLAIN, 0,0,0,1, offsetof(laWindow, OperatorHints), 0,0,0,0,LA_READ_ONLY|LA_UDF_IGNORE);
  1711. ep = laAddEnumProperty(p, "output_color_space", "Output Color Space", "Output color space of this window, set this to the monitor's color space to get accurate result", 0,0,0,0,0,offsetof(laWindow, OutputColorSpace), 0,laset_WindowColorSpace, 0,0,0,0,0,0,0,0);{
  1712. laAddEnumItemAs(ep, "SRGB", "sRGB", "Standard sRGB diplay", TNS_COLOR_SPACE_SRGB, 0);
  1713. laAddEnumItemAs(ep, "CLAY", "Clay", "Clay color space (AdobeRGB 1998 compatible)", TNS_COLOR_SPACE_CLAY, 0);
  1714. laAddEnumItemAs(ep, "D65_P3", "D65 P3", "D65 P3 color space", TNS_COLOR_SPACE_D65_P3, 0);
  1715. }
  1716. ep = laAddEnumProperty(p, "output_show_overflow", "Show Overflow", "Show stripes on overflowing colors", LA_WIDGET_ENUM_HIGHLIGHT, 0,0,0,0,offsetof(laWindow, OutputShowStripes), 0,laset_WindowShowStripes, 0,0,0,0,0,0,0,0);{
  1717. laAddEnumItemAs(ep, "NONE", "None", "Don't show overflow", 0,0);
  1718. laAddEnumItemAs(ep, "STRIPES", "Stripes", "Show overflowing colors as stripes", 1, 0);
  1719. }
  1720. ep = laAddEnumProperty(p, "use_composing", "Use Composing", "Compose and adjust window colors, best for outdoor lighting", LA_WIDGET_ENUM_HIGHLIGHT,0,0,0,0,offsetof(laWindow, UseComposing), 0,laset_WindowUseComposing, 0,0,0,0,0,0,0,0);{
  1721. laAddEnumItemAs(ep, "NONE", "None", "Do not use composing", 0, 0);
  1722. laAddEnumItemAs(ep, "SUN", "Sun", "Compose with outdoor sunlight options", 1, 0);
  1723. }
  1724. laAddFloatProperty(p, "composing_gamma", "Composing Gamma", "Composing gamma", 0,0,0,2,0.25,0.05,1.0,0,offsetof(laWindow, ComposingGamma), 0,laset_WindowComposingGamma,0,0,0,0,0,0,0,0,0);
  1725. laAddFloatProperty(p, "composing_blackpoint", "Composing Blackpoint", "Composing blackpoint", 0,0,0,0.5,0,0.05,0.0,0,offsetof(laWindow, ComposingBlackpoint), 0,laset_WindowComposingBlackpoint,0,0,0,0,0,0,0,0,0);
  1726. laAddIntProperty(p, "is_fullscreen", "Is Fullscreen", "Is the window fullscreen", 0,0,0,0,0,0,0,0,offsetof(laWindow, IsFullScreen),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1727. }
  1728. p = laAddPropertyContainer("la_screen","Screen","Screen detected from system",0,0,sizeof(laScreen),0,0,1);{
  1729. laAddStringProperty(p,"name","Name","Name of the screen",LA_WIDGET_STRING_PLAIN,0,0,0,1,offsetof(laScreen,Name),0,0,0,0,LA_READ_ONLY|LA_AS_IDENTIFIER);
  1730. laAddStringProperty(p,"description","Description","Desctiption of this screen",LA_WIDGET_STRING_MONO_PLAIN,0,0,0,1,offsetof(laScreen,Description),0,0,0,0,LA_READ_ONLY);
  1731. ep = laAddEnumProperty(p, "color_space", "Output Color Space", "Hardware color space of this screen ", 0,0,0,0,0,offsetof(laScreen,ColorSpace), 0,laset_ScreenColorSpace, 0,0,0,0,0,0,0,0);{
  1732. laAddEnumItemAs(ep, "SRGB", "sRGB", "Standard sRGB diplay", TNS_COLOR_SPACE_SRGB, 0);
  1733. laAddEnumItemAs(ep, "CLAY", "Clay", "Clay color space (AdobeRGB 1998 compatible)", TNS_COLOR_SPACE_CLAY, 0);
  1734. laAddEnumItemAs(ep, "D65_P3", "D65 P3", "D65 P3 color space", TNS_COLOR_SPACE_D65_P3, 0);
  1735. }
  1736. laAddOperatorProperty(p,"remove","Remove","Remove this screen config","LA_remove_screen_config",0,0);
  1737. }
  1738. // UI LAYOUT ========================================================================================
  1739. p = laAddPropertyContainer("ui_block", "Ui Block", "Property container for single ui block", 0,0, sizeof(laBlock), lapost_Block,0,1);{
  1740. laAddIntProperty(p, "location", "Location", "Block Location", 0,"X,Y", "px", 0,0,1, 0,0,offsetof(laBlock, X), 0,0,2, 0,0,0,0,0,0,0,LA_READ_ONLY);
  1741. laAddIntProperty(p, "size", "Size", "Block Size", 0,"W,H", "px", 0,0,1, 0,0,offsetof(laBlock, W), 0,0,2, 0,0,0,0,0,0,0,LA_READ_ONLY);
  1742. laAddFloatProperty(p, "split_ratio", "Split Ratio", "Split ratio on two subs", 0,0,0,1, 0,0.05, 0.5, 0,offsetof(laBlock, SplitRatio), 0,0,0,0,0,0,0,0,0,0,0);
  1743. laAddIntProperty(p, "vertical", "Vertical", "Is vertival or not", 0,0,0,1, 0,1, 0,0,offsetof(laBlock, Vertical), 0,0,0,0,0,0,0,0,0,0,0);
  1744. laAddSubGroup(p, "panel_list", "Panel List", "Panels Under This Block", "ui_panel",0,0,0,-1, 0,0,0,0,0,0,offsetof(laBlock, Panels), 0);
  1745. laAddSubGroup(p, "current_panel", "Current Panel", "Current Selected Tab Panel", "ui_panel",0,0,0,offsetof(laBlock, CurrentPanel), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1746. laAddSubGroup(p, "sub1", "Sub 1", "Sub Block 1", "ui_block",0,0,0,offsetof(laBlock, B1), 0,0,0,0,0,0,0,LA_UDF_SINGLE);
  1747. laAddSubGroup(p, "sub2", "Sub 2", "Sub Block 2", "ui_block",0,0,0,offsetof(laBlock, B2), 0,0,0,0,0,0,0,LA_UDF_SINGLE);
  1748. laAddSubGroup(p, "parent", "Parent", "Parent block reference", "ui_block",0,0,0,offsetof(laBlock, parent), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1749. laAddOperatorProperty(p, "fold", "Fold", "Fold the title bar", "LA_block_fold_title", 0,0);
  1750. laAddOperatorProperty(p, "maximize", "Maximize", "Maximize the block", "LA_block_maximize", 0,0);
  1751. }
  1752. p = laAddPropertyContainer("ui_layout", "Layout Node", "Property container for single layout", 0,laui_LayoutListItem, sizeof(laLayout), 0,0,1);{
  1753. laAddStringProperty(p, "title", "Title", "The title/name of a panel", 0,0,0,0,1, offsetof(laLayout, ID), 0,0,laset_LayoutTitle,0,LA_AS_IDENTIFIER);
  1754. _LA_PROP_BLOCK = laAddSubGroup(p, "root_block", "Root Block", "Root Block For Panel Docking", "ui_block",0,0,0,offsetof(laLayout, FirstBlock), 0,0,0,0,0,0,0,LA_UDF_SINGLE);
  1755. la_UDFAppendSharedTypePointer("_LA_PROP_BLOCK", _LA_PROP_BLOCK);
  1756. }
  1757. // UI PANEL =========================================================================================
  1758. p = laAddPropertyContainer("ui_panel", "Panel Node", "Property container for general panels", 0,laui_PanelListItem, sizeof(laPanel), lapost_Panel, 0,1);{
  1759. laAddStringProperty(p, "title", "Title", "The title/name of a panel", 0,0,0,0,1, offsetof(laPanel, Title), 0,0,laset_PanelTitle, laread_PanelTitle,LA_AS_IDENTIFIER|LA_TRANSLATE);
  1760. laAddIntProperty(p, "position", "Position", "The Position Of A Panel", 0,"X,Y", "px", 0,0,1, 0,0,offsetof(laPanel, X), 0,0,2, 0,0,0,0,0,0,0,LA_READ_ONLY);
  1761. laAddIntProperty(p, "size", "Size", "The Size Of A Panel", 0,"Width,Height", "px", 0,0,1, 0,0,offsetof(laPanel, W), 0,0,2, 0,0,0,0,0,0,0,LA_READ_ONLY);
  1762. laAddIntProperty(p, "real_xywh", "Real Placemnt", "Placement data in structure", 0,"X,Y,W,H", "px", 0,0,1, 0,0,offsetof(laPanel, TX), 0,0,4, 0,0,0,0,0,0,0,LA_READ_ONLY);
  1763. ep = laAddEnumProperty(p, "snap_enable", "Snap Enable", "Enable Snapping To Edges", 0,"Left,Right,Top,Bottom", 0,0,0,0,0,0,4, 0,laset_PanelSnapEnable, laget_PanelSnapEnable, 0,0,0,0);{
  1764. laAddEnumItem(ep, "no", "No Snap", "Not Snapped to edge", 0);
  1765. laAddEnumItem(ep, "yes", "Snap", "Snapped to edge", U'🞉');
  1766. } //don't swap order with the one below
  1767. laAddIntProperty(p, "snap", "Snap Distance", "Snapping distance to edges", 0,"Left,Right,Top,Bottom", "px", 0,0,1, 0,0,offsetof(laPanel, SL), 0,0,4, 0,laset_PanelSnapDistance, 0,0,0, laread_PanelSnapDistance,0,0);
  1768. laAddIntProperty(p, "show", "Show", "The panel is shown or not", 0,0,0,0,0,1, 0,0,offsetof(laPanel, Show), 0,0,0,0,0,0,0,0,0,0,0);
  1769. laAddIntProperty(p, "mode", "Mode", "Normal/floating/static/modal etc.", 0,0,0,0,0,1, 0,0,offsetof(laPanel, Mode), 0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1770. ep = laAddEnumProperty(p, "is_menu_panel", "Is Menu Panel", "Is menu panel", 0,0,0,0,0,offsetof(laPanel, IsMenuPanel), 0,0,0,0,0,0,0,0,0,0);{
  1771. ep->ElementBytes = 1;
  1772. laAddEnumItem(ep, "false", "False", "Not A Menu Panel", U'🞫');
  1773. laAddEnumItem(ep, "true", "IsTrue", "Is A Menu Panel", U'🗩');
  1774. }
  1775. laAddOperatorProperty(p, "hide", "Hide", "Hide this panel", "LA_hide_panel", U'🗕', 0);
  1776. laAddOperatorProperty(p, "dock", "Dock", "Dock this panel", "LA_dock_panel", U'🗖', 0);
  1777. laAddOperatorProperty(p, "close", "Close", "Close this panel", "LA_block_close_panel", U'🞫', 0);
  1778. //laAddSubGroup(p, "Detached Props", "Detached Props", "detached_prop",0,0,0,0,0,0,0,0,0,0,0,0,offsetof(laPanel, PropLinkContainer->Props), 0);
  1779. laAddSubGroup(p, "uil","Ui List", "Panel Main Ui List", "ui_list",0,0,0,offsetof(laPanel, UI), 0,0,0,0,0,0,0,LA_UDF_IGNORE);
  1780. laAddSubGroup(p, "title_uil","Title Ui List", "Panel Title Ui List", "ui_list",0,0,0, offsetof(laPanel, TitleBar), 0,0,0,0,0,0,0,LA_UDF_IGNORE);
  1781. laAddSubGroup(p, "pp","Prop Pack", "Panel Base With Own Instance", "property_package",0,0,0,offsetof(laPanel, PP), 0,0,0,0,0,0,0,LA_UDF_REFER|LA_UDF_IGNORE);
  1782. laAddSubGroup(p, "fake_pp","Fake Prop Pack", "Fake Prop Pack", "property_package",0,0,0,offsetof(laPanel, PropLinkPP), 0,0,0,0,0,0,0,LA_UDF_REFER|LA_UDF_IGNORE);
  1783. laAddSubGroup(p, "parent_block","Parent Block", "The Block That Directly Links This Panel In", "ui_block",0,0,0,offsetof(laPanel, Block), 0,0,0,0,0,0,0,LA_UDF_REFER|LA_UDF_IGNORE);
  1784. laAddSubGroup(p, "template","Template", "Panel template", "panel_template",0,0,0,offsetof(laPanel, PanelTemplate), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1785. laAddSubGroup(p, "block", "Block", "Block reference of this panel", "ui_block",0,0,0,offsetof(laPanel, Block), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1786. }
  1787. // UI ITEM ==========================================================================================
  1788. p = laAddPropertyContainer("ui_list", "Ui List", "Property container for ui list sub type", U'⮑', 0,sizeof(laUiList), 0,0,0);{
  1789. laAddStringProperty(p, "tab_name", "Tab Name", "The name of a tab", 0,0,0,0,0,0,0,0,0,0,LA_AS_IDENTIFIER);
  1790. _LA_PROP_UI_ITEM = laAddSubGroup(p, "ui_items", "Ui Items", "Ui Items Listed In Ui List", "ui_item",0,0,0,-1, laget_FirstUiItem, 0,laget_ListNext, 0,0,0,offsetof(laUiList, UiItems), 0);
  1791. la_UDFAppendSharedTypePointer("_LA_PROP_UI_ITEM", _LA_PROP_UI_ITEM);
  1792. laAddSubGroup(p, "column_items", "Column Items", "Ui Items Listed In Ui List", "ui_column",0,0,0,-1, laget_FirstColumnItem, 0,0,0,0,0,offsetof(laUiList, Columns), 0);
  1793. laAddIntProperty(p, "pan", "Pan", "Cavans Panning Pixels", 0,"Pan X,Pan Y", "px", 10000,0,1, 0,0,offsetof(laUiList, PanX), 0,0,2, 0,0,0,0,0,0,0,0);
  1794. laAddSubGroup(p, "instance", "Instance", "Collection Instance For Every Item", "ui_instance",0,0,0,offsetof(laUiList, Instance), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1795. laAddIntProperty(p, "height_coeff", "Height Coefficiency", "How many rows a ui should take or reserve", 0,0,"Rows", 0,0,1, 0,0,offsetof(laUiList, HeightCoeff), 0,0,0,0,0,0,0,0,0,0,0)
  1796. ->ElementBytes = 2;
  1797. laAddIntProperty(p, "icon_id", "Icon ID", "Icon id for this ui list", 0,0,"#", 1800,32, 1, 0,0,offsetof(laUiList, IconID), 0,0,0,0,0,0,0,0,0,0,0)
  1798. ->ElementBytes = 2;
  1799. }
  1800. p = laAddPropertyContainer("ui_instance", "Instance", "Uilist instance entry", U'🗇', 0,sizeof(laColumn), 0,0,0);{
  1801. //nothing needed
  1802. }
  1803. p = laAddPropertyContainer("ui_column", "Ui Column", "A column handles the aligning of ui items", U'◫', laui_IdentifierOnly, sizeof(laColumn), 0,0,0);{
  1804. laAddFloatProperty(p, "split_at", "Split At", "Split width percentage from left", 0,0,0,1, 0,0.01, 0.5, 0,0,laget_ColumnSP, laset_ColumnSP, 0,0,0,0,0,0,0,0,LA_UDF_IGNORE);
  1805. laAddFloatProperty(p, "real_split", "Real Split", "Float value split pos in real strucutre", 0,0,0,1, 0,0.01, 0.5, 0,offsetof(laColumn, SP), 0,0,0,0,0,0,0,0,0,0,0);
  1806. laAddIntProperty(p, "snap_width", "Snap Width", "Snap width of a column", 0,0,0,200,20,1, 30,0,0,laget_ColumnSnap, laset_ColumnSnap, 0,0,0,0,0,0,0,0,LA_UDF_IGNORE);
  1807. laAddIntProperty(p, "real_snap", "Real Snap", "Int snap value in real structure", 0,0,0,0,0,0,0,0,offsetof(laColumn, MaxW), 0,0,0,0,0,0,0,0,0,0,0);
  1808. ep = laAddEnumProperty(p, "snap_state", "Sub Snap State", "How to snap sub columns", 0,0,0,0,0,0,laget_SnapState, laset_SnapState, 0,0,0,0,0,0,0,LA_UDF_IGNORE);{
  1809. laAddEnumItem(ep, "none", "None", "No Snapping", 0);
  1810. laAddEnumItem(ep, "left", "Left", "Snap At Left", U'⮄');
  1811. laAddEnumItem(ep, "right", "Right", "Snap At Right", U'⮆');
  1812. }
  1813. laAddSubGroup(p, "left", "Left Sub Column", "Left Sub Column", "ui_column",0,0,0,offsetof(laColumn, LS), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1814. laAddSubGroup(p, "right", "Right Sub Column", "Right Sub Column", "ui_column",0,0,0,offsetof(laColumn, RS), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1815. laAddSubGroup(p, "self", "Self", "Self Display", "ui_column",0,LA_WIDGET_COLUMN_VIEWER, 0,-1, laget_Self, 0,0,0,0,0,0,LA_UDF_REFER | LA_AS_IDENTIFIER);
  1816. }
  1817. p = laAddPropertyContainer("panel_template", "Panel Template", "Panel template for creating new panels", 0,0,sizeof(laUiTemplate), 0,0,0);{
  1818. laAddStringProperty(p, "identifier", "Identifier", "Identifier of this template", 0,0,0,0,1, offsetof(laUiTemplate, Identifier), 0,0,0,0,LA_AS_IDENTIFIER);
  1819. laAddStringProperty(p, "title", "Title", "Panel title", 0,0,0,0,1, offsetof(laUiTemplate, Title), 0,0,0,0,LA_TRANSLATE);
  1820. laAddIntProperty(p, "define_func", "Define Func", "Define function distinguish(internal only)", 0,0,0,0,0,0,0,0,offsetof(laUiTemplate, Define), 0,0,0,0,0,0,0,0,0,0,LA_UDF_IGNORE|LA_READ_ONLY);
  1821. }
  1822. p = laAddPropertyContainer("ui_item", "Ui Item", "Property container for ui items", 0,0,sizeof(laUiItem), lapost_UiItem, lapostim_UiItem, 0);{
  1823. laAddIntProperty(p, "location", "Location", "The Ui's Location In A UiList(Prop For Live Edit Only)", 0,"Up", "Down", 0,0,1, 0,0,0,0,0,0,0,0,0,0,0,0,0,LA_AS_IDENTIFIER);
  1824. laAddIntProperty(p, "state", "State", "The ui's internal state", 0,0,0,0,0,1, 0,0,offsetof(laUiItem, State), 0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1825. laAddIntProperty(p, "column_layout", "Column Layout", "The ui's column layout", 0,0,0,10,-10,1, 0,0,offsetof(laUiItem, SymbolID), 0,0,0,0,0,0,0,0,0,0,0)
  1826. ->ElementBytes = sizeof(short);
  1827. laAddStringProperty(p, "path", "Path", "Data path", 0,0,0,0,0,0,0,laget_UiDataPath, 0,laread_UiDataPath,LA_READ_ONLY);
  1828. laAddStringProperty(p, "actuator_id", "Operator ID", "Pure operator with no 'this' pointer", 0,0,0,0,0,0,0,laget_UiOperatorID, 0,laread_UiOperatorID,LA_READ_ONLY);
  1829. laAddSubGroup(p, "pp", "Prop Pack", "Property Package In ui->PP Entry", "property_package",0,0,0,offsetof(laUiItem, PP), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1830. laAddSubGroup(p, "extra_pp", "Extra Prop Pack", "Property Package In ui->ExtraPP Entry", "property_package",0,0,0,offsetof(laUiItem, ExtraPP), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1831. laAddSubGroup(p, "go", "Prop Step Go", "Go Entry (For Determin If This Is A Prop Or Not)", "property_step",0,0,0,offsetof(laUiItem, PP.Go), 0,0,0,0,0,0,0,LA_UDF_REFER | LA_UDF_IGNORE);
  1832. laAddSubGroup(p, "raw_this", "Prop Raw This", "ui->PP.RawThis Entry", "property_package",0,0,0,offsetof(laUiItem, PP.RawThis), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1833. laAddSubGroup(p, "current_page", "Current Page", "Current Page In Sub Ui List", "ui_list",0,0,0,offsetof(laUiItem, Page), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1834. laAddSubGroup(p, "internal_type", "Ui Internal Type", "Ui Internal Type", "ui_type",0,0,0,offsetof(laUiItem, Type), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1835. laAddSubGroup(p, "on_column", "On Column", "Ui On Which Column", "ui_column",0,0,0,offsetof(laUiItem, C), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1836. laAddSubGroup(p, "sub", "Sub UI", "Sub Ui Lists For Tabs And Collection", "ui_list",0,0,0,-1, 0,0,0,0,0,0,offsetof(laUiItem, Subs), 0);
  1837. laAddStringProperty(p, "extra_args", "Extra Arguments", "Extra arguments for this ui item", 0,0,0,0,0,0,0,0,0,0,0);
  1838. laAddStringProperty(p, "display", "Display", "Display string for label", 0,0,0,0,0,0,0,0,0,0,0);
  1839. laAddOperatorProperty(p, "maximize", "Maximize", "Maximize this UI item", "LA_canvas_ui_maximize", 0,0);
  1840. }
  1841. p = laAddPropertyContainer("ui_type", "Ui Type", "Ui type descriptor", 0,laui_IdentifierOnly, sizeof(laUiType), 0,0,0);{
  1842. laAddStringProperty(p, "identifier", "Identifier", "Identifier of this ui type", 0,0,0,0,0,offsetof(laUiType, Identifier), 0,0,0,0,LA_AS_IDENTIFIER|LA_READ_ONLY);
  1843. }
  1844. // NODE ================================================================================================
  1845. p = laAddPropertyContainer("la_out_socket", "Output Socket", "Output socket for nodes", 0,0,sizeof(laNodeOutSocket), 0,0,1);{
  1846. laAddStringProperty(p, "label", "Label", "Socket's label", 0,0,0,0,1, offsetof(laNodeOutSocket, Label), 0,0,0,0,LA_AS_IDENTIFIER);
  1847. laAddIntProperty(p, "data_type", "Data type", "User defined data type", 0,0,0,0,0,0,0,0,offsetof(laNodeOutSocket, DataType), 0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1848. laAddIntProperty(p, "array_length", "Array Length", "Array length of data", 0,0,0,0,0,0,0,0,offsetof(laNodeOutSocket, ArrLen), 0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1849. laAddSubGroup(p, "parent", "Parent", "Parent node", "la_base_node",0,0,0,offsetof(laNodeOutSocket, Parent), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1850. } LA_PC_SOCKET_OUT = p;
  1851. p = laAddPropertyContainer("la_in_socket", "Input Socket", "Input socket for nodest", 0,0,sizeof(laNodeInSocket), 0,0,1);{
  1852. laAddStringProperty(p, "label", "Label", "Socket's label", 0,0,0,0,1, offsetof(laNodeInSocket, Label), 0,0,0,0,LA_AS_IDENTIFIER);
  1853. sp=laAddSubGroup(p, "source", "Source", "Source socket", "la_out_socket",0,0,offsetof(laNodeInSocket, Source), 0,0,0,0,0,0,0,0,LA_UDF_REFER);
  1854. LA_PROP_SOCKET_SOURCE=sp;
  1855. laAddIntProperty(p, "data_type", "Data type", "User defined data type", 0,0,0,0,0,0,0,0,offsetof(laNodeInSocket, DataType), 0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1856. laAddIntProperty(p, "color_id", "Color ID", "Color id of the source wire", 0,0,0,0,0,0,0,0,offsetof(laNodeInSocket, ColorId), 0,0,0,0,0,0,0,0,0,0,0);
  1857. laAddIntProperty(p, "array_length", "Array Length", "Array length of data", 0,0,0,0,0,0,0,0,offsetof(laNodeInSocket, ArrLen), 0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1858. } LA_PC_SOCKET_IN = p;
  1859. laPropContainerExtraFunctions(p,0,0,latouched_NodeInSocket,0,0);
  1860. p = laAddPropertyContainer("la_value_mapper", "Value Mapper", "Value mapper", 0,0,sizeof(laValueMapper), 0,0,1);{
  1861. laAddSubGroup(p, "points", "Points", "Points inside the mapper", "la_value_mapper_point",0,0,-1, 0,0,0,0,0,0,0,offsetof(laValueMapper, Points), 0);
  1862. laAddFloatProperty(p, "in_range", "Input Range", "Input range from 0 to 1", 0,"Min,Max", 0,0,0,0,0,0,offsetof(laValueMapper, InRange), 0,0,2, 0,0,0,0,0,0,0,0);
  1863. laAddFloatProperty(p, "out_range", "Output Range", "Output range from 0 to 1", 0,"Min,Max", 0,0,0,0,0,0,offsetof(laValueMapper, OutRange), 0,0,2, 0,0,0,0,0,0,0,0);
  1864. } LA_PC_MAPPER=p;
  1865. p = laAddPropertyContainer("la_value_mapper_point", "Value Mapper", "Value mapper", 0,0,sizeof(laValueMapperPoint), 0,0,1);{
  1866. laAddFloatProperty(p, "position", "Position", "XY Position ranging from 0 to 1", 0,"X,Y", 0,0,0,0,0,0,offsetof(laValueMapperPoint, x), 0,0,2, 0,0,0,0,0,0,0,0);
  1867. }
  1868. // PROPERTIES ==========================================================================================
  1869. p = laAddPropertyContainer("property_item", "Property Item", "Property item for data types like int/float/enum/string/subtype", U'🔌', 0,sizeof(laProp), 0,0,1);{
  1870. laAddStringProperty(p, "identifier", "Identifier", "Property unique identifier", LA_WIDGET_STRING_PLAIN, 0,0,0,0,0,0,laget_PropertyIdentifier, 0,0,LA_AS_IDENTIFIER|LA_READ_ONLY);
  1871. laAddStringProperty(p, "name", "Name", "Property display name", 0,0,0,0,0,offsetof(laProp, Name), 0,0,0,0,LA_READ_ONLY);
  1872. laAddStringProperty(p, "description", "Description", "Property description", 0,0,0,0,0,offsetof(laProp, Description), 0,0,0,0,LA_READ_ONLY);
  1873. laAddIntProperty(p, "prop_type", "Property Type", "Property type(like int/float/enunm/sub)", 0,0,0,0,0,0,0,0,offsetof(laProp, PropertyType), 0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1874. laAddIntProperty(p, "icon_id", "Icon Id", "Icon id for current container", 0,0,0,0,0,0,0,0,offsetof(laProp, IconID), 0,0,0,0,0,0,0,0,0,0,0);
  1875. laAddIntProperty(p, "sub_icon_id", "Icon Id", "Icon id for current container", 0,0,0,0,0,0,0,0,0,laget_PropertySubContainerIconID, 0,0,0,0,0,0,0,0,0,0);
  1876. laAddSubGroup(p, "sub", "Sub Type", "Sub Type Property Container", "property_container",0,0,0,offsetof(laProp, SubProp), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1877. }
  1878. p = laAddPropertyContainer("property_container", "Property Container", "Property container for some property items", U'🔌', 0,sizeof(laPropContainer), 0,0,1);{
  1879. laAddStringProperty(p, "identifier", "Identifier", "Property unique identifier", LA_WIDGET_STRING_PLAIN, 0,0,0,0,offsetof(laPropContainer, Identifier), 0,0,0,0,LA_AS_IDENTIFIER | LA_UDF_IGNORE|LA_READ_ONLY);
  1880. laAddStringProperty(p, "name", "Name", "Property display name", 0,0,0,0,0,offsetof(laPropContainer, Name), 0,0,0,0,LA_UDF_IGNORE|LA_READ_ONLY);
  1881. laAddStringProperty(p, "description", "Description", "Property description", 0,0,0,0,0,offsetof(laPropContainer, Name), 0,0,0,0,LA_UDF_IGNORE|LA_READ_ONLY);
  1882. laAddIntProperty(p, "icon_id", "Icon Id", "Icon id for current container", 0,0,0,0,0,0,0,0,offsetof(laPropContainer, IconID), 0,0,0,0,0,0,0,0,0,0,0);
  1883. laAddSubGroup(p, "properties", "Properties", "Single Property", "property_item", laget_PropertyNodeType, 0,0,-1, laget_PropertyItemFirst, laget_PropertyItemFirst, laget_PropertyItemNext, 0,0,0,0,LA_UDF_IGNORE);
  1884. _LA_PROP_FAILED_ITEM = laAddSubGroup(p, "failed_nodes", "Failed Nodes", "Used To Store UDF Failed Nodes", "property_trash_item",0,0,0,-1, 0,0,0,0,0,0,offsetof(laPropContainer, FailedNodes), LA_UDF_IGNORE);
  1885. _LA_PROP_TRASH_ITEM = laAddSubGroup(p, "trash_bin", "Trash Bin", "Used To Store Unlinked Items", "property_trash_item",0,0,0,-1, 0,0,0,0,0,0,offsetof(laPropContainer, TrashBin), LA_UDF_IGNORE);
  1886. laAddOperatorProperty(p, "restore_all", "Restore All", "Restore All Trash Items Or Failed Nodes To A User Selected Linkage", "LA_sub_restore_data_block", U'⭯', 0);
  1887. }
  1888. p = laAddPropertyContainer("property_trash_item", "Trash Item", "Single trash item", 0,0,0,0,0,0);{
  1889. laAddIntProperty(p, "instance_int", "Instance", "Memory address of this data block (int represent)", 0,0,0,0,0,0,0,0,0,laget_TrashItemInstance, 0,0,0,0,0,0,0,0,0,LA_AS_IDENTIFIER|LA_READ_ONLY);
  1890. laAddSubGroup(p, "instance", "Instance", "Single Memory Address Of This Data Block", "property_trash_item",0,0,0,-1, 0,laget_TrashItemInstance, 0,0,0,0,0,LA_UDF_REFER | LA_UDF_IGNORE);
  1891. laAddOperatorProperty(p, "restore", "Restore", "Restore Data Block To A User Selected Linkage", "LA_sub_restore_data_block", U'⭯', 0);
  1892. }
  1893. p = laAddPropertyContainer("property_package", "Property Package", "Property package for data access (mainly ui)", U'🔌', 0,sizeof(laPropPack), 0,0,0);{
  1894. laAddSubGroup(p, "last_step", "Last Step", "Last Prop Step(Segment)", "property_step",0,0,0,offsetof(laPropPack, LastPs), 0,0,0,0,0,0,0,LA_UDF_REFER | LA_UDF_IGNORE);
  1895. }
  1896. p = laAddPropertyContainer("property_step", "Property Step", "Property segment item", 0,0,sizeof(laPropStep), 0,0,0);{
  1897. laAddSubGroup(p, "property", "Property", "Property Reference", "property_item",0,0,0,offsetof(laPropStep, p), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1898. }
  1899. p = laAddPropertyContainer("detached_prop", "Detached Prop", "Detached prop", U'🔌', 0,sizeof(laSubProp) + 48, lapost_DetachedProp, 0,0);{
  1900. laAddSubGroup(p, "raw_this", "Raw This", "Raw This Pointer", "property_package",0,0,0,offsetof(laProp, DetachedPP.RawThis), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1901. laAddStringProperty(p, "path", "Path", "Data path", 0,0,0,0,0,0,0,laget_DetachedPropPath, 0,laread_DetachedPropPath, 0);
  1902. laAddStringProperty(p, "rename", "Rename", "Rename", 0,0,0,0,0,offsetof(laProp, Identifier), 0,0,0,laread_DetachedPropRename, 0);
  1903. }
  1904. p = laAddPropertyContainer("la_animation", "Animation", "Animation data",0,0,sizeof(laAnimation),0,0,1);{
  1905. sp = laAddSubGroup(p, "action_holders", "Action Holders", "All action holders","la_animation_action_holder",0,0,0,-1,0,0,0,0,0,0,offsetof(laAnimation,ActionHolders),LA_UDF_IGNORE);
  1906. laSubGroupExtraFunctions(sp,0,0,0,0,laget_AnimationActionHolderCategory);
  1907. laAddSubGroup(p, "current_action", "Current Action", "Current action","la_animation_action",0,0,0,offsetof(laAnimation,CurrentAction),0,0,0,0,0,0,0,LA_UDF_REFER|LA_READ_ONLY);
  1908. laAddFloatProperty(p, "play_head","Play Head","Animation viewer global playhead",0,0,"s",0,0,0.01,0,0,offsetof(laAnimation,PlayHead),0,laset_AnimationPlayHead,0,0,0,0,0,0,0,0,0);
  1909. ep=laAddEnumProperty(p, "play_status", "Play Status", "Animation viewer global play status", 0,0,0,0,0,offsetof(laAnimation, PlayStatus),0,0,0,0,0,0,0,0,0,0);
  1910. laAddEnumItemAs(ep, "PAUSED", "Paused", "Animation is playing", LA_ANIMATION_STATUS_PAUSED, U'⏸');
  1911. laAddEnumItemAs(ep, "PLAY_FWD", "Playing", "File data is untouched", LA_ANIMATION_STATUS_PLAY_FWD,U'▶');
  1912. laAddEnumItemAs(ep, "PLAY_REV", "Reversing", "File data is untouched", LA_ANIMATION_STATUS_PLAY_REV,U'◀');
  1913. }
  1914. p = laAddPropertyContainer("la_animation_action", "Action", "Animation action",0,0,sizeof(laAction),0,0,1);{
  1915. laAddStringProperty(p,"name","Name","Name of the action",0,0,0,0,1,offsetof(laAction,Name),0,0,0,0,LA_AS_IDENTIFIER);
  1916. laAddStringProperty(p,"container","Container","Container of the action parent",0,0,0,0,0,0,0,laget_ActionContainer,0,laread_ActionContainer,LA_READ_ONLY);
  1917. laAddSubGroup(p, "holder", "Holder", "Holder data block", "any_pointer",0,0,0,offsetof(laAction, HolderInstance), 0,0,0,0,0,0,0,LA_UDF_REFER|LA_READ_ONLY);
  1918. laAddSubGroup(p, "holder_h2", "Holder H2", "Holder data block (hyper 2)", "any_pointer_h2",0,0,0,offsetof(laAction, HolderInstance), 0,0,0,0,0,0,0,LA_UDF_REFER|LA_READ_ONLY);
  1919. laAddSubGroup(p, "channels", "Channels", "Action channels", "la_animation_channel",0,0,0,-1,0,0,0,0,0,0,offsetof(laAction, Channels),0);
  1920. laAddFloatProperty(p, "length","Length","Length of the action in seconds",0,0,"s",30,0,0.1,2,0,offsetof(laAction,Length),0,0,0,0,0,0,0,0,0,0,0);
  1921. laAddFloatProperty(p, "play_head","Play Head","Play head position",0,0,0,1.0,0,0.01,0,0,offsetof(laAction,PlayHead),0,0,0,0,0,0,0,0,0,0,0);
  1922. laAddFloatProperty(p, "offset","Offset","Play head offset from global timing",0,0,0,1.0,0,0.01,0,0,offsetof(laAction,Offset),0,0,0,0,0,0,0,0,0,0,0);
  1923. laAddIntProperty(p, "frame_count","Frame Count","Total frame count in the whole length of the action",0,0,0,960,1,0,24,0,offsetof(laAction,FrameCount),0,0,0,0,0,0,0,0,0,0,0);
  1924. laAddIntProperty(p, "current_frame","Current Frame","Current frame in this action",0,0,0,0,0,0,0,0,0,laget_AnimationActionCurrentFrame,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1925. ep = laAddEnumProperty(p, "mute", "Mute", "Mute this action", 0,0,0,0,0,offsetof(laAction, Mute),0,0,0,0,0,0,0,0,0,0);{
  1926. laAddEnumItemAs(ep, "NONE", "None", "Not muted", 0,0);
  1927. laAddEnumItemAs(ep, "MUTE", "Mute", "Muted", 1,0);
  1928. }
  1929. ep = laAddEnumProperty(p, "solo", "Solo", "Solo play this action", 0,0,0,0,0,offsetof(laAction, Solo),0,0,0,0,0,0,0,0,0,0);{
  1930. laAddEnumItemAs(ep, "NONE", "None", "Play this action with", 0,0);
  1931. laAddEnumItemAs(ep, "SOLO", "Solo", "Solo play", 1,0);
  1932. }
  1933. ep = laAddEnumProperty(p, "play_by_default", "Auto Play", "Automatically play this animation when player starts", 0,0,0,0,0,offsetof(laAction, PlayByDefault),0,0,0,0,0,0,0,0,0,0);{
  1934. laAddEnumItemAs(ep, "NONE", "Stop", "Player initialize the animation in stopped state", 0,0);
  1935. laAddEnumItemAs(ep, "PLAY", "Play", "Animation automatically plays when player starts", 1,0);
  1936. }
  1937. ep = laAddEnumProperty(p, "play_mode", "Play Mode", "How to play this action", 0,0,0,0,0,offsetof(laAction, PlayMode),0,0,0,0,0,0,0,0,0,0);{
  1938. laAddEnumItemAs(ep, "REPEAT", "Repeat", "Play action in repeat", LA_ANIMATION_PLAY_MODE_REPEAT, U'⮆');
  1939. laAddEnumItemAs(ep, "HOLD", "Hold", "Hold end values when time is outside time range", LA_ANIMATION_PLAY_MODE_HOLD,U'⭲');
  1940. laAddEnumItemAs(ep, "BOUNCE", "Bounce", "Play action back and forth", LA_ANIMATION_PLAY_MODE_BOUNCE,U'⮀');
  1941. }
  1942. ep = laAddEnumProperty(p, "mix_mode", "Mix", "How this action is mixed with existing ones", 0,0,0,0,0,offsetof(laAction, MixMode),0,0,0,0,0,0,0,0,0,0);{
  1943. laAddEnumItemAs(ep, "REPLACE", "Replace", "Replace previously set values", LA_ANIMATION_MIX_REPLACE,0);
  1944. laAddEnumItemAs(ep, "ADD", "Add", "Add on top of previously set values", LA_ANIMATION_MIX_ADD,0);
  1945. }
  1946. laAddOperatorProperty(p,"remove","Remove","Remove this action","LA_animation_remove_action",L'🞫',0);
  1947. }
  1948. p = laAddPropertyContainer("la_animation_channel", "Channel", "Action channel",0,0,sizeof(laActionChannel),0,0,1);{
  1949. laAddSubGroup(p, "keys", "Keys", "Key Frames", "la_animation_key",0,0,0,-1,0,0,0,0,0,0,offsetof(laActionChannel, Keys),0);
  1950. laAddSubGroup(p, "ap", "Animation Property", "Animation property reference", "la_animation_prop",0,0,0,offsetof(laActionChannel, AP), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1951. }
  1952. p = laAddPropertyContainer("la_animation_prop", "Property", "Animation property",0,0,sizeof(laActionProp),0,0,1);{
  1953. laAddIntProperty(p, "data_size","Data Size","Data size of the channel",0,0,0,0,0,0,0,0,offsetof(laActionProp,DataSize),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1954. laAddStringProperty(p,"prop_str","Property String","Property of this channel",0,0,0,0,0,0,0,laget_AnimationPropStr,0,laread_AnimationPropStr,LA_READ_ONLY);
  1955. laAddStringProperty(p,"cached_str","Cached String","Property name of this channel",0,0,0,0,1,offsetof(laActionProp,CachedName),0,0,0,0,LA_READ_ONLY|LA_AS_IDENTIFIER);
  1956. laAddSubGroup(p, "for", "For", "Target data block", "any_pointer",0,0,0,offsetof(laActionProp, For), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1957. laAddSubGroup(p, "for_h2", "For H2", "Target data block (hyper 2)", "any_pointer_h2",0,0,0,offsetof(laActionProp, For), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1958. }
  1959. p = laAddPropertyContainer("la_animation_key", "key", "Action channel",0,0,sizeof(laActionKey),0,0,1);{
  1960. laAddIntProperty(p, "at","At","Frame number of this key frame",0,0,0,0,0,0,0,0,offsetof(laActionKey,At),0,0,0,0,0,0,0,0,0,0,0);
  1961. laAddRawProperty(p,"data","Data","Data of this key frame",0,0,lagetraw_ActionKeyData,lasetraw_ActionKeyData,0);
  1962. }
  1963. p = laAddPropertyContainer("la_animation_action_holder", "Action Holder", "Action holder",0,0,sizeof(laActionHolder),0,0,1);{
  1964. laAddStringProperty(p,"name","Name","Name of the action",0,0,0,0,1,offsetof(laActionHolder,Name),0,0,0,0,LA_AS_IDENTIFIER);
  1965. laAddIntProperty(p,"action_offset","Action Offset","List handle offset of the action list in the instance",0,0,0,0,0,0,0,0,offsetof(laActionHolder,ActionOffset),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1966. laAddIntProperty(p,"prop_offset","Prop Offset","List handle offset of the property list in the instance",0,0,0,0,0,0,0,0,offsetof(laActionHolder,PropOffset),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1967. }
  1968. }
  1969. la_RegisterTNSProps();
  1970. }
  1971. void la_RegisterDefaultSignals(){
  1972. laNewCustomSignal("la.new",LA_SIGNAL_NEW);
  1973. laNewCustomSignal("la.delete",LA_SIGNAL_DELETE);
  1974. laNewCustomSignal("la.confirm",LA_SIGNAL_CONFIRM);
  1975. laNewCustomSignal("la.undo",LA_SIGNAL_UNDO);
  1976. laNewCustomSignal("la.redo",LA_SIGNAL_REDO);
  1977. laNewCustomSignal("la.open",LA_SIGNAL_OPEN);
  1978. laNewCustomSignal("la.save",LA_SIGNAL_SAVE);
  1979. laNewCustomSignal("la.save_as",LA_SIGNAL_SAVE_AS);
  1980. laNewCustomSignal("la.layout_next",LA_SIGNAL_LAYOUT_NEXT);
  1981. laNewCustomSignal("la.layout_prev",LA_SIGNAL_LAYOUT_PREV);
  1982. laNewCustomSignal("la.fullscreen",LA_SIGNAL_FULLSCREEN);
  1983. laInputMapping* im=laNewInputMapping("Default");
  1984. laNewInputMappingEntryP(im,LA_INPUT_DEVICE_KEYBOARD,0,"z",LA_KEY_CTRL,LA_SIGNAL_UNDO);
  1985. laNewInputMappingEntryP(im,LA_INPUT_DEVICE_KEYBOARD,0,"z",LA_KEY_CTRL|LA_KEY_SHIFT,LA_SIGNAL_REDO);
  1986. laNewInputMappingEntryP(im,LA_INPUT_DEVICE_KEYBOARD,0,"o",LA_KEY_CTRL,LA_SIGNAL_OPEN);
  1987. laNewInputMappingEntryP(im,LA_INPUT_DEVICE_KEYBOARD,0,"s",LA_KEY_CTRL,LA_SIGNAL_SAVE);
  1988. laNewInputMappingEntryP(im,LA_INPUT_DEVICE_KEYBOARD,0,"s",LA_KEY_CTRL|LA_KEY_SHIFT,LA_SIGNAL_SAVE_AS);
  1989. laNewInputMappingEntryP(im,LA_INPUT_DEVICE_KEYBOARD,0,"Right",LA_KEY_CTRL,LA_SIGNAL_LAYOUT_NEXT);
  1990. laNewInputMappingEntryP(im,LA_INPUT_DEVICE_KEYBOARD,0,"Left",LA_KEY_CTRL,LA_SIGNAL_LAYOUT_PREV);
  1991. laNewInputMappingEntryP(im,LA_INPUT_DEVICE_KEYBOARD,0,"F11",0,LA_SIGNAL_FULLSCREEN);
  1992. laNewInputMappingEntryP(im,LA_INPUT_DEVICE_KEYBOARD,0,"a",LA_KEY_SHIFT,"la.new");
  1993. laNewInputMappingEntryP(im,LA_INPUT_DEVICE_KEYBOARD,0,"x",0,"la.delete");
  1994. }