Hello! Modelling Couldn’t Have Been Simpler! Why?
Because I am making a package which handles making simple to intermediate models. Note, this package can’t make complicated models, with loads of meshes, polygonal shapes. It is just able to render simple models with a few meshes. So, instead of blending the following:
You could use the Model class (which is preferred to be extended) and make so:
class MyCube(panda3dmodeller.Model): # A model to be added to the main model def __init__(self): self.addEggModel(panda3dmodeller.EggFile(panda3dmodeller.EggModels.cubemodel, scale=Point3(1, 1, 1))) class MyModel(panda3dmodeller.Model): def __init__(self): panda3dmodeller.Model.__init__(centerPos=Point3(0, 0, 0)) self.addEggModel(panda3dmodeller.EggFile(panda3dmodeller.EggModels.cubemodel, scale=Point3(1, 1, 1)), relPos=Point3(0, 0, 0)) # This adds a .egg model self.addBamModel(panda3dmodeller.BamFile(panda3dmodeller.BamModels.cubemodel, scale=Point3(1, 1, 1)), relPos=Point3(0, 0, 4)) # You can also add .bam models self.addModel(MyCube(), relPos=Point3(0, 0, 4)) # You can add other models too. mymodel = MyModel() mymodel.reparentTo(base.render)
The Model class, though not extending NodePath, has many methods that NodePath does. The reason of no extension is because not only the center point changes, when the center point moves, the whole relative models have to move around. You can use methods like setPos(Point3(x, y, z)) or methods like setPos(np, Point(x, y, z)) among others.
Note: You are probably all excited by now, but I will blow it away by saying one sentence:
“This package is a work-in progress and isn’t complete yet. The above representation is a hope of what it should be and work.”
So that means it isn’t done yet
EDIT: Please tell me anything you think should be added. Till now, it spports adding built-in models, models created by you, and a few NodePaths methods namely: