Grab Texture Maps For Genesis 2 - Genesis 1 [SOLVED]

Dimension-ZDimension-Z Posts: 352

Hi to all

I have managed to apply one map assigned to one variable (for instance diffuse color) to another variable (translucency color) by a script for Genesis 3 figure.

But unfortunately the same script doesn't work with Genesis 2 & Genesis 1. I have edited properly the script for the older figures, but it gaves me this error:

TypeError: Result of expression 'oProperty' [null] is not an object.

Any idea what I could use?
Thanks in advance for any help!

Post edited by Dimension-Z on

Comments

  • Richard HaseltineRichard Haseltine Posts: 100,871
    edited September 2016

    Are you checking that oProperty (which I assume is the result of a findProperty( name ) call or the like) was indeed successfully obtained?

    Post edited by Richard Haseltine on
  • Are you checking that oProperty (which I assume is the result of a findProperty( name ) call or the like) was indeed successfully obtained?

    Thank you very much for your answer Richard, I finally solved all my problems. It works perfect now with Genesis 3, 2, 1. Thnx again!

  • What I'd like to know is what script I need to include or back-end into a shader so that it does it automatically, thus:

    // This may or may not function as live code.// Caveat Emptor.IF (Color1 = "") //There is no 'Color1' in object's current shader.{     Color1==Color2}ELSE (Color1==Color1) //If it's a value already defined, let it copy over directly.

     

  • I'm not sure you can use a simple equality test with color - you can't with soem other complex properties. Instead you might need a custom compare ( colour1 , colour2 ) function which would match the composite colour values one-by-one.

Sign In or Register to comment.