Coding Problem

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
aligorith
Posts: 0
Joined: Sun Dec 05, 2004 3:40 am
Location: Chch, NZ

Coding Problem

Post by aligorith »

Greetings to you all,

I was wondering how to go to a new frame and insert a keyframe for an object using Python? using :

Code: Select all

 set.('curframe', 5)

makes Blender display an error. What am I doing wrong??

aligorith

an-toni
Posts: 0
Joined: Wed Mar 17, 2004 5:20 pm

Post by an-toni »

how did you come up with that? it's invalid Python syntax.

probably the user community forums i.e. Elysiun would help.

~Toni

KDR_11k
Posts: 2
Joined: Tue Feb 10, 2004 8:06 pm

Post by KDR_11k »

set.() wont work, you'd try accessing a function called "" (null string) in an object called "set".
You need to call Blender.set('curframe',5). Or you could just write set('curframe',5) (note: no period) if you have imported * from Blender which I wouldn't recommend (importing functions and variables into your root namespace is generally not recommended).

aligorith
Posts: 0
Joined: Sun Dec 05, 2004 3:40 am
Location: Chch, NZ

Post by aligorith »

Well, thanks for pointing that out. I've just started using Python, so mistakes are common.

By the way, how do I set keyframes for Actions and IPOs?

Aligorith

Post Reply