3dcheapskate opened this issue on Apr 23, 2020 ยท 38 posts
3dcheapskate posted Sat, 25 April 2020 at 3:12 AM
Just tried that simple test, running my script from C:Program Files:Smith Micro:Poser Pro 2014:Runtime:Python:poserScripts:3DCheapskate:SmartPlus:
When it writes the temporary pose file under poser.AppLocation() it works fine.
So the whole UAC problem came about because, with my specific setup, I was running the script from an external runtime
Anyway, mainly for my own reference, here's the full function in its original form. No need to use poser.TempLocation() ... unless you run the script from an external runtime.
def parentprop(ac,par):
scn = poser.Scene()
if ac.IsProp():
scn.SelectActor(ac)
propin=ac.InternalName()
propen=ac.Name()
parin=par.InternalName()
paren=par.Name()
sTmp = os.path.join('Runtime','Libraries','Pose','3DCheapskate','SmartPlus','TempPose.pz2')
poserpath=os.path.split(poser.AppLocation())
fileaddr = os.path.join(poserpath[0],sTmp)
pose=open(fileaddr,"w")
pose.write("{ntactor $CURRENTnt{nttsmartparent "+parin+"nt}n}n")
pose.close()
scn.LoadLibraryPose(fileaddr)
else:
print "FAILED:", propin," is not a prop"
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident. And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU or something else.
*soon only to be available in two flavours - DAZ and Renderosity