instancing support
parent
2ecbd580a9
commit
db618fa804
|
@ -1087,6 +1087,7 @@ void loadNode(GeometryConverter *cvt, Transform transform, std::ostream &os,
|
||||||
identifier = formatString("unnamedNode_%i", unnamedCtr);
|
identifier = formatString("unnamedNode_%i", unnamedCtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
prefixName = prefixName + std::string("/") + identifier;
|
||||||
SLog(EInfo, "Converting node \"%s\" ..", identifier.c_str());
|
SLog(EInfo, "Converting node \"%s\" ..", identifier.c_str());
|
||||||
|
|
||||||
daeTArray<daeSmartRef<daeElement> > children = node.getChildren();
|
daeTArray<daeSmartRef<daeElement> > children = node.getChildren();
|
||||||
|
@ -1190,7 +1191,7 @@ void loadNode(GeometryConverter *cvt, Transform transform, std::ostream &os,
|
||||||
/* Recursively iterate through sub-nodes */
|
/* Recursively iterate through sub-nodes */
|
||||||
domNode_Array &nodes = node.getNode_array();
|
domNode_Array &nodes = node.getNode_array();
|
||||||
for (size_t i=0; i<nodes.getCount(); ++i)
|
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 */
|
/* Recursively iterate through <instance_node> elements */
|
||||||
domInstance_node_Array &instanceNodes = node.getInstance_node_array();
|
domInstance_node_Array &instanceNodes = node.getInstance_node_array();
|
||||||
|
|
|
@ -114,6 +114,9 @@ class MITSUBA_OT_preset_material_add(MITSUBA_OT_preset_base, bpy.types.Operator)
|
||||||
pv.extend([
|
pv.extend([
|
||||||
'bpy.context.material.mitsuba_material.mitsuba_mat_%s.%s'%(mts_type, v['attr']) for v in sub_type.get_exportable_properties()
|
'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
|
self.preset_values = pv
|
||||||
return super().execute(context)
|
return super().execute(context)
|
||||||
|
|
|
@ -70,7 +70,6 @@ class mitsuba_emission(declarative_property_group):
|
||||||
'''
|
'''
|
||||||
|
|
||||||
controls = [
|
controls = [
|
||||||
'use_emission',
|
|
||||||
'color',
|
'color',
|
||||||
'intensity',
|
'intensity',
|
||||||
'samplingWeight',
|
'samplingWeight',
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
import bpy
|
import bpy
|
||||||
|
|
||||||
from mitsuba.ui.materials import mitsuba_material_sub
|
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):
|
class ui_material_composite(mitsuba_material_sub, bpy.types.Panel):
|
||||||
bl_label = 'Mitsuba Composite Material'
|
bl_label = 'Mitsuba Composite Material'
|
||||||
|
@ -32,7 +33,7 @@ class ui_material_composite(mitsuba_material_sub, bpy.types.Panel):
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
super().draw(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
|
weight = 0
|
||||||
missing = False
|
missing = False
|
||||||
selfRef = False
|
selfRef = False
|
||||||
|
|
Loading…
Reference in New Issue