WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-07-2006, 07:59 AM
spacefarer spacefarer is offline
Member
 
Join Date: Dec 2004
Location: Cambridge, MA
Posts: 17
<node3d>.spinto ?

I used <node3d>.spinto command before but I don't see it in R3. In the VizHelp, I found a missing link to <node3d>.spinto on the <vizact>.spinto page. Is the command just missing or are you going to eliminate it in R3? Thanks!
Reply With Quote
  #2  
Old 07-07-2006, 09:42 AM
halley halley is offline
Member
 
Join Date: Oct 2005
Posts: 27
I've seen a number of links in the help files are broken, this may just be part of that issue. I expect they'll re-index the help files as a part of wrapping up for the release.

It's definitely still there, my scripts haven't broken. Any time you're curious about what exists, and what doesn't, you can READ the source code in the python/viz.py file which is included. Now, the help file is PREFERABLE in most cases, but there are some cases where the source is really useful for double-checking things. In this case, search for "class VizNode" and then search below that for "def spinto". Voila.
__________________
--
[ e d h a l l e y ]
I'm just a user, not a representative of WorldViz. Hope I've been helpful.
Reply With Quote
  #3  
Old 07-07-2006, 11:23 AM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
In Vizard 3, we would like to move away from functions that hide the action interface. So instead of calling myNode.spinto() or myView.goto(), you would call myNode.addAction( vizact.spinto() ) or myView.addAction( vizact.goto() ).

However, we will keep the shortcut functions for backwards compatibility.
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
  #4  
Old 07-07-2006, 11:29 AM
spacefarer spacefarer is offline
Member
 
Join Date: Dec 2004
Location: Cambridge, MA
Posts: 17
Thanks. I used the command as a trigger to the next event, but it didn't work in R3. That's why I thought there might be some change in the command. Anyway, according to the warning, the command will be deprecated in future versions of Vizard and vizact.spinto should be used instead.
Reply With Quote
  #5  
Old 07-10-2006, 06:58 AM
halley halley is offline
Member
 
Join Date: Oct 2005
Posts: 27
Quote:
Originally Posted by Gladsomebeast
However, we will keep the shortcut functions for backwards compatibility.
I do recommend that the python/*.py files include comments when this is the case. For example:

Code:
class vizbang:

    # deprecated: please use vizbang.addAction(vizact.spinto()) instead
    def spinto:
        pass
While I agree that 95% of the users will stick to the help files, the openness of the python code is what attracted me and my colleagues to pick Vizard. It allows for working around the rare broken or not-quite-complete-enough help files, along with all the other benefits of the python platform.
__________________
--
[ e d h a l l e y ]
I'm just a user, not a representative of WorldViz. Hope I've been helpful.
Reply With Quote
  #6  
Old 07-10-2006, 10:15 AM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
Agreed! Source code is the ultimate program documentation.

What do you think of having documentation text above every function? Would this be useful to you, or would it clutter the .py file to much?
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
  #7  
Old 07-11-2006, 07:20 AM
halley halley is offline
Member
 
Join Date: Oct 2005
Posts: 27
I mentioned to farshizzo once before that there were many functions that did not have docstrings. My own opinion is that anything that is not intended for outside callers should have a brief comment (deprecated, internal helper function, etc.), and anything that is intended for outside callers should have a complete and useful python docstring. Even if almost nobody using Vizard knows the python help() command, it will still be there in the *.py files to read.

There's some extra work involved in good docstrings; a one-liner is not usually sufficient. However, you might find a way to automatically include the docstrings into the online help files as a preface to any additional detail there.
__________________
--
[ e d h a l l e y ]
I'm just a user, not a representative of WorldViz. Hope I've been helpful.
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 04:10 PM.


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