Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
On 13/02/2018 at 16:24, xxxxxxxx wrote:
I've been using a script in R18 for sometime now and went to use it today in R19 and ran into an error. When I get to this command, GetParameter(c4d.MPBTYPE_DPI), it returns 0.0 which then throws up an error i my script as that measurement can't be zero.
I tried it again in R18 and it works fine. Went back to 19 and it fails to return the dpi.
Is this a known issue?
thanks, .del
Texture = c4d.bitmaps.BaseBitmap() width, height = Texture.GetSize() mbp = c4d.bitmaps.MultipassBitmap.AllocWrapper(Texture) dpi = mbp.GetParameter(c4d.MPBTYPE_DPI) width = width/float(dpi) height = height/float(dpi)
On 15/02/2018 at 02:51, xxxxxxxx wrote:
Hi del, thanks for writing us.
Given that MPBTYPE_DPI is marked as private and accessing the data pointed by this ID is not granted to be valid nor officially allowed, in R19 the default value of 72dpi (which I presume was returned in your execution on R18) is no longer returned. It's instead returned 0.0 or the dpi value set by MultipassBitmap::SetParameter(MPBTYPE_DPI).
Best, Riccardo
On 15/02/2018 at 07:45, xxxxxxxx wrote:
What do you mean that it's marked as private? I'm looking at the SDK and I don't see anything that says not to use it. How do we know if we can or can't use things listed in the SDK?
MultipassBitmap.GetParameter(id)
MultipassBitmap.GetParameter
Uses a description ID as a key into the container, and retrieves the stored data. Parameters:| id (int) – Parameter ID:
MultipassBitmap.SetParameter()
PaintLayerBmp
PaintLayerFolder
_<_t_>__/t>
On 15/02/2018 at 09:09, xxxxxxxx wrote:
Hi del, looks like the you've hit an inconsistency in our Python documentation which will be fixed in the future.
I apologize for any inconvenience cause so far, but if you check in the C++ doc (as pointed out in my previous post) you see that it's actually marked as private.