|
@@ -809,6 +809,7 @@ int lafilter_NodeCategory(void* unused, laNodeCategory* c){
|
|
|
|
|
|
void tnspost_World(tnsWorld *w){
|
|
void tnspost_World(tnsWorld *w){
|
|
tnsRefreshMaterialLibraries();
|
|
tnsRefreshMaterialLibraries();
|
|
|
|
+ laAnimationUpdateHolderList();
|
|
}
|
|
}
|
|
void tnspost_Material(tnsMaterial *m){
|
|
void tnspost_Material(tnsMaterial *m){
|
|
tns_RefreshMaterial2D(m);
|
|
tns_RefreshMaterial2D(m);
|
|
@@ -819,6 +820,13 @@ void tnspost_Object(tnsObject *o){ //XXX: No instance clear operation for object
|
|
laListItemPointer* NextLip,*NextLip2;
|
|
laListItemPointer* NextLip,*NextLip2;
|
|
if(o->Type!=TNS_OBJECT_ROOT){
|
|
if(o->Type!=TNS_OBJECT_ROOT){
|
|
tnsDeltaTransformValueChanged(o); tnsGlobalMatrixChanged(o,1);
|
|
tnsDeltaTransformValueChanged(o); tnsGlobalMatrixChanged(o,1);
|
|
|
|
+ }else{ tnsRootObject* ro=o;
|
|
|
|
+ for(laAction* aa=ro->Actions.pFirst;aa;aa=aa->Item.pNext){
|
|
|
|
+ if(!aa->HolderContainer){
|
|
|
|
+ aa->HolderContainer=la_ContainerLookup("tns_root_object");
|
|
|
|
+ aa->HolderInstance=ro;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
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); continue; }
|
|
NextLip=lip->pNext; if(!lip->p){ lstRemoveItem(&o->ChildObjects,lip); memFree(lip); continue; }
|
|
@@ -981,7 +989,7 @@ anim_set_prop_str_cleanup:
|
|
strDestroyStringSplitor(&ss);
|
|
strDestroyStringSplitor(&ss);
|
|
}
|
|
}
|
|
void* lagetraw_ActionKeyData(laActionKey* ak, int* r_size, int* ret_is_copy){
|
|
void* lagetraw_ActionKeyData(laActionKey* ak, int* r_size, int* ret_is_copy){
|
|
- *r_size=ak->DataSize; *ret_is_copy=1;
|
|
|
|
|
|
+ *r_size=ak->DataSize; *ret_is_copy=1; if(!ak->DataSize){ return 0; }
|
|
void* data=malloc(ak->DataSize); memcpy(data,ak->Data,ak->DataSize);
|
|
void* data=malloc(ak->DataSize); memcpy(data,ak->Data,ak->DataSize);
|
|
return data;
|
|
return data;
|
|
}
|
|
}
|
|
@@ -992,6 +1000,8 @@ void laset_AnimationPlayHead(void* unused,real data){
|
|
if(data<0){ data=0; }
|
|
if(data<0){ data=0; }
|
|
laAnimationSetPlayHead(data); la_AnimationEvaluateActions(1); laNotifyUsers("la.animation");
|
|
laAnimationSetPlayHead(data); la_AnimationEvaluateActions(1); laNotifyUsers("la.animation");
|
|
}
|
|
}
|
|
|
|
+void laget_ActionContainer(laAction* aa, char* str, char** here){ *here=aa->HolderContainer->Identifier; }
|
|
|
|
+void laread_ActionContainer(laAction* aa, char* str){ aa->HolderContainer=la_ContainerLookup(str); }
|
|
|
|
|
|
int laaction_VerifyRootObject(void* Parent, laPropContainer* ParentType, void* Child, laPropContainer* ChildType){
|
|
int laaction_VerifyRootObject(void* Parent, laPropContainer* ParentType, void* Child, laPropContainer* ChildType){
|
|
if(ParentType!=ChildType) return 0;
|
|
if(ParentType!=ChildType) return 0;
|
|
@@ -1931,7 +1941,7 @@ void la_RegisterInternalProps(){
|
|
|
|
|
|
|
|
|
|
p = laAddPropertyContainer("la_animation", "Animation", "Animation data",0,0,sizeof(laAnimation),0,0,1);{
|
|
p = laAddPropertyContainer("la_animation", "Animation", "Animation data",0,0,sizeof(laAnimation),0,0,1);{
|
|
- sp = laAddSubGroup(p, "action_holders", "Action Holders", "All action holders","la_animation_action_holder",0,0,0,-1,0,0,0,0,0,0,offsetof(laAnimation,ActionHolders),0);
|
|
|
|
|
|
+ sp = laAddSubGroup(p, "action_holders", "Action Holders", "All action holders","la_animation_action_holder",0,0,0,-1,0,0,0,0,0,0,offsetof(laAnimation,ActionHolders),LA_UDF_IGNORE);
|
|
laSubGroupExtraFunctions(sp,0,0,0,0,laget_AnimationActionHolderCategory);
|
|
laSubGroupExtraFunctions(sp,0,0,0,0,laget_AnimationActionHolderCategory);
|
|
|
|
|
|
laAddSubGroup(p, "current_action", "Current Action", "Current action","la_animation_action",0,0,0,offsetof(laAnimation,CurrentAction),0,0,0,0,0,0,0,LA_UDF_REFER|LA_READ_ONLY);
|
|
laAddSubGroup(p, "current_action", "Current Action", "Current action","la_animation_action",0,0,0,offsetof(laAnimation,CurrentAction),0,0,0,0,0,0,0,LA_UDF_REFER|LA_READ_ONLY);
|
|
@@ -1944,6 +1954,9 @@ void la_RegisterInternalProps(){
|
|
}
|
|
}
|
|
p = laAddPropertyContainer("la_animation_action", "Action", "Animation action",0,0,sizeof(laAction),0,0,1);{
|
|
p = laAddPropertyContainer("la_animation_action", "Action", "Animation action",0,0,sizeof(laAction),0,0,1);{
|
|
laAddStringProperty(p,"name","Name","Name of the action",0,0,0,0,1,offsetof(laAction,Name),0,0,0,0,LA_AS_IDENTIFIER);
|
|
laAddStringProperty(p,"name","Name","Name of the action",0,0,0,0,1,offsetof(laAction,Name),0,0,0,0,LA_AS_IDENTIFIER);
|
|
|
|
+ laAddStringProperty(p,"container","Container","Container of the action parent",0,0,0,0,0,0,0,laget_ActionContainer,0,laread_ActionContainer,LA_READ_ONLY);
|
|
|
|
+ laAddSubGroup(p, "holder", "Holder", "Holder data block", "any_pointer",0,0,0,offsetof(laAction, HolderInstance), 0,0,0,0,0,0,0,LA_UDF_REFER|LA_READ_ONLY);
|
|
|
|
+ laAddSubGroup(p, "holder_h2", "Holder H2", "Holder data block (hyper 2)", "any_pointer_h2",0,0,0,offsetof(laAction, HolderInstance), 0,0,0,0,0,0,0,LA_UDF_REFER|LA_READ_ONLY);
|
|
laAddSubGroup(p, "channels", "Channels", "Action channels", "la_animation_channel",0,0,0,-1,0,0,0,0,0,0,offsetof(laAction, Channels),0);
|
|
laAddSubGroup(p, "channels", "Channels", "Action channels", "la_animation_channel",0,0,0,-1,0,0,0,0,0,0,offsetof(laAction, Channels),0);
|
|
laAddFloatProperty(p, "length","Length","Length of the action in seconds",0,0,"s",30,0,0.1,2,0,offsetof(laAction,Length),0,0,0,0,0,0,0,0,0,0,0);
|
|
laAddFloatProperty(p, "length","Length","Length of the action in seconds",0,0,"s",30,0,0.1,2,0,offsetof(laAction,Length),0,0,0,0,0,0,0,0,0,0,0);
|
|
laAddFloatProperty(p, "play_head","Play Head","Play Head position",0,0,0,1.0,0,0.01,0,0,offsetof(laAction,PlayHead),0,0,0,0,0,0,0,0,0,0,0);
|
|
laAddFloatProperty(p, "play_head","Play Head","Play Head position",0,0,0,1.0,0,0.01,0,0,offsetof(laAction,PlayHead),0,0,0,0,0,0,0,0,0,0,0);
|
|
@@ -1986,6 +1999,8 @@ void la_RegisterInternalProps(){
|
|
}
|
|
}
|
|
p = laAddPropertyContainer("la_animation_action_holder", "Action Holder", "Action holder",0,0,sizeof(laActionHolder),0,0,1);{
|
|
p = laAddPropertyContainer("la_animation_action_holder", "Action Holder", "Action holder",0,0,sizeof(laActionHolder),0,0,1);{
|
|
laAddStringProperty(p,"name","Name","Name of the action",0,0,0,0,1,offsetof(laActionHolder,Name),0,0,0,0,LA_AS_IDENTIFIER);
|
|
laAddStringProperty(p,"name","Name","Name of the action",0,0,0,0,1,offsetof(laActionHolder,Name),0,0,0,0,LA_AS_IDENTIFIER);
|
|
|
|
+ laAddIntProperty(p,"action_offset","Action Offset","List handle offset of the action list in the instance",0,0,0,0,0,0,0,0,offsetof(laActionHolder,ActionOffset),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
|
|
|
|
+ laAddIntProperty(p,"prop_offset","Prop Offset","List handle offset of the property list in the instance",0,0,0,0,0,0,0,0,offsetof(laActionHolder,PropOffset),0,0,0,0,0,0,0,0,0,0,LA_READ_ONLY);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|