PDA

View Full Version : Silly Question - Syntax for connecting points (nodes) to Blobmesh compound?


SplitXRaven
04-04-2006, 02:10 PM
I guess my last thread just wasn't destined to survive, but I'm still having a boatload of trouble with MXS, and my project deadline is approaching...FAST. Perhaps if I'm a little luckier this time, someone might have an answer for me...? Please?

It's a simple one, too. Can someone give me a really short bit of code that shows how I could attach a point helper to a Blobmesh compound object in script? I've been looking at the reference (as I do often) but for some reason I still get errors that make me feel worthless.

Any help is appreciated. Thanks in advance.

rdg
04-04-2006, 02:38 PM
SplitXRaven,

here is a bit of code:

(
maxPoints = 20
b = blobmesh ()

for i = 1 to maxPoints do (
p = point pos:[random -20 20, random -20 20, random -20 20]
b.addBlob p
)
)

After looking at the reference I am a litte bit confused how to use the blobMeshOps Interface correctly. But using addBlob as a method of the blobMesh works ...

-- edit
b = blobmesh ()
bOps = b.blobMeshOps
p = point pos:[random -20 20, random -20 20, random -20 20]
bOps.addBlob p

-- end edit

Georg

SplitXRaven
04-05-2006, 04:00 AM
Thanks. I'll try it in a few hours when I get back to my studio. I do remember trying something similar to the first chunk of code you gave me, but I was still having issues...it's probably just me. I'm also unfamiliar with BlobMeshOps as well, but if I don't end up needing to use it, then I'll be alright.

Thanks again.

CGTalk Moderation
04-05-2006, 04:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.