← All ideas
  • Published 29 Oct 2019

Remove Clamp for Array Modifier UV Offset

Currently, the UV Offset in the Array Modifier is locked to [-1,1]. While that makes sense for the slider it might be nice to be able to type in higher/smaller values manually (If you do right now it clamps back to those values). I encountered this limitation while making road game assets (each array element is already longer than 1 UV section), where I don't have the option to simply increase my texture size. It should be possible to get around this by moving it by the remainder of the distance I actually need. Though I don't see why it shouldn't be an option to use the faster approach.

I hope this should be easy enough to fix.

66.7%

Development Status: Open

Upvote 2 Downvote 1
01mezaka
29 Oct 2019

2 Comments

zuorion

Yeap, it is easy change. But i don't see the point of moving something beyond 1 UV unit. After 1 uv everything repeats¹. Moving by 1.5 almost equals to moving by 0.5.

prop = RNA_def_property(srna, "offset_u", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "uv_offset[0]");
RNA_def_property_range(prop, -1, 1);
RNA_def_property_ui_range(prop, -1, 1, 2, 4);
RNA_def_property_ui_text(prop, "U Offset", "Amount to offset array UVs on the U axis");
RNA_def_property_update(prop, 0, "rna_Modifier_update");

If You can compile Blender Yourself, just remove „_RNA_def_property_range(prop, -1, 1);_‟ lines of offset_u and offset_v in source/blender/makesrna/intern/rna_modifier.c

2
Josephbburg

Probably as easy as changing a number on a single line of code for each limit.