2.5 api.. questions

I’ve been looking at the 2.5 api and trying some stuff and thought I’d ask some questions…( i know it’s in progress, but ideasman42 said that no major changes were planned)

  1. Now that the blender draw module is gone and we have bpy.ui
    I can’t figure out how to do a pupmenu or pupblock. anyone know if it’s in there or (if not,) if it will return?

  2. mesh materials are read only… now, I can add a material slot with bpy.ops.object.material_slot_add and also remove slots… but when you change which material a slot uses then nothing is echoed in the console report…

so right now is it impossible to change the materials on a mesh? if not, then how?

  1. will the popup menus (for specials, edge specials, face specials and vertex specials for example) become “pythonised” in the UI folder for customisation?

I know it’s maybe jumping the gun a little, but I’m itching to do more scripts for 2.5!

just a note i got from ideasman - they plan to add function calls within collections, so .object.material_slot_add will become something like object.materials.add(material) and the whole underscoring thing will go away.

do you heve a site where i an download this new API
i’d like to see hwo to use it to make new scripts for 2.5

and is there any good tut on how to use theses new toys ?

by the way are we going to get a first release for 2.5 in August or only at the end of the year ?

Thanks

ricky, graphicall.org
tut’s: search youtube
first beta release of 2.5 might be Oct-Dec timeframe.

i saw a thread last week saying that at the siggraph show there was a rumor of a possible beta release in mid august ?

so not certain anymore when we’ll get the new 2.5
and begin to learn it!

ok i got the latest SVN 2.5

but how can you add new objects
is there a new way to do it
and any min doc to begin with the new features
i mean more like a PDf than a video if available

and is the API coming with that SVN ?

thanks

Thanks papasmurf… noone know about the other stuff then?

@ ricky blender

add objects using the new bpy.ops:

bpy.ops.mesh.primitive_cube_add()

check this page for the latest api docs…

as for anything else, it’s mostly “self documenting”

Use the new “console” spacetype it has some handy hints and you can type commands into it directly.

try


print dir(bpy.data)

or

print dir(bpy.ops)

or whatever to get more idea…

it’s mostly similar to the bpy api right now (for the bpy stuff check the 2.49 api docs for examples…)
but with a whole bunch of operators to access the built in functions that couldn’t be scripted before…

put the console space into “report” mode andit’ll “echo” the python commands as you do stuff in the interface so you can discover what these new operators and their arguments are… also many of the tooltips now indicate the python command for that button!

ok so you say that you cannot do like before
Ex: simply press the space bar and add a primitive like cube or plane …ect

that’s gone !

or is there another simple way to do it ?

and there is no doc available for theses new functions right now !

anything in site for doc to know what is new and how it works?

if not then it s going to be a nightmare to learn this 2.5 !

Thamks for the new API

looks like eveythig has been change to other names ect…

so this means that all the older script will have to be re written all over
and if i devellop new scripts right now it’s totaly useless cause it will have to be re written with new commands !

lots of work ahead to rewrite all theses scripts!

Thanks

if you use the bpy api right now then the transition to 2.5 will not be too hard… anything using the blender modules will have to be re-written though.

for adding objects I thought you meant in a script, not manualy! use “shift a” to add a primitive. ( the space bar menu hasn’t been added yet… maybe it’s dropped, maybe not.

I posted a link o the new api for operators…and it’s really quite “discoverable” with the new console and the tooltips. give it a go.

so it is officiel for october first release !

i think it would be good to open a new thread in news and discussion to give tips and ideas on how to use 2.5 so we can get use to it i guess before release and be able to be productive

like i tried to change the middle nouse to pan instead of rotate and it’s not working
any idea how to change this ?

and when i look at the top user preference window
i had to use a magnifier to read theses small letters

  • there shoud be a law saying that you cannot write with font less than 8 !
    any way to zoom in to better read theses words upt there ?

also is there a pic showing the different functions of the F1 F2 keys new functions for 2.5

the looks is great

it would be nice to begin seeing more tut PDF files showing the different new features
to help people get use to this new 2.5 !

Thanks

Good Idea! Why not start it?

like i tried to change the middle nouse to pan instead of rotate and it’s not working
any idea how to change this ?

for now best done in the keymap rather than the preferences…

go to outliner and select “keymaps” in the pulldown and edit away! (but they don’t save yet)(

and when i look at the top user preference window
i had to use a magnifier to read theses small letters

  • there shoud be a law saying that you cannot write with font less than 8 !
    any way to zoom in to better read theses words upt there ?
    [/quote]mousewheel zooms in there… you could also try the fancy new popup! (alt U for the shortcut or file–>preferences for the menus…

also is there a pic showing the different functions of the F1 F2 keys new functions for 2.5

I haven’t seen one… William Reynish did one but that was a proposal, not actual!

the looks is great

it would be nice to begin seeing more tut PDF files showing the different new features
to help people get use to this new 2.5 !

Thank

What i really like is the BGL module. I hope we will have something like that in 2.5 as well, and still be able to create our own loops. Please :slight_smile:

hey anybody ahs done convertion of a small existing script as examle with a GUI

cause i have many scripts that i need to begin to convert to 2.5 operators

and would like to begin as soon as possible to learn it

hope doc comes along a fast apossible cause this is not fun to learn from nothing
but we have this forum so hope we can get more info fast !

Thanks

Id also like to see a small script converted to 2.5 for the learning experience