Tue, Dec 31, 5:00 PM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Dec 31 11:34 am)



Subject: SetMorphTargetDelta


colorcurvature ( ) posted Mon, 03 May 2010 at 9:26 AM · edited Sun, 21 July 2024 at 11:57 PM

The biggest of all mysteries:

SetMorphTargetDelta function in Posers API.

How to call it properly to have a morph target that contains absolutely nothing?

for i in range(len(actor_verts)):
    param.SetMorphTargetDelta(i, 0.0, 0.0, 0.0) 
This does not work. After it ran, the morph target contains what it was initialized with, e.g. the influence of JCMs.

for i in range(len(actor_verts)):
    param.SetMorphTargetDelta(i, 0.000001, 0.0000001, 0.0000001)    seems to overwrite the initial values

for i in range(len(actor_verts)):
    param.SetMorphTargetDelta(i, 1.0, 1.0, 1.0) 
    param.SetMorphTargetDelta(i, 0.0, 0.0, 0.0) 
for i in range(len(actor_verts)):
    param.SetMorphTargetDelta( )

seems to work

for i in range(len(actor_verts)):
    param.SetMorphTargetDelta(i, 1.0, 1.0, 1.0) 
    param.SetMorphTargetDelta(i, 0.0, 0.0, 0.0) 
    param.SetMorphTargetDelta( )

works only for 90% of the vertices

this some looks like either a parameter format error or bad access to memory...

Is there anyone who might know what this function is really doing or how to make it handle 0.0 value properly? I do not know how to debug Posers black heart ;-)

SmithMicro support didnt know either :(


PhilC ( ) posted Mon, 03 May 2010 at 9:53 AM

I needed this when I wrote a script that would remove all vertices associated with a designated material from a morph. However I couldn't get it to zero either. What I ended up doing was gleaning the required delta information from the original morph then using it to build a new morph.


colorcurvature ( ) posted Mon, 03 May 2010 at 10:06 AM

Most irritating is, if you setMorphTargetDelta() and then just read the value back with MorphTargetDelta(i), it tells you it would contain 0.0.  If i ask it again after the script ran, it would tell me the truth and reveal it is not empty.


PhilC ( ) posted Mon, 03 May 2010 at 10:18 AM

If you would like to email me I'll send you the script.

pcooke@philc.net


Winterclaw ( ) posted Mon, 03 May 2010 at 11:26 AM

Question... does it have to be 0.0?  Maybe the program is expecting just a 0.

WARK!

Thus Spoketh Winterclaw: a blog about a Winterclaw who speaks from time to time.

 

(using Poser Pro 2014 SR3, on 64 bit Win 7, poser units are inches.)


colorcurvature ( ) posted Mon, 03 May 2010 at 11:51 AM

0.0 is what i want :-).
In a desperate attempt I am now first writing 1.0 then 0.0 to everything, then afterwards set the values I computed, and in a final step I walk over everything and check if the values are what I think they are... and if they are not => exception
so rather abort than do something wrong.
but still  i am not really satisfied.

wish poser was open source :)


Winterclaw ( ) posted Mon, 03 May 2010 at 5:18 PM

I was just thinking that 0.0 might be too precise for whatever program was going to accept them and that it was expecting some non-zero number since you put in the point.  Since 0 = 0.0 I'd try just plain 0 at least once to see what happens.

WARK!

Thus Spoketh Winterclaw: a blog about a Winterclaw who speaks from time to time.

 

(using Poser Pro 2014 SR3, on 64 bit Win 7, poser units are inches.)


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.