Previous Thread  Next Thread

chat icon Python Woes

emaurina

Posted: Sat Nov 16, 2002 3:10 am
Joined: 16 Nov 2002
Posts: 2
Hi,

I'm hoping a Blender guru will see this and take pity on me. I've got Blender 2.25 and Python 2.20 installed. I've got The Official Blender 2.0 guide and have been following the lessons (I have The Blender Bood tranlated to english also). Anyway, I'm trying to run the first python example and it just doesn't do anything.

import Blender
if (Blender.bylink):
obj = Blender.link
if(obj.LocZ<0.0): obj.LocZ = 0.0

Then I create a sphere, link the script to the object and then try to move the object. It moves in all dimensions w/o being stopped like it is supposed to. Can anyone give me a clue as to how to get these scripts working? BTW, the DOS (using Blender for windows and running Win2000) window shows no erros.

Also, going into the text window and typing:

import sys
print sys.path

and then pressing ALTP works. Argh!!! Frustrated. Evil or Very Mad

Also, I've made more complicated scripts like vertex export work, but for some reason this simple script doesn't work. I would really love to see it working and to know what I'M DOING WRONG (likely) so I can better learn this awesome tool. Confused

Please help if you can
Reply with quote


markluffel

Posted: Sun Nov 17, 2002 1:50 am
Joined: 19 Oct 2002
Posts: 13
Go to your script-buttons tab of the button window. Click the axes in the window bar - this activates object driven scripts.
Select your object then click the "new" button on the left, drag the dropdown menu to Redraw and type the name of your script in the text box.

This is probably not the best place to ask usage questions. Try http://www.elysiun.com/
Reply with quote


emaurina

Posted: Sun Nov 17, 2002 8:49 pm
Joined: 16 Nov 2002
Posts: 2
Thanks! I'm still confused as to why there are two script windows (left and right), but I'll continue to study and hopefully it will become clear. Once I did that though, it worked. So, thanks again.
Reply with quote


theeth

Posted: Mon Nov 18, 2002 4:40 am
Joined: 16 Oct 2002
Posts: 1177
the script buttons on the right are global scene links while those on the left are object links.

Martin
_________________
Life is what happens to you when you're busy making other plans.
- John Lennon
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group