Y-Phil opened this issue on May 02, 2021 ยท 13 posts
Y-Phil posted Mon, 03 May 2021 at 6:18 AM
Small update: this version displays the current value:
def set_background_angle(angle):
bk_shader = poser.Scene().BackgroundShaderTree()
for node in bk_shader.Nodes():
if node.Type() == 'ccl_Mapping':
node.InputByInternalName('Rotation').SetColor(0.0, angle, 0.0)
bk_shader.UpdatePreview()
def get_background_angle():
bk_shader = poser.Scene().BackgroundShaderTree()
node = [n for n in bk_shader.Nodes() if n.Type() == 'ccl_Mapping']
if not node:
return None
values = node[0].InputByInternalName('Rotation').Value()
return values[1] if isinstance(values, tuple) else None
msg = "Enter the Vertical Rotation (rad)"
curr_val = get_background_angle()
if curr_val:
msg = "{}nActually: {}".format(msg, curr_val)
val = poser.DialogSimple.AskFloat(msg)
if val != None:
set_background_angle(val)
Actually, the Poser function asks for a float. To be able to respond to hborre's query, I will search, at the end of may day job, for a function that let us enter a string of characters, instead... ?
๐ซ๐ฝ๐๐
(ใฃโโกโ)ใฃ
๐ฟ Win11 on i9-13900K@5GHz, 64GB, RoG Strix B760F Gamng, Asus Tuf Gaming RTX 4070 OC Edition, 1 TB SSD, 6+4+8TB HD
๐ฟ Mac Mini M2, Sequoia 15.2, 16GB, 500GB SSD
๐ฟ Nas 10TB
๐ฟ Poser 13 and soon 14 โค๏ธ