|
@@ -1783,15 +1783,6 @@ void tnsui_LightObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UN
|
|
laColumn* c=laFirstColumn(uil);
|
|
laColumn* c=laFirstColumn(uil);
|
|
laShowLabel(uil,c,"Light Object",0,0)->Flags|=LA_TEXT_ALIGN_CENTER|LA_UI_FLAGS_DISABLED;
|
|
laShowLabel(uil,c,"Light Object",0,0)->Flags|=LA_TEXT_ALIGN_CENTER|LA_UI_FLAGS_DISABLED;
|
|
}
|
|
}
|
|
-void tnsui_MeshObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context){
|
|
|
|
- laColumn* c=laFirstColumn(uil);
|
|
|
|
- laShowLabel(uil,c,"Mesh Object",0,0)->Flags|=LA_TEXT_ALIGN_CENTER|LA_UI_FLAGS_DISABLED;
|
|
|
|
-}
|
|
|
|
-void tnsui_InstancerObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context){
|
|
|
|
- laColumn* c=laFirstColumn(uil), *cl,*cr;
|
|
|
|
- laSplitColumn(uil,c,0.5); cl=laLeftColumn(c,5); cr=laRightColumn(c,0);
|
|
|
|
- laShowLabel(uil,cl,"Instance",0,0); laShowItemFull(uil,cr,This,"instance",LA_WIDGET_COLLECTION_SELECTOR,0,laui_IdentifierOnly,0);
|
|
|
|
-}
|
|
|
|
void tnsui_Material(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context){
|
|
void tnsui_Material(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context){
|
|
laColumn* c=laFirstColumn(uil),*cl,*cr; laUiItem* b,*b1,*b2;
|
|
laColumn* c=laFirstColumn(uil),*cl,*cr; laUiItem* b,*b1,*b2;
|
|
laSplitColumn(uil,c,0.4); cl=laLeftColumn(c,8); cr=laRightColumn(c,0);
|
|
laSplitColumn(uil,c,0.4); cl=laLeftColumn(c,8); cr=laRightColumn(c,0);
|
|
@@ -1844,45 +1835,51 @@ void tnsui_MaterialSlot(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extr
|
|
laShowItem(uil,c,This,"name")->Flags|=LA_UI_FLAGS_DISABLED;
|
|
laShowItem(uil,c,This,"name")->Flags|=LA_UI_FLAGS_DISABLED;
|
|
}laEndCondition(uil,b1);
|
|
}laEndCondition(uil,b1);
|
|
}
|
|
}
|
|
|
|
+void tnsui_MeshObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context){
|
|
|
|
+ laColumn* c=laFirstColumn(uil); laUiItem* g,*tg; laUiList* gu,*tu; laColumn* gc,*gcl,*gcr,*tc; laUiItem* b1,*b2,*b3,*b4,*b5;
|
|
|
|
+ laShowLabel(uil,c,"Mesh Object",0,0)->Flags|=LA_TEXT_ALIGN_CENTER|LA_UI_FLAGS_DISABLED;
|
|
|
|
+ g=laMakeGroup(uil,c,"Materials",0); gu=g->Page; gc=laFirstColumn(gu); laSplitColumn(gu,gc,0.7);
|
|
|
|
+ gcl=laLeftColumn(gc,0); gcr=laRightColumn(gc,1);
|
|
|
|
+ tg=laMakeEmptyGroup(gu,gcl,"Slots",0); tu=tg->Page; tc=laFirstColumn(tu); tu->HeightCoeff=4;
|
|
|
|
+ laShowItemFull(tu,tc,This,"materials",0,0,tnsui_MaterialSlot,0)->Flags|=LA_UI_FLAGS_NO_DECAL;
|
|
|
|
+ laShowItem(gu,gcr,This,"add_material_slot");
|
|
|
|
+ b2=laOnConditionThat(gu,gc,laPropExpression(This,"current_material"));{
|
|
|
|
+ laUiItem* mat=laShowInvisibleItem(gu,gc,This,"current_material");
|
|
|
|
+ laShowItem(gu,gcr,&mat->PP,"remove");
|
|
|
|
+ b3=laBeginRow(gu,gc,0,0); laUiItem* sel;
|
|
|
|
+ laShowItem(gu,gc,This,"add_material")->Flags|=LA_UI_FLAGS_ICON;
|
|
|
|
+ b4=laOnConditionThat(gu,gc,laPropExpression(&mat->PP,"material"));{
|
|
|
|
+ sel=laShowItemFull(gu,gc,&mat->PP,"material",LA_WIDGET_COLLECTION_SELECTOR,0,tnsui_MaterialListItem,0);
|
|
|
|
+ sel->Flags|=LA_UI_COLLECTION_SIMPLE_SELECTOR;
|
|
|
|
+ laShowItem(gu,gc,&mat->PP,"material.name")->Expand=1;
|
|
|
|
+ laShowItem(gu,gc,&sel->PP,"clear_selection")->Flags|=LA_UI_FLAGS_ICON;
|
|
|
|
+ }laElse(gu,b4);{
|
|
|
|
+ sel=laShowItemFull(gu,gc,&mat->PP,"material",LA_WIDGET_COLLECTION_SELECTOR,0,tnsui_MaterialListItem,0);
|
|
|
|
+ sel->Flags|=LA_UI_COLLECTION_SIMPLE_SELECTOR; sel->Expand=1;
|
|
|
|
+ }laEndCondition(gu,b4);
|
|
|
|
+ laEndRow(gu,b3);
|
|
|
|
+ b4=laOnConditionThat(gu,gc,laEqual(laPropExpression(This,"mode"),laIntExpression(TNS_MESH_EDIT_MODE)));{
|
|
|
|
+ b5=laBeginRow(gu,gc,0,0);
|
|
|
|
+ laShowLabel(gu,gc,"Edit:",0,0);
|
|
|
|
+ laShowItemFull(gu,gc,This,"assign_material_slot",0,"text=Assign",0,0);
|
|
|
|
+ laEndRow(gu,b5);
|
|
|
|
+ }laEndCondition(gu,b4);
|
|
|
|
+ laShowSeparator(gu,gc);
|
|
|
|
+ b4=laOnConditionThat(gu,gc,laPropExpression(&mat->PP,"material"));{
|
|
|
|
+ laShowItemFull(gu,gc,&mat->PP,"material",LA_WIDGET_COLLECTION_SINGLE,0,tnsui_Material,1)->Flags|=LA_UI_FLAGS_NO_DECAL;
|
|
|
|
+ }laEndCondition(gu,b4);
|
|
|
|
+ }laElse(gu,b2);{
|
|
|
|
+ laShowLabel(gu,gc,"No active material slot.",0,0);
|
|
|
|
+ }laEndCondition(gu,b2);
|
|
|
|
+}
|
|
|
|
+void tnsui_InstancerObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context){
|
|
|
|
+ laColumn* c=laFirstColumn(uil), *cl,*cr;
|
|
|
|
+ laSplitColumn(uil,c,0.5); cl=laLeftColumn(c,5); cr=laRightColumn(c,0);
|
|
|
|
+ laShowLabel(uil,cl,"Instance",0,0); laShowItemFull(uil,cr,This,"instance",LA_WIDGET_COLLECTION_SELECTOR,0,laui_IdentifierOnly,0);
|
|
|
|
+}
|
|
void tnsui_BaseObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context){
|
|
void tnsui_BaseObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context){
|
|
laColumn* c=laFirstColumn(uil); laUiItem* g,*tg; laUiList* gu,*tu; laColumn* gc,*gcl,*gcr,*tc; laUiItem* b1,*b2,*b3,*b4,*b5;
|
|
laColumn* c=laFirstColumn(uil); laUiItem* g,*tg; laUiList* gu,*tu; laColumn* gc,*gcl,*gcr,*tc; laUiItem* b1,*b2,*b3,*b4,*b5;
|
|
-
|
|
|
|
- b1=laOnConditionThat(uil,c,laEqual(laPropExpression(This,"__self.type"),laIntExpression(TNS_OBJECT_MESH)));{
|
|
|
|
- g=laMakeGroup(uil,c,"Materials",0); gu=g->Page; gc=laFirstColumn(gu); laSplitColumn(gu,gc,0.7);
|
|
|
|
- gcl=laLeftColumn(gc,0); gcr=laRightColumn(gc,1);
|
|
|
|
- tg=laMakeEmptyGroup(gu,gcl,"Slots",0); tu=tg->Page; tc=laFirstColumn(tu); tu->HeightCoeff=4;
|
|
|
|
- laShowItemFull(tu,tc,This,"as_mesh.materials",0,0,tnsui_MaterialSlot,0)->Flags|=LA_UI_FLAGS_NO_DECAL;
|
|
|
|
- laShowItem(gu,gcr,This,"as_mesh.add_material_slot");
|
|
|
|
- b2=laOnConditionThat(gu,gc,laPropExpression(This,"as_mesh.current_material"));{
|
|
|
|
- laUiItem* mat=laShowInvisibleItem(gu,gc,This,"as_mesh.current_material");
|
|
|
|
- laShowItem(gu,gcr,&mat->PP,"remove");
|
|
|
|
- b3=laBeginRow(gu,gc,0,0); laUiItem* sel;
|
|
|
|
- laShowItem(gu,gc,This,"as_mesh.add_material")->Flags|=LA_UI_FLAGS_ICON;
|
|
|
|
- b4=laOnConditionThat(gu,gc,laPropExpression(&mat->PP,"material"));{
|
|
|
|
- sel=laShowItemFull(gu,gc,&mat->PP,"material",LA_WIDGET_COLLECTION_SELECTOR,0,tnsui_MaterialListItem,0);
|
|
|
|
- sel->Flags|=LA_UI_COLLECTION_SIMPLE_SELECTOR;
|
|
|
|
- laShowItem(gu,gc,&mat->PP,"material.name")->Expand=1;
|
|
|
|
- laShowItem(gu,gc,&sel->PP,"clear_selection")->Flags|=LA_UI_FLAGS_ICON;
|
|
|
|
- }laElse(gu,b4);{
|
|
|
|
- sel=laShowItemFull(gu,gc,&mat->PP,"material",LA_WIDGET_COLLECTION_SELECTOR,0,tnsui_MaterialListItem,0);
|
|
|
|
- sel->Flags|=LA_UI_COLLECTION_SIMPLE_SELECTOR; sel->Expand=1;
|
|
|
|
- }laEndCondition(gu,b4);
|
|
|
|
- laEndRow(gu,b3);
|
|
|
|
- b4=laOnConditionThat(gu,gc,laEqual(laPropExpression(This,"as_mesh.mode"),laIntExpression(TNS_MESH_EDIT_MODE)));{
|
|
|
|
- b5=laBeginRow(gu,gc,0,0);
|
|
|
|
- laShowLabel(gu,gc,"Edit:",0,0);
|
|
|
|
- laShowItemFull(gu,gc,This,"as_mesh.assign_material_slot",0,"text=Assign",0,0);
|
|
|
|
- laEndRow(gu,b5);
|
|
|
|
- }laEndCondition(gu,b4);
|
|
|
|
- laShowSeparator(gu,gc);
|
|
|
|
- b4=laOnConditionThat(gu,gc,laPropExpression(&mat->PP,"material"));{
|
|
|
|
- laShowItemFull(gu,gc,&mat->PP,"material",LA_WIDGET_COLLECTION_SINGLE,0,tnsui_Material,1)->Flags|=LA_UI_FLAGS_NO_DECAL;
|
|
|
|
- }laEndCondition(gu,b4);
|
|
|
|
- }laElse(gu,b2);{
|
|
|
|
- laShowLabel(gu,gc,"No active material slot.",0,0);
|
|
|
|
- }laEndCondition(gu,b2);
|
|
|
|
- }laEndCondition(uil,b1);
|
|
|
|
-
|
|
|
|
|
|
+ laShowLabel(uil,c,"Generic",0,0)->Flags|=LA_TEXT_ALIGN_CENTER|LA_UI_FLAGS_DISABLED;
|
|
g=laMakeGroup(uil,c,"Object",0); gu=g->Page; gc=laFirstColumn(gu);
|
|
g=laMakeGroup(uil,c,"Object",0); gu=g->Page; gc=laFirstColumn(gu);
|
|
b1=laOnConditionToggle(gu,gc,0,0,0,0,0);{ strSafeSet(&b1->ExtraInstructions,"text=Transformations");
|
|
b1=laOnConditionToggle(gu,gc,0,0,0,0,0);{ strSafeSet(&b1->ExtraInstructions,"text=Transformations");
|
|
//b1->State=LA_UI_ACTIVE;
|
|
//b1->State=LA_UI_ACTIVE;
|
|
@@ -1903,39 +1900,38 @@ void tnsuidetached_ObjectProperties(laPanel* p){
|
|
la_MakeDetachedProp(p, "tns.world.root_objects", "root_object");
|
|
la_MakeDetachedProp(p, "tns.world.root_objects", "root_object");
|
|
}
|
|
}
|
|
void tnsui_ObjectProperties(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
|
|
void tnsui_ObjectProperties(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
|
|
- laColumn* c=laFirstColumn(uil),*cl, *cr;
|
|
|
|
- laSplitColumn(uil,c,0.2); cl=laLeftColumn(c,1); cr=laRightColumn(c,0);
|
|
|
|
|
|
+ laColumn* c=laFirstColumn(uil);
|
|
|
|
|
|
- laShowItemFull(uil,cl,Extra,"detached",0,0,0,0)->Flags|=LA_UI_FLAGS_HIGHLIGHT|LA_UI_FLAGS_ICON;
|
|
|
|
|
|
+ laUiItem* b=laBeginRow(uil,c,0,0);
|
|
|
|
+ laShowItemFull(uil,c,Extra,"detached",0,0,0,0)->Flags|=LA_UI_FLAGS_HIGHLIGHT|LA_UI_FLAGS_ICON;
|
|
|
|
|
|
#define ADD_PAGE1(base,path) \
|
|
#define ADD_PAGE1(base,path) \
|
|
- laUiItem* b=laBeginRow(uil,cr,0,0);\
|
|
|
|
- laUiItem* rb=laShowItemFull(uil,cr,base,path,LA_WIDGET_COLLECTION_SELECTOR,0,laui_IdentifierOnly,0);\
|
|
|
|
|
|
+ laUiItem* rb=laShowItemFull(uil,c,base,path,LA_WIDGET_COLLECTION_SELECTOR,0,laui_IdentifierOnly,0);\
|
|
rb->Flags|=LA_UI_COLLECTION_SIMPLE_SELECTOR;\
|
|
rb->Flags|=LA_UI_COLLECTION_SIMPLE_SELECTOR;\
|
|
- laUiItem* b2=laOnConditionThat(uil,cr,laPropExpression(&rb->PP,""));{\
|
|
|
|
- laShowItem(uil,cr,&rb->PP,"name")->Flags|=LA_UI_FLAGS_NO_DECAL;\
|
|
|
|
- laUiItem* b3=laOnConditionThat(uil,cr,laPropExpression(&rb->PP,"active"));{\
|
|
|
|
- laShowLabel(uil,cr,"⯈",0,0); laShowItem(uil,cr,&rb->PP,"active.name")->Flags|=LA_UI_FLAGS_NO_DECAL;\
|
|
|
|
|
|
+ laUiItem* b2=laOnConditionThat(uil,c,laPropExpression(&rb->PP,""));{\
|
|
|
|
+ laShowItem(uil,c,&rb->PP,"name")->Flags|=LA_UI_FLAGS_NO_DECAL;\
|
|
|
|
+ laUiItem* b3=laOnConditionThat(uil,c,laPropExpression(&rb->PP,"active"));{\
|
|
|
|
+ laShowLabel(uil,c,"⯈",0,0); laShowItem(uil,c,&rb->PP,"active.name")->Flags|=LA_UI_FLAGS_NO_DECAL;\
|
|
}laEndCondition(uil,b3);\
|
|
}laEndCondition(uil,b3);\
|
|
}laEndCondition(uil,b2);\
|
|
}laEndCondition(uil,b2);\
|
|
- laEndRow(uil,b);\
|
|
|
|
- laUiItem* g; laUiList* gu; laColumn* gc;\
|
|
|
|
- g=laMakeEmptyGroup(uil,c,"Object",0); gu=g->Page; gc=laFirstColumn(gu); g->Flags|=LA_UI_FLAGS_NO_DECAL;
|
|
|
|
|
|
+ laEndRow(uil,b);
|
|
|
|
|
|
#define ADD_PAGE2 \
|
|
#define ADD_PAGE2 \
|
|
- laUiItem* b3=laOnConditionThat(gu,gc,laPropExpression(&actui->PP,""));{\
|
|
|
|
- tnsui_BaseObjectProperties(gu,&actui->PP,0,0,0);\
|
|
|
|
- }laElse(gu,b3);{\
|
|
|
|
- laShowLabel(gu,gc,"No active object.",0,0)->Flags|=LA_TEXT_ALIGN_CENTER|LA_UI_FLAGS_DISABLED;;\
|
|
|
|
- }laEndCondition(gu,b3);
|
|
|
|
|
|
+ laUiItem* b3=laOnConditionThat(uil,c,laPropExpression(&actui->PP,""));{\
|
|
|
|
+ tnsui_BaseObjectProperties(uil,&actui->PP,0,0,0);\
|
|
|
|
+ }laElse(uil,b3);{\
|
|
|
|
+ laShowLabel(uil,c,"No active object.",0,0)->Flags|=LA_TEXT_ALIGN_CENTER|LA_UI_FLAGS_DISABLED;;\
|
|
|
|
+ }laEndCondition(uil,b3);
|
|
|
|
|
|
laUiItem* b0=laOnConditionThat(uil,c,laPropExpression(Extra,"detached"));{
|
|
laUiItem* b0=laOnConditionThat(uil,c,laPropExpression(Extra,"detached"));{
|
|
ADD_PAGE1(Extra,"root_object")
|
|
ADD_PAGE1(Extra,"root_object")
|
|
- laUiItem* actui=laShowInvisibleItem(gu,gc,&rb->PP,"active");
|
|
|
|
|
|
+ laUiItem* actui=laShowItemFull(uil,c,&rb->PP,"active",LA_WIDGET_COLLECTION_SINGLE,0,0,0);
|
|
|
|
+ actui->Flags|=LA_UI_FLAGS_NO_DECAL;
|
|
ADD_PAGE2
|
|
ADD_PAGE2
|
|
}laElse(uil,b0);{
|
|
}laElse(uil,b0);{
|
|
ADD_PAGE1(0,"tns.world.active_root")
|
|
ADD_PAGE1(0,"tns.world.active_root")
|
|
- laUiItem* actui=laShowInvisibleItem(gu,gc,0,"tns.world.active_root.active");
|
|
|
|
|
|
+ laUiItem* actui=laShowItemFull(uil,c,0,"tns.world.active_root.active",LA_WIDGET_COLLECTION_SINGLE,0,0,0);
|
|
|
|
+ actui->Flags|=LA_UI_FLAGS_NO_DECAL;
|
|
ADD_PAGE2
|
|
ADD_PAGE2
|
|
}laEndCondition(uil,b0);
|
|
}laEndCondition(uil,b0);
|
|
|
|
|