Need help with Path Contrain....

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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
superhoha's picture

!!

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

Thanks Budi G!

superhoha's picture

Without this " pc.path =

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

Budi G's picture

Hi superhoha ...After

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

AttachmentSize
hoha_superiorturntable_camera_v1.0_bg.ms 8.12 KB
superhoha's picture

@Barigazy :) I just test your

@Barigazy

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

superhoha's picture

Thanks A LOT !!!!!

@ 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 :)

barigazy's picture

...

1)At the same time I assign controller to camera and place it in "pc" variable
http://www.scriptspot.com/forums/3ds-max/general-scripting/copy-and-past...
2) is the same

bga

Budi G's picture

There is something wrong in

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's picture

...

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.

AttachmentSize
hoha_superiorturntable_camera_v1.0.ms 7.03 KB

bga

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.