InstanceHandler & Item Instancing

darkChief

Member
How do you set an instances' position, rotation and scale using instance functions in an instance handler?

Is it setMotionstep? If so how do you use it. The documentation also mentions a function called modifyInstance, but its not there.
 

creacon

creacon
That's a part of the SDK that I haven't touched so far, but from the docs I would try:
- CreateInstance
then
- SetInstance
then
- SetMotionStep

creacon

How do you set an instances' position, rotation and scale using instance functions in an instance handler?

Is it setMotionstep? If so how do you use it. The documentation also mentions a function called modifyInstance, but its not there.
 

darkChief

Member
That's a part of the SDK that I haven't touched so far, but from the docs I would try:
- CreateInstance
then
- SetInstance
then
- SetMotionStep

creacon

I tried CreateInstance, SetInstance and setMotionstep, but nothing appears in the viewport or render. I don't understand what steps are supposed to do. Will keep experimenting I guess.

- - - Updated - - -

btw, there is no way to instance lights or hierarchies of lights, right?

I think only items with mesh info, I could be wrong.
 

creacon

creacon
My first guess was that this would be a timestep but then I read this in the header file:

// LW2018: Use this in favour of the other set**** functions.
void (*setMotionStepAuto)( LWItemInstanceID vinstance, LWTime time , unsigned int step,
const LWDVector p, const double m[9] );

And now I am as confused as you are :)

creacon
 

jwiede

Electron wrangler
I'm kind of frustrated by the "less than overwhelming" level of detail info provided with many of the new LW2018 APIs in the SDK. That reference creacon just posted should never have made it past review. It just further adds to the impression the release was premature (and/or that the SDK didn't receive much priority).

They really need to start providing modern, autodoc-style API and structure/pointer documentation, with well-populated descriptions for everything, etc. It was done in 2017, not 1993.
 
Last edited:

creacon

creacon
I'm no big fan of autodoc style documentation, but an online version (Wiki - like) where the developers can change or make suggestions would be nice.
Better commenting in the header files would be nice too.

creacon
 

jwiede

Electron wrangler
I'm no big fan of autodoc style documentation, but an online version (Wiki - like) where the developers can change or make suggestions would be nice.
Better commenting in the header files would be nice too.

When I say "autodocs", I really mean it in more the Doxygen, comprehensive, explanatory notations on most things sense. Online would be fine, as long as there's an offline-downloadable version as well. What's frustrating now is the rather "haphazard" coverage of details in either headers or associated docs, and a general lack of workflow / theory-of-operation information, esp. w.r.t. recent SDK changes/additions.
 

gclayton

New member
Last edited:
Top Bottom