instancing support

metadata
Wenzel Jakob 2010-11-15 07:18:52 +01:00
parent 2ecbd580a9
commit db618fa804
4 changed files with 8 additions and 4 deletions

View File

@ -1087,6 +1087,7 @@ void loadNode(GeometryConverter *cvt, Transform transform, std::ostream &os,
identifier = formatString("unnamedNode_%i", unnamedCtr);
}
}
prefixName = prefixName + std::string("/") + identifier;
SLog(EInfo, "Converting node \"%s\" ..", identifier.c_str());
daeTArray<daeSmartRef<daeElement> > children = node.getChildren();
@ -1190,7 +1191,7 @@ void loadNode(GeometryConverter *cvt, Transform transform, std::ostream &os,
/* Recursively iterate through sub-nodes */
domNode_Array &nodes = node.getNode_array();
for (size_t i=0; i<nodes.getCount(); ++i)
loadNode(cvt, transform, os, *nodes[i], prefixName + std::string("/") + identifier, meshesDir);
loadNode(cvt, transform, os, *nodes[i], prefixName, meshesDir);
/* Recursively iterate through <instance_node> elements */
domInstance_node_Array &instanceNodes = node.getInstance_node_array();

View File

@ -114,6 +114,9 @@ class MITSUBA_OT_preset_material_add(MITSUBA_OT_preset_base, bpy.types.Operator)
pv.extend([
'bpy.context.material.mitsuba_material.mitsuba_mat_%s.%s'%(mts_type, v['attr']) for v in sub_type.get_exportable_properties()
])
pv.extend([
'bpy.context.material.mitsuba_material.mitsuba_emission.%s'%v['attr'] for v in bpy.types.mitsuba_emission.get_exportable_properties()
])
self.preset_values = pv
return super().execute(context)

View File

@ -70,7 +70,6 @@ class mitsuba_emission(declarative_property_group):
'''
controls = [
'use_emission',
'color',
'intensity',
'samplingWeight',

View File

@ -19,6 +19,7 @@
import bpy
from mitsuba.ui.materials import mitsuba_material_sub
from properties_material import active_node_mat
class ui_material_composite(mitsuba_material_sub, bpy.types.Panel):
bl_label = 'Mitsuba Composite Material'
@ -32,7 +33,7 @@ class ui_material_composite(mitsuba_material_sub, bpy.types.Panel):
def draw(self, context):
super().draw(context)
mat = context.material.mitsuba_material.mitsuba_mat_composite
mat = active_node_mat(context.material).mitsuba_material.mitsuba_mat_composite
weight = 0
missing = False
selfRef = False