Print at Dec 15, 2025, 7:35:32 PM

Posted by db4tech at Sep 9, 2010, 5:51:58 AM
Re: Easy 3D light bulb positioning
Thank you! smile

I'm sorry to say I've got a bit stuck though. My original idea worked but found out it did cause another problem. So after undoing those changes, and having a rethink, I'm trying to add a new exception rule.

Just to test my new exception rule idea works, I temporarily disabled the 2 lines below, I haven't learned enough yet, to know how to let shapeName.startsWith("sweethome3d_light") have it's own exception rule. The idea does work, smile I just need help on how to proceed, to give sweethome3d_light, its own exception rule.


// Build a unique object name
String uuid = UUID.randomUUID().toString();

String appearanceName = null;
TexCoordGeneration texCoordGeneration = null;
if (appearance != null) {
if (ignoreWindowPanes
&& shapeName != null
// && shapeName.startsWith(ModelManager.WINDOW_PANE_SHAPE_PREFIX)
// && isDoorOrWindowChild(shape)

&& shapeName.startsWith("sweethome3d_light")
) {
return;
}
texCoordGeneration = appearance.getTexCoordGeneration();
appearanceName = "shader" + uuid;
boolean mirror = shapeName != null
&& shapeName.startsWith(ModelManager.MIRROR_SHAPE_PREFIX);
exportAppearance(appearance, appearanceName, mirror, defaultShininess, silkRendering);
}


I have tried several things, to let sweethome3d_light have its own exception rule but I'm soon starting my next course semester and hoped to get this finished before then. So rather than struggle by myself, sad I thought maybe it's best to ask for help.

Thank you in advance!

Good idea about also using 1.6.1 extension for the lights. smile

db4tech