Thoughts and tutorials on programming

Friday, November 17, 2006

Replace Mesh

So replacing the mesh for an empty makes Blender crash.


Merging converging

Well, this is officially my first blog post ever. I feel like Captain Picard discovering a new galaxy...

So file merging in Blender isn't everything we want it to be. I went ahead and separated our two main scenes into two separate files, then created a new file with the two scenes merged using File->Append.
Good News: When a scene is deleted, its library goes with it. This means that the merge didn't cause any library/object conflicts (we may see some if the same objects are used in multiple scenes).
Bad News: Actuators that move between scenes break when you separate the scenes. If a given scene doesn't exist, the variable is clobbered in the actor pane (i.e., SCE: Navigation goes blank because it can't see the scene Navigation).
Possible workarounds:
-Fix it every time we merge, or
-instead of deleting the scene we aren't touching, have a total of three copies of the same file. Two are the working copies of the two scenes we will be working on, the third is a manually merged version. To do this merge, we'd create a new blender file and append the two scenes from the other two files. But no, this would still lack the second scene at some point, so that doesn't work. hmmm.....

Wednesday, November 15, 2006

can't rotate

Can't rotate anything in blender? It stands still? one of those little buttons is the culprit. The triple dot with the arrow underneath. Uncheck it and you are set :-)

Monday, November 13, 2006

blank panels

so say you click on the 'pac man' logic button, or the texture button, and nothing ever appears at the bottom of your screen. Do not fear: go to "Panels" menu and choose "View all" (or hit home). They will magically reappear.

all white objects in blender game hit the p button and the objects come up all white? Check 1) every object has a light in its same layer. 2) are you in 'textured' draw type--the little spikey ball at the bottom of the 3D view, before hitting p? These may help :-)

Wednesday, November 08, 2006

disappearing textures Blender if you create a nicely UV-mapped object, run the game engine, then it just appears as 'dots' -- you may need to change the 'material' on that object to 'texface' -- then you will see your UV-mapped images!

Thursday, November 02, 2006

apparent blender game engine bugs

Seems that messages never make it.

python is always one line off

"SystemError: errror return without exception set" in one instance meant naming conflict among actuators. Also can mean you called "addActiveActuator" on an edit object actuator without the values filled in, or it has the wrong values filled in.

MouseOverAny apparently does not LIKE clicking on "square" planes. Very weird. Weird. It also dislikes accepting clicks over circles.

seems also that if the starting mesh is a circle then if you change the mesh later it won't help it with 'mouse over' sensors. Hmm. It appears that 'mouse over' only uses the 'original' mesh for size, for the mouse over sensor. Curious.

Bug with Blender must be that it does not ask you to save, at all, when you exit. A little frustrating! I think it might save

what I wish blender had

An 'add object to this object' actuator--let's just add something :-) Ok maybe that is infeasible, but I could have used it.

I wish "controller" and "owner" and "import GameLogic" were pre-instantiated, for every script so we don't have to have them at the top of every file. This would also make some intuitive sense. It might not be as efficient, tho. But, then again--we're using python so in reality efficiency is not priority number one, so perhaps it's okay.

Message Actuator "getMessage" "getsubject"

"getfiringactuator that fired this script" (either that or divorce the combination logic from the middle column...)

Rasterizer could use 'getmouseposition'

flexible IPO's

from mouse actuators "get actual x, y given some fixed z" (like translate into blender coords this x, y)

on creating an object, being able to give it a position

kx_networkmessageactuator has no ".name" ugh

I wish there were a way to get to *every* actuator. It makes sense that it should be possible. That would make things so much nicer! Like object.getActuator. That would be so nice. Bypass that gui stuff!

A function "does such and such a mesh exist?"

IPO should have a bool "am I still firing?" "am I live?" also each object should have a bool "am I under the influence of some IPO right now?" (since it can only have one at a time), and perhaps a method "stop whatever other ipo you have! " so that it can be replaced with others.

Also a "get current frame number" call would be nice, of the IPO playing.

The property panel should use an "x" to be consistent with the rest of the world :-)

copy and paste with the operating system?

actuators don't have getname? that is ... interesting... they are accessed by name, so I guess it makes sense for them not to have names, but what ever :-)

when you create objects, you can't seem to tell it "create it right HERE" with this velocity -- well maybe you could but I don't know how. Oh well.

if youhave two actuators with the same name attached to a python script (from two different objects) then the return value from "get actuator(schizonamed") is undefined.

Wednesday, November 01, 2006

error message

SystemError: error return without exception set

I got this when I tried to grab a mesh that did not exist, or that was associated with an empty, or something! Also it might be caused by having a python script linked to two actuators (under two distinct objects) but such that they have the same name--then it becomes confused.

Also when I compiled blender on linux, it said /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lalut

it turns out that since my alut and openal were stored in 'non conventional' locations, gcc didn't want to accept LD_LIBRARY_PATH environment variable, which DID have them, so I then had to add, by hand, to the linking line (i.e. run scons BF_DEBUG=0 BF_QUIEt=0 to figure out the command line used to link blender, then add to it)

and then it works.

I have no idea why.
This makes me want to suggest that scons have a global 'include from here' and 'link from here' settings, at least for linux.

It may have something to do with the environment that scons yields to the builds that it creates--it seems to create an 'internal' 'new' environment and pass that along to the child scons processes (like subdirectories).