PDA

View Full Version : Delete Visibility Track


Blue
09-07-2006, 06:18 PM
How can I delete the visibility track from an object?

_stev_
09-07-2006, 07:43 PM
Select object in the dopesheet. Tracks menu, Remove.

Stev

Blue
09-07-2006, 08:12 PM
Select object in the dopesheet. Tracks menu, Remove.

Stev
Ok so how do you do that with script smarty.

mustan9
09-07-2006, 08:26 PM
You could assign it a new controller, or try assigning it "undefined" (if that's possible?)

$mynode.visibility = bezier_float()

HalfVector
09-07-2006, 09:11 PM
Seems like you can't delete the visibility track from the Track View through MAXScript.

So I've created a MAXScript extension in C++ that exposes a function that just does that. Just copy the DelVisTrack.dlx file into your 3dsmax plug-ins directory and once in MAX, say you have a node named "Box01" with the Visibility track set. To remove it, you just write:

delVisTrack $Box01

If everything is ok, it will return true, else false.

It's not too much tested but seems to work fine.

Hope that helps!.

Blue
09-07-2006, 09:14 PM
Things I've tried:
$.visibility = undefined --sets the visibility value to -1
$.visibility.controller = undefined -- Type error: Assign needs controller, got: undefined
delete $.visibility -- No "delete" function for false
delete $.visibility.controller -- No "delete" function for Controller:Bezier_Float

Blue
09-07-2006, 09:17 PM
Seems like you can't delete the visibility track from the Track View through MAXScript.

So I've created a MAXScript extension in C++ that exposes a function that just does that. Just copy the DelVisTrack.dlx file into your 3dsmax plug-ins directory and once in MAX, say you have a node named "Box01" with the Visibility track set. To remove it, you just write:

delVisTrack $Box01

If everything is ok, it will return true, else false.

It's not too much tested but seems to work fine.

Hope that helps!.

Cool, that is what I thought about not being accessable via script, thanks for exposing this feature.

Blue
09-07-2006, 09:22 PM
Works like a champ, thanks.

HalfVector
09-07-2006, 10:09 PM
I'm glad it works!.

Here's the source code for this little plugin. The main functionality is in the file delvistrack.cpp. As you can see is really simple!.

Greets.

PD: you should change the output directory in the VC++ project properties to something that match your needs.

Blue
09-07-2006, 10:18 PM
Again the generosity and suport of the max community amazes me with its selflessness and willingness to make everyones max experience better.

Thanks again :)

HalfVector
09-07-2006, 10:23 PM
I thought some comments would be nice to understand the source code!. Also, I've changed the output directories to Debug/Release folders. Much better, I think. :)

davestewart
09-08-2006, 09:50 AM
Ola Jonathan!

Great work on that C++ extension. I do a lot of Max Scripting myself, and would love to get into myself at some point, but it looks like a steep learning curve.

Anyway - sorry to highjack the thread, but ... I've asked a C++ friend of a friend recently if she wouldn't mind having a look at something for me, but as she's not 3dsmax orientated, I woudn't be surprised if she passes on this one.

Basically it's an amend to the path controller, from "% along path" to "Distance along path". At the moment I'm using a list and script controller combination to achieve the same thing, which makes animating a lot easier; you can adjust the spline and the animation doesn't change.

I've scanned the path_cnstrnt.cpp and control.rc files in the SDK samples and it looks promising, but I wouldn't know where to start, or what to do if I did.

Is this something that's possible? And is it a trivial or a very difficult task?

If my friend isn't able to take this on, woudl yo ube interested in discussing this possibility of making amends? I'd be more than happy to trade skills; I also do a lot of web development work.

Thanks for reading!
All the best,
Dave Stewart

HalfVector
09-08-2006, 08:17 PM
Hi.

Well, I'm not that experienced with MAX SDK or MAX. Anyway, about the path constraint thing, I'm not sure it's an easy thing. For example, imagine you have multiple paths. The percentage value is valid for all paths (so you only need one percentage) but a distance is dependant of the path so I thing you'll need the same number of distances as paths are. And I guess that means a lot of changes in the source code. Much simpler would be if only one path exists. But I'm not sure about that.

Anyway I'll take a look at the source code.

Greets.

davestewart
09-09-2006, 09:25 AM
Hi Jonathon,

Well Rene is coming round on Tuesday to take a look. She souds quite excited by getting into the nuts and bolts of a 3D package!

I'll pass along your comments, and if you have any other insights before then, please feel fee to share them. Between the two (3?) of us we may well come up with something useful!

Thanks again,
Dave

davestewart
09-09-2006, 09:37 AM
For example, imagine you have multiple paths. The percentage value is valid for all paths (so you only need one percentage) but a distance is dependant of the path

You know, thinking about this ... perhaps not so. A distance parameter could also be attributable to more than one path. The weighting would still work as designed. If there were 2 paths, it's still just grabbing a 3D point along a path (distance or %) at a certain frame, and returning a point between the two, relative to the weighting.

However, if it did come down to having to use just the one path, I don't see this as such a bad thing. I don't think I've ever used more than one path, and for the vast majority of my work really don't see where I might.

Cheers again.
If you'd like to contact me by email, my address is in my public profile,
Cheers,
Dave

CGTalk Moderation
09-09-2006, 09:37 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.