how to store and call an xpresso variable ?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Display Modes
  12 December 2006
how to store and call an xpresso variable ?

hey there

i have tryied to find any info on storing a variable to then calling it to use in an expression.

for example how would i take data generated from a user slider ( integer ) storing that number as a variable and then calling that variable into several input nodes at once.

this object is prepared by the user data will then be instanced using mograph

i have been thru plug-in cafe and found some info which makes me think i may need to make a coffee node and use an object ID to do this right in terms of making it solid for c4ds other functions like motionblur as this object will be instanced using mograph - is this true ?

hmmm, any thoughts appreciated - once i used to code a bit of Flash so i would normally think just calling a global variable would be enough . . .

cheers

pedro
__________________
R17 studio |
http://www.studiolocal.tv/


>. our film is complete ! check it out here. . .

http://www.twentyonepoints.com/

Last edited by robotbob : 12 December 2006 at 03:17 PM.
 
  12 December 2006
nor sure what you specifically have in mind:
you can make a userdata: link type , put a dummy object in it as it works only if there is an object linked, then use the userdata to reference in your expresso-setup-- when you drop a different objet in the link, it will then be used in the expresso---

works of course with a slider as well--
if you want to store a varibale (like a position of obect X at frame y) then you can use the Memory operator.

Or you can crate variables in a Coffeenode and use those, if you like to write code--

Cannot comment abou MoGraph as its the modul I dont own.

Olli
__________________



Last edited by wuensch : 12 December 2006 at 04:02 PM.
 
  12 December 2006
thanks olli

i dont need to link an object to this set-up. its just access to a data variable i am after.

i have tried the memory node but with no joy as want to use it as a simple output port i can feed directly into the required input port.

otherwise i have a nasty looking spidersweb of xpresso wires to nodes. my goal is really to keep things tidy.

so if i could create a data node which would call the variable set buy the user slider i could patch that directly to each input port and not have a dozen or so wires stretching back to the same math output node.

i guess it would be similar to the getdata node in TP

hmmm. .

so if it has to be done in coffee i need to pull the result from my last math node ( calculated from user data ) and put that result into a variable that i would be able to pass to multiple input ports. i would prefer to do this in xpresso if possible to save me trying to find, and then work out the coffee documents.

pedro
__________________
R17 studio |
http://www.studiolocal.tv/


>. our film is complete ! check it out here. . .

http://www.twentyonepoints.com/

Last edited by robotbob : 12 December 2006 at 04:17 PM.
 
  12 December 2006
Hey pedro - it's almost certainly not the most elegant way of doing things, but I've used Nulls for this sort of thing in the past, just make them invisible and store data in the position x,y,z values, or of course h,p,b would do just as well as they're just numbers. Then as long as your xpressions are evaluated in the right order everything can be read back off these values.

Seeyou - C
__________________
Behance | Twitter
- - - - - -

Last edited by ChrisCousins : 12 December 2006 at 04:26 PM.
 
  12 December 2006
hey chris

that is a brilliant sollution.

thanks alot

pedro
__________________
R17 studio |
http://www.studiolocal.tv/


>. our film is complete ! check it out here. . .

http://www.twentyonepoints.com/
 
  12 December 2006
Now I see what you are after---

I am a bit unconcetrated at the moment, but I fail to see what the advantage of using a nulls x value over using a userdata are--

in both setups you will have the same Expresso (if you dont want spiderweb, you will need several expresso-nodes of the object with the userdata-- just like with the Null)--
Olli
__________________


 
  12 December 2006
yes i think i have done this olli ( if i too understand what you have written as i too am a little fried )

- instead of tageting the math result to the x or y position i tageted it to a user data port which had the added advantage that i had a quick way to read the results of the calculations in one place.

also the ports are named correctly so you can read what is going on.

if i dont do it like this - i will open this file in a month or so it will be virtually impossible for me to figure it out.

i would however like to do this sort of thing with coffee one day as it would be much much easier still i am sure.

thanks for your help

pedro
__________________
R17 studio |
http://www.studiolocal.tv/


>. our film is complete ! check it out here. . .

http://www.twentyonepoints.com/
 
  12 December 2006
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share 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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 11:54 AM.


Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.