Xamarin 6 (from Beta channel) and Gtk# version

If you work with the beta channel (or you keen to use the alpha .. ) things might get hairy. Today I spend a little bit of time with my work laptop. Upgrading to Xamarin 6 was easy and wasn’t a problem at all it seemed. And a dark theme!!! Now I was jumping like an enthusiastic puppy!

Xamarin6DarkTheme

Nice editor Xamarin!

Build failed – Android component

First I couldn’t build projects any more and the information provided in the deployment log was … “Build failed”. Sure, but why. Investigating the IDE, Component and Android  logs at least revealed that the Android component was missing. I find it highly suspicious that it is required although the projects don’t come near Android (targeted for DLLs on Windows). You find the logs unter

%LOCALAPPDATA%\XamarinStudio-6.0\Logs\

Gtk# – Dark theme with white *meh* widgets

If your GUI is f**** up, you probably have the wrong Gtk# version installed. Don’t install the one from the official web page, nor from another source. You should have a Gtk# version downloaded during the process of obtaining the beta channel Xamarin version. These files usually are located under

%LOCALAPPDATA%\XamarinStudio-5.0\Cache\TempDownload\

“-5.0” might differ depending on your Xamarin version!

The Gtk# version that works the best with the dark theme is Gtk# 2.12.38 (gtk-sharp-2.12.38.msi).

MSBuild Engine

If your toolset of Microsoft is f***** up you may experience that all your base type definitions aren’t defined. Simply unchecking the usage of the MSBuild engine does the trick but is not a real solution. Only a workaround. (I hate work machines that are restricted by your IT department).

Blender Python Issue __version__

Recently I ran into an issue with Blender after adding the environment variables PYTHONHOME and PYTHONPATH.

I first didn’t even realize that this might be the issue since they pointed to a version of Python with which Blender claims to be compatible. But of course Blender comes with its own Python versions. Blender still works, but just some of that ‘little’ things are messed up.

So if you ‘re not able to load your Add-Ons or having strange results while exporting models, remember that you may have set these variables.

Blender – Import multiple files

Importing multiple files in Blender is okay-ish. While the underlying API supports that, the higher GUI does not (or was able, but is not anymore … ). This is for Windows .. but easily adaptable for *nix systems.

How to run?

Copy & past the one of the code snippets into Blender’s Text Editor. Don’t forget to create a New text file. You’re not able to paste nor type if there’s no present.

Objects (OBJ)

import os
import bpy

# put the location to the folder where the objs are located here in this fashion
# this line will only work on windows ie C:\objects
path_to_obj_dir = os.path.join('C:\\', 'objects')

# get list of all files in directory
file_list = sorted(os.listdir(path_to_obj_dir))

# get a list of files ending in 'obj'
obj_list = [item for item in file_list if item.endswith('.obj')]

# loop through the strings in obj_list and add the files to the scene
for item in obj_list:
    path_to_file = os.path.join(path_to_obj_dir, item)
    bpy.ops.import_scene.obj(filepath = path_to_file)
    # if heavy importing is expected 
    # you may want use saving to main file after every import 
    bpy.ops.wm.save_mainfile(filepath = "C:\\To\\Your\\File.blend")

Collada (DAE)

Importing Collada files differs a little. Object (OBJ) importing is located inside BPY’s import functionas, Collada’s is not …

import os
import bpy

# put the location to the folder where the objs are located here in this fashion
# this line will only work on windows ie C:\objects
path_to_obj_dir = os.path.join('C:\\', 'Some\\Folder\\Collada\\')

# get list of all files in directory
file_list = sorted(os.listdir(path_to_obj_dir))

# get a list of files ending in 'dae'
obj_list = [item for item in file_list if item.endswith('.dae')]

# loop through the strings in obj_list and add the files to the scene
for item in obj_list:
    path_to_file = os.path.join(path_to_obj_dir, item)
    bpy.ops.wm.collada_import(filepath = path_to_file)
    # if heavy importing is expected 
    # you may want use saving to main file after every import
    bpy.ops.wm.save_mainfile(filepath = "C:\\To\\Your\\File.blend")

Filmbox (FBX)

Importing FBX files is again, a bit different but the same ..

import os
import bpy

# put the location to the folder where the FBXs are located here in this fashion
# this line will only work on windows ie C:\objects
path_to_obj_dir = os.path.join('C:\\', 'objects')

# get list of all files in directory
file_list = sorted(os.listdir(path_to_obj_dir))

# get a list of files ending in 'fbx'
obj_list = [item for item in file_list if item.endswith('.fbx')]

# loop through the strings in obj_list and add the files to the scene
for item in obj_list:
    path_to_file = os.path.join(path_to_obj_dir, item)
    bpy.ops.import_scene.fbx(filepath = path_to_file)
    # if heavy importing is expected 
    # you may want use saving to main file after every import 
    bpy.ops.wm.save_mainfile(filepath = "C:\\To\\Your\\File.blend")

GL Transmission Format (GLB & GLTF)

Importing GLB / GLTF files is as well inside the import_scene obj, tested with Blender 2.81a:

import os
import bpy

# put the location to the folder where the GLBs are located here in this fashion
# this line will only work on windows ie C:\objects
path_to_obj_dir = os.path.join('C:\\', 'objects')

# get list of all files in directory
file_list = sorted(os.listdir(path_to_obj_dir))

# get a list of files ending in 'glb' (or 'gltf')
obj_list = [item for item in file_list if item.endswith('.glb')]

# loop through the strings in obj_list and add the files to the scene
for item in obj_list:
    path_to_file = os.path.join(path_to_obj_dir, item)
    bpy.ops.import_scene.gltf(filepath = path_to_file)
    # if heavy importing is expected 
    # you may want use saving to main file after every import 
    bpy.ops.wm.save_mainfile(filepath = "C:\\To\\Your\\File.blend")

Kudos go to .. 

The user poor has already created importing and exporting scripts including the Blender plugin interface. This needs to be adapted to Collada functions only, et voila.

References

Marie Chouinard – Body Remix

Most of you know the partial videos from Youtube commonly titled ‘What the fuck did I just watch?. (NOT THIS ONE)

For those who want to know who made this performance (not the XBox360 one) here is some information:

The ballet in two acts (95 min) called ‘bODY_rEMIX / gOLDBERG_vARIATIONS‘ was choreographed and directed by Marie Chouinard in 2005. Since then she and her group performed several times at diverse festivals. The snippet on Youtube was recorded from arte a German Television Station known for its French/German partnership and its strong artistic content.

mariechouinard.com

mariechouinard.com