Default values for a PROTO? 
Author Message
 Default values for a PROTO?

Hi,

I'd like to be able to set defaults values for a PROTO without using
DEF/USE, possibly with another proto.  I'd like to be able to do
something like this:

myProtoDefaults {
  text "default text"
  children [
    myProto {}
    myProto {text "local text"}
  ]

Quote:
}

Whenever text is not passed in through myProto it uses the value passed
in from myProtoDefaults.  I want to be able to group together similar
instances of myProto that will have the same text or whatever.  What
would PROTO myProtoDefaults look like?

Thanks,

--
Robert Lipman                  
National Institute of Standards and Technology (NIST)
Building and Fire Research Laboratory
Computer-Integrated Construction Group
100 Bureau Drive, Stop 8630
Gaithersburg, Maryland  20899-8630


http://www.*-*-*.com/



Sun, 22 Jul 2001 03:00:00 GMT  
 Default values for a PROTO?

Robert,

exposedField and field in PROTOs both take default values.  It would
provide the same value for all instances of the PROTO.  If you want a more
dynamic version of defaults, you will need to use a Script node.


        Information Visualization Specialist & vrml Educator
        Daly Realism - Internet Solutions (http://www.realism.com)

Treasurer, LA VR User's Group:                        http://lavug.org/

Quote:

> Hi,

> I'd like to be able to set defaults values for a PROTO without using
> DEF/USE, possibly with another proto.  I'd like to be able to do
> something like this:

> myProtoDefaults {
>   text "default text"
>   children [
>     myProto {}
>     myProto {text "local text"}
>   ]
> }

> Whenever text is not passed in through myProto it uses the value passed
> in from myProtoDefaults.  I want to be able to group together similar
> instances of myProto that will have the same text or whatever.  What
> would PROTO myProtoDefaults look like?

> Thanks,

> --
> Robert Lipman
> National Institute of Standards and Technology (NIST)
> Building and Fire Research Laboratory
> Computer-Integrated Construction Group
> 100 Bureau Drive, Stop 8630
> Gaithersburg, Maryland  20899-8630


> http://math.nist.gov/mcsd/Staff/RLipman/vrml/vrml.html

  vcard.vcf
< 1K Download


Mon, 23 Jul 2001 03:00:00 GMT  
 Default values for a PROTO?
You can see an example of what I mean at
http://math.nist.gov/mcsd/Staff/RLipman/vrml/ecs.wrl

This example uses my Beam PROTO.  One of the parameters is 'txt'
(user-defined text).  I don't want to keep on repeating the text
parameter when it is the same for a large group of Beams.  I'd like to
be able to group a bunch of Beams and say here is what txt will be for
that group.  Then set txt differently for another set of beams.

Bob

Quote:

> exposedField and field in PROTOs both take default values.  It would
> provide the same value for all instances of the PROTO.  If you want a more
> dynamic version of defaults, you will need to use a Script node.

> > I'd like to be able to set defaults values for a PROTO without using
> > DEF/USE, possibly with another proto.  I'd like to be able to do
> > something like this:

> > myProtoDefaults {
> >   text "default text"
> >   children [
> >     myProto {}
> >     myProto {text "local text"}
> >   ]
> > }

> > Whenever text is not passed in through myProto it uses the value passed
> > in from myProtoDefaults.  I want to be able to group together similar
> > instances of myProto that will have the same text or whatever.  What
> > would PROTO myProtoDefaults look like?



Mon, 23 Jul 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. PROTO appearance exposedField default value

2. C4 - Autoincrementing default values for multi-valued template symbols

3. how can i force an instance of a PROTO to provide a field value

4. Passing A value from one PROTO to another

5. PROTO, Scripts and Initial Values Problem

6. Beam PROTO for steel structures (PROTO memory problems)

7. Please Stop defaulting to first value. (C5EEB)

8. default value - edit in place

9. Define default value for List Box

10. GetINI default value

11. ROUNDING values to 2 Decimals By default

12. saving dialog default values with requirements

 

 
Powered by phpBB® Forum Software