Python Documentation error

Post Reply
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Python Documentation error

Post by clintonman »

The python docs, "tSXPython.pdf", has an "AxesRotation" attribute listed for objects.
This is really "AxesOrientation"
Clinton Reese

http://clintons3d.com
User avatar
Cellulo
Lieutenant
Posts: 914
Joined: 27 Sep 2012, 07:48
Type the number ten into the box: 9
Location: France
Contact:

Re: Python Documentation error

Post 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.
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Python Documentation error

Post 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.
Clinton Reese

http://clintons3d.com
User avatar
Cellulo
Lieutenant
Posts: 914
Joined: 27 Sep 2012, 07:48
Type the number ten into the box: 9
Location: France
Contact:

Re: Python Documentation error

Post by Cellulo »

Thanks, i will change that in the doc inside the legacy edition.
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Python Documentation error

Post 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
Attachments
New Compressed (zipped) Folder.zip
(52.58 KiB) Downloaded 88 times
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Python Documentation error

Post by clintonman »

@trueBlue
Can't imagine what happened. Tried a few times without any problems.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Python Documentation error

Post 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
Post Reply