YABEE equivalent to Chicken's "ForceEmpty"?

Hi friends,

I’ve gone through some tutorials and snippets to use YABEE to export a basic level (real basic, just a squashed box representing a floor) from Blender 2.65 to Panda. Now I want to put a cube in the scene that represents the player’s scaling and position, but export it as an empty placeholder.

I’ve seen old posts telling how to do this with the Chicken exporter and ForceEmpty, but YABEE’s documentation doesn’t mention anything about ForceEmpty. How can I tag a cube so that its geometry won’t display when I import the level into Panda?

(I tried adding a “backstage” = True tag to the cube, too, but it still showed up; not sure if backstage is for something else, or if I’m just exporting tags wrong perhaps).


Instead of a cube, you could actually add an “Empty” in Blender, which will be exported correctly as an empty node. I’ve been using this for placeholders in Blender 2.6 and it works fine.

Hmm, interesting! I’ll have to try that sometime when it isn’t hours past my bedtime. :wink:

Followup question: it sounded like one of the handiest things about using an actual object would be easily figuring out and exporting the Scale and Rotation needed to make it fit in the scene. Have you found a good way to do that while using Empties? Or is it pretty much “Place Objects in the scene, transfer their positioning data to Empties, delete the Objects, export”?

Thanks again for bearing with my bafflement :slight_smile: I need to pay more attention to the dates on threads when I find them; I have a nice soup of current and outdated information in my head after today’s adventures. :slight_smile:

The transformation of empties is exported intact by yabee. (The fact that the scale is also exported can sometimes be a pitfall to people who aren’t expecting all of their set_pos calls to use a different scale for the units.)

If you have other models that you are instantiating in a scene blend file, I believe that it’s possible to link the blender file of your model to your scene one and then instantiate a group from the other blender file using an empty. We used this trick in the Naith project (search around, it’s open source - but be aware that we used the old Chicken exporter for Blender 2.5 at the time). This allows us to view the instantiated models (and generate correct ambient occlusion) in the scene blend file, but when exporting them, they are exported as empties. Since they are linked, each instantiated model can be edited and exported independently.

You can set a tag like “model-path” on those empties to indicate the path to the .egg file to load, and then do something like this in Panda3D to process that:

# Find all nodes with model-path tag
for placeholder in model.find_all_matches('**/=model-path'):
    model_path = placeholder.get_tag('model-path')
    model = loader.loadModel(model_path)
    # Place the model under the placeholder to make it inherit its transform

I vaguely recall that the old Chicken exporter used to be able to actually export .egg files that instantiated other .egg files, eliminating this extra step, but I don’t know if Yabee also supports that.

It worked! I was able to add an Empty cube and use its position and rotation as the starting values for my player cube. A small victory! The only thing that threw me for a while is that I was opening up the Logic Editor from the wrong panel in Blender (I think I was using the upper left panel and assigning my “player_start” tag to the global scene, when I had to select the Empty cube and then open the Logic Editor in the lower right panel where object properties usually show up).

I’ll take a look at how Naith does it when I’m ready to move on to more complicated scenes. For the time being, I’ve got a floor to collide with. :slight_smile:

Thanks again!