4 posts / 0 new
Last post
arvinmoses
Offline
Last seen: 4 years 1 month ago
Joined: 05/19/2014 - 15:55
Some Starter Questions

I came across k3d several years ago. I looked at it briefly and moved on to other software. Recently I've been wanting a more procedural workflow in my software and came back to try it out and realized how elegant the design is. It's almost like a mini houdini.

That being said I do have some questions... Right now from what I can see node connection is pretty linear. Like if I connect a ...

Holy cow... you can connect nodes to the edge painter...

Okay.. um..
Is there a way to add math to connections? So maybe something like extrude.inset = extrude.distance * 2?

Further more is there a way to typecast the connections? So maybe something along the lines of extrude.distance = convertToFloat(extrude.segments)?

I'm really interested in the software. It's fun to experiment with and get instant results. Hope you continue development.

Thanks for any help.

Arvin

Bart Janssens
Offline
Last seen: 2 months 3 weeks ago
Joined: 12/22/2012 - 11:08
Hi Arvin,

Hi Arvin,

Thanks for your comments, and sorry for my late reply. Both your examples can be accomplished:
- For the inset calculation: Use Create->Double->DoubleExpression. On the new node, add a Scalar property called distance using the red + and then in the expression put distance*2. Next connect the distance property you created to the distance of extrude, and in extrude connect inset to the Output of DoubleExpression
- For the conversion, this is most easily done using a script (Create->Script->DoubleSourceScript). You can add a property (Integer type) named segments, and refer to it from python using context.node.segments. The full script I used goes like this:

context.output = float(context.node.segments)

Then connect properties as before.

Edit: file uploads are working again, I attached the files.

Cheers,

Bart

Attachments: 

arvinmoses
Offline
Last seen: 4 years 1 month ago
Joined: 05/19/2014 - 15:55
Thanks Bart. Sorry for the

Thanks Bart. Sorry for the delay. Busy week. I'll try those out and repost

Bart Janssens
Offline
Last seen: 2 months 3 weeks ago
Joined: 12/22/2012 - 11:08
Sure, no problem. I've edited

Sure, no problem. I've edited my original reply to include the attachments now.

Cheers,

Bart

Log in or register to post comments