diff options
Diffstat (limited to 'intern/cycles/blender')
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 13 | ||||
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 12 |
2 files changed, 8 insertions, 17 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 6f31732aa1f..d8f776b0114 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -366,8 +366,7 @@ class CyclesLamp_PT_lamp(CyclesButtonsPanel, Panel): @classmethod def poll(cls, context): - return False - #return context.lamp and CyclesButtonsPanel.poll(context) + return context.lamp and CyclesButtonsPanel.poll(context) def draw(self, context): layout = self.layout @@ -505,17 +504,13 @@ class CyclesMaterial_PT_settings(CyclesButtonsPanel, Panel): mat = context.material cmat = mat.cycles - layout.prop(mat, "diffuse_color", text="Viewport Color") - - """ split = layout.split() - + col = split.column() - col.prop(cmat, "sample_as_light") + col.prop(mat, "diffuse_color", text="Viewport Color") col = split.column() - col.prop(cmat, "homogeneous_volume") - """ + col.prop(cmat, "sample_as_light") class CyclesTexture_PT_context(CyclesButtonsPanel, Panel): bl_label = "" diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index de41484975d..1095a3ee026 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -91,14 +91,11 @@ void BlenderSync::sync_light(BL::Object b_parent, int b_index, BL::Object b_ob, BL::Lamp b_lamp(b_ob.data()); /* type */ -#if 0 switch(b_lamp.type()) { case BL::Lamp::type_POINT: { BL::PointLamp b_point_lamp(b_lamp); light->size = b_point_lamp.shadow_soft_size(); -#endif light->type = LIGHT_POINT; -#if 0 break; } case BL::Lamp::type_SPOT: { @@ -132,11 +129,10 @@ void BlenderSync::sync_light(BL::Object b_parent, int b_index, BL::Object b_ob, break; } } -#endif - /* location */ + /* location and (inverted!) direction */ light->co = make_float3(tfm.x.w, tfm.y.w, tfm.z.w); - light->dir = make_float3(tfm.x.z, tfm.y.z, tfm.z.z); + light->dir = -make_float3(tfm.x.z, tfm.y.z, tfm.z.z); /* shader */ vector<uint> used_shaders; @@ -149,8 +145,8 @@ void BlenderSync::sync_light(BL::Object b_parent, int b_index, BL::Object b_ob, light->shader = used_shaders[0]; /* shadow */ - //PointerRNA clamp = RNA_pointer_get(&b_lamp.ptr, "cycles"); - //light->cast_shadow = get_boolean(clamp, "cast_shadow"); + PointerRNA clamp = RNA_pointer_get(&b_lamp.ptr, "cycles"); + light->cast_shadow = get_boolean(clamp, "cast_shadow"); /* tag */ light->tag_update(scene); |