Exemple #1
0
def modmerge(var_set):
    try:
        var_name_1 = "strings"
        orig_strings = var_set[var_name_1]
        add_objects(orig_strings, strings)
    except KeyError:
        errstring = "Variable set does not contain expected variable: \"%s\"." % var_name_1
        raise ValueError(errstring)
Exemple #2
0
def modmerge(var_set):
    try:
        var_name_1 = "strings"
        orig_strings = var_set[var_name_1]
        add_objects(orig_strings, strings)
    except KeyError:
        errstring = "Variable set does not contain expected variable: \"%s\"." % var_name_1
        raise ValueError(errstring)
Exemple #3
0
def modmerge_strings(orig_strings):
    # add remaining strings
    from util_common import add_objects
    num_appended, num_replaced, num_ignored = add_objects(
        orig_strings, strings)
def modmerge_meshes(orig_meshes):
    # add remaining meshes
    from util_common import add_objects
    num_appended, num_replaced, num_ignored = add_objects(
        orig_meshes, wse_warhorse_meshes)
Exemple #5
0
def modmerge_meshes(orig_meshes):
    # add remaining meshes
    from util_common import add_objects
    num_appended, num_replaced, num_ignored = add_objects(orig_meshes, meshes)
Exemple #6
0
def modmerge_presentations(orig_presentations):

    # add remaining presentations
    from util_common import add_objects
    num_appended, num_replaced, num_ignored = add_objects(
        orig_presentations, presentations)
def modmerge_strings(orig_strings):
    # add remaining strings
    from util_common import add_objects
    num_appended, num_replaced, num_ignored = add_objects(orig_strings, strings)
def modmerge_presentations(orig_presentations):
	
	# add remaining presentations
	from util_common import add_objects
	num_appended, num_replaced, num_ignored = add_objects(orig_presentations, presentations)
Exemple #9
0
    vars_to_import = ["mod_options"]

    for x in mod_process_order:
        if (mod_is_active(x) and x <> "xgm_mod_options"
            ):  # must exclude this file since we are using this file as base
            try:
                #mergefn_name = "modmerge_%s"%(modcomp_name)
                target_module_name = "%s_%s" % (x, modcomp_name)

                _temp = __import__(target_module_name, globals(), locals(),
                                   vars_to_import, -1)
                logger.info(
                    "Merging objects for component \"%s\" from mod \"%s\"..." %
                    (modcomp_name, x))

                add_objects(mod_options,
                            _temp.mod_options)  # import from target module.

                # TODO: collect option pages

            except ImportError:
                errstring = "Failed importing for component \"%s\" for mod \"%s\"." % (
                    modcomp_name, x)
                logger.debug(errstring)
        else:
            errstring = "Mod \"%s\" not active for Component \"%s\"." % (
                x, modcomp_name)
            logger.debug(errstring)

except:
    raise
# collation end
Exemple #10
0
    #modmerge(var_set)

    mod_process_order = mod_get_process_order(modcomp_name)
    
    vars_to_import= ["mod_options"]
    
    for x in mod_process_order:
        if(mod_is_active(x) and x <> "xgm_mod_options"): # must exclude this file since we are using this file as base
            try:
                #mergefn_name = "modmerge_%s"%(modcomp_name)
                target_module_name = "%s_%s"%(x,modcomp_name)
                
                _temp = __import__( target_module_name , globals(), locals(), vars_to_import,-1)
                logger.info("Merging objects for component \"%s\" from mod \"%s\"..."%(modcomp_name,x))

                add_objects(mod_options, _temp.mod_options) # import from target module.

                # TODO: collect option pages

            except ImportError:
                errstring = "Failed importing for component \"%s\" for mod \"%s\"." % (modcomp_name, x)
                logger.debug(errstring)
        else:
            errstring = "Mod \"%s\" not active for Component \"%s\"." % (x, modcomp_name)
            logger.debug(errstring)

except:
    raise
# collation end

# At this point, mod_options will contain the list of all mod_options specified.
def modmerge_items(orig_items):
    # add remaining meshes
    from util_common import add_objects
    num_appended, num_replaced, num_ignored = add_objects(orig_items, items)