SketchUp / api-issue-tracker

Public issue tracker for the SketchUp and LayOut's APIs
https://developer.sketchup.com/
38 stars 10 forks source link

Face-me component transforms are incorrect with new render engine #970

Open noelwarren opened 6 months ago

noelwarren commented 6 months ago

Version

  1. SketchUp 2024
  2. Windows (Probably mac too)

Description

When the "new graphics engine" is being used, face-me component transforms are not updated after camera view change. This is true for both the ruby and c api.

Steps to reproduce

The following example is meant to work with the default template that includes the "Teddy" face me component. Simply ensure the "new graphics engine" is the current engine and copy paste:

model = Sketchup.active_model
t1 = model.entities.first.transformation.to_a
model.active_view.camera.tap{ |c| c.set([rand(100..200),-240,74], c.target, c.up) }
UI.start_timer(1, false) {
    t2 = model.entities.first.transformation.to_a
    if t1 == t2
        raise "Assertion failed" 
    else
        puts "Assertion ok"
    end
}

notes

I understand that supporting this old behavior will likely have performance implications for SketchUp. If this is the case I would suggest sharing the face me component transform algorithm so 3rd parties can continue to support this feature

sketchup[bot] commented 6 months ago

Logged as: SKEXT-4195