WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-03-2014, 02:50 PM
Marco Marco is offline
Member
 
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

viz.setMultiSample(8)
viz.fov(60)
viz.go(viz.FULLSCREEN)

# Load stuff and make it invisible at the beginning

obj = viz.add('someObject.ive')
obj.visible(0)
#obj.alpha(0)

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)
obj.visible(1)

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!

Marco
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 01:11 AM.


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