Page 1 of 1

Python Documentation error

Posted: 11 Jan 2021, 19:31
by clintonman
The python docs, "tSXPython.pdf", has an "AxesRotation" attribute listed for objects.
This is really "AxesOrientation"

Re: Python Documentation error

Posted: 13 Jan 2021, 08:34
by Cellulo
Thanks Clintonman, this mean AxesRotation attribute don't exist or only AxesOrientation attribute exist ?, in the tsxPython doc it's at the page 14.

Re: Python Documentation error

Posted: 13 Jan 2021, 15:30
by clintonman
Cellulo wrote: 13 Jan 2021, 08:34 Thanks Clintonman, this mean AxesRotation attribute don't exist or only AxesOrientation attribute exist ?, in the tsxPython doc it's at the page 14.
Only AxesOrientation exists. AxesRotation in the doc is the wrong name.

Re: Python Documentation error

Posted: 13 Jan 2021, 16:26
by Cellulo
Thanks, i will change that in the doc inside the legacy edition.

Re: Python Documentation error

Posted: 12 Apr 2022, 23:36
by trueBlue
@Clinton
I was using your python script today

Code: Select all

import trueSpace

doc = trueSpace.GetActiveDocument()

doc.ClearOutTxt()

obj = doc.CurrentSelection()

axrotation = obj.AxesOrientation

print("Select the target object to apply copied Axis Rotation")


def onselectionchanged():
	global axrotation

	obj = doc.CurrentSelection()
	
	obj.AxesOrientation = axrotation

	doc.ClearOutTxt()

	trueSpace.Stop()
On first run, it worked as expected
After using again, at some point, the target Object disappeared from the Model's window
Then at some point, Model's window appeared blank
IE: No wireframe Grid or objects
Screenshot shows the target object in the Info View
Transfer selected object axis rotation to other object.png
Model scn attached

Re: Python Documentation error

Posted: 13 Apr 2022, 00:09
by clintonman
@trueBlue
Can't imagine what happened. Tried a few times without any problems.

Re: Python Documentation error

Posted: 13 Apr 2022, 16:08
by trueBlue
I have seen this happen several times
Maybe I encountered an unknown Python error
Or assigned the script to a selected object

I do notice after a successful run the Script Editor's Play button seems to be still active
Meaning you need to press the Stop button