WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1  
Old 10-11-2006, 09:20 AM
shivanangel shivanangel is offline
Member
 
Join Date: Feb 2006
Location: New Jersey
Posts: 180
Unscriptable Object Error

Hi,

what does the error:

TypeError: unsubscriptable object

mean?

I am taking in translation data from two objects,
a viewpoint and an model and I'm
trying to subtract to find a difference between
the two for a camera rig I'm working on.

I use viz.get(viz.POSITION)
to get the location of the elements and place them
in variables. I tried using the array type and then
I tried separating the individual translation components
into x, y, and z variables but I keep getting the same error.

Thanks
Reply With Quote
  #2  
Old 10-11-2006, 11:04 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The error means that the object you are trying to access is not a list. This is because viz.get(viz.POSITION) is not a valid command. If you are trying to get the position of the viewpoint try the following instead:
Code:
viz.get(viz.HEAD_POS)
For node objects you would do:
Code:
node.get(viz.POSITION)
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:05 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC