Announcements, requests and support regarding the Blender Indigo export script
-
Iqwar
- Posts: 13
- Joined: Sun Jan 14, 2007 10:13 am
Post
by Iqwar » Thu Feb 01, 2007 5:50 am
Hi all, firstly, sorry for my bad english...
1. Is there any way to export particles? /convert to mesh or something...?
2. I tried basic sss scene within Indigo testscenes directory and they couldn´t work for me...Can anyone
upload any functional basic sss xml scene for indigo 0.73 with glass sphere?
/or whatever else
3. Thanx all indigo staff for great work!
-
dougal2

- Posts: 2532
- Joined: Wed Nov 15, 2006 8:17 am
- Location: South London
Post
by dougal2 » Thu Feb 01, 2007 10:38 am
particles can be converted to a mesh with a CVS build of blender, and this script:
Code: Select all
# Converts particles into a mesh with edges for strands
from Blender import Scene, Mathutils, Effect, Mesh, Object
scn= Scene.GetCurrent()
ob= scn.getActiveObject()
me= Mesh.New()
effects= Effect.Get()
for eff in effects:
for p in eff.getParticlesLoc():
# p is either a vector or a list of vectors. me.verts.extend() will deal with either
print p
me.verts.extend(p)
if type(p)==list: # Are we a strand or a pair, then add edges.
if len(p)>1:
edges= [(i, i+1) for i in range(len(me.verts)-len(p), len(me.verts)-1)]
me.edges.extend( edges )
print len(me.verts)
ob= Object.New('Mesh')
ob.link(me)
scn.link(ob)
i didn't write this script. also forget where i found it.
-
Kram1032
- Posts: 6649
- Joined: Tue Jan 23, 2007 3:55 am
- Location: Austria near Vienna
Post
by Kram1032 » Sun Feb 04, 2007 8:56 am
Is this a phytonscript?
If so, shouldn't be the first line "!bpy! or something like this?
-
Kram1032
- Posts: 6649
- Joined: Tue Jan 23, 2007 3:55 am
- Location: Austria near Vienna
Post
by Kram1032 » Sun Feb 04, 2007 10:00 am
These are commands and variables and something like that, but I mean the first line...
#!BPY
That's copied from one of the standart blenderpythonscripts...
You'll find it in any bpy. This is the line to let blender know, that it's a script for blender.
"""
Name: '3D Studio (.3ds)...'
Blender: 241
Group: 'Import'
Tooltip: 'Import from 3DS file format (.3ds)'
"""
This part is missing too....
It tells blender, how it should be named, which is the first version, it's used for, in which category this will appear and what's the tool tip text, when positioning your cursor above it...
I just wonder, that it works... I'll test it...
-
zsouthboy
- Posts: 1395
- Joined: Fri Oct 13, 2006 5:12 am
Post
by zsouthboy » Sun Feb 04, 2007 5:16 pm
an easy way to get particles into indigo:
use dupliverts, in blender. just use a small cube as the original mesh.
Then, when the particles look like you'd like, ctrl shift A to turn them into (linked) meshes.
-
Kram1032
- Posts: 6649
- Joined: Tue Jan 23, 2007 3:55 am
- Location: Austria near Vienna
Post
by Kram1032 » Sun Feb 04, 2007 9:55 pm
Nice trick, but what's with Hairs

-
dougal2

- Posts: 2532
- Joined: Wed Nov 15, 2006 8:17 am
- Location: South London
Post
by dougal2 » Mon Feb 05, 2007 9:33 am
there's more to running scripts in blender than merely selecting one form the GUI menu.
switch to the text editor window, load that script as a text file (or copy+paste i in) and either press ALT+P to execute it, or right click the window and choose the execute option.
the !#BPY or whatever header is not neccesary.
the other header lines simply tell blender where to file it under the menu, but as i said, you don't need to even have it in the menu to be able to run it.

-
kepler
- Posts: 122
- Joined: Wed Jan 17, 2007 3:18 am
- Location: Italy
Post
by kepler » Thu Feb 08, 2007 2:29 am
Hello, I have a problem with that script! I've tried to run it but it doesn't work. Here's the error from the console: "
TypeError: expected float argument". The error is referred to this line of the script: "
for p in eff.getParticlesLoc()".
Can someone help me? There's another way to convert particles into mesh?

-
dougal2

- Posts: 2532
- Joined: Wed Nov 15, 2006 8:17 am
- Location: South London
Post
by dougal2 » Thu Feb 08, 2007 3:29 am
kepler wrote:Hello, I have a problem with that script! I've tried to run it but it doesn't work. Here's the error from the console: "
TypeError: expected float argument". The error is referred to this line of the script: "
for p in eff.getParticlesLoc()".
Can someone help me? There's another way to convert particles into mesh?

apologies if my screenshot is misleading, but as i said earlier in the thread - this script will NOT work with blender 2.42, you need a NEWER build.
either get 2.43RC3 or look here for experimental builds:
http://www.graphicall.org/builds/index.php
Last edited by
dougal2 on Thu Feb 08, 2007 3:42 am, edited 1 time in total.
-
Kram1032
- Posts: 6649
- Joined: Tue Jan 23, 2007 3:55 am
- Location: Austria near Vienna
Post
by Kram1032 » Thu Feb 08, 2007 3:36 am
why using graphicall? Is the Blender 2.43RC2 not new enough?
Build 2.43RC3 out now^^
Last edited by
Kram1032 on Thu Feb 08, 2007 11:32 pm, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 52 guests