|
|
@ -188,20 +188,23 @@ class AnimationConverter: |
|
|
|
applicator.channel = channel |
|
|
|
applicator.channel = channel |
|
|
|
yield applicator |
|
|
|
yield applicator |
|
|
|
elif falloff == "INVERSE_SQUARE": |
|
|
|
elif falloff == "INVERSE_SQUARE": |
|
|
|
def convert_quadratic_atten(distance, energy): |
|
|
|
if self._mgr.getVer() >= pvMoul: |
|
|
|
intens = abs(energy[0]) |
|
|
|
def convert_quadratic_atten(distance, energy): |
|
|
|
atten_end = distance[0] if lamp.use_sphere else distance[0] * 2 |
|
|
|
intens = abs(energy[0]) |
|
|
|
return light_converter.convert_attenuation_quadratic(intens, atten_end) |
|
|
|
atten_end = distance[0] if lamp.use_sphere else distance[0] * 2 |
|
|
|
|
|
|
|
return light_converter.convert_attenuation_quadratic(intens, atten_end) |
|
|
|
keyframes = self._process_fcurves([distance_fcurve, energy_fcurve], convert_quadratic_atten, |
|
|
|
|
|
|
|
{"distance": lamp.distance, "energy": lamp.energy}) |
|
|
|
keyframes = self._process_fcurves([distance_fcurve, energy_fcurve], convert_quadratic_atten, |
|
|
|
if keyframes: |
|
|
|
{"distance": lamp.distance, "energy": lamp.energy}) |
|
|
|
channel = plScalarControllerChannel() |
|
|
|
if keyframes: |
|
|
|
channel.controller = self._make_scalar_leaf_controller(keyframes, False) |
|
|
|
channel = plScalarControllerChannel() |
|
|
|
applicator = plOmniSqApplicator() |
|
|
|
channel.controller = self._make_scalar_leaf_controller(keyframes, False) |
|
|
|
applicator.channelName = name |
|
|
|
applicator = plOmniSqApplicator() |
|
|
|
applicator.channel = channel |
|
|
|
applicator.channelName = name |
|
|
|
yield applicator |
|
|
|
applicator.channel = channel |
|
|
|
|
|
|
|
yield applicator |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
self._exporter().report.port("Lamp Falloff '{}' animations only partially supported for this version of Plasma", falloff, indent=3) |
|
|
|
else: |
|
|
|
else: |
|
|
|
self._exporter().report.warn("Lamp Falloff '{}' animations are not supported".format(falloff), ident=3) |
|
|
|
self._exporter().report.warn("Lamp Falloff '{}' animations are not supported".format(falloff), ident=3) |
|
|
|
|
|
|
|
|
|
|
|