|
@@ -557,6 +557,12 @@ void *tnsread_World(void *unused, void *inst){
|
|
|
void tnsset_InstancerInstance(tnsInstancer *o, tnsObject* value){
|
|
|
o->Instance=value; tnsInvalidateEvaluation(o); laNotifyUsers("tns.world");
|
|
|
}
|
|
|
+void tnsset_InstancerHook(tnsInstancer *o, int Hook){ laNotifyUsers("tns.world");
|
|
|
+ o->Hook=Hook; laNotifyInstanceUsers(o); tnsInvalidateEvaluation(o); tnsInvalidateEvaluation(o->Instance);
|
|
|
+}
|
|
|
+void tnssetarr_InstancerHookOffset(tnsInstancer *o, real* arr){ laNotifyUsers("tns.world");
|
|
|
+ tnsVectorSet2v(o->HookOffset,arr); laNotifyInstanceUsers(o); tnsInvalidateEvaluation(o); tnsInvalidateEvaluation(o->Instance);
|
|
|
+}
|
|
|
void *tnsget_detached_FirstRootObject(void *UNUSED1, void *UNUSED2){
|
|
|
return T->World->RootObjects.pFirst;
|
|
|
}
|
|
@@ -1190,6 +1196,19 @@ 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);
|
|
|
+ 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);{
|
|
|
+ laAddEnumItemAs(ep, "NONE", "None", "Doesn't hook to anything, use instancer x,y coordinates", 0, 0);
|
|
|
+ laAddEnumItemAs(ep, "TL", "Top Left", "Hook to top left", TNS_INSTANCER_HOOK_TL, L'🡤');
|
|
|
+ laAddEnumItemAs(ep, "TC", "Top Center", "Hook to top center", TNS_INSTANCER_HOOK_TC, L'🡡');
|
|
|
+ laAddEnumItemAs(ep, "TR", "Top Right", "Hook to top right", TNS_INSTANCER_HOOK_TR, L'🡥');
|
|
|
+ laAddEnumItemAs(ep, "CL", "Center Left", "Hook to center left", TNS_INSTANCER_HOOK_CL, L'🡠');
|
|
|
+ laAddEnumItemAs(ep, "CC", "Center", "Hook to center", TNS_INSTANCER_HOOK_CC, L'🞆');
|
|
|
+ laAddEnumItemAs(ep, "CR", "Center Right", "Hook to center right", TNS_INSTANCER_HOOK_CR, L'🡢');
|
|
|
+ laAddEnumItemAs(ep, "BL", "Bottom Left", "Hook to bottom left", TNS_INSTANCER_HOOK_BL, L'🡧');
|
|
|
+ laAddEnumItemAs(ep, "BC", "Bottom Center", "Hook to bottom center", TNS_INSTANCER_HOOK_BC, L'🡣');
|
|
|
+ laAddEnumItemAs(ep, "BR", "Bottom Right", "Hook to bottom right", TNS_INSTANCER_HOOK_BR, L'🡦');
|
|
|
+ }
|
|
|
+ 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,0);
|
|
|
}
|
|
|
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);
|