WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 06-03-2014, 02:50 PM
Marco Marco is offline
Join Date: Apr 2014
Posts: 5
Weird confusion with node.visible() and node.alpha()

Hi everyone,

I got a mainscript controlling some subscripts. I'm changing in between my subscripts, controlled via my mainscript... having objects preloaded before... via resource contexts... viz.sendEvent(CHANGE_SCRIPT) to switch in between... and so on... cheers to masaki and paul this way

Everything seems to be working correctly there... no worries... really checked it several times!!! So this part shouldn't produce a problem!

Just recognized some strange things happening in one subscript using commands like node.visible() and node.alpha() in that specific script.

Via this subscripts I'm preloading an IVE-model, that I'm hiding from the scene until a function is called, making the model visible. That easy, normally.

Nothing is declared to do something with that model neither in my mainscript nor in any of the subs... except the one regarded, of course...

While using node.alpha(0) nothing is happening. My object is visible from the beginning. It seems to be ignored...
But using node.visible(0), the object will be hidden until the function will be called. Ok, here we go.

Moreon, as I'm trying to use viztask.waitTime(2) within that process, it just isn't scheduled... no error given to me...

Here's the rough version of what's going on in the subscript:

import viz
import vizact
import vizshape
import viztask


# Load stuff and make it invisible at the beginning

obj = viz.add('someObject.ive')

def someFunc():

# Fade in objects one by one
# fadeIn = vizact.fadeTo(1,begin=0,time=.5)

while True:

# yield viztask.waitTime(2)
# obj.add(fadeIn)

viz.callback(EVENT_EVENT, someFunc)

I'll provide more code for sure, if necessary. Did I miss something really stupid? What could provocate that? Thanks in advance guys!

Reply With Quote
Old 06-03-2014, 08:01 PM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,471
Can you post simple example code that can be run directly and reproduces the issue? Please use the code tags to preserve indentation.
Reply With Quote

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:10 AM.

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