Navigation

    • Register
    • Login
    • Search
    • Categories
    1. Home
    2. WickedP
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    WickedP

    @WickedP

    5
    Reputation
    40
    Posts
    209
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online
    Website www.wickedp.com

    WickedP Follow

    Posts made by WickedP

    • RE: Custom register plugin

      Thanks @Filip and @kbar, I've setup a simple message system that I'm experimenting with.

      Just a question (for anyone) regarding the start up procedures for Cinema, will my plugin receive PluginMessage() messages if my main plugin is not registered yet? Asking to make sure I can receive a message from another plugin that Cinema might try to register before mine.

      WP.

      posted in Cinema 4D Development
      WickedP
    • RE: Custom register plugin

      Thanks both of you. I'm still thinking this one through.

      @C4DS I hadn't thought of SpecialEventAdd, thanks for the suggestion. This had me looking into, and finding, GePluginMessage(). I'm wondering if I could call this in PluginStart(). This does seem to work. I could maybe avoid Cinema's Register system with this.

      @PluginStudent can I register a custom type using GeRegistryAdd()? Or does it have to be one of the listed types? E.g. can I register a type under my main plugin id?

      WP.

      posted in Cinema 4D Development
      WickedP
    • Custom register plugin

      Hi folks,

      just doing some brainstorming and hoping someone may be able to suggest/contribute some ideas.

      I have a dialog plugin with a graphical interface. I'd like to be able to register plugins for my plugin, so that I can build them separately if needed, or perhaps so others in the future may be able to.

      Is it possible to register a custom plugin type? Or, could I piggyback off one of the Register*() functions and grab the registration in my plugin somewhere?

      WP.

      posted in Cinema 4D Development
      WickedP
    • RE: Editor and viewport colours - where/how to find them?

      Thanks @C4DS, that's what I'm after!

      WP.

      posted in Cinema 4D Development
      WickedP
    • Editor and viewport colours - where/how to find them?

      Hi folks,

      I want to get the editor viewport colours, so I can colour things using the same as the viewport. I'm guessing this is in the preferences.

      E.g. how do I get the viewport background colour? How about the grid and world axis colours? Selected point colours... etc.

      WP.

      posted in Cinema 4D Development
      WickedP
    • RE: BaseContainer containers

      Just some further thought here. I tried to return a pointer via a function so that I wasn't having to create a copy everywhere and everytime I needed to access it. Upon reflecting yesterday evening, I realised that returning it like this, the container might be going out of scope at the function return, and is therefore destroyed. I.e.

      // let's say parent is class level container somewhere
      
      BaseContainer* My_Class::Get_ContainerP(void)
      {
          return &parent.GetContainer(MY_CHILD_ID);
      }
      void My_Class::Work_Container(void)
      {
          BaseContainer *bc = Get_ContainerP();
      
          if(bc == nullptr)
          {
              return;
          }
      
          // bc passes nullptr check because the address was valid
          // however...
      
          if(bc->GetBool(MY_CHILD_BOOL,FALSE) == TRUE)
          {
              // crashes here with an access violation because the container was destroyed when the scope stopped after the Get_ContainerP() return.
          }
      }
      

      I'm wondering if GetContainer() makes a copy itself. I was trying to use a pointer so that I wasn't creating copies of the nested container everywhere and everytime I wanted to access it (which will be frequently). But it looks I have to. Would this be right?

      WP.

      posted in Cinema 4D Development
      WickedP
    • BaseContainer containers

      Hi folks,

      is it safe to access a BaseContainer held inside another BaseContainer by pointer? E.g.:

      BaseContainer parent;
      BaseContainer child;
      parent.SetContainer(MY_CHILD_ID,child);
      
      // then somewhere else
      BaseContainer *bc = &parent.GetContainer(MY_CHILD_ID);
      // read from bc...
      variable value = bc->etc...
      // finish
      

      Are there any issues with doing this?

      WP.

      posted in Cinema 4D Development
      WickedP
    • GeUserArea::Draw() and textures

      Hi folks,

      can anyone tell me if it's possible to draw a texture that already exists on the graphics card, without having to transfer it to the CPU-side, when in a GeUserArea()?

      Currently, I pull the texture, then transfer the data to a BaseBitmap, then do this in DrawMsg():

      void MyUserArea::DrawMsg(LONG x1,LONG y1,LONG x2,LONG y2,const BaseContainer &msg)
      	{
      		SetClippingRegion(x1,y1,x2,y2);
      		OffScreenOn();
      	
      		DrawSetPen(COLOR_BG);
      		DrawRectangle(x1,y1,x2,y2);
      
      		if(texture)
      		{
      			DrawBitmap(texture,Left,Top,Right,Bottom,0,0,texture->GetBw(),texture->GetBh(),BMP_NORMAL);
      		}
      	}
      

      but it's very slow once the texture gets above HD desktop size. Is there a hack I can use to just draw what I've already got in GPU memory? Is there something like a BaseDraw object I can tap into here from inside the DrawMsg() method?

      WP.

      posted in Cinema 4D Development
      WickedP
    • RE: BitmapButtonCustomGui hover

      Thanks Ferdinand,

      sounds like it won't be available for me (I'm pre-s22). I can live with the GeUserArea, but good to know it's available for more recent releases.

      Two other things. Firstly, congrats on becoming a Maxon support member!

      Secondly, I can't seem to mark any topics of mine as solved. Has this changed?

      WP.

      posted in Cinema 4D Development
      WickedP
    • BitmapButtonCustomGui hover

      Hi folks,

      is there a flag to prevent the change in background colour when you hover over a BitmapButtonCustomGui with a transparent image on it? I want just a static image that does nothing when you mouse over. I'm currently using a GeUserArea, which works fine, but seems a little cumbersome to make just for a static image.

      Or is the user area the only way?

      WP.

      posted in Cinema 4D Development
      WickedP