Get all materials inside an object for controlling mapping nodes with single var
Wrote following in answer to this q. Noticed you sorted it out, thought I'd post anyway




Wrote a utility function to query an objects material nodes.
query_mat_nodes(ob, "type", 'MAPPING') returns a list of all
mapping type nodes.  query_mat_nodes(ob, "name", "Frank") returns a
list of all nodes named "Frank" in the objects materials.
Added a float property to the object with an update method to set all
the mapping nodes on object to this property value.  Notice giving the
property the unit='ROTATION' will display the value in the UI
dependant on the setting for scene rotation unit in units panel. 
(generally degrees is selected)  The property value will always be in
radians.
For want of a better place I tacked (prepended) draw_prop (a UI draw method) to the node space
header to test.


Test script.

import bpy
from math import radians
def query_mat_nodes(ob, key, value):
    return set(n for s in ob.material_slots if s.material and s.material.use_nodes
            for n in s.material.node_tree.nodes if getattr(n, key, None) == value)


def update_map_nodes(self, context):
    for n in query_mat_nodes(self, "type", 'MAPPING'):
        n.rotation.z = self.map_rot

bpy.types.Object.map_rot = bpy.props.FloatProperty(
         min=0,
         max=radians(360),
         unit='ROTATION',
         update=update_map_nodes)

def draw_prop(self, context):
    self.layout.prop(context.object, "map_rot")

bpy.types.NODE_HT_header.prepend(draw_prop)