*/}}

la_properties.c 115 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677
  1. /*
  2. * LaGUI: A graphical application framework.
  3. * Copyright (C) 2022-2023 Wu Yiming
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #include "../la_5.h"
  19. extern LA MAIN;
  20. extern struct _tnsMain *T;
  21. void *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, int val){
  98. bt->Margins[index]=val;
  99. la_RefreshBoxedThemeColor(bt);
  100. laRedrawAllWindows();
  101. }
  102. void laset_ThemePaddings(laBoxedTheme* bt, int index, int 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_RefreshThemeColorSelf(t); laRedrawAllWindows(); }
  111. void laset_ThemeEdgeBrightness(laTheme* t, real val){ t->EdgeBrightness = val; la_RefreshThemeColorSelf(t); laRedrawAllWindows(); }
  112. void laset_ThemeVertexTransparency(laTheme* t, real val){ t->VertexTransparency = val; la_RefreshThemeColorSelf(t); laRedrawAllWindows(); }
  113. void laset_ThemeVertexBrightness(laTheme* t, real val){ t->VertexBrightness = val; la_RefreshThemeColorSelf(t); laRedrawAllWindows(); }
  114. void laset_ThemeSVertexTransparency(laTheme* t, real val){ t->SelectedVertexTransparency = val; la_RefreshThemeColorSelf(t); laRedrawAllWindows(); }
  115. void laset_ThemeSEdgeTransparency(laTheme* t, real val){ t->SelectedEdgeTransparency = val; la_RefreshThemeColorSelf(t); laRedrawAllWindows(); }
  116. void laset_ThemeSFaceTransparency(laTheme* t, real val){ t->SelectedFaceTransparency = val; la_RefreshThemeColorSelf(t); 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. void* 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. }
  281. void laget_PanelTitle(laPanel *p, char *result){
  282. strCopyFull(result, p->Title->Ptr);
  283. }
  284. void laset_PanelTitle(laPanel *p, char *content){
  285. strSafeSet(&p->Title, content);
  286. p->TitleWidth = tnsStringGetWidth(transLate(p->Title->Ptr), 0,0);
  287. }
  288. void laread_PanelTitle(laPanel *p, char *content){
  289. strSafeSet(&p->Title, content);
  290. }
  291. void laset_PanelSnapDistance(laPanel *p, int index, int n){
  292. int a;
  293. if (!n) return;
  294. switch (index){ //lrtb
  295. case 0:
  296. p->SL = p->SL ? n : 0;
  297. break;
  298. case 1:
  299. p->SR = p->SR ? n : 0;
  300. break;
  301. case 2:
  302. p->ST = p->ST ? n : 0;
  303. break;
  304. case 3:
  305. p->SB = p->SB ? n : 0;
  306. break;
  307. }
  308. }
  309. void laread_PanelSnapDistance(laPanel* p, int index, int n) {
  310. int a;
  311. if (!n) return;
  312. switch (index) { //lrtb
  313. case 0: p->SL = n; break;
  314. case 1: p->SR = n; break;
  315. case 2: p->ST = n; break;
  316. case 3: p->SB = n; break;
  317. }
  318. }
  319. void laset_PanelSnapEnable(laPanel *p, int index, int n){
  320. laWindow *w = MAIN.CurrentWindow;
  321. int a;
  322. switch (index){ //lrtb
  323. case 0:
  324. p->SL = (n && p->X) ? p->X : 0;
  325. break;
  326. case 1:
  327. p->SR = (n && w ? ((a = MAIN.CurrentWindow->CW - p->X - p->W) ? a : 0) : n);
  328. break;
  329. case 2:
  330. p->ST = (n && p->Y) ? p->Y : 0;
  331. break;
  332. case 3:
  333. p->SB = (n && w ? ((a = MAIN.CurrentWindow->CH - p->Y - p->H) ? a : 0) : n);
  334. break;
  335. }
  336. }
  337. void laget_PanelSnapEnable(laPanel *p, int *result){
  338. result[0] = p->SL ? 1 : 0;
  339. result[1] = p->SR ? 1 : 0;
  340. result[2] = p->ST ? 1 : 0;
  341. result[3] = p->SB ? 1 : 0;
  342. }
  343. void laget_LayoutTitle(laLayout *l, char *result){
  344. strCopyFull(result, l->ID->Ptr);
  345. }
  346. void laset_LayoutTitle(laLayout *l, char *content){
  347. strSafeSet(&l->ID, content);
  348. if(l->ID->Ptr) laRenameWindow(MAIN.CurrentWindow, l->ID->Ptr);
  349. }
  350. //void* laget_LayoutPanelFirst(laLayout* l) {
  351. // return l->Panels.pFirst;
  352. //}
  353. void laset_WindowActiveLayout(laWindow *w, laLayout *l, int UNUSED_State){
  354. la_StopAllOperators();
  355. w->CurrentLayout = l;
  356. if(!w->win){return;}
  357. laRenameWindow(w, l->ID->Ptr);
  358. laRedrawCurrentWindow();
  359. }
  360. void* laget_WindowActiveLayout(laWindow *w, void* unused){
  361. return w->CurrentLayout;
  362. }
  363. //void laget_PanelSnappingTrueFalse(laPanel* p, int* result) {
  364. // result[0] = p->SL > 0 ? 1 : 0;
  365. // result[1] = p->SR > 0 ? 1 : 0;
  366. // result[2] = p->ST > 0 ? 1 : 0;
  367. // result[3] = p->SB > 0 ? 1 : 0;
  368. //}
  369. //void laset_PanelSnappingTrueFalse(laPanel* p,int Index, int n) {
  370. // int* v = &p->SL;
  371. // int val = abs(v[Index]);
  372. // v[Index] = val*(n ? 1 : -1);
  373. //}
  374. void laset_PanelMultisample(void* unused, int value){
  375. MAIN.PanelMultisample = value;
  376. tnsReconfigureTextureParameters(value);
  377. laRedrawAllWindows();
  378. }
  379. void *laget_UiInternalType(void *UNUSED){
  380. return MAIN.UiTypes.pFirst;
  381. }
  382. void laget_TimeString(laTimeInfo *ti, char *result,char** result_direct){
  383. sprintf(result, "%d-%.02d-%.02d %.02d:%.02d:%.02d", ti->Year, ti->Month, ti->Day, ti->Hour, ti->Minute, ti->Second);
  384. }
  385. int laget_TimeYear(laTimeInfo *ti){
  386. return (int)ti->Year;
  387. }
  388. int laget_TimeMonth(laTimeInfo *ti){
  389. return (int)ti->Month;
  390. }
  391. int laget_TimeDay(laTimeInfo *ti){
  392. return (int)ti->Day;
  393. }
  394. int laget_TimeHour(laTimeInfo *ti){
  395. return (int)ti->Hour;
  396. }
  397. int laget_TimeMinute(laTimeInfo *ti){
  398. return (int)ti->Minute;
  399. }
  400. int laget_TimeSecond(laTimeInfo *ti){
  401. return (int)ti->Second;
  402. }
  403. void *laget_ConditionerExtra(laUiItem *ui){
  404. if (ui->Type == &_LA_UI_CONDITION ||
  405. ui->Type == &_LA_UI_CONDITION_END ||
  406. ui->Type == &_LA_UI_CONDITION_ELSE ||
  407. ui->Type == _LA_UI_CONDITION_TOGGLE){
  408. return ui->Extra;
  409. }
  410. return 0;
  411. }
  412. void *laget_CanvasExtra(laUiItem *ui){
  413. if (ui->Type == _LA_UI_CANVAS){
  414. return ui->Extra;
  415. }
  416. return 0;
  417. }
  418. void laget_UnknownPropertyString(laUDF *udf, char *result, char** here){
  419. *here="Unknown Property";
  420. }
  421. void laget_MainIdentifier(laUDF *udf, char *result, char** here){
  422. strcpy(result, "MAIN");
  423. }
  424. void laget_UDFFilePath(laUDF *udf, char *result, char** here){
  425. *here=udf->FileName->Ptr;
  426. }
  427. void laget_UDFContentNodeFullPath(laUDFContentNode *ucn, char *result, char** here){
  428. if (ucn->FullPath && ucn->FullPath->Ptr) *here=ucn->FullPath->Ptr;
  429. }
  430. void laget_UDFContentNodeIdentifier(laUDFContentNode *ucn, char *result, char** here){
  431. if (ucn->Identifier && ucn->Identifier->Ptr) *here=ucn->Identifier->Ptr;
  432. }
  433. void laget_UDFContentInstanceIdentifier(laUDFContentInstance *uci, char *result, char** here){
  434. if (uci->Identifier && uci->Identifier->Ptr) *here=uci->Identifier->Ptr;
  435. }
  436. void lapost_PropPack(laPropPack *pp);
  437. void laget_ConditionNodePropPath(laUiConditionNode *ucn, char *result, char** here){
  438. if (!ucn->PP.Go) return;
  439. la_GetPropPackPath(&ucn->PP, result);
  440. }
  441. void laset_ConditionNodePropPath(laUiConditionNode *ucn, char *content, char** here){
  442. if (ucn->PP.Go){
  443. la_FreePropStepCache(ucn->PP.Go);
  444. ucn->PP.LastPs = ucn->PP.Go = 0;
  445. }
  446. la_GetPropFromPath(&ucn->PP, ucn->PP.RawThis, content, 0);
  447. }
  448. void laread_ConditionNodePropPath(laUiConditionNode *ucn, char *Content, char** here){
  449. if (!Content || !Content[0]) return;
  450. ucn->PP.Go = CreateNewBuffer(char, strlen(Content) + 1);
  451. strcpy(ucn->PP.Go, Content);
  452. }
  453. void lapost_ConditionNode(laUiConditionNode *ucn){
  454. lapost_PropPack(&ucn->PP);
  455. }
  456. void laset_ConditionNodeType(laUiConditionNode *ucn, int Type){
  457. ucn->Type = Type;
  458. switch (Type){
  459. case LA_CONDITION_PROP:
  460. case LA_CONDITION_INT:
  461. case LA_CONDITION_FLOAT:
  462. case LA_CONDITION_STRING:
  463. case LA_CONDITION_FALSE:
  464. case LA_CONDITION_TRUE:
  465. la_ConditionNodeFreeRecursive(ucn->Expression1);
  466. la_ConditionNodeFreeRecursive(ucn->Expression2);
  467. ucn->Expression1 = 0;
  468. ucn->Expression2 = 0;
  469. if (ucn->PP.LastPs) la_FreePropStepCache(ucn->PP.Go);
  470. ucn->PP.LastPs = ucn->PP.Go = ucn->PP.RawThis = 0;
  471. break;
  472. case LA_CONDITION_NOT:
  473. la_ConditionNodeFreeRecursive(ucn->Expression2);
  474. ucn->Expression2 = 0;
  475. if (ucn->PP.LastPs) la_FreePropStepCache(ucn->PP.Go);
  476. ucn->PP.LastPs = ucn->PP.Go = ucn->PP.RawThis = 0;
  477. if (!ucn->Expression1) ucn->Expression1 = laIntExpression(0);
  478. break;
  479. default:
  480. if (!ucn->Expression1) ucn->Expression1 = laIntExpression(0);
  481. if (!ucn->Expression2) ucn->Expression2 = laIntExpression(1);
  482. break;
  483. }
  484. laRecalcCurrentPanel();
  485. }
  486. void laread_ConditionNodeType(laUiConditionNode *ucn, int Type){
  487. ucn->Type = Type;
  488. }
  489. void* laget_FirstDriverPage(laRackPageCollection* rpc, void* unused2){
  490. return rpc->Pages.pFirst;
  491. }
  492. void* laget_CurrentRackPage(laRackPageCollection* c){
  493. return c->CurrentPage;
  494. }
  495. void laset_CurrentRackPage(laRackPageCollection* c,laRackPage* rp){
  496. memAssignRef(c,&c->CurrentPage,rp);
  497. }
  498. void* laget_CurrentAnimationAction(void* unused_a){
  499. return MAIN.Animation->CurrentAction;
  500. }
  501. void* laset_CurrentAnimationAction(void* unused_a, laAction* c){
  502. memAssignRef(MAIN.Animation,&MAIN.Animation->CurrentAction,c);
  503. laNotifyUsers("la.animation.current_action");
  504. }
  505. void laset_WindowColorSpace(laWindow* w, int space){
  506. w->OutputColorSpace=space; if(w->win) laRedrawCurrentWindow();
  507. }
  508. void laset_WindowShowStripes(laWindow* w, int stripes){
  509. w->OutputShowStripes=stripes; if(w->win) laRedrawCurrentWindow();
  510. }
  511. void *tnsget_TnsMain(void *unused,void *unused2){
  512. return T;
  513. }
  514. void *tnsget_World(void *unused,void *unused2){
  515. return &T->World;
  516. }
  517. void *tnsread_World(void *unused, void *inst){
  518. }
  519. void *tnsget_detached_FirstRootObject(void *UNUSED1, void *UNUSED2){
  520. return T->World.RootObjects.pFirst;
  521. }
  522. void *tnsget_detached_FirstTexture(void *UNUSED1, void *UNUSED2){
  523. return T->Textures.pFirst;
  524. }
  525. void *tnsget_PreviewTexture(void *UNUSED){
  526. return T->PreviewTexture;
  527. }
  528. void *tnsset_PreviewTexture(void *UNUSED_PARENT, void *tex, int UNUSEDSTATE){
  529. T->PreviewTexture = tex;
  530. }
  531. void *tnsget_NextLinkedObject(tnsObject *o, laPropIterator *pi){
  532. pi->Linker = ((laListItemPointer *)pi->Linker->pNext);
  533. return pi->Linker->p;
  534. }
  535. void *tnsget_FirstChildObject(tnsObject *ob){
  536. return ob->ChildObjects.pFirst;
  537. }
  538. void tnsset_ObjectLocation(tnsObject* o, real val, int n){ o->Location[n]=val; tnsSelfTransformValueChanged(o); laNotifyUsers("tns.world"); }
  539. void tnsset_ObjectRotation(tnsObject* o, real val, int n){ o->Rotation[n]=val; tnsSelfTransformValueChanged(o); laNotifyUsers("tns.world"); }
  540. void tnsset_ObjectScale(tnsObject* o, real val){ o->Scale=val; tnsSelfTransformValueChanged(o); laNotifyUsers("tns.world"); }
  541. void tnsset_ObjectDLocationARR(tnsObject* o, real* arr){ tnsVectorCopy3d(arr,o->DLocation); tnsDeltaTransformValueChanged(o); laNotifyUsers("tns.world"); }
  542. void tnsset_ObjectDRotationARR(tnsObject* o, real* arr){ tnsVectorCopy3d(arr,o->DRotation); tnsDeltaTransformValueChanged(o); laNotifyUsers("tns.world"); }
  543. void tnsset_ObjectDScale(tnsObject* o, real val){ o->DScale=val; tnsDeltaTransformValueChanged(o); laNotifyUsers("tns.world"); }
  544. void laget_UiTemplateIdentifier(laUiTemplate *uit, char *result, char** here){
  545. *here=uit->Identifier->Ptr;
  546. }
  547. void laset_UiTemplateIdentifier(laUiTemplate *uit, char *content){
  548. strSafeSet(&uit->Identifier, content);
  549. }
  550. void laget_UiDataPath(laUiItem *ui, char *result){
  551. laPropStep *ps = ui->PP.Go;
  552. if (ui->PP.LastPs || ui->PP.Go){
  553. for (ps; ps; ps = ps->pNext){
  554. if (ps->Type == U'@' || ps->Type == U'#' || ps->Type == U'='){
  555. strcat(result, ps->p);
  556. }else{
  557. strcat(result, ps->p->Identifier);
  558. }
  559. if (ps->pNext){
  560. if (ps->pNext->Type == U'.') strcat(result, ".");
  561. elif (ps->pNext->Type == U'#') strcat(result, "#");
  562. elif (ps->pNext->Type == U'@') strcat(result, "@");
  563. elif (ps->pNext->Type == U'=') strcat(result, "= ");
  564. elif (ps->pNext->Type == U'$') strcat(result, "$");
  565. }
  566. }
  567. }elif (ui->AT){
  568. strcpy(result, "");
  569. }
  570. }
  571. void laget_UiOperatorID(laUiItem *ui, char *result, char** here){
  572. if (ui->AT){
  573. *here=ui->AT->Identifier;
  574. }else *result=0;
  575. }
  576. void laread_UiDataPath(laUiItem *ui, char *Content){
  577. if (!Content || !Content[0]) return;
  578. ui->PP.Go = CreateNewBuffer(char, strlen(Content) + 1);
  579. strcpy(ui->PP.Go, Content);
  580. }
  581. void laread_UiOperatorID(laUiItem *ui, char *Content){
  582. ui->AT = laGetOperatorType(Content);
  583. }
  584. void *laget_PanelTemplate(void *UNUSED, void *UNUSED2){
  585. return MAIN.PanelTemplates.pFirst;
  586. }
  587. void laget_PanelTemplateCategory(void* rack_unused, laUiTemplate* uit, char* copy, char** ptr){
  588. if(uit->CategoryName&&uit->CategoryName->Ptr) *ptr=uit->CategoryName->Ptr;
  589. }
  590. void lapost_Window(laWindow *w){
  591. laStartWindow(w);
  592. }
  593. int la_CreateSystemWindow(laWindow *window, int synctovbank);
  594. void lapostim_Window(laWindow *w){
  595. w->IsFullScreen=0;
  596. la_CreateSystemWindow(w,MAIN.Windows.pFirst==MAIN.Windows.pLast);
  597. la_AssignWindowPP(w);
  598. MAIN.CurrentWindow = w;
  599. }
  600. void lapost_PropPack(laPropPack *pp){
  601. char *path = pp->Go;
  602. if (pp->LastPs /* || !path*/) return;
  603. if ((!path || (path && !path[0])) && pp->RawThis) pp->LastPs = pp->RawThis->LastPs;
  604. if (pp->RawThis) lapost_PropPack(pp->RawThis);
  605. pp->Go = 0;
  606. la_GetPropFromPath(pp, pp->RawThis, path, 0);
  607. FreeMem(path);
  608. }
  609. void lapost_UiItem(laUiItem *ui){
  610. lapost_PropPack(&ui->PP);
  611. //if(ui->Type == _LA_UI_CANVAS) ui->Type->Init(ui);
  612. }
  613. void lapostim_UiItem(laUiItem *ui){
  614. if (ui->Type && ui->Type->Init && ui->Type != _LA_UI_CANVAS && ui->Type != &_LA_UI_CONDITION) ui->Type->Init(ui);
  615. ui->State = ui->State ? ui->State : (ui->Type ? LA_UI_NORMAL : 0);
  616. la_AssignPropExtras(ui);
  617. }
  618. void* laget_SavePanel(laWindow* w, laPropIterator* pi){
  619. for(laPanel* p=w->Panels.pFirst;p;p=p->Item.pNext){ if(!p->Mode || p->IsMenuPanel || p->PanelTemplate) return p; }
  620. return 0;
  621. }
  622. void* lagetnext_SavePanel(laPanel* p, laPropIterator* pi){
  623. for(p=p->Item.pNext;p;p=p->Item.pNext){ if(!p->Mode || p->IsMenuPanel || p->PanelTemplate) return p; }
  624. return 0;
  625. }
  626. void lapost_Panel(laPanel *p){
  627. p->PP.EndInstance = p;
  628. p->PP.LastPs = &p->FakePS;
  629. p->PP.LastPs->p = _LA_PROP_PANEL;
  630. la_EnsurePanelExtras(p);
  631. laRecalcPanel(p);
  632. p->FrameDistinguish = 100;
  633. if(p->IsMenuPanel || p->Block) p->Show=1;
  634. laUiTemplate* uit=p->PanelTemplate;
  635. if(uit&&uit->PropFunc){ uit->PropFunc(p); }
  636. if(uit){
  637. uit->Define(&p->UI, &p->PP, &p->PropLinkPP, 0, 0);
  638. if(p->Mode) laui_DefaultPanelTitleBar(&p->TitleBar, &p->PP, &p->PropLinkPP, uit->Header);
  639. }
  640. if(p->IsMenuPanel){ laui_DefaultMenuBarActual(&p->TitleBar, &p->PP, &p->PropLinkPP, 0, 0); }
  641. //if(p->Title) p->TitleWidth = tnsStringGetWidth(transLate(p->Title->Ptr), 0, 0);
  642. #ifdef __linux__
  643. XSync(MAIN.dpy,0);
  644. #endif
  645. }
  646. void lapost_Block(laBlock *b){
  647. la_AssignBlockPP(b);
  648. }
  649. void lapost_UserPreferences(void* unused){
  650. //MAIN.ScaledUiRowHeight=MAIN.UiRowHeight;
  651. //tnsInvalidateFontCache();
  652. }
  653. void laset_ColorPickerGamma(void* unused, real gamma){
  654. MAIN.ColorPickerGamma=gamma; laRedrawCurrentWindow();
  655. }
  656. //void laget_DetachedPropContainerID(laProp* p, char * result) {
  657. // strcpy(result, p->Detached->Container->Identifier);
  658. //}
  659. //void laget_DetachedPropPropID(laProp* p, char * result) {
  660. // strcpy(result, p->Detached->Identifier);
  661. //}
  662. //void laset_DetachedPropContainerID(laProp* p, char * content) {
  663. // p->Description = CreateNewBuffer(char, 128);
  664. // strcpy(p->Description, content);
  665. //}
  666. //void laset_DetachedPropPropID(laProp* p, char * content) {
  667. // p->Name = CreateNewBuffer(char, 128);
  668. // strcpy(p->Name, content);
  669. //}
  670. void laread_DetachedPropRename(laProp *p, char *content){
  671. p->Identifier = CreateNewBuffer(char, 128);
  672. strcpy(p->Identifier, content);
  673. }
  674. void laget_DetachedPropPath(laProp *p, char *result, char** here){
  675. la_GetPropPackPath(&p->DetachedPP, result);
  676. }
  677. void laread_DetachedPropPath(laProp *p, char *content){
  678. p->DetachedPP.Go = CreateNewBuffer(char, 128);
  679. strcpy(p->DetachedPP.Go, content);
  680. }
  681. void lapost_DetachedProp(laProp *Prop){
  682. laPropContainer *pc = 0;
  683. laSubProp *np = 0;
  684. laIntProp *ip;
  685. laFloatProp *fp;
  686. laEnumProp *ep;
  687. laSubProp *sp;
  688. char *path = Prop->DetachedPP.Go;
  689. char *id = Prop->Identifier;
  690. laPropPack TempPP = {0};
  691. laListItem Item;
  692. Prop->DetachedPP.Go = 0;
  693. memcpy(&Item, &Prop->Item, sizeof(laListItem));
  694. la_GetPropFromPath(&TempPP, Prop->DetachedPP.RawThis, path, 0);
  695. //FreeMem(path);
  696. memcpy(Prop, TempPP.LastPs->p, la_GetPropertySize(TempPP.LastPs->p->PropertyType));
  697. memcpy(&Prop->DetachedPP, &TempPP, sizeof(laPropPack));
  698. memcpy(&Prop->Item, &Item, sizeof(laListItem));
  699. switch (Prop->PropertyType){
  700. case LA_PROP_INT:
  701. case LA_PROP_INT | LA_PROP_ARRAY:
  702. ip = Prop;
  703. ip->Detached = CreateNewBuffer(int, Prop->Len ? Prop->Len : 1);
  704. break;
  705. case LA_PROP_FLOAT:
  706. case LA_PROP_FLOAT | LA_PROP_ARRAY:
  707. fp = Prop;
  708. fp->Detached = CreateNewBuffer(real, Prop->Len ? Prop->Len : 1);
  709. break;
  710. case LA_PROP_ENUM:
  711. case LA_PROP_ENUM | LA_PROP_ARRAY:
  712. ep = Prop;
  713. ep->Detached = CreateNewBuffer(int, 1);
  714. ep->Detached[0] = ((laEnumItem *)ep->Items.pFirst)->Index;
  715. }
  716. Prop->Identifier = id;
  717. }
  718. void latouched_NodeInSocket(void* unused, int hint){
  719. laGraphRequestRebuild();
  720. }
  721. int lafilter_NodeCategory(void* unused, laNodeCategory* c){
  722. if(c->For&MAIN.FilterNodeCategory) return 1; return 0;
  723. }
  724. void tnspost_Object(tnsObject *o){
  725. /* what */
  726. }
  727. void tnspropagate_Object(tnsObject* o, laUDF* udf, int force){
  728. for(laListItemPointer* lip=o->ChildObjects.pFirst;lip;lip=lip->pNext){ if(!lip->p) continue;
  729. if(force || !laget_InstanceActiveUDF(lip->p)){ laset_InstanceUDF(lip->p, udf); tnspropagate_Object(lip->p,udf,force); }
  730. }
  731. }
  732. void tnstouched_Object(tnsObject *o, int hint){
  733. printf("touched\n");
  734. if(o->Type==TNS_OBJECT_MESH && (hint&TNS_HINT_GEOMETRY)){
  735. tnsInvalidateMeshBatch(o);
  736. }
  737. tnsInvalidateEvaluation(o);
  738. laNotifyUsers("tns.world");
  739. }
  740. int tnsget_MeshObjectVertSize(tnsMeshObject* o){ return o->totv*sizeof(tnsVert);/*can't use maxv*/ }
  741. int tnsget_MeshObjectEdgeSize(tnsMeshObject* o){ return o->tote*sizeof(tnsEdge);/*can't use maxv*/ }
  742. void* tnsget_MeshObjectFaceRaw(tnsMeshObject* o, int* r_size, int* r_is_copy){
  743. if(o->Mode==TNS_MESH_EDIT_MODE) return 0;
  744. int* arr=0; int next=0,max=0; int i=0;
  745. arrEnsureLength(&arr, i, &max, sizeof(int));
  746. arr[i]=o->totf; i++;
  747. for(int f=0;f<o->totf;f++){
  748. arrEnsureLength(&arr, i+o->f[f].looplen+2, &max, sizeof(int));
  749. arr[i]=o->f[f].looplen; i++;
  750. arr[i]=o->f[f].flags; i++;
  751. for(int l=0;l<o->f[f].looplen;l++){
  752. arr[i]=o->f[f].loop[l]; i++;
  753. }
  754. }
  755. *r_size = i*sizeof(int);
  756. *r_is_copy = 1;
  757. return arr;
  758. }
  759. void tnsset_MeshObjectFaceRaw(tnsMeshObject* o, int* data, int s){
  760. if(o->f){
  761. for(int fi=0;fi<o->maxf;fi++){ // ??? due to undo property order, maxf can be != totf, will it have problems?
  762. if(o->f[fi].loop){ free(o->f[fi].loop); o->f[fi].loop=0; }
  763. }
  764. arrFree(&o->f, &o->maxf); o->totf=0; o->maxf=0;
  765. }
  766. if(!data) return;
  767. int totf=data[0]; int i=1;
  768. o->f=calloc(1,sizeof(tnsFace)*totf); o->maxf=o->totf=totf;
  769. for(int fi=0;fi<totf;fi++){
  770. tnsFace*f=&o->f[fi];
  771. f->looplen=data[i]; i++;
  772. f->flags=data[i]; i++;
  773. f->loop=calloc(1,sizeof(int)*f->looplen);
  774. for(int li=0;li<f->looplen;li++){
  775. f->loop[li]=data[i]; i++;
  776. }
  777. }
  778. }
  779. laPropContainer* tnsget_ObjectType(tnsObject* o){
  780. switch(o->Type){
  781. case TNS_OBJECT_INSTANCER: return TNS_PC_OBJECT_INSTANCER;
  782. case TNS_OBJECT_CAMERA: return TNS_PC_OBJECT_CAMERA;
  783. case TNS_OBJECT_MESH: return TNS_PC_OBJECT_MESH;
  784. case TNS_OBJECT_LIGHT: return TNS_PC_OBJECT_LIGHT;
  785. default: return TNS_PC_OBJECT_GENERIC;
  786. }
  787. }
  788. void laget_AnimationActionHolderCategory(void* a_unused, laActionHolder* ah, char* copy, char** ptr){
  789. if(ah->CategoryTitle&&ah->CategoryTitle->Ptr) *ptr=ah->CategoryTitle->Ptr;
  790. }
  791. int laget_AnimationActionCurrentFrame(laAction* aa){
  792. return LA_ACTION_FRAME(aa);
  793. }
  794. int laaction_VerifyRootObject(void* Parent, laPropContainer* ParentType, void* Child, laPropContainer* ChildType){
  795. if(ParentType!=ChildType) return 0;
  796. if(ParentType!=TNS_PC_OBJECT_GENERIC) return 0;
  797. tnsObject*o=Child; if(o==Parent || o->InRoot==Parent) return 1;
  798. return 0;
  799. }
  800. void lareset_Main(void* Unused){
  801. return;
  802. }
  803. laPropContainer* LA_PC_SOCKET_IN;
  804. laPropContainer* LA_PC_SOCKET_OUT;
  805. laPropContainer* LA_PROP_SOCKET_SOURCE;
  806. laPropContainer* LA_PROP_SOCKET_OUT;
  807. laPropContainer* LA_PC_MAPPER;
  808. laPropContainer* TNS_PC_OBJECT_GENERIC;
  809. laPropContainer* TNS_PC_OBJECT_INSTANCER;
  810. laPropContainer* TNS_PC_OBJECT_CAMERA;
  811. laPropContainer* TNS_PC_OBJECT_LIGHT;
  812. laPropContainer* TNS_PC_OBJECT_MESH;
  813. laProp* LA_PROP_CONTROLLER;
  814. void la_RegisterGeneralProps(){
  815. laPropContainer *p, *ip, *p2, *ip2, *sp1, *sp2;
  816. laProp *ep;
  817. laPropPack pp;
  818. laSubProp *sp;
  819. laKeyMapper *km;
  820. p = la_SetGeneralRoot(&MAIN.GeneralIntSub, "__general_int__", "Genral Int Operations", "Genral Int Operations");
  821. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_prop_restore_default", U'⭯', 0);
  822. laAddOperatorProperty(p, "set_max", "Set Max", "Set property to its maximum value", "LA_prop_set_max", 0,0);
  823. laAddOperatorProperty(p, "set_min", "Set Min", "Set property to its minimum value", "LA_prop_set_min", 0,0);
  824. //laAddOperatorProperty(p, "hyper_data", "View Hyper Data", "Show Properties Of Specific Data Block", "LA_view_hyper_data", U'🛈', 0);
  825. laAddOperatorProperty(p, "insert_key", "Insert Key Frame", "Insert key frame in the active action", "LA_prop_insert_key", 0,0);
  826. p = la_SetGeneralRoot(&MAIN.GeneralIntArraySub, "__general_int_arr__", "Genral Int Array Operations", "Genral Int Array Operations");
  827. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_prop_restore_default", U'⭯', 0);
  828. laAddOperatorProperty(p, "set_max", "Set Max", "Set property to its maximum value", "LA_prop_set_max", 0,0);
  829. laAddOperatorProperty(p, "set_min", "Set Min", "Set property to its minimum value", "LA_prop_set_min", 0,0);
  830. //laAddOperatorProperty(p, "hyper_data", "View Hyper Data", "Show Properties Of Specific Data Block", "LA_view_hyper_data", U'🛈', 0);
  831. laAddOperatorProperty(p, "insert_key", "Insert Key Frame", "Insert key frame in the active action", "LA_prop_insert_key", 0,0);
  832. p = la_SetGeneralRoot(&MAIN.GeneralFloatSub, "__general_real__", "Genral Float Operations", "Genral Float Operations");
  833. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_prop_restore_default", U'⭯', 0);
  834. laAddOperatorProperty(p, "set_max", "Set Max", "Set property to its maximum value", "LA_prop_set_max", 0,0);
  835. laAddOperatorProperty(p, "set_min", "Set Min", "Set property to its minimum value", "LA_prop_set_min", 0,0);
  836. //laAddOperatorProperty(p, "hyper_data", "View Hyper Data", "Show Properties Of Specific Data Block", "LA_view_hyper_data", U'🛈', 0);
  837. laAddOperatorProperty(p, "insert_key", "Insert Key Frame", "Insert key frame in the active action", "LA_prop_insert_key", 0,0);
  838. p = la_SetGeneralRoot(&MAIN.GeneralFloatArraySub, "__general_real_arr__", "Genral Float Array Operations", "Genral Float Array Operations");
  839. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_prop_restore_default", U'⭯', 0);
  840. laAddOperatorProperty(p, "set_max", "Set Max", "Set property to its maximum value", "LA_prop_set_max", 0,0);
  841. laAddOperatorProperty(p, "set_min", "Set Min", "Set property to its minimum value", "LA_prop_set_min", 0,0);
  842. //laAddOperatorProperty(p, "hyper_data", "View Hyper Data", "Show Properties Of Specific Data Block", "LA_view_hyper_data", U'🛈', 0);
  843. laAddOperatorProperty(p, "insert_key", "Insert Key Frame", "Insert key frame in the active action", "LA_prop_insert_key", 0,0);
  844. p = la_SetGeneralRoot(&MAIN.GeneralEnumSub, "__general_enum__", "Genral Enum Operations", "Genral Enum Operations");
  845. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_prop_restore_default", U'⭯', 0);
  846. laAddOperatorProperty(p, "insert_key", "Insert Key Frame", "Insert key frame in the active action", "LA_prop_insert_key", 0,0);
  847. p = la_SetGeneralRoot(&MAIN.GeneralEnumArraySub, "__general_enum_arr__", "Genral Enum Array Operations", "Genral Enum Array Operations");
  848. laAddOperatorProperty(p, "restore", "Restore Default", "Restore the property to the original value", "LA_prop_restore_default", U'⭯', 0);
  849. laAddOperatorProperty(p, "insert_key", "Insert Key Frame", "Insert key frame in the active action", "LA_prop_insert_key", 0,0);
  850. p = la_SetGeneralRoot(&MAIN.GeneralStringSub, "__general_string__", "Genral String Operations", "Genral String Operations");
  851. laAddOperatorProperty(p, "copy", "Copy", "Copy to clipboard", "LA_string_copy", 0,0);
  852. laAddOperatorProperty(p, "paste", "Paste", "Paste from clipboard", "LA_system_paste", 0,0);
  853. laAddOperatorProperty(p, "restore", "Restore Default", "Restore Default Value", "LA_string_set_default", U'⭯', 0);
  854. laAddOperatorProperty(p, "get_folder_path", "Get Folder Path", "Get a folder path", "LA_string_get_folder_path", U'📁', 0);
  855. laAddOperatorProperty(p, "get_file_path", "Get File Path", "Get a file path", "LA_string_get_file_path", U'🖹', 0);
  856. p->UiDefine=laui_StringPropUiDefine;
  857. p = la_SetGeneralRoot(&MAIN.GeneralOperatorSub, "__general_operator__", "Genral Operator Operations", "Genral Operator Operations");
  858. p = la_SetGeneralRoot(&MAIN.GeneralCollectionSub, "__general_collection__", "Genral Collection Operations", "Genral Collection Operations");
  859. laAddOperatorProperty(p, "put_data_block", "Put", "Append Pending Data Block Here", "LA_sub_put_data_block", U'🔗', 0);
  860. laAddOperatorProperty(p, "save_instance", "Save Instance", "Save instance as a udf block", "LA_udf_save_instance", 0,0);
  861. }
  862. void lareset_RackPage(laRackPage* rp){
  863. laNodeRack* r; while(r=rp->Racks.pFirst){
  864. laBaseNode* bn; while(bn=r->Nodes.pFirst){
  865. bn->Type->Destroy(bn); lstRemoveItem(&r->Nodes,bn);
  866. }
  867. lstRemoveItem(&r->ParentPage->Racks, r); memLeave(r);
  868. }
  869. }
  870. void la_RegisterInternalProps(){
  871. laPropContainer *p, *ip, *p2, *ip2, *sp1, *sp2;
  872. laProp *ep;
  873. laPropPack pp;
  874. laSubProp *sp;
  875. laKeyMapper *km;
  876. laCanvasTemplate *v2dt;
  877. {
  878. la_UDFAppendSharedTypePointer("_LA_ROOT_NODE_", &MAIN);
  879. la_UDFAppendSharedTypePointer("_TNS_ROOT_NODE_", T);
  880. // THEME ==================================================================================================
  881. {
  882. p = laDefineRoot();
  883. laAddPropertyContainer("any_pointer", "Any Pointer", "A pointer that is not exposed to access", 0,0,sizeof(void*), 0,0,LA_PROP_OTHER_ALLOC);
  884. 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);
  885. 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);
  886. 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);{
  887. laAddStringProperty(p, "name", "Name", "Boxed Theme Name", 0,0,0,0,1, offsetof(laBoxedTheme, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  888. laAddIntProperty(p, "margins", "Margins", "Margins On Four Sides", 0,"Left,Right,Top,Bottom", 0, 10, -2, 1, 1, 0,offsetof(laBoxedTheme, Margins), 0,0,4, 0,laset_ThemeMargins, 0,0,0,0,0,0);
  889. laAddIntProperty(p, "paddings", "Paddings", "Paddings On Four Sides", 0,"Left,Right,Top,Bottom", 0,10, -2, 1, 1, 0,offsetof(laBoxedTheme, Paddings), 0,0,4, 0,laset_ThemePaddings, 0,0,0,0,0,0);
  890. 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);
  891. 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);
  892. 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);
  893. 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);
  894. 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);
  895. 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);
  896. 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);
  897. laAddSubGroup(p, "parent", "Parent", "Parent Theme", "theme",0,0,0,offsetof(laBoxedTheme, Parent), 0,0,0,0,0,0,0,LA_UDF_REFER);
  898. }
  899. p = laAddPropertyContainer("theme", "Theme Package", "A Package With ALl Types Of Theme For Ui Items", 0,laui_Theme, sizeof(laTheme), 0,0,2);{
  900. laAddStringProperty(p, "name", "Name", "Theme Name", 0,0,0,0,1, offsetof(laTheme, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  901. laAddStringProperty(p, "author", "Author", "The Author's Name", 0,0,0,0,1, offsetof(laTheme, Author), 0,0,0,0,0);
  902. 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);
  903. 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);
  904. 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);
  905. 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);
  906. 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);
  907. 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);
  908. 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);
  909. 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);
  910. 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);
  911. 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);
  912. 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);
  913. 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);
  914. 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);
  915. 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);
  916. 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);
  917. 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);
  918. 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);
  919. laAddOperatorProperty(p, "delete", "Delete", "Delete this theme", "LA_delete_theme", 0,0);
  920. }
  921. }
  922. // TIME INFO =========================================================================================
  923. p = laAddPropertyContainer("time_info", "Time Info", "Time Information Y/M/D/H/M/S", U'🕒', 0,sizeof(laTimeInfo), 0,0,LA_PROP_OTHER_ALLOC);{
  924. 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);
  925. 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);
  926. 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);
  927. 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);
  928. 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);
  929. 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);
  930. 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);
  931. }
  932. // LA MAIN =========================================================================================
  933. p = laAddPropertyContainer("la_main", "LA Root", "LA Root Structure", U'🖴', 0,sizeof(LA), 0,0,2|LA_PROP_OTHER_ALLOC);{
  934. 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);
  935. 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);
  936. 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);
  937. _LA_PROP_WINDOW=laAddSubGroup(p, "windows", "Windows", "All windows inside this application", "ui_window",0,0,0,offsetof(LA, CurrentWindow), laget_FirstWindow, 0,laget_ListNext, 0,0,0,offsetof(LA, Windows), 0);
  938. la_UDFAppendSharedTypePointer("_LA_PROP_WINDOW", _LA_PROP_WINDOW);
  939. laAddSubGroup(p, "data", "Data", "Data Root Control", "property_container",0,0,0,offsetof(LA, DataRoot.Root), 0,0,0,0,0,0,0,0);
  940. 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);
  941. 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);
  942. 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);
  943. 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);
  944. laSubGroupExtraFunctions(sp,0,0,0,laget_PanelTemplateCategory);
  945. 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);
  946. 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);
  947. laSubGroupDetachable(sp, laget_DetachedControllerFirst, laget_ListNext);
  948. LA_PROP_CONTROLLER=sp;
  949. 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);
  950. laSubGroupExtraFunctions(sp,lafilter_NodeCategory,0,0,0);
  951. 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);
  952. laAddSubGroup(p, "animation", "Animation", "Animation data","la_animation",0,0,0,offsetof(LA,Animation),0,0,0,0,0,0,0,LA_UDF_SINGLE);
  953. laAddStringProperty(p, "identifier", "Identifier", "Identifier", 0,0,0,0,0,0,0,laget_MainIdentifier, 0,0,LA_AS_IDENTIFIER|LA_READ_ONLY);
  954. laAddSubGroup(p, "test_ucn", "TEST UCN", "---", "udf_content_node",0,0,0,offsetof(LA, TEST_Link), 0,0,0,0,0,0,0,0);
  955. ep=laAddEnumProperty(p, "detached_view_switch", "View Detached", "Use detached view on panels", LA_WIDGET_ENUM_HIGHLIGHT,0,0,0,0,offsetof(LA, DetachedViewSwitch),0,0,0,0,0,0,0,0,0,LA_UDF_IGNORE);
  956. laAddEnumItemAs(ep, "LINKED", "Linked", "View is linked to global current states", 0, U'🔗');
  957. laAddEnumItemAs(ep, "DETACHED", "Detached", "View is detached from global states and is pinned to panel", 1, U'📌');
  958. 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);
  959. laAddStringProperty(p, "example_string", "Example String", "Example string", 0,0,0,0,1, offsetof(LA,example_string), 0,0,0,0,0);
  960. 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.",
  961. LA_WIDGET_STRING_PLAIN, 0,0,0,0,0,0,laget_UnknownPropertyString, 0,0,LA_READ_ONLY);
  962. }
  963. p = laAddPropertyContainer("la_node_category", "Node Category", "Node category", 0,laui_IdentifierOnly, sizeof(laNodeCategory), 0,0,1);{
  964. 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);
  965. 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);
  966. }
  967. p = laAddPropertyContainer("la_input_mapping_collection", "Input Mapping Collection", "Input mapping collection", 0,0,sizeof(laRackPageCollection), 0,0,1);{
  968. 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);
  969. 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);
  970. }
  971. p = laAddPropertyContainer("la_driver_collection", "Driver Collection", "Driver collection", 0,0,sizeof(laRackPageCollection), 0,0,1);{
  972. laAddSubGroup(p, "pages", "Pages", "Rack pages","la_rack_page",0,0,0,-1,0,laget_CurrentRackPage,0,0,0,0,offsetof(laRackPageCollection,Pages),0);
  973. sp=laAddSubGroup(p, "current_page", "Current Page", "Current page","la_rack_page",0,0,0,offsetof(laRackPageCollection,CurrentPage),laget_FirstDriverPage,0,laget_ListNext,laset_CurrentRackPage,0,0,0,LA_UDF_REFER);
  974. //laSubGroupDetachable(sp,laget_FirstDriverPage,laget_ListNext);
  975. }
  976. p = laAddPropertyContainer("la_rack_page", "Rack Page", "A page of nodes", 0,laui_IdentifierOnly, sizeof(laRackPage), 0,0,2);{
  977. laPropContainerExtraFunctions(p,0,lareset_RackPage,0,0,0);
  978. laAddStringProperty(p, "name", "Name", "Name of the page", 0,0,0,0,1, offsetof(laRackPage, Name), 0,0,0,0,LA_AS_IDENTIFIER);
  979. 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);
  980. 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);
  981. laAddSubGroup(p, "racks", "Racks", "Racks for nodes","la_node_rack",0,0,0,-1,0,0,0,0,0,0,offsetof(laRackPage,Racks),0);
  982. ep=laAddEnumProperty(p, "trigger", "Trigger", "Trigger evaluation on event",0,0,0,0,0,offsetof(laRackPage,TriggerMode),0,0,0,0,0,0,0,0,0,0);
  983. laAddEnumItemAs(ep, "ALWAYS", "Always", "Always evalueave this page",LA_PAGE_TRIGGER_ALWAYS,0);
  984. laAddEnumItemAs(ep, "NONE", "None", "This page is only evaluated when called from other pages",LA_PAGE_TRIGGER_NONE,0);
  985. ep=laAddEnumProperty(p, "use_script", "Use Script", "Use script instead of nodes",0,0,0,0,0,offsetof(laRackPage,UseScript),0,0,0,0,0,0,0,0,0,0);
  986. laAddEnumItemAs(ep, "NODES", "Nodes", "Use nodes to express logic",0,0);
  987. laAddEnumItemAs(ep, "SCRIPT", "Script", "Use scripts to express logic",1,0);
  988. laAddStringProperty(p, "script", "Script", "Script content",LA_WIDGET_STRING_MULTI,0,0,0,1,offsetof(laRackPage, Script), 0,0,0,0,0);
  989. laAddOperatorProperty(p,"add_rack","Add Rack", "Add a rack into the page", "LA_add_rack", '+', 0);
  990. }
  991. //p = laAddPropertyContainer("udf_fail_node", "UDF Failed Node", "Single Wild Data Block Reference", laui_UDFFailNodeItem, sizeof(laUDFFailNode), 0,0,0,0,0); {
  992. // laAddSubGroup(p, "instance", "Instance", "Actual Data Block Instance", "property_trash_item",0,0,0 Item.p), 0,0,0,0,0,0,0,0,
  993. // 0,0,
  994. // 0);
  995. // 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,
  996. // 0,0,
  997. // 0);
  998. //}
  999. p = laAddPropertyContainer("la_difference", "Difference", "A difference stack item (undo/redo).", 0,laui_IdentifierOnly, sizeof(laDiff), 0,0,1);{
  1000. 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);
  1001. }
  1002. p = laAddPropertyContainer("la_log", "Resource Folder", "A resource folder to search for UDF references.", 0,laui_ResourceFolderItem, sizeof(laLogEntry), 0,0,1);{
  1003. 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);
  1004. }
  1005. p = laAddPropertyContainer("la_resource_folder", "Resource Folder", "A resource folder to search for UDF references.", 0,laui_ResourceFolderItem, sizeof(laResourceFolder), 0,0,1);{
  1006. laAddStringProperty(p, "path", "Path", "Path", 0,0,0,0,1, offsetof(laResourceFolder, Path), 0,0,laset_ResourcePath, 0,0);
  1007. laAddOperatorProperty(p, "remove", "Remove", "Remove this resource folder entry", "LA_remove_resource_folder", U'❌', 0);
  1008. }
  1009. p = laAddPropertyContainer("managed_udf", "Managed UDF", "Managed UDF files", U'🖹', laui_ManagedUDFItem, sizeof(laManagedUDF), 0,0,0);{
  1010. 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);
  1011. 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);
  1012. }
  1013. p = laAddPropertyContainer("udf", "UDF File", "UDF file block", U'🖹', 0,sizeof(laUDF), 0,0,0);{
  1014. laAddStringProperty(p, "path", "Path", "File Path", 0,0,0,0,1, offsetof(laUDF, FileName), 0,0,0,0,LA_READ_ONLY);
  1015. 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);
  1016. laAddEnumItemAs(ep, "MODIFIED", "Modified", "There are unsaved changes bound to this file", 1, U'🌑');
  1017. laAddEnumItemAs(ep, "CLEAN", "Clean", "File data is untouched", 0,0);
  1018. ep->ElementBytes=2;
  1019. }
  1020. p = laAddPropertyContainer("udf_content_node", "UDF Content Node", "Type Structure For Previewing,Selecting,Linking UDF Contnet", U'🖹', 0,0,0,0,0);{
  1021. laAddStringProperty(p, "full_path", "Full Path", "Full Path", 0,0,0,0,0,0,0,laget_UDFContentNodeFullPath, 0,0,LA_READ_ONLY);
  1022. laAddStringProperty(p, "identifier", "Identifier", "Self Identifier", 0,0,0,0,0,0,0,laget_UDFContentNodeIdentifier, 0,0,LA_AS_IDENTIFIER|LA_READ_ONLY);
  1023. 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);
  1024. 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);
  1025. 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);
  1026. 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);
  1027. }
  1028. p = laAddPropertyContainer("udf_content_instance", "UDF Content Instance", "Instance/FileSeek Storage For Previewing,Selecting,Linking UDF Contnet", U'🖹', 0,0,0,0,0);{
  1029. laAddStringProperty(p, "identifier", "Identifier", "Self Identifier", 0,0,0,0,0,0,0,laget_UDFContentInstanceIdentifier, 0,0,LA_READ_ONLY);
  1030. 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);
  1031. 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);
  1032. 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);
  1033. }
  1034. p = laAddPropertyContainer("managed_prop", "Managed Property", "Managed property for detecting changes for saving files", 0,0,sizeof(laManagedSaveProp), 0,0,0);{
  1035. laAddStringProperty(p, "path", "Path", "Property path", 0,0,0,0,1, offsetof(laManagedSaveProp, Path), 0,0,0,0,LA_READ_ONLY);
  1036. }
  1037. p = laAddPropertyContainer("int_property", "Int Property", "Int property specific info", U'i', laui_IntPropInfo, sizeof(laIntProp), 0,0,1);{
  1038. 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);
  1039. 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);
  1040. 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);
  1041. 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);
  1042. } MAIN.ContainerInt = p;
  1043. p = laAddPropertyContainer("float_property", "Float Property", "Float property specific info", U'i', laui_FloatPropInfo, sizeof(laFloatProp), 0,0,1);{
  1044. 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);
  1045. 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);
  1046. 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);
  1047. 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);
  1048. } MAIN.ContainerFloat = p;
  1049. // USER PREF ========================================================
  1050. p = laAddPropertyContainer("la_user_preference", "User Preference", "Kernel settings for LA main structure", U'⚙', 0,sizeof(LA), lapost_UserPreferences, 0,2|LA_PROP_OTHER_ALLOC);{
  1051. laPropContainerExtraFunctions(p,0,lareset_Main,0,0,0);
  1052. 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);
  1053. 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);
  1054. 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);
  1055. 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);
  1056. 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);
  1057. 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);
  1058. 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);
  1059. 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);
  1060. 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);{
  1061. laAddEnumItemAs(ep, "none", "None", "Don't use multisample", 0,0);
  1062. laAddEnumItemAs(ep, "2", "2X", "2X multisample", 2, 0);
  1063. laAddEnumItemAs(ep, "4", "4X", "4X multisample", 4, 0);
  1064. laAddEnumItemAs(ep, "8", "8X", "8X multisample", 8, 0);
  1065. laAddEnumItemAs(ep, "16", "16X", "16X multisample", 16, 0);
  1066. }
  1067. 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);
  1068. 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);
  1069. 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);
  1070. 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);
  1071. 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);
  1072. 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);
  1073. 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);
  1074. 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);
  1075. 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);{
  1076. laAddEnumItem(ep, "no", "No", "Use original english string", 0);
  1077. laAddEnumItem(ep, "yes", "Yes", "Use translated string", 0);
  1078. }
  1079. 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);
  1080. 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);
  1081. 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);{
  1082. laAddEnumItemAs(ep, "DATA_BLOCKS", "Data Blocks", "All data blocks", 0,0);
  1083. laAddEnumItemAs(ep, "FILES", "Files", "All Files", 1, 0);
  1084. }
  1085. ep = laAddEnumProperty(p, "save_preferences_on_exit", "Save On Exit", "Save user preferences before exiting the program", 0,0,0,0,0,offsetof(LA, SavePreferenceOnExit), 0,0,0,0,0,0,0,0,0,0);{
  1086. laAddEnumItemAs(ep, "NONE", "Don't save", "Not saving user preferences on exit", 0,0);
  1087. laAddEnumItemAs(ep, "SAVE", "Save", "Saving user preferences on exit", 1, 0);
  1088. }
  1089. 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);
  1090. 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);
  1091. ep = laAddEnumProperty(p, "wacom_driver", "Wacom driver", "Wacom driver to read pressure info from on windows", 0, 0, 0, 0, 0, offsetof(LA, InkOrWinTab), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); {
  1092. laAddEnumItemAs(ep, "WINDOWS_INK", "Windows Ink", "Use Windows Ink pressure events (WM_POINTERUPDATE).", 0, 0);
  1093. laAddEnumItemAs(ep, "WINTAB", "WinTab", "Use wacom WinTab driver to read pressure events (WT_PACKET).", 1, 0);
  1094. }
  1095. laAddFloatProperty(p, "color_picker_gamma", "Color Picker Gamma", "Allows less saturated colors to have more areas", 0,0,0,3.0,1.0, 0.05,1.5, 0,offsetof(LA, ColorPickerGamma), 0,laset_ColorPickerGamma,0,0,0,0,0,0,0,0,0);
  1096. }
  1097. p = laAddPropertyContainer("la_translation_language", "Language", "Translation language pack", 0,0,sizeof(laTranslationNode), 0,0,1);{
  1098. laAddStringProperty(p, "name", "Name", "The name of this language", 0,0,0,"Unknown", 1, offsetof(laTranslationNode, LanguageName), 0,0,0,0,LA_AS_IDENTIFIER);
  1099. }
  1100. p = laAddPropertyContainer("la_extension_type", "Extension Type", "File extension and its matching type for file filtering", 0,0,sizeof(laExtensionType), 0,0,0);{
  1101. 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);
  1102. }
  1103. // UI WINDOW ========================================================================================
  1104. p = laAddPropertyContainer("ui_window", "SYSWINDOW Node", "Property Container For A System SYSWINDOW", 0,0, sizeof(laWindow), lapost_Window, lapostim_Window,1);{
  1105. 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);
  1106. laAddSubGroup(p, "layouts", "Layouts", "Layout List Of The Whole SYSWINDOW", "ui_layout",0,0,0,offsetof(laWindow, CurrentLayout), laget_WindowFirstLayout, laget_WindowActiveLayout,laget_ListNext, 0,0,laset_WindowActiveLayout, offsetof(laWindow, Layouts), 0);
  1107. _LA_PROP_PANEL = laAddSubGroup(p, "panels", "Panels", "Panel list of this window", "ui_panel",0,0,0,-1,laget_SavePanel,0,lagetnext_SavePanel,0,0,0,offsetof(laWindow, Panels), 0);
  1108. la_UDFAppendSharedTypePointer("_LA_PROP_PANEL", _LA_PROP_PANEL);
  1109. laAddSubGroup(p, "maximized_block", "Maximized Block", "Maximized block in this window", "ui_block",0,0,0,offsetof(laWindow, MaximizedBlock), 0,0,0,0,0,0,0,LA_UDF_REFER|LA_UDF_IGNORE);
  1110. laAddSubGroup(p, "maximized_ui", "Maximized Ui", "Maximized ui in this window", "ui_item",0,0,0,offsetof(laWindow, MaximizedUi), 0,0,0,0,0,0,0,LA_UDF_REFER|LA_UDF_IGNORE);
  1111. 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);
  1112. laAddIntProperty(p, "position", "Position", "The Position Of A SYSWINDOW", 0,"X,Y", "px", 0,0,1, 0,0,offsetof(laWindow, X), 0,0,2, 0,0,0,0,0,0,0,0);
  1113. laAddIntProperty(p, "size", "Size", "The Size Of A SYSWINDOW", 0,"W,H", "px", 0,0,0,0,0,offsetof(laWindow, W), 0,0,2, 0,0,0,0,0,0,0,LA_READ_ONLY);
  1114. laAddIntProperty(p, "client_size", "Client Area Size", "Display Canvans Size Of A SYSWINDOW", 0,"W,H", "px", 0,0,1, 0,0,offsetof(laWindow, CW), 0,0,2, 0,0,0,0,0,0,0,LA_READ_ONLY);
  1115. laAddStringProperty(p, "operator_hints", "Operator Hints", "Operator hints if there's any", LA_WIDGET_STRING_PLAIN, 0,0,0,1, offsetof(laWindow, OperatorHints), 0,0,0,0,LA_READ_ONLY|LA_UDF_IGNORE);
  1116. 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);{
  1117. laAddEnumItemAs(ep, "SRGB", "sRGB", "Standard sRGB diplay", TNS_COLOR_SPACE_SRGB, 0);
  1118. laAddEnumItemAs(ep, "CLAY", "Clay", "Clay color space (AdobeRGB 1998 compatible)", TNS_COLOR_SPACE_CLAY, 0);
  1119. }
  1120. 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);{
  1121. laAddEnumItemAs(ep, "NONE", "None", "Don't show overflow", 0,0);
  1122. laAddEnumItemAs(ep, "STRIPES", "Stripes", "Show overflowing colors as stripes", 1, 0);
  1123. }
  1124. laAddIntProperty(p, "is_fullscreen", "Is Fullscreen", "Is the window fullscreen", 0,0,0,0,0,0,0,0,offsetof(laWindow, IsFullScreen),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1125. }
  1126. // UI LAYOUT ========================================================================================
  1127. p = laAddPropertyContainer("ui_block", "Ui Block", "Property container for single ui block", 0,0, sizeof(laBlock), lapost_Block,0,1);{
  1128. 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);
  1129. 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);
  1130. 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);
  1131. 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);
  1132. 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);
  1133. 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);
  1134. 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);
  1135. 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);
  1136. laAddSubGroup(p, "parent", "Parent", "Parent block reference", "ui_block",0,0,0,offsetof(laBlock, parent), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1137. laAddOperatorProperty(p, "fold", "Fold", "Fold the title bar", "LA_block_fold_title", 0,0);
  1138. laAddOperatorProperty(p, "maximize", "Maximize", "Maximize the block", "LA_block_maximize", 0,0);
  1139. }
  1140. p = laAddPropertyContainer("ui_layout", "Layout Node", "Property Container For Single Layout", 0,laui_LayoutListItem, sizeof(laLayout), 0,0,2);{
  1141. laAddStringProperty(p, "title", "Title", "The Title/Name Of A Panel", 0,0,0,0,1, offsetof(laLayout, ID), 0,0,laset_LayoutTitle,0,LA_AS_IDENTIFIER);
  1142. _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);
  1143. la_UDFAppendSharedTypePointer("_LA_PROP_BLOCK", _LA_PROP_BLOCK);
  1144. }
  1145. // UI PANEL =========================================================================================
  1146. p = laAddPropertyContainer("ui_panel", "Panel Node", "Property Container For General Panels", 0,laui_PanelListItem, sizeof(laPanel), lapost_Panel, 0,1);{
  1147. laAddStringProperty(p, "title", "Title", "The Title/Name Of A Panel", 0,0,0,0,1, offsetof(laPanel, Title), 0,0,laset_PanelTitle, laread_PanelTitle,LA_AS_IDENTIFIER|LA_TRANSLATE);
  1148. 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);
  1149. 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);
  1150. 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);
  1151. 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);{
  1152. laAddEnumItem(ep, "no", "No Snap", "Not Snapped to edge", 0);
  1153. laAddEnumItem(ep, "yes", "Snap", "Snapped to edge", U'🞉');
  1154. } //don't swap order with the one below
  1155. laAddIntProperty(p, "snap", "Snap Distance", "Snapping Distance To Edges", 0,"Left,Right,Top,Bottom", "px", 0,0,1, 0,0,offsetof(laPanel, SL), 0,0,4, 0,laset_PanelSnapDistance, 0,0,0, laread_PanelSnapDistance,0,0);
  1156. 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);
  1157. 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);
  1158. 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);{
  1159. ep->ElementBytes = 1;
  1160. laAddEnumItem(ep, "false", "False", "Not A Menu Panel", U'❌');
  1161. laAddEnumItem(ep, "true", "IsTrue", "Is A Menu Panel", U'🗩');
  1162. }
  1163. laAddOperatorProperty(p, "hide", "Hide", "Hide this panel", "LA_hide_panel", U'🗕', 0);
  1164. laAddOperatorProperty(p, "dock", "Dock", "Dock this panel", "LA_dock_panel", U'🗖', 0);
  1165. laAddOperatorProperty(p, "close", "Close", "Close this panel", "LA_block_close_panel", U'❌', 0);
  1166. //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);
  1167. laAddSubGroup(p, "uil","Ui List", "Panel Main Ui List", "ui_list",0,0,0,offsetof(laPanel, UI), 0,0,0,0,0,0,0,LA_UDF_IGNORE);
  1168. laAddSubGroup(p, "title_uil","Title Ui List", "Panel Title Ui List", "ui_list",0,0,0, offsetof(laPanel, TitleBar), 0,0,0,0,0,0,0,LA_UDF_IGNORE);
  1169. laAddSubGroup(p, "pp","Prop Pack", "Panel Base With Own Instance", "property_package",0,0,0,offsetof(laPanel, PP), 0,0,0,0,0,0,0,LA_UDF_REFER|LA_UDF_IGNORE);
  1170. laAddSubGroup(p, "fake_pp","Fake Prop Pack", "Fake Prop Pack", "property_package",0,0,0,offsetof(laPanel, PropLinkPP), 0,0,0,0,0,0,0,LA_UDF_REFER|LA_UDF_IGNORE);
  1171. laAddSubGroup(p, "parent_block","Parent Block", "The Block That Directly Links This Panel In", "ui_block",0,0,0,offsetof(laPanel, Block), 0,0,0,0,0,0,0,LA_UDF_REFER|LA_UDF_IGNORE);
  1172. laAddSubGroup(p, "template","Template", "Panel template", "panel_template",0,0,0,offsetof(laPanel, PanelTemplate), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1173. laAddSubGroup(p, "block", "Block", "Block reference of this panel", "ui_block",0,0,0,offsetof(laPanel, Block), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1174. }
  1175. // UI ITEM ==========================================================================================
  1176. p = laAddPropertyContainer("ui_list", "Ui List", "Property Container For Ui List Sub Type", U'⮑', 0,sizeof(laUiList), 0,0,0);{
  1177. laAddStringProperty(p, "tab_name", "Tab Name", "The Name Of A Tab", 0,0,0,0,0,0,0,0,0,0,LA_AS_IDENTIFIER);
  1178. _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);
  1179. la_UDFAppendSharedTypePointer("_LA_PROP_UI_ITEM", _LA_PROP_UI_ITEM);
  1180. 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);
  1181. 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);
  1182. 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);
  1183. 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)
  1184. ->ElementBytes = 2;
  1185. 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)
  1186. ->ElementBytes = 2;
  1187. }
  1188. p = laAddPropertyContainer("ui_instance", "Instance", "UiList Instance Entry", U'🗇', 0,sizeof(laColumn), 0,0,0);{
  1189. //nothing needed
  1190. }
  1191. p = laAddPropertyContainer("ui_column", "Ui Column", "A Column Handles The Aligning Of Ui Items", U'◫', laui_IdentifierOnly, sizeof(laColumn), 0,0,0);{
  1192. 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);
  1193. 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);
  1194. 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);
  1195. 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);
  1196. 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);{
  1197. laAddEnumItem(ep, "none", "None", "No Snapping", 0);
  1198. laAddEnumItem(ep, "left", "Left", "Snap At Left", U'⮄');
  1199. laAddEnumItem(ep, "right", "Right", "Snap At Right", U'⮆');
  1200. }
  1201. 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);
  1202. 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);
  1203. 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);
  1204. }
  1205. p = laAddPropertyContainer("panel_template", "Panel Template", "Panel template for creating new panels", 0,0,sizeof(laUiTemplate), 0,0,0);{
  1206. laAddStringProperty(p, "identifier", "Identifier", "Identifier Of This Template", 0,0,0,0,1, offsetof(laUiTemplate, Identifier), 0,0,0,0,LA_AS_IDENTIFIER);
  1207. laAddStringProperty(p, "title", "Title", "Panel title", 0,0,0,0,1, offsetof(laUiTemplate, Title), 0,0,0,0,LA_TRANSLATE);
  1208. 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);
  1209. }
  1210. p = laAddPropertyContainer("ui_item", "Ui Item", "Property Container For Ui Items", 0,0,sizeof(laUiItem), lapost_UiItem, lapostim_UiItem, 0);{
  1211. 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);
  1212. 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);
  1213. 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)
  1214. ->ElementBytes = sizeof(short);
  1215. //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);{
  1216. // laAddEnumItemAs(ep, "button", "Button", "Button (Pure Operator)", LA_UI_INTERNAL_BUTTON, U'🔨');
  1217. // laAddEnumItemAs(ep, "property_watcher", "Property Watcher", "Property Watcher For Int/Float/Enum", LA_UI_INTERNAL_WATCHER, U'🔑');
  1218. // laAddEnumItemAs(ep, "group", "Group", "A Group That Holds A Sub-UiList", LA_UI_INTERNAL_GROUP, U'📁');
  1219. // laAddEnumItemAs(ep, "tab", "Tab", "A Tab Root That Holds Multiple Sub-UiList", LA_UI_INTERNAL_TAB, U'📑');
  1220. // laAddEnumItemAs(ep, "label", "Label", "A Static Label", LA_UI_INTERNAL_LABEL, 0);
  1221. // laAddEnumItemAs(ep, "3d_view", "3D View", "Integrated 3D View UI Item", LA_UI_INTERNAL_3D_VIEW, 0);
  1222. // laAddEnumItemAs(ep, "2d_view", "2D View", "Integrated 2D View UI Item", LA_UI_INTERNAL_2D_VIEW, U'🖻');
  1223. // laAddEnumItemAs(ep, "column_adjuster", "Column Adjuster", "To Adjust Column Width", LA_UI_INTERNAL_ADJUSTER, U'↔');
  1224. // laAddEnumItemAs(ep, "bracket_begin", "Bracket Begin", "Bracket Beginner Used To Set Ui Conditions", LA_UI_INTERNAL_BRACKET_BEGIN, '{');
  1225. // laAddEnumItemAs(ep, "bracket_else", "Bracket Else", "Bracket Else Block Beginner", LA_UI_INTERNAL_BRACKET_ELSE, 0);
  1226. // laAddEnumItemAs(ep, "folder_begin", "Folder Begin", "Folder Beginner Used To Toggle Some Display", LA_UI_INTERNAL_FOLDER_BEGIN, '{');
  1227. // laAddEnumItemAs(ep, "bracket_end", "Bracket End", "Bracket Closer", LA_UI_INTERNAL_BRACKET_END, '}');
  1228. // laAddEnumItemAs(ep, "aligner", "Aligner", "Align Column Heights", LA_UI_INTERNAL_ALIGNER, 0);
  1229. // laAddEnumItemAs(ep, "menu", "Menu", "Menu Activiator", LA_UI_INTERNAL_MENU, U'🗩');
  1230. //}
  1231. laAddStringProperty(p, "path", "Path", "Data Path", 0,0,0,0,0,0,0,laget_UiDataPath, 0,laread_UiDataPath,LA_READ_ONLY);
  1232. 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);
  1233. 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);
  1234. 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);
  1235. 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);
  1236. 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);
  1237. //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);
  1238. //laSubGroupDetachable(ep, laget_UiTemplate, laget_ListNext);
  1239. 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);
  1240. 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);
  1241. 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);
  1242. 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);
  1243. laAddStringProperty(p, "extra_args", "Extra Arguments", "Extra Arguments For This Ui Item", 0,0,0,0,0,0,0,0,0,0,0);
  1244. laAddStringProperty(p, "display", "Display", "Display String For Label", 0,0,0,0,0,0,0,0,0,0,0);
  1245. //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);
  1246. //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);
  1247. laAddOperatorProperty(p, "maximize", "Maximize", "Maximize this UI item", "LA_canvas_ui_maximize", 0,0);
  1248. }
  1249. p = laAddPropertyContainer("ui_type", "Ui Type", "Ui Type Descriptor", 0,laui_IdentifierOnly, sizeof(laUiType), 0,0,0);{
  1250. 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);
  1251. }
  1252. // NODE ================================================================================================
  1253. p = laAddPropertyContainer("la_out_socket", "Output Socket", "Output socket for nodes", 0,0,sizeof(laNodeOutSocket), 0,0,1);{
  1254. laAddStringProperty(p, "label", "Label", "Socket's label", 0,0,0,0,1, offsetof(laNodeOutSocket, Label), 0,0,0,0,LA_AS_IDENTIFIER);
  1255. 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);
  1256. 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);
  1257. 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);
  1258. } LA_PC_SOCKET_OUT = p;
  1259. p = laAddPropertyContainer("la_in_socket", "Input Socket", "Input socket for nodest", 0,0,sizeof(laNodeInSocket), 0,0,1);{
  1260. laAddStringProperty(p, "label", "Label", "Socket's label", 0,0,0,0,1, offsetof(laNodeInSocket, Label), 0,0,0,0,LA_AS_IDENTIFIER);
  1261. 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);
  1262. LA_PROP_SOCKET_SOURCE=sp;
  1263. 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);
  1264. 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);
  1265. 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);
  1266. } LA_PC_SOCKET_IN = p;
  1267. laPropContainerExtraFunctions(p,0,0,latouched_NodeInSocket,0,0);
  1268. p = laAddPropertyContainer("la_value_mapper", "Value Mapper", "Value mapper", 0,0,sizeof(laValueMapper), 0,0,1);{
  1269. 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);
  1270. 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);
  1271. 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);
  1272. } LA_PC_MAPPER=p;
  1273. p = laAddPropertyContainer("la_value_mapper_point", "Value Mapper", "Value mapper", 0,0,sizeof(laValueMapperPoint), 0,0,1);{
  1274. 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);
  1275. }
  1276. // PROPERTIES ==========================================================================================
  1277. p = laAddPropertyContainer("property_item", "Property Item", "Property Item For Data Types Like Int/Float/Enum/String/SubType", U'🔌', 0,sizeof(laProp), 0,0,1);{
  1278. 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);
  1279. laAddStringProperty(p, "name", "Name", "Property Display Name", 0,0,0,0,0,offsetof(laProp, Name), 0,0,0,0,LA_READ_ONLY);
  1280. laAddStringProperty(p, "description", "Description", "Property Description", 0,0,0,0,0,offsetof(laProp, Description), 0,0,0,0,LA_READ_ONLY);
  1281. 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);
  1282. 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);
  1283. 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);
  1284. 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);
  1285. }
  1286. p = laAddPropertyContainer("property_container", "Property Container", "Property Container For Some Property Items", U'🔌', 0,sizeof(laPropContainer), 0,0,1);{
  1287. 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);
  1288. 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);
  1289. laAddStringProperty(p, "description", "Description", "Property Description", 0,0,0,0,0,offsetof(laPropContainer, Name), 0,0,0,0,LA_UDF_IGNORE|LA_READ_ONLY);
  1290. 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);
  1291. 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);
  1292. _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);
  1293. _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);
  1294. laAddOperatorProperty(p, "restore_all", "Restore All", "Restore All Trash Items Or Failed Nodes To A User Selected Linkage", "LA_sub_restore_data_block", U'⭯', 0);
  1295. }
  1296. p = laAddPropertyContainer("property_trash_item", "Trash Item", "Single Trash Item", 0,0,0,0,0,0);{
  1297. 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);
  1298. 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);
  1299. laAddOperatorProperty(p, "restore", "Restore", "Restore Data Block To A User Selected Linkage", "LA_sub_restore_data_block", U'⭯', 0);
  1300. }
  1301. p = laAddPropertyContainer("property_package", "Property Package", "Property Package For Data Access (Mainly UI)", U'🔌', 0,sizeof(laPropPack), 0,0,0);{
  1302. 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);
  1303. }
  1304. p = laAddPropertyContainer("property_step", "Property Step", "Property Segment Item", 0,0,sizeof(laPropStep), 0,0,0);{
  1305. laAddSubGroup(p, "property", "Property", "Property Reference", "property_item",0,0,0,offsetof(laPropStep, p), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1306. }
  1307. p = laAddPropertyContainer("detached_prop", "Detached Prop", "Detached Prop", U'🔌', 0,sizeof(laSubProp) + 48, lapost_DetachedProp, 0,0);{
  1308. 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);
  1309. laAddStringProperty(p, "path", "Path", "Data Path", 0,0,0,0,0,0,0,laget_DetachedPropPath, 0,laread_DetachedPropPath, 0);
  1310. laAddStringProperty(p, "rename", "Rename", "Rename", 0,0,0,0,0,offsetof(laProp, Identifier), 0,0,0,laread_DetachedPropRename, 0);
  1311. }
  1312. p = laAddPropertyContainer("la_animation", "Animation", "Animation data",0,0,sizeof(laAnimation),0,0,1);{
  1313. sp = laAddSubGroup(p, "action_holders", "Action Holders", "All action holders","la_animation_action_holder",0,0,0,-1,0,0,0,0,0,0,offsetof(laAnimation,ActionHolders),0);
  1314. laSubGroupExtraFunctions(sp,0,0,0,laget_AnimationActionHolderCategory);
  1315. laAddSubGroup(p, "current_action", "Current Action", "Current action","la_animation_action",0,0,0,offsetof(laAnimation,CurrentAction),0,0,0,0,0,0,0,LA_UDF_REFER|LA_READ_ONLY);
  1316. laAddFloatProperty(p, "play_head","Play Head","Animation viewer global playhead",0,0,"s",0,0,0.1,0,0,offsetof(laAnimation,PlayHead),0,0,0,0,0,0,0,0,0,0,0);
  1317. ep=laAddEnumProperty(p, "play_status", "Play Status", "Animation viewer global play status", 0,0,0,0,0,offsetof(laAnimation, PlayStatus),0,0,0,0,0,0,0,0,0,0);
  1318. laAddEnumItemAs(ep, "PAUSED", "Paused", "Animation is playing", LA_ANIMATION_STATUS_PAUSED, U'⏸');
  1319. laAddEnumItemAs(ep, "PLAY_FWD", "Playing", "File data is untouched", LA_ANIMATION_STATUS_PLAY_FWD,U'▶');
  1320. laAddEnumItemAs(ep, "PLAY_REV", "Reversing", "File data is untouched", LA_ANIMATION_STATUS_PLAY_REV,U'◀');
  1321. }
  1322. p = laAddPropertyContainer("la_animation_action", "Action", "Animation action",0,0,sizeof(laAction),0,0,1);{
  1323. laAddStringProperty(p,"name","Name","Name of the action",0,0,0,0,1,offsetof(laAction,Name),0,0,0,0,LA_AS_IDENTIFIER);
  1324. laAddSubGroup(p, "channels", "Channels", "Action channels", "la_animation_channel",0,0,0,-1,0,0,0,0,0,0,offsetof(laAction, Channels),0);
  1325. laAddFloatProperty(p, "length","Length","Length of the action in seconds",0,0,"s",30,0,0.1,2,0,offsetof(laAction,Length),0,0,0,0,0,0,0,0,0,0,0);
  1326. laAddFloatProperty(p, "play_head","Play Head","Play Head position",0,0,0,1.0,0,0.01,0,0,offsetof(laAction,PlayHead),0,0,0,0,0,0,0,0,0,0,0);
  1327. laAddFloatProperty(p, "offset","Offset","Play head offset from global timing",0,0,0,1.0,0,0.01,0,0,offsetof(laAction,Offset),0,0,0,0,0,0,0,0,0,0,0);
  1328. laAddIntProperty(p, "frame_count","Frame Count","Total frame count in the whole length of the action",0,0,0,960,1,0,24,0,offsetof(laAction,FrameCount),0,0,0,0,0,0,0,0,0,0,0);
  1329. laAddIntProperty(p, "current_frame","Current Frame","Current frame in this action",0,0,0,0,0,0,0,0,0,laget_AnimationActionCurrentFrame,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1330. ep = laAddEnumProperty(p, "mute", "Mute", "Mute this action", 0,0,0,0,0,offsetof(laAction, Mute),0,0,0,0,0,0,0,0,0,0);{
  1331. laAddEnumItemAs(ep, "NONE", "None", "Not muted", 0,0);
  1332. laAddEnumItemAs(ep, "MUTE", "Mute", "Muted", 1,0);
  1333. }
  1334. ep = laAddEnumProperty(p, "solo", "Solo", "Solo play this action", 0,0,0,0,0,offsetof(laAction, Solo),0,0,0,0,0,0,0,0,0,0);{
  1335. laAddEnumItemAs(ep, "NONE", "None", "Play this action with", 0,0);
  1336. laAddEnumItemAs(ep, "SOLO", "Solo", "Solo play", 1,0);
  1337. }
  1338. ep = laAddEnumProperty(p, "play_mode", "Play Mode", "How to play this action", 0,0,0,0,0,offsetof(laAction, PlayMode),0,0,0,0,0,0,0,0,0,0);{
  1339. laAddEnumItemAs(ep, "REPEAT", "Repeat", "Play action in repeat", LA_ANIMATION_PLAY_MODE_REPEAT, U'⮆');
  1340. laAddEnumItemAs(ep, "HOLD", "Hold", "Hold end values when time is outside time range", LA_ANIMATION_PLAY_MODE_HOLD,U'⭲');
  1341. laAddEnumItemAs(ep, "BOUNCE", "Bounce", "Play action back and forth", LA_ANIMATION_PLAY_MODE_BOUNCE,U'⮀');
  1342. }
  1343. ep = laAddEnumProperty(p, "mix_mode", "Mix", "How this action is mixed with existing ones", 0,0,0,0,0,offsetof(laAction, MixMode),0,0,0,0,0,0,0,0,0,0);{
  1344. laAddEnumItemAs(ep, "REPLACE", "Replace", "Replace previously set values", LA_ANIMATION_MIX_REPLACE,0);
  1345. laAddEnumItemAs(ep, "ADD", "Add", "Add on top of previously set values", LA_ANIMATION_MIX_ADD,0);
  1346. }
  1347. }
  1348. p = laAddPropertyContainer("la_animation_channel", "Channel", "Action channel",0,0,sizeof(laActionChannel),0,0,1);{
  1349. laAddSubGroup(p, "keys", "Keys", "Key Frames", "la_animation_key",0,0,0,-1,0,0,0,0,0,0,offsetof(laActionChannel, Keys),0);
  1350. laAddSubGroup(p, "ap", "Animation Property", "Animation property reference", "la_animation_prop",0,0,0,offsetof(laActionChannel, AP), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1351. }
  1352. p = laAddPropertyContainer("la_animation_prop", "Property", "Animation property",0,0,sizeof(laActionProp),0,0,1);{
  1353. laAddIntProperty(p, "data_size","Data Size","Data size of the channel",0,0,0,0,0,0,0,0,offsetof(laActionProp,DataSize),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
  1354. laAddSubGroup(p, "prop", "Property", "Property of this channel", "property_item",0,0,0,offsetof(laActionProp, Prop), 0,0,0,0,0,0,0,LA_UDF_REFER | LA_UDF_IGNORE);
  1355. // XXX: Prop needs a string "container.prop" to be able to be able to r/w.
  1356. laAddSubGroup(p, "for", "For", "Target data block", "any_pointer",0,0,0,offsetof(laActionProp, For), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1357. }
  1358. p = laAddPropertyContainer("la_animation_key", "key", "Action channel",0,0,sizeof(laActionKey),0,0,1);{
  1359. laAddIntProperty(p, "at","At","Frame number of this key frame",0,0,0,0,0,0,0,0,offsetof(laActionKey,At),0,0,0,0,0,0,0,0,0,0,0);
  1360. // XXX: RAW for r/w.
  1361. }
  1362. p = laAddPropertyContainer("la_animation_action_holder", "Action Holder", "Action holder",0,0,sizeof(laActionHolder),0,0,1);{
  1363. laAddStringProperty(p,"name","Name","Name of the action",0,0,0,0,1,offsetof(laActionHolder,Name),0,0,0,0,LA_AS_IDENTIFIER);
  1364. }
  1365. }
  1366. // TNS WORLD ============================================================================================
  1367. p = laAddPropertyContainer("tns_main", "TNS Main", "Render Kernel Root Structure", 0,0,sizeof(tnsMain), 0,0,2);{
  1368. 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);
  1369. 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);
  1370. laSubGroupDetachable(sp, tnsget_detached_FirstTexture, laget_ListNext);
  1371. //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);
  1372. }
  1373. p = laAddPropertyContainer("tns_texture", "TNS Texture Item", "A Texture Descriptor With GL Handle", 0,0,sizeof(tnsTexture), 0,0,0);{
  1374. 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);
  1375. 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);
  1376. 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);{
  1377. laAddEnumItemAs(ep, "rgba", "GL_RGBA", "GL_RGBA", GL_RGBA8,0);
  1378. laAddEnumItemAs(ep, "rgb", "GL_RGB", "GL_RGB", GL_RGB8,0);
  1379. laAddEnumItemAs(ep, "rg", "GL_RG", "GL_RG", GL_RG8,0);
  1380. laAddEnumItemAs(ep, "r", "GL_RED", "GL_RED", GL_R8,0);
  1381. laAddEnumItemAs(ep, "rgba32f", "GL_RGBA32F", "GL_RGBA32F", GL_RGBA32F,0);
  1382. laAddEnumItemAs(ep, "rgb32f", "GL_RGB32F", "GL_RGB32F", GL_RGB32F,0);
  1383. laAddEnumItemAs(ep, "rg32f", "GL_RG32F", "GL_RG32F", GL_RG32F,0);
  1384. laAddEnumItemAs(ep, "r32f", "GL_R32F", "GL_R32F", GL_R32F,0);
  1385. laAddEnumItemAs(ep, "rgba32i", "GL_RGBA32I", "GL_R32I", GL_RGBA32I,0);
  1386. laAddEnumItemAs(ep, "rgb32i", "GL_RGB32I", "GL_R32I", GL_RGB32I,0);
  1387. laAddEnumItemAs(ep, "rg32i", "GL_RG32I", "GL_R32I", GL_RG32I,0);
  1388. laAddEnumItemAs(ep, "r32i", "GL_R32I", "GL_R32I", GL_R32I,0);
  1389. laAddEnumItemAs(ep, "depth", "GL_DEPTH_COMPONENT32F", "GL_DEPTH_COMPONENT32F", GL_DEPTH_COMPONENT32F,0);
  1390. }
  1391. p->Template2D = la_GetCanvasTemplate(0,"la_CanvasDrawTexture");
  1392. }
  1393. p = laAddPropertyContainer("tns_world", "World", "3D World Structure", 0,0,sizeof(tnsWorld), 0,0,2|LA_PROP_OTHER_ALLOC);{
  1394. sp = laAddSubGroup(p, "root_objects", "Root Objects", "List of all root objects", "tns_object",0,0,0,-1,0,0,0,0,0,0,offsetof(tnsWorld, RootObjects), 0);
  1395. laSubGroupDetachable(sp, tnsget_detached_FirstRootObject, laget_ListNext);
  1396. 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);
  1397. }
  1398. p = laAddPropertyContainer("tns_child_object", "Child Object", "Child object linker", 0,0,sizeof(laListItemPointer), 0,0,0);{
  1399. 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);
  1400. }
  1401. p = laAddPropertyContainer("tns_object", "Object", "3D Object Item", 0,tnsui_BaseObjectProperties,sizeof(tnsObject), tnspost_Object, 0,2);{
  1402. laPropContainerExtraFunctions(p,0,0,0,tnspropagate_Object,0);
  1403. laContainerAnimationFunctions(p,laaction_VerifyRootObject);
  1404. TNS_PC_OBJECT_GENERIC=p;
  1405. 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);
  1406. 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);
  1407. 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);{
  1408. laAddEnumItem(ep, "false", "False", "False", U'🌔');
  1409. laAddEnumItem(ep, "true", "IsTrue", "IsTrue", U'🌑');
  1410. }
  1411. 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);{
  1412. laAddEnumItem(ep, "false", "False", "False", U'🚫');
  1413. laAddEnumItem(ep, "true", "IsTrue", "IsTrue", U'📷');
  1414. }
  1415. 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);{
  1416. laAddEnumItemAs(ep, "INSTANCER", "Instancer", "Instancer object", TNS_OBJECT_INSTANCER, 0);
  1417. laAddEnumItemAs(ep, "CAMERA", "Camera", "Camera object, to render a scene", TNS_OBJECT_CAMERA, U'📷');
  1418. laAddEnumItemAs(ep, "LIGHT", "Lamp", "Lamp object, to illuminate the scene", TNS_OBJECT_LIGHT, 0);
  1419. laAddEnumItemAs(ep, "MESH", "Mesh", "Mesh object, made of verts/edges/faces", TNS_OBJECT_MESH, 0);
  1420. }
  1421. 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);
  1422. 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);
  1423. 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);
  1424. laAddFloatProperty(p, "glocation", "Global Location", "Location in global coordinates", 0,"X,Y,Z", 0,0,0,0.1, 0,0,offsetof(tnsObject, GLocation), 0,0,3, 0,0,0,0,0,0,0,LA_READ_ONLY);
  1425. laAddFloatProperty(p, "grotation", "Global Rotation", "Rotation in global coordinates", 0,"X,Y,Z", 0,0,0,0,0,0,offsetof(tnsObject, GRotation), 0,0,3, 0,0,0,0,0,0,0,LA_READ_ONLY);
  1426. 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,LA_READ_ONLY);
  1427. laAddFloatProperty(p, "dlocation", "Delta Location", "XYZ delta transforms", 0,"X,Y,Z", 0,0,0,0.1, 0,0,offsetof(tnsObject, DLocation), 0,0,3,0,0,0,0,tnsset_ObjectDLocationARR,0,0,LA_PROP_KEYABLE);
  1428. laAddFloatProperty(p, "drotation", "Delta Rotation", "Delta rotation", 0,"X,Y,Z", 0,0,0,0,0,0,offsetof(tnsObject, DRotation), 0,0,3,0,0,0,0,tnsset_ObjectDRotationARR,0,0,LA_PROP_KEYABLE|LA_PROP_ROTATION);
  1429. laAddFloatProperty(p, "dscale", "Delta Scale", "Delta scale", 0,0,0,0,0,0,0,0,offsetof(tnsObject, DScale), 0,tnsset_ObjectDScale,0,0,0,0,0,0,0,0,LA_PROP_KEYABLE);
  1430. 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);
  1431. 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);
  1432. 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);{
  1433. laAddEnumItem(ep, "xyz", "XYZ", "XYZ Euler Mode", 0); laAddEnumItem(ep, "xzy", "XZY", "XZY Euler Mode", 0);
  1434. laAddEnumItem(ep, "yxz", "YXZ", "YXZ Euler Mode", 0); laAddEnumItem(ep, "yzx", "YZX", "YZX Euler Mode", 0);
  1435. laAddEnumItem(ep, "zxy", "ZXY", "ZXY Euler Mode", 0); laAddEnumItem(ep, "zyx", "ZYX", "ZYX Euler Mode", 0);
  1436. laAddEnumItem(ep, "quaternion", "Quaternion", "Quaternion Mode", 0);
  1437. }
  1438. laAddSubGroup(p, "active", "Active", "Active reference", "tns_object",tnsget_ObjectType,0,0,offsetof(tnsObject, Active), 0,0,0,0,0,0,0,LA_UDF_REFER|LA_READ_ONLY);
  1439. 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);
  1440. laAddSubGroup(p, "parent", "Parent", "Object parent", "tns_object",0,0,0,offsetof(tnsObject, ParentObject), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1441. 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);
  1442. laAddSubGroup(p, "__actions__", "Actions", "Animation actions", "la_animation_action",0,0,0,-1,0,laget_CurrentAnimationAction,0,laset_CurrentAnimationAction,0,0,offsetof(tnsObject, Actions), 0);
  1443. laAddSubGroup(p, "drivers", "Drivers", "Driver page collection","la_driver_collection",0,0,0,offsetof(tnsObject,Drivers),0,0,0,0,0,0,0,LA_UDF_SINGLE);
  1444. laAddOperatorProperty(p, "add_driver_page", "Add Page", "Add a driver page","LA_add_driver_page",'+',0);
  1445. }
  1446. p = laAddPropertyContainer("tns_instancer", "Instancer", "Instance placeholder object", U'📎', tnsui_InstancerObjectProperties,sizeof(tnsInstancer), 0,0,2);{
  1447. laPropContainerExtraFunctions(p,0,0,tnstouched_Object,0/*tnspropagate_Object*/,0);
  1448. TNS_PC_OBJECT_INSTANCER=p;
  1449. 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);
  1450. laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,0,0,0,0,0,0,0,0,LA_UDF_LOCAL);
  1451. laAddSubGroup(p, "default_instance", "Instance", "Default instance to be used during editing", "tns_object",0,0,0,offsetof(tnsInstancer, DefaultInstance), 0,0,0,0,0,0,0,LA_UDF_REFER);
  1452. laAddSubGroup(p, "runtime_instance", "Runtime Instance", "Runtime instance, not saved", "tns_object",0,0,0,offsetof(tnsInstancer, RuntimeInstance), 0,0,0,0,0,0,0,LA_UDF_REFER|LA_UDF_IGNORE);
  1453. }
  1454. p = laAddPropertyContainer("tns_mesh_object", "Mesh Object", "Mesh object", 0,tnsui_MeshObjectProperties,sizeof(tnsMeshObject), tnspost_Object, 0,2);{
  1455. laPropContainerExtraFunctions(p,0,0,tnstouched_Object,0/*tnspropagate_Object*/,0);
  1456. TNS_PC_OBJECT_MESH=p;
  1457. 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);
  1458. laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,0,0,0,0,0,0,0,0,LA_UDF_LOCAL);
  1459. 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);{
  1460. laAddEnumItemAs(ep, "OBJECT", "Object", "Object mode", TNS_MESH_OBJECT_MODE, 0);
  1461. laAddEnumItemAs(ep, "EDIT", "Edit", "Edit mode", TNS_MESH_EDIT_MODE, 0);
  1462. }
  1463. 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);
  1464. 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);
  1465. 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);
  1466. 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);
  1467. 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);
  1468. 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);
  1469. 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);
  1470. 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);
  1471. 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);
  1472. laAddRawProperty(p, "v", "Verts", "Verts", offsetof(tnsMeshObject, v), tnsget_MeshObjectVertSize, 0,0,LA_READ_ONLY);
  1473. laAddRawProperty(p, "e", "Edges", "Edges", offsetof(tnsMeshObject, e), tnsget_MeshObjectEdgeSize, 0,0,LA_READ_ONLY);
  1474. laAddRawProperty(p, "f", "Faces", "Faces", offsetof(tnsMeshObject, f), 0,tnsget_MeshObjectFaceRaw, tnsset_MeshObjectFaceRaw, LA_READ_ONLY);
  1475. //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);
  1476. //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);
  1477. //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);
  1478. }
  1479. p = laAddPropertyContainer("tns_camera", "Camera", "Camera object", U'📷', tnsui_CameraObjectProperties,sizeof(tnsCamera), 0,0,2);{
  1480. //laPropContainerExtraFunctions(p,0,0,0,tnspropagate_Object,0);
  1481. TNS_PC_OBJECT_CAMERA=p;
  1482. 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);
  1483. laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,0,0,0,0,0,0,0,0,LA_UDF_LOCAL);
  1484. 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);{
  1485. laAddEnumItem(ep, "PERSP", "Perspective", "Camera in linear perspective", 0);
  1486. laAddEnumItem(ep, "ORTHO", "Orthographic", "Camera in orthographic view", 0);
  1487. }
  1488. 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);
  1489. 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);
  1490. 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);
  1491. 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);
  1492. //laAddOperatorProperty(p, "set_active", "Set Active", "Set this camera as the active one", "TNS_set_active_camera", 0,0);
  1493. }
  1494. p = laAddPropertyContainer("tns_light", "Light", "Light object", U'🔅', tnsui_LightObjectProperties,sizeof(tnsLight), 0,0,2);{
  1495. //laPropContainerExtraFunctions(p,0,0,0,tnspropagate_Object,0);
  1496. TNS_PC_OBJECT_LIGHT=p;
  1497. 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);
  1498. laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,0,0,0,0,0,0,0,0,LA_UDF_LOCAL);
  1499. 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);{
  1500. laAddEnumItem(ep, "NONE", "Perspective", "Camera in linear perspective", 0);
  1501. laAddEnumItem(ep, "orthographic", "Orthographic", "Camera in orthographic view", 0);
  1502. }
  1503. }
  1504. p = laAddPropertyContainer("tns_mvert", "MVert", "MMesh vert", 0,0,sizeof(tnsMVert), 0,0,0);{
  1505. 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);
  1506. 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);
  1507. 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);
  1508. 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);
  1509. laAddSubGroup(p, "elink", "Edge Link", "Edge link", "tns_medge_link",0,0,0,-1,0,0,0,0,0,0,offsetof(tnsMVert, elink),0);
  1510. }
  1511. p = laAddPropertyContainer("tns_medge", "MEdge", "MMesh edge", 0,0,sizeof(tnsMEdge), 0,0,0);{
  1512. 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);
  1513. 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);
  1514. laAddSubGroup(p, "vl", "vl", "Left vert", "tns_mvert",0,0,0,offsetof(tnsMEdge, vl),0,0,0,0,0,0,0,LA_UDF_REFER);
  1515. laAddSubGroup(p, "vr", "vr", "Right vert", "tns_mvert",0,0,0,offsetof(tnsMEdge, vr),0,0,0,0,0,0,0,LA_UDF_REFER);
  1516. laAddSubGroup(p, "fl", "fl", "Left face", "tns_mface",0,0,0,offsetof(tnsMEdge, fl),0,0,0,0,0,0,0,LA_UDF_REFER);
  1517. laAddSubGroup(p, "fr", "fr", "Right face", "tns_mface",0,0,0,offsetof(tnsMEdge, fr),0,0,0,0,0,0,0,LA_UDF_REFER);
  1518. }
  1519. p = laAddPropertyContainer("tns_mface", "MFace", "MMesh face", 0,0,sizeof(tnsMFace), 0,0,0);{
  1520. 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);
  1521. 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);
  1522. laAddSubGroup(p, "l", "Loop", "Loop", "tns_loop",0,0,0,-1,0,0,0,0,0,0,offsetof(tnsMFace, l),0);
  1523. 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;
  1524. 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);
  1525. //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);
  1526. 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);
  1527. }
  1528. p = laAddPropertyContainer("tns_medge_link", "MEdge Link", "MEdge Link", 0,0,sizeof(laListItemPointer), 0,0,0);{
  1529. laAddSubGroup(p, "e", "Edge", "Edge", "tns_medge",0,0,0,offsetof(laListItemPointer, p),0,0,0,0,0,0,0,LA_UDF_REFER);
  1530. }
  1531. p = laAddPropertyContainer("tns_loop", "MFace Loop", "MFace Loop", 0,0,sizeof(laListItemPointer), 0,0,0);{
  1532. laAddSubGroup(p, "e", "Edge", "Edge", "tns_medge",0,0,0,offsetof(laListItemPointer, p),0,0,0,0,0,0,0,LA_UDF_REFER);
  1533. }
  1534. }