You can download the distributions of this plugin, Primitive tsxPython (ptsxpy), for trueSpace (tS) series here. Please take a brief look at Requirement, License, and Disclaimer first.

Warning: Almost all methods (functions) have been roughly tested but the project is on "Beta test" stage. Please run at your own risk.

Change log

Change Log

Last modified: 2023-04-30

0.0.14

- Corrected functions that take one or more "float *" (i.e. pointer to float) as parameter.

UnMatrix3f()
GNodeGetLookAhead()
AViewPickFace()
SobjGetMinMaxTime()
SobjTreeGetMinMaxTime()
FrameGetSplineParameters()
MetaballPrimitiveGetParam()
NCurveSetWeights()
NCurveSetKnots()
NCurveRefineKnotVector()
NCurveFrames()
NPatchSetWeights()
NPatchSetUKnots()
NPatchGetUVProjection()
NPatchRefineKnotVector()
NPatchSetVKnots()
SceneGetMaxMinLuminance()
AnimGetPlayRanges()

 - Added to constants to ptsxpydef1.py

tsxNPATCH_POLE_xxxx
tsxPIPE_xxxx
tsxBLEND_LEVEL_xxxx
sxSTITCH_LEVEL_xxxx

 

0.0.13

- Corrected directory to load dll for tS6.0. (Unchanged for tS4.3,  tS5.1, and tS6.6 (Model side of tS7))

 

0.0.12

- CharArray class -  Corrected loaduchar/storeuchar to loadchar/storechar.

- UcharArray class - Added.

- ptsxgp module - Added loadchar() and storechar().

 

0.0.11

- Corrected number of methods' arguments for patch and surface.

NPatchRefineKnotVector()
NPatchRemoveKnot()
NPatchExtractIsocurve()
NPatchInvert()
BlendSurfConstruct()
StitchSurfConstruct()

- Added a definition for tsxNPatchBuildVisRepAuto() to ptsxpydef1.py. (it was originally defined in tsxnpatch.h of tSxAPI SDK)

tsxNPATCH_VR_DRAG

 

0.0.10

- RegisterWidgetType(). Changed type of 3rd and 4th argument from C++ pointer to user script side Python function object so that user can specify function in the script.

- CreateWidget(). Changed type of 5th argument from C++ pointer to Python function object so that user can specify function in the script.

- Added to ptsxgp module.

ptsxgp.getpymjrver()   Returns Python major version (2 or 3).
ptsxgp.alloc_double()   Allocates an array of C++ double (64 bit floatin point value)
ptsxgp.loaddouble()   Loads from C++ double.
ptsxgp.storedouble()   Stores to C++ double.

- Added to ptsxpydef1.py

Constants:
sizeof_CtsxViewParam
tsxJOINT_DOF_xxxx
tsxSHPARAM_GENERIC
tsxSHPARAM_ENUM
tsxMVFLAG_xxxx
tsxWDG_DRAW = true # draw widget
tsxWDG_NODRAW = false # skip drawing
tsxMTM_xxxx
tsxMTF_xxxx
tsxSELECT_xxxx

Methods:
copyfrom() method to copy from C++ address to the instance (for some classes).
xxxx_p() method to get address of a member in the C++ struct of the instance (for some classes)
adr() method to get C++ address of an element of xxxxArray class instance.

Type checking and value checking in some classes

Classes:

ColorArray
FaceVx
Double
DoubleArray
Long
LongArray
Ulong
Short
Ushort

- Other changes in ptsxpydef1.py

Corrected CtsxSubDivEdge class. At address calculating for load and store, from sizeof_CtsxVector3f to sizeof_CtsxSubDivEdge.
Corrected CtsxSubDivFace class. At address calculating for load and store, from sizeof_short to sizeof_CtsxSubDivFace.
WidgetReg class. The 4th and 5th parameter from C++ pointer to user script side Python function object.
WDG_CALLBACKS class. All 10 callbacks from C++ pointer to user script side Python function object.
Added type checking and value checking in some classes.

 

0.0.9

- Corrected shader parameter ID definitions (CSPID_xxxxx_xxxxxx) in ptsxdef1.py. Some IDs (CSPID_C_CALTEXTURE_FILTER=85, CSPID_D_CALBUMPMAP_FILTER=220) were missing and the following IDs are misaligned. Newly added them and corrected the misaligned IDs. Added some IDs (246 - 635) for tS5.1 and later tS.
- Changed starting and ending message. "build --> built", "runscriptfile() ended" --> "scriptfilename ended".
- Changed PhysSimGetCenterOfGravity(). It previously returned a tuple to the 2nd argument specified as a list objec. It stores a pointer to CtsxVector3f. User can allocate a memory area using ptsxgp.alloc_long( 1 ), call the function, load the area using ptsxgp.loadptr(), and assign it to a pointer to Vec3f() using Vec3f_p()

 

0.0.8

- Added zipped python27.dll of Python 2.7.16 to the download page.
- Zipped python27.dll of Python 2.7.15 in the download page in order to keep updated date. The displayed hash codes change.
- Changed the functions that require one or more "char *" for their arguments so that each user script can specify str objects for the visible string arguments and can specify addresses (unsigned long) for the char * arguments.
- Changed the functions that return a visible string pointer so that each script can receive str objects from such functions.

 

0.0.7

- Removed some obsolete (auxiliary) functions from the ptsxgp module. Please use classes predefined in ptsxdef1.py instead.

ptsxgp.getmainversion()
ptsxgp.getUVfromp()
ptsxgp.getvec3ffromp()
ptsxgp.getax3ffromp()
ptsxgp.getfacefrompp()
ptsxgp.getfacevxfromp()
ptsxgp.getholefrompp()
ptsxgp.getskelpfrompp()
ptsxgp.gettxmx3ffromp()
ptsxgp.getlistfromintarray()
ptsxgp.getimagefromp()
ptsxgp.getucharlistfromp()
ptsxgp.getlatvecfromp()

- Corrected following function so that the last argument receives not a str but a pointer (unsigned integer).

  SceneGetShaderParameterName()

- Added a line for initializing "self.num" to each pointer class definition (named xxxx_p) in the ptsxdef1.py so that user can specifiy an index to the pointer class instance.

- Added some definitions of tsxSHCLASS_xxxx for the value 5-8 to ptsxdef1.py.

 

 

0.0.6

- Corrected following functions so that each argument receives not a list but a pointer (unsigned integer).

   GNodeGetAxesOrientation() 2nd arg.
   ParameterValueGetData() 2nd arg.
   LatticeGetResolution() 2nd and 3rd arg.

 

0.0.5

- Corrected CollisionCheckObjWithScene() and FreeCollisionReport() so that two pointer parameters are passed to the API function tsxCollisionCheckTwoObj() correctly.

 

0.0.4

- Corrected CollisionCheckTwoObj() so that the 5th and 6th arguments are passed to the API function tsxCollisionCheckTwoObj() correctly.

 

0.0.3

- The first official release.