Ejemplo n.º 1
0
// SetImportPropertyString sets an string property.
//
// This is the C-version of #Assimp::Importer::SetPropertyString(). In the C
// interface, properties are always shared by all imports. It is not possible
// to specify them per import.
//
// The szName parameter specifies the name of the configuration property to be
// set. All supported public properties are defined in the config.h header
// file.
//
// The value paremeter specifies the new value for the property.
func setImportPropertyString(store *propertyStore, szName string, value string) {
	C.aiSetImportPropertyString(
		(*C.struct_aiPropertyStore)(unsafe.Pointer(store)),
		C.CString(szName),
		aiString(value),
	)
}
Ejemplo n.º 2
0
func (p *PropertyStore) SetPropertyString(name string, value string) {
	szName := C.CString(name)
	cValue := C.CString(value)
	defer C.free(unsafe.Pointer(szName))
	defer C.free(unsafe.Pointer(cValue))

	var st C.struct_aiString
	C.strncpy(&st.data[0], cValue, C.MAXLEN)
	C.aiSetImportPropertyString((*C.struct_aiPropertyStore)(p), szName, &st)
}