Dogfish
09-26-2008, 11:35 PM
Short question:
Is there a way to reset the "home" position of an object from Cscript, so that it stays there when the scene ends? e.g. the "mesh" alteration does this, but this doesn't seem to be callable from cscript, or at least there's no documentation about how to do this. If there isn't a way, could we pleeease have one??
More detail, in case you're interested:
I'm creating some objects procedurally using Cscript by analyzing a (complex) scene, as follows:
// create synapse sphere of radius 1.0 at location Sloc
ec_VarUnion Value;
Value.m_fFloat=1.0f;
pSynapse = ec_AddObjectToScene(EC_OBJECTTYPE_SPHERE,"Synapse");
ec_SetObjectVarByDesc(pSynapse,"Radius",EC_VARTYP_FLOAT,Value.GetPointer());
ec_SetObjectLocation(pSynapse, Sloc.GetPointer(), EC_ANISYS_OCS);
ec_CreateObject(pSynapse);
This draws a sphere of the required radius at the required location. I want to save the scene with the synapse object in this location. There will be hundreds of them in the scene and it takes a few seconds to compute the location of each one, because I am searching over vertices of complicated meshes to identify synapse locations. But EC moves each synapse object back to the origin when the scene ends.
Mike.
Is there a way to reset the "home" position of an object from Cscript, so that it stays there when the scene ends? e.g. the "mesh" alteration does this, but this doesn't seem to be callable from cscript, or at least there's no documentation about how to do this. If there isn't a way, could we pleeease have one??
More detail, in case you're interested:
I'm creating some objects procedurally using Cscript by analyzing a (complex) scene, as follows:
// create synapse sphere of radius 1.0 at location Sloc
ec_VarUnion Value;
Value.m_fFloat=1.0f;
pSynapse = ec_AddObjectToScene(EC_OBJECTTYPE_SPHERE,"Synapse");
ec_SetObjectVarByDesc(pSynapse,"Radius",EC_VARTYP_FLOAT,Value.GetPointer());
ec_SetObjectLocation(pSynapse, Sloc.GetPointer(), EC_ANISYS_OCS);
ec_CreateObject(pSynapse);
This draws a sphere of the required radius at the required location. I want to save the scene with the synapse object in this location. There will be hundreds of them in the scene and it takes a few seconds to compute the location of each one, because I am searching over vertices of complicated meshes to identify synapse locations. But EC moves each synapse object back to the origin when the scene ends.
Mike.