Bodypaint Bitmap Dirty status
-
On 13/12/2014 at 09:42, xxxxxxxx wrote:
Hello,
has anyone made experiences with Bodypaint Bitmaps.
If I check the dirty state of a bitmap like:Tex = bodypaint.PaintTexture.GetSelectedTexture() actlay= Tex.GetActive() if actlay.IsInstanceOf(c4d.OBJECT_PAINTLAYERBMP) == True: bmp = actlay.ToPaintLayerBmp() bmp.GetDirty()
I´ll get this error message:
SystemError: /perforce_buildsystem_osx/c4d_mx_buildsystem_osx/release/16.0/modules/python/source/i_getargs.cpp:1616: bad argument to internal function
I´m not allowed to set a zero flag as it is suggested in the docs:
``PaintBitmap.GetDirty( _flags_ )
[URL-REMOVED]Thanks in advance
Martin
[URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.
-
On 13/12/2014 at 11:19, xxxxxxxx wrote:
You've created a paint layer bitmap. Which doesn't have a GetDirty() method.
You'll need to convert it to a BaseBitmap() type using GetPixelCnt() to loop through it and copy the color values to a new BaseBitmap with SetPixelCnt().Then you should be able to use GetDirty() on it.
-ScottA
-
On 13/12/2014 at 12:34, xxxxxxxx wrote:
Hello Scott,
yes thanks! I see.
But it doesn´t make sense to me as im able to use the other members of the class with
bmp = actlay.ToPaintLayerBmp()I want to avoid recalculating the Bitmaps on every event message in my plugin.
I copied the BP layer structure to a treeviewcustomgui and an userarea in my dialogplugin.
That´s why I was searching for a fast indicator that the user changed something at the PaintBitmap
and I thought GetDirty should be good enough.
Do you have an idea to solve this in fast manner.Thanks in advance
Martin -
On 13/12/2014 at 13:19, xxxxxxxx wrote:
No idea.
I've never tried using the layer images in other GUI's.Sorry.
-ScottA
-
On 13/12/2014 at 15:23, xxxxxxxx wrote:
ok.
By the way the treeviewcustom gui on your website was a good resource to begin with.Thanks
Martin -
On 15/12/2014 at 07:03, xxxxxxxx wrote:
Hello,
if I try to follow along with Scotts suggestion.
Originally posted by xxxxxxxx
You'll need to convert it to a BaseBitmap() type using GetPixelCnt() to loop through it and copy the color values to a new BaseBitmap with SetPixelCnt().
Then you should be able to use GetDirty() on it.
my dirty status is always 1, as expected.
Because I have to initialise the bitmap in the first place or load it from a path to use GetPixelCnt()/SetPixelCnt()So is my assuption right that the dirty status of a bitmap only reflects the count of how often a bitmap was saved with c4d and therefore it is not possible to detect if a bitmap has changed without saving it to disc?
Could someone please throw light on this issue?
Thanks in advance
Martin -
On 15/12/2014 at 10:45, xxxxxxxx wrote:
Hello,
the dirty count is increased every time a part of the bitmap is changed. Unfortunately there is a bug in PaintBitmap.GetDirty(). A bug report was filed.
Best wishes,
Sebastian -
On 15/12/2014 at 13:46, xxxxxxxx wrote:
Hello Sebastian,
thanks for the bug report,
I hope we can use it soon.Best wishes
Martin