|
@@ -581,12 +581,12 @@ void *tnsget_FirstChildObject(tnsObject *ob){
|
|
return ob->ChildObjects.pFirst;
|
|
return ob->ChildObjects.pFirst;
|
|
}
|
|
}
|
|
|
|
|
|
-void tnsset_ObjectLocation(tnsObject* o, int n, real val){ o->Location[n]=val; tnsSelfTransformValueChanged(o); laNotifyUsers("tns.world"); }
|
|
|
|
|
|
+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"); }
|
|
void tnsset_ObjectRotation(tnsObject* o, int n, real val){ o->Rotation[n]=val; tnsSelfTransformValueChanged(o); laNotifyUsers("tns.world"); }
|
|
-void tnsset_ObjectScale(tnsObject* o, real val){ o->Scale=val; tnsSelfTransformValueChanged(o); laNotifyUsers("tns.world"); }
|
|
|
|
|
|
+void tnsset_ObjectScale(tnsObject* o, int n, real val){ o->Scale[n]=val; tnsSelfTransformValueChanged(o); laNotifyUsers("tns.world"); }
|
|
void tnsset_ObjectDLocationARR(tnsObject* o, real* arr){ tnsVectorCopy3d(arr,o->DLocation); tnsDeltaTransformValueChanged(o); laNotifyUsers("tns.world"); }
|
|
void tnsset_ObjectDLocationARR(tnsObject* o, real* arr){ tnsVectorCopy3d(arr,o->DLocation); tnsDeltaTransformValueChanged(o); laNotifyUsers("tns.world"); }
|
|
void tnsset_ObjectDRotationARR(tnsObject* o, real* arr){ tnsVectorCopy3d(arr,o->DRotation); tnsDeltaTransformValueChanged(o); laNotifyUsers("tns.world"); }
|
|
void tnsset_ObjectDRotationARR(tnsObject* o, real* arr){ tnsVectorCopy3d(arr,o->DRotation); tnsDeltaTransformValueChanged(o); laNotifyUsers("tns.world"); }
|
|
-void tnsset_ObjectDScale(tnsObject* o, real val){ o->DScale=val; tnsDeltaTransformValueChanged(o); laNotifyUsers("tns.world"); }
|
|
|
|
|
|
+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; }
|
|
tnsMeshObject* tnsget_ObjectAsMesh(tnsObject* o){ if(!o || o->Type!=TNS_OBJECT_MESH) return 0; return o; }
|
|
|
|
|
|
@@ -805,10 +805,16 @@ void tnspost_Material(tnsMaterial *m){
|
|
//if(m->AsLibrary){ tnsRefreshMaterialLibraries(); return; }
|
|
//if(m->AsLibrary){ tnsRefreshMaterialLibraries(); return; }
|
|
//tnsEnsureMaterialShader(m,1);
|
|
//tnsEnsureMaterialShader(m,1);
|
|
}
|
|
}
|
|
-void tnspost_Object(tnsObject *o){
|
|
|
|
- laListItemPointer* NextLip;
|
|
|
|
|
|
+void tnspost_Object(tnsObject *o){ //XXX: No instance clear operation for object?
|
|
|
|
+ laListItemPointer* NextLip,*NextLip2;
|
|
|
|
+ if(o->Type!=TNS_OBJECT_ROOT){
|
|
|
|
+ tnsDeltaTransformValueChanged(o); tnsGlobalMatrixChanged(o,1);
|
|
|
|
+ }
|
|
for(laListItemPointer* lip=o->ChildObjects.pFirst;lip;lip=NextLip){
|
|
for(laListItemPointer* lip=o->ChildObjects.pFirst;lip;lip=NextLip){
|
|
- NextLip=lip->pNext; if(!lip->p){ lstRemoveItem(&o->ChildObjects,lip); memFree(lip); }
|
|
|
|
|
|
+ NextLip=lip->pNext; if(!lip->p){ lstRemoveItem(&o->ChildObjects,lip); memFree(lip); continue; }
|
|
|
|
+ for(laListItemPointer* lip2=NextLip;lip2;lip2=NextLip2){ NextLip2=lip2->pNext;
|
|
|
|
+ if(lip2->p==lip->p){ NextLip=lip2->pNext; lstRemoveItem(&o->ChildObjects,lip2); memFree(lip2); continue; }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
void tnspropagate_Object(tnsObject* o, laUDF* udf, int force){
|
|
void tnspropagate_Object(tnsObject* o, laUDF* udf, int force){
|
|
@@ -1119,13 +1125,13 @@ void la_RegisterTNSProps(){
|
|
}
|
|
}
|
|
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);
|
|
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);
|
|
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);
|
|
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);
|
|
- laAddFloatProperty(p, "scale", "Scale", "Local Uniform Scale", 0,0,0,0,0,0,0,0,offsetof(tnsObject, Scale), 0,tnsset_ObjectScale, 0,0,0,0,0,0,0,0,0);
|
|
|
|
|
|
+ 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);
|
|
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);
|
|
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);
|
|
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);
|
|
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);
|
|
- laAddFloatProperty(p, "gscale", "Global Scale", "Global uniform scale", 0,0,0,0,0,0,0,0,offsetof(tnsObject, GScale), 0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
|
|
|
|
|
|
+ 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);
|
|
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);
|
|
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);
|
|
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);
|
|
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);
|
|
- laAddFloatProperty(p, "dscale", "Delta Scale", "Delta scale", 0,0,0,0,0,0,0,0,offsetof(tnsObject, DScale), 0,tnsset_ObjectDScale,0,0,0,0,0,0,0,0,LA_PROP_KEYABLE);
|
|
|
|
|
|
+ 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);
|
|
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);
|
|
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);
|
|
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);
|
|
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);
|
|
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);{
|
|
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);{
|