|
|
@ -45,17 +45,19 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com |
|
|
|
//
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#include <exception> |
|
|
|
|
|
|
|
#include <Python.h> |
|
|
|
#include <Python.h> |
|
|
|
|
|
|
|
#include <exception> |
|
|
|
#pragma hdrstop |
|
|
|
#pragma hdrstop |
|
|
|
|
|
|
|
|
|
|
|
#include "pyVaultNode.h" |
|
|
|
#include "pyVaultNode.h" |
|
|
|
|
|
|
|
|
|
|
|
#ifndef BUILDING_PYPLASMA |
|
|
|
#ifndef BUILDING_PYPLASMA |
|
|
|
# include "pyVault.h" |
|
|
|
# include "pyVault.h" |
|
|
|
# include "pyVaultSystemNode.h" |
|
|
|
# include "pyVaultSystemNode.h" |
|
|
|
# include "pnNetCommon/plNetApp.h" |
|
|
|
# include "pnNetCommon/plNetApp.h" |
|
|
|
# include "plNetClientComm/plNetClientComm.h" |
|
|
|
# include "plNetClientComm/plNetClientComm.h" |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#include "pyImage.h" |
|
|
|
#include "pyImage.h" |
|
|
|
#include "pyDniCoordinates.h" |
|
|
|
#include "pyDniCoordinates.h" |
|
|
|
#include "pyVaultNodeRef.h" |
|
|
|
#include "pyVaultNodeRef.h" |
|
|
@ -72,6 +74,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com |
|
|
|
#include "pyVaultPlayerNode.h" |
|
|
|
#include "pyVaultPlayerNode.h" |
|
|
|
#include "pyVaultSDLNode.h" |
|
|
|
#include "pyVaultSDLNode.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "pnUUID/pnUUID.h" |
|
|
|
#include "plGImage/plMipmap.h" |
|
|
|
#include "plGImage/plMipmap.h" |
|
|
|
#include "plVault/plVault.h" |
|
|
|
#include "plVault/plVault.h" |
|
|
|
|
|
|
|
|
|
|
@ -168,7 +171,6 @@ RelVaultNode * pyVaultNode::pyVaultNodeOperationCallback::GetNode () { |
|
|
|
// only for python glue, do NOT call
|
|
|
|
// only for python glue, do NOT call
|
|
|
|
pyVaultNode::pyVaultNode() |
|
|
|
pyVaultNode::pyVaultNode() |
|
|
|
: fNode(nil) |
|
|
|
: fNode(nil) |
|
|
|
, fCreateAgeGuid(nil) |
|
|
|
|
|
|
|
, fCreateAgeName(nil) |
|
|
|
, fCreateAgeName(nil) |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
@ -176,7 +178,6 @@ pyVaultNode::pyVaultNode() |
|
|
|
// should only be created from C++ side
|
|
|
|
// should only be created from C++ side
|
|
|
|
pyVaultNode::pyVaultNode( RelVaultNode* nfsNode ) |
|
|
|
pyVaultNode::pyVaultNode( RelVaultNode* nfsNode ) |
|
|
|
: fNode(nfsNode) |
|
|
|
: fNode(nfsNode) |
|
|
|
, fCreateAgeGuid(nil) |
|
|
|
|
|
|
|
, fCreateAgeName(nil) |
|
|
|
, fCreateAgeName(nil) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (fNode) |
|
|
|
if (fNode) |
|
|
@ -187,7 +188,6 @@ pyVaultNode::~pyVaultNode() |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (fNode) |
|
|
|
if (fNode) |
|
|
|
fNode->DecRef("pyVaultNode"); |
|
|
|
fNode->DecRef("pyVaultNode"); |
|
|
|
free(fCreateAgeGuid); |
|
|
|
|
|
|
|
free(fCreateAgeName); |
|
|
|
free(fCreateAgeName); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -322,20 +322,13 @@ const char * pyVaultNode::GetCreateAgeName( void ) |
|
|
|
return fCreateAgeName; |
|
|
|
return fCreateAgeName; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const char * pyVaultNode::GetCreateAgeGuid( void ) |
|
|
|
plUUID pyVaultNode::GetCreateAgeGuid(void) const |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!fNode) |
|
|
|
|
|
|
|
return ""; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (fCreateAgeGuid) |
|
|
|
|
|
|
|
return fCreateAgeGuid; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (fNode) { |
|
|
|
if (fNode) { |
|
|
|
fCreateAgeGuid = (char*)malloc(64); |
|
|
|
return plUUID(fNode->createAgeUuid); |
|
|
|
strncpy(fCreateAgeGuid, plUUID(fNode->createAgeUuid).AsString().c_str(), 64); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return fCreateAgeGuid; |
|
|
|
return plUUID(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
PyObject* pyVaultNode::GetCreateAgeCoords () { |
|
|
|
PyObject* pyVaultNode::GetCreateAgeCoords () { |
|
|
@ -390,9 +383,6 @@ void pyVaultNode::SetCreateAgeName( const char * v ) |
|
|
|
|
|
|
|
|
|
|
|
void pyVaultNode::SetCreateAgeGuid( const char * v ) |
|
|
|
void pyVaultNode::SetCreateAgeGuid( const char * v ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
free(fCreateAgeGuid); |
|
|
|
|
|
|
|
fCreateAgeGuid = nil; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ASSERT(fNode); |
|
|
|
ASSERT(fNode); |
|
|
|
Uuid uuid; |
|
|
|
Uuid uuid; |
|
|
|
GuidFromString(v, &uuid); |
|
|
|
GuidFromString(v, &uuid); |
|
|
|