*/}}

la_properties.c 164 KB

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