I am working on a script that needs to copy materials from one SU model to another empty one. I am currently having trouble getting textures that are copied to have the same scale as the original. The copied texture’s dimensions are tiny compared to the original.
I have found the function SUTextureGetDimensions (SUTextureRef texture, size_t *width, size_t *height, double *s_scale, double *t_scale) which allows me to get the scale (I think) of material, but I have no way of setting it for a material (No SUTextureGetDimensions() );
Note that I am not trying to apply this texture to a face - I just want to make sure the default scale of the material is like the original.
This doesn’t make sense. I think you meant (with corrections in emboldened italics) ?
I have found the function SUTextureGetDimensions (SUTextureRef texture, size_t *width, size_t *height, double *s_scale, double *t_scale) which allows me to get the scale (I think) of a texture, but I have no way of setting it for a texture (No SUTextureSetDimensions() );
I myself, also see that there is no SUTextureSetDimensions() function.
Seems like a C API request needs to be filed.
Did this …
It looks like your only current workaround will be the temporary file route.
Get the “old” texture’s metrics for later use (as you’ve been doing.)