Hi Rage, thanks for reaching us.
With regard to the issue mentioned and considering your non-Cinema background, first of all lets settle down a few concepts:
UVWTags are just acting as "storage" for the UVW data used on polygonal objects;
TextureTags are instead used to create the actual texturing on the on a generic object (whatever it's a polygonal or parametric one)
A parametric object can use a texture even without explicit an UVWTag since the TextureTag delivers all the information with regard on how to map a texture to the object.
When a parametric object (e.g. cube) is converted into a polygonal one the UVW values which are part of the parametric object gets dumped in the UVWTag that is generated as soon as the conversion ends.
That said give a certain object (a polygonal one) the way to go is:
def main():
# check that an object is selected
if op is None:
return
# get the active material
activeMat = doc.GetActiveMaterial()
if activeMat is None:
return
# instantiate a TextureTag
sph50NoTileTextureTag = c4d.TextureTag()
if sph50NoTileTextureTag is None:
return
# set the mapping type
sph50NoTileTextureTag[c4d.TEXTURETAG_PROJECTION] = c4d.TEXTURETAG_PROJECTION_SPHERICAL
# turn off tiling
sph50NoTileTextureTag[c4d.TEXTURETAG_TILE] = False
# scale the mapping to 50% on u and v
sph50NoTileTextureTag[c4d.TEXTURETAG_LENGTHX] = 0.5
sph50NoTileTextureTag[c4d.TEXTURETAG_LENGTHY] = 0.5
# link to the active material
sph50NoTileTextureTag[c4d.TEXTURETAG_MATERIAL] = activeMat
# generate the corresponding UVWTag using the mapping settings specific in the TextureTag
sph50NoTileUVWTag = c4d.utils.GenerateUVW(op, op.GetMg(), sph50NoTileTextureTag, op.GetMg())
# check for UVWtag being properly created
if sph50NoTileUVWTag is None:
return
# set the name of the tag
sph50NoTileUVWTag.SetName('0.5 non-tiled spherical')
# add both the UVWTag and the TextureTag
if op.GetTag(c4d.Tuvw) is None:
op.InsertTag(sph50NoTileUVWTag)
if op.GetTag(c4d.Ttexture) is None:
op.InsertTag(sph50NoTileTextureTag)
# notify Cinema about the changes
c4d.EventAdd()
Best, Riccardo