def save_as(self, version):
        """the save action for houdini environment
        """
        if not version:
            return

        from stalker import Version
        assert isinstance(version, Version)

        # get the current version, and store it as the parent of the new version
        current_version = self.get_current_version()

        # initialize path variables by using update_paths()
        version.update_paths()

        # set the extension to hip
        if not hou.isApprentice():
            version.extension = '.hip'
        else:
            version.extension = '.hipnc'

        # define that this version is created with Houdini
        version.created_with = self.name

        # create the folder if it doesn't exists
        try:
            os.makedirs(
                os.path.dirname(
                    version.absolute_full_path
                )
            )
        except __HOLE__:
            # dirs exist
            pass

        # houdini uses / instead of \ under windows
        # lets fix it

        # set the environment variables
        self.set_environment_variables(version)

        # set the render file name
        self.set_render_filename(version)

        # houdini accepts only strings as file name, no unicode support as I
        # see
        hou.hipFile.save(file_name=str(version.absolute_full_path))

        # set the environment variables again
        self.set_environment_variables(version)

        # append it to the recent file list
        self.append_to_recent_files(
            version.absolute_full_path
        )

        # update the parent info
        if current_version:
            version.parent = current_version

            # update database with new version info
            DBSession.commit()

        return True
dataset/ETHPy150Open eoyilmaz/anima/anima/env/houdini.py/Houdini.save_as