Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Blender and Python[solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
leonglass
Apprentice
Apprentice


Joined: 08 Aug 2006
Posts: 278

PostPosted: Mon Jan 01, 2007 7:54 pm    Post subject: Blender and Python[solved] Reply with quote

Not sure if this is the right forum so apologies if not. I have Blender 2.4.1-r1 and Python 2.4.3-r4 installed but when I access the scripts menu none are displayed. Can anyone tell me where and how to fix this. I have searched through the Blender site but can't find any documentation as to how to manually set this up. I believe there should have been a number of scripts installed with Blender but I can't find them.

Last edited by leonglass on Thu Jan 04, 2007 10:13 pm; edited 1 time in total
Back to top
View user's profile Send private message
pteppic
l33t
l33t


Joined: 28 Nov 2005
Posts: 781

PostPosted: Mon Jan 01, 2007 8:07 pm    Post subject: Reply with quote

They should be in /usr/share/blender/scripts. Either symlink this to ~/.blender/scripts, or if you plan to add/write some of your own, set it as the 'Python: ' in 'File Paths'.
Once you've done either run 'Update Menus' from the top of the scripts windows 'Scripts' menu.
Back to top
View user's profile Send private message
leonglass
Apprentice
Apprentice


Joined: 08 Aug 2006
Posts: 278

PostPosted: Mon Jan 01, 2007 8:11 pm    Post subject: Reply with quote

I have just checked and I don't have either of those directories. Should they have been created as part of the install and is it ok to create them now. Could they be anywhere else as my settings are saved so I must have a .blender dir somewhere.
Back to top
View user's profile Send private message
leonglass
Apprentice
Apprentice


Joined: 08 Aug 2006
Posts: 278

PostPosted: Mon Jan 01, 2007 8:23 pm    Post subject: Reply with quote

Thanks for responding so quickly. I found them I did an equery list blender and this showed me that they were in /usr/lib64/blender/scripts. I added this path in the file paths section and did update menus and now I have them and I tried the export 3ds script and it seems to be working. I mean I got the file but I don't have 3ds to check it is correct.(sure it is) But I tried the "Scripts > System > Interactive" Console and recieved a "Python Script Error: Check Console" Which Stated
Quote:

AttributeError: 'NoneType' object has no attribute 'endswith'
Traceback (most recent call last):
File: "<string>", line 785, in ?


It should be ok as I have Python installed. Are there any other file paths to set relating to python.

Does this mean that if I create any of my own scripts I have to add them to this folder. Also where do you think my .blender dir is I thought I had to have one to save my settings seperately from blenders system settings.
Back to top
View user's profile Send private message
leonglass
Apprentice
Apprentice


Joined: 08 Aug 2006
Posts: 278

PostPosted: Tue Jan 02, 2007 4:42 pm    Post subject: Reply with quote

Ok I am quite close now. Can any of you tell me where to set my PYTHONPATH variable. I have searched around and found some howto on installing Python and currently my PYTHONPATH is set to /usr/lib/portage/pym. I need to set it to the output of sys.path executed from within the interpreter. The instructions I found said put this in .bashrc but I don't seem to have this file. Which other file should I place this so that PYTHONPATH is set each time I log on.
Back to top
View user's profile Send private message
pteppic
l33t
l33t


Joined: 28 Nov 2005
Posts: 781

PostPosted: Tue Jan 02, 2007 5:39 pm    Post subject: Reply with quote

Code:
echo 'PYTHONPATH="/path/to/python"' >> /etc/env.d/99blender
env-update
For everyone (restart X for it to propagate to X sessions), or
Code:
echo 'export PYTHONPATH="/path/to/python"' >> ~/.bashrc
and restart your bash session for it to run from a bash shell.

It may stop portage working tho......
Back to top
View user's profile Send private message
leonglass
Apprentice
Apprentice


Joined: 08 Aug 2006
Posts: 278

PostPosted: Tue Jan 02, 2007 5:47 pm    Post subject: Reply with quote

why would this break portage. Is that related to what the PYTHONPATH is currently set to. The second option I already tried but I don't seem to have a ~/.bashrc file. I thought I should have had one any explanation for that.
Back to top
View user's profile Send private message
pteppic
l33t
l33t


Joined: 28 Nov 2005
Posts: 781

PostPosted: Thu Jan 04, 2007 2:19 am    Post subject: Reply with quote

leonglass wrote:
why would this break portage. /usr/lib/portage/pym is where all the portage modules are Is that related to what the PYTHONPATH is currently set to. yesThe second option I already tried but I don't seem to have a ~/.bashrc file. I thought I should have had one any explanation for that.


~/.bashrc is is a file containing a set of commands run when bash is started in a terminal. If you don't have one, running the command I stated above will create the file, BUT, it might be a good idea to copy the default .bashrc file to your home directory first
Code:
cp /etc/skel/.bashrc ~/.bashrc

It may also be a good idea to copy the other two 'skel' files (or all 3 with 1 command)
Code:
cp /etc/skel/.* ~/
Back to top
View user's profile Send private message
leonglass
Apprentice
Apprentice


Joined: 08 Aug 2006
Posts: 278

PostPosted: Thu Jan 04, 2007 10:10 pm    Post subject: Reply with quote

pteppic wrote:
leonglass wrote:
why would this break portage. /usr/lib/portage/pym is where all the portage modules are Is that related to what the PYTHONPATH is currently set to. yesThe second option I already tried but I don't seem to have a ~/.bashrc file. I thought I should have had one any explanation for that.


~/.bashrc is is a file containing a set of commands run when bash is started in a terminal. If you don't have one, running the command I stated above will create the file, BUT, it might be a good idea to copy the default .bashrc file to your home directory first
Code:
cp /etc/skel/.bashrc ~/.bashrc

It may also be a good idea to copy the other two 'skel' files (or all 3 with 1 command)
Code:
cp /etc/skel/.* ~/


Thanks for that pteppic I am very grateful. I have been searching around for this for a while now.
Back to top
View user's profile Send private message
neilwightman
n00b
n00b


Joined: 12 Jun 2003
Posts: 33
Location: Germany

PostPosted: Mon Jan 22, 2007 7:31 pm    Post subject: Reply with quote

I'm a little confused on how to solve this issue.

I did an
export PYTHONPATH=/usr/lib/python2.4/
then started blender from that console.

I still see this error. Am I just stupid? :roll:

Any help anyone can give me would be great,

Neil
_________________
xfce4, conky, aterm, pidgin, firefox, thunderbird, emacs
Back to top
View user's profile Send private message
neilwightman
n00b
n00b


Joined: 12 Jun 2003
Posts: 33
Location: Germany

PostPosted: Mon Jan 22, 2007 8:29 pm    Post subject: Reply with quote

Ok, figured it out as soon as I posted that.

I had spent hours trying to figure out the issue, but i used strace and noticed it was looking in
Code:
~/.blender/scripts/

If you simply create this directory everything works as expected.
_________________
xfce4, conky, aterm, pidgin, firefox, thunderbird, emacs
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum