*/}}
Przeglądaj źródła

Prop and ref fixes

Yiming Wu 2 lat temu
rodzic
commit
1c8d5780c8
4 zmienionych plików z 5 dodań i 5 usunięć
  1. 1 1
      la_data.c
  2. 1 1
      la_util.c
  3. 2 2
      resources/la_nodes_basic.c
  4. 1 1
      resources/la_properties.c

+ 1 - 1
la_data.c

@@ -2774,7 +2774,7 @@ int la_WriteProp(laUDF *udf, laPropPack *pp, int FromThis, int UseInstanceList){
                 if (FromThis){ inst = 0; }else{
                     inst = laGetNextInstance(p, inst, &pi);
                     pp->EndInstance = inst;
-                    if(UseInstanceList&&pc->Hyper==2){ la_NextH2Instance(udf); if(!udf->CurrentH2Instance) inst=0; }
+                    if(UseInstanceList&&pc->Hyper==2&&(!p->UDFIsSingle)){ la_NextH2Instance(udf); if(!udf->CurrentH2Instance) inst=0; }
                 }
                 pContinue = la_Tell(udf);
                 la_Seek(udf, pEachCount); la_WriteShort(udf, PropNum);

+ 1 - 1
la_util.c

@@ -1180,7 +1180,7 @@ void *memStaticDestroy(laStaticMemoryPool *smp){
 }
 
 void la_ReferencedBlockDeleted(void* This, laItemUserLinker* iul){
-    void** user=iul->Pointer.p; (*user)=0; laStopUsingDataBlock(iul->Additional, 0, This);
+    void** user=iul->Pointer.p; if(*user==This){ (*user)=0; laStopUsingDataBlock(iul->Additional, 0, This); }
 }
 void la_ReferrerDeleted(void* This, laItemUserLinker* iul){
     void* instance=iul->Pointer.p; if(instance!=This){ laStopUsingDataBlock(instance, 0, This); }

+ 2 - 2
resources/la_nodes_basic.c

@@ -553,9 +553,9 @@ void laui_MapperNode(laUiList *uil, laPropPack *This, laPropPack *Extra, laColum
 
 void IDN_RandomInit(laRandomNode* n, int NoCreate){
     if(!NoCreate){
-        strSafeSet(&n->Base.Name,"Random"); n->Out=laCreateOutSocket(n,"RAND",LA_PROP_FLOAT);
+        strSafeSet(&n->Base.Name,"Random"); n->Out=laCreateOutSocket(n,"RAND",LA_PROP_FLOAT); n->Min=0; n->Max=1;
     }
-    n->Out->Data=&n->rOut; n->Min=0; n->Max=1;
+    n->Out->Data=&n->rOut;
 }
 void IDN_RandomDestroy(laRandomNode* n){
     strSafeDestroy(&n->Base.Name); laDestroyOutSocket(n->Out);

+ 1 - 1
resources/la_properties.c

@@ -1233,7 +1233,7 @@ void la_RegisterInternalProps(){
         laPropContainerExtraFunctions(p,0,0,latouched_NodeInSocket,0,0);
 
         p = laAddPropertyContainer("la_value_mapper", "Value Mapper", "Value mapper", 0, 0, sizeof(laValueMapper), 0, 0, 1);{
-            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), LA_UDF_REFER);
+            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);
             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);
             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);
         } LA_PC_MAPPER=p;