*/}}
1
0

la_properties.c 141 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993
  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_ThemeInactiveSaturation(laTheme* t, real a){
  53. t->InactiveSaturation=a;
  54. la_RefreshThemeColor(t);
  55. laRedrawAllWindows();
  56. }
  57. void laset_ThemeInactiveMix(laTheme* t, real a){
  58. t->InactiveMix=a;
  59. la_RefreshThemeColor(t);
  60. laRedrawAllWindows();
  61. }
  62. void laset_ThemeCursorAlpha(laTheme* t, real a){
  63. t->CursorAlpha=a;
  64. la_RefreshThemeColorSelf(t);
  65. laRedrawAllWindows();
  66. }
  67. void laset_ThemeSelectionAlpha(laTheme* t, real a){
  68. t->SelectionAlpha=a;
  69. la_RefreshThemeColorSelf(t);
  70. laRedrawAllWindows();
  71. }
  72. void laset_ThemeNormal(laBoxedTheme* bt, real val){
  73. bt->NormalY=val;
  74. la_RefreshBoxedThemeColor(bt);
  75. laRedrawAllWindows();
  76. }
  77. void laset_ThemeActive(laBoxedTheme* bt, real val){
  78. bt->ActiveY=val;
  79. la_RefreshBoxedThemeColor(bt);
  80. laRedrawAllWindows();
  81. }
  82. void laset_ThemeBorder(laBoxedTheme* bt, real val){
  83. bt->BorderY=val;
  84. la_RefreshBoxedThemeColor(bt);
  85. laRedrawAllWindows();
  86. }
  87. void laset_ThemeText(laBoxedTheme* bt, real val){
  88. bt->TextY=val;
  89. la_RefreshBoxedThemeColor(bt);
  90. laRedrawAllWindows();
  91. }
  92. void laset_ThemeTextActive(laBoxedTheme* bt, real val){
  93. bt->TextActiveY=val;
  94. la_RefreshBoxedThemeColor(bt);
  95. laRedrawAllWindows();
  96. }
  97. void laset_ThemeAlpha(laBoxedTheme* bt, real val){
  98. bt->Alpha=val;
  99. la_RefreshBoxedThemeColor(bt);
  100. laRedrawAllWindows();
  101. }
  102. void laset_ThemeMargins(laBoxedTheme* bt, int index, int val){
  103. bt->Margins[index]=val;
  104. la_RefreshBoxedThemeColor(bt);
  105. laRedrawAllWindows();
  106. }
  107. void laset_ThemePaddings(laBoxedTheme* bt, int index, int val){
  108. bt->Paddings[index]=val;
  109. la_RefreshBoxedThemeColor(bt);
  110. laRedrawAllWindows();
  111. }
  112. void laset_ThemeWireTransparency(laTheme* t, real val){ t->WireTransparency = val; la_RegenerateWireColors(); laRedrawAllWindows(); }
  113. void laset_ThemeWireBrightness(laTheme* t, real val){ t->WireBrightness = val; la_RegenerateWireColors(); laRedrawAllWindows(); }
  114. void laset_ThemeWireSaturation(laTheme* t, real val){ t->WireSaturation = val; la_RegenerateWireColors(); laRedrawAllWindows(); }
  115. void laset_ThemeEdgeTransparency(laTheme* t, real val){ t->EdgeTransparency = val; la_RefreshThemeColorSelf(t); laRedrawAllWindows(); }
  116. void laset_ThemeEdgeBrightness(laTheme* t, real val){ t->EdgeBrightness = val; la_RefreshThemeColorSelf(t); laRedrawAllWindows(); }
  117. void laset_ThemeVertexTransparency(laTheme* t, real val){ t->VertexTransparency = val; la_RefreshThemeColorSelf(t); laRedrawAllWindows(); }
  118. void laset_ThemeVertexBrightness(laTheme* t, real val){ t->VertexBrightness = val; la_RefreshThemeColorSelf(t); laRedrawAllWindows(); }
  119. void laset_ThemeSVertexTransparency(laTheme* t, real val){ t->SelectedVertexTransparency = val; la_RefreshThemeColorSelf(t); laRedrawAllWindows(); }
  120. void laset_ThemeSEdgeTransparency(laTheme* t, real val){ t->SelectedEdgeTransparency = val; la_RefreshThemeColorSelf(t); laRedrawAllWindows(); }
  121. void laset_ThemeSFaceTransparency(laTheme* t, real val){ t->SelectedFaceTransparency = val; la_RefreshThemeColorSelf(t); laRedrawAllWindows(); }
  122. void laread_UsingTheme(void* unused, char* name){ laTheme* t=laGetTheme(name); if(t){ laset_ActiveTheme(0,t); } }
  123. void laget_UsingTheme(void* unused, char* result, char**result_direct){ laTheme* t=laget_ActiveTheme(0);
  124. if(t&&t->Name&&t->Name->Ptr){ *result_direct=t->Name->Ptr; return; } *result_direct="NOT FOUND";
  125. }
  126. void laset_WireColorSlices(void* unused, int val){ MAIN.WireColorSlices = val; la_RegenerateWireColors(); laRedrawAllWindows(); }
  127. void laset_WireThickness(void* unused, real val){ MAIN.WireThickness = val;laRedrawAllWindows(); }
  128. void laset_WireSaggyness(void* unused, real val){ MAIN.WireSaggyness = val; laRedrawAllWindows(); }
  129. void* laget_DetachedControllerFirst(void* unused,void* unused2){
  130. return MAIN.Controllers.pFirst;
  131. }
  132. extern tnsFontManager* FM;
  133. void laset_UiRowHeight(void* unused, int val){
  134. MAIN.UiRowHeight = val;
  135. MAIN.ScaledUiRowHeight=MAIN.UiRowHeight;
  136. la_RefreshThemeColor(MAIN.CurrentTheme);
  137. tfntResizeFontTexture(FM->UsingFont, TNS_FONT_BUFFER_W_DEFAULT);
  138. tnsInvalidateFontCache();
  139. laRedrawAllWindows();
  140. }
  141. void laset_FontSize(void* unused, real val){
  142. MAIN.FontSize = val;
  143. MAIN.ScaledUiRowHeight=MAIN.UiRowHeight;
  144. tnsInvalidateFontCache();
  145. tfntResizeFontTexture(FM->UsingFont, TNS_FONT_BUFFER_W_DEFAULT);
  146. laRedrawAllWindows();
  147. }
  148. void laset_MarginSize(void* unused, real val){
  149. MAIN.MarginSize = val;
  150. la_RefreshThemeColor(MAIN.CurrentTheme);
  151. laRedrawAllWindows();
  152. }
  153. void laset_ResourcePath(laResourceFolder *rf, char *content){
  154. strSafeSet(&rf->Path, content);
  155. laRefreshUDFRegistries();
  156. }
  157. void *laget_Self(void *p, void *UNUSED){
  158. return p;
  159. }
  160. void *laget_ListNext(laListItem *Item, void *UNUSED){
  161. return Item->pNext;
  162. }
  163. void *laget_ListPrev(laListItem *Item, void *UNUSED){
  164. return Item->pPrev;
  165. }
  166. void *laget_List2Next(laListItem2 *Item, void *UNUSED){
  167. return Item->pNext;
  168. }
  169. void *laget_List2Prev(laListItem2 *Item, void *UNUSED){
  170. return Item->pPrev;
  171. }
  172. void *laget_PointerListNext(void *UNUSED, laPropIterator *pi){
  173. pi->Linker = ((laListItemPointer *)pi->Linker)->pNext;
  174. return pi->Linker->p;
  175. }
  176. void *laget_FirstUiItem(laUiList *uil, void *UNUSED){
  177. return uil->UiItems.pFirst;
  178. }
  179. void *laget_FirstColumnItem(laUiList *uil, void *UNUSED){
  180. if (!uil) return 0;
  181. return uil->Columns.pFirst;
  182. }
  183. int la_ResetUiColum(laColumn *c, int U, int L, int R, int LR, int repos);
  184. void laset_ColumnSP(laColumn *c, real val){
  185. if (c->LS) c->LS->SP = val;
  186. if (c->RS) c->RS->SP = val;
  187. }
  188. real laget_ColumnSP(laColumn *c){
  189. if (c->LS) return c->LS->SP;
  190. else
  191. return 0.5;
  192. }
  193. void laset_ColumnSnap(laColumn *c, int val){
  194. if (c->LS && c->LS->MaxW) c->LS->MaxW = val;
  195. if (c->RS && c->RS->MaxW) c->RS->MaxW = val;
  196. }
  197. int laget_ColumnSnap(laColumn *c){
  198. if (c->LS && c->LS->MaxW) return c->LS->MaxW;
  199. if (c->RS && c->RS->MaxW) return c->RS->MaxW;
  200. return 20;
  201. }
  202. void laset_SnapState(laColumn *c, int val){
  203. if (val == 1){
  204. if (c->LS) c->LS->MaxW = 20;
  205. if (c->RS) c->RS->MaxW = 0;
  206. }elif (val == 2){
  207. if (c->LS) c->LS->MaxW = 0;
  208. if (c->RS) c->RS->MaxW = 20;
  209. }else{
  210. if (c->LS) c->LS->MaxW = 0;
  211. if (c->RS) c->RS->MaxW = 0;
  212. }
  213. }
  214. int laget_SnapState(laColumn *c){
  215. if (c->LS && c->LS->MaxW) return 1;
  216. if (c->RS && c->RS->MaxW) return 2;
  217. return 0;
  218. }
  219. void *laget_BoxedTheme(laTheme *theme){
  220. return theme->BoxedThemes.pFirst;
  221. }
  222. void *laget_BoxedThemeUi(void *UNUSED){
  223. return ((laTheme *)MAIN.Themes.pFirst)->BoxedThemes.pFirst;
  224. }
  225. void* laget_Main(void *UNUSED, void* UNUSED2){
  226. return &MAIN;
  227. }
  228. laPropContainer* laget_PropertyNodeType(laProp* p){
  229. static laPropContainer* pc=0;
  230. static laPropContainer* ipc=0;
  231. static laPropContainer* fpc=0;
  232. switch(p->PropertyType&(~LA_PROP_ARRAY)){
  233. case LA_PROP_INT: { if(!ipc) ipc=la_ContainerLookup("int_property"); return ipc; }
  234. case LA_PROP_FLOAT: { if(!fpc) fpc=la_ContainerLookup("float_property"); return fpc; }
  235. default: { if(!pc) pc=la_ContainerLookup("property_item"); return pc; }
  236. }
  237. }
  238. void *laget_PropertyItemFirst(laPropContainer *p){
  239. if (!p) return 0;
  240. return p->Props.pFirst;
  241. }
  242. void *laget_PropertyItemNext(laProp *p, void *UNUSED){
  243. return p->Item.pNext;
  244. }
  245. void laget_PropertyName(laProp *p, char *result,char** result_direct){
  246. strCopyFull(result, p ? p->Name : "");
  247. }
  248. void laget_PropertyIdentifier(laProp *p, char *result,char** result_direct){
  249. strCopyFull(result, p ? p->Identifier : "");
  250. }
  251. void laget_PropertyDescription(laProp *p, char *result,char** result_direct){
  252. strCopyFull(result, p ? p->Description : "");
  253. }
  254. int laget_PropertySubContainerIconID(laProp *p){
  255. if (p->PropertyType != LA_PROP_SUB) return 0;
  256. if (!p->SubProp){
  257. p->SubProp = la_ContainerLookup(((laSubProp *)p)->TargetID);
  258. if (!p->SubProp) return 0;
  259. }
  260. return p->SubProp->IconID;
  261. }
  262. void* laget_TrashItemInstance(void *a){
  263. return a;
  264. }
  265. void *laget_ActiveWindow(void *unused){
  266. return MAIN.CurrentWindow;
  267. }
  268. void *laget_FirstWindow(void *unused, void* unused_iter){
  269. return MAIN.Windows.pFirst;
  270. }
  271. void *laget_FirstContainer(void *unused, void* unused_iter){
  272. return MAIN.PropContainers.pFirst;
  273. }
  274. void *laget_WindowFirstLayout(laWindow *window, void* unused_iter){
  275. return window->Layouts.pFirst;
  276. }
  277. void *laget_FirstHiddenPanel(laWindow *window, void* unused_iter){
  278. for(laPanel* p=window->Panels.pFirst;p;p=p->Item.pNext){
  279. if(!p->Show&&!p->LaterDestroy){return p;}
  280. }
  281. return 0;
  282. }
  283. void *laget_NextHiddenPanel(laPanel* p, void* unused_iter){
  284. for(p=p->Item.pNext;p;p=p->Item.pNext){
  285. if(!p->Show&&!p->LaterDestroy){return p;}
  286. }
  287. return 0;
  288. }
  289. void laset_WindowHiddenPanel(laWindow *window, laPanel* p){
  290. laShowPanelWithExpandEffect(p);
  291. laPopPanel(p);
  292. }
  293. void laget_PanelTitle(laPanel *p, char *result,char** result_direct){
  294. strCopyFull(result, p->Title->Ptr);
  295. }
  296. void laset_PanelTitle(laPanel *p, char *content){
  297. strSafeSet(&p->Title, content);
  298. p->TitleWidth = tnsStringGetWidth(transLate(p->Title->Ptr), 0,0);
  299. }
  300. void laread_PanelTitle(laPanel *p, char *content){
  301. strSafeSet(&p->Title, content);
  302. }
  303. void laset_PanelSnapDistance(laPanel *p, int index, int n){
  304. int a;
  305. if (!n) return;
  306. switch (index){ //lrtb
  307. case 0:
  308. p->SL = p->SL ? n : 0;
  309. break;
  310. case 1:
  311. p->SR = p->SR ? n : 0;
  312. break;
  313. case 2:
  314. p->ST = p->ST ? n : 0;
  315. break;
  316. case 3:
  317. p->SB = p->SB ? n : 0;
  318. break;
  319. }
  320. }
  321. void laread_PanelSnapDistance(laPanel* p, int index, int n) {
  322. int a;
  323. if (!n) return;
  324. switch (index) { //lrtb
  325. case 0: p->SL = n; break;
  326. case 1: p->SR = n; break;
  327. case 2: p->ST = n; break;
  328. case 3: p->SB = n; break;
  329. }
  330. }
  331. void laset_PanelSnapEnable(laPanel *p, int index, int n){
  332. laWindow *w = MAIN.CurrentWindow;
  333. int a;
  334. switch (index){ //lrtb
  335. case 0:
  336. p->SL = (n && p->X) ? p->X : 0;
  337. break;
  338. case 1:
  339. p->SR = (n && w ? ((a = MAIN.CurrentWindow->CW - p->X - p->W) ? a : 0) : n);
  340. break;
  341. case 2:
  342. p->ST = (n && p->Y) ? p->Y : 0;
  343. break;
  344. case 3:
  345. p->SB = (n && w ? ((a = MAIN.CurrentWindow->CH - p->Y - p->H) ? a : 0) : n);
  346. break;
  347. }
  348. }
  349. void laget_PanelSnapEnable(laPanel *p, int *result){
  350. result[0] = p->SL ? 1 : 0;
  351. result[1] = p->SR ? 1 : 0;
  352. result[2] = p->ST ? 1 : 0;
  353. result[3] = p->SB ? 1 : 0;
  354. }
  355. void laget_LayoutTitle(laLayout *l, char *result, char** result_direct){
  356. strCopyFull(result, l->ID->Ptr);
  357. }
  358. void laset_LayoutTitle(laLayout *l, char *content){
  359. strSafeSet(&l->ID, content);
  360. if(l->ID->Ptr) laRenameWindow(MAIN.CurrentWindow, l->ID->Ptr);
  361. }
  362. //void* laget_LayoutPanelFirst(laLayout* l) {
  363. // return l->Panels.pFirst;
  364. //}
  365. void laset_WindowActiveLayout(laWindow *w, laLayout *l, int UNUSED_State){
  366. la_StopAllOperators();
  367. memAssignRef(w, &w->CurrentLayout, l);
  368. if(!w->win){return;}
  369. laRenameWindow(w, l->ID->Ptr);
  370. laRedrawCurrentWindow();
  371. }
  372. void* laget_WindowActiveLayout(laWindow *w, void* unused){
  373. return w->CurrentLayout;
  374. }
  375. //void laget_PanelSnappingTrueFalse(laPanel* p, int* result) {
  376. // result[0] = p->SL > 0 ? 1 : 0;
  377. // result[1] = p->SR > 0 ? 1 : 0;
  378. // result[2] = p->ST > 0 ? 1 : 0;
  379. // result[3] = p->SB > 0 ? 1 : 0;
  380. //}
  381. //void laset_PanelSnappingTrueFalse(laPanel* p,int Index, int n) {
  382. // int* v = &p->SL;
  383. // int val = abs(v[Index]);
  384. // v[Index] = val*(n ? 1 : -1);
  385. //}
  386. void laset_PanelMultisample(void* unused, int value){
  387. MAIN.PanelMultisample = value;
  388. tnsReconfigureTextureParameters(value);
  389. laRedrawAllWindows();
  390. }
  391. void *laget_UiInternalType(void *UNUSED){
  392. return MAIN.UiTypes.pFirst;
  393. }
  394. void laget_TimeString(laTimeInfo *ti, char *result,char** result_direct){
  395. sprintf(result, "%d-%.02d-%.02d %.02d:%.02d:%.02d", ti->Year, ti->Month, ti->Day, ti->Hour, ti->Minute, ti->Second);
  396. }
  397. int laget_TimeYear(laTimeInfo *ti){
  398. return (int)ti->Year;
  399. }
  400. int laget_TimeMonth(laTimeInfo *ti){
  401. return (int)ti->Month;
  402. }
  403. int laget_TimeDay(laTimeInfo *ti){
  404. return (int)ti->Day;
  405. }
  406. int laget_TimeHour(laTimeInfo *ti){
  407. return (int)ti->Hour;
  408. }
  409. int laget_TimeMinute(laTimeInfo *ti){
  410. return (int)ti->Minute;
  411. }
  412. int laget_TimeSecond(laTimeInfo *ti){
  413. return (int)ti->Second;
  414. }
  415. void *laget_ConditionerExtra(laUiItem *ui){
  416. if (ui->Type == &_LA_UI_CONDITION ||
  417. ui->Type == &_LA_UI_CONDITION_END ||
  418. ui->Type == &_LA_UI_CONDITION_ELSE ||
  419. ui->Type == _LA_UI_CONDITION_TOGGLE){
  420. return ui->Extra;
  421. }
  422. return 0;
  423. }
  424. void *laget_CanvasExtra(laUiItem *ui){
  425. if (ui->Type == _LA_UI_CANVAS){
  426. return ui->Extra;
  427. }
  428. return 0;
  429. }
  430. void laget_UnknownPropertyString(laUDF *udf, char *result, char** here){
  431. *here="Unknown Property";
  432. }
  433. void laget_MainIdentifier(laUDF *udf, char *result, char** here){
  434. strcpy(result, "MAIN");
  435. }
  436. void laget_UDFFilePath(laUDF *udf, char *result, char** here){
  437. *here=udf->FileName->Ptr;
  438. }
  439. void laget_UDFContentNodeFullPath(laUDFContentNode *ucn, char *result, char** here){
  440. if (ucn->FullPath && ucn->FullPath->Ptr) *here=ucn->FullPath->Ptr;
  441. }
  442. void laget_UDFContentNodeIdentifier(laUDFContentNode *ucn, char *result, char** here){
  443. if (ucn->Identifier && ucn->Identifier->Ptr) *here=ucn->Identifier->Ptr;
  444. }
  445. void laget_UDFContentInstanceIdentifier(laUDFContentInstance *uci, char *result, char** here){
  446. if (uci->Identifier && uci->Identifier->Ptr) *here=uci->Identifier->Ptr;
  447. }
  448. void lapost_PropPack(laPropPack *pp);
  449. void laget_ConditionNodePropPath(laUiConditionNode *ucn, char *result, char** here){
  450. if (!ucn->PP.Go) return;
  451. la_GetPropPackPath(&ucn->PP, result);
  452. }
  453. void laset_ConditionNodePropPath(laUiConditionNode *ucn, char *content, char** here){
  454. if (ucn->PP.Go){
  455. la_FreePropStepCache(ucn->PP.Go);
  456. ucn->PP.LastPs = ucn->PP.Go = 0;
  457. }
  458. la_GetPropFromPath(&ucn->PP, ucn->PP.RawThis, content, 0);
  459. }
  460. void laread_ConditionNodePropPath(laUiConditionNode *ucn, char *Content, char** here){
  461. if (!Content || !Content[0]) return;
  462. ucn->PP.Go = CreateNewBuffer(char, strlen(Content) + 1);
  463. strcpy(ucn->PP.Go, Content);
  464. }
  465. void lapost_ConditionNode(laUiConditionNode *ucn){
  466. lapost_PropPack(&ucn->PP);
  467. }
  468. void laset_ConditionNodeType(laUiConditionNode *ucn, int Type){
  469. ucn->Type = Type;
  470. switch (Type){
  471. case LA_CONDITION_PROP:
  472. case LA_CONDITION_INT:
  473. case LA_CONDITION_FLOAT:
  474. case LA_CONDITION_STRING:
  475. case LA_CONDITION_FALSE:
  476. case LA_CONDITION_TRUE:
  477. la_ConditionNodeFreeRecursive(ucn->Expression1);
  478. la_ConditionNodeFreeRecursive(ucn->Expression2);
  479. ucn->Expression1 = 0;
  480. ucn->Expression2 = 0;
  481. if (ucn->PP.LastPs) la_FreePropStepCache(ucn->PP.Go);
  482. ucn->PP.LastPs = ucn->PP.Go = ucn->PP.RawThis = 0;
  483. break;
  484. case LA_CONDITION_NOT:
  485. la_ConditionNodeFreeRecursive(ucn->Expression2);
  486. ucn->Expression2 = 0;
  487. if (ucn->PP.LastPs) la_FreePropStepCache(ucn->PP.Go);
  488. ucn->PP.LastPs = ucn->PP.Go = ucn->PP.RawThis = 0;
  489. if (!ucn->Expression1) ucn->Expression1 = laIntExpression(0);
  490. break;
  491. default:
  492. if (!ucn->Expression1) ucn->Expression1 = laIntExpression(0);
  493. if (!ucn->Expression2) ucn->Expression2 = laIntExpression(1);
  494. break;
  495. }
  496. laRecalcCurrentPanel();
  497. }
  498. void laread_ConditionNodeType(laUiConditionNode *ucn, int Type){
  499. ucn->Type = Type;
  500. }
  501. void* laget_FirstDriverPage(laRackPageCollection* rpc, void* unused2){
  502. return rpc->Pages.pFirst;
  503. }
  504. void* laget_CurrentRackPage(laRackPageCollection* c){
  505. return c->CurrentPage;
  506. }
  507. void laset_CurrentRackPage(laRackPageCollection* c,laRackPage* rp){
  508. memAssignRef(c,&c->CurrentPage,rp);
  509. }
  510. void* laget_CurrentAnimationAction(void* unused_a){
  511. return MAIN.Animation->CurrentAction;
  512. }
  513. void* laset_CurrentAnimationAction(void* unused_a, laAction* c){
  514. memAssignRef(MAIN.Animation,&MAIN.Animation->CurrentAction,c);
  515. laNotifyUsers("la.animation.current_action");
  516. }
  517. void laset_WindowColorSpace(laWindow* w, int space){ w->OutputColorSpace=space; if(w->win) laRedrawCurrentWindow(); }
  518. void laset_WindowShowStripes(laWindow* w, int stripes){ w->OutputShowStripes=stripes; if(w->win) laRedrawCurrentWindow(); }
  519. void laset_WindowUseComposing(laWindow* w, int comp){ w->UseComposing=comp; if(w->win) laRedrawCurrentWindow(); }
  520. void laset_WindowComposingGamma(laWindow* w, real v){ w->ComposingGamma=v; if(w->win) laRedrawCurrentWindow(); }
  521. void laset_WindowComposingBlackpoint(laWindow* w, real v){ w->ComposingBlackpoint=v; if(w->win) laRedrawCurrentWindow(); }
  522. void *tnsget_TnsMain(void *unused,void *unused2){
  523. return T;
  524. }
  525. void *tnsget_World(void *unused,void *unused2){
  526. return T->World;
  527. }
  528. void *tnsread_World(void *unused, void *inst){
  529. }
  530. void tnsset_InstancerInstance(tnsInstancer *o, tnsObject* value){
  531. o->Instance=value; tnsInvalidateEvaluation(o); laNotifyUsers("tns.world");
  532. }
  533. void tnsset_InstancerHook(tnsInstancer *o, int Hook){ laNotifyUsers("tns.world");
  534. o->Hook=Hook; laNotifyInstanceUsers(o); tnsInvalidateEvaluation(o); tnsInvalidateEvaluation(o->Instance);
  535. }
  536. void tnssetarr_InstancerHookOffset(tnsInstancer *o, real* arr){ laNotifyUsers("tns.world");
  537. tnsVectorSet2v(o->HookOffset,arr); laNotifyInstanceUsers(o); tnsInvalidateEvaluation(o); tnsInvalidateEvaluation(o->Instance);
  538. }
  539. void *tnsget_detached_FirstRootObject(void *UNUSED1, void *UNUSED2){
  540. return T->World->RootObjects.pFirst;
  541. }
  542. void *tnsget_detached_FirstMaterial(void *UNUSED1, void *UNUSED2){
  543. return T->World->Materials.pFirst;
  544. }
  545. void *tnsget_detached_FirstTexture(void *UNUSED1, void *UNUSED2){
  546. return T->Textures.pFirst;
  547. }
  548. void *tnsget_PreviewTexture(void *UNUSED){
  549. return T->PreviewTexture;
  550. }
  551. void *tnsset_PreviewTexture(void *UNUSED_PARENT, void *tex, int UNUSEDSTATE){
  552. T->PreviewTexture = tex;
  553. }
  554. void *tnsget_NextLinkedObject(tnsObject *o, laPropIterator *pi){
  555. pi->Linker = ((laListItemPointer *)pi->Linker->pNext);
  556. return pi->Linker->p;
  557. }
  558. void *tnsget_FirstChildObject(tnsObject *ob){
  559. return ob->ChildObjects.pFirst;
  560. }
  561. void tnsset_RootObjectIs2D(tnsRootObject *root, int Is2D){
  562. root->Is2D=Is2D; laNotifyInstanceUsers(root);
  563. }
  564. void tnsset_ObjectLocation(tnsObject* o, int n, real val){ o->Location[n]=val;tnsSelfTransformValueChanged(o); laNotifyUsers("tns.world"); }
  565. void tnsset_ObjectRotation(tnsObject* o, int n, real val){ o->Rotation[n]=val; tnsSelfTransformValueChanged(o); laNotifyUsers("tns.world"); }
  566. void tnsset_ObjectScale(tnsObject* o, int n, real val){ o->Scale[n]=val; tnsSelfTransformValueChanged(o); laNotifyUsers("tns.world"); }
  567. void tnsset_ObjectDLocationARR(tnsObject* o, real* arr){ tnsVectorCopy3d(arr,o->DLocation); tnsDeltaTransformValueChanged(o); laNotifyUsers("tns.world"); }
  568. void tnsset_ObjectDRotationARR(tnsObject* o, real* arr){ tnsVectorCopy3d(arr,o->DRotation); tnsDeltaTransformValueChanged(o); laNotifyUsers("tns.world"); }
  569. void tnsset_ObjectDScaleARR(tnsObject* o, real* arr){ tnsVectorCopy3d(arr,o->DScale); tnsDeltaTransformValueChanged(o); laNotifyUsers("tns.world"); }
  570. tnsMeshObject* tnsget_ObjectAsMesh(tnsObject* o){ if(!o || o->Type!=TNS_OBJECT_MESH) return 0; return o; }
  571. tnsRootObject* tnsget_ObjectAsRoot(tnsObject* o){ if(!o || o->Type!=TNS_OBJECT_ROOT) return 0; return o; }
  572. void laget_UiTemplateIdentifier(laUiTemplate *uit, char *result, char** here){
  573. *here=uit->Identifier->Ptr;
  574. }
  575. void laset_UiTemplateIdentifier(laUiTemplate *uit, char *content){
  576. strSafeSet(&uit->Identifier, content);
  577. }
  578. void laget_UiDataPath(laUiItem *ui, char *result){
  579. laPropStep *ps = ui->PP.Go;
  580. if (ui->PP.LastPs || ui->PP.Go){
  581. for (ps; ps; ps = ps->pNext){
  582. if (ps->Type == U'@' || ps->Type == U'#' || ps->Type == U'='){
  583. strcat(result, ps->p);
  584. }else{
  585. strcat(result, ps->p->Identifier);
  586. }
  587. if (ps->pNext){
  588. if (ps->pNext->Type == U'.') strcat(result, ".");
  589. elif (ps->pNext->Type == U'#') strcat(result, "#");
  590. elif (ps->pNext->Type == U'@') strcat(result, "@");
  591. elif (ps->pNext->Type == U'=') strcat(result, "= ");
  592. elif (ps->pNext->Type == U'$') strcat(result, "$");
  593. }
  594. }
  595. }elif (ui->AT){
  596. strcpy(result, "");
  597. }
  598. }
  599. void laget_UiOperatorID(laUiItem *ui, char *result, char** here){
  600. if (ui->AT){
  601. *here=ui->AT->Identifier;
  602. }else *result=0;
  603. }
  604. void laread_UiDataPath(laUiItem *ui, char *Content){
  605. if (!Content || !Content[0]) return;
  606. ui->PP.Go = CreateNewBuffer(char, strlen(Content) + 1);
  607. strcpy(ui->PP.Go, Content);
  608. }
  609. void laread_UiOperatorID(laUiItem *ui, char *Content){
  610. ui->AT = laGetOperatorType(Content);
  611. }
  612. void *laget_PanelTemplate(void *UNUSED, void *UNUSED2){
  613. return MAIN.PanelTemplates.pFirst;
  614. }
  615. void laget_PanelTemplateCategory(void* rack_unused, laUiTemplate* uit, char* copy, char** ptr){
  616. if(uit->CategoryName&&uit->CategoryName->Ptr) *ptr=uit->CategoryName->Ptr;
  617. }
  618. void lapost_Window(laWindow *w){
  619. laStartWindow(w);
  620. }
  621. int la_CreateSystemWindow(laWindow *window, int synctovbank);
  622. void lapostim_Window(laWindow *w){
  623. w->IsFullScreen=0;
  624. la_CreateSystemWindow(w,MAIN.Windows.pFirst==MAIN.Windows.pLast);
  625. la_AssignWindowPP(w);
  626. MAIN.CurrentWindow = w;
  627. }
  628. void lapost_PropPack(laPropPack *pp){
  629. char *path = pp->Go;
  630. if (pp->LastPs /* || !path*/) return;
  631. if ((!path || (path && !path[0])) && pp->RawThis) pp->LastPs = pp->RawThis->LastPs;
  632. if (pp->RawThis) lapost_PropPack(pp->RawThis);
  633. pp->Go = 0;
  634. la_GetPropFromPath(pp, pp->RawThis, path, 0);
  635. FreeMem(path);
  636. }
  637. void lapost_UiItem(laUiItem *ui){
  638. lapost_PropPack(&ui->PP);
  639. //if(ui->Type == _LA_UI_CANVAS) ui->Type->Init(ui);
  640. }
  641. void lapostim_UiItem(laUiItem *ui){
  642. if (ui->Type && ui->Type->Init && ui->Type != _LA_UI_CANVAS && ui->Type != &_LA_UI_CONDITION) ui->Type->Init(ui);
  643. ui->State = ui->State ? ui->State : (ui->Type ? LA_UI_NORMAL : 0);
  644. la_AssignPropExtras(ui);
  645. }
  646. void* laget_SavePanel(laWindow* w, laPropIterator* pi){
  647. for(laPanel* p=w->Panels.pFirst;p;p=p->Item.pNext){ if(!p->Mode || p->IsMenuPanel || p->PanelTemplate) return p; }
  648. return 0;
  649. }
  650. void* lagetnext_SavePanel(laPanel* p, laPropIterator* pi){
  651. for(p=p->Item.pNext;p;p=p->Item.pNext){ if(!p->Mode || p->IsMenuPanel || p->PanelTemplate) return p; }
  652. return 0;
  653. }
  654. void lapost_Panel(laPanel *p){
  655. p->PP.EndInstance = p;
  656. p->PP.LastPs = &p->FakePS;
  657. p->PP.LastPs->p = _LA_PROP_PANEL;
  658. p->PP.LastPs->UseInstance = p;
  659. p->PP.LastPs->Type = U'.';
  660. la_EnsurePanelExtras(p);
  661. laRecalcPanel(p);
  662. p->FrameDistinguish = 100;
  663. if(p->IsMenuPanel || p->Block) p->Show=1;
  664. laUiTemplate* uit=p->PanelTemplate;
  665. if(uit&&uit->PropFunc){ uit->PropFunc(p); }
  666. if(uit){
  667. uit->Define(&p->UI, &p->PP, &p->PropLinkPP, 0, 0);
  668. if(p->Mode) laui_DefaultPanelTitleBar(&p->TitleBar, &p->PP, &p->PropLinkPP, uit->Header);
  669. }
  670. if(p->IsMenuPanel){ laui_DefaultMenuBarActual(&p->TitleBar, &p->PP, &p->PropLinkPP, 0, 0); }
  671. //if(p->Title) p->TitleWidth = tnsStringGetWidth(transLate(p->Title->Ptr), 0, 0);
  672. #ifdef __linux__
  673. XSync(MAIN.dpy,0);
  674. #endif
  675. }
  676. void lapost_Block(laBlock *b){
  677. la_AssignBlockPP(b);
  678. }
  679. void lapost_UserPreferences(void* unused){
  680. //MAIN.ScaledUiRowHeight=MAIN.UiRowHeight;
  681. //tnsInvalidateFontCache();
  682. }
  683. void laset_ColorPickerGamma(void* unused, real gamma){
  684. MAIN.ColorPickerGamma=gamma; laRedrawCurrentWindow();
  685. }
  686. void laset_ViewportHalftoneFactor(void* unused, real v){
  687. MAIN.ViewportHalftoneFactor=v; laNotifyUsers("tns.world");
  688. }
  689. void laset_ViewportHalftoneSize(void* unused, real v){
  690. MAIN.ViewportHalftoneSize=v; laNotifyUsers("tns.world");
  691. }
  692. void laset_EnableGLDebug(void* unused, int e){ MAIN.EnableGLDebug=e; la_NotifyGLDebugChanges(); }
  693. void laset_GLDebugSync(void* unused, int e){ MAIN.GLDebugSync=e; la_NotifyGLDebugChanges(); }
  694. void laset_GLDebugLevel(void* unused, int e){ MAIN.GLDebugLevel=e; la_NotifyGLDebugChanges(); }
  695. //void laget_DetachedPropContainerID(laProp* p, char * result) {
  696. // strcpy(result, p->Detached->Container->Identifier);
  697. //}
  698. //void laget_DetachedPropPropID(laProp* p, char * result) {
  699. // strcpy(result, p->Detached->Identifier);
  700. //}
  701. //void laset_DetachedPropContainerID(laProp* p, char * content) {
  702. // p->Description = CreateNewBuffer(char, 128);
  703. // strcpy(p->Description, content);
  704. //}
  705. //void laset_DetachedPropPropID(laProp* p, char * content) {
  706. // p->Name = CreateNewBuffer(char, 128);
  707. // strcpy(p->Name, content);
  708. //}
  709. void laread_DetachedPropRename(laProp *p, char *content){
  710. p->Identifier = CreateNewBuffer(char, 128);
  711. strcpy(p->Identifier, content);
  712. }
  713. void laget_DetachedPropPath(laProp *p, char *result, char** here){
  714. la_GetPropPackPath(&p->DetachedPP, result);
  715. }
  716. void laread_DetachedPropPath(laProp *p, char *content){
  717. p->DetachedPP.Go = CreateNewBuffer(char, 128);
  718. strcpy(p->DetachedPP.Go, content);
  719. }
  720. void lapost_DetachedProp(laProp *Prop){
  721. laPropContainer *pc = 0;
  722. laSubProp *np = 0;
  723. laIntProp *ip;
  724. laFloatProp *fp;
  725. laEnumProp *ep;
  726. laSubProp *sp;
  727. char *path = Prop->DetachedPP.Go;
  728. char *id = Prop->Identifier;
  729. laPropPack TempPP = {0};
  730. laListItem Item;
  731. Prop->DetachedPP.Go = 0;
  732. memcpy(&Item, &Prop->Item, sizeof(laListItem));
  733. la_GetPropFromPath(&TempPP, Prop->DetachedPP.RawThis, path, 0);
  734. //FreeMem(path);
  735. memcpy(Prop, TempPP.LastPs->p, la_GetPropertySize(TempPP.LastPs->p->PropertyType));
  736. memcpy(&Prop->DetachedPP, &TempPP, sizeof(laPropPack));
  737. memcpy(&Prop->Item, &Item, sizeof(laListItem));
  738. switch (Prop->PropertyType){
  739. case LA_PROP_INT:
  740. case LA_PROP_INT | LA_PROP_ARRAY:
  741. ip = Prop;
  742. ip->Detached = CreateNewBuffer(int, Prop->Len ? Prop->Len : 1);
  743. break;
  744. case LA_PROP_FLOAT:
  745. case LA_PROP_FLOAT | LA_PROP_ARRAY:
  746. fp = Prop;
  747. fp->Detached = CreateNewBuffer(real, Prop->Len ? Prop->Len : 1);
  748. break;
  749. case LA_PROP_ENUM:
  750. case LA_PROP_ENUM | LA_PROP_ARRAY:
  751. ep = Prop;
  752. ep->Detached = CreateNewBuffer(int, 1);
  753. ep->Detached[0] = ((laEnumItem *)ep->Items.pFirst)->Index;
  754. }
  755. Prop->Identifier = id;
  756. }
  757. void latouched_NodeInSocket(void* unused, int hint){
  758. laGraphRequestRebuild();
  759. }
  760. int lafilter_NodeCategory(void* unused, laNodeCategory* c){
  761. if(c->For&MAIN.FilterNodeCategory) return 1; return 0;
  762. }
  763. void tnspost_World(tnsWorld *w){
  764. tnsRefreshMaterialLibraries();
  765. }
  766. void tnspost_Material(tnsMaterial *m){
  767. tns_RefreshMaterial2D(m);
  768. //if(m->AsLibrary){ tnsRefreshMaterialLibraries(); return; }
  769. //tnsEnsureMaterialShader(m,1);
  770. }
  771. void tnspost_Object(tnsObject *o){ //XXX: No instance clear operation for object?
  772. laListItemPointer* NextLip,*NextLip2;
  773. if(o->Type!=TNS_OBJECT_ROOT){
  774. tnsDeltaTransformValueChanged(o); tnsGlobalMatrixChanged(o,1);
  775. }
  776. for(laListItemPointer* lip=o->ChildObjects.pFirst;lip;lip=NextLip){
  777. NextLip=lip->pNext; if(!lip->p){ lstRemoveItem(&o->ChildObjects,lip); memFree(lip); continue; }
  778. for(laListItemPointer* lip2=NextLip;lip2;lip2=NextLip2){ NextLip2=lip2->pNext;
  779. if(lip2->p==lip->p){ NextLip=lip2->pNext; lstRemoveItem(&o->ChildObjects,lip2); memFree(lip2); continue; }
  780. }
  781. }
  782. }
  783. void tnspropagate_Object(tnsObject* o, laUDF* udf, int force){
  784. for(laListItemPointer* lip=o->ChildObjects.pFirst;lip;lip=lip->pNext){ if(!lip->p) continue;
  785. if(force || !laget_InstanceActiveUDF(lip->p)){ laset_InstanceUDF(lip->p, udf); tnspropagate_Object(lip->p,udf,force); }
  786. }
  787. }
  788. void tnstouched_Object(tnsObject *o, int hint){
  789. printf("touched\n");
  790. if(o->Type==TNS_OBJECT_MESH && (hint&TNS_HINT_GEOMETRY)){
  791. tnsInvalidateMeshBatch(o);
  792. }
  793. tnsInvalidateEvaluation(o);
  794. laNotifyUsers("tns.world");
  795. }
  796. int tnsfilter_SavableObject(void* unused, tnsObject* o){
  797. if(o->InRoot) return 1; return 0;
  798. }
  799. int tnsget_MeshObjectVertSize(tnsMeshObject* o){ return o->totv*sizeof(tnsVert);/*can't use maxv*/ }
  800. int tnsget_MeshObjectEdgeSize(tnsMeshObject* o){ return o->tote*sizeof(tnsEdge);/*can't use maxv*/ }
  801. void* tnsget_MeshObjectFaceRaw(tnsMeshObject* o, int* r_size, int* r_is_copy){
  802. if(o->Mode==TNS_MESH_EDIT_MODE) return 0;
  803. int* arr=0; int next=0,max=0; int i=0;
  804. arrEnsureLength(&arr, i, &max, sizeof(int));
  805. arr[i]=o->totf; i++;
  806. for(int f=0;f<o->totf;f++){
  807. arrEnsureLength(&arr, i+o->f[f].looplen+6, &max, sizeof(int));
  808. arr[i]=o->f[f].looplen; i++;
  809. arr[i]=o->f[f].flags; i++;
  810. arr[i]=o->f[f].mat; i++;
  811. float* nm=(void*)&arr[i]; tnsVectorSet2v(nm,o->f[f].n); i+=3;
  812. for(int l=0;l<o->f[f].looplen;l++){
  813. arr[i]=o->f[f].loop[l]; i++;
  814. }
  815. }
  816. *r_size = i*sizeof(int);
  817. *r_is_copy = 1;
  818. return arr;
  819. }
  820. void tnsset_MeshObjectFaceRaw(tnsMeshObject* o, int* data, int s){
  821. if(o->f){
  822. for(int fi=0;fi<o->maxf;fi++){ // ??? due to undo property order, maxf can be != totf, will it have problems?
  823. if(o->f[fi].loop){ free(o->f[fi].loop); o->f[fi].loop=0; }
  824. }
  825. arrFree(&o->f, &o->maxf); o->totf=0; o->maxf=0;
  826. }
  827. if(!data) return;
  828. int totf=data[0]; int i=1;
  829. o->f=calloc(1,sizeof(tnsFace)*totf); o->maxf=o->totf=totf;
  830. for(int fi=0;fi<totf;fi++){
  831. tnsFace*f=&o->f[fi];
  832. f->looplen=data[i]; i++;
  833. f->flags=data[i]; i++;
  834. f->mat=data[i]; i++;
  835. float* nm=(void*)&data[i]; tnsVectorSet2v(f->n,nm); i+=3;
  836. f->loop=calloc(1,sizeof(int)*f->looplen);
  837. for(int li=0;li<f->looplen;li++){
  838. f->loop[li]=data[i]; i++;
  839. }
  840. }
  841. }
  842. void tns_InvalidateMeshWithMaterial(tnsMaterial* m){
  843. for(tnsMeshObject* o=T->World->AllObjects.pFirst;o;o=o->Base.Item.pNext){
  844. if(o->Base.Type!=TNS_OBJECT_MESH) continue;
  845. for(tnsMaterialSlot* ms=o->Materials.pFirst;ms;ms=ms->Item.pNext){
  846. if(ms->Material==m){ tnsInvalidateMeshBatch(o); break; }
  847. }
  848. }
  849. }
  850. void tnsset_MaterialColor(tnsMaterial* m, real* c){
  851. tnsVectorCopy4d(c,m->Color); tns_InvalidateMeshWithMaterial(m); tns_RefreshMaterial2D(m); laNotifyUsers("tns.world");
  852. }
  853. void tns_RefreshMaterial2D(tnsMaterial* m){
  854. NVGcontext* vg=MAIN.CurrentWindow->nvg;
  855. if(m->GradientMode==TNS_GRADIENT_MODE_LINEAR){
  856. m->Paint=nvgLinearGradient(vg,m->GradientCenter[0],m->GradientCenter[1],m->GradientSize[0],m->GradientSize[1],
  857. nvgRGBAf(LA_COLOR4(m->Color)),nvgRGBAf(LA_COLOR4(m->Color2)));
  858. }elif(m->GradientMode==TNS_GRADIENT_MODE_BOX){
  859. m->Paint=nvgBoxGradient(vg,m->GradientCenter[0],m->GradientCenter[1],m->GradientSize[0],m->GradientSize[1],
  860. m->GradientBoxR,m->GradientBoxF,nvgRGBAf(LA_COLOR4(m->Color)),nvgRGBAf(LA_COLOR4(m->Color2)));
  861. }elif(m->GradientMode==TNS_GRADIENT_MODE_RADIAL){
  862. m->Paint=nvgRadialGradient(vg,m->GradientCenter[0],m->GradientCenter[1],m->GradientSize[0],m->GradientSize[1],
  863. nvgRGBAf(LA_COLOR4(m->Color)),nvgRGBAf(LA_COLOR4(m->Color2)));
  864. }
  865. }
  866. void tnsset_MaterialColor2(tnsMaterial* m, real* c){ tnsVectorCopy4d(c,m->Color2); tns_RefreshMaterial2D(m); laNotifyUsers("tns.world"); }
  867. void tnsset_MaterialGradientMode(tnsMaterial* m, int Mode){ m->GradientMode=Mode; tns_RefreshMaterial2D(m); laNotifyUsers("tns.world"); }
  868. void tnsset_MaterialGradientCenter(tnsMaterial* m, real* c){ tnsVectorCopy2d(c,m->GradientCenter); tns_RefreshMaterial2D(m); laNotifyUsers("tns.world"); }
  869. void tnsset_MaterialGradientSize(tnsMaterial* m, real* c){ tnsVectorCopy2d(c,m->GradientSize); tns_RefreshMaterial2D(m); laNotifyUsers("tns.world"); }
  870. void tnsset_MaterialGradientF(tnsMaterial* m, real c){ m->GradientBoxF=c; tns_RefreshMaterial2D(m); laNotifyUsers("tns.world"); }
  871. void tnsset_MaterialGradientR(tnsMaterial* m, real c){ m->GradientBoxR=c; tns_RefreshMaterial2D(m); laNotifyUsers("tns.world"); }
  872. void tnsget_MaterialSlotname(tnsMaterialSlot* ms, char *result, char** here){
  873. if(!ms){ strcpy(result,"?"); return; }
  874. if(ms->Material&&ms->Material->Name&&ms->Material->Name->Ptr){
  875. sprintf(result,"%d: %s",ms->Index,ms->Material->Name->Ptr); return;
  876. }
  877. sprintf(result,"%d: %s",ms->Index,transLate("<Default Material>"));
  878. }
  879. tnsMaterialSlot* tnsget_FirstMaterialSlot(tnsObject* o, void* unused){
  880. if(o->Type==TNS_OBJECT_MESH) return ((tnsMeshObject*)o)->Materials.pFirst;
  881. if(o->Type==TNS_OBJECT_SHAPE) return ((tnsShapeObject*)o)->Materials.pFirst;
  882. return 0;
  883. }
  884. tnsMaterialSlot* tnsget_ActiveMaterialSlot(tnsObject* o){
  885. if(o->Type==TNS_OBJECT_MESH) return ((tnsMeshObject*)o)->CurrentMaterial;
  886. if(o->Type==TNS_OBJECT_SHAPE) return ((tnsShapeObject*)o)->CurrentMaterial;
  887. return 0;
  888. }
  889. void tnsset_ActiveMaterialSlot(tnsObject* o, tnsMaterialSlot* ms){
  890. if(o->Type==TNS_OBJECT_MESH) return memAssignRef(o,&((tnsMeshObject*)o)->CurrentMaterial,ms);
  891. if(o->Type==TNS_OBJECT_SHAPE) return memAssignRef(o,&((tnsShapeObject*)o)->CurrentMaterial,ms);
  892. }
  893. void tnsset_ShapeObjectBackdrop(tnsShapeObject* o, int v){
  894. o->Backdrop=v; tnsInvalidateEvaluation(o); laNotifyUsers("tns.world");
  895. }
  896. tnsMaterial* tnsget_FirstMaterial(void* unused1, void* unused2){
  897. return T->World->Materials.pFirst;
  898. }
  899. tnsMaterial* tnsgetactive_SlotMaterial(tnsMaterialSlot* ms, void* unused){
  900. return ms->Material;
  901. }
  902. laPropContainer* tnsget_ObjectType(tnsObject* o){
  903. switch(o->Type){
  904. case TNS_OBJECT_INSTANCER: return TNS_PC_OBJECT_INSTANCER;
  905. case TNS_OBJECT_CAMERA: return TNS_PC_OBJECT_CAMERA;
  906. case TNS_OBJECT_MESH: return TNS_PC_OBJECT_MESH;
  907. case TNS_OBJECT_LIGHT: return TNS_PC_OBJECT_LIGHT;
  908. case TNS_OBJECT_ROOT: return TNS_PC_OBJECT_ROOT;
  909. case TNS_OBJECT_SHAPE: return TNS_PC_OBJECT_SHAPE;
  910. default: return TNS_PC_OBJECT_GENERIC;
  911. }
  912. }
  913. void laget_AnimationActionHolderCategory(void* a_unused, laActionHolder* ah, char* copy, char** ptr){
  914. if(ah->CategoryTitle&&ah->CategoryTitle->Ptr) *ptr=ah->CategoryTitle->Ptr;
  915. }
  916. int laget_AnimationActionCurrentFrame(laAction* aa){
  917. return LA_ACTION_FRAME(aa);
  918. }
  919. void laget_AnimationPropStr(laActionProp* ap, char* str, char** here){
  920. sprintf(str,"%s.%s",ap->Prop->Container->Identifier,ap->Prop->Identifier);
  921. }
  922. void laread_AnimationPropStr(laActionProp* ap, char* str){
  923. if(!str || !str[0]) return;
  924. laStringSplitor* ss=strSplitPath(str,0); if(ss->NumberParts!=2) goto anim_set_prop_str_cleanup;
  925. laStringPart* sp1=ss->parts.pFirst,*sp2=ss->parts.pLast;
  926. laPropContainer* pc=la_ContainerLookup(sp1->Content); if(!pc) goto anim_set_prop_str_cleanup;
  927. laProp* p=la_PropLookup(&pc->Props,sp2->Content); if(!p) goto anim_set_prop_str_cleanup;
  928. ap->Prop=p;
  929. anim_set_prop_str_cleanup:
  930. strDestroyStringSplitor(&ss);
  931. }
  932. void* lagetraw_ActionKeyData(laActionKey* ak, int* r_size, int* ret_is_copy){
  933. *r_size=ak->DataSize; *ret_is_copy=1;
  934. void* data=malloc(ak->DataSize); memcpy(data,ak->Data,ak->DataSize);
  935. return data;
  936. }
  937. void lasetraw_ActionKeyData(laActionKey* ak, void* data, int DataSize){
  938. ak->DataSize=DataSize; ak->Data=memAcquireSimple(DataSize); memcpy(ak->Data,data,DataSize);
  939. }
  940. void laset_AnimationPlayHead(void* unused,real data){
  941. if(data<0){ data=0; }
  942. laAnimationSetPlayHead(data); la_AnimationEvaluateActions(1); laNotifyUsers("la.animation");
  943. }
  944. int laaction_VerifyRootObject(void* Parent, laPropContainer* ParentType, void* Child, laPropContainer* ChildType){
  945. if(ParentType!=ChildType) return 0;
  946. if(ParentType!=TNS_PC_OBJECT_GENERIC) return 0;
  947. tnsObject*o=Child; if(o==Parent || o->InRoot==Parent) return 1;
  948. return 0;
  949. }
  950. void lareset_Main(void* Unused){
  951. return;
  952. }
  953. laPropContainer* LA_PC_SOCKET_IN;
  954. laPropContainer* LA_PC_SOCKET_OUT;
  955. laPropContainer* LA_PROP_SOCKET_SOURCE;
  956. laPropContainer* LA_PROP_SOCKET_OUT;
  957. laPropContainer* LA_PC_MAPPER;
  958. laPropContainer* LA_PC_RACK_PAGE;
  959. laPropContainer* TNS_PC_OBJECT_GENERIC;
  960. laPropContainer* TNS_PC_OBJECT_INSTANCER;
  961. laPropContainer* TNS_PC_OBJECT_CAMERA;
  962. laPropContainer* TNS_PC_OBJECT_LIGHT;
  963. laPropContainer* TNS_PC_OBJECT_MESH;
  964. laPropContainer* TNS_PC_OBJECT_SHAPE;
  965. laPropContainer* TNS_PC_OBJECT_ROOT;
  966. laPropContainer* TNS_PC_MATERIAL;
  967. laPropContainer* TNS_PC_MATERIAL_SLOT;
  968. laProp* LA_PROP_CONTROLLER;
  969. void la_RegisterGeneralProps(){
  970. laPropContainer *p, *ip, *p2, *ip2, *sp1, *sp2;
  971. laProp *ep;
  972. laPropPack pp;
  973. laSubProp *sp;
  974. laKeyMapper *km;
  975. p = la_SetGeneralRoot(&MAIN.GeneralIntSub, "__general_int__", "Genral Int Operations", "Genral Int Operations");
  976. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_prop_restore_default", U'⭯', 0);
  977. laAddOperatorProperty(p, "set_max", "Set Max", "Set property to its maximum value", "LA_prop_set_max", 0,0);
  978. laAddOperatorProperty(p, "set_min", "Set Min", "Set property to its minimum value", "LA_prop_set_min", 0,0);
  979. //laAddOperatorProperty(p, "hyper_data", "View Hyper Data", "Show Properties Of Specific Data Block", "LA_view_hyper_data", U'🛈', 0);
  980. laAddOperatorProperty(p, "insert_key", "Insert Key Frame", "Insert key frame in the active action", "LA_prop_insert_key", 0,0);
  981. p = la_SetGeneralRoot(&MAIN.GeneralIntArraySub, "__general_int_arr__", "Genral Int Array Operations", "Genral Int Array Operations");
  982. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_prop_restore_default", U'⭯', 0);
  983. laAddOperatorProperty(p, "set_max", "Set Max", "Set property to its maximum value", "LA_prop_set_max", 0,0);
  984. laAddOperatorProperty(p, "set_min", "Set Min", "Set property to its minimum value", "LA_prop_set_min", 0,0);
  985. //laAddOperatorProperty(p, "hyper_data", "View Hyper Data", "Show Properties Of Specific Data Block", "LA_view_hyper_data", U'🛈', 0);
  986. laAddOperatorProperty(p, "insert_key", "Insert Key Frame", "Insert key frame in the active action", "LA_prop_insert_key", 0,0);
  987. p = la_SetGeneralRoot(&MAIN.GeneralFloatSub, "__general_real__", "Genral Float Operations", "Genral Float Operations");
  988. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_prop_restore_default", U'⭯', 0);
  989. laAddOperatorProperty(p, "set_max", "Set Max", "Set property to its maximum value", "LA_prop_set_max", 0,0);
  990. laAddOperatorProperty(p, "set_min", "Set Min", "Set property to its minimum value", "LA_prop_set_min", 0,0);
  991. //laAddOperatorProperty(p, "hyper_data", "View Hyper Data", "Show Properties Of Specific Data Block", "LA_view_hyper_data", U'🛈', 0);
  992. laAddOperatorProperty(p, "insert_key", "Insert Key Frame", "Insert key frame in the active action", "LA_prop_insert_key", 0,0);
  993. p = la_SetGeneralRoot(&MAIN.GeneralFloatArraySub, "__general_real_arr__", "Genral Float Array Operations", "Genral Float Array Operations");
  994. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_prop_restore_default", U'⭯', 0);
  995. laAddOperatorProperty(p, "set_max", "Set Max", "Set property to its maximum value", "LA_prop_set_max", 0,0);
  996. laAddOperatorProperty(p, "set_min", "Set Min", "Set property to its minimum value", "LA_prop_set_min", 0,0);
  997. //laAddOperatorProperty(p, "hyper_data", "View Hyper Data", "Show Properties Of Specific Data Block", "LA_view_hyper_data", U'🛈', 0);
  998. laAddOperatorProperty(p, "insert_key", "Insert Key Frame", "Insert key frame in the active action", "LA_prop_insert_key", 0,0);
  999. p = la_SetGeneralRoot(&MAIN.GeneralEnumSub, "__general_enum__", "Genral Enum Operations", "Genral Enum Operations");
  1000. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_prop_restore_default", U'⭯', 0);
  1001. laAddOperatorProperty(p, "insert_key", "Insert Key Frame", "Insert key frame in the active action", "LA_prop_insert_key", 0,0);
  1002. p = la_SetGeneralRoot(&MAIN.GeneralEnumArraySub, "__general_enum_arr__", "Genral Enum Array Operations", "Genral Enum Array Operations");
  1003. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_prop_restore_default", U'⭯', 0);
  1004. laAddOperatorProperty(p, "insert_key", "Insert Key Frame", "Insert key frame in the active action", "LA_prop_insert_key", 0,0);
  1005. p = la_SetGeneralRoot(&MAIN.GeneralStringSub, "__general_string__", "Genral String Operations", "Genral String Operations");
  1006. laAddOperatorProperty(p, "copy", "Copy", "Copy to clipboard", "LA_string_copy", 0,0);
  1007. laAddOperatorProperty(p, "paste", "Paste", "Paste from clipboard", "LA_system_paste", 0,0);
  1008. laAddOperatorProperty(p, "restore", "Restore Default", "Restore Default Value", "LA_string_set_default", U'⭯', 0);
  1009. laAddOperatorProperty(p, "get_folder_path", "Get Folder Path", "Get a folder path", "LA_string_get_folder_path", U'📁', 0);
  1010. laAddOperatorProperty(p, "get_file_path", "Get File Path", "Get a file path", "LA_string_get_file_path", U'🖹', 0);
  1011. p->MenuUiDefine=laui_StringPropUiDefine;
  1012. p = la_SetGeneralRoot(&MAIN.GeneralOperatorSub, "__general_operator__", "Genral Operator Operations", "Genral Operator Operations");
  1013. p = la_SetGeneralRoot(&MAIN.GeneralCollectionSub, "__general_collection__", "Genral Collection Operations", "Genral Collection Operations");
  1014. laAddOperatorProperty(p, "put_data_block", "Put", "Append Pending Data Block Here", "LA_sub_put_data_block", U'🔗', 0);
  1015. laAddOperatorProperty(p, "save_instance", "Save Instance", "Save instance as a udf block", "LA_udf_save_instance", 0,0);
  1016. laAddOperatorProperty(p, "clear_selection", "Clear Selection", "Clear selected instance", "LA_collection_clear_selection", U'🧹',0);
  1017. }
  1018. void lareset_RackPage(laRackPage* rp){
  1019. laNodeRack* r; while(r=rp->Racks.pFirst){
  1020. laBaseNode* bn; while(bn=r->Nodes.pFirst){
  1021. bn->Type->Destroy(bn); lstRemoveItem(&r->Nodes,bn);
  1022. }
  1023. lstRemoveItem(&r->ParentPage->Racks, r); memLeave(r);
  1024. }
  1025. }
  1026. laRackPage* DEBUG_READ_RACK_PAGE=0; // some files have rack parent page missing, this to fix.
  1027. void lapost_RackPage(laRackPage* rp){ DEBUG_READ_RACK_PAGE=rp; }
  1028. void la_RegisterTNSProps(){
  1029. laPropContainer *p, *ip, *p2, *ip2, *sp1, *sp2;
  1030. laProp *ep; laPropPack pp; laSubProp *sp; laKeyMapper *km;
  1031. laCanvasTemplate *v2dt;
  1032. p = laAddPropertyContainer("tns_main", "TNS Main", "Render Kernel Root Structure", 0,0,sizeof(tnsMain), 0,0,1);{
  1033. if(MAIN.InitArgs.HasWorldObjects){
  1034. laAddSubGroup(p, "world", "World", "World Descriptor", "tns_world",0,0,0,offsetof(tnsMain, World), 0,0,0,0,0,0,0,LA_UDF_SINGLE);
  1035. }
  1036. 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);
  1037. laSubGroupDetachable(sp, tnsget_detached_FirstTexture, laget_ListNext);
  1038. //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);
  1039. }
  1040. p = laAddPropertyContainer("tns_texture", "TNS Texture Item", "A Texture Descriptor With GL Handle", 0,0,sizeof(tnsTexture), 0,0,0);{
  1041. 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);
  1042. 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);
  1043. 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);{
  1044. laAddEnumItemAs(ep, "rgba", "GL_RGBA", "GL_RGBA", GL_RGBA8,0);
  1045. laAddEnumItemAs(ep, "rgb", "GL_RGB", "GL_RGB", GL_RGB8,0);
  1046. laAddEnumItemAs(ep, "rg", "GL_RG", "GL_RG", GL_RG8,0);
  1047. laAddEnumItemAs(ep, "r", "GL_RED", "GL_RED", GL_R8,0);
  1048. laAddEnumItemAs(ep, "rgba32f", "GL_RGBA32F", "GL_RGBA32F", GL_RGBA32F,0);
  1049. laAddEnumItemAs(ep, "rgb32f", "GL_RGB32F", "GL_RGB32F", GL_RGB32F,0);
  1050. laAddEnumItemAs(ep, "rg32f", "GL_RG32F", "GL_RG32F", GL_RG32F,0);
  1051. laAddEnumItemAs(ep, "r32f", "GL_R32F", "GL_R32F", GL_R32F,0);
  1052. laAddEnumItemAs(ep, "rgba32i", "GL_RGBA32I", "GL_R32I", GL_RGBA32I,0);
  1053. laAddEnumItemAs(ep, "rgb32i", "GL_RGB32I", "GL_R32I", GL_RGB32I,0);
  1054. laAddEnumItemAs(ep, "rg32i", "GL_RG32I", "GL_R32I", GL_RG32I,0);
  1055. laAddEnumItemAs(ep, "r32i", "GL_R32I", "GL_R32I", GL_R32I,0);
  1056. laAddEnumItemAs(ep, "depth", "GL_DEPTH_COMPONENT32F", "GL_DEPTH_COMPONENT32F", GL_DEPTH_COMPONENT32F,0);
  1057. }
  1058. p->Template2D = la_GetCanvasTemplate(0,"la_CanvasDrawTexture");
  1059. }
  1060. if(!MAIN.InitArgs.HasWorldObjects) return;
  1061. p = laAddPropertyContainer("tns_world", "World", "3D World Structure", 0,0,sizeof(tnsWorld),tnspost_World,0,1);{
  1062. sp = laAddSubGroup(p, "root_objects", "Root Objects", "List of all root objects", "tns_root_object",0,0,0,-1,0,0,0,0,0,0,offsetof(tnsWorld, RootObjects), 0);
  1063. laSubGroupDetachable(sp, tnsget_detached_FirstRootObject, laget_ListNext);
  1064. 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);
  1065. 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);
  1066. laSubGroupExtraFunctions(sp,tnsfilter_SavableObject,tnsfilter_SavableObject,0,0,0);
  1067. 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);
  1068. laSubGroupDetachable(sp, tnsget_detached_FirstMaterial, laget_ListNext);
  1069. 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);{
  1070. laAddEnumItemAs(ep, "ROOT", "Root", "Display root object properties",0,0);
  1071. laAddEnumItemAs(ep, "OBJECT", "Object", "Display object properties",1,0);
  1072. }
  1073. }
  1074. p = laAddPropertyContainer("tns_child_object", "Child Object", "Child object linker", 0,0,sizeof(laListItemPointer), 0,0,0);{
  1075. 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);
  1076. }
  1077. p = laAddPropertyContainer("tns_material", "Material" "Object material", 0,0,0,sizeof(tnsMaterial),tnspost_Material,0,2);{
  1078. TNS_PC_MATERIAL=p;
  1079. 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);
  1080. 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,0);
  1081. 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,0);
  1082. 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);{
  1083. laAddEnumItemAs(ep, "NONE", "None", "Display materials normally",0,0);
  1084. laAddEnumItemAs(ep, "COLORFUL", "Colorful", "Display material with colorful halftone",1,0);
  1085. }
  1086. 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);{
  1087. laAddEnumItemAs(ep, "NONE", "None", "Use as normal material",0,0);
  1088. laAddEnumItemAs(ep, "LIBRARY", "LIBRARY", "As commom library",1,0);
  1089. }
  1090. 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);
  1091. laAddEnumItemAs(ep,"NONE","None","Don't do any gradient",0,0);
  1092. laAddEnumItemAs(ep,"LINEAR","Linear","Do linear gradient",TNS_GRADIENT_MODE_LINEAR,0);
  1093. laAddEnumItemAs(ep,"BOX","Box","Do box gradient",TNS_GRADIENT_MODE_BOX,0);
  1094. laAddEnumItemAs(ep,"RADIAL","Radial","Do radial gradient",TNS_GRADIENT_MODE_RADIAL,0);
  1095. 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,0);
  1096. 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,0);
  1097. 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,0);
  1098. 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,0);
  1099. 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);
  1100. laAddOperatorProperty(p,"refresh","Refresh","Refresh material shader","M_refresh_material_shader",L'🗘',0);
  1101. laAddOperatorProperty(p,"remove","Remove","Remove this material","M_remove_material",L'🗴',0);
  1102. }
  1103. p = laAddPropertyContainer("tns_material_slot", "Material Slot" "Material Slot", 0,0,0,sizeof(tnsMaterialSlot),0,0,1);{
  1104. TNS_PC_MATERIAL_SLOT=p;
  1105. 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);
  1106. 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);
  1107. 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);
  1108. 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);
  1109. laAddOperatorProperty(p,"remove","Remove","Remove this material slot","M_remove_material_slot",L'🗴',0);
  1110. }
  1111. p = laAddPropertyContainer("tns_object", "Object", "3D Object Item", 0,tnsui_BaseObjectProperties,sizeof(tnsObject), tnspost_Object, 0,2);{
  1112. laContainerAnimationFunctions(p,laaction_VerifyRootObject);
  1113. TNS_PC_OBJECT_GENERIC=p;
  1114. 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);
  1115. 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);
  1116. 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);{
  1117. laAddEnumItem(ep, "false", "False", "False", U'🌔');
  1118. laAddEnumItem(ep, "true", "IsTrue", "IsTrue", U'🌑');
  1119. }
  1120. 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);{
  1121. laAddEnumItem(ep, "false", "False", "False", U'🚫');
  1122. laAddEnumItem(ep, "true", "IsTrue", "IsTrue", U'📷');
  1123. }
  1124. 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);{
  1125. laAddEnumItemAs(ep, "ROOT", "Root", "Root object", TNS_OBJECT_ROOT, 0);
  1126. laAddEnumItemAs(ep, "INSTANCER", "Instancer", "Instancer object", TNS_OBJECT_INSTANCER, 0);
  1127. laAddEnumItemAs(ep, "CAMERA", "Camera", "Camera object, to render a scene", TNS_OBJECT_CAMERA, U'📷');
  1128. laAddEnumItemAs(ep, "LIGHT", "Lamp", "Lamp object, to illuminate the scene", TNS_OBJECT_LIGHT, 0);
  1129. laAddEnumItemAs(ep, "MESH", "Mesh", "Mesh object, made of verts/edges/faces", TNS_OBJECT_MESH, 0);
  1130. laAddEnumItemAs(ep, "SHAPE", "Shape", "Shape object, 2d boundary", TNS_OBJECT_SHAPE, 0);
  1131. }
  1132. 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);
  1133. 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);
  1134. 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);
  1135. 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);
  1136. 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);
  1137. 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);
  1138. 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);
  1139. 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);
  1140. 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);
  1141. 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);
  1142. 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);
  1143. 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);{
  1144. laAddEnumItem(ep, "xyz", "XYZ", "XYZ Euler Mode", 0); laAddEnumItem(ep, "xzy", "XZY", "XZY Euler Mode", 0);
  1145. laAddEnumItem(ep, "yxz", "YXZ", "YXZ Euler Mode", 0); laAddEnumItem(ep, "yzx", "YZX", "YZX Euler Mode", 0);
  1146. laAddEnumItem(ep, "zxy", "ZXY", "ZXY Euler Mode", 0); laAddEnumItem(ep, "zyx", "ZYX", "ZYX Euler Mode", 0);
  1147. laAddEnumItem(ep, "quaternion", "Quaternion", "Quaternion Mode", 0);
  1148. }
  1149. 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);
  1150. 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);
  1151. laAddSubGroup(p, "parent", "Parent", "Object parent", "tns_object",0,0,0,offsetof(tnsObject, ParentObject), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1152. 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);
  1153. 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);
  1154. laAddOperatorProperty(p, "add_driver_page", "Add Page", "Add a driver page","LA_add_driver_page",'+',0);
  1155. 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);
  1156. 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);
  1157. }
  1158. p = laAddPropertyContainer("tns_root_object", "Root Object", "Root object", 0, tnsui_RootObjectProperties,sizeof(tnsRootObject), 0,0,2);{
  1159. laPropContainerExtraFunctions(p,0,0,tnstouched_Object,tnspropagate_Object,tnsui_RootObjectMenuUi);
  1160. TNS_PC_OBJECT_ROOT=p;
  1161. 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);
  1162. laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,0,0,0,0,0,0,0,0,LA_UDF_LOCAL);
  1163. 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);
  1164. 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);
  1165. laAddSubGroup(p, "active_camera", "Active Camera", "Active camera of this root object", "tns_object",0,0,0,offsetof(tnsRootObject, ActiveCamera),0,0,0,0,0,0,0,LA_UDF_REFER|LA_READ_ONLY);
  1166. 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);{
  1167. laAddEnumItemAs(ep, "3D", "3D", "Root object is in 3D", 0, 0);
  1168. laAddEnumItemAs(ep, "2D", "2D", "Root object is in 2D", 1, 0);
  1169. }
  1170. laAddOperatorProperty(p, "remove_root", "Remove root", "Remove the root node","M_remove_root",L'🗴',0);
  1171. }
  1172. p = laAddPropertyContainer("tns_instancer", "Instancer", "Instance placeholder object", U'📎', tnsui_InstancerObjectProperties,sizeof(tnsInstancer), 0,0,2);{
  1173. laPropContainerExtraFunctions(p,0,0,tnstouched_Object,0/*tnspropagate_Object*/,0);
  1174. TNS_PC_OBJECT_INSTANCER=p;
  1175. 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);
  1176. laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,0,0,0,0,0,0,0,0,LA_UDF_LOCAL);
  1177. 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);
  1178. 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);{
  1179. laAddEnumItemAs(ep, "NONE", "None", "Doesn't hook to anything, use instancer x,y coordinates", 0, 0);
  1180. laAddEnumItemAs(ep, "TL", "Top Left", "Hook to top left", TNS_INSTANCER_HOOK_TL, L'🡤');
  1181. laAddEnumItemAs(ep, "TC", "Top Center", "Hook to top center", TNS_INSTANCER_HOOK_TC, L'🡡');
  1182. laAddEnumItemAs(ep, "TR", "Top Right", "Hook to top right", TNS_INSTANCER_HOOK_TR, L'🡥');
  1183. laAddEnumItemAs(ep, "CL", "Center Left", "Hook to center left", TNS_INSTANCER_HOOK_CL, L'🡠');
  1184. laAddEnumItemAs(ep, "CC", "Center", "Hook to center", TNS_INSTANCER_HOOK_CC, L'🞆');
  1185. laAddEnumItemAs(ep, "CR", "Center Right", "Hook to center right", TNS_INSTANCER_HOOK_CR, L'🡢');
  1186. laAddEnumItemAs(ep, "BL", "Bottom Left", "Hook to bottom left", TNS_INSTANCER_HOOK_BL, L'🡧');
  1187. laAddEnumItemAs(ep, "BC", "Bottom Center", "Hook to bottom center", TNS_INSTANCER_HOOK_BC, L'🡣');
  1188. laAddEnumItemAs(ep, "BR", "Bottom Right", "Hook to bottom right", TNS_INSTANCER_HOOK_BR, L'🡦');
  1189. }
  1190. 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);
  1191. }
  1192. p = laAddPropertyContainer("tns_mesh_object", "Mesh Object", "Mesh object", 0,tnsui_MeshObjectProperties,sizeof(tnsMeshObject), tnspost_Object, 0,2);{
  1193. laPropContainerExtraFunctions(p,0,0,tnstouched_Object,0/*tnspropagate_Object*/,0);
  1194. TNS_PC_OBJECT_MESH=p;
  1195. 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);
  1196. laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,0,0,0,0,0,0,0,0,LA_UDF_LOCAL);
  1197. 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);{
  1198. laAddEnumItemAs(ep, "OBJECT", "Object", "Object mode", TNS_MESH_OBJECT_MODE, 0);
  1199. laAddEnumItemAs(ep, "EDIT", "Edit", "Edit mode", TNS_MESH_EDIT_MODE, 0);
  1200. }
  1201. 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);
  1202. 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);
  1203. 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);
  1204. 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);
  1205. 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);
  1206. 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);
  1207. 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);
  1208. 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);
  1209. 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);
  1210. laAddRawProperty(p, "v", "Verts", "Verts", offsetof(tnsMeshObject, v), tnsget_MeshObjectVertSize, 0,0,LA_READ_ONLY);
  1211. laAddRawProperty(p, "e", "Edges", "Edges", offsetof(tnsMeshObject, e), tnsget_MeshObjectEdgeSize, 0,0,LA_READ_ONLY);
  1212. laAddRawProperty(p, "f", "Faces", "Faces", offsetof(tnsMeshObject, f), 0,tnsget_MeshObjectFaceRaw, tnsset_MeshObjectFaceRaw, LA_READ_ONLY);
  1213. //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);
  1214. //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);
  1215. //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);
  1216. 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);
  1217. 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);
  1218. laAddOperatorProperty(p,"add_material_slot","Add Material Slot","Add a material slot into this object","M_new_material_slot",L'+',0);
  1219. laAddOperatorProperty(p,"add_material","Add Material","Add a new material to this material slot","M_new_material",'+',0);
  1220. laAddOperatorProperty(p,"assign_material_slot","Assign Material Slot","Assign faces to a current slot","M_assign_material_slot",L'🖌',0);
  1221. }
  1222. p = laAddPropertyContainer("tns_camera", "Camera", "Camera object", U'📷', tnsui_CameraObjectProperties,sizeof(tnsCamera), 0,0,2);{
  1223. //laPropContainerExtraFunctions(p,0,0,0,tnspropagate_Object,0);
  1224. TNS_PC_OBJECT_CAMERA=p;
  1225. 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);
  1226. laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,0,0,0,0,0,0,0,0,LA_UDF_LOCAL);
  1227. 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);{
  1228. laAddEnumItem(ep, "PERSP", "Perspective", "Camera in linear perspective", 0);
  1229. laAddEnumItem(ep, "ORTHO", "Orthographic", "Camera in orthographic view", 0);
  1230. }
  1231. 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);
  1232. 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);
  1233. 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);
  1234. 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);
  1235. //laAddOperatorProperty(p, "set_active", "Set Active", "Set this camera as the active one", "TNS_set_active_camera", 0,0);
  1236. }
  1237. p = laAddPropertyContainer("tns_light", "Light", "Light object", U'🔅', tnsui_LightObjectProperties,sizeof(tnsLight), 0,0,2);{
  1238. //laPropContainerExtraFunctions(p,0,0,0,tnspropagate_Object,0);
  1239. TNS_PC_OBJECT_LIGHT=p;
  1240. 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);
  1241. laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,0,0,0,0,0,0,0,0,LA_UDF_LOCAL);
  1242. 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);{
  1243. laAddEnumItem(ep, "NONE", "Perspective", "Camera in linear perspective", 0);
  1244. laAddEnumItem(ep, "orthographic", "Orthographic", "Camera in orthographic view", 0);
  1245. }
  1246. }
  1247. p = laAddPropertyContainer("tns_shape_object", "Shape Object", "Shape object", 0,tnsui_ShapeObjectProperties,sizeof(tnsShapeObject), tnspost_Object, 0,2);{
  1248. laPropContainerExtraFunctions(p,0,0,tnstouched_Object,0/*tnspropagate_Object*/,0);
  1249. TNS_PC_OBJECT_SHAPE=p;
  1250. 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);
  1251. laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,0,0,0,0,0,0,0,0,LA_UDF_LOCAL);
  1252. 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);{
  1253. laAddEnumItemAs(ep, "OBJECT", "Object", "Object mode", TNS_MESH_OBJECT_MODE, 0);
  1254. laAddEnumItemAs(ep, "EDIT", "Edit", "Edit mode", TNS_MESH_EDIT_MODE, 0);
  1255. }
  1256. 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);{
  1257. laAddEnumItemAs(ep, "NONE", "None", "Draw shape on top of stuff", 0, 0);
  1258. laAddEnumItemAs(ep, "BACKDROP", "Backdrop", "Draw shape as backdrop", 1, 0);
  1259. }
  1260. 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);
  1261. 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);
  1262. 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);
  1263. laAddOperatorProperty(p,"add_material_slot","Add Material Slot","Add a material slot into this object","M_new_material_slot",L'+',0);
  1264. laAddOperatorProperty(p,"add_material","Add Material","Add a new material to this material slot","M_new_material",'+',0);
  1265. laAddOperatorProperty(p,"assign_material_slot","Assign Material Slot","Assign shapes to a current slot","M_assign_material_slot",L'🖌',0);
  1266. }
  1267. p = laAddPropertyContainer("tns_mvert", "MVert", "MMesh vert", 0,0,sizeof(tnsMVert), 0,0,0);{
  1268. 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);
  1269. 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);
  1270. 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);
  1271. 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);
  1272. laAddSubGroup(p, "elink", "Edge Link", "Edge link", "tns_medge_link",0,0,0,-1,0,0,0,0,0,0,offsetof(tnsMVert, elink),0);
  1273. }
  1274. p = laAddPropertyContainer("tns_medge", "MEdge", "MMesh edge", 0,0,sizeof(tnsMEdge), 0,0,0);{
  1275. 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);
  1276. 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);
  1277. laAddSubGroup(p, "vl", "vl", "Left vert", "tns_mvert",0,0,0,offsetof(tnsMEdge, vl),0,0,0,0,0,0,0,LA_UDF_REFER);
  1278. laAddSubGroup(p, "vr", "vr", "Right vert", "tns_mvert",0,0,0,offsetof(tnsMEdge, vr),0,0,0,0,0,0,0,LA_UDF_REFER);
  1279. laAddSubGroup(p, "fl", "fl", "Left face", "tns_mface",0,0,0,offsetof(tnsMEdge, fl),0,0,0,0,0,0,0,LA_UDF_REFER);
  1280. laAddSubGroup(p, "fr", "fr", "Right face", "tns_mface",0,0,0,offsetof(tnsMEdge, fr),0,0,0,0,0,0,0,LA_UDF_REFER);
  1281. }
  1282. p = laAddPropertyContainer("tns_mface", "MFace", "MMesh face", 0,0,sizeof(tnsMFace), 0,0,0);{
  1283. 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);
  1284. 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);
  1285. laAddSubGroup(p, "l", "Loop", "Loop", "tns_loop",0,0,0,-1,0,0,0,0,0,0,offsetof(tnsMFace, l),0);
  1286. 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;
  1287. 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;
  1288. 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);
  1289. //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);
  1290. 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);
  1291. }
  1292. p = laAddPropertyContainer("tns_medge_link", "MEdge Link", "MEdge Link", 0,0,sizeof(laListItemPointer), 0,0,0);{
  1293. laAddSubGroup(p, "e", "Edge", "Edge", "tns_medge",0,0,0,offsetof(laListItemPointer, p),0,0,0,0,0,0,0,LA_UDF_REFER);
  1294. }
  1295. p = laAddPropertyContainer("tns_loop", "MFace Loop", "MFace Loop", 0,0,sizeof(laListItemPointer), 0,0,0);{
  1296. laAddSubGroup(p, "e", "Edge", "Edge", "tns_medge",0,0,0,offsetof(laListItemPointer, p),0,0,0,0,0,0,0,LA_UDF_REFER);
  1297. }
  1298. p = laAddPropertyContainer("tns_shape", "Shape", "Shape data structure", 0,0,sizeof(tnsShape), 0,0,0);{
  1299. 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;
  1300. 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);
  1301. laAddSubGroup(p, "points", "Points", "Points in this shape", "tns_spoint",0,0,0,-1,0,0,0,0,0,0,offsetof(tnsShape, Points),0);
  1302. }
  1303. p = laAddPropertyContainer("tns_spoint", "SPoint", "Shape point", 0,0,sizeof(tnsSPoint), 0,0,0);{
  1304. 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);
  1305. 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);
  1306. 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);
  1307. 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);
  1308. }
  1309. }
  1310. void la_RegisterInternalProps(){
  1311. laPropContainer *p, *ip, *p2, *ip2, *sp1, *sp2;
  1312. laProp *ep; laPropPack pp; laSubProp *sp; laKeyMapper *km;
  1313. laCanvasTemplate *v2dt;
  1314. {
  1315. la_UDFAppendSharedTypePointer("_LA_ROOT_NODE_", &MAIN);
  1316. la_UDFAppendSharedTypePointer("_TNS_ROOT_NODE_", T);
  1317. // THEME ==================================================================================================
  1318. {
  1319. p = laDefineRoot();
  1320. laAddPropertyContainer("any_pointer", "Any Pointer", "A pointer that is not exposed to access", 0,0,sizeof(void*), 0,0,LA_PROP_OTHER_ALLOC);
  1321. laAddPropertyContainer("any_pointer_h2", "Any Pointer (h2)", "A pointer that is not exposed to access", 0,0,sizeof(void*), 0,0,2);
  1322. 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);
  1323. 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);
  1324. 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);{
  1325. laAddStringProperty(p, "name", "Name", "Boxed Theme Name", 0,0,0,0,1, offsetof(laBoxedTheme, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  1326. 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);
  1327. 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);
  1328. 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);
  1329. 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);
  1330. 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);
  1331. 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);
  1332. 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);
  1333. 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);
  1334. 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);
  1335. laAddSubGroup(p, "parent", "Parent", "Parent Theme", "theme",0,0,0,offsetof(laBoxedTheme, Parent), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1336. }
  1337. p = laAddPropertyContainer("theme", "Theme Package", "A Package With ALl Types Of Theme For Ui Items", 0,laui_Theme, sizeof(laTheme), 0,0,2);{
  1338. laAddStringProperty(p, "name", "Name", "Theme Name", 0,0,0,0,1, offsetof(laTheme, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  1339. laAddStringProperty(p, "author", "Author", "The Author's Name", 0,0,0,0,1, offsetof(laTheme, Author), 0,0,0,0,0);
  1340. 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);
  1341. 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);
  1342. 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);
  1343. 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);
  1344. 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);
  1345. 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);
  1346. 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);
  1347. 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);
  1348. 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);
  1349. 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);
  1350. 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);
  1351. 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);
  1352. 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);
  1353. 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);
  1354. 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);
  1355. 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);
  1356. 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);
  1357. laAddOperatorProperty(p, "delete", "Delete", "Delete this theme", "LA_delete_theme", 0,0);
  1358. }
  1359. }
  1360. // TIME INFO =========================================================================================
  1361. p = laAddPropertyContainer("time_info", "Time Info", "Time Information Y/M/D/H/M/S", U'🕒', 0,sizeof(laTimeInfo), 0,0,LA_PROP_OTHER_ALLOC);{
  1362. 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);
  1363. 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);
  1364. 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);
  1365. 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);
  1366. 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);
  1367. 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);
  1368. 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);
  1369. }
  1370. // LA MAIN =========================================================================================
  1371. p = laAddPropertyContainer("la_main", "LA Root", "LA Root Structure", U'🖴', 0,sizeof(LA), 0,0,2|LA_PROP_OTHER_ALLOC);{
  1372. 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);
  1373. 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);
  1374. 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);
  1375. laAddEnumItemAs(ep, "NONE", "None", "Terminal status is normal", 0, 0);
  1376. laAddEnumItemAs(ep, "INCOMPLETE", "Incomplete", "Terminal has incomplete input pending", 1, 0);
  1377. 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);
  1378. 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);
  1379. _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);
  1380. la_UDFAppendSharedTypePointer("_LA_PROP_WINDOW", _LA_PROP_WINDOW);
  1381. laAddSubGroup(p, "data", "Data", "Data Root Control", "property_container",0,0,0,offsetof(LA, DataRoot.Root), 0,0,0,0,0,0,0,0);
  1382. 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);
  1383. 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);
  1384. 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);
  1385. 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);
  1386. laSubGroupExtraFunctions(sp,0,0,0,0,laget_PanelTemplateCategory);
  1387. 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);
  1388. 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);
  1389. laSubGroupDetachable(sp, laget_DetachedControllerFirst, laget_ListNext);
  1390. LA_PROP_CONTROLLER=sp;
  1391. 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);
  1392. laSubGroupExtraFunctions(sp,lafilter_NodeCategory,0,0,0,0);
  1393. laAddSubGroup(p, "input_mapping", "Input Mapping", "Input mapping page collection","la_input_mapping_collection",0,0,0,offsetof(LA,InputMapping),0,0,0,0,0,0,0,LA_UDF_SINGLE);
  1394. laAddSubGroup(p, "animation", "Animation", "Animation data","la_animation",0,0,0,offsetof(LA,Animation),0,0,0,0,0,0,0,LA_UDF_SINGLE);
  1395. 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);
  1396. laAddStringProperty(p, "identifier", "Identifier", "Identifier", 0,0,0,0,0,0,0,laget_MainIdentifier, 0,0,LA_AS_IDENTIFIER|LA_READ_ONLY);
  1397. laAddSubGroup(p, "test_ucn", "TEST UCN", "---", "udf_content_node",0,0,0,offsetof(LA, TEST_Link), 0,0,0,0,0,0,0,0);
  1398. 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);
  1399. laAddEnumItemAs(ep, "LINKED", "Linked", "View is linked to global current states", 0, U'🔗');
  1400. laAddEnumItemAs(ep, "DETACHED", "Detached", "View is detached from global states and is pinned to panel", 1, U'📌');
  1401. 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);
  1402. laAddStringProperty(p, "example_string", "Example String", "Example string", 0,0,0,0,1, offsetof(LA,example_string), 0,0,0,0,0);
  1403. 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.",
  1404. LA_WIDGET_STRING_PLAIN, 0,0,0,0,0,0,laget_UnknownPropertyString, 0,0,LA_READ_ONLY);
  1405. }
  1406. if(MAIN.InitArgs.HasAudio){
  1407. p = laAddPropertyContainer("la_audio", "Audio", "Audio management", 0,0, sizeof(laAudio), 0,0,1);{
  1408. laAddSubGroup(p,"synths","Synthesizers","Synthesizers","la_synth",0,0,0,-1,0,0,0,0,0,0,offsetof(laAudio,Synths),0);
  1409. 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);
  1410. laSubGroupDetachable(sp,laget_FirstSynth,laget_ListNext);
  1411. 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),0);
  1412. 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);
  1413. }
  1414. }
  1415. p = laAddPropertyContainer("la_node_category", "Node Category", "Node category", 0,laui_IdentifierOnly, sizeof(laNodeCategory), 0,0,1);{
  1416. 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);
  1417. 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);
  1418. }
  1419. p = laAddPropertyContainer("la_input_mapping_collection", "Input Mapping Collection", "Input mapping collection", 0,0,sizeof(laRackPageCollection), 0,0,1);{
  1420. laAddSubGroup(p, "pages", "Pages", "Rack pages","la_rack_page",0,0,0,offsetof(laRackPageCollection,CurrentPage),0,0,0,0,0,0,offsetof(laRackPageCollection,Pages),0);
  1421. laAddSubGroup(p, "current_page", "Current Page", "Current page","la_rack_page",0,0,0,offsetof(laRackPageCollection,CurrentPage),0,0,0,0,0,0,0,LA_UDF_REFER);
  1422. }
  1423. p = laAddPropertyContainer("la_driver_collection", "Driver Collection", "Driver collection", 0,0,sizeof(laRackPageCollection), 0,0,1);{
  1424. laAddSubGroup(p, "pages", "Pages", "Rack pages","la_rack_page",0,0,0,-1,0,laget_CurrentRackPage,0,0,0,0,offsetof(laRackPageCollection,Pages),0);
  1425. 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);
  1426. //laSubGroupDetachable(sp,laget_FirstDriverPage,laget_ListNext);
  1427. }
  1428. p = laAddPropertyContainer("la_rack_page", "Rack Page", "A page of nodes", 0,laui_IdentifierOnly, sizeof(laRackPage),lapost_RackPage,0,1);{
  1429. LA_PC_RACK_PAGE = p;
  1430. laPropContainerExtraFunctions(p,0,lareset_RackPage,0,0,0);
  1431. laAddStringProperty(p, "name", "Name", "Name of the page", 0,0,0,0,1, offsetof(laRackPage, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  1432. 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);
  1433. 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);
  1434. laAddSubGroup(p, "racks", "Racks", "Racks for nodes","la_node_rack",0,0,0,-1,0,0,0,0,0,0,offsetof(laRackPage,Racks),0);
  1435. if(MAIN.InitArgs.HasWorldObjects){
  1436. 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);
  1437. }
  1438. 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);
  1439. laAddEnumItemAs(ep, "ALWAYS", "Always", "Always evalueave this page",LA_PAGE_TRIGGER_ALWAYS,0);
  1440. laAddEnumItemAs(ep, "NONE", "None", "This page is only evaluated when called from other pages",LA_PAGE_TRIGGER_NONE,0);
  1441. 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);
  1442. laAddEnumItemAs(ep, "NODES", "Nodes", "Use nodes to express logic",0,0);
  1443. laAddEnumItemAs(ep, "SCRIPT", "Script", "Use scripts to express logic",1,L'📃');
  1444. laAddStringProperty(p, "script", "Script", "Script content",LA_WIDGET_STRING_MULTI,0,0,0,1,offsetof(laRackPage, Script), 0,0,0,0,0);
  1445. laAddOperatorProperty(p,"add_rack","Add Rack", "Add a rack into the page", "LA_add_rack", '+', 0);
  1446. laAddOperatorProperty(p,"remove_driver_page","Remove Page", "Remove this page", "LA_remove_driver_page", L'🗴', 0);
  1447. laAddOperatorProperty(p,"remove_input_mapping_page","Remove Page", "Remove this page", "LA_remove_input_mapping_page", L'🗴', 0);
  1448. }
  1449. //p = laAddPropertyContainer("udf_fail_node", "UDF Failed Node", "Single Wild Data Block Reference", laui_UDFFailNodeItem, sizeof(laUDFFailNode), 0,0,0,0,0); {
  1450. // laAddSubGroup(p, "instance", "Instance", "Actual Data Block Instance", "property_trash_item",0,0,0 Item.p), 0,0,0,0,0,0,0,0,
  1451. // 0,0,
  1452. // 0);
  1453. // 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,
  1454. // 0,0,
  1455. // 0);
  1456. //}
  1457. p = laAddPropertyContainer("la_difference", "Difference", "A difference stack item (undo/redo).", 0,laui_IdentifierOnly, sizeof(laDiff), 0,0,1);{
  1458. 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);
  1459. }
  1460. p = laAddPropertyContainer("la_log", "Resource Folder", "A resource folder to search for UDF references.", 0,laui_ResourceFolderItem, sizeof(laLogEntry), 0,0,1);{
  1461. 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);
  1462. }
  1463. p = laAddPropertyContainer("la_resource_folder", "Resource Folder", "A resource folder to search for UDF references.", 0,laui_ResourceFolderItem, sizeof(laResourceFolder), 0,0,1);{
  1464. laAddStringProperty(p, "path", "Path", "Path", 0,0,0,0,1, offsetof(laResourceFolder, Path), 0,0,laset_ResourcePath, 0,0);
  1465. laAddOperatorProperty(p, "remove", "Remove", "Remove this resource folder entry", "LA_remove_resource_folder", U'🞫', 0);
  1466. }
  1467. p = laAddPropertyContainer("managed_udf", "Managed UDF", "Managed UDF files", U'🖹', laui_ManagedUDFItem, sizeof(laManagedUDF), 0,0,0);{
  1468. 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);
  1469. 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);
  1470. }
  1471. p = laAddPropertyContainer("udf", "UDF File", "UDF file block", U'🖹', 0,sizeof(laUDF), 0,0,0);{
  1472. laAddStringProperty(p, "path", "Path", "File Path", 0,0,0,0,1, offsetof(laUDF, FileName), 0,0,0,0,LA_READ_ONLY);
  1473. 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);
  1474. laAddEnumItemAs(ep, "MODIFIED", "Modified", "There are unsaved changes bound to this file", 1, U'🌑');
  1475. laAddEnumItemAs(ep, "CLEAN", "Clean", "File data is untouched", 0,0);
  1476. ep->ElementBytes=2;
  1477. }
  1478. p = laAddPropertyContainer("udf_content_node", "UDF Content Node", "Type Structure For Previewing,Selecting,Linking UDF Contnet", U'🖹', 0,0,0,0,0);{
  1479. laAddStringProperty(p, "full_path", "Full Path", "Full Path", 0,0,0,0,0,0,0,laget_UDFContentNodeFullPath, 0,0,LA_READ_ONLY);
  1480. laAddStringProperty(p, "identifier", "Identifier", "Self Identifier", 0,0,0,0,0,0,0,laget_UDFContentNodeIdentifier, 0,0,LA_AS_IDENTIFIER|LA_READ_ONLY);
  1481. laAddIntProperty(p, "file_seek", "File Seek", "Prop Beginner's Location In The File", 0,0,0,0,0,0,0,0,offsetof(laUDFContentNode, FileSeek), 0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1482. laAddSubGroup(p, "instances", "Instances", "Instance Nodes (Only SubProps)", "udf_content_instance",0,0,0,-1, 0,0,0,0,0,0,offsetof(laUDFContentNode, Instances), 0);
  1483. laAddSubGroup(p, "parent", "Parent", "Parent Instance Node", "udf_content_node",0,0,0,offsetof(laUDFContentNode, Parent), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1484. laAddSubGroup(p, "pc", "Prop Container", "This Property Container", "property_package",0,0,0,offsetof(laUDFContentNode, PP), 0,0,0,0,0,0,0,LA_UDF_LOCAL | LA_UDF_REFER);
  1485. }
  1486. p = laAddPropertyContainer("udf_content_instance", "UDF Content Instance", "Instance/FileSeek Storage For Previewing,Selecting,Linking UDF Contnet", U'🖹', 0,0,0,0,0);{
  1487. laAddStringProperty(p, "identifier", "Identifier", "Self Identifier", 0,0,0,0,0,0,0,laget_UDFContentInstanceIdentifier, 0,0,LA_READ_ONLY);
  1488. laAddIntProperty(p, "file_seek", "File Seek", "Instance's Location In The File", 0,0,0,0,0,0,0,0,offsetof(laUDFContentInstance, FileSeek), 0,0,0,0,0,0,0,0,0,0,LA_AS_IDENTIFIER|LA_READ_ONLY);
  1489. laAddSubGroup(p, "children", "Children", "Child Properties (Only SubProps)", "udf_content_node",0,0,0,-1, 0,0,0,0,0,0,offsetof(laUDFContentInstance, Children), 0);
  1490. laAddSubGroup(p, "parent", "Parent", "Parent Property Node", "udf_content_node",0,0,0,offsetof(laUDFContentInstance, Parent), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1491. }
  1492. p = laAddPropertyContainer("managed_prop", "Managed Property", "Managed property for detecting changes for saving files", 0,0,sizeof(laManagedSaveProp), 0,0,0);{
  1493. laAddStringProperty(p, "path", "Path", "Property path", 0,0,0,0,1, offsetof(laManagedSaveProp, Path), 0,0,0,0,LA_READ_ONLY);
  1494. }
  1495. p = laAddPropertyContainer("int_property", "Int Property", "Int property specific info", U'i', laui_IntPropInfo, sizeof(laIntProp), 0,0,1);{
  1496. 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);
  1497. 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);
  1498. 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);
  1499. 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);
  1500. } MAIN.ContainerInt = p;
  1501. p = laAddPropertyContainer("float_property", "Float Property", "Float property specific info", U'i', laui_FloatPropInfo, sizeof(laFloatProp), 0,0,1);{
  1502. 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);
  1503. 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);
  1504. 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);
  1505. 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);
  1506. } MAIN.ContainerFloat = p;
  1507. // USER PREF ========================================================
  1508. 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);{
  1509. laPropContainerExtraFunctions(p,0,lareset_Main,0,0,0);
  1510. 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);
  1511. 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);
  1512. 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);
  1513. laAddIntProperty(p, "scroll_speed", "Scrolling Speed", "How Many Pixels 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);
  1514. 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);
  1515. 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);
  1516. 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);
  1517. 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);
  1518. 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);{
  1519. laAddEnumItemAs(ep, "none", "None", "Don't use multisample", 0,0);
  1520. laAddEnumItemAs(ep, "2", "2X", "2X multisample", 2, 0);
  1521. laAddEnumItemAs(ep, "4", "4X", "4X multisample", 4, 0);
  1522. laAddEnumItemAs(ep, "8", "8X", "8X multisample", 8, 0);
  1523. laAddEnumItemAs(ep, "16", "16X", "16X multisample", 16, 0);
  1524. }
  1525. 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);
  1526. laAddEnumItemAs(ep, "DISABLED", "Disabled", "OpenGL debug output is disabled", 0, 0);
  1527. laAddEnumItemAs(ep, "ENABLED", "Enabled", "Will print OpenGL debug information to the system terminal", 1, 0);
  1528. 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);
  1529. laAddEnumItemAs(ep, "DISABLED", "Disabled", "OpenGL debug output will be printing freely", 0, 0);
  1530. laAddEnumItemAs(ep, "ENABLED", "Enabled", "OpenGL debug output will hold the gl-call until return", 1, 0);
  1531. 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);
  1532. laAddEnumItemAs(ep, "ALL", "ALL", "Show all debug messages", 0, 0);
  1533. laAddEnumItemAs(ep, "NOTE", "Note", "Show notifications", 1, 0);
  1534. laAddEnumItemAs(ep, "LOW", "Low", "Show low severity messages", 2, 0);
  1535. laAddEnumItemAs(ep, "MEDIUM", "Medium", "Show low severity messages", 3, 0);
  1536. laAddEnumItemAs(ep, "HIGH", "High", "Show high severity messages", 4, 0);
  1537. 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);
  1538. laAddEnumItemAs(ep, "DISABLED", "Disabled", "StdOut log only outputs necessary stuff", 0, 0);
  1539. laAddEnumItemAs(ep, "ENABLED", "Enabled", "Will print all logs to stdout", 1, 0);
  1540. 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);
  1541. laAddEnumItemAs(ep, "NONE", "None", "Do not do color management on the window", 0, 0);
  1542. laAddEnumItemAs(ep, "ENABLED", "Enabled", "Enable color management on the window", 1, 0);
  1543. 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);
  1544. 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);
  1545. 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);
  1546. 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);
  1547. 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);
  1548. 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);
  1549. 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);
  1550. laAddFloatProperty(p, "wire_saggyness", "Wire saggyness", "How saggy is a wire", 0,0,0,20,0,0.5, 5, 0,offsetof(LA, WireSaggyness), 0,laset_WireSaggyness, 0,0,0,0,0,0,0,0,0);
  1551. 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);{
  1552. laAddEnumItem(ep, "no", "No", "Use original english string", 0);
  1553. laAddEnumItem(ep, "yes", "Yes", "Use translated string", 0);
  1554. }
  1555. laAddSubGroup(p, "languages", "Language", "The language list in the software", "la_translation_language",0,0,laui_IdentifierOnly, offsetof(LA, Translation.CurrentLanguage), 0,0,0,0,0,0,offsetof(LA, Translation.Languages),LA_UDF_IGNORE);
  1556. 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);
  1557. 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);{
  1558. laAddEnumItemAs(ep, "DATA_BLOCKS", "Data Blocks", "All data blocks", 0,0);
  1559. laAddEnumItemAs(ep, "FILES", "Files", "All Files", 1, 0);
  1560. }
  1561. 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);{
  1562. laAddEnumItemAs(ep, "NONE", "Don't save", "Not saving user preferences on exit", 0,0);
  1563. laAddEnumItemAs(ep, "SAVE", "Save", "Saving user preferences on exit", 1, 0);
  1564. }
  1565. 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);
  1566. 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);
  1567. 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); {
  1568. laAddEnumItemAs(ep, "WINDOWS_INK", "Windows Ink", "Use Windows Ink pressure events (WM_POINTERUPDATE).", 0, 0);
  1569. laAddEnumItemAs(ep, "WINTAB", "WinTab", "Use wacom WinTab driver to read pressure events (WT_PACKET).", 1, 0);
  1570. }
  1571. 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);
  1572. 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);
  1573. 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);
  1574. laAddStringProperty(p,"theme_name","Theme Name","Using theme name",0,0,0,0,0,0,0,laget_UsingTheme,0,laread_UsingTheme,0);
  1575. }
  1576. p = laAddPropertyContainer("la_translation_language", "Language", "Translation language pack", 0,0,sizeof(laTranslationNode), 0,0,1);{
  1577. laAddStringProperty(p, "name", "Name", "The name of this language", 0,0,0,"Unknown", 1, offsetof(laTranslationNode, LanguageName), 0,0,0,0,LA_AS_IDENTIFIER);
  1578. }
  1579. p = laAddPropertyContainer("la_extension_type", "Extension Type", "File extension and its matching type for file filtering", 0,0,sizeof(laExtensionType), 0,0,0);{
  1580. 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);
  1581. }
  1582. // UI WINDOW ========================================================================================
  1583. p = laAddPropertyContainer("ui_window", "SYSWINDOW Node", "Property Container For A System SYSWINDOW", 0,0, sizeof(laWindow), lapost_Window, lapostim_Window,1);{
  1584. 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);
  1585. 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);
  1586. _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);
  1587. la_UDFAppendSharedTypePointer("_LA_PROP_PANEL", _LA_PROP_PANEL);
  1588. 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);
  1589. 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);
  1590. 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);
  1591. 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);
  1592. 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);
  1593. 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);
  1594. 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);
  1595. 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);{
  1596. laAddEnumItemAs(ep, "SRGB", "sRGB", "Standard sRGB diplay", TNS_COLOR_SPACE_SRGB, 0);
  1597. laAddEnumItemAs(ep, "CLAY", "Clay", "Clay color space (AdobeRGB 1998 compatible)", TNS_COLOR_SPACE_CLAY, 0);
  1598. }
  1599. 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);{
  1600. laAddEnumItemAs(ep, "NONE", "None", "Don't show overflow", 0,0);
  1601. laAddEnumItemAs(ep, "STRIPES", "Stripes", "Show overflowing colors as stripes", 1, 0);
  1602. }
  1603. 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);{
  1604. laAddEnumItemAs(ep, "NONE", "None", "Do not use composing", 0, 0);
  1605. laAddEnumItemAs(ep, "SUN", "Sun", "Compose with outdoor sunlight options", 1, 0);
  1606. }
  1607. 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);
  1608. 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);
  1609. 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);
  1610. }
  1611. // UI LAYOUT ========================================================================================
  1612. p = laAddPropertyContainer("ui_block", "Ui Block", "Property container for single ui block", 0,0, sizeof(laBlock), lapost_Block,0,1);{
  1613. 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);
  1614. 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);
  1615. 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);
  1616. 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);
  1617. 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);
  1618. 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);
  1619. 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);
  1620. 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);
  1621. 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);
  1622. laAddOperatorProperty(p, "fold", "Fold", "Fold the title bar", "LA_block_fold_title", 0,0);
  1623. laAddOperatorProperty(p, "maximize", "Maximize", "Maximize the block", "LA_block_maximize", 0,0);
  1624. }
  1625. p = laAddPropertyContainer("ui_layout", "Layout Node", "Property Container For Single Layout", 0,laui_LayoutListItem, sizeof(laLayout), 0,0,1);{
  1626. 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);
  1627. _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);
  1628. la_UDFAppendSharedTypePointer("_LA_PROP_BLOCK", _LA_PROP_BLOCK);
  1629. }
  1630. // UI PANEL =========================================================================================
  1631. p = laAddPropertyContainer("ui_panel", "Panel Node", "Property Container For General Panels", 0,laui_PanelListItem, sizeof(laPanel), lapost_Panel, 0,1);{
  1632. 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);
  1633. 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);
  1634. 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);
  1635. laAddIntProperty(p, "real_xywh", "Real Placemnt", "Placeent 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);
  1636. 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);{
  1637. laAddEnumItem(ep, "no", "No Snap", "Not Snapped to edge", 0);
  1638. laAddEnumItem(ep, "yes", "Snap", "Snapped to edge", U'🞉');
  1639. } //don't swap order with the one below
  1640. 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);
  1641. 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);
  1642. 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);
  1643. 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);{
  1644. ep->ElementBytes = 1;
  1645. laAddEnumItem(ep, "false", "False", "Not A Menu Panel", U'🞫');
  1646. laAddEnumItem(ep, "true", "IsTrue", "Is A Menu Panel", U'🗩');
  1647. }
  1648. laAddOperatorProperty(p, "hide", "Hide", "Hide this panel", "LA_hide_panel", U'🗕', 0);
  1649. laAddOperatorProperty(p, "dock", "Dock", "Dock this panel", "LA_dock_panel", U'🗖', 0);
  1650. laAddOperatorProperty(p, "close", "Close", "Close this panel", "LA_block_close_panel", U'🞫', 0);
  1651. //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);
  1652. 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);
  1653. 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);
  1654. 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);
  1655. 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);
  1656. 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);
  1657. laAddSubGroup(p, "template","Template", "Panel template", "panel_template",0,0,0,offsetof(laPanel, PanelTemplate), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1658. 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);
  1659. }
  1660. // UI ITEM ==========================================================================================
  1661. p = laAddPropertyContainer("ui_list", "Ui List", "Property Container For Ui List Sub Type", U'⮑', 0,sizeof(laUiList), 0,0,0);{
  1662. laAddStringProperty(p, "tab_name", "Tab Name", "The Name Of A Tab", 0,0,0,0,0,0,0,0,0,0,LA_AS_IDENTIFIER);
  1663. _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);
  1664. la_UDFAppendSharedTypePointer("_LA_PROP_UI_ITEM", _LA_PROP_UI_ITEM);
  1665. 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);
  1666. 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);
  1667. 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);
  1668. 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)
  1669. ->ElementBytes = 2;
  1670. 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)
  1671. ->ElementBytes = 2;
  1672. }
  1673. p = laAddPropertyContainer("ui_instance", "Instance", "UiList Instance Entry", U'🗇', 0,sizeof(laColumn), 0,0,0);{
  1674. //nothing needed
  1675. }
  1676. p = laAddPropertyContainer("ui_column", "Ui Column", "A Column Handles The Aligning Of Ui Items", U'◫', laui_IdentifierOnly, sizeof(laColumn), 0,0,0);{
  1677. 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);
  1678. 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);
  1679. 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);
  1680. 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);
  1681. 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);{
  1682. laAddEnumItem(ep, "none", "None", "No Snapping", 0);
  1683. laAddEnumItem(ep, "left", "Left", "Snap At Left", U'⮄');
  1684. laAddEnumItem(ep, "right", "Right", "Snap At Right", U'⮆');
  1685. }
  1686. 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);
  1687. 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);
  1688. 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);
  1689. }
  1690. p = laAddPropertyContainer("panel_template", "Panel Template", "Panel template for creating new panels", 0,0,sizeof(laUiTemplate), 0,0,0);{
  1691. laAddStringProperty(p, "identifier", "Identifier", "Identifier Of This Template", 0,0,0,0,1, offsetof(laUiTemplate, Identifier), 0,0,0,0,LA_AS_IDENTIFIER);
  1692. laAddStringProperty(p, "title", "Title", "Panel title", 0,0,0,0,1, offsetof(laUiTemplate, Title), 0,0,0,0,LA_TRANSLATE);
  1693. 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);
  1694. }
  1695. p = laAddPropertyContainer("ui_item", "Ui Item", "Property Container For Ui Items", 0,0,sizeof(laUiItem), lapost_UiItem, lapostim_UiItem, 0);{
  1696. 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);
  1697. 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);
  1698. 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)
  1699. ->ElementBytes = sizeof(short);
  1700. laAddStringProperty(p, "path", "Path", "Data Path", 0,0,0,0,0,0,0,laget_UiDataPath, 0,laread_UiDataPath,LA_READ_ONLY);
  1701. 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);
  1702. 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);
  1703. 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);
  1704. 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);
  1705. 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);
  1706. 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);
  1707. 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);
  1708. 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);
  1709. 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);
  1710. laAddStringProperty(p, "extra_args", "Extra Arguments", "Extra Arguments For This Ui Item", 0,0,0,0,0,0,0,0,0,0,0);
  1711. laAddStringProperty(p, "display", "Display", "Display String For Label", 0,0,0,0,0,0,0,0,0,0,0);
  1712. laAddOperatorProperty(p, "maximize", "Maximize", "Maximize this UI item", "LA_canvas_ui_maximize", 0,0);
  1713. }
  1714. p = laAddPropertyContainer("ui_type", "Ui Type", "Ui Type Descriptor", 0,laui_IdentifierOnly, sizeof(laUiType), 0,0,0);{
  1715. 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);
  1716. }
  1717. // NODE ================================================================================================
  1718. p = laAddPropertyContainer("la_out_socket", "Output Socket", "Output socket for nodes", 0,0,sizeof(laNodeOutSocket), 0,0,1);{
  1719. laAddStringProperty(p, "label", "Label", "Socket's label", 0,0,0,0,1, offsetof(laNodeOutSocket, Label), 0,0,0,0,LA_AS_IDENTIFIER);
  1720. 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);
  1721. 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);
  1722. 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);
  1723. } LA_PC_SOCKET_OUT = p;
  1724. p = laAddPropertyContainer("la_in_socket", "Input Socket", "Input socket for nodest", 0,0,sizeof(laNodeInSocket), 0,0,1);{
  1725. laAddStringProperty(p, "label", "Label", "Socket's label", 0,0,0,0,1, offsetof(laNodeInSocket, Label), 0,0,0,0,LA_AS_IDENTIFIER);
  1726. 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);
  1727. LA_PROP_SOCKET_SOURCE=sp;
  1728. 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);
  1729. 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);
  1730. 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);
  1731. } LA_PC_SOCKET_IN = p;
  1732. laPropContainerExtraFunctions(p,0,0,latouched_NodeInSocket,0,0);
  1733. p = laAddPropertyContainer("la_value_mapper", "Value Mapper", "Value mapper", 0,0,sizeof(laValueMapper), 0,0,1);{
  1734. 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);
  1735. 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);
  1736. 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);
  1737. } LA_PC_MAPPER=p;
  1738. p = laAddPropertyContainer("la_value_mapper_point", "Value Mapper", "Value mapper", 0,0,sizeof(laValueMapperPoint), 0,0,1);{
  1739. 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);
  1740. }
  1741. // PROPERTIES ==========================================================================================
  1742. p = laAddPropertyContainer("property_item", "Property Item", "Property Item For Data Types Like Int/Float/Enum/String/SubType", U'🔌', 0,sizeof(laProp), 0,0,1);{
  1743. 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);
  1744. laAddStringProperty(p, "name", "Name", "Property Display Name", 0,0,0,0,0,offsetof(laProp, Name), 0,0,0,0,LA_READ_ONLY);
  1745. laAddStringProperty(p, "description", "Description", "Property Description", 0,0,0,0,0,offsetof(laProp, Description), 0,0,0,0,LA_READ_ONLY);
  1746. 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);
  1747. 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);
  1748. 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);
  1749. 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);
  1750. }
  1751. p = laAddPropertyContainer("property_container", "Property Container", "Property Container For Some Property Items", U'🔌', 0,sizeof(laPropContainer), 0,0,1);{
  1752. 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);
  1753. 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);
  1754. laAddStringProperty(p, "description", "Description", "Property Description", 0,0,0,0,0,offsetof(laPropContainer, Name), 0,0,0,0,LA_UDF_IGNORE|LA_READ_ONLY);
  1755. 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);
  1756. 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);
  1757. _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);
  1758. _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);
  1759. 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);
  1760. }
  1761. p = laAddPropertyContainer("property_trash_item", "Trash Item", "Single Trash Item", 0,0,0,0,0,0);{
  1762. 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);
  1763. 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);
  1764. laAddOperatorProperty(p, "restore", "Restore", "Restore Data Block To A User Selected Linkage", "LA_sub_restore_data_block", U'⭯', 0);
  1765. }
  1766. p = laAddPropertyContainer("property_package", "Property Package", "Property Package For Data Access (Mainly UI)", U'🔌', 0,sizeof(laPropPack), 0,0,0);{
  1767. 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);
  1768. }
  1769. p = laAddPropertyContainer("property_step", "Property Step", "Property Segment Item", 0,0,sizeof(laPropStep), 0,0,0);{
  1770. laAddSubGroup(p, "property", "Property", "Property Reference", "property_item",0,0,0,offsetof(laPropStep, p), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1771. }
  1772. p = laAddPropertyContainer("detached_prop", "Detached Prop", "Detached Prop", U'🔌', 0,sizeof(laSubProp) + 48, lapost_DetachedProp, 0,0);{
  1773. 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);
  1774. laAddStringProperty(p, "path", "Path", "Data Path", 0,0,0,0,0,0,0,laget_DetachedPropPath, 0,laread_DetachedPropPath, 0);
  1775. laAddStringProperty(p, "rename", "Rename", "Rename", 0,0,0,0,0,offsetof(laProp, Identifier), 0,0,0,laread_DetachedPropRename, 0);
  1776. }
  1777. p = laAddPropertyContainer("la_animation", "Animation", "Animation data",0,0,sizeof(laAnimation),0,0,1);{
  1778. 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),0);
  1779. laSubGroupExtraFunctions(sp,0,0,0,0,laget_AnimationActionHolderCategory);
  1780. 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);
  1781. 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);
  1782. 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);
  1783. laAddEnumItemAs(ep, "PAUSED", "Paused", "Animation is playing", LA_ANIMATION_STATUS_PAUSED, U'⏸');
  1784. laAddEnumItemAs(ep, "PLAY_FWD", "Playing", "File data is untouched", LA_ANIMATION_STATUS_PLAY_FWD,U'▶');
  1785. laAddEnumItemAs(ep, "PLAY_REV", "Reversing", "File data is untouched", LA_ANIMATION_STATUS_PLAY_REV,U'◀');
  1786. }
  1787. p = laAddPropertyContainer("la_animation_action", "Action", "Animation action",0,0,sizeof(laAction),0,0,1);{
  1788. laAddStringProperty(p,"name","Name","Name of the action",0,0,0,0,1,offsetof(laAction,Name),0,0,0,0,LA_AS_IDENTIFIER);
  1789. laAddSubGroup(p, "channels", "Channels", "Action channels", "la_animation_channel",0,0,0,-1,0,0,0,0,0,0,offsetof(laAction, Channels),0);
  1790. 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);
  1791. 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);
  1792. 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);
  1793. 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);
  1794. 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);
  1795. 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);{
  1796. laAddEnumItemAs(ep, "NONE", "None", "Not muted", 0,0);
  1797. laAddEnumItemAs(ep, "MUTE", "Mute", "Muted", 1,0);
  1798. }
  1799. 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);{
  1800. laAddEnumItemAs(ep, "NONE", "None", "Play this action with", 0,0);
  1801. laAddEnumItemAs(ep, "SOLO", "Solo", "Solo play", 1,0);
  1802. }
  1803. 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);{
  1804. laAddEnumItemAs(ep, "REPEAT", "Repeat", "Play action in repeat", LA_ANIMATION_PLAY_MODE_REPEAT, U'⮆');
  1805. laAddEnumItemAs(ep, "HOLD", "Hold", "Hold end values when time is outside time range", LA_ANIMATION_PLAY_MODE_HOLD,U'⭲');
  1806. laAddEnumItemAs(ep, "BOUNCE", "Bounce", "Play action back and forth", LA_ANIMATION_PLAY_MODE_BOUNCE,U'⮀');
  1807. }
  1808. 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);{
  1809. laAddEnumItemAs(ep, "REPLACE", "Replace", "Replace previously set values", LA_ANIMATION_MIX_REPLACE,0);
  1810. laAddEnumItemAs(ep, "ADD", "Add", "Add on top of previously set values", LA_ANIMATION_MIX_ADD,0);
  1811. }
  1812. laAddOperatorProperty(p,"remove","Remove","Remove this action","LA_animation_remove_action",L'🞫',0);
  1813. }
  1814. p = laAddPropertyContainer("la_animation_channel", "Channel", "Action channel",0,0,sizeof(laActionChannel),0,0,1);{
  1815. laAddSubGroup(p, "keys", "Keys", "Key Frames", "la_animation_key",0,0,0,-1,0,0,0,0,0,0,offsetof(laActionChannel, Keys),0);
  1816. 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);
  1817. }
  1818. p = laAddPropertyContainer("la_animation_prop", "Property", "Animation property",0,0,sizeof(laActionProp),0,0,1);{
  1819. 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);
  1820. 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);
  1821. 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);
  1822. 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);
  1823. 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);
  1824. }
  1825. p = laAddPropertyContainer("la_animation_key", "key", "Action channel",0,0,sizeof(laActionKey),0,0,1);{
  1826. 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);
  1827. laAddRawProperty(p,"data","Data","Data of this key frame",0,0,lagetraw_ActionKeyData,lasetraw_ActionKeyData,0);
  1828. }
  1829. p = laAddPropertyContainer("la_animation_action_holder", "Action Holder", "Action holder",0,0,sizeof(laActionHolder),0,0,1);{
  1830. laAddStringProperty(p,"name","Name","Name of the action",0,0,0,0,1,offsetof(laActionHolder,Name),0,0,0,0,LA_AS_IDENTIFIER);
  1831. }
  1832. }
  1833. la_RegisterTNSProps();
  1834. }