Bug in ApplyUvwTransform?


#1

Hi there,

Attached is a file created with Rhino 5. Just a simple box with the default stripe material applied. ApplyUvwTransform returns false, but the UvwTransform seems to be used in the viewport. It returns true after I change the values.

I have noticed that the same file works OK when opened with Rhino 6. Can you confirm that the bug is fixed in Rhino 6? And what about any possible updates for Rhino 5?

Thanks,
Simon Weinberger


#2

ApplyUvwTransform.3dm (34.7 KB)

sorry, forgot the file


#4

Who can say something related to that topic?


(Andrew le Bihan) #6

I guess it returns true because of this:

/// <summary>
/// If true then the UVW transform is applied to the texture
/// otherwise the UVW transform is ignored.
/// </summary>
public bool ApplyUvwTransform
{
  get
  {
    // OBSOLETE - always true
    bool value = true;
    return value;
  }
  set
  {
    // OBSOLETE - always true
  }
}

(Andrew le Bihan) #7

I suspect this feature was always broken in earlier releases, and now UVW transforms are always applied.


#8

OK, I can see that the real implementation was changed to “return true” in Rhino 6.

But what can I do for customers still using Rhino 5? Is it safe to assume “true” and always use the UvwTransform property without querying ApplyUvwTransform? Don’t want to remove the “if” and breaking other users’ models.


(Andrew le Bihan) #9

Simon

The behavior of Rhino 5 is not going to change in any way, so if you are writing a renderer that has to use this value, and you want to make it work the same as the display, then you should just copy the way the display seems to work…

…which is to ignore the value.

  • Andy