|
@@ -580,6 +580,9 @@ void *tnsget_NextLinkedObject(tnsObject *o, laPropIterator *pi){
|
|
|
void *tnsget_FirstChildObject(tnsObject *ob){
|
|
|
return ob->ChildObjects.pFirst;
|
|
|
}
|
|
|
+void tnsset_RootObjectIs2D(tnsRootObject *root, int Is2D){
|
|
|
+ root->Is2D=Is2D; laNotifyInstanceUsers(root);
|
|
|
+}
|
|
|
|
|
|
void tnsset_ObjectLocation(tnsObject* o, int n, real val){ o->Location[n]=val;tnsSelfTransformValueChanged(o); laNotifyUsers("tns.world"); }
|
|
|
void tnsset_ObjectRotation(tnsObject* o, int n, real val){ o->Rotation[n]=val; tnsSelfTransformValueChanged(o); laNotifyUsers("tns.world"); }
|
|
@@ -589,6 +592,7 @@ void tnsset_ObjectDRotationARR(tnsObject* o, real* arr){ tnsVectorCopy3d(arr,o->
|
|
|
void tnsset_ObjectDScaleARR(tnsObject* o, real* arr){ tnsVectorCopy3d(arr,o->DScale); tnsDeltaTransformValueChanged(o); laNotifyUsers("tns.world"); }
|
|
|
|
|
|
tnsMeshObject* tnsget_ObjectAsMesh(tnsObject* o){ if(!o || o->Type!=TNS_OBJECT_MESH) return 0; return o; }
|
|
|
+tnsRootObject* tnsget_ObjectAsRoot(tnsObject* o){ if(!o || o->Type!=TNS_OBJECT_ROOT) return 0; return o; }
|
|
|
|
|
|
void laget_UiTemplateIdentifier(laUiTemplate *uit, char *result, char** here){
|
|
|
*here=uit->Identifier->Ptr;
|
|
@@ -918,6 +922,7 @@ laPropContainer* tnsget_ObjectType(tnsObject* o){
|
|
|
case TNS_OBJECT_CAMERA: return TNS_PC_OBJECT_CAMERA;
|
|
|
case TNS_OBJECT_MESH: return TNS_PC_OBJECT_MESH;
|
|
|
case TNS_OBJECT_LIGHT: return TNS_PC_OBJECT_LIGHT;
|
|
|
+ case TNS_OBJECT_ROOT: return TNS_PC_OBJECT_ROOT;
|
|
|
default: return TNS_PC_OBJECT_GENERIC;
|
|
|
}
|
|
|
}
|
|
@@ -952,6 +957,7 @@ laPropContainer* TNS_PC_OBJECT_INSTANCER;
|
|
|
laPropContainer* TNS_PC_OBJECT_CAMERA;
|
|
|
laPropContainer* TNS_PC_OBJECT_LIGHT;
|
|
|
laPropContainer* TNS_PC_OBJECT_MESH;
|
|
|
+laPropContainer* TNS_PC_OBJECT_ROOT;
|
|
|
laPropContainer* TNS_PC_MATERIAL;
|
|
|
laPropContainer* TNS_PC_MATERIAL_SLOT;
|
|
|
|
|
@@ -1070,6 +1076,10 @@ void la_RegisterTNSProps(){
|
|
|
laSubGroupExtraFunctions(sp,tnsfilter_SavableObject,tnsfilter_SavableObject,0,0,0);
|
|
|
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);
|
|
|
laSubGroupDetachable(sp, tnsget_detached_FirstMaterial, laget_ListNext);
|
|
|
+ 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);{
|
|
|
+ laAddEnumItemAs(ep, "ROOT", "Root", "Display root object properties",0,0);
|
|
|
+ laAddEnumItemAs(ep, "OBJECT", "Object", "Display object properties",1,0);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
p = laAddPropertyContainer("tns_child_object", "Child Object", "Child object linker", 0,0,sizeof(laListItemPointer), 0,0,0);{
|
|
@@ -1149,6 +1159,18 @@ void la_RegisterTNSProps(){
|
|
|
laAddOperatorProperty(p, "add_driver_page", "Add Page", "Add a driver page","LA_add_driver_page",'+',0);
|
|
|
laAddOperatorProperty(p, "remove_root", "Remove root", "Remove the root node","M_remove_root",L'🗴',0);
|
|
|
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);
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ p = laAddPropertyContainer("tns_root_object", "Root Object", "Root object", 0, tnsui_RootObjectProperties,sizeof(tnsRootObject), 0,0,2);{
|
|
|
+ laPropContainerExtraFunctions(p,0,0,tnstouched_Object,0/*tnspropagate_Object*/,0);
|
|
|
+ TNS_PC_OBJECT_ROOT=p;
|
|
|
+ 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);
|
|
|
+ laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,0,0,0,0,0,0,0,0,LA_UDF_LOCAL);
|
|
|
+ laAddSubGroup(p, "active_camera", "Active Camera", "Active camera of this root object", "tns_object",0,0,0,offsetof(tnsRootObject, ActiveCamera),0,0,0,0,0,0,0,LA_UDF_REFER|LA_READ_ONLY);
|
|
|
+ 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);{
|
|
|
+ laAddEnumItemAs(ep, "3D", "3D", "Root object is in 3D", 0, 0);
|
|
|
+ laAddEnumItemAs(ep, "2D", "2D", "Root object is in 2D", 1, 0);
|
|
|
+ }
|
|
|
}
|
|
|
p = laAddPropertyContainer("tns_instancer", "Instancer", "Instance placeholder object", U'📎', tnsui_InstancerObjectProperties,sizeof(tnsInstancer), 0,0,2);{
|
|
|
laPropContainerExtraFunctions(p,0,0,tnstouched_Object,0/*tnspropagate_Object*/,0);
|
|
@@ -1156,7 +1178,6 @@ void la_RegisterTNSProps(){
|
|
|
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);
|
|
|
laAddSubGroup(p, "base", "Base", "Object base", "tns_object",0,0,0,0,0,0,0,0,0,0,0,LA_UDF_LOCAL);
|
|
|
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);
|
|
|
- //laAddSubGroup(p, "runtime_instance", "Runtime Instance", "Runtime instance, not saved", "tns_object",0,0,0,offsetof(tnsInstancer, RuntimeInstance),0,0,0,0,0,0,0,LA_UDF_REFER|LA_UDF_IGNORE|LA_READ_ONLY);
|
|
|
}
|
|
|
p = laAddPropertyContainer("tns_mesh_object", "Mesh Object", "Mesh object", 0,tnsui_MeshObjectProperties,sizeof(tnsMeshObject), tnspost_Object, 0,2);{
|
|
|
laPropContainerExtraFunctions(p,0,0,tnstouched_Object,0/*tnspropagate_Object*/,0);
|