'instance' and 'unicode' concatenation

Discussions concerning programming of SOFTIMAGE©
Post Reply
jmquintela
Posts: 31
Joined: 16 Sep 2013, 21:29
Skype: jm_quintela

'instance' and 'unicode' concatenation

Post by jmquintela » 14 Nov 2013, 09:14

This Line Give me error ---> CurrentPassName = CuPass + NameVar
I know it's because the fir var is an 'instance' and the second a 'unicode', how can I convert the instance to unicode and make a compatible concatenation ???

this is the original script Function:

def FinalRendering() :

#PassVars

CuPass = Application.ActiveProject.ActiveScene.ActivePass
SceneName = u"Liquid_Pouring"
PassName = u"Playblast_rough"
NameVar = u".Name"
CurrentPassName = CuPass + NameVar
NewPassName = SceneName + u"_" + PassName

Format = u".ImageFormatPreset"

#formato 16:9 720x480 = -28
FormatValue = -28

Application.SetValue( CurrentPassName , NewPassName , "")

EricTRocks
Moderator
Posts: 754
Joined: 25 Nov 2009, 01:41
Contact:

Re: 'instance' and 'unicode' concatenation

Post by EricTRocks » 14 Nov 2013, 12:24

Should be

CurrentPassName = CuPass.Name + NameVar
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken

jmquintela
Posts: 31
Joined: 16 Sep 2013, 21:29
Skype: jm_quintela

Re: 'instance' and 'unicode' concatenation

Post by jmquintela » 14 Nov 2013, 16:06

Thank you very much , it work ) !

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests