ScriptSpot

Forum topic · General Scripting

Need help with Path Contrain....

By superhoha · 2013-09-11

Description

Hello:)

Im writing to ask about a problem I seems can't figure out....

I have a small script to make turntable ... you can find it here

http://www.scriptspot.com/3ds-max/scripts/hoha-superiorturntable-camera

It works as I expected. What it does is that it make the splines, create camera, make path constrain to the splines, and animation of weight and percentage.

The problem here is, when I save the file, and open it again... most of the path added disappeared... Means, if there are 5 paths added to path constrain, when I reopen the file, there is only 1 left.... I do not know how it happen, and why....

Please if you are so kind, can you have a look at the script and the problem, and see what is wrong with it... I think it is because of the script. Since I try to do the samething manually, then it save properly...

Can't understand What I did wrongly... It is irritating a lot...

Thanks a lot.

Comments (8)

!!

superhoha · 2013-09-12

Well it does now... Something is really wrong with my computer... or my head...

Thanks Budi G!

superhoha · 2013-09-12

Without this " pc.path = Array_Circle[1]" it doesn't run properly.
I'm tryting to figure a way around...

Hi superhoha ...After

Budi G · 2013-09-12

Hi superhoha ...

After removing "pc.path = Array_Circle [1]",
did you change a looping command ?

as I said earlier, such as :


for i = 1 to sTotal do -- just change i=2 become i=1
(
  pc.appendTarget Array_Circle[i] 0
)

If you are still confused, I upload your scripts.
I edited your code a bit.
this script has been working properly to me

Attachments

superhoha · 2013-09-12

@Barigazy

:) I just test your code :) seems it doesn't run properly. :(

Thanks A LOT !!!!!

superhoha · 2013-09-12

@ Budi G : Thank you a lot!!!! It is wierd it happend bc of that.... We don't know why? ... Anyway really thanks a lot for figure that out...

@Barizagy: Thanks for your work on my code :) I will put your name there ^^
I have some questions to ask thought:

1./ I dont really understand this...:
pc = TurnCamStandard[3][1].track = Path_Constraint()

Can you explain to me?

2./ What is the difference between "undo on" and "with undo on" ?

Thanks a bunch Bazigary :)

Budi G · 2013-09-11

There is something wrong in 'pc.path ()' function, I don't know how..

a snipet from your scripts:


pc=Path_Constraint ()
TurnCamVray.pos.controller = pc
pc.path = Array_Circle[1] -- Remove this, it's make some bugs or something
							
for i = 2 to sTotal do
(
  pc.appendTarget Array_Circle[i] 0
)

Try to remove this, it's make some bugs or something

pc.path = Array_Circle[1]

then try to make a normal looping

such as :


pc=Path_Constraint ()
TurnCamVray.pos.controller = pc
							
for i = 1 to sTotal do
(
  pc.appendTarget Array_Circle[i] 0
)

barigazy · 2013-09-11

Yup. Budi G is right.
I organized your code a bit.
Also U can use CustAttribute to store all nodes of Path Constraint, attached on same constraint. Then you can make a fn to restore all nodes ei. targets back.

Attachments