Sat, Aug 3, 11:11 PM CDT

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Aug 03 7:14 am)



Subject: Any python gurus around?


Fugazi1968 ( ) posted Sat, 17 November 2012 at 4:28 AM · edited Thu, 18 July 2024 at 3:24 PM

Hi Guys

I'm just looking into pythin scripting and have come up against a brick wall.

I've been working on setting up materials and have managed to create and attach nodes, but have so far been unable to work out how to set the value for Gradient_Mode on the root surface.

If anyone has any ideas you'd make me a very happy man indeed :)

Many thanks

John.

Fugazi (without the aid of a safety net)

https://www.facebook.com/Fugazi3D


Snarlygribbly ( ) posted Sat, 17 November 2012 at 5:01 AM

I don't have Poser available at the moment, but something like this should work

import poser
mat = poser.Scene().CurrentMaterial() # Or whatever ...
rootnode = mat.ShaderTree().Node(0)
mode = 2.0 # mode can be 1.0, 2.0 or 3.0
rootnode.InputByInternalName("Gradient_Mode").SetFloat(mode)
mat.ShaderTree().UpdatePreview()

 

 

Free stuff @ https://poser.cobrablade.net/


Fugazi1968 ( ) posted Sat, 17 November 2012 at 5:08 AM

Cheers Snarlygribbly, I shall give it a go and let you know :)

John.

Fugazi (without the aid of a safety net)

https://www.facebook.com/Fugazi3D


Fugazi1968 ( ) posted Sat, 17 November 2012 at 5:20 AM

Snarly you are a hero, worked first time.  I'd have never figured that one out :) 

Many thanks, for relieving my headache and putting a grin on my face.

John

 

Fugazi (without the aid of a safety net)

https://www.facebook.com/Fugazi3D


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.