*/}}

la_properties.c 100 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496
  1. /*
  2. * LaGUI: A graphical application framework.
  3. * Copyright (C) 2022 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 *laget_ActiveTheme(void *unused){
  22. return MAIN.CurrentTheme;
  23. }
  24. void laset_ActiveTheme(void* unused, laTheme* t){
  25. if(!t) MAIN.CurrentTheme = MAIN.Themes.pFirst;
  26. else MAIN.CurrentTheme = t;
  27. la_RefreshThemeColor(MAIN.CurrentTheme);
  28. la_RegenerateWireColors();
  29. laRedrawAllWindows();
  30. }
  31. void laset_ThemeName(laTheme *t, char *content){
  32. strSafeSet(&t->Name, content);
  33. }
  34. void laset_ThemeAuthor(laTheme *t, char *content){
  35. strSafeSet(&t->Author, content);
  36. }
  37. void laset_ThemeColor(laTheme* t, real* array){
  38. tnsVectorCopy4d(array,t->Color);
  39. la_RefreshThemeColor(t);
  40. laRedrawAllWindows();
  41. }
  42. void laset_ThemeAccentColor(laTheme* t, real* array){
  43. tnsVectorCopy4d(array,t->AccentColor);
  44. la_RefreshThemeColor(t);
  45. laRedrawAllWindows();
  46. }
  47. void laset_ThemeInactiveSaturation(laTheme* t, real a){
  48. t->InactiveSaturation=a;
  49. la_RefreshThemeColor(t);
  50. laRedrawAllWindows();
  51. }
  52. void laset_ThemeInactiveMix(laTheme* t, real a){
  53. t->InactiveMix=a;
  54. la_RefreshThemeColor(t);
  55. laRedrawAllWindows();
  56. }
  57. void laset_ThemeCursorAlpha(laTheme* t, real a){
  58. t->CursorAlpha=a;
  59. la_RefreshThemeColorSelf(t);
  60. laRedrawAllWindows();
  61. }
  62. void laset_ThemeSelectionAlpha(laTheme* t, real a){
  63. t->SelectionAlpha=a;
  64. la_RefreshThemeColorSelf(t);
  65. laRedrawAllWindows();
  66. }
  67. void laset_ThemeNormal(laBoxedTheme* bt, real val){
  68. bt->NormalY=val;
  69. la_RefreshBoxedThemeColor(bt);
  70. laRedrawAllWindows();
  71. }
  72. void laset_ThemeActive(laBoxedTheme* bt, real val){
  73. bt->ActiveY=val;
  74. la_RefreshBoxedThemeColor(bt);
  75. laRedrawAllWindows();
  76. }
  77. void laset_ThemeBorder(laBoxedTheme* bt, real val){
  78. bt->BorderY=val;
  79. la_RefreshBoxedThemeColor(bt);
  80. laRedrawAllWindows();
  81. }
  82. void laset_ThemeText(laBoxedTheme* bt, real val){
  83. bt->TextY=val;
  84. la_RefreshBoxedThemeColor(bt);
  85. laRedrawAllWindows();
  86. }
  87. void laset_ThemeTextActive(laBoxedTheme* bt, real val){
  88. bt->TextActiveY=val;
  89. la_RefreshBoxedThemeColor(bt);
  90. laRedrawAllWindows();
  91. }
  92. void laset_ThemeAlpha(laBoxedTheme* bt, real val){
  93. bt->Alpha=val;
  94. la_RefreshBoxedThemeColor(bt);
  95. laRedrawAllWindows();
  96. }
  97. void laset_ThemeMargins(laBoxedTheme* bt, int index, real val){
  98. bt->Margins[index]=val;
  99. la_RefreshBoxedThemeColor(bt);
  100. laRedrawAllWindows();
  101. }
  102. void laset_ThemePaddings(laBoxedTheme* bt, int index, real val){
  103. bt->Paddings[index]=val;
  104. la_RefreshBoxedThemeColor(bt);
  105. laRedrawAllWindows();
  106. }
  107. void laset_ThemeWireTransparency(laTheme* t, real val){ t->WireTransparency = val; la_RegenerateWireColors(); laRedrawAllWindows(); }
  108. void laset_ThemeWireBrightness(laTheme* t, real val){ t->WireBrightness = val; la_RegenerateWireColors(); laRedrawAllWindows(); }
  109. void laset_ThemeWireSaturation(laTheme* t, real val){ t->WireSaturation = val; la_RegenerateWireColors(); laRedrawAllWindows(); }
  110. void laset_ThemeEdgeTransparency(laTheme* t, real val){ t->EdgeTransparency = val; la_RegenerateWireColors(); laRedrawAllWindows(); }
  111. void laset_ThemeEdgeBrightness(laTheme* t, real val){ t->EdgeBrightness = val; la_RegenerateWireColors(); laRedrawAllWindows(); }
  112. void laset_ThemeVertexTransparency(laTheme* t, real val){ t->VertexTransparency = val; la_RegenerateWireColors(); laRedrawAllWindows(); }
  113. void laset_ThemeVertexBrightness(laTheme* t, real val){ t->VertexBrightness = val; la_RegenerateWireColors(); laRedrawAllWindows(); }
  114. void laset_ThemeSVertexTransparency(laTheme* t, real val){ t->SelectedVertexTransparency = val; la_RegenerateWireColors(); laRedrawAllWindows(); }
  115. void laset_ThemeSEdgeTransparency(laTheme* t, real val){ t->SelectedEdgeTransparency = val; la_RegenerateWireColors(); laRedrawAllWindows(); }
  116. void laset_ThemeSFaceTransparency(laTheme* t, real val){ t->SelectedFaceTransparency = val; la_RegenerateWireColors(); laRedrawAllWindows(); }
  117. void laset_WireColorSlices(void* unused, int val){ MAIN.WireColorSlices = val; la_RegenerateWireColors(); laRedrawAllWindows(); }
  118. void laset_WireThickness(void* unused, real val){ MAIN.WireThickness = val;laRedrawAllWindows(); }
  119. void laset_WireSaggyness(void* unused, real val){ MAIN.WireSaggyness = val; laRedrawAllWindows(); }
  120. void* laget_DetachedControllerFirst(void* unused,void* unused2){
  121. return MAIN.Controllers.pFirst;
  122. }
  123. void laset_UiRowHeight(void* unused, int val){
  124. MAIN.UiRowHeight = val;
  125. MAIN.ScaledUiRowHeight=MAIN.UiRowHeight;
  126. la_RefreshThemeColor(MAIN.CurrentTheme);
  127. tnsInvalidateFontCache();
  128. laRedrawAllWindows();
  129. }
  130. void laset_FontSize(void* unused, real val){
  131. MAIN.FontSize = val;
  132. MAIN.ScaledUiRowHeight=MAIN.UiRowHeight;
  133. tnsInvalidateFontCache();
  134. laRedrawAllWindows();
  135. }
  136. void laset_MarginSize(void* unused, real val){
  137. MAIN.MarginSize = val;
  138. la_RefreshThemeColor(MAIN.CurrentTheme);
  139. laRedrawAllWindows();
  140. }
  141. void laset_ResourcePath(laResourceFolder *rf, char *content){
  142. strSafeSet(&rf->Path, content);
  143. laRefreshUDFRegistries();
  144. }
  145. void *laget_Self(void *p, void *UNUSED){
  146. return p;
  147. }
  148. void *laget_ListNext(laListItem *Item, void *UNUSED){
  149. return Item->pNext;
  150. }
  151. void *laget_ListPrev(laListItem *Item, void *UNUSED){
  152. return Item->pPrev;
  153. }
  154. void *laget_List2Next(laListItem2 *Item, void *UNUSED){
  155. return Item->pNext;
  156. }
  157. void *laget_List2Prev(laListItem2 *Item, void *UNUSED){
  158. return Item->pPrev;
  159. }
  160. void *laget_PointerListNext(void *UNUSED, laPropIterator *pi){
  161. pi->Linker = ((laListItemPointer *)pi->Linker)->pNext;
  162. return pi->Linker->p;
  163. }
  164. void *laget_FirstUiItem(laUiList *uil, void *UNUSED){
  165. return uil->UiItems.pFirst;
  166. }
  167. void *laget_FirstColumnItem(laUiList *uil, void *UNUSED){
  168. if (!uil) return 0;
  169. return uil->Columns.pFirst;
  170. }
  171. int la_ResetUiColum(laColumn *c, int U, int L, int R, int LR, int repos);
  172. void laset_ColumnSP(laColumn *c, real val){
  173. if (c->LS) c->LS->SP = val;
  174. if (c->RS) c->RS->SP = val;
  175. }
  176. real laget_ColumnSP(laColumn *c){
  177. if (c->LS) return c->LS->SP;
  178. else
  179. return 0.5;
  180. }
  181. void laset_ColumnSnap(laColumn *c, int val){
  182. if (c->LS && c->LS->MaxW) c->LS->MaxW = val;
  183. if (c->RS && c->RS->MaxW) c->RS->MaxW = val;
  184. }
  185. int laget_ColumnSnap(laColumn *c){
  186. if (c->LS && c->LS->MaxW) return c->LS->MaxW;
  187. if (c->RS && c->RS->MaxW) return c->RS->MaxW;
  188. return 20;
  189. }
  190. void laset_SnapState(laColumn *c, int val){
  191. if (val == 1){
  192. if (c->LS) c->LS->MaxW = 20;
  193. if (c->RS) c->RS->MaxW = 0;
  194. }elif (val == 2){
  195. if (c->LS) c->LS->MaxW = 0;
  196. if (c->RS) c->RS->MaxW = 20;
  197. }else{
  198. if (c->LS) c->LS->MaxW = 0;
  199. if (c->RS) c->RS->MaxW = 0;
  200. }
  201. }
  202. int laget_SnapState(laColumn *c){
  203. if (c->LS && c->LS->MaxW) return 1;
  204. if (c->RS && c->RS->MaxW) return 2;
  205. return 0;
  206. }
  207. void *laget_BoxedTheme(laTheme *theme){
  208. return theme->BoxedThemes.pFirst;
  209. }
  210. void *laget_BoxedThemeUi(void *UNUSED){
  211. return ((laTheme *)MAIN.Themes.pFirst)->BoxedThemes.pFirst;
  212. }
  213. void* laget_Main(void *UNUSED, void* UNUSED2){
  214. return &MAIN;
  215. }
  216. laPropContainer* laget_PropertyNodeType(laProp* p){
  217. static laPropContainer* pc=0;
  218. static laPropContainer* ipc=0;
  219. static laPropContainer* fpc=0;
  220. switch(p->PropertyType&(~LA_PROP_ARRAY)){
  221. case LA_PROP_INT: { if(!ipc) ipc=la_ContainerLookup("int_property"); return ipc; }
  222. case LA_PROP_FLOAT: { if(!fpc) fpc=la_ContainerLookup("float_property"); return fpc; }
  223. default: { if(!pc) pc=la_ContainerLookup("property_item"); return pc; }
  224. }
  225. }
  226. void *laget_PropertyItemFirst(laPropContainer *p){
  227. if (!p) return 0;
  228. return p->Props.pFirst;
  229. }
  230. void *laget_PropertyItemNext(laProp *p, void *UNUSED){
  231. return p->Item.pNext;
  232. }
  233. void laget_PropertyName(laProp *p, char *result){
  234. strCopyFull(result, p ? p->Name : "");
  235. }
  236. void laget_PropertyIdentifier(laProp *p, char *result){
  237. strCopyFull(result, p ? p->Identifier : "");
  238. }
  239. void laget_PropertyDescription(laProp *p, char *result){
  240. strCopyFull(result, p ? p->Description : "");
  241. }
  242. int laget_PropertySubContainerIconID(laProp *p){
  243. if (p->PropertyType != LA_PROP_SUB) return 0;
  244. if (!p->SubProp){
  245. p->SubProp = la_ContainerLookup(((laSubProp *)p)->TargetID);
  246. if (!p->SubProp) return 0;
  247. }
  248. return p->SubProp->IconID;
  249. }
  250. int laget_TrashItemInstance(void *a){
  251. return a;
  252. }
  253. void *laget_ActiveWindow(void *unused){
  254. return MAIN.CurrentWindow;
  255. }
  256. void *laget_FirstWindow(void *unused, void* unused_iter){
  257. return MAIN.Windows.pFirst;
  258. }
  259. void *laget_FirstContainer(void *unused, void* unused_iter){
  260. return MAIN.PropContainers.pFirst;
  261. }
  262. void *laget_WindowFirstLayout(laWindow *window, void* unused_iter){
  263. return window->Layouts.pFirst;
  264. }
  265. void *laget_FirstHiddenPanel(laWindow *window, void* unused_iter){
  266. for(laPanel* p=window->Panels.pFirst;p;p=p->Item.pNext){
  267. if(!p->Show&&!p->LaterDestroy){return p;}
  268. }
  269. return 0;
  270. }
  271. void *laget_NextHiddenPanel(laPanel* p, void* unused_iter){
  272. for(p=p->Item.pNext;p;p=p->Item.pNext){
  273. if(!p->Show&&!p->LaterDestroy){return p;}
  274. }
  275. return 0;
  276. }
  277. void laset_WindowHiddenPanel(laWindow *window, laPanel* p){
  278. laShowPanelWithExpandEffect(p);
  279. laPopPanel(p);
  280. return 0;
  281. }
  282. void laget_PanelTitle(laPanel *p, char *result){
  283. strCopyFull(result, p->Title->Ptr);
  284. }
  285. void laset_PanelTitle(laPanel *p, char *content){
  286. strSafeSet(&p->Title, content);
  287. p->TitleWidth = tnsStringGetWidth(p->Title->Ptr, 0,0);
  288. }
  289. void laset_PanelSnapDistance(laPanel *p, int index, int n){
  290. int a;
  291. if (!n) return;
  292. switch (index){ //lrtb
  293. case 0:
  294. p->SL = p->SL ? n : 0;
  295. break;
  296. case 1:
  297. p->SR = p->SR ? n : 0;
  298. break;
  299. case 2:
  300. p->ST = p->ST ? n : 0;
  301. break;
  302. case 3:
  303. p->SB = p->SB ? n : 0;
  304. break;
  305. }
  306. }
  307. void laset_PanelSnapEnable(laPanel *p, int index, int n){
  308. laWindow *w = MAIN.CurrentWindow;
  309. int a;
  310. switch (index){ //lrtb
  311. case 0:
  312. p->SL = (n && p->X) ? p->X : 0;
  313. break;
  314. case 1:
  315. p->SR = (n && w ? ((a = MAIN.CurrentWindow->CW - p->X - p->W) ? a : 0) : n);
  316. break;
  317. case 2:
  318. p->ST = (n && p->Y) ? p->Y : 0;
  319. break;
  320. case 3:
  321. p->SB = (n && w ? ((a = MAIN.CurrentWindow->CH - p->Y - p->H) ? a : 0) : n);
  322. break;
  323. }
  324. }
  325. void laget_PanelSnapEnable(laPanel *p, int *result){
  326. result[0] = p->SL ? 1 : 0;
  327. result[1] = p->SR ? 1 : 0;
  328. result[2] = p->ST ? 1 : 0;
  329. result[3] = p->SB ? 1 : 0;
  330. }
  331. void laget_LayoutTitle(laLayout *l, char *result){
  332. strCopyFull(result, l->ID->Ptr);
  333. }
  334. void laset_LayoutTitle(laLayout *l, char *content){
  335. strSafeSet(&l->ID, content);
  336. laRenameWindow(MAIN.CurrentWindow, content);
  337. }
  338. //void* laget_LayoutPanelFirst(laLayout* l) {
  339. // return l->Panels.pFirst;
  340. //}
  341. void laget_WindowTitle(laWindow *w, char *result){
  342. strCopyFull(result, w->Title->Ptr);
  343. }
  344. void laset_WindowTitle(laWindow *w, char *content){
  345. strSafeSet(&w->Title, content);
  346. }
  347. void laset_WindowActiveLayout(laWindow *w, laLayout *l, int UNUSED_State){
  348. la_StopAllOperators();
  349. w->CurrentLayout = l;
  350. laRenameWindow(w, l->ID->Ptr);
  351. laRedrawCurrentWindow();
  352. }
  353. //void laget_PanelSnappingTrueFalse(laPanel* p, int* result) {
  354. // result[0] = p->SL > 0 ? 1 : 0;
  355. // result[1] = p->SR > 0 ? 1 : 0;
  356. // result[2] = p->ST > 0 ? 1 : 0;
  357. // result[3] = p->SB > 0 ? 1 : 0;
  358. //}
  359. //void laset_PanelSnappingTrueFalse(laPanel* p,int Index, int n) {
  360. // int* v = &p->SL;
  361. // int val = abs(v[Index]);
  362. // v[Index] = val*(n ? 1 : -1);
  363. //}
  364. void laset_PanelMultisample(void* unused, int value){
  365. MAIN.PanelMultisample = value;
  366. tnsReconfigureTextureParameters(value);
  367. laRedrawAllWindows();
  368. }
  369. void *laget_UiInternalType(void *UNUSED){
  370. return MAIN.UiTypes.pFirst;
  371. }
  372. void laget_TimeString(laTimeInfo *ti, char *result,char** result_direct){
  373. sprintf(result, "%d-%.02d-%.02d %.02d:%.02d:%.02d", ti->Year, ti->Month, ti->Day, ti->Hour, ti->Minute, ti->Second);
  374. }
  375. int laget_TimeYear(laTimeInfo *ti){
  376. return (int)ti->Year;
  377. }
  378. int laget_TimeMonth(laTimeInfo *ti){
  379. return (int)ti->Month;
  380. }
  381. int laget_TimeDay(laTimeInfo *ti){
  382. return (int)ti->Day;
  383. }
  384. int laget_TimeHour(laTimeInfo *ti){
  385. return (int)ti->Hour;
  386. }
  387. int laget_TimeMinute(laTimeInfo *ti){
  388. return (int)ti->Minute;
  389. }
  390. int laget_TimeSecond(laTimeInfo *ti){
  391. return (int)ti->Second;
  392. }
  393. void *laget_ConditionerExtra(laUiItem *ui){
  394. if (ui->Type == &_LA_UI_CONDITION ||
  395. ui->Type == &_LA_UI_CONDITION_END ||
  396. ui->Type == &_LA_UI_CONDITION_ELSE ||
  397. ui->Type == _LA_UI_CONDITION_TOGGLE){
  398. return ui->Extra;
  399. }
  400. return 0;
  401. }
  402. void *laget_CanvasExtra(laUiItem *ui){
  403. if (ui->Type == _LA_UI_CANVAS){
  404. return ui->Extra;
  405. }
  406. return 0;
  407. }
  408. void laget_UnknownPropertyString(laUDF *udf, char *result, char** here){
  409. *here="Unknown Property";
  410. }
  411. void laget_MainIdentifier(laUDF *udf, char *result, char** here){
  412. strcpy(result, "MAIN");
  413. }
  414. void laget_UDFFilePath(laUDF *udf, char *result, char** here){
  415. *here=udf->FileName->Ptr;
  416. }
  417. void laget_UDFContentNodeFullPath(laUDFContentNode *ucn, char *result, char** here){
  418. if (ucn->FullPath && ucn->FullPath->Ptr) *here=ucn->FullPath->Ptr;
  419. }
  420. void laget_UDFContentNodeIdentifier(laUDFContentNode *ucn, char *result, char** here){
  421. if (ucn->Identifier && ucn->Identifier->Ptr) *here=ucn->Identifier->Ptr;
  422. }
  423. void laget_UDFContentInstanceIdentifier(laUDFContentInstance *uci, char *result, char** here){
  424. if (uci->Identifier && uci->Identifier->Ptr) *here=uci->Identifier->Ptr;
  425. }
  426. void lapost_PropPack(laPropPack *pp);
  427. void laget_ConditionNodePropPath(laUiConditionNode *ucn, char *result, char** here){
  428. if (!ucn->PP.Go) return;
  429. la_GetPropPackPath(&ucn->PP, result);
  430. }
  431. void laset_ConditionNodePropPath(laUiConditionNode *ucn, char *content, char** here){
  432. if (ucn->PP.Go){
  433. la_FreePropStepCache(ucn->PP.Go);
  434. ucn->PP.LastPs = ucn->PP.Go = 0;
  435. }
  436. la_GetPropFromPath(&ucn->PP, ucn->PP.RawThis, content, 0);
  437. }
  438. void laread_ConditionNodePropPath(laUiConditionNode *ucn, char *Content, char** here){
  439. if (!Content || !Content[0]) return;
  440. ucn->PP.Go = CreateNewBuffer(char, strlen(Content) + 1);
  441. strcpy(ucn->PP.Go, Content);
  442. }
  443. void lapost_ConditionNode(laUiConditionNode *ucn){
  444. lapost_PropPack(&ucn->PP);
  445. }
  446. void laset_ConditionNodeType(laUiConditionNode *ucn, int Type){
  447. ucn->Type = Type;
  448. switch (Type){
  449. case LA_CONDITION_PROP:
  450. case LA_CONDITION_INT:
  451. case LA_CONDITION_FLOAT:
  452. case LA_CONDITION_STRING:
  453. case LA_CONDITION_FALSE:
  454. case LA_CONDITION_TRUE:
  455. la_ConditionNodeFreeRecursive(ucn->Expression1);
  456. la_ConditionNodeFreeRecursive(ucn->Expression2);
  457. ucn->Expression1 = 0;
  458. ucn->Expression2 = 0;
  459. if (ucn->PP.LastPs) la_FreePropStepCache(ucn->PP.Go);
  460. ucn->PP.LastPs = ucn->PP.Go = ucn->PP.RawThis = 0;
  461. break;
  462. case LA_CONDITION_NOT:
  463. la_ConditionNodeFreeRecursive(ucn->Expression2);
  464. ucn->Expression2 = 0;
  465. if (ucn->PP.LastPs) la_FreePropStepCache(ucn->PP.Go);
  466. ucn->PP.LastPs = ucn->PP.Go = ucn->PP.RawThis = 0;
  467. if (!ucn->Expression1) ucn->Expression1 = laIntExpression(0);
  468. break;
  469. default:
  470. if (!ucn->Expression1) ucn->Expression1 = laIntExpression(0);
  471. if (!ucn->Expression2) ucn->Expression2 = laIntExpression(1);
  472. break;
  473. }
  474. laRecalcCurrentPanel();
  475. }
  476. void laread_ConditionNodeType(laUiConditionNode *ucn, int Type){
  477. ucn->Type = Type;
  478. }
  479. void* laget_FirstDriverPage(void* unused, void* unused2){
  480. return MAIN.Drivers->Pages.pFirst;
  481. }
  482. void* laget_CurrentRackPage(laRackPageCollection* c){
  483. return c->CurrentPage;
  484. }
  485. void laset_WindowColorSpace(laWindow* w, int space){
  486. w->OutputColorSpace=space; laRedrawCurrentWindow();
  487. }
  488. void laset_WindowShowStripes(laWindow* w, int stripes){
  489. w->OutputShowStripes=stripes; laRedrawCurrentWindow();
  490. }
  491. void *tnsget_TnsMain(void *unused,void *unused2){
  492. return T;
  493. }
  494. void *tnsget_World(void *unused,void *unused2){
  495. return &T->World;
  496. }
  497. void *tnsread_World(void *unused, void *inst){
  498. }
  499. void *tnsget_detached_FirstRootObject(void *UNUSED1, void *UNUSED2){
  500. return T->World.RootObjects.pFirst;
  501. }
  502. void *tnsget_detached_FirstTexture(void *UNUSED1, void *UNUSED2){
  503. return T->Textures.pFirst;
  504. }
  505. void *tnsget_PreviewTexture(void *UNUSED){
  506. return T->PreviewTexture;
  507. }
  508. void *tnsset_PreviewTexture(void *UNUSED_PARENT, void *tex, int UNUSEDSTATE){
  509. T->PreviewTexture = tex;
  510. }
  511. void tnsget_ObjectName(tnsObject *s, char *result){
  512. if (!s->Name) return;
  513. strCopyFull(result, s->Name->Ptr);
  514. }
  515. void tnsset_ObjectName(tnsObject *s, char *content){
  516. strSafeSet(&s->Name, content);
  517. }
  518. void *tnsget_NextLinkedObject(tnsObject *o, laPropIterator *pi){
  519. pi->Linker = ((laListItemPointer *)pi->Linker->pNext);
  520. return pi->Linker->p;
  521. }
  522. void *tnsget_FirstChildObject(tnsObject *ob){
  523. return ob->ChildObjects.pFirst;
  524. }
  525. void tnsset_ObjectLocation(tnsObject* o, real val, int n){ o->Location[n]=val; tnsSelfTransformValueChanged(o); laNotifyUsers("tns.world"); }
  526. void tnsset_ObjectRotation(tnsObject* o, real val, int n){ o->Rotation[n]=val; tnsSelfTransformValueChanged(o); laNotifyUsers("tns.world"); }
  527. void tnsset_ObjectScale(tnsObject* o, real val){ o->Scale=val; tnsSelfTransformValueChanged(o); laNotifyUsers("tns.world"); }
  528. void laget_UiTemplateIdentifier(laUiTemplate *uit, char *result, char** here){
  529. *here=uit->Identifier->Ptr;
  530. }
  531. void laset_UiTemplateIdentifier(laUiTemplate *uit, char *content){
  532. strSafeSet(&uit->Identifier, content);
  533. }
  534. void laget_UiDataPath(laUiItem *ui, char *result){
  535. laPropStep *ps = ui->PP.Go;
  536. if (ui->PP.LastPs || ui->PP.Go){
  537. for (ps; ps; ps = ps->pNext){
  538. if (ps->Type == L'@' || ps->Type == L'#' || ps->Type == L'='){
  539. strcat(result, ps->p);
  540. }else{
  541. strcat(result, ps->p->Identifier);
  542. }
  543. if (ps->pNext){
  544. if (ps->pNext->Type == L'.') strcat(result, ".");
  545. elif (ps->pNext->Type == L'#') strcat(result, "#");
  546. elif (ps->pNext->Type == L'@') strcat(result, "@");
  547. elif (ps->pNext->Type == L'=') strcat(result, "= ");
  548. elif (ps->pNext->Type == L'$') strcat(result, "$");
  549. }
  550. }
  551. }elif (ui->AT){
  552. strcpy(result, "");
  553. }
  554. }
  555. void laget_UiOperatorID(laUiItem *ui, char *result, char** here){
  556. if (ui->AT){
  557. *here=ui->AT->Identifier;
  558. }else *result=0;
  559. }
  560. void laread_UiDataPath(laUiItem *ui, char *Content){
  561. if (!Content || !Content[0]) return;
  562. ui->PP.Go = CreateNewBuffer(char, strlen(Content) + 1);
  563. strcpy(ui->PP.Go, Content);
  564. }
  565. void laread_UiOperatorID(laUiItem *ui, char *Content){
  566. ui->AT = laGetOperatorType(Content);
  567. }
  568. void *laget_PanelTemplate(void *UNUSED, void *UNUSED2){
  569. return MAIN.PanelTemplates.pFirst;
  570. }
  571. void laget_PanelTemplateCategory(void* rack_unused, laUiTemplate* uit, char* copy, char** ptr){
  572. if(uit->CategoryName&&uit->CategoryName->Ptr) *ptr=uit->CategoryName->Ptr;
  573. }
  574. void lapost_Window(laWindow *w){
  575. la_CreateSystemWindow(w);
  576. MAIN.CurrentWindow = w;
  577. laStartWindow(w);
  578. }
  579. void lapost_PropPack(laPropPack *pp){
  580. char *path = pp->Go;
  581. if (pp->LastPs /* || !path*/) return;
  582. if ((!path || (path && !path[0])) && pp->RawThis) pp->LastPs = pp->RawThis->LastPs;
  583. if (pp->RawThis) lapost_PropPack(pp->RawThis);
  584. pp->Go = 0;
  585. la_GetPropFromPath(pp, pp->RawThis, path, 0);
  586. FreeMem(path);
  587. }
  588. void lapost_UiItem(laUiItem *ui){
  589. lapost_PropPack(&ui->PP);
  590. //if(ui->Type == _LA_UI_CANVAS) ui->Type->Init(ui);
  591. }
  592. void lapostim_UiItem(laUiItem *ui){
  593. if (ui->Type && ui->Type->Init && ui->Type != _LA_UI_CANVAS && ui->Type != &_LA_UI_CONDITION) ui->Type->Init(ui);
  594. ui->State = ui->State ? ui->State : (ui->Type ? LA_UI_NORMAL : 0);
  595. la_AssignPropExtras(ui);
  596. }
  597. void lapost_Panel(laPanel *p){
  598. p->PP.EndInstance = p;
  599. p->PP.LastPs = &p->FakePS;
  600. p->PP.LastPs->p = _LA_PROP_PANEL;
  601. la_EnsurePanelExtras(p);
  602. p->Refresh = LA_TAG_RECALC;
  603. }
  604. void lapost_UserPreferences(void* unused){
  605. MAIN.ScaledUiRowHeight=MAIN.UiRowHeight;
  606. tnsInvalidateFontCache();
  607. }
  608. //void laget_DetachedPropContainerID(laProp* p, char * result) {
  609. // strcpy(result, p->Detached->Container->Identifier);
  610. //}
  611. //void laget_DetachedPropPropID(laProp* p, char * result) {
  612. // strcpy(result, p->Detached->Identifier);
  613. //}
  614. //void laset_DetachedPropContainerID(laProp* p, char * content) {
  615. // p->Description = CreateNewBuffer(char, 128);
  616. // strcpy(p->Description, content);
  617. //}
  618. //void laset_DetachedPropPropID(laProp* p, char * content) {
  619. // p->Name = CreateNewBuffer(char, 128);
  620. // strcpy(p->Name, content);
  621. //}
  622. void laread_DetachedPropRename(laProp *p, char *content){
  623. p->Identifier = CreateNewBuffer(char, 128);
  624. strcpy(p->Identifier, content);
  625. }
  626. void laget_DetachedPropPath(laProp *p, char *result, char** here){
  627. la_GetPropPackPath(&p->DetachedPP, result);
  628. }
  629. void laread_DetachedPropPath(laProp *p, char *content){
  630. p->DetachedPP.Go = CreateNewBuffer(char, 128);
  631. strcpy(p->DetachedPP.Go, content);
  632. }
  633. void lapost_DetachedProp(laProp *Prop){
  634. laPropContainer *pc = 0;
  635. laSubProp *np = 0;
  636. laIntProp *ip;
  637. laFloatProp *fp;
  638. laEnumProp *ep;
  639. laSubProp *sp;
  640. char *path = Prop->DetachedPP.Go;
  641. char *id = Prop->Identifier;
  642. laPropPack TempPP = {0};
  643. laListItem Item;
  644. Prop->DetachedPP.Go = 0;
  645. memcpy(&Item, &Prop->Item, sizeof(laListItem));
  646. la_GetPropFromPath(&TempPP, Prop->DetachedPP.RawThis, path, 0);
  647. //FreeMem(path);
  648. memcpy(Prop, TempPP.LastPs->p, la_GetPropertySize(TempPP.LastPs->p->PropertyType));
  649. memcpy(&Prop->DetachedPP, &TempPP, sizeof(laPropPack));
  650. memcpy(&Prop->Item, &Item, sizeof(laListItem));
  651. switch (Prop->PropertyType){
  652. case LA_PROP_INT:
  653. case LA_PROP_INT | LA_PROP_ARRAY:
  654. ip = Prop;
  655. ip->Detached = CreateNewBuffer(int, Prop->Len ? Prop->Len : 1);
  656. break;
  657. case LA_PROP_FLOAT:
  658. case LA_PROP_FLOAT | LA_PROP_ARRAY:
  659. fp = Prop;
  660. fp->Detached = CreateNewBuffer(real, Prop->Len ? Prop->Len : 1);
  661. break;
  662. case LA_PROP_ENUM:
  663. case LA_PROP_ENUM | LA_PROP_ARRAY:
  664. ep = Prop;
  665. ep->Detached = CreateNewBuffer(int, 1);
  666. ep->Detached[0] = ((laEnumItem *)ep->Items.pFirst)->Index;
  667. }
  668. Prop->Identifier = id;
  669. }
  670. void latouched_NodeInSocket(void* unused, int hint){
  671. laDriverRequestRebuild(); laMappingRequestRebuild();
  672. }
  673. int lafilter_NodeCategory(void* unused, laNodeCategory* c){
  674. if(c->For&MAIN.FilterNodeCategory) return 1; return 0;
  675. }
  676. void tnspost_Object(tnsObject *o){
  677. /* what */
  678. }
  679. void tnspropagate_Object(tnsObject* o, laUDF* udf, int force){
  680. for(laListItemPointer* lip=o->ChildObjects.pFirst;lip;lip=lip->pNext){ if(!lip->p) continue;
  681. if(force || !laget_InstanceActiveUDF(lip->p)){ laset_InstanceUDF(lip->p, udf); tnspropagate_Object(lip->p,udf,force); }
  682. }
  683. }
  684. void tnstouched_Object(tnsObject *o, int hint){
  685. printf("touched\n");
  686. if(o->Type==TNS_OBJECT_MESH && (hint&TNS_HINT_GEOMETRY)){
  687. tnsInvalidateMeshBatch(o);
  688. }
  689. laNotifyUsers("tns.world");
  690. }
  691. int tnsget_MeshObjectVertSize(tnsMeshObject* o){ return o->totv*sizeof(tnsVert);/*can't use maxv*/ }
  692. int tnsget_MeshObjectEdgeSize(tnsMeshObject* o){ return o->tote*sizeof(tnsEdge);/*can't use maxv*/ }
  693. void* tnsget_MeshObjectFaceRaw(tnsMeshObject* o, int* r_size, int* r_is_copy){
  694. if(o->Mode==TNS_MESH_EDIT_MODE) return;
  695. int* arr=0; int next=0,max=0; int i=0;
  696. arrEnsureLength(&arr, i, &max, sizeof(int));
  697. arr[i]=o->totf; i++;
  698. for(int f=0;f<o->totf;f++){
  699. arrEnsureLength(&arr, i+o->f[f].looplen+2, &max, sizeof(int));
  700. arr[i]=o->f[f].looplen; i++;
  701. arr[i]=o->f[f].flags; i++;
  702. for(int l=0;l<o->f[f].looplen;l++){
  703. arr[i]=o->f[f].loop[l]; i++;
  704. }
  705. }
  706. *r_size = i*sizeof(int);
  707. *r_is_copy = 1;
  708. return arr;
  709. }
  710. void tnsset_MeshObjectFaceRaw(tnsMeshObject* o, int* data, int s){
  711. if(o->f){
  712. for(int fi=0;fi<o->totf;fi++){
  713. if(o->f[fi].loop){ free(o->f[fi].loop); o->f[fi].loop=0; }
  714. }
  715. arrFree(&o->f, &o->maxf); o->totf=0;
  716. }
  717. if(!data) return;
  718. int totf=data[0]; int i=1;
  719. o->f=calloc(1,sizeof(tnsFace)*totf); o->maxf=o->totf=totf;
  720. for(int fi=0;fi<totf;fi++){
  721. tnsFace*f=&o->f[fi];
  722. f->looplen=data[i]; i++;
  723. f->flags=data[i]; i++;
  724. f->loop=calloc(1,sizeof(int)*f->looplen);
  725. for(int li=0;li<f->looplen;li++){
  726. f->loop[li]=data[i]; i++;
  727. }
  728. }
  729. }
  730. laPropContainer* tnsget_ObjectType(tnsObject* o){
  731. switch(o->Type){
  732. case TNS_OBJECT_EMPTY: default: return TNS_PC_OBJECT_GENERIC;
  733. case TNS_OBJECT_CAMERA: return TNS_PC_OBJECT_CAMERA;
  734. case TNS_OBJECT_MESH: return TNS_PC_OBJECT_MESH;
  735. case TNS_OBJECT_LIGHT: return TNS_PC_OBJECT_LIGHT;
  736. }
  737. }
  738. void lareset_Main(void* Unused){
  739. return;
  740. }
  741. laPropContainer* LA_PC_SOCKET_IN;
  742. laPropContainer* LA_PC_SOCKET_OUT;
  743. laPropContainer* LA_PROP_SOCKET_SOURCE;
  744. laPropContainer* LA_PROP_SOCKET_OUT;
  745. laPropContainer* LA_PC_MAPPER;
  746. laPropContainer* TNS_PC_OBJECT_GENERIC;
  747. laPropContainer* TNS_PC_OBJECT_CAMERA;
  748. laPropContainer* TNS_PC_OBJECT_LIGHT;
  749. laPropContainer* TNS_PC_OBJECT_MESH;
  750. laProp* LA_PROP_CONTROLLER;
  751. void la_RegisterGeneralProps(){
  752. laPropContainer *p, *ip, *p2, *ip2, *sp1, *sp2;
  753. laProp *ep;
  754. laPropPack pp;
  755. laSubProp *sp;
  756. laKeyMapper *km;
  757. p = la_SetGeneralRoot(&MAIN.GeneralIntSub, "__general_int__", "Genral Int Operations", "Genral Int Operations");
  758. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_int_restore_default", L'⭯', 0);
  759. laAddOperatorProperty(p, "set_max", "Set Max", "Set The Property To The Max Value", "LA_int_set_max", 0,0);
  760. laAddOperatorProperty(p, "set_min", "Set Min", "Set The Property To The Min Value", "LA_int_set_min", 0,0);
  761. laAddOperatorProperty(p, "hyper_data", "View Hyper Data", "Show Properties Of Specific Data Block", "LA_view_hyper_data", L'🛈', 0);
  762. p = la_SetGeneralRoot(&MAIN.GeneralIntArraySub, "__general_int_arr__", "Genral Int Array Operations", "Genral Int Array Operations");
  763. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_int_array_restore_default", L'⭯', 0);
  764. laAddOperatorProperty(p, "set_max", "Set Max", "Set The Property To The Max Value", "LA_int_array_set_max", 0,0);
  765. laAddOperatorProperty(p, "set_min", "Set Min", "Set The Property To The Min Value", "LA_int_array_set_min", 0,0);
  766. laAddOperatorProperty(p, "hyper_data", "View Hyper Data", "Show Properties Of Specific Data Block", "LA_view_hyper_data", L'🛈', 0);
  767. p = la_SetGeneralRoot(&MAIN.GeneralFloatSub, "__general_real__", "Genral Float Operations", "Genral Float Operations");
  768. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_real_restore_default", L'⭯', 0);
  769. laAddOperatorProperty(p, "set_max", "Set Max", "Set The Property To The Max Value", "LA_real_set_max", 0,0);
  770. laAddOperatorProperty(p, "set_min", "Set Min", "Set The Property To The Min Value", "LA_real_set_min", 0,0);
  771. laAddOperatorProperty(p, "hyper_data", "View Hyper Data", "Show Properties Of Specific Data Block", "LA_view_hyper_data", L'🛈', 0);
  772. p = la_SetGeneralRoot(&MAIN.GeneralFloatArraySub, "__general_real_arr__", "Genral Float Array Operations", "Genral Float Array Operations");
  773. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_real_array_restore_default", L'⭯', 0);
  774. laAddOperatorProperty(p, "set_max", "Set Max", "Set The Property To The Max Value", "LA_real_array_set_max", 0,0);
  775. laAddOperatorProperty(p, "set_min", "Set Min", "Set The Property To The Min Value", "LA_real_array_set_min", 0,0);
  776. laAddOperatorProperty(p, "hyper_data", "View Hyper Data", "Show Properties Of Specific Data Block", "LA_view_hyper_data", L'🛈', 0);
  777. p = la_SetGeneralRoot(&MAIN.GeneralEnumSub, "__general_enum__", "Genral Enum Operations", "Genral Enum Operations");
  778. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_enum_restore_default", L'⭯', 0);
  779. p = la_SetGeneralRoot(&MAIN.GeneralEnumArraySub, "__general_enum_arr__", "Genral Enum Array Operations", "Genral Enum Array Operations");
  780. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_enum_array_restore_default", L'⭯', 0);
  781. p = la_SetGeneralRoot(&MAIN.GeneralStringSub, "__general_string__", "Genral String Operations", "Genral String Operations");
  782. laAddOperatorProperty(p, "get_folder_path", "Get Folder Path", "Get a folder path", "LA_string_get_folder_path", L'📁', 0);
  783. laAddOperatorProperty(p, "get_file_path", "Get File Path", "Get a file path", "LA_string_get_file_path", L'🖹', 0);
  784. laAddOperatorProperty(p, "copy", "Copy", "Copy to clipboard", "LA_string_copy", 0,0);
  785. laAddOperatorProperty(p, "paste", "Paste", "Paste from clipboard", "LA_system_paste", 0,0);
  786. laAddOperatorProperty(p, "restore", "Restore Default", "Restore Default Value", "LA_string_set_default", L'⭯', 0);
  787. p->UiDefine=laui_StringPropUiDefine;
  788. p = la_SetGeneralRoot(&MAIN.GeneralOperatorSub, "__general_operator__", "Genral Operator Operations", "Genral Operator Operations");
  789. p = la_SetGeneralRoot(&MAIN.GeneralCollectionSub, "__general_collection__", "Genral Collection Operations", "Genral Collection Operations");
  790. laAddOperatorProperty(p, "put_data_block", "Put", "Append Pending Data Block Here", "LA_sub_put_data_block", L'🔗', 0);
  791. laAddOperatorProperty(p, "save_instance", "Save Instance", "Save instance as a udf block", "LA_udf_save_instance", 0,0);
  792. }
  793. void la_RegisterInternalProps(){
  794. laPropContainer *p, *ip, *p2, *ip2, *sp1, *sp2;
  795. laProp *ep;
  796. laPropPack pp;
  797. laSubProp *sp;
  798. laKeyMapper *km;
  799. laCanvasTemplate *v2dt;
  800. {
  801. la_UDFAppendSharedTypePointer("_LA_ROOT_NODE_", &MAIN);
  802. la_UDFAppendSharedTypePointer("_TNS_ROOT_NODE_", T);
  803. // THEME ==================================================================================================
  804. {
  805. p = laDefineRoot();
  806. laAddPropertyContainer("any_pointer", "Any Pointer", "A pointer that is not exposed to access", 0,0,sizeof(void*), 0,0,LA_PROP_OTHER_ALLOC);
  807. laAddSubGroup(p, "windows", "Windows", "All Registered Windows Of This Application", "ui_window",0,0,0,-1, laget_FirstWindow, laget_ActiveWindow, laget_ListNext, 0,0,0,0,0);
  808. 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);
  809. 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);
  810. 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);{
  811. laAddStringProperty(p, "name", "Name", "Boxed Theme Name", 0,0,0,0,1, offsetof(laBoxedTheme, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  812. laAddFloatProperty(p, "margins", "Margins", "Margins On Four Sides", 0,"Left,Right,Top,Bottom", 0,1, -1, 0.05, 1, 0,offsetof(laBoxedTheme, Margins), 0,0,4, 0,laset_ThemeMargins, 0,0,0,0,0,0);
  813. laAddFloatProperty(p, "paddings", "Paddings", "Paddings On Four Sides", 0,"Left,Right,Top,Bottom", 0,1, -1, 0.05, 1, 0,offsetof(laBoxedTheme, Paddings), 0,0,4, 0,laset_ThemePaddings, 0,0,0,0,0,0);
  814. 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);
  815. 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);
  816. 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);
  817. 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);
  818. 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);
  819. 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);
  820. 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);
  821. laAddSubGroup(p, "parent", "Parent", "Parent Theme", "theme",0,0,0,offsetof(laBoxedTheme, Parent), 0,0,0,0,0,0,0,LA_UDF_REFER);
  822. }
  823. p = laAddPropertyContainer("theme", "Theme Package", "A Package With ALl Types Of Theme For Ui Items", 0,laui_Theme, sizeof(laTheme), 0,0,2);{
  824. laAddStringProperty(p, "name", "Name", "Theme Name", 0,0,0,0,1, offsetof(laTheme, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  825. laAddStringProperty(p, "author", "Author", "The Author's Name", 0,0,0,0,1, offsetof(laTheme, Author), 0,0,0,0,0);
  826. 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);
  827. 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);
  828. 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);
  829. 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);
  830. 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);
  831. 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);
  832. 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);
  833. 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);
  834. 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);
  835. 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);
  836. 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);
  837. 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);
  838. 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);
  839. 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);
  840. 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);
  841. 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);
  842. 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);
  843. laAddOperatorProperty(p, "delete", "Delete", "Delete this theme", "LA_delete_theme", 0,0);
  844. }
  845. }
  846. // TIME INFO =========================================================================================
  847. p = laAddPropertyContainer("time_info", "Time Info", "Time Information Y/M/D/H/M/S", L'🕒', 0,sizeof(laTimeInfo), 0,0,LA_PROP_OTHER_ALLOC);{
  848. 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);
  849. 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);
  850. 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);
  851. 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);
  852. 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);
  853. 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);
  854. 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);
  855. }
  856. // LA MAIN =========================================================================================
  857. p = laAddPropertyContainer("la_main", "LA Root", "LA Root Structure", L'🖴', 0,sizeof(LA), 0,0,2|LA_PROP_OTHER_ALLOC);{
  858. 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);
  859. 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);
  860. _LA_PROP_WINDOW=laAddSubGroup(p, "windows", "Windows", "All Windows Under LA Control", "ui_window",0,0,0,offsetof(LA, CurrentWindow), laget_FirstWindow, 0,laget_ListNext, 0,0,0,offsetof(LA, Windows), 0);
  861. la_UDFAppendSharedTypePointer("_LA_PROP_WINDOW", _LA_PROP_WINDOW);
  862. laAddSubGroup(p, "data", "Data", "Data Root Control", "property_container",0,0,0,offsetof(LA, DataRoot.Root), 0,0,0,0,0,0,0,0);
  863. 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);
  864. 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);
  865. 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);
  866. 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);
  867. 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);
  868. laSubGroupExtraFunctions(sp,0,0,0,laget_PanelTemplateCategory);
  869. 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);
  870. 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);
  871. laSubGroupDetachable(sp, laget_DetachedControllerFirst, laget_ListNext);
  872. LA_PROP_CONTROLLER=sp;
  873. 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);
  874. laSubGroupExtraFunctions(sp,lafilter_NodeCategory,0,0,0);
  875. 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);
  876. laAddSubGroup(p, "drivers", "Drivers", "Driver page collection","la_driver_collection",0,0,0,offsetof(LA,Drivers),0,0,0,0,0,0,0,LA_UDF_SINGLE);
  877. laAddStringProperty(p, "identifier", "Identifier", "Identifier", 0,0,0,0,0,0,0,laget_MainIdentifier, 0,0,LA_AS_IDENTIFIER|LA_READ_ONLY);
  878. laAddSubGroup(p, "test_ucn", "TEST UCN", "---", "udf_content_node",0,0,0,offsetof(LA, TEST_Link), 0,0,0,0,0,0,0,0);
  879. 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);
  880. laAddStringProperty(p, "example_string", "Example String", "Example string", 0,0,0,0,1, offsetof(LA,example_string), 0,0,0,0,0);
  881. 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.",
  882. LA_WIDGET_STRING_PLAIN, 0,0,0,0,0,0,laget_UnknownPropertyString, 0,0,LA_READ_ONLY);
  883. }
  884. p = laAddPropertyContainer("la_node_category", "Node Category", "Node category", 0,laui_IdentifierOnly, sizeof(laNodeCategory), 0,0,1);{
  885. 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);
  886. 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);
  887. }
  888. p = laAddPropertyContainer("la_input_mapping_collection", "Input Mapping Collection", "Input mapping collection", 0,0,sizeof(laRackPageCollection), 0,0,1);{
  889. 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);
  890. 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);
  891. }
  892. p = laAddPropertyContainer("la_driver_collection", "Driver Collection", "Driver collection", 0,0,sizeof(laRackPageCollection), 0,0,1);{
  893. laAddSubGroup(p, "pages", "Pages", "Rack pages","la_rack_page",0,0,0,-1,0,laget_CurrentRackPage,0,0,0,0,offsetof(laRackPageCollection,Pages),0);
  894. sp=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);
  895. laSubGroupDetachable(sp,laget_FirstDriverPage,laget_ListNext);
  896. }
  897. p = laAddPropertyContainer("la_rack_page", "Rack Page", "A page of nodes", 0,laui_IdentifierOnly, sizeof(laRackPage), 0,0,2);{
  898. laAddStringProperty(p, "name", "Name", "Name of the page", 0,0,0,0,1, offsetof(laRackPage, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  899. 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);
  900. 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);
  901. laAddSubGroup(p, "racks", "Racks", "Racks for nodes","la_node_rack",0,0,0,-1,0,0,0,0,0,0,offsetof(laRackPage,Racks),0);
  902. laAddOperatorProperty(p,"add_rack","Add Rack", "Add a rack into the page", "LA_add_rack", '+', 0);
  903. }
  904. //p = laAddPropertyContainer("udf_fail_node", "UDF Failed Node", "Single Wild Data Block Reference", laui_UDFFailNodeItem, sizeof(laUDFFailNode), 0,0,0,0,0); {
  905. // laAddSubGroup(p, "instance", "Instance", "Actual Data Block Instance", "property_trash_item",0,0,0 Item.p), 0,0,0,0,0,0,0,0,
  906. // 0,0,
  907. // 0);
  908. // 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,
  909. // 0,0,
  910. // 0);
  911. //}
  912. p = laAddPropertyContainer("la_difference", "Difference", "A difference stack item (undo/redo).", 0,laui_IdentifierOnly, sizeof(laDiff), 0,0,1);{
  913. 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);
  914. }
  915. p = laAddPropertyContainer("la_log", "Resource Folder", "A resource folder to search for UDF references.", 0,laui_ResourceFolderItem, sizeof(laLogEntry), 0,0,1);{
  916. 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);
  917. }
  918. p = laAddPropertyContainer("la_resource_folder", "Resource Folder", "A resource folder to search for UDF references.", 0,laui_ResourceFolderItem, sizeof(laResourceFolder), 0,0,1);{
  919. laAddStringProperty(p, "path", "Path", "Path", 0,0,0,0,1, offsetof(laResourceFolder, Path), 0,0,laset_ResourcePath, 0,0);
  920. laAddOperatorProperty(p, "remove", "Remove", "Remove this resource folder entry", "LA_remove_resource_folder", L'❌', 0);
  921. }
  922. p = laAddPropertyContainer("managed_udf", "Managed UDF", "Managed UDF files", L'🖹', laui_ManagedUDFItem, sizeof(laManagedUDF), 0,0,0);{
  923. 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);
  924. 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);
  925. }
  926. p = laAddPropertyContainer("udf", "UDF File", "UDF file block", L'🖹', 0,sizeof(laUDF), 0,0,0);{
  927. laAddStringProperty(p, "path", "Path", "File Path", 0,0,0,0,1, offsetof(laUDF, FileName), 0,0,0,0,LA_READ_ONLY);
  928. 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);
  929. laAddEnumItemAs(ep, "MODIFIED", "Modified", "There are unsaved changes bound to this file", 1, L'🌑');
  930. laAddEnumItemAs(ep, "CLEAN", "Clean", "File data is untouched", 0,0);
  931. ep->ElementBytes=2;
  932. }
  933. p = laAddPropertyContainer("udf_content_node", "UDF Content Node", "Type Structure For Previewing,Selecting,Linking UDF Contnet", L'🖹', 0,0,0,0,0);{
  934. laAddStringProperty(p, "full_path", "Full Path", "Full Path", 0,0,0,0,0,0,0,laget_UDFContentNodeFullPath, 0,0,LA_READ_ONLY);
  935. laAddStringProperty(p, "identifier", "Identifier", "Self Identifier", 0,0,0,0,0,0,0,laget_UDFContentNodeIdentifier, 0,0,LA_AS_IDENTIFIER|LA_READ_ONLY);
  936. 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);
  937. 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);
  938. 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);
  939. 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);
  940. }
  941. p = laAddPropertyContainer("udf_content_instance", "UDF Content Instance", "Instance/FileSeek Storage For Previewing,Selecting,Linking UDF Contnet", L'🖹', 0,0,0,0,0);{
  942. laAddStringProperty(p, "identifier", "Identifier", "Self Identifier", 0,0,0,0,0,0,0,laget_UDFContentInstanceIdentifier, 0,0,LA_READ_ONLY);
  943. 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);
  944. 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);
  945. 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);
  946. }
  947. p = laAddPropertyContainer("managed_prop", "Managed Property", "Managed property for detecting changes for saving files", 0,0,sizeof(laManagedSaveProp), 0,0,0);{
  948. laAddStringProperty(p, "path", "Path", "Property path", 0,0,0,0,1, offsetof(laManagedSaveProp, Path), 0,0,0,0,LA_READ_ONLY);
  949. }
  950. p = laAddPropertyContainer("int_property", "Int Property", "Int property specific info", L'i', laui_IntPropInfo, sizeof(laIntProp), 0,0,1);{
  951. 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);
  952. 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);
  953. 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);
  954. 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);
  955. } MAIN.ContainerInt = p;
  956. p = laAddPropertyContainer("float_property", "Float Property", "Float property specific info", L'i', laui_FloatPropInfo, sizeof(laFloatProp), 0,0,1);{
  957. 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);
  958. 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);
  959. 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);
  960. 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);
  961. } MAIN.ContainerFloat = p;
  962. // USER PREF ========================================================
  963. p = laAddPropertyContainer("la_user_preference", "User Preference", "Kernel settings for LA main structure", L'⚙', 0,sizeof(LA), lapost_UserPreferences, 0,2|LA_PROP_OTHER_ALLOC);{
  964. laPropContainerExtraFunctions(p,0,lareset_Main,0,0,0);
  965. 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);
  966. 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);
  967. 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);
  968. 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);
  969. 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);
  970. 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);
  971. 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);
  972. 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);
  973. 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);{
  974. laAddEnumItemAs(ep, "none", "None", "Don't use multisample", 0,0);
  975. laAddEnumItemAs(ep, "2", "2X", "2X multisample", 2, 0);
  976. laAddEnumItemAs(ep, "4", "4X", "4X multisample", 4, 0);
  977. laAddEnumItemAs(ep, "8", "8X", "8X multisample", 8, 0);
  978. laAddEnumItemAs(ep, "16", "16X", "16X multisample", 16, 0);
  979. }
  980. 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);
  981. 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);
  982. 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);
  983. 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);
  984. 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);
  985. 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);
  986. 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);
  987. 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);
  988. 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);{
  989. laAddEnumItem(ep, "no", "No", "Use original english string", 0);
  990. laAddEnumItem(ep, "yes", "Yes", "Use translated string", 0);
  991. }
  992. 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);
  993. 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);
  994. 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);{
  995. laAddEnumItemAs(ep, "DATA_BLOCKS", "Data Blocks", "All data blocks", 0,0);
  996. laAddEnumItemAs(ep, "FILES", "Files", "All Files", 1, 0);
  997. }
  998. 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);
  999. 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);
  1000. }
  1001. p = laAddPropertyContainer("la_translation_language", "Language", "Translation language pack", 0,0,sizeof(laTranslationNode), 0,0,1);{
  1002. laAddStringProperty(p, "name", "Name", "The name of this language", 0,0,0,"Unknown", 1, offsetof(laTranslationNode, LanguageName), 0,0,0,0,LA_AS_IDENTIFIER);
  1003. }
  1004. p = laAddPropertyContainer("la_extension_type", "Extension Type", "File extension and its matching type for file filtering", 0,0,sizeof(laExtensionType), 0,0,0);{
  1005. 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);
  1006. }
  1007. // UI WINDOW ========================================================================================
  1008. p = laAddPropertyContainer("ui_window", "Window Node", "Property Container For A System Window", 0,laui_SubPropInfoDefault, sizeof(laWindow), lapost_Window, 0,2);{
  1009. 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);
  1010. laAddSubGroup(p, "layouts", "Layouts", "Layout List Of The Whole Window", "ui_layout",0,0,0,offsetof(laWindow, CurrentLayout), laget_WindowFirstLayout, 0,laget_ListNext, 0,0,laset_WindowActiveLayout, offsetof(laWindow, Layouts), 0);
  1011. _LA_PROP_PANEL = laAddSubGroup(p, "panels", "Panels", "Panel list of this window", "ui_panel",0,0,0,-1, 0,0,0,0,0,0,offsetof(laWindow, Panels), 0);
  1012. la_UDFAppendSharedTypePointer("_LA_PROP_PANEL", _LA_PROP_PANEL);
  1013. 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);
  1014. 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);
  1015. 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);
  1016. laAddIntProperty(p, "position", "Position", "The Position Of A Window", 0,"X,Y", "px", 0,0,1, 0,0,offsetof(laWindow, X), 0,0,2, 0,0,0,0,0,0,0,0);
  1017. laAddIntProperty(p, "size", "Size", "The Size Of A Window", 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);
  1018. laAddIntProperty(p, "client_size", "Client Area Size", "Display Canvans Size Of A Window", 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);
  1019. 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);
  1020. 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);{
  1021. laAddEnumItemAs(ep, "SRGB", "sRGB", "Standard sRGB diplay", TNS_COLOR_SPACE_SRGB, 0);
  1022. laAddEnumItemAs(ep, "CLAY", "Clay", "Clay color space (AdobeRGB 1998 compatible)", TNS_COLOR_SPACE_CLAY, 0);
  1023. }
  1024. 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);{
  1025. laAddEnumItemAs(ep, "NONE", "None", "Don't show overflow", 0,0);
  1026. laAddEnumItemAs(ep, "STRIPES", "Stripes", "Show overflowing colors as stripes", 1, 0);
  1027. }
  1028. }
  1029. // UI LAYOUT ========================================================================================
  1030. p = laAddPropertyContainer("ui_block", "Layout Node", "Property Container For Single Layout", 0,laui_LayoutListItem, sizeof(laBlock), 0,0,0);{
  1031. 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);
  1032. 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);
  1033. 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);
  1034. 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);
  1035. 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);
  1036. 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);
  1037. 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);
  1038. 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);
  1039. laAddOperatorProperty(p, "fold", "Fold", "Fold the title bar", "LA_block_fold_title", 0,0);
  1040. laAddOperatorProperty(p, "maximize", "Maximize", "Maximize the block", "LA_block_maximize", 0,0);
  1041. }
  1042. p = laAddPropertyContainer("ui_layout", "Layout Node", "Property Container For Single Layout", 0,laui_LayoutListItem, sizeof(laLayout), 0,0,2);{
  1043. laAddStringProperty(p, "title", "Title", "The Title/Name Of A Panel", 0,0,0,0,1, offsetof(laLayout, ID), 0,0,0,0,LA_AS_IDENTIFIER);
  1044. _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);
  1045. la_UDFAppendSharedTypePointer("_LA_PROP_BLOCK", _LA_PROP_BLOCK);
  1046. }
  1047. // UI PANEL =========================================================================================
  1048. p = laAddPropertyContainer("ui_panel", "Panel Node", "Property Container For General Panels", 0,laui_PanelListItem, sizeof(laPanel), lapost_Panel, 0,1);{
  1049. laAddStringProperty(p, "title", "Title", "The Title/Name Of A Panel", 0,0,0,0,1, offsetof(laPanel, Title), 0,0,laset_PanelTitle, 0,LA_AS_IDENTIFIER|LA_TRANSLATE);
  1050. 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);
  1051. 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);
  1052. 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);
  1053. 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);{
  1054. laAddEnumItem(ep, "no", "No Snap", "Not Snapped to edge", 0);
  1055. laAddEnumItem(ep, "yes", "Snap", "Snapped to edge", L'🞉');
  1056. } //don't swap order with the one below
  1057. 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,0,0,0);
  1058. 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);
  1059. 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);
  1060. 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);{
  1061. ep->ElementBytes = 1;
  1062. laAddEnumItem(ep, "false", "False", "Not A Menu Panel", L'❌');
  1063. laAddEnumItem(ep, "true", "IsTrue", "Is A Menu Panel", L'🗩');
  1064. }
  1065. laAddOperatorProperty(p, "hide", "Hide", "Hide this panel", "LA_hide_panel", L'🗕', 0);
  1066. laAddOperatorProperty(p, "dock", "Dock", "Dock this panel", "LA_dock_panel", L'🗖', 0);
  1067. laAddOperatorProperty(p, "close", "Close", "Close this panel", "LA_block_close_panel", L'❌', 0);
  1068. //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);
  1069. laAddSubGroup(p, "uil","Ui List", "Panel Main Ui List", "ui_list",0,0,0,offsetof(laPanel, UI), 0,0,0,0,0,0,0,0);
  1070. 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,0);
  1071. 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);
  1072. 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);
  1073. 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);
  1074. }
  1075. // UI ITEM ==========================================================================================
  1076. p = laAddPropertyContainer("ui_list", "Ui List", "Property Container For Ui List Sub Type", L'⮑', 0,sizeof(laUiList), 0,0,0);{
  1077. laAddStringProperty(p, "tab_name", "Tab Name", "The Name Of A Tab", 0,0,0,0,0,0,0,0,0,0,LA_AS_IDENTIFIER);
  1078. _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);
  1079. la_UDFAppendSharedTypePointer("_LA_PROP_UI_ITEM", _LA_PROP_UI_ITEM);
  1080. 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);
  1081. 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);
  1082. 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);
  1083. 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)
  1084. ->ElementBytes = 2;
  1085. 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)
  1086. ->ElementBytes = 2;
  1087. }
  1088. p = laAddPropertyContainer("ui_instance", "Instance", "UiList Instance Entry", L'🗇', 0,sizeof(laColumn), 0,0,0);{
  1089. //nothing needed
  1090. }
  1091. p = laAddPropertyContainer("ui_column", "Ui Column", "A Column Handles The Aligning Of Ui Items", L'◫', laui_IdentifierOnly, sizeof(laColumn), 0,0,0);{
  1092. 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);
  1093. 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);
  1094. 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);
  1095. 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);
  1096. 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);{
  1097. laAddEnumItem(ep, "none", "None", "No Snapping", 0);
  1098. laAddEnumItem(ep, "left", "Left", "Snap At Left", L'⮄');
  1099. laAddEnumItem(ep, "right", "Right", "Snap At Right", L'⮆');
  1100. }
  1101. 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);
  1102. 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);
  1103. 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);
  1104. }
  1105. p = laAddPropertyContainer("panel_template", "Panel Template", "Panel template for creating new panels", 0,0,sizeof(laUiTemplate), 0,0,0);{
  1106. laAddStringProperty(p, "identifier", "Identifier", "Identifier Of This Template", 0,0,0,0,1, offsetof(laUiTemplate, Identifier), 0,0,0,0,LA_AS_IDENTIFIER);
  1107. laAddStringProperty(p, "title", "Title", "Panel title", 0,0,0,0,1, offsetof(laUiTemplate, Title), 0,0,0,0,LA_TRANSLATE);
  1108. 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);
  1109. }
  1110. p = laAddPropertyContainer("ui_item", "Ui Item", "Property Container For Ui Items", 0,0,sizeof(laUiItem), lapost_UiItem, lapostim_UiItem, 0);{
  1111. 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);
  1112. 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);
  1113. 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)
  1114. ->ElementBytes = sizeof(short);
  1115. //ep = laAddEnumProperty(p, "type", "Type", "The Type Of This Ui Item", 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,LA_UDF_IGNORE);{
  1116. // laAddEnumItemAs(ep, "button", "Button", "Button (Pure Operator)", LA_UI_INTERNAL_BUTTON, L'🔨');
  1117. // laAddEnumItemAs(ep, "property_watcher", "Property Watcher", "Property Watcher For Int/Float/Enum", LA_UI_INTERNAL_WATCHER, L'🔑');
  1118. // laAddEnumItemAs(ep, "group", "Group", "A Group That Holds A Sub-UiList", LA_UI_INTERNAL_GROUP, L'📁');
  1119. // laAddEnumItemAs(ep, "tab", "Tab", "A Tab Root That Holds Multiple Sub-UiList", LA_UI_INTERNAL_TAB, L'📑');
  1120. // laAddEnumItemAs(ep, "label", "Label", "A Static Label", LA_UI_INTERNAL_LABEL, 0);
  1121. // laAddEnumItemAs(ep, "3d_view", "3D View", "Integrated 3D View UI Item", LA_UI_INTERNAL_3D_VIEW, 0);
  1122. // laAddEnumItemAs(ep, "2d_view", "2D View", "Integrated 2D View UI Item", LA_UI_INTERNAL_2D_VIEW, L'🖻');
  1123. // laAddEnumItemAs(ep, "column_adjuster", "Column Adjuster", "To Adjust Column Width", LA_UI_INTERNAL_ADJUSTER, L'↔');
  1124. // laAddEnumItemAs(ep, "bracket_begin", "Bracket Begin", "Bracket Beginner Used To Set Ui Conditions", LA_UI_INTERNAL_BRACKET_BEGIN, '{');
  1125. // laAddEnumItemAs(ep, "bracket_else", "Bracket Else", "Bracket Else Block Beginner", LA_UI_INTERNAL_BRACKET_ELSE, 0);
  1126. // laAddEnumItemAs(ep, "folder_begin", "Folder Begin", "Folder Beginner Used To Toggle Some Display", LA_UI_INTERNAL_FOLDER_BEGIN, '{');
  1127. // laAddEnumItemAs(ep, "bracket_end", "Bracket End", "Bracket Closer", LA_UI_INTERNAL_BRACKET_END, '}');
  1128. // laAddEnumItemAs(ep, "aligner", "Aligner", "Align Column Heights", LA_UI_INTERNAL_ALIGNER, 0);
  1129. // laAddEnumItemAs(ep, "menu", "Menu", "Menu Activiator", LA_UI_INTERNAL_MENU, L'🗩');
  1130. //}
  1131. laAddStringProperty(p, "path", "Path", "Data Path", 0,0,0,0,0,0,0,laget_UiDataPath, 0,laread_UiDataPath,LA_READ_ONLY);
  1132. 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);
  1133. 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);
  1134. 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);
  1135. 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);
  1136. 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);
  1137. //ep = laAddSubGroup(p, "Ui Template", "A Template Used To Create Sub Ui", "ui_template",0,LA_WIDGET_COLLECTION_SELECTOR, 0,offsetof(laUiItem, Template), laget_PanelTemplate, 0,laget_ListNext, 0,0,0,0,0,0,LA_UDF_REFER);
  1138. //laSubGroupDetachable(ep, laget_UiTemplate, laget_ListNext);
  1139. 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);
  1140. 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);
  1141. 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);
  1142. 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);
  1143. laAddStringProperty(p, "extra_args", "Extra Arguments", "Extra Arguments For This Ui Item", 0,0,0,0,0,0,0,0,0,0,0);
  1144. laAddStringProperty(p, "display", "Display", "Display String For Label", 0,0,0,0,0,0,0,0,0,0,0);
  1145. //laAddSubGroup(p, "Condition Ui Extra Data", "Condition Ui Extra Data For Linkage And Conditioning", "ui_condition_extra_data",0,0,0,offsetof(laUiItem, Extra), laget_ConditionerExtra, 0,0,0,0,0,0,0,0,0);
  1146. //laAddSubGroup(p, "2d_extra", "2D View Extra Data", "2D View Ui States And Modes Storage", 0,0,0,0,offsetof(laUiItem, Extra), laget_CanvasExtra, 0,0,0,0,0,0,0);
  1147. laAddOperatorProperty(p, "maximize", "Maximize", "Maximize this UI item", "LA_canvas_ui_maximize", 0,0);
  1148. }
  1149. p = laAddPropertyContainer("ui_type", "Ui Type", "Ui Type Descriptor", 0,laui_IdentifierOnly, sizeof(laUiType), 0,0,0);{
  1150. 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);
  1151. }
  1152. // NODE ================================================================================================
  1153. p = laAddPropertyContainer("la_out_socket", "Output Socket", "Output socket for nodes", 0,0,sizeof(laNodeOutSocket), 0,0,1);{
  1154. laAddStringProperty(p, "label", "Label", "Socket's label", 0,0,0,0,1, offsetof(laNodeOutSocket, Label), 0,0,0,0,LA_AS_IDENTIFIER);
  1155. 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);
  1156. 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);
  1157. 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);
  1158. } LA_PC_SOCKET_OUT = p;
  1159. p = laAddPropertyContainer("la_in_socket", "Input Socket", "Input socket for nodest", 0,0,sizeof(laNodeInSocket), 0,0,1);{
  1160. laAddStringProperty(p, "label", "Label", "Socket's label", 0,0,0,0,1, offsetof(laNodeInSocket, Label), 0,0,0,0,LA_AS_IDENTIFIER);
  1161. 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);
  1162. LA_PROP_SOCKET_SOURCE=sp;
  1163. 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);
  1164. 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);
  1165. 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);
  1166. } LA_PC_SOCKET_IN = p;
  1167. laPropContainerExtraFunctions(p,0,0,latouched_NodeInSocket,0,0);
  1168. p = laAddPropertyContainer("la_value_mapper", "Value Mapper", "Value mapper", 0,0,sizeof(laValueMapper), 0,0,1);{
  1169. 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);
  1170. 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);
  1171. 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);
  1172. } LA_PC_MAPPER=p;
  1173. p = laAddPropertyContainer("la_value_mapper_point", "Value Mapper", "Value mapper", 0,0,sizeof(laValueMapperPoint), 0,0,1);{
  1174. 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);
  1175. }
  1176. // PROPERTIES ==========================================================================================
  1177. p = laAddPropertyContainer("property_item", "Property Item", "Property Item For Data Types Like Int/Float/Enum/String/SubType", L'🔌', 0,sizeof(laProp), 0,0,1);{
  1178. 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);
  1179. laAddStringProperty(p, "name", "Name", "Property Display Name", 0,0,0,0,0,offsetof(laProp, Name), 0,0,0,0,LA_READ_ONLY);
  1180. laAddStringProperty(p, "description", "Description", "Property Description", 0,0,0,0,0,offsetof(laProp, Description), 0,0,0,0,LA_READ_ONLY);
  1181. 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);
  1182. 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);
  1183. 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);
  1184. 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);
  1185. }
  1186. p = laAddPropertyContainer("property_container", "Property Container", "Property Container For Some Property Items", L'🔌', 0,sizeof(laPropContainer), 0,0,1);{
  1187. 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);
  1188. 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);
  1189. laAddStringProperty(p, "description", "Description", "Property Description", 0,0,0,0,0,offsetof(laPropContainer, Name), 0,0,0,0,LA_UDF_IGNORE|LA_READ_ONLY);
  1190. 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);
  1191. 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);
  1192. _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);
  1193. _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);
  1194. laAddOperatorProperty(p, "restore_all", "Restore All", "Restore All Trash Items Or Failed Nodes To A User Selected Linkage", "LA_sub_restore_data_block", L'⭯', 0);
  1195. }
  1196. p = laAddPropertyContainer("property_trash_item", "Trash Item", "Single Trash Item", 0,0,0,0,0,0);{
  1197. 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);
  1198. 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);
  1199. laAddOperatorProperty(p, "restore", "Restore", "Restore Data Block To A User Selected Linkage", "LA_sub_restore_data_block", L'⭯', 0);
  1200. }
  1201. p = laAddPropertyContainer("property_package", "Property Package", "Property Package For Data Access (Mainly UI)", L'🔌', 0,sizeof(laPropPack), 0,0,0);{
  1202. 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);
  1203. }
  1204. p = laAddPropertyContainer("property_step", "Property Step", "Property Segment Item", 0,0,sizeof(laPropStep), 0,0,0);{
  1205. laAddSubGroup(p, "property", "Property", "Property Reference", "property_item",0,0,0,offsetof(laPropStep, p), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1206. }
  1207. p = laAddPropertyContainer("detached_prop", "Detached Prop", "Detached Prop", L'🔌', 0,sizeof(laSubProp) + 48, lapost_DetachedProp, 0,0);{
  1208. 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);
  1209. laAddStringProperty(p, "path", "Path", "Data Path", 0,0,0,0,0,0,0,laget_DetachedPropPath, 0,laread_DetachedPropPath, 0);
  1210. laAddStringProperty(p, "rename", "Rename", "Rename", 0,0,0,0,0,offsetof(laProp, Identifier), 0,0,0,laread_DetachedPropRename, 0);
  1211. }
  1212. }
  1213. // TNS WORLD ============================================================================================
  1214. p = laAddPropertyContainer("tns_main", "TNS Main", "Render Kernel Root Structure", 0,0,sizeof(tnsMain), 0,0,2);{
  1215. laAddSubGroup(p, "world", "World", "World Descriptor", "tns_world",0,0,0,offsetof(tnsMain, World), 0,0,0,0,0,0,0,LA_UDF_SINGLE | LA_UDF_LOCAL);
  1216. 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);
  1217. laSubGroupDetachable(sp, tnsget_detached_FirstTexture, laget_ListNext);
  1218. //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);
  1219. }
  1220. p = laAddPropertyContainer("tns_texture", "TNS Texture Item", "A Texture Descriptor With GL Handle", 0,0,sizeof(tnsTexture), 0,0,0);{
  1221. 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);
  1222. 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);
  1223. 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);{
  1224. laAddEnumItemAs(ep, "rgba", "GL_RGBA", "GL_RGBA", GL_RGBA8,0);
  1225. laAddEnumItemAs(ep, "rgb", "GL_RGB", "GL_RGB", GL_RGB8,0);
  1226. laAddEnumItemAs(ep, "rg", "GL_RG", "GL_RG", GL_RG8,0);
  1227. laAddEnumItemAs(ep, "r", "GL_RED", "GL_RED", GL_R8,0);
  1228. laAddEnumItemAs(ep, "rgba32f", "GL_RGBA32F", "GL_RGBA32F", GL_RGBA32F,0);
  1229. laAddEnumItemAs(ep, "rgb32f", "GL_RGB32F", "GL_RGB32F", GL_RGB32F,0);
  1230. laAddEnumItemAs(ep, "rg32f", "GL_RG32F", "GL_RG32F", GL_RG32F,0);
  1231. laAddEnumItemAs(ep, "r32f", "GL_R32F", "GL_R32F", GL_R32F,0);
  1232. laAddEnumItemAs(ep, "rgba32i", "GL_RGBA32I", "GL_R32I", GL_RGBA32I,0);
  1233. laAddEnumItemAs(ep, "rgb32i", "GL_RGB32I", "GL_R32I", GL_RGB32I,0);
  1234. laAddEnumItemAs(ep, "rg32i", "GL_RG32I", "GL_R32I", GL_RG32I,0);
  1235. laAddEnumItemAs(ep, "r32i", "GL_R32I", "GL_R32I", GL_R32I,0);
  1236. laAddEnumItemAs(ep, "depth", "GL_DEPTH_COMPONENT32F", "GL_DEPTH_COMPONENT32F", GL_DEPTH_COMPONENT32F,0);
  1237. }
  1238. p->Template2D = la_GetCanvasTemplate(0,"la_CanvasDrawTexture");
  1239. }
  1240. p = laAddPropertyContainer("tns_world", "World", "3D World Structure", 0,0,sizeof(tnsWorld), 0,0,2|LA_PROP_OTHER_ALLOC);{
  1241. sp = laAddSubGroup(p, "root_objects", "Root Objects", "List of all root objects", "tns_object",0,0,0,0,0,0,0,0,0,0,offsetof(tnsWorld, RootObjects), 0);
  1242. laSubGroupDetachable(sp, tnsget_detached_FirstRootObject, laget_ListNext);
  1243. 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);
  1244. }
  1245. p = laAddPropertyContainer("tns_child_object", "Child Object", "Child object linker", 0,0,sizeof(laListItemPointer), 0,0,0);{
  1246. 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);
  1247. }
  1248. p = laAddPropertyContainer("tns_object", "Object", "3D Object Item", 0,0,sizeof(tnsObject), tnspost_Object, 0,2);{
  1249. laPropContainerExtraFunctions(p,0,0,0,tnspropagate_Object,0);
  1250. TNS_PC_OBJECT_GENERIC=p;
  1251. 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);
  1252. 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);
  1253. 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);{
  1254. laAddEnumItem(ep, "false", "False", "False", L'🌔');
  1255. laAddEnumItem(ep, "true", "IsTrue", "IsTrue", L'🌑');
  1256. }
  1257. 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);{
  1258. laAddEnumItem(ep, "false", "False", "False", L'🚫');
  1259. laAddEnumItem(ep, "true", "IsTrue", "IsTrue", L'📷');
  1260. }
  1261. 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);{
  1262. laAddEnumItemAs(ep, "EMPTY", "Empty", "Empty object, not rendered", 0,L'➕');
  1263. laAddEnumItemAs(ep, "CAMERA", "Camera", "Camera object, to render a scene", TNS_OBJECT_CAMERA, L'📷');
  1264. laAddEnumItemAs(ep, "LIGHT", "Lamp", "Lamp object, to illuminate the scene", TNS_OBJECT_LIGHT, 0);
  1265. laAddEnumItemAs(ep, "MESH", "Mesh", "Mesh object, made of verts/edges/faces", TNS_OBJECT_MESH, 0);
  1266. }
  1267. 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);
  1268. 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);
  1269. laAddFloatProperty(p, "scale", "Scale", "Local Uniform Scale", 0,0,0,0,0,0,0,0,offsetof(tnsObject, Scale), 0,tnsset_ObjectScale, 0,0,0,0,0,0,0,0,0);
  1270. 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,0);
  1271. 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,0);
  1272. laAddFloatProperty(p, "gscale", "Global Scale", "Global uniform scale", 0,0,0,0,0,0,0,0,offsetof(tnsObject, GScale), 0,0,0,0,0,0,0,0,0,0,0);
  1273. 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);
  1274. 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);
  1275. 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);{
  1276. laAddEnumItem(ep, "xyz", "XYZ", "XYZ Euler Mode", 0); laAddEnumItem(ep, "xzy", "XZY", "XZY Euler Mode", 0);
  1277. laAddEnumItem(ep, "yxz", "YXZ", "YXZ Euler Mode", 0); laAddEnumItem(ep, "yzx", "YZX", "YZX Euler Mode", 0);
  1278. laAddEnumItem(ep, "zxy", "ZXY", "ZXY Euler Mode", 0); laAddEnumItem(ep, "zyx", "ZYX", "ZYX Euler Mode", 0);
  1279. laAddEnumItem(ep, "quaternion", "Quaternion", "Quaternion Mode", 0);
  1280. }
  1281. laAddSubGroup(p, "active", "Active", "Active reference", "tns_object",0,0,0,offsetof(tnsObject, Active), 0,0,0,0,0,0,0,LA_UDF_REFER|LA_READ_ONLY);
  1282. 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);
  1283. laAddSubGroup(p, "parent", "Parent", "Object parent", "tns_object",0,0,0,offsetof(tnsObject, ParentObject), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1284. 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);
  1285. }
  1286. p = laAddPropertyContainer("tns_mesh_object", "Mesh Object", "Mesh object", 0,0,sizeof(tnsMeshObject), tnspost_Object, 0,2);{
  1287. laPropContainerExtraFunctions(p,0,0,tnstouched_Object,tnspropagate_Object,0);
  1288. TNS_PC_OBJECT_MESH=p;
  1289. 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);
  1290. laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,0,0,0,0,0,0,0,0,LA_UDF_LOCAL);
  1291. 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);{
  1292. laAddEnumItemAs(ep, "OBJECT", "Object", "Object mode", TNS_MESH_OBJECT_MODE, 0);
  1293. laAddEnumItemAs(ep, "EDIT", "Edit", "Edit mode", TNS_MESH_EDIT_MODE, 0);
  1294. }
  1295. 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);
  1296. 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);
  1297. 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);
  1298. 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);
  1299. 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);
  1300. 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);
  1301. laAddRawProperty(p, "v", "Verts", "Verts", offsetof(tnsMeshObject, v), tnsget_MeshObjectVertSize, 0,0,LA_READ_ONLY);
  1302. laAddRawProperty(p, "e", "Edges", "Edges", offsetof(tnsMeshObject, e), tnsget_MeshObjectEdgeSize, 0,0,LA_READ_ONLY);
  1303. laAddRawProperty(p, "f", "Faces", "Faces", offsetof(tnsMeshObject, f), 0,tnsget_MeshObjectFaceRaw, tnsset_MeshObjectFaceRaw, LA_READ_ONLY);
  1304. 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);
  1305. 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);
  1306. 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);
  1307. //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);
  1308. //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);
  1309. //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);
  1310. }
  1311. p = laAddPropertyContainer("tns_camera", "Camera", "Camera object", L'📷', 0,sizeof(tnsCamera), 0,0,2);{
  1312. laPropContainerExtraFunctions(p,0,0,0,tnspropagate_Object,0);
  1313. TNS_PC_OBJECT_CAMERA=p;
  1314. 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);
  1315. laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,0,0,0,0,0,0,0,0,LA_UDF_LOCAL);
  1316. 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);{
  1317. laAddEnumItem(ep, "PERSP", "Perspective", "Camera in linear perspective", 0);
  1318. laAddEnumItem(ep, "ORTHO", "Orthographic", "Camera in orthographic view", 0);
  1319. }
  1320. 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);
  1321. 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);
  1322. 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);
  1323. 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);
  1324. laAddOperatorProperty(p, "set_active", "Set Active", "Set this camera as the active one", "TNS_set_active_camera", 0,0);
  1325. }
  1326. p = laAddPropertyContainer("tns_light", "Light", "Light object", L'🔅', 0,sizeof(tnsLight), 0,0,2);{
  1327. laPropContainerExtraFunctions(p,0,0,0,tnspropagate_Object,0);
  1328. TNS_PC_OBJECT_LIGHT=p;
  1329. 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);
  1330. laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,0,0,0,0,0,0,0,0,LA_UDF_LOCAL);
  1331. 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);{
  1332. laAddEnumItem(ep, "NONE", "Perspective", "Camera in linear perspective", 0);
  1333. laAddEnumItem(ep, "orthographic", "Orthographic", "Camera in orthographic view", 0);
  1334. }
  1335. }
  1336. p = laAddPropertyContainer("tns_mvert", "MVert", "MMesh vert", 0,0,sizeof(tnsMVert), 0,0,0);{
  1337. 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);
  1338. 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);
  1339. 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);
  1340. 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);
  1341. laAddSubGroup(p, "elink", "Edge Link", "Edge link", "tns_medge_link",0,0,0,-1,0,0,0,0,0,0,offsetof(tnsMVert, elink),0);
  1342. }
  1343. p = laAddPropertyContainer("tns_medge", "MEdge", "MMesh edge", 0,0,sizeof(tnsMEdge), 0,0,0);{
  1344. 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);
  1345. 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);
  1346. laAddSubGroup(p, "vl", "vl", "Left vert", "tns_mvert",0,0,0,offsetof(tnsMEdge, vl),0,0,0,0,0,0,0,LA_UDF_REFER);
  1347. laAddSubGroup(p, "vr", "vr", "Right vert", "tns_mvert",0,0,0,offsetof(tnsMEdge, vr),0,0,0,0,0,0,0,LA_UDF_REFER);
  1348. laAddSubGroup(p, "fl", "fl", "Left face", "tns_mface",0,0,0,offsetof(tnsMEdge, fl),0,0,0,0,0,0,0,LA_UDF_REFER);
  1349. laAddSubGroup(p, "fr", "fr", "Right face", "tns_mface",0,0,0,offsetof(tnsMEdge, fr),0,0,0,0,0,0,0,LA_UDF_REFER);
  1350. }
  1351. p = laAddPropertyContainer("tns_mface", "MFace", "MMesh face", 0,0,sizeof(tnsMFace), 0,0,0);{
  1352. 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);
  1353. 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);
  1354. laAddSubGroup(p, "l", "Loop", "Loop", "tns_loop",0,0,0,-1,0,0,0,0,0,0,offsetof(tnsMFace, l),0);
  1355. 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;
  1356. 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);
  1357. //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);
  1358. 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);
  1359. }
  1360. p = laAddPropertyContainer("tns_medge_link", "MEdge Link", "MEdge Link", 0,0,sizeof(laListItemPointer), 0,0,0);{
  1361. laAddSubGroup(p, "e", "Edge", "Edge", "tns_medge",0,0,0,offsetof(laListItemPointer, p),0,0,0,0,0,0,0,LA_UDF_REFER);
  1362. }
  1363. p = laAddPropertyContainer("tns_loop", "MFace Loop", "MFace Loop", 0,0,sizeof(laListItemPointer), 0,0,0);{
  1364. laAddSubGroup(p, "e", "Edge", "Edge", "tns_medge",0,0,0,offsetof(laListItemPointer, p),0,0,0,0,0,0,0,LA_UDF_REFER);
  1365. }
  1366. }