Forum: Poser 12


Subject: Another tool for Poser 12

Y-Phil opened this issue on May 13, 2021 ยท 7 posts


Y-Phil posted Fri, 14 May 2021 at 3:51 PM

Cycles is great, while setting the material up if you like to experiment and test, and for the final result. But when it's used while posing a character, or setiing up the lighting is really, it's really not cool, and sometimes difficult...

That's the reason why I keep for each part a PoserSurface node, to which is connected an "ezskinned" version of the current character, while the CycleSurface is connected to its own "world".

And to set the scene up, I check the PoserSurface' "Superfly Root" checkmark for each part. Then, when I want to do a render, I check the corresponding CycleSurface checkmark.

But not manually ?... With this script:

def update_renderer(mat_layer, choice):
    tree = mat_layer.ShaderTree()
    nodes = tree.Nodes()
    
    for node in nodes:
        if not node.IsRoot():
            continue
        if node.Type() == choice:
            tree.SetRendererRootNode(poser.kRenderEngineCodeSUPERFLY, node)
            break

    tree.UpdatePreview()

def switch_renderer(fig):
    if not fig:
        poser.DialogSimple.MessageBox("Please select a figure...")
        return

    list = ['Poser/Physical Surface', 'Cycles']
    choice = poser.DialogSimple.AskMenu("Change Superfly's Surface Node", "Select...", list)
    if not choice:
        return
    choice = 'CyclesSurface' if choice == list[1] else 'poser'

    try:
        for mat in fig.Materials():
            for mat_layer in mat.Layers():
                update_renderer(mat_layer, choice)
            
    except Exception as e:
        poser.DialogSimple.MessageBox(str(e))

scene = poser.Scene()

try:
    figure = scene.CurrentActor()
    if figure.IsBodyPart():
        figure = figure.ItsFigure()
    elif not figure.IsProp() and not figure.IsHairProp():
        figure = scene.CurrentFigure()
except:
    figure = None

switch_renderer(figure)

๐’ซ๐’ฝ๐“Ž๐“


(ใฃโ—”โ—กโ—”)ใฃ

๐Ÿ‘ฟ 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 โค๏ธ