Cleanup: Nuke moar G.main usages...
This commit is contained in:
@@ -38,17 +38,17 @@ SceneExporter::SceneExporter(COLLADASW::StreamWriter *sw, ArmatureExporter *arm,
|
||||
{
|
||||
}
|
||||
|
||||
void SceneExporter::exportScene(Scene *sce)
|
||||
void SceneExporter::exportScene(bContext *C, Scene *sce)
|
||||
{
|
||||
// <library_visual_scenes> <visual_scene>
|
||||
std::string id_naming = id_name(sce);
|
||||
openVisualScene(translate_id(id_naming), id_naming);
|
||||
exportHierarchy(sce);
|
||||
exportHierarchy(C, sce);
|
||||
closeVisualScene();
|
||||
closeLibrary();
|
||||
}
|
||||
|
||||
void SceneExporter::exportHierarchy(Scene *sce)
|
||||
void SceneExporter::exportHierarchy(bContext *C, Scene *sce)
|
||||
{
|
||||
LinkNode *node;
|
||||
std::vector<Object *> base_objects;
|
||||
@@ -80,13 +80,13 @@ void SceneExporter::exportHierarchy(Scene *sce)
|
||||
Object *ob = base_objects[index];
|
||||
if (bc_is_marked(ob)) {
|
||||
bc_remove_mark(ob);
|
||||
writeNodes(ob, sce);
|
||||
writeNodes(C, ob, sce);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SceneExporter::writeNodes(Object *ob, Scene *sce)
|
||||
void SceneExporter::writeNodes(bContext *C, Object *ob, Scene *sce)
|
||||
{
|
||||
// Add associated armature first if available
|
||||
bool armature_exported = false;
|
||||
@@ -95,7 +95,7 @@ void SceneExporter::writeNodes(Object *ob, Scene *sce)
|
||||
armature_exported = bc_is_in_Export_set(this->export_settings->export_set, ob_arm);
|
||||
if (armature_exported && bc_is_marked(ob_arm)) {
|
||||
bc_remove_mark(ob_arm);
|
||||
writeNodes(ob_arm, sce);
|
||||
writeNodes(C, ob_arm, sce);
|
||||
armature_exported = true;
|
||||
}
|
||||
}
|
||||
@@ -157,7 +157,7 @@ void SceneExporter::writeNodes(Object *ob, Scene *sce)
|
||||
|
||||
// <instance_controller>
|
||||
else if (ob->type == OB_ARMATURE) {
|
||||
arm_exporter->add_armature_bones(ob, sce, this, child_objects);
|
||||
arm_exporter->add_armature_bones(C, ob, sce, this, child_objects);
|
||||
}
|
||||
|
||||
// <instance_camera>
|
||||
@@ -235,7 +235,7 @@ void SceneExporter::writeNodes(Object *ob, Scene *sce)
|
||||
for (std::list<Object *>::iterator i = child_objects.begin(); i != child_objects.end(); ++i) {
|
||||
if (bc_is_marked(*i)) {
|
||||
bc_remove_mark(*i);
|
||||
writeNodes(*i, sce);
|
||||
writeNodes(C, *i, sce);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user