Announcement

Collapse
No announcement yet.

Maxscript Vray What does it all mean?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Recursion is one of the fundamental concepts of programming, so nothing dangerous there You just have to be careful to have a terminating condition when the recursion must stop.

    For the forum messages formatting, you can use tags enclosed in brackets, like [ b ] some text [ /b ] for bold, [ code ] and [ /code ] for a block of code etc. There should not be intervals inside the brackets, I just added them so that you can see the codes.

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment


    • #17
      Originally posted by vlado View Post
      Recursion is one of the fundamental concepts of programming, so nothing dangerous there You just have to be careful to have a terminating condition when the recursion must stop.
      Couldn't help but have a genuine laugh at this.
      I DO know something about recursion, and also know something about MISSING terminating conditions too.
      Lele
      Trouble Stirrer in RnD @ Chaos
      ----------------------
      emanuele.lecchi@chaos.com

      Disclaimer:
      The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

      Comment


      • #18
        Originally posted by ^Lele^ View Post
        Couldn't help but have a genuine laugh at this.
        I DO know something about recursion, and also know something about MISSING terminating conditions too.
        There's always task manager...
        Eric Boer
        Dev

        Comment


        • #19
          thanks for that format help Vlado, I also discovered by accident that if you click on the [IMG] button at the bottom it gives you a list of the VBcode legal to use.

          So here is another attempt at posting the code in a formatted and "READABLE" fashion
          Code:
          /*
          collect from a series of nested mix maps specific values and write them to a text file
          */
          
          global indxmk = 1 --index counter for the 1st dimension of a 2d array used below = p
          
          fn CollectMIXValues t =
          	(
          	if t != undefined do 
          		(
          		if (classof t == BitmapTexture) then 
          				(
          				-- set the bitmap file name here
          				-- bitmap is not needed as that is set later with another function
          				) else if (classof t == Mix) do 
          					(
          					-- make array (p) with values at each level
          					p[indxmk]= #(t.color2 , t.mask.output.output_amount , t.mask.filename, t.name)
          					indxmk += 1 --iterate
          					setFile t.map1 -- recurse into the mix map by parseing the current map, submap 1 of it
          					)
          		)
          	)
          
          CollectMIXValues (meditmaterials[11])
          print p
          I discovered, to my horror, that file reading and writing isn't quite as simple as I thought it was going to be.
          And as for endless loops - there's always the power button and the door to the outside world...it exists! apparently.
          Raj

          Comment

          Working...
          X