forked from bartvdbraak/blender
Changed some labels from Second Life to OpenSim
This commit is contained in:
parent
87fb70cad2
commit
c819fd4ee0
@ -15,4 +15,4 @@ op.use_texture_copies = True
|
||||
op.triangulate = True
|
||||
op.use_object_instantiation = False
|
||||
op.sort_by_name = True
|
||||
op.second_life = True
|
||||
op.open_sim = True
|
@ -15,4 +15,4 @@ op.use_texture_copies = True
|
||||
op.triangulate = True
|
||||
op.use_object_instantiation = False
|
||||
op.sort_by_name = True
|
||||
op.second_life = False
|
||||
op.open_sim = False
|
@ -963,10 +963,10 @@ std::string AnimationExporter::create_4x4_source(std::vector<float> &frames, Obj
|
||||
else
|
||||
copy_m4_m4(mat, pchan->pose_mat);
|
||||
|
||||
// SECOND_LIFE_COMPATIBILITY
|
||||
// OPEN_SIM_COMPATIBILITY
|
||||
// AFAIK animation to second life is via BVH, but no
|
||||
// reason to not have the collada-animation be correct
|
||||
if (export_settings->second_life) {
|
||||
if (export_settings->open_sim) {
|
||||
float temp[4][4];
|
||||
copy_m4_m4(temp, bone->arm_mat);
|
||||
temp[3][0] = temp[3][1] = temp[3][2] = 0.0f;
|
||||
|
@ -193,11 +193,11 @@ void ArmatureExporter::add_bone_node(Bone *bone, Object *ob_arm, Scene *sce,
|
||||
// and not it's head, seems arbitrary.
|
||||
(*i)->parentinv[3][1] += bone->length;
|
||||
|
||||
// SECOND_LIFE_COMPATIBILITY
|
||||
// OPEN_SIM_COMPATIBILITY
|
||||
// TODO: when such objects are animated as
|
||||
// single matrix the tweak must be applied
|
||||
// to the result.
|
||||
if (export_settings->second_life) {
|
||||
if (export_settings->open_sim) {
|
||||
// tweak objects parentinverse to match compatibility
|
||||
float temp[4][4];
|
||||
|
||||
@ -272,8 +272,8 @@ void ArmatureExporter::add_bone_transform(Object *ob_arm, Bone *bone, COLLADASW:
|
||||
copy_m4_m4(mat, bone->arm_mat);
|
||||
}
|
||||
|
||||
// SECOND_LIFE_COMPATIBILITY
|
||||
if (export_settings->second_life) {
|
||||
// OPEN_SIM_COMPATIBILITY
|
||||
if (export_settings->open_sim) {
|
||||
// Remove rotations vs armature from transform
|
||||
// parent_rest_rot * mat * irest_rot
|
||||
float temp[4][4];
|
||||
|
@ -507,8 +507,8 @@ std::string ControllerExporter::add_inv_bind_mats_source(Object *ob_arm, ListBas
|
||||
float world[4][4];
|
||||
float inv_bind_mat[4][4];
|
||||
|
||||
// SECOND_LIFE_COMPATIBILITY
|
||||
if (export_settings->second_life) {
|
||||
// OPEN_SIM_COMPATIBILITY
|
||||
if (export_settings->open_sim) {
|
||||
// Only translations, no rotation vs armature
|
||||
float temp[4][4];
|
||||
unit_m4(temp);
|
||||
|
@ -50,7 +50,7 @@ public:
|
||||
bool use_object_instantiation;
|
||||
bool sort_by_name;
|
||||
BC_export_transformation_type export_transformation_type;
|
||||
bool second_life;
|
||||
bool open_sim;
|
||||
|
||||
char *filepath;
|
||||
LinkNode *export_set;
|
||||
|
@ -79,7 +79,7 @@ int collada_export(Scene *sce,
|
||||
int use_object_instantiation,
|
||||
int sort_by_name,
|
||||
BC_export_transformation_type export_transformation_type,
|
||||
int second_life)
|
||||
int open_sim)
|
||||
{
|
||||
ExportSettings export_settings;
|
||||
|
||||
@ -102,7 +102,7 @@ int collada_export(Scene *sce,
|
||||
export_settings.use_object_instantiation = use_object_instantiation != 0;
|
||||
export_settings.sort_by_name = sort_by_name != 0;
|
||||
export_settings.export_transformation_type = export_transformation_type;
|
||||
export_settings.second_life = second_life != 0;
|
||||
export_settings.open_sim = open_sim != 0;
|
||||
|
||||
|
||||
int includeFilter = OB_REL_NONE;
|
||||
|
@ -77,7 +77,7 @@ int collada_export(Scene *sce,
|
||||
int use_object_instantiation,
|
||||
int sort_by_name,
|
||||
BC_export_transformation_type export_transformation_type,
|
||||
int second_life);
|
||||
int open_sim);
|
||||
|
||||
|
||||
|
||||
|
@ -96,7 +96,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
|
||||
int use_object_instantiation;
|
||||
int sort_by_name;
|
||||
int export_transformation_type;
|
||||
int second_life;
|
||||
int open_sim;
|
||||
|
||||
if (!RNA_struct_property_is_set(op->ptr, "filepath")) {
|
||||
BKE_report(op->reports, RPT_ERROR, "No filename given");
|
||||
@ -142,7 +142,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
|
||||
use_object_instantiation = RNA_boolean_get(op->ptr, "use_object_instantiation");
|
||||
sort_by_name = RNA_boolean_get(op->ptr, "sort_by_name");
|
||||
export_transformation_type = RNA_enum_get(op->ptr, "export_transformation_type_selection");
|
||||
second_life = RNA_boolean_get(op->ptr, "second_life");
|
||||
open_sim = RNA_boolean_get(op->ptr, "open_sim");
|
||||
|
||||
/* get editmode results */
|
||||
ED_object_editmode_load(CTX_data_edit_object(C));
|
||||
@ -168,7 +168,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
|
||||
use_object_instantiation,
|
||||
sort_by_name,
|
||||
export_transformation_type,
|
||||
second_life))
|
||||
open_sim))
|
||||
{
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
@ -236,7 +236,7 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr)
|
||||
row = uiLayoutRow(box, FALSE);
|
||||
uiItemR(row, imfptr, "deform_bones_only", 0, NULL, ICON_NONE);
|
||||
row = uiLayoutRow(box, FALSE);
|
||||
uiItemR(row, imfptr, "second_life", 0, NULL, ICON_NONE);
|
||||
uiItemR(row, imfptr, "open_sim", 0, NULL, ICON_NONE);
|
||||
|
||||
/* Collada options: */
|
||||
box = uiLayoutBox(layout);
|
||||
@ -350,8 +350,8 @@ void WM_OT_collada_export(wmOperatorType *ot)
|
||||
RNA_def_enum(ot->srna, "export_transformation_type_selection", prop_bc_export_transformation_type, 0,
|
||||
"Transform", "Transformation type for translation, scale and rotation");
|
||||
|
||||
RNA_def_boolean(ot->srna, "second_life", 0, "Export for Second Life",
|
||||
"Compatibility mode for Second Life");
|
||||
RNA_def_boolean(ot->srna, "open_sim", 0, "Export for OpenSim",
|
||||
"Compatibility mode for OpenSim and compatible online worlds");
|
||||
}
|
||||
|
||||
|
||||
|
@ -142,12 +142,12 @@ static void rna_Scene_collada_export(
|
||||
int use_object_instantiation,
|
||||
int sort_by_name,
|
||||
int export_transformation_type,
|
||||
int second_life)
|
||||
int open_sim)
|
||||
{
|
||||
collada_export(scene, filepath, apply_modifiers, export_mesh_type, selected,
|
||||
include_children, include_armatures, include_shapekeys, deform_bones_only,
|
||||
active_uv_only, include_uv_textures, include_material_textures,
|
||||
use_texture_copies, use_ngons, use_object_instantiation, sort_by_name, export_transformation_type, second_life);
|
||||
use_texture_copies, use_ngons, use_object_instantiation, sort_by_name, export_transformation_type, open_sim);
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -218,7 +218,7 @@ void RNA_api_scene(StructRNA *srna)
|
||||
parm = RNA_def_boolean(func, "use_ngons", 1, "Use NGons", "Keep NGons in Export");
|
||||
parm = RNA_def_boolean(func, "use_object_instantiation", 1, "Use Object Instances", "Instantiate multiple Objects from same Data");
|
||||
parm = RNA_def_boolean(func, "sort_by_name", 0, "Sort by Object name", "Sort exported data by Object name");
|
||||
parm = RNA_def_boolean(func, "second_life", 0, "Export for Second Life", "Compatibility mode for Second Life");
|
||||
parm = RNA_def_boolean(func, "open_sim", 0, "Export for OpenSim", "Compatibility mode for OpenSim and similar online worlds");
|
||||
|
||||
parm = RNA_def_int(func, "export_transformation_type", 0, INT_MIN, INT_MAX,
|
||||
"Transformation", "Transformation type for translation, scale and rotation", INT_MIN, INT_MAX);
|
||||
|
Loading…
Reference in New Issue
Block a user