Commit 25ce07b5 authored by Nicolas Docquier's avatar Nicolas Docquier

Merge branch 'python_loader' into 'dev'

Python loader

See merge request robotran/mbsysc!225
parents 5d47a621 11d0bd70
...@@ -20,7 +20,7 @@ outputter.SetOutputDirectory(output_path) ...@@ -20,7 +20,7 @@ outputter.SetOutputDirectory(output_path)
# Set the name of the output files # Set the name of the output files
outputter.SetOutputFilename("dirdyn") outputter.SetOutputFilename("dirdyn")
# Set the number of timestep between to output files # Set the number of timestep in the .anim file between two output files
outputter.SetFrameStep(500) outputter.SetFrameStep(500)
# Print the files # Print the files
......
...@@ -195,8 +195,8 @@ cdef extern from "mbs_load_xml.h": ...@@ -195,8 +195,8 @@ cdef extern from "mbs_load_xml.h":
c_MbsData* c_mbs_load "mbs_load" (const char *mbs_filename, const char *build_path) c_MbsData* c_mbs_load "mbs_load" (const char *mbs_filename, const char *build_path)
c_MbsData* c_mbs_load_with_loader "mbs_load_with_loader" (const char *mbs_filename, const char *build_path, c_MbsLoader *mbs_loader) c_MbsData* c_mbs_load_with_loader "mbs_load_with_loader" (const char *mbs_filename, const char *build_path, c_MbsLoader *mbs_loader)
void c_mbs_delete_data "mbs_delete_data" (c_MbsData *mbs_data) void c_mbs_delete_data "mbs_delete_data" (c_MbsData *mbs_data)
c_MbsLoader* mbs_new_loader() c_MbsLoader* c_mbs_new_loader "mbs_new_loader" ()
void mbs_delete_loader(c_MbsLoader* loader) void c_mbs_delete_loader "mbs_delete_loader" (c_MbsLoader* loader)
cdef extern from "mbs_set.h": cdef extern from "mbs_set.h":
void c_mbs_set_nb_userc "mbs_set_nb_userc" (c_MbsData *mbs_data, int Nuserc) void c_mbs_set_nb_userc "mbs_set_nb_userc" (c_MbsData *mbs_data, int Nuserc)
......
...@@ -23,13 +23,13 @@ cdef class MbsData(object): ...@@ -23,13 +23,13 @@ cdef class MbsData(object):
# 1st: load the MDS_gen_strct and keep a copy # 1st: load the MDS_gen_strct and keep a copy
self.mds_gen_strct_ptr = c_MDS_mbs_reader(name) self.mds_gen_strct_ptr = c_MDS_mbs_reader(name)
# Store it to a loader object # Store it to a loader object
loader = mbs_new_loader() loader = c_mbs_new_loader()
loader.mds = self.mds_gen_strct_ptr loader.mds = self.mds_gen_strct_ptr
# 2nd: retrive the MbsData from the MDS_gen_strct # 2nd: retrive the MbsData from the MDS_gen_strct
self.mbs_data_ptr = c_mbs_load_with_loader(name, build_path, loader) self.mbs_data_ptr = c_mbs_load_with_loader(name, build_path, loader)
mbs_delete_loader(loader) c_mbs_delete_loader(loader)
# Initialization of Python side # Initialization of Python side
def __init__(self, name, build_path=None): def __init__(self, name, build_path=None):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment